Reputation
29,868
Next tag badge:
477/400 score
65/80 answers
Badges
2 66 146
Newest
 Nice Answer
Impact
~291k people reached

Jul
1
comment Programming a recursive FFT with Mathematica
@M.R. I just tried your code on Linux, 10.1, clean kernel, and it worked. Weird
Jun
7
comment Is there a built-in equivalent to Python's enumerate?
Thanks @Leonid, this will be useful! Perhaps now I can stop saving for a new PC with 32GB RAM and settle for 8 :) I've been playing around with Haskell lately and grown fond of it and its lazy data structures; glad to see some of that around here. In a related note, earlier I was counting, given a random permutation of Range@n, the distribution of the number of elements whose value coincides with their position. Had to stop at n=7 or 8 aprox due to RAM. Perhaps with this I could have gone a couple of nums higher
Jun
6
comment Is there a built-in equivalent to Python's enumerate?
Niiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiice
May
29
comment How can I effectively performance-profile Dynamics?
@episanty I don't have the code fresh in my head, but, probably, I thought the following at the time. It's not important to lose state between kernel sessions. DynamicModule wouldn't be any use (on the contrary) if we are using a multi-cell and multi-notebook apprach, and the new cell isn't spawned from a button inside the containing DynamicModule such that InheritScope works. As it is right now, if changing Module to DynamicModule works (haven't tried it) I think its because of a leak and it shouldn't
May
9
comment How do I access the parameters in Classify using Support Vector Machine as method?
@chris I don't recall exactly, sorry. Hopefully, they will get documented
Apr
24
comment Can this be written well, without loops?
@JadeNB that was the spirit :)
Feb
19
comment How do I find all the possible events that work with EventHandler?
Now you can also look at the autocomplete list when you write CurrentValue[" and some starting letter
Feb
13
comment Most efficient way of splitting a file into length-prefixed blocks
@LeonidShifrin I had tested it without the last copy to remove the $Failed, but I doubt it makes a difference and if it did, it is easy to avoid. The chunk size dependence makse sense.
Feb
11
comment Most efficient way of splitting a file into length-prefixed blocks
@Mr.Wizard So far I am finding Haskell really interesting. My guess is you would like it, very terse. You don't even need brackets to call a function ;)
Feb
11
comment Most efficient way of splitting a file into length-prefixed blocks
No functional benefit, and not really a stylistic preference either. It is what came to mind first. I am not sure which I prefer. I think your last offer is my favourite
Feb
11
comment Nested mapping of a function
Are you certain that you want a neat version of the first construct? Honest question
Feb
11
comment Most efficient way of splitting a file into length-prefixed blocks
I thought of not answering because the OP asks for "most efficient". However, when I saw that a naive implementation worked x1.6 slower than a solution which is 200x faster than the OP's, I thought it might be useful anyway.
Feb
9
comment How to split a Dataset into training and testing for machine learning?
@TaliesinBeynon that's neat, thanks! Nice to see you back around
Feb
8
comment Creating a TeXForm/TraditionalForm/etcForm - like function
They include the PrintForms which include the BoxForms. I did some digging at the time. Thanks! I think the output forms are those heads that end up showing applied to the cell label such as in mmaOut[34]//InputForm. Try Unprotect@$OutputForms;AppendTo[$OutputForms, la]; la[5]
Feb
1
comment Why Mathematica chooses bracket for function arguments over parenthesis?
@rm-rf A few days ago I did a rm * accidentally (I meant rm *.pdf) and lost about 15GB of stuff :)
Jan
26
comment What's real analogue for FromDigits?
What's the format of the input? If its a simple string, ToExpression or some Interpreter, or Internal`StringToDouble
Jan
26
comment Generating a Variable Number of Dynamic Variables
If for your application it might make sense to use p[1], p[2], ... instead of p1,p2, then all becomes easy
Jan
25
comment Is the divergence between Round and setting an explicit precision intentional or a bug?
As to the extension, yes, you should round at the end with the min of the input precisions (or use SetPrecision perhaps) instead of using the automatic precision tracking of Mathematica. Because the Mathematica precision tracking does not work as you intend (but in a smarter way that makes sense in general)
Jan
25
comment Is the divergence between Round and setting an explicit precision intentional or a bug?
Or, for that matter, 100``0 which doesn't require rounding up shows as 1.0*10^2
Jan
25
comment Is the divergence between Round and setting an explicit precision intentional or a bug?
So, 54``0 with an error of 1 rounds to tens just like an error of 3.16 (54``-0.5). Both give 5.*10^1. But as you said, misteriously, when you get an extra digit by rounding up, it seems weird (even buggy?): 96``0 is 1.*10^2, 96``0.001 is 96. and 94``0 is 9.*10^1