« first day (265 days earlier)      last day (4209 days later) » 

1:43 AM
@belisarius You around?
 
@rm-rf Let me see ....
Yep! I'm here
@rm-rf What's up?
 
Do you know how Sow works? Specifically, if I sow a bunch of stuff (possibly memory heavy), will it slow performance only if accompanied by a Reap?
Let me give an example:
I have some iterative algorithm that uses NestWhile/Nest. For some plotting purposes (foo as a function of iteration), I throw in a Sow and collect it with Reap only when I need to plot it
An alternate way of doing it is by using NestWhileList/NestList and using Last@ for calculations and all of it for plotting
 
@rm-rf Do you have the Reap wrapped in an IF[]?
 
@belisarius no, I Reap it only when I plot. Not in an If
So the question I had in mind was — is stuff sown somewhere in memory even if I don't reap it? In essence, will the memory usage be the same for Sow and NestList?
 
So perhaps Mma detects a Reap is not there and short circuits the Sow. You could do an experiment
comparing MaxMemoryUsed
 
1:49 AM
Yes, I was going to later. Have something running already, and was wondering if you knew the answer before hand
 
Nope, I could do the experiment for you, if you need
 
Yes please :D
 
ok wait. A few restarts will be needed
init = MaxMemoryUsed[];
Reap[Table[Sow[i], {10^6}]];
MaxMemoryUsed[] - init
Result 12301608
 
init = MaxMemoryUsed[];
Table[Sow[i], {10^6}];
MaxMemoryUsed[] - init
Result 4039320
 
init = MaxMemoryUsed[];
Table[i, {10^6}];
MaxMemoryUsed[] - init
Result 3966656
@rm-rf So yes, it uses memory
 
1:57 AM
hmmm...
 
@rm-rf 72664 bytes in this case
 
Could you try these three:
Quit
init = MaxMemoryUsed[];
out = Last@Reap[Nest[Sow[# + 1] &, 10^6, 10^6]];
MaxMemoryUsed[] - init
Quit
init = MaxMemoryUsed[];
out = Nest[Sow[# + 1] &, 10^6, 10^6];
MaxMemoryUsed[] - init
 
hehe 0.072664 bytes per integer
 
init = MaxMemoryUsed[];
out = NestList[Sow[# + 1] &, 10^6, 10^6];
MaxMemoryUsed[] - init
@belisarius The Quit probably needs to be in its own cell
 
In[1]:= Quit[];
In[1]:=
init=MaxMemoryUsed[];
out=Last@Reap[Nest[Sow[#+1]&,10^6,10^6]];
MaxMemoryUsed[]-init

Out[3]= 8099304
 
2:04 AM
In[7]:= Quit[];
In[1]:=
init=MaxMemoryUsed[];
out=Nest[Sow[#+1]&,10^6,10^6];
MaxMemoryUsed[]-init
Out[3]= 0
 
In[4]:= Quit[];
In[1]:=
init=MaxMemoryUsed[];
out=NestList[Sow[#+1]&,10^6,10^6];
MaxMemoryUsed[]-init
Out[3]= 27957304
 
brb
Need to prepare dinner for kids
 
@belisarius Nice! So using Sow and not calling Reap unless I need it is the better alternative. I guess mma short-circuits the Sow if it doesn't find a Reap
Thanks :)
 
 
2 hours later…
3:45 AM
@rm-rf You're welcome
 
 
5 hours later…
8:17 AM
@robjohn Only saw your message just now. I'm actually due for a molt in a few hours...
I have a hack-ish way of checking if something's a valid date:
dateQ[da_] := NumberQ[Quiet[Check[AbsoluteTime[da], $Failed, {AbsoluteTime::arg, AbsoluteTime::str}]]]
Is there a less hack-ish method to check?
 
 
3 hours later…
11:31 AM
@J.M. AbsoluteTime["Tue 88 Oct -1999 25:30:24"]
 
 
7 hours later…
drN
6:58 PM
I have a mathematica/unix related question: I run a bunch of mathematica scripts in a batch mode (one after the other) in a bash script I wrote. I find that after one script is done with calculating and cranking out data, the MathKernel process no longer consumes any ram/processor power.. So ... is my next script in line going to run?
 
 
1 hour later…
8:01 PM
@drN in bash, each command will run right after the previous one exits.
 
8:19 PM
Kevin Montrose on October 09, 2012

We all know everyone loves pretty pictures, chock full of graph-y goodness.

You probably also know that about two months ago we started the Stack Overflow Machine Learning Contest, and that it’s now winding down.  All models have been (or will shortly be) committed, and we’re starting to gather data for the final judgement.

What you may not have known about was the subsidiary Visualization Contest, which is looking to find an interesting and informative way of making sense of the mountains of interesting data in our data sets.  You’re free to pull in any additional publicly ava …

 
F'x
8:32 PM
evening/morning/g'day all!
well, I wanted to post the above, but I see RSS has been quicker than me
it would be great if we could get a few Mathematica-powered interactive visualizations in there… either as a team, or separately
my first idea was “how are tags related?”… try to plot a weighted graph, maybe determine some main components in it
 
9:06 PM
Have you seen wolframs' video on the maker faire? It shows new interface stuff...
It's on S. Wolfram personal blog.
 
acl
9:29 PM
I'd love to have a chat with whoever decided that Trace should do what it does and not what Tr does...
preferably in a dark alley without witnesses
 
10:20 PM
@acl FWIW, Trace[] once had a much better name: Debug[]. The renaming annoyed me a lot back in the day.
 
acl
@J.M. when? in v1? I have The Mathematica Book for v2 and I don't remember reading about Debug, although I do remember a few things that don't exist nowadays
not that I ever used v2
 
@acl Yes, version 1.
(though 1.2 is actually the earliest version I used)
 
acl
@J.M. well, I shudder to think how many CPU cycles have been wasted by things like Trace[hugematrix]
@J.M. I guess I am a bit younger then :)
(or you were unbelievably precocious)
 
@acl Maybe. :)
@acl I still catch myself writing out Trace[] when I intended to use Tr[]. Bleh.
 
acl
@J.M. No doubt. I keep doing it all the time. I think I've complained here before.
 
10:37 PM
Stupid backwards compatibility :)
I guess from a consistency standpoint with other languages, Trace is the right word for what it does...
 
...and I suppose MatrixTrace[] is unwieldier to write than Tr[]...
I'm still imagining how things would turn out if MatrixRank[] was just named Rank[].
 
@J.M. I don't think that was ever an issue... just ask SingularValueTooLongToWriteDecomposition
 
Hmm, right. Sadly, SingularValues[] returns the whole bloody decomposition instead of what it says on the tin...
Later, they cure it by making it SingularValueList[]. Eep.
 
but tr is standard linear algebra notation for the trace of a matrix, no? So it's no more confusing than using Abs for absolute value
 
11:01 PM
0
Q: Should I keep working on what has turned out to be a long non-MMA answer?

George WolfeI couple of days ago I enthusiastically started a long answer about a question about learning finance with Mathematica. Based on my experience in ... learning finance with Mathematica ... it is very relevant. But, as I realized later, my answer is not about Mathematica, and it's not the answer ...

 
acl
@rm-rf I think the confusion arises because of the simultaneous existence of Tr and Trace rather than because Tr is misnamed (which it isn't). anyway, it's no big deal, just annoying when you periodically bomb your session because of it
 
Maybe they should've called it TooMuchInfo[] :)
 
acl
@rm-rf BuryMeUnderDetailsAndKillMySession[]?
 

« first day (265 days earlier)      last day (4209 days later) »