Reputation
24,963
Next tag badge:
195/100 score
17/20 answers
Badges
2 52 108
Newest
 Guru
Impact
~122k people reached

Feb
19
comment Context of localised (dynamic) symbols
@halirutan I took a crack at describing the DynamicModule behaviour. Now I need to lie down :)
Feb
19
revised Context of localised (dynamic) symbols
I added the sections related to dynamic modules and scoping.
Feb
18
comment Context of localised (dynamic) symbols
I realize that there is still more to be said about the double-evaluation and double-scoping of DynamicModule, but I've run out of time to extend this post at the moment :) I figured that I would post it anyway since it is too long for comments.
Feb
18
answered Context of localised (dynamic) symbols
Feb
18
comment Windows command line arguments, stdin & stdout
Thanks for the bounty :)
Feb
18
comment How to search Dataset to find all keys share same Value
I think that it is application-dependent whether any given association can have two keys with the same value. If not, then your technique presents a valuable optimization. Otherwise, more elaborate measures are needed. Only the OP knows for sure. Ideally, any facility provided by WRI would allow an explicit choice in this matter. In the absence of choice, I think they would be forced to support the more general case (possible duplicates). [I'm pinging @Leonid in case he didn't see your comment.]
Feb
17
comment Windows command line arguments, stdin & stdout
_.cmd accepts any number of arguments -- but mmascript.m only looks at argument #5 (just like test.m). To illustrate what I meant by my comment, I have changed the mmascript.m script to evaluate and print all user-supplied arguments.
Feb
17
revised Windows command line arguments, stdin & stdout
changed `mmascript.m` to evaluate and print all user-supplied arguments
Feb
17
comment How to search Dataset to find all keys share same Value
+1, but beware that the simplified version assumes that the right-hand sides of the original rules are all unique (e.g. try it for ds = Dataset@{<|a -> 6, b -> 6|>}).
Feb
17
comment How to search Dataset to find all keys share same Value
@Mr.Wizard Position remains my favourite solution among the answers so far. I added this variant because it closely conforms to the pipeline-style of expression that is encouraged by the Query syntax, and that one finds in "real" query-based databases. I am hoping that some day Query will grow up to be such a "real" engine and then these pipeline forms will become important. Incidentally, I usually find that for maximum performance in the present version, the first thing to do is to get the data out of Dataset and to then apply "normal" operators :)
Feb
17
answered How to search Dataset to find all keys share same Value
Feb
16
comment Windows command line arguments, stdin & stdout
@William It accepts only one argument because I was following the lead of test.m. There is no essential obstacle to adjusting the Mathematica script to accept as many arguments as you like, and to evaluate them or not evaluate them as suits the application.
Feb
16
answered Change Values in Dataset under Condition
Feb
16
comment Windows command line arguments, stdin & stdout
@William I have added a section detailing the use of a cmd file to emulate the CYGWIN example in your response. Hopefully this version will get you closer to your goal. I have left out the pesky details concerning error handling, escaping, etc. The offer of a bounty is appreciated, but not necessary.
Feb
16
revised Windows command line arguments, stdin & stdout
Added a variation that uses a _cmd_ file.
Feb
16
comment Windows command line arguments, stdin & stdout
@William Fair enough. I've always avoided DOSKEY because it is not recognized anywhere but at the start of interactive command input. I would just use a normal cmd file (e.g. create _.cmd somewhere in the PATH). But we have now firmly left Mathematica and are well into superuser :)
Feb
15
revised Windows command line arguments, stdin & stdout
added the section about DOSKEY
Feb
15
comment Windows command line arguments, stdin & stdout
@William What was the nature of the failure? It all seemed to work for me when I tried it just now on Windows 7: stdin, stdout, command line arguments. I had to avoid breaking the command across lines since DOSKEY uses different escaping conventions than the command processor. Double-check that the defined macro takes the form you expect by inspecting DOSKEY /m.
Feb
15
awarded  Enlightened
Feb
15
awarded  Nice Answer