10,894 reputation
12050
bio website
location
age 28
visits member for 1 year, 11 months
seen Mar 23 at 22:02

Mar
10
comment Sorting non-numerical lists
You're not answering the question which specifically asked for a solution without using conversion to floating point precision.
Oct
16
comment Group list of lists by Total
Your second line appears to be a SortBy[...,True]. This just defaults down to Sort again and makes it equal to your first solution.
Oct
6
comment Counting sublists containing 0
Or Count[data, {___, 0, ___}]
Oct
1
comment Why does AbsoluteOptions give the wrong answer for ListPlot?
Interesting, what version are you working on?
Oct
1
comment Why does AbsoluteOptions give the wrong answer for ListPlot?
Can't say why it does this, but if you put PlotRange -> Automatic, it will return the correct plot range. Oh, and with respect to b.g's comment, I have reproduced the issue on Mathematica 9, fresh kernel and all.
Sep
30
comment Delay of events detection dependent of “MouseDown” position
@Kuba I belive that dynamic interactivity in general is halted during mouse down, at least that has always been my experience (With slider interactions and such being excluded). For instance try DynamicWrapper[ Dynamic[t], Refresh[t = AbsoluteTime[], UpdateInterval -> 0.1] ], and press the mouse button.
Sep
20
comment Sum all numbers from 1 to 1000 divided by either 2,3,5 or 7
Beat me to it. Mathematica is a great fit for the mixed analytical/numerical solutions. There's however a 20 fold performance increase hiding in plain sight, you just need to remove one character. Reply back if you want the specifics. :)
Sep
19
comment Plotting data with 4 columns!
Image3D is a possibility. But I'd advise you to do at least some basic searching through the docs before posting questions.
Sep
10
comment Turn expression into function
"Each function should document any side effects it makes." This is provably impossible in Mathematica, so I'm not sure what your point is?
Sep
10
comment Turn expression into function
"in the mathematical sense" Then you should add this. You where talking about Mathematica, which is a programming language, thus the correct definition of function is the contextual one. It's like arguing that a child's imaginary giraffe is not "truly" imaginary because you can't square it to yield a negative giraffe. While the names used overlap, the definitions are different, and neither is universally "true".
Sep
10
comment Turn expression into function
"A true function is one.... " You mean a pure function. Functions in Mathematica do not have to be pure, and as such you can justifiably use Evaluate, however as you note it will not be pure (like a ton of other Mathematica functions are not mind you). But describing it as not a "true" function could cause confusion. Besides this point, purity in Mathematica is a much more complicated issue than in other languages, and an argument could be made that no functions are pure. Even f[x_]:=x^2 will depend on state and can have side effects.
Sep
10
comment Turn expression into function
@Blackbird I find your comment very offensive. Who are you to tell people how much time they should or shouldn't spend doing something prior to asking for help? In my honest opinion Beni could have posted this question immediately after discovering the issue and it would be just fine. The issue arises due to him not being familiar with the evaluation principle of Mathematica, so it would most likely be a huge waste of time trying to brute force your way through it rather than simply asking others more experienced for help.
Sep
6
comment Guidelines on giving readable names to variables
@Mr.Wizard I was not commenting on preference, I already noted, I don't like LetterSpace, I was answering your own very specific inquiry "unless I've forgotten a major one". The fact that LetterSpace is named "letter space" should be some indication that it has a preference status as letters that act as substitutes for space, which does make it worth special mention prior to more exotic replacements like ellipsis. Not due to preference, but due to it's purpose.
Sep
6
comment Guidelines on giving readable names to variables
@Mr.Wizard You forgot arguably "the" pet space character, namely LetterSpace. Who's sole purpose in life I would suspect is to "solve" this exact desire for underscore separated compounds.
Sep
6
comment Guidelines on giving readable names to variables
I'll take a guess and assume that you think this_variable looks "better" than thisVariable, due to experiance with other languages. I'll just emphasise the in Mathematica this_List has a completely different meaning than it does in such languages. It's a pattern that matches expressions with head List, and names it this. I would say that deliberately trying to name variables so that they'll look like this should be considered harmful. That being said, you can escape underscore and it'll work like you want, so Esc+_+Esc.
Sep
6
comment Guidelines on giving readable names to variables
@Kuba While it's true that the question would be primarily opinion based if it asked what the best method was, the question as it stands is asking what methods people use which is not opinion based, even if people do use different methods.
Sep
6
comment How to get Cases to wrap results in an arbitrary head?
That rewrite is really awesome, such an elegant and beautiful solution.
Sep
4
comment How to find first list element that differs from average of N previous elements by more than a given amount?
@Mr.Wizard Also, while I understand a preference for Select in cases where you want all matches, it seems detrimental to this case which is specifically targeted at a first find, and therefore benefits from a short circuit and therefore a loop construct.
Sep
4
comment How to find first list element that differs from average of N previous elements by more than a given amount?
@Mr.Wizard Thanks for the correction. My notion was that getting the value of an element in a list when you have the index is trivial, but it doesn't hurt to add.
Aug
29
comment How do I create a package from an existing notebook?
@rm-rf Thank you. :)