16,913 reputation
13779
bio website
location
age
visits member for 2 years, 8 months
seen 24 mins ago

Frequently Asked Questions

WReach? Is that connected to WRI somehow?

The "WR" in my name has nothing to do with the company that develops Mathematica. It is just a coincidence.

Why do you start all your global variable names with $?

I use dollar signs for ad hoc global variables because I have been bitten too many times by accidentally assigning an own-value to a symbol that I happen to use, for example, in a symbolic equation. So I am in the habit of writing $x instead of x. I stick to that convention even for longer symbols like $initialUrl. Just like the regular symbol convention, Mathematica's predefined global symbols all start with a capital letter after the $. My ad hoc symbols always start with a lower case letter, so there is no conflict.

Why do you put semicolons and commas at the beginning of the line instead of at the end like a normal person?

I don't think of it that way. Rather, I switch from horizontal to vertical layout when a single expression is too long to fit on one line. This has the interesting side-effect of making the important delimiters stand out and line up. I first ran into this practice in the SQL community. SQL "programs" have the unpleasant property that they must be written as a single statement -- even if that statement is a hundred lines long (or more!). Sometimes Mathematica expressions share that property.


Aug
28
answered How do I tweak the input assistant to use string completion on my own functions?
Aug
26
answered UnFlatten an array into a ragged matrix
Aug
24
answered What is the correct way to use specific rule for specific pattern match when parsing an expression?
Aug
22
revised Return value of Reap when using tags
added discussion about `reapList`, made the initial example more apparent
Aug
22
revised Return value of Reap when using tags
added discussion about `reapList`
Aug
22
comment Return value of Reap when using tags
@rcollyer I confess that my answer is mostly motivated by the need to vent about Reap :D
Aug
22
answered Return value of Reap when using tags
Aug
22
answered Make MapIndexed listable
Aug
21
comment Passing a variable messages list to Quiet
@episanty Yes, it works by preventing evaluation of the message list using Hold and then transforming the expression into a call to Quiet. Whether or not to use the auxiliary variable messageList, or to represent the empty message list using Hold[], are choices that can be made to suit one's taste (and the form of the "real" version of g).
Aug
21
answered Passing a variable messages list to Quiet
Aug
20
comment Dataset: cannot reproduce a basic example. A bug?
A similar problem, if not exactly the same, is reported here.
Aug
20
comment Dataset Mathematica 10.0
A similar problem, if not exactly the same, is reported here.
Aug
20
comment Why is Query so much slower than Part?
I added an update to correct a wrong assertion about the scans in Dataset`WithOverrides.
Aug
20
revised Why is Query so much slower than Part?
added the update about ``Dataset`WithOverrides` monkey-patching
Aug
20
answered Possible Bug in ProbitModelFit when used in a Dataset
Aug
19
answered Simplifying a time-series segmentation Query
Aug
19
revised Functional-Style Partial Application and the Accumulator Pattern?
added the example of an evaluation leak in the first redefinition of `partial`
Aug
19
comment Functional-Style Partial Application and the Accumulator Pattern?
@Reb.Cabin While my proposed revised definitions of partial were correct, my explanation as to why the original generalized definition failed was in error. Please see my corrected and expanded explanation.
Aug
19
revised Functional-Style Partial Application and the Accumulator Pattern?
corrected and expanded the explanation of why the generalized definition of `partial` failed
Aug
18
answered Functional-Style Partial Application and the Accumulator Pattern?