6,555 reputation
842
bio website
location Netherlands
age
visits member for 2 years, 1 month
seen 13 hours ago

I guess I like meta programming


2d
comment How to abort silently?
@LeonidShifrin Have I overlooked something in not including the attribute HoldAll? I figured the expression comes out of the kernel in an evaluated state anyway. I was unable to figure out a case where the HoldAll argument matters. By the way the expression {Clear@c, c, c = 0}, gets handled differently in the presence/absence of $Post, but that's just a joke :).
2d
answered How to abort silently?
2d
revised StringForm and NotebookWrite
Some formatting
Nov
18
revised Quickly test if all element in list is the same
Added definition of res and n
Nov
18
comment Quickly test if all element in list is the same
@kguler Alright, I guess it is fine this way. I edited my own answer with the comparison in the CompilationTarget->"C" case. Thank you for including me :).
Nov
18
revised Quickly test if all element in list is the same
Functions for comparison and C vs WVM code
Nov
18
comment Quickly test if all element in list is the same
Would you consider including my answer?
Nov
18
answered Quickly test if all element in list is the same
Nov
15
comment Why the same function defined by Set and SetDelayed look different?
Also compare f[2]//Expand and g[2]//Expand. Lastly I think the question looks quite alright :).
Nov
15
comment Why the same function defined by Set and SetDelayed look different?
This is because in the definition with Set the expression is evaluated first. Mathematica can symbolically manipulate Sums even when n does not have a value. To see this, you can evaluate the expression Sum[(1 + x)^j, {j, 1, n}] when n does not have a value, and see that it evaluates to the same thing as you can see in f//Definition.
Nov
5
comment Does Set vs. SetDelayed have any effect after the definition was done?
@Rojo thanks again, I fixed the mistake I mentioned now :).
Nov
5
revised Does Set vs. SetDelayed have any effect after the definition was done?
Correction
Nov
5
revised Does Set vs. SetDelayed have any effect after the definition was done?
Formatting, silly section
Nov
5
comment how to improve efficiency when I want to classify a list according to certain laws
Hey Chenminqi, I just wanted to ask if my (rather long) answer was of any use to you. Nice to see you are still active on the site :)
Nov
2
comment Extract a list of all built-in functions used in a notebook
Lara, would you consider accepting an answer?
Oct
27
comment Weird behavior of conditions when using OptionsPattern and OptionValue
Very interesting indeed. I like the solution with If, but also the one with Except, which I think you explain best. This Q&A has been instructive.
Oct
27
answered Does Set vs. SetDelayed have any effect after the definition was done?
Oct
27
comment Weird behavior of conditions when using OptionsPattern and OptionValue
Note that test[a_, b__, c___] := {{b}, {c}}; test[1, 2, 3, 4, 5, 6] gives {{2},{3,4,5,6}} so that c picks up everything, not b.
Oct
27
revised Undocumented form for Extract
Update
Oct
25
revised Why some built-in functions are slower compared to some other ways using more than one built-in functions for doing same job
Made it more obvious that the link linked to a discussion