Reputation
Next tag badge:
283/100 score
18/20 answers
Badges
8 227 319
Newest
 Enlightened
Impact
~511k people reached

15h
comment Getting lengths of sublists that sum to more than one
@alancalvitti Look for user21. He quit SE. Then rejoined, under the name user21. His past contributions, however, can't be easily found systematically, since the user was deleted. You can find them here and there, e.g. this one.
1d
comment Attempting to modify parts of a multi-level association in-place
@JJM Glad if that was helpful.
1d
comment Attempting to modify parts of a multi-level association in-place
@m_goldberg In fact, there are even much simpler pieces of evidence here, e.g. how Map and similar functions work on assocs.
1d
comment Attempting to modify parts of a multi-level association in-place
@m_goldberg " but nothing I've read has so far convinced me to discard it." - well, how about in-place modifications? Like the one with Set on the top of this post, which works perfectly. Or many more examples, both in the docs and in my post I linked above. In my view, they are much closer to lists (arrays), than to complex numbers - they have similar mutability properties, and both are indexed containers of elements.
1d
comment Attempting to modify parts of a multi-level association in-place
@m_goldberg AtomQ on a association returns True - which is rather unfortunate, and this was done mostly to forbid pattern-matching inside associations like other expressions, and also to avoid making Association explicitly HoldAllComplete. But I didn't mean this fact, but the other things you stated about mutability and in-place modifications. Associations are clearly not atomic for part extraction and modifications, despite returning True on AtomQ.
1d
comment Attempting to modify parts of a multi-level association in-place
Not sure why the close votes either. Did someone have a bad day today?
1d
comment Attempting to modify parts of a multi-level association in-place
Not sure why the downvotes - this looks like a perfectly legitimate question to me.
1d
comment Attempting to modify parts of a multi-level association in-place
@m_goldberg Your statement is incorrect. Associations are given certain degree of (user-level) mutability, when stored in a symbol, just as lists are. Check out my answer I linked to, in the previous comment, for a longer discussion of this.
1d
comment Attempting to modify parts of a multi-level association in-place
Note that this works: AssociateTo[m2[["M"]], "b" -> 3]; m2. Strongly related discussion can be found here.
1d
comment Testing a package in Mathematica 9
Hi @Santi, glad it helps. Re: parallel - alas, I won't have time to look into that for a while. My guess is that you have to clear things both on the parallel sub-kernels and the master kernel. Shared symbols might be trickier still. I will keep this in mind though. At some point soon, I will put the package on github, so that it will be open for pull requests.
1d
comment Partitioning a list when the cumulative sum exceeds 1
@Mr.Wizard This seems to be a rare case where the question is as much a dupe as it is not, in terms of making this decision. As of now, I think we should probably keep this quuestion, but somehow make a reference to that one very visible, so that whoever comes here, will also see that one.
1d
comment Partitioning a list when the cumulative sum exceeds 1
Seems like a borderline dupe of this one - the only missing step from there to this one in to use Internal`PartitionRagged or Mr. Wizard's dynP on the result. In any case, very strongly related.
1d
comment Partitioning a list when the cumulative sum exceeds 1
+1, good stuff. But. I hesitate to vote for closing, but it seems a borderline dupe of this. What do you think?
Feb
4
comment why MatchQ is fast and Replace slow?
It's not clear to me why folks want to close this. Looks like a perfectly legitimate question to me.
Feb
3
comment File-backed lists/variables for handling large data
@Athanassios Well, I wasn't setting too ambitious goals for this answer, I just tried to get a minimal framework to address the basic needs specific to Mathematica workflows.
Jan
29
comment How to make FlattenAt work with Span?
@Mr.Wizard I actually pretty much never use FlattenAt, so wasn't aware that it works inside held expressions - which is of course natural to expect once we think about it (in fact didn't even think in that direction, since typically my uses of held code and Flatten don't overlap). But that's a good point. I will make a note in my answer. Thanks for spotting this.
Jan
29
comment How to make FlattenAt work with Span?
@Mr.Wizard I stopped doing that too, long ago, and for the same reason. Besides, in any large program (or even not so large), typically the bottlenecks are elsewhere.
Jan
29
comment How to make FlattenAt work with Span?
@Mr.Wizard Interesting. Never thought of that. I do use this sort of code in a number of places, so will at some point check the difference and perhaps adopt this method. Thanks for the info.
Jan
27
comment What Mathematica book to buy?
@H.R. Thanks! This is great to know. Yes, I did write it in .nb. At some point soon, I will publish the nb version.
Jan
24
comment Condition and RuleDelayed
Glad it you found it helpful. This is certainly one of the things that I wish to have better understood myself.