« first day (368 days earlier)      last day (4192 days later) » 

1:21 AM
Please take a look at this problem (all summed up in the title), and the solution:
Q: Why is NeighborhoodGraph so slow?

Todd JohnsonTo get neighboring vertices I first tried: gg = GridGraph[{10, 10, 10, 10}]; VertexList[NeighborhoodGraph[gg, 1, 1]] // AbsoluteTiming {5.539308, {1, 2, 11, 101, 1001}} But that is really slow. This is much faster and still uses the new Graph package: Union[VertexInComponent[gg, 1, 1],...

The solution is easy enough, but not at all easy to discover. I wasted a lot of time this afternoon because I didn't remember that NeighborhoodGraph wants to recompute the layout apparently for no good reason ... This is just not user friendly!
@rm-rf The fact that you used a custom neighborhood graph function also shows how bad a behaviour this is. It seems many people waste time with reimplementing the function.
1 hour later…
2:28 AM
Can someone please try to reproduce this problem for me? --> mathematica.stackexchange.com/q/18091/12 (@Nasser ?)
2:39 AM
@Szabolcs I can reproduce it
W8 MMAv9
@Rojo Thanks, that's all I needed! Sent to support.
@Szabolcs :) but I find it weird
Me too. I know it's not a very good question here, but I needed to make sure others can reproduce it and also I wanted to let people know about it ...
it's not an easy performance bug to track down in a larger piece of code
Do you think I should delete the question or keep it?
@Szabolcs I'd keep it, at least for a little while
@Szabolcs Support is taking quite long to answer these days, at least to me
@Rojo No wonder, they must be overwhelmed ... I sent three just today, and the numbers they assign to them are increasing pretty quickly.
I don't usually send that many, it was just a very busy (and unlucky bug-wise) day
(And I somehow always end up sending these on the weekend)
Today JF said it shouldn't be long until 9.0.1.
I am hoping these minor releases will keep coming more quickly than they did with 8
3:31 AM
@Szabolcs, I did. it is slow. I also found a problem with the Uploader
The uploader failed with these error (so I had to do an old fashioned screen shot for this)
Basically, the uploader failed to snap shot the cells I selected. I am on Linux btw, and using a trial version of Mathematica 9 for evaluation on Linux
When I select the cell, this is how the uploader screen looks
You can see, it did not pick the equations typed. Here is how the cell looks like
So, there is some problem somewhere.
Link`Java::argx1: Method named setRequestEntity defined in class org.apache.commons.httpclient.methods.PostMethod was called with an incorrect number or type of arguments. The argument was $Failed.
This could be just a Java problem on Linux
4:05 AM
@Nasser I know, the uploader palette does not work with the trial version. Unfortunately Export is disabled in the trial version and the uploader relies on it (or rather on ExportString).
3 hours later…
7:17 AM
Anyone around?
@belisarius Boo
@Rojo Not you. You should be atorranting
@belisarius I should
@Rojo I solved this one a thousand times, and always keep forgetting how
The pointer's saudade, I call it
I have a name of a var in a var, and want to assign a value indiectly
damn, I can't remember
@belisarius Name as a string?
ToExpression[varName, InputForm, Function[var, var=blah, HoldFirst]]
7:31 AM
@Rojo Oh, yes it was that damn ToExp third form that I keep forgetting. Thanks!
@belisarius No problema!
@Rojo Cucha! Go to sleep! have you tried some medicines? Sometimes they don't kill you
@belisarius Haven't tried
and holidays are over, need to wake up at 6am on monday, back to work
I doubt I'll be sleeping :P
@Rojo I'll write in Spanish to be more precise
Lee un poco acerca de los hábitos nocturnos antes de la existencia de la luz eléctrica. Por alguna razón quedaron olvidados. La gente no siempre durmió de la manera en que ahora se considera "sano"
Watch out! Toads nearby!
@rm-rf hiya
@belisarius and how did they sleep?
7:41 AM
@belisarius People in the past didn't sleep healthy or people don't sleep healthy now?
@Rojo People slept splitting the night in two or three "dreams". They woke up, ate, chat, worked (if enough light) and went to sleep again
books got popular in that interludes
Really? 3 big naps more or less equally spread aroudn the day?
@belisarius That sounds like my undergrad days... except, "worked" was replaced by quake 3 CTF matches =)
@Rojo Not the "day" but the "night". And "equally" is impossible to say without clocks
@belisarius Got it
7:47 AM
@rm-rf California?
@rm-rf Sorry, it was a Spanglish joke
What's the joke?
@rm-rf Oh, it's a private joke. It's about personality disorders and toads. Nothing related to you
@Rojo For example
Q: How many hours per day did a Sumerian farmer sleep?

беркайI wonder about the life-styles of the inhabitants of ancient civilizations. As a particular case, if we consider the era of Sumer, what are the significant diversities compared to rural life today?

read the answer
@rm-rf @Rojo G'night!++
@belisarius Go get your second sleep :)
@belisarius g'night
@Rojo Somehow I managed to need only four or five hours in bed. More a need than a privilege
8:03 AM
@belisarius Even if I can manage with a couple of lettuce salads a day, that would suck. Eating is nice, as well as sleeping
and the act of reproducing
Godzilla gave us positive reinforcement for those human needs. Now we have fat overpopulation. But for some reason, we also have anorexic people and sleep-anorexic people like you and me. We shouldn't exist
Ok, I need some sleep too. Bye
@Mr.Wizard you-re there?
8:27 AM
@rm-rf It was after midnight when I got your call, and my SO told me to stop :)
13 hours later…
9:07 PM
@Mr.Wizard I'm here now
Hi. :-)
hi :)
I was just wondering if you know what the logic is in having And evaluate its arguments when one does not yield either True or False. That is, And["foo", Print["x"]] prints "x". I'm sure there's a good reason for this and I've probably even relied on this behavior before, but I'm struck by the fact that I don't know why it's designed that way.
I think I just rubber-ducked this. lol
@rm-rf you still there?
@Mr.Wizard I thought And evaluated its arguments for possible shortcircuiting? No?
@rm-rf I'm not sure what you mean. It does not evaluate all arguments, e.g. And[False, Print["x"]] does not print, which I'm sure you know. I guess it makes sense for And to try to find out if any of the terms will be False so that it can return an answer. I guess I'm wondering if this is a design choice or if And must behave this way to adhere to formality.
9:17 PM
@Mr.Wizard No, it evaluates arguments in order. So it doesn't print in this case, because it encounters False before it sees the Print statement
Compare And[False, Print["x"]]with And[Print["x"], False]
Yes, I understand that it is in order. I am wondering if it would be a valid design choice to have And simply sit unevaluated if the first term was neither True nor False.
It's lunch time here and I should think about this more anyway so I don't ask stupid questions. I'll talk later. Thank you.
@Mr.Wizard Not necessarily. See this:
And[x, (x = False; True)]
Also, And returns False if any of its arguments is False. So, stopping at the first term wouldn't make sense
@Mr.Wizard And["foo", False] would return unevaluated then
9:37 PM
Hey all ... :)
I need some quick advice ... I need a uni/multimodality test on a 2D distribution. I have a histogram to start with. It's a bit wiggly at small scales.
@rm-rf what is that code snippet intended to illustrate?
Hello Szabolcs.
Hello @Mr.Wizard
@Rojo Yes, it would, and at times that might be useful. I got started thinking about this as I recalled Simon Woods' interesting use of And and Or here:
A: Can this be written well, without loops?

Simon WoodsI cannot write the code without any loops, but I have pared it down to a single While loop, making extensive use of short-circuiting to bail out of the expression at the appropriate point. Whether you consider this cleaner than nested For loops is a matter of taste. I personally find it easier to...

@Mr.Wizard I miss so many interesting questions lately >P
That's an old question.
9:40 PM
@Mr.Wizard I guess that's pretty much a "no" now ...
I remember now, wrong year
@Szabolcs Simon's method is really interesting but it still fails to outright improve on the loops IMHO.
Yes, it's interesting, but I prefer your For method.
By the way, I don't know how to help with your question.
To explain the difficulty I am having a bit better, take a look at this figure:
Only the orange cells can have non-zero probabilities, and the orange region is a bit disconnected. This is why it's a bit difficult to define and test "multimodal" here. Actually in my case it's going to be typically bimodal.
Despite the gaps, despite the fact that I have several tiny orange islands, 'neighbouring' island should really count as connected.
9:46 PM
@Szabolcs You want to test if your histogram has more than one group of orange islands?
@Mr.Wizard I guess you could make your own and, right?
@Rojo I should do that just for practice.
@Mr.Wizard That a later argument of And might set one of the first arguments (which might not have had a value when And first saw it).
@rm-rf But that's always a weird thing
Try, for example
{x, x = 8}
@Mr.Wizard My next statement was just noting that returning unevaluated if the first argument doesn't evaluate to True/False would not return False for And[foo, False]
(with x cleared)
9:55 PM
@rm-rf Okay. While tricky that's expected given normal evaluation. And[foo, bar, True] reduces to And[foo, bar] and evaluation starts again, right?
@Mr.Wizard yeah
@Rojo but in this case, List doesn't do anything... In the case of And, it reevaluates it
@rm-rf True
@rm-rf do you know where the FE looks for the palettes?
@Rojo Actually, I want to test if there are two islands within that orange island. Look at this figure:
There's a function defined on the orange region only. Red is high, orange is low values. I need to find out if there are two islands of high (red) values, or if there's a single one. But the region the function is defined on (previous orange figure) is disconnected itself.
@Rojo $UserBaseDirectory/SystemFiles/FrontEnd/Palettes/
@Szabolcs I see, so the white isn't low values but places outside the domain, so disconnection doesn't count as separate islands?
10:05 PM
I typically either have one red peak which can go anywhere, including the two extremes of the crescent, or two red peaks which are typically located at the extremes.
@Rojo Something like that. If this didn't go to 25 and 50, but to a very large number along both axis, then that would be much better. But I can't possible compute such a large problem, and I need to verify some theoretical calculations for this tiny version
I'm just going to blur the whole thing with the approximate radius and do some image analysis
it should be a good first approximation
Hello - this is just a test
Hello. It worked.
@rm-rf thx
@Szabolcs OK

« first day (368 days earlier)      last day (4192 days later) »