« first day (3049 days earlier)      last day (1733 days later) » 

00:56
Okay so, it should be possible to use Cases and have a set of “lhs:>rhs” pattern matches, but it is not clear how to do this? I see a number of QAs using Alternatives and Except, but it doesn’t seem that would work for multiple delayed rules. Ideally you can match one case, apply a rule, then apply a rule to the remaining cases, or have an additional match, and so-on...
Is this an established use/is there a QA which might be useful for this? Or should I ask a new question regarding this?
 
2 hours later…
02:40
@CATrevillian ? I have no idea what you mean by this
Doing Cases[bigExpr, {patA_ :> transfA_, ...}, levelSpec] should work
What about that doesn't do what you need?
Ah wait no that's StringCases
I see the difficulty
Here you want to do this:
pats = {patA_ :> transfA_, ...}
transf = Dispatch[pats]
Cases[bigExpr, a:(Alternatives@@Keys[pats]):>Replace[a, transf], ...]
The key is to precompile the rules with Dispatch
 
7 hours later…
09:27
@kirma you do wonder about the kind of kids who'd know about Dirac's equation...
 
2 hours later…
10:57
@J.M.'stechnicaldifficulties :)
He does admit going overly technical at that point though... ;)
 
3 hours later…
14:07
Anyone here commonly use Mathematica on Linux? Does it work as well as you would expect, especially compared with MacOS or Windows?
 
6 hours later…
20:06
@CATrevillian If we add an explicit "failure" value to our rules, then we can write something like this:
$rules = {n_?PrimeQ :> prime[n], n_?PerfectNumberQ :> perfect[n], _ -> $Failed};

Range[10] // Cases[i_ :> With[{r = i /. $rules}, r /; r =!= $Failed]]

(* {prime[2],prime[3],prime[5],perfect[6],prime[7]} *)
20:54
@CarlLange I do. It got better over the years.12.1 is cool.
 
1 hour later…
22:18
@RolfMertig Would you say it's a first-class citizen like the MacOS version is? I suppose I'm slightly worried because I only see SW use the MacOS version and as we all know, SW is the critical path :)
22:28
@CarlLange in terms of the FE, I think it's less cared for than the MacOS (at least per the bugs reported here)
22:47
@CarlLange have you considered grabbing a trial and giving it a go?
23:17
What's the simplest way to create a ListLogPlot of a sequence containing negative numbers? Negative numbers should be displayed as logs of their absolute values, but in a different color than positive.
@VladimirReshetnikov call Show on two separate plots
Now I do ListLogPlot[Style[Abs[#], If[# < 0, Red, Blue]] & /@ seq]
Is there a simpler way?

« first day (3049 days earlier)      last day (1733 days later) »