19,858 reputation
14387
bio website
location
age
visits member for 2 years, 11 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.


Nov
4
comment Built-in way to convert Integer to Ordinal String
+1 It uses an undocumented internal function like this: SpokenStringDump`SpeakOrdinal[1] returning "1st". You might have to reference the symbol Speak first to make sure that the package is auto-loaded.
Nov
4
answered How can a field be efficiently added to a Dataset?
Nov
3
answered Creating a generic empty list with JLink
Nov
1
answered Removing non-word characters in certain parts of a string
Nov
1
answered Why does the documentation call functions “pure”?
Oct
28
comment How to track Part of Symbol or How to symbolize Parts of Symbol without copying data
Is there any reason why you cannot define test3 := test2[[1]] and then use h[test3]?
Oct
23
comment Accessing an API (made in the Wolfram Cloud) using a standalone application
When you access the URL in LiveCode, does the result contain any useful diagnostic information?
Oct
23
awarded  Good Answer
Oct
21
comment Listable functions thread over Associations; is this documented?
Speak of the devil... ACL just ran into this one again.
Oct
17
answered Finding relevant parts in XML document
Oct
17
answered Detect Messages within an expression without losing the return value?
Oct
17
answered How to plot multivariate tabular data
Oct
17
reviewed Leave Open How to plot multivariate tabular data
Oct
17
reviewed Close Tutorial video on the Wolfram Language
Oct
16
comment Listable functions thread over Associations; is this documented?
@Mr.Wizard This is the subject of one of my unposted responses ;D In brief, an example is that Query execution is sensitive to the TypeSystem data types inferred for Dataset elements. Those data types are presently inferred using heuristic methods, with magic threshold numbers relating to tuple sizes, key types and value types. This leads to surprising behaviour sometimes -- mostly for display, but sometimes for execution as well (the subject of my wayward post, which may never become fit enough to publish).
Oct
16
comment Listable functions thread over Associations; is this documented?
I have mixed feelings about this whole Association-masquerading-as-a-list business. On the one hand, I can see the benefits for interactive, ad hoc use. But I also fear that the non-determinism it introduces is a fertile source for bugs in library code. I have the same misgivings about the heuristics in Dataset/Query.
Oct
16
answered Listable functions thread over Associations; is this documented?
Oct
16
answered How can I evaluate only a single step of a recursive function?
Oct
15
comment How can I evaluate only a single step of a recursive function?
Related question: How do I evaluate only one step of an expression? Mr.Wizard's answer is particularly nifty, although it won't work unmodified for the present question due to the vagaries as to what exactly constitutes "one step".
Oct
14
answered Odd problem with Module