@rm-rf rm, what should be the code of conduct in cases such as ViviD's ? He's editing old posts adding tags that do not exist and this is the perfect "minor edit" case. Nevertheless this is not sporadic, rather than something on a regular basis.
In this question a bug in Mathematica's TableView was reported, which was subsequently confirmed by the community and tagged by belisarius with the bugs tag.
TableView is a strange beast, with WRI being very secretive about it. As far as I know it came in the open because it was used somewhere i...
Is someone around who can tell me why the solution of Bob given in his comment here works? I don't know it and I believe the reasoning of Bob is wrong.
He commented in the last line:
> Presumably, because Function has the attribute HoldAll.
which doesn't make sense because although Function has the attribute HoldAll, it doesn't mean that it holds the arguments when you call it!
Most simple example is to set
Pre = (Print[Hold[#]]; #) &
When you now call 2+2 you clearly see that $Pre prints (although held) Hold[4] because the argument 2+2 was already evaluated.
But when the argument # is already evaluated to 4, how on earth can a replacement work?
$Pre = (Print[Hold[#]]; # /. Plus[2, 2] :> 5) &
(the first code must read $Pre = (Print[Hold[#]]; #) &)
Back in 2012, Jon McLoone wrote a program that analyzed the coding examples of over 500 programming languages that were compiled on the wiki site Rosetta Code. He compared the programming language of Mathematica (now officially named the Wolfram Language) to 14 of the most popular and relevant languages, and found that most programs can [...]
It's inspired by this post, and it's very similar to Nikie's solution, just put in a package. It is practically an analog of MATLAB's (or APL's) way of computing elementwise conditions on arrays, or filtering arrays. This approach is very fast, but it was difficult to write readably in Mathematica. The packages tries to remedy this: it gives you both convenient notation and speed.
@SjoerdC.deVries Well, since Unevaluated is there, it certainly looks like I wanted HoldAll when I originally wrote this, but right now I can't really see why this is necessary ...
@SjoerdC.deVries Yes, that's a special case where the Pick is much better. The main reason for BoolEval is to get rid of all those ugly UnitSteps when trying to speed up things by vectorization. With a small penalty on performance (compared to fully manual vectorization) we get to keep readable and convenient notation.
@SjoerdC.deVries Might be worth including a special case for it though.
It breaks down once starting to use patterns.
also, this use case is quite unlikely to come up anyway
the result is always a number of repetitions of 123456
@Szabolcs BTW could you test Expectation[x \[Conditioned] x <= -1.6448,x \[Distributed] NormalDistribution[]] on both of your versions and compare the results?
I am honored to be in the company of such productive, curious, and creative people like you, now almost for couple of months.
I noticed that tag policy on Mathematica SE site is to keep the tag structure simple, and therefore number of tags low (this is my understanding from observation, I may b...
Hey folks - some cool news - Wolfram Community now uses the same editor as SE and the same beautiful syntax highlighter developed by user effort - thanks a lot! So it is very easy now if syntax is uniform here and there. Some cool thing users recently started: