Skip to main content
12 events
when toggle format what by license comment
May 23, 2017 at 12:35 history edited CommunityBot
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Feb 16, 2012 at 0:08 vote accept István Zachar
Jan 31, 2012 at 18:42 comment added István Zachar @Szabolcs: Yes, I had plenty of time to figure that out and draw the consequences :)
Jan 31, 2012 at 17:58 comment added Leonid Shifrin @Istvan The speed should never be the primary concern at the start, at least unless you know in advance that speed is central to the application. In Mathematica, we perhaps need to think of it more than in some other languages (e.g. Python), but the principle still holds. With my demonstrated attachement to microbenchmarks, I may sound hypocritical here, but I actually do follow this principle for whatever code I have to write. Microbenchmarking is useful to see how fast you can be within the language, if you absolutely have to (i.e. fore real bottlenecks).
Jan 31, 2012 at 16:05 comment added István Zachar @LeonidShifrin: I thought that using streams is much fastar to save data than using other functions - at least for files. Now for notebooks, I understand that this might not be the case.
Jan 31, 2012 at 16:03 comment added Szabolcs @István "bump" doesn't really work on a newsgroup as the old message may very well be lost in most newsreaders. Funny the moderator even let it through ..
Jan 31, 2012 at 16:00 comment added rcollyer @IstvánZachar, I did not realize that that bug was that old.
Jan 31, 2012 at 15:42 history edited Szabolcs CC BY-SA 3.0
added 191 characters in body
Jan 31, 2012 at 15:10 comment added Leonid Shifrin @Istvan I agree with Szabolcs. Streams are a pretty low-level I/O tool, suitable also for reading/writing of unstructured data (e.g., not even representing valid Mathematica expressions). Notebooks are structured documents, and writing to them assumes, to my mind, higher-level I/O abstraction. If you feel a need to redirect there, it might mean that your current design is too low-level (regarding logging or whatever purpose it is you use Write for), so you will be better off by redesigning this part of your code to use higher-level constructs.
Jan 31, 2012 at 13:54 comment added István Zachar I was afraid of this. Isn't the purpose of streaming/piping to provide means of saving data by easy redirection? Considering, that this bug is still not resolved, piping is really not that easy in Mathematica...
Jan 31, 2012 at 13:42 comment added Heike +1 for using block, although you would probably need to define Write = NotebookWrite[#1, Cell[BoxData[ToBoxes[#2]], "Output"]] & or something to make it work.
Jan 31, 2012 at 13:34 history answered Szabolcs CC BY-SA 3.0