18,153 reputation
13983
bio website
location
age
visits member for 2 years, 9 months
seen 2 hours 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.


Sep
13
comment Populate an upper triangular matrix from a vector of elements
@Tangshutao I have added a note concerning this message to the bottom of my response.
Sep
12
revised Combining more than two lists by first column as index
added 290 characters in body
Sep
12
answered Combining more than two lists by first column as index
Sep
11
revised Syntax of transpose etc
added a link to a video demonstrating free-form input; emphasize "=" over "CTRL+="
Sep
11
answered Syntax of transpose etc
Sep
8
answered Changing a tag when one function is passed into another using UpValues
Sep
8
comment Only String Keys supported in Dataset's Association Query?
For what it's worth: I noticed that if one relaxes that condition on Dataset`Query`PackagePrivate`comp then the correct results are generated. But then the result does not render properly in the front-end unless a similar relaxation is made to Dataset`FormattingDispatch`PackagePrivate`tocolboxes. I suspect that there could be similar knock-on consequences elsewhere.
Sep
8
reviewed Leave Open Plot list of million points
Sep
8
reviewed Reopen How can I produce a list of solutions for a function which is updated with updated variables using for loop?
Sep
8
comment How to set restrictions in Manipulate parameters?
+1 You can embed your sliders within a Manipulate like this: Manipulate[x*y*(1-x-y), {{x, 0}, Slider[...]&}, {{y, 0}, Slider[...]&}].
Sep
8
comment Insert large amount of data in HSQL
@Pickett Agreed. You should post this as an answer.
Sep
8
awarded  Necromancer
Sep
7
comment How to “Copy as Unicode” from a Notebook?
@Silvia I can only vouch for it working on Windows, but by rights it should work on all platforms.
Sep
7
answered How to “Copy as Unicode” from a Notebook?
Sep
7
answered How to build a list of functions
Sep
6
comment Mapping a function over the parts of a deeply nested Array
@kguler I don't normally like to get drawn into microbenchmarking discussions, but I felt it important to note that your solution was running very quickly in my environment despite reports to the contrary. My tests were aimed primarily at trying to determine whether this was a fluke result, or consistent. It seems consistent, under these conditions at least.
Sep
6
revised Mapping a function over the parts of a deeply nested Array
added Mr.Wizard's solution using Simon Woods' `smartThread` to the performance tests
Sep
6
comment Mapping a function over the parts of a deeply nested Array
I transcribed that incorrectly, I meant With[{t = Transpose[#, {1, 2, 4, 3}]&}, t[t @ symbolsS + symbolsR]]. It is slightly faster.
Sep
6
comment Mapping a function over the parts of a deeply nested Array
@kguler Yes, it was a transcription error. My results stand.
Sep
6
revised Mapping a function over the parts of a deeply nested Array
fixed a code transcription error