64,142 reputation
6189283
bio website mathprogramming-intro.org
location St. Petersburg, Russia
age 38
visits member for 3 years, 2 months
seen 3 hours ago

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


Feb
9
answered What is the fastest way to get notebook CellGroups / Cells structure?
Feb
8
answered Can I view a package as a regular notebook?
Feb
8
revised Messages leak out from Block
edited tags
Feb
8
comment Messages leak out from Block
@Mr.Wizard I think so. I just did.
Feb
7
comment Copy Built-in function to new name
Re: links - yes, sure, that's why I said that your code and use case is different. I only meant that it would help link together similar approaches, not in any other sense. Re: core functions - yes, but I thought you take care of internal definitions via Internal`InheritedBlock, while for top-level ones, I thought it should work.
Feb
7
comment Copy Built-in function to new name
Re: links - you are right, I haven't checked those. Although, given your answer, it would perhaps make more sense to mention them directly in it, but that's of course up to you. Besides, your construct is still different and used in a different context. Re: clone - there is actually a better way, exposed by Szabolcs here.
Feb
7
comment Copy Built-in function to new name
+1. I have to point out, that your experimental construct is very similar to the one I described here - same ideas about double-cloning, and Block-ing.
Feb
7
comment Messages leak out from Block
I think it has to. May be not MessageName specifically, but I think that the underlying mechanism used to attach message(s) to symbol(s) should be the same in both cases. And it is this mechanism whose interaction with Block looks problematic.
Feb
7
comment Messages leak out from Block
I think this happens because MessageName has certain auto-stringification step, which allows the second argument of MessageName to be a symbol. When the definition is constructed, it is auto-stringified, but then still attached to the symbol. From the point of view of what Block is supposed to do, this can be probably considered a bug.
Feb
7
comment Convert recursive RegularExpression to StringExpression?
@DanyloDubinin Given that my solution turned out to not be the correct one, and the correct one has been posted by WReach, it would make sense to unaccept mine and accept his - that's what I'd do in your place.
Feb
7
revised Convert recursive RegularExpression to StringExpression?
Added a note that this isn't really the correct solution, per WReach's comment
Feb
7
comment Convert recursive RegularExpression to StringExpression?
@WReach You are right. Apparently I just overlooked it that my solution missed the {1,24} part, otherwise I wouldn't have posted it. You answer is very nice. The site is in good hands, wrong answers don't go unnoticed even when they are relatively complex :).
Feb
7
comment Convert recursive RegularExpression to StringExpression?
Vey nice! +1 of course. Some bits and pieces of this were on the back of my mind too, but not in such coherent form.
Feb
6
comment Smart pointer for Mathematica?
@DanielLichtblau One case of orphaned references I described here, and in fact, it being Temporary doesn't prevent it, in that case. What's essential in that scenario is that the symbol is referenced by some other one, external to its scope, and that indeed, it has one of DownValues, UpValues or SubValues defined. In this scenario, it does not matter whether the referencing symbol is later removed or not.
Feb
6
comment Convert recursive RegularExpression to StringExpression?
@DanyloDubinin Was glad to help. Thanks for the accept.
Feb
5
revised Convert recursive RegularExpression to StringExpression?
Reduced the unnecessary pattern generality, per Silvia's comment
Feb
5
comment Convert recursive RegularExpression to StringExpression?
@Silvia Yes, you're right. It actually crossed my mind, but I was too lazy to correct. Since you noted this, will make a correction. Thanks for the upvote.
Feb
5
answered Convert recursive RegularExpression to StringExpression?
Feb
3
answered SymbolicC Simplified Displayed
Feb
2
comment SymbolicC Simplified Displayed
So, you want fun to generate the first expression from the second?