« first day (277 days earlier)      last day (4197 days later) » 
00:00 - 21:0021:00 - 00:00

12:13 AM
@halirutan I don't think it's defined on the first call
I would bet it's inert to the kernel, but the front end knows it
 
@Rojo No it's not. The question is can we uncover other functions like this one.
First question is: Does someone know, when FrontEnd context is loaded? Can we execute code before this?
If yes, I have an idea.
But I assume even the init.m comes too late.
 
What do you mean?
I'm assuming that
 
@Rojo I mean, when we can tweak the system before the FrontEnd package is loaded, we can hack e.g. the DeclarePackage function.
 
But
are you sure that's the case?
I mean, functions like that one simply get their symbol defined when the kernel sends them to the FE, just like you would get it defined if you did bla[FrontEnd`whatever], but nothing
is actually "loaded" in the kernel
 
If you do Names["FrontEnd*"]` in a fresh mma session, the function that John used is missing... I think that's what halirutan is referring to: How do we find hidden functions that are loaded/defined only when called
 
12:19 AM
Ok, what I'm saying is that
I suspect
that they aren't defined when called. It's only the FE that knows them, never the kernel
No DeclarePackage
running kernel code
 
Ah, I see what you mean... So essentially Names only tells you what the kernel knows?
 
No stub symbol registered to run some code
That's my guess
 
@Rojo hmm..
 
It would be interesting to ask if there's any FrontEnd`UndocumentedFrontEndFunctionsList
 
Ok, do we have a way to proof your assumption?
 
12:23 AM
Humm
 
One way would be to listen to the communication which happens on $FrontEnd // FullForm
 
Yeah
or dig into the output of
DeclarePackage["bs`", {"bs`bs"}];
Trace@Information@"bs`*"
 
@Rojo What is this?
 
@halirutan Nothing useful
@halirutan What's easy to check is that
DeclarePackage["asf`", {"gfs"}];
Names["asf`gfs"]
DeclarePackage actually defines the symbols
 
yep
 
12:38 AM
so if it is not how I guessed then there's some mechanism I'm not aware of
 
12:59 AM
V9
Any news from the wtc?
 
@Rojo Still here?
 
Leaving for the cinema
Leave a meessabe, beep
 
Yep.. Have fun
 
1:53 AM
@chris I'm not very unfamiliar with it, yes. :) Well, it is quick-and-dirty; it has no error estimate, for one, and you know how sensitive the business of inverting Laplace transforms is...
@chris If you're going to use it, be prepared to keep increasing the precision of your numbers (and increasing the number of evaluation points), just to make sure the digits agree.
(Damn, I should really write more stuff on that blog; I'm starting to accumulate lots of undocumented routines again...)
@halirutan I'm not surprised that most people I talk to are many time zones away... :)
 
@J.M. So I assume I can say "Good morning" ;-)
 
2:37 AM
@halirutan Yep, good morning. Bit cloudy on my end, tho.
:)
 
@J.M. Still dark here and time for bed..
 
In which case, guten Nacht. :)
 
Yep
 
 
5 hours later…
7:22 AM
@halirutan Back
 
 
2 hours later…
9:14 AM
@Rojo Good morning.
 
9:36 AM
@halirutan good morning
and good mornig to everyone
I know that i'm boring, but can i ask to everyone here in the chat, if do you know how to create run a rule 30 CA with 3 colors?
 
 
2 hours later…
11:51 AM
I'm alone here??
@halirutan i have tested my model and I have a problem
the problem is that the number of cell white is always bigger than black cell
 
@DanieleRicci Ok, and?
 
ant the reason is because the starting matrix (the input) has a number of white cell bigger than black cell
and for this reason the number of white cell will be always bigger than black cell
and it's not good form my result
 
Ok, and you want to achieve what?
 
my purpose is to achieve a mixed result
i mean i want to have times in which i have black cells winners and times in which i want to have white cells winners
 
Ok, so I guess you want your start-matrix random, but not really random because you want to fix the number of black and white cells?
 
11:55 AM
i have my start matrix
that is not randome
it comes from another simulation
from rule 30
do you have Skype?
 
Hmm, but if your input-matrix is always given, you cannot do much about the outcome of your CA.
 
i know
 
So what exactly you want to know now?
 
my input matrix change following other input (that change) put in a rule 30 simulation
i wanted to tell you the result of my simulation
so now I have to change and see again my input matrix
 
@DanieleRicci ahh, so that white cells are always more than black cells was an information and not a question?
 
12:09 PM
ye
yep
 
Ok, then I got it now..
 
maybe you can help me:
to change my input
in the sense:
I want to run more time the rule 30 and at each step get and save in a matrix the last step
for example 1000 times
 
What do you take as input for the rule 30 ca?
 
a vector of 1 and 0
the dimension is a row made of 9 numbers (0 and 1)
9x1
so for example i have
r = CellularAutomaton[30, q4, v];
q4= {0,1,1,1,0,0,1,1,0};
v=1000.
 
12:26 PM
And you want to use the output of this in your own CA?
 
ok.
This here
Tuples[{0, 1}, 9]
gives you all possibilities of a vector of length 9 with 0/1 as elements.
So what you could do is, you run rule 30 exactly 1000 times on each of those vectors. This gives you 512 input matrices for your own CA
inputMatrices = Map[
   Function[input, CellularAutomaton[30, input, 1000]],
   Tuples[{0, 1}, 9]];
 
one second let me think :)
ok let's say
ok let's do in the following way
I have to produce 2 different matrixes and then put them together in my CA code
then
the difference btw the 2 matrixes is the starting vector
the starting vector is a mix of fixed numbers:
the central part is the result of one my database, 5 values made by 1 and 0;
the sides (2 values right and 2 value left) are random (0,1 or 0,1 and 2).
now i want to save in a each matrix the result of this simulation using the rule 30, with the central vector that is not changing and the sides that are random.
then i want to put together the matrixes and use them in my CA
how can I do?
 
12:52 PM
The question is, if you can calculate all possible input vectors, why do you want to make it random?
 
because i need to have in the central part of the input vector my numbers, because those numbers are the starting point of my studying
 
Say you want to build all possibilities of vectors with 2 elements left and right that are a combination of {0,1,2} and a central vector consisting of all posibilities of 5 numbers {0,1}:
 
yep and use them as input for the simulation in rule 30
 
Let's do it step by step so you really understand it.
 
then save the result of each simulation in a matrix to use then in my CA model
 
12:56 PM
All possibilities of 2 numbers which are either 0,1 or 2 is
Tuples[{0, 1, 2}, 2]
 
{{0, 0}, {0, 1}, {0, 2}, {1, 0}, {1, 1}, {1, 2}, {2, 0}, {2, 1}, {2,
2}}
This is what you want for your left and right side.
 
you central vector is Tuples[{0, 1}, 5]
{{0,0,0,0,0},{0,0,0,0,1},{0,0,0,1,0},{0,0,0,1,1},{0,0,1,0,0},{0,0,1,0,1},{0,0,1,1,0},{0,0,1,1,1},{0,1,0,0,0},{0,1,0,0,1},{0,1,0,1,0},{0,1,0,1,1},{0,1,1,0,0},{0,1,1,0,1},{0,1,1,1,0},{0,1,1,1,1},{1,0,0,0,0},{1,0,0,0,1},{1,0,0,1,0},{1,0,0,1,1},{1,0,1,0,0},{1,0,1,0,1},{1,0,1,1,0},{1,0,1,1,1},{1,1,0,0,0},{1,1,0,0,1},{1,1,0,1,0},{1,1,0,1,1},{1,1,1,0,0},{1,1,1,0,1},{1,1,1,1,0},{1,1,1,1,1}}
 
12:58 PM
lets move to another chatroom so we don't annoy the folks here:
 
 
2 hours later…
2:49 PM
Run 10k, RUUUUN, I'm coming!
 
3:45 PM
@halirutan I'm wagering you'll be part of the 10k club by Tuesday or so...
 
@J.M. When I run the code from your blog I get (i.stack.imgur.com/yCi6l.png) instead of tpfto.files.wordpress.com/2012/02/firemap.png. What am I missing?
(other than the ColorTable!)
@J.M. I am interested in modifying the code of your blog to produce 2D Gaussian random fields on the sphere following mathematica.stackexchange.com/questions/4829/…
 
@chris Hmm, you used the routine in the Compile[] docs?
 
@J.M. yes: this is my (your) code !Mathematica graphics
 
@chris Quite odd. Unfortunately, my notebooks are in a different computer. :( I won't be able to debug/test things out until tomorrow...
 
@J.M. no worries. Just curious.
Am I right it assuming it could be modified to produce equal area Gaussian Random Noise?
 
3:58 PM
Don't worry, I'll ping you once I am able to carry out tests...
@chris Well, Perlin noise is a very different beastie. I'm not sure how much of the setup will carry over to Gaussian noise.
 
I am after the equal area feature...
In healpix (what my collegues use) its quite sophisticated. You seem to get this feature in a less painful manner.
 
I'll need to mull it over, I think. Maybe even peek at the code behind healpix and see what can be carried over to Mathematica...
 
@J.M. I have another unrelated question. Your function topoFake, is it possible to integrate it into the ColorData[] framework?
 
@halirutan Mornin
 
@chris That's one good question. I don't know if one could safely modify curated data functions like that...
 
4:05 PM
I have a ColorTable (which I got from xmedcon and looks like this !Mathematica graphics) and was used by ESA com to make this image lastro.epfl.ch/files/content/sites/lastro/files/shared/sciact/… which I would like to integrate as well as your
@J.M. I would be useful though woudn't it: one would only need to remember its name.
 
@chris What format is the color table in? I might be able to figure how to turn it into a Blend[] function...
 
@J.M. (b.t.w. I use MMA 8.0.4)
its is a table of char. I use this code `Clear[fcol, fcolc];
pal = Import["~/Yorick/Gist/xmedcon/xmedcon.fits", "RawData"]/255.;
Do[fcol[i - 1] =
Function[{x, y, z},
RGBColor @@ ( #[Mod[z*199, 200] + 1] & /@ (Interpolation /@
pal[[i]])) // Release];
fcolc[i - 1] =
Function[z,
RGBColor @@ ( #[Mod[z*199, 200] + 1] & /@ (Interpolation /@
pal[[i]])) // Release];, {i, 1, 96}]`
`ContourPlot[Sin[x] Sin[y] , {x, -4, 4}, {y, -3, 3},
ColorFunction -> fcolc[64]]`
 
Is there any place where I could download xmedcon.fits without having to install Yorick?
 
(its not even part of yorick!)
 
Thanks, I'll take a look.
@chris May I ask what you'll use topoFake[] for? :)
 
4:13 PM
No idea yet! I just looked nice ;-)
In yorick there is a palette called earth
may be make "fake earth" mollweide views.
This xmedcon includes all these palettes. (i.stack.imgur.com/f3dYn.png)
There are lots of gray scales for bones I believe ;-)
 
@chris I was basically browsing around this site and decided to combine all the nice-looking features of the "realistic Earth" gradients. Hence, topoFake[].
@chris Ah, the bone() map of MATLAB, I did a while back...
 
The yorick earth ColorTable looks like this (sourceforge.net/projects/yorick/screenshots/42193/182/137)
 
4:45 PM
Hello
I had a strange experience with Definition:
f[x_] := Sin[x];
g[x_] := Tan[x];
Definition /@ {f, g}
The Map returns a syntactically invalid output.
Does anyone have any idea what is going on?
The result is so hidious I did not want to post it as a question without first consulting with someone.
 
@IstvánZachar it seems to be a print problem.
Definition prints Something
 
@chris I have the file now. Unfortunately, I need to step out, so I'll only be able to look at the gradient later. I now have two IOUs. :)
As soon as I figure out the gradient, and what's happening with the spherical Perlin noise, I'll ping you.
So, see y'all later.
 
@J.M. thanks.
 
 
2 hours later…
7:00 PM
@halirutan when you come back, please, write me
:)
 
@IstvánZachar It seems Definition formatting doesn't deal well when it's not at the highest level. I would just use Print/@Definition/@{f, g};
Or ToString/@Definition/@{f, g}
 
7:16 PM
or to everyone
maybe you can hel pe
help me
is anyone here?
 
Alo
@DanieleRicci what's going on
 
I need to know why my code has this following problem
i mean why the code that i have developed with @halirutan give me this previous problem
the code is easy
 
@DanieleRicci I have no idea of your previous talks with halirutan, so you will have to explain
 
yep
my code is a 2d CA
with a my rule
the rule is the followinf
following
countRedBlack[a_, i_, j_] :=
With[{nb = Flatten@a[[i - 1 ;; i + 1, j - 1 ;; j + 1]]},
Count[nb, #] & /@ {1, 2}];
evaluateCell[a_, i_, j_] :=
Module[{numRed, numBlack}, {numRed, numBlack} =
countRedBlack[a, i, j];
Which[numRed == numBlack, 0, numRed > numBlack, 1, True, 2]];
evaluateAll[A_] :=
With[{paddedA = ArrayPad[A, 1]},
Table[evaluateCell[paddedA, i, j], {i, 2, Length[A] + 1}, {j, 2,
Length[A[[1]]] + 1}]];
result = Function[input, FixedPoint[evaluateAll, input]] /@
inMatrices2;
makeFrames[A_, n_] :=
randomLife = makeFrames[inMatrices2, 10];
animate[randomLife]
FixedPoint[evaluateAll, inMatrices2] // Flatten // Tally
if in my grid i have the number of red cell bigger than black cell, it will return red cell
and viceversa
 
I just ran that, without thinking
and got errors like
ArrayPad::arr: First argument inMatrices2 to ArrayPad should be an array.
inMatrices2 hasn't been defined
 
7:21 PM
inMatrices2 =
Function[mat,
Table[If[RandomReal[] > .8, 2, j], {i, mat}, {j, i}]] /@
inMatrices;
 
Now inMatrices is undefined
 
the whole code is the following
:
allVecs =
Flatten /@
Tuples[{Tuples[{0, 1}, 2], {{1, 1, 1, 1, 1}},
Tuples[{0, 1}, 2]}]; inMatrices =
CellularAutomaton[30, #, 10] & /@ allVecs;
inMatrices2 =
Function[mat,
Table[If[RandomReal[] > 0.01, 2, j], {i, mat}, {j, i}]] /@
inMatrices;

countRedBlack[a_, i_, j_] :=
With[{nb = Flatten@a[[i - 1 ;; i + 1, j - 1 ;; j + 1]]},
Count[nb, #] & /@ {0, 1}];
evaluateCell[a_, i_, j_] :=
Module[{numRed, numBlack}, {numRed, numBlack} =
countRedBlack[a, i, j];
Which[numRed == numBlack, 2, numRed > numBlack, 0,
the problem is that
 
Ok, now it worked
 
if you see the grid
for example
if the grid is all white
then
it should be always white, because i don't have red or black cell
 
Can you explain in short how it should work?
 
7:24 PM
while the frame is starting to became all red
 
Hey chris
 
without any reason
don't consider the first part of the code
because is the input
consider the code just from
countRedBlack[a_, i_, j_] :=
With[{nb = Flatten@a[[i - 1 ;; i + 1, j - 1 ;; j + 1]]},
Count[nb, #] & /@ {0, 1}];
evaluateCell[a_, i_, j_] :=
Module[{numRed, numBlack}, {numRed, numBlack} =
countRedBlack[a, i, j];
Which[numRed == numBlack, 2, numRed > numBlack, 0,
numBlack > numRed, 1]];
evaluateAll[A_] :=
With[{paddedA = ArrayPad[A, 1]},
Table[evaluateCell[paddedA, i, j], {i, 2, Length[A] + 1}, {j, 2,
Length[A[[1]]] + 1}]];

result = Function[input, FixedPoint[evaluateAll, input]] /@
inMatrices2;
if you use as inMatrices2 a randomInteger matrix
made by 0,1 and 2
you can obtain the same result
 
What should countRedBlack do?
Sometimes, explaining and documenting in comments what each function does makes you discover the bugs
 
count the numbers of neighbors
 
It takes 3 arguments
a, i and j. A is the matrix and i,j the position?
 
7:27 PM
yep
 
0 -> red, 1 -> black, 2 -> white, right?
 
Ok, I see what you mean
I'm taking a look
 
thanks
 
Oh
I see
In evaluateAll, you are padding with 0's, you should pad with whites=2, right?
 
7:38 PM
well
yes
 
Which simply means, change the ArrayPad line to ArrayPad[A, 1, 2]
 
because 2 is the neutral state
ok let me try
should go right know
5 minutes
 
@DanieleRicci Ok, good luck
Btw, it's your intention to count not only the neighbours but also the very same square, right?
 
thanks
what is the very same square??
 
I mean
countRedBlack[matrix, 3, 3], for example
counts the number of blacks and reds in the neighbouring places
in 3,3
AND
 
7:51 PM
and?
 
Just checking it was your intention
since you said it should count the number of neighbors
 
8:06 PM
ok now it works
@halirutan
@Rojo help me in the while
 
?
 
DRM
@Rojo you help me to find the problem
now the last problem i have is the following
 
@DRM Thanks? please? :P
 
DRM
I have to put together 2 matrices
 
How?
 
DRM
8:10 PM
which have the same number of rows, but different numbers of columns
i can put them or side by side
or, i will appreciate to put them one column of Matrix A alternate to one column of Matrix B
how can i do??
 
Side by side, try Join
with a last argument of 2
To alternate, first thing that comes through mind is to transpose and alternate the rows, and transpose again
Transpose@Riffle[Transpose@mat1, Transpose@mat2]
but there might be a better way
Perhaps also something like first joining them and then shuffling
Anyway, that should work
 
DRM
not it doesn't work because i have the following error:
Part::take: Cannot take positions 1 through 3 in 2. >>
 
What code?
 
DRM
i want to put this Total Matrix as input of the code that you saw before
so i produce these 2 matrix in this way:
allVecsA =
Flatten /@
Tuples[{Tuples[{0, 1}, 2], {q0},
Tuples[{0, 1}, 2]}]; inMatricesLTI =
CellularAutomaton[30, #, 10] & /@ allVecsA;
inMatrices2A =
Function[mat,
Table[If[RandomReal[] > .8, 2, j], {i, mat}, {j, i}]] /@
inMatricesA;

allVecsB =
Flatten /@
Tuples[{Tuples[{0, 1}, 2], {q6},
Tuples[{0, 1}, 2]}]; inMatricesB =
CellularAutomaton[30, #, 10] & /@ allVecsB;
inMatrices2B =
Function[mat,
Table[If[RandomReal[] > .8, 2, j], {i, mat}, {j, i}]] /@
inMatricesB;
 
Just give me what code you are using to join the matrices
 
DRM
8:18 PM
q0 and q6 are 2 row vectors of 0 and 1 with dimension respectively 5 and 7
to join the matrix I use
inMatricesTotal=Join[inMatrices2A,inMatrices2B]
 
You mean Dimensions@q0 =={1, 5}?
 
DRM
yep
 
Yeah, add a last argument to Join. Join[inMAtrices2A, inMAtrices2B, 2]
Otherwise you are joining them one below the other
 
DRM
always the same error then when i run:
result = Function[input, FixedPoint[evaluateAll, input]] /@
inMatricesTotal;
Part::take: Cannot take positions 1 through 3 in 2. >>

Part::take: Cannot take positions 2 through 4 in 2. >>

Part::take: Cannot take positions 3 through 5 in 2. >>

General::stop: Further output of Part::take will be suppressed during this calculation. >>
 
Check the joining
if it's done correctly, then I answered your question
if it isn't, then investigate your problem before asking
 
DRM
8:24 PM
Join[{inMAtrices2A}, {inMAtrices2B}, 2]
??
any suggestion?
it's 14 hours that i'm in front of this pc
just a little bit tired
 
Run this
(A1 = Array[a1, {3, 3}]) // MatrixForm
(A2 = Array[a2, {3, 4}]) // MatrixForm
(Join[A1, A2, 2]) // MatrixForm
@DanieleRicci
 
DRM
done
 
:)
 
DRM
but please see it
and run it
q0={0, 1, 1, 1, 0};
q6={1, 0, 1, 1, 1, 1, 1, 0}

allVecsA =
Flatten /@
Tuples[{Tuples[{0, 1}, 2], {q0},
Tuples[{0, 1}, 2]}]; inMatricesLTI =
CellularAutomaton[30, #, 10] & /@ allVecsA;
inMatrices2A =
Function[mat,
Table[If[RandomReal[] > .8, 2, j], {i, mat}, {j, i}]] /@
inMatricesA;

allVecsB =
Flatten /@
Tuples[{Tuples[{0, 1}, 2], {q6},
Tuples[{0, 1}, 2]}]; inMatricesB =
CellularAutomaton[30, #, 10] & /@ allVecsB;
inMatrices2B =
Function[mat,
Table[If[RandomReal[] > .8, 2, j], {i, mat}, {j, i}]] /@
look at the resulting matrix inMatricesTotal
 
8:43 PM
inMatricesA undefined
but
just check the dimensions of what you are trying to join
 
DRM
In[868]:= Dimensions[inMatricesA]

Out[868]= {16, 11, 9}
 
What about inMatrices2A
and 2B
 
DRM
In[872]:= Dimensions[inMatrices2B]

Out[872]= {16, 11, 12}
In[870]:= Dimensions[inMatrices2A]

Out[870]= {16, 11, 9}
 
And what's the dimensions of your desired output?
I'm guessing you want to join side by side, each of the 16 submatrices
right?
That's not what you had said before
That's a level 3 join
 
DRM
yep
 
8:46 PM
So, just change the 2 to 3
Join[bla, bla, 3]
 
DRM
ok i will try it
thank you very much
i hope it will work
 
Good luck
 
DRM
have a nice night
thanks again
 
00:00 - 21:0021:00 - 00:00

« first day (277 days earlier)      last day (4197 days later) »