57,122 reputation
5160253
bio website mathprogramming-intro.org
location St. Petersburg, Russia
age 37
visits member for 2 years, 7 months
seen 12 mins ago

Ok, an obligatory note: opinions expressed here are mine and not those of my employer.


Jun
28
revised Performance tuning in Mathematica?
Added a mention of Associations
Jun
27
comment Building sparse array from packed arrays
It looks like there is some internal unpacking going on, for large enough lists. It is possible to construct the pieces of the SparseArray without unpacking, but it looks like they are still unpacked internally.
Jun
27
comment Building sparse array from packed arrays
There is unpacking if you try this on larger arrays, of e.g. 100 elements. But to see it, you have to enable On["Packing"] before running the code.
Jun
26
comment String templating
@Kuba I agree. I don't consider this style the most powerful (in the sense that it does not really allow to introduce qualitatively more powerful abstractions), but it can be applied to the majority of tasks where Mathematica shines, and it is still considerably more expressive that the "usual" one where component functions are not singled out explicitly.
Jun
26
comment String templating
+1 for using the Composition-style code. It had become my preferred style too, some time ago. New operator forms (curried functions) for many built-in functions in V10 makes this even much easier to use.
Jun
25
comment Defining a pure function involving a function argument
I don't know. Perhaps one can come up with some example, where the renaming will work differently. But I am opposed to this approach in principle. It's just not a robust code. If the renaming mechanism is, for example, changed in later versions, even slightly, this will stop working.
Jun
25
comment Defining a pure function involving a function argument
I strongly advise against this kind of code. You use the specific knowledge about certain implementation details, which makes this error-prone.
Jun
25
comment How to make a function with its own options as well as passing options to other functions
@Mr.Wizard I probably learned much more on SO and SE from you and others than the stuff I found out on my own or learned from other sources. Moreover, my way of learning is certainly not the most effective, because of the "find it out myself" mantra. I would've probably learn much more had I been more open to it.
Jun
25
revised How to make a function with its own options as well as passing options to other functions
added 290 characters in body
Jun
25
comment How to make a function with its own options as well as passing options to other functions
@Mr.Wizard I really didn't remember. Will edit this in.
Jun
24
comment How do I save/export a list so that it can later be easily imported as a list again?
@Szabolcs Ok, apparently we agree on all points.
Jun
24
comment How do I save/export a list so that it can later be easily imported as a list again?
@Szabolcs I disagree however that this is an overkill w.r.t. exporting as Table. The latter involves high-level serialization / parsing, and that always increases chances to not get the same thing back. Serializing to a binary format like .mx is different.
Jun
24
comment How do I save/export a list so that it can later be easily imported as a list again?
@Szabolcs Yep, I do realize. Just when you posted this one, I added a comment under the main question, acknowledging that I learned about Export / Import working on .mx files from you. In this particular case, however, the OP's goal seems to be saving data for later use on the same machine, thus this suggestion.
Jun
24
comment How do I save/export a list so that it can later be easily imported as a list again?
Actually, I recall now that I first learned about the fact that Export / Import working on .mx files from @Szabolcs.
Jun
24
answered How do I save/export a list so that it can later be easily imported as a list again?
Jun
24
comment How do I save/export a list so that it can later be easily imported as a list again?
I'd use .mx files (Export / Import in "MX" format). This is fast, and does not really involve serialization / parsing in the usual sense (via strings). In other words, mx files bypass the high-level parsing, populating internal structures at lower level. In addition, mx files preserve packed arrays.
Jun
23
revised Extract what symbol is set by SetDelayed, Set, TagSet, UpSet, SetAttributes, etc
Added a paragraph explaining definesExt
Jun
23
answered Extract what symbol is set by SetDelayed, Set, TagSet, UpSet, SetAttributes, etc
Jun
21
awarded  Good Answer
Jun
21
awarded  Good Answer