57,712 reputation
5164256
bio website mathprogramming-intro.org
location St. Petersburg, Russia
age 38
visits member for 2 years, 8 months
seen 1 hour ago

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


18h
awarded  Generalist
2d
comment Word wrapping in Code cells
My impression is that this was intentional for "Code" cells. In fact, I do appreciate them precisely for not having word wrapping, because this brings them closer to usual code editor, and makes code easier to export from Mathematica to plain ASCII files. You probably can define your own style, based on Input style, that would add Initialization cell property and other things you may want to add.
2d
comment Auto highlighting input cells depending on input expression (eg its Head)
@alancalvitti Semicolon is interpreted as CompoundExpression, so it sure changes the head. In general, you may need a more elaborate expression parser, but it is still done along the lines of how color works. Re: revert to no highlighting - is this a problem? If yes, let me know and I'll post an update that won't revert already highlighted cells.
Sep
16
comment Having used Mathematica as a “gateway” language, where to from here?
Not enough love for this answer! Unfortunately, the fate of many good answers added much later is a long period of relative obscurity - which is a certain flaw of the current SE model. I only bumped into it today, by a pure accident.
Sep
16
comment Applying a function to a Dataset column conditional on another slot's value
@alancalvitti See my edit for a better approach.
Sep
16
revised Applying a function to a Dataset column conditional on another slot's value
Replaced with a more general code
Sep
15
answered Applying a function to a Dataset column conditional on another slot's value
Sep
15
comment Auto highlighting input cells depending on input expression (eg its Head)
@alancalvitti This is weird. My code should not affect click events, only the cells being evaluated (via SHIFT+RETURN). Anyway, thanks for the accept.
Sep
15
comment Auto highlighting input cells depending on input expression (eg its Head)
@alancalvitti Can you provide the exact code you added?
Sep
15
answered Auto highlighting input cells depending on input expression (eg its Head)
Sep
15
comment Why is it not allowed to define vectors of variables in a scoping construct?
The first argument of Block (and also Module, With) is a declaration list. Assignments in declaration list are subject to a different semantics than assignments in the body of the scoping construct. Massive assignments of the type you described are simply not allowed in scoping constructs, syntactically. A link to related discussion.
Sep
12
awarded  Enlightened
Sep
12
awarded  Nice Answer
Sep
11
comment Strange behaviour of Set and Part when given a sequence
No worries, I didn't mean that comment as a critique, just as an additional piece of information.
Sep
11
comment Strange behaviour of Set and Part when given a sequence
Set using non-standard evaluation wouldn't alone be enough to provide this behavior. The key here is that Set and SetDelayed (as well as Rule and RuleDelayed) are also SequenceHold.
Sep
11
comment Strange behaviour of Set and Part when given a sequence
Read more carefully the linked explanation. In DeleteCases, Sequence disappears in lis1 as a result of evaluation.
Sep
11
comment Strange behaviour of Set and Part when given a sequence
Have a look at this.
Sep
10
awarded  Enlightened
Sep
10
awarded  Nice Answer
Sep
9
comment Replacing matrix values
@SimonWoods Somehow I seemed to recall that Infinity might unpack, so didn't use it. Perhaps, I was wrong - I didn't test it this time.