billisphere
Reputation
1,033
Next privilege 2,000 Rep.
 Jan 18 awarded Yearling Feb 23 comment How to subtract one list from another, treating each elements as distinct, assuming the smaller list is a subset of the larger list? @Mr.Wizard, ah! [facepalm] I completely forgot the comment minimum. I thought I had erred in some informal MSE cultural etiquette and was being gently if vaguely reprimanded, so I was treading lightly... I do feel silly, lol. Sorry for the noise. Feb 23 comment How to subtract one list from another, treating each elements as distinct, assuming the smaller list is a subset of the larger list? @Mr.Wizard, quite a puzzling ellipsis there. Text lacks tone, though, so what's it for? Feb 22 comment How to subtract one list from another, treating each elements as distinct, assuming the smaller list is a subset of the larger list? @Mr.Wizard, incidentally, +1 for this. Very, very neat. Feb 22 comment How to subtract one list from another, treating each elements as distinct, assuming the smaller list is a subset of the larger list? @Mr.Wizard, you're right. Playing with it just now, it seems like SequenceAlignment is probably just ill-suited for this. (Or I'm not seeing how to use it correctly.) Thanks for pointing out this error. Answer's now updated. Feb 22 revised How to subtract one list from another, treating each elements as distinct, assuming the smaller list is a subset of the larger list? Revised in light of Mr. Wizard's observation. Jan 18 awarded Yearling Nov 19 revised How to subtract one list from another, treating each elements as distinct, assuming the smaller list is a subset of the larger list? Added (a) a third fun solution and (b) an important note to alternative solutions Nov 19 revised How to subtract one list from another, treating each elements as distinct, assuming the smaller list is a subset of the larger list? Added a much faster alternative that still respects the suggested constraints. Nov 19 answered How to subtract one list from another, treating each elements as distinct, assuming the smaller list is a subset of the larger list? Sep 30 awarded Explainer Sep 30 revised Join lists with nested list Added some basic timing checks. Sep 26 comment Join lists with nested list @GordonCoale ref/Apply, Details and Options: "A negative level -n consists of all parts of expr with depth n." See ref/Depth for more explanation. Sep 25 answered Join lists with nested list Sep 24 comment How to open *.sif files with Mathematica It isn't supported if it isn't listed here. Unfortunately, I don't think SIF is listed. Someone might have written an import converter for SIF, though. You may want to edit your question to ask that specifically. Aug 17 revised $RecursionLimit::reclim: Recursion problem Important note/caveat about my attempt at captureValues... Aug 17 comment$RecursionLimit::reclim: Recursion problem @LuisFernandoMoura, I'm not sure what the expression NumericQ[tmedNum] is trying to accomplish, but yes, it should evaluate to False because tmedNum is only a symbol denoting part of a transformation rule, not itself a numeric value. Aug 15 comment $RecursionLimit::reclim: Recursion problem @LuisFernandoMoura, I'm not sure unfortunately, since I don't encounter that error here. In the code above, tmedNum is permanently defined to always "hand off" to tmed, so I can only guess a problem would be with whatever current function that tmed is defined as during the iteration in which you see that error. Try enabling the Debugger (under the Evaluation menu) and enable "Break at Messages" and "Show Stack", then run your code again. When the message occurs and the stack window fills, inspect the value of tmed to verify its value is what you were expecting. Aug 9 comment$RecursionLimit::reclim: Recursion problem @LuisFernandoMoura, no problem, glad to have been able to help. You might want to take a look at the edit I just made to introduce an updated helper function. My first attempt at the helper function was bloated and wrong in an important case that it was trying to cover (when a Function has a parameter with the same name as a previously set symbol). It still worked for your example because that case didn't come up. Anyway, fixed now. And best of luck in your master's! Aug 9 revised \$RecursionLimit::reclim: Recursion problem Fixed my flat-out wrong code... with a much simpler version, too.