57,635 reputation
5141334
bio website
location ND
age 31
visits member for 2 years, 7 months
seen 1 hour ago

contact details

Visit Mathematica.SE


Aug
14
comment How can one draw a network with nodes and links in a grid shape?
Is the network given? Are you going to generate it? How precisely? GridGraph makes a grid graph, then you can remove edges randomly.
Aug
14
awarded  Nice Question
Aug
14
comment Is it possible to Compile the function with string argument?
There's a risk someone will prove me wrong, but I believe that no, you can't use a string in compiled functions. You can convert to character codes and work with those.
Aug
13
revised How to unprotect a variable in a package
edited body
Aug
13
comment How to unprotect a variable in a package
@Mr.Wizard ... preferably at the point where the symbol is "exported", i.e. between BeginPackage and Begin["`Private`"]. It is not necessary to refer to the symbol with the fully qualified name throughout the package, just the very first time the symbol is mentioned. Updating the package takes only a single change. I also felt that it should be made clear that this is the standard way to handle name conflicts, it fits in very well with the usual package structure, and overwriting built-ins is a bad idea.
Aug
13
comment How to unprotect a variable in a package
@Mr.Wizard I will admit that I did not read through your answer in full before posting mine. I saw the question last night, with one downvote, and I thought that's not fair, this point should be explained clearly. But I didn't have time to write it up until the morning. In the morning I went on to write the answer after just briefly checking that your answer is not the same. I should have checked more carefully. Now I read your answer in more detail, and I think that it does not make it clear enough that the package context needs to be added only at a single point, ...
Aug
13
comment Is this 30% slowdown in Mathematica 10 due to DownValues lookup time?
@RolfMertig I haven't tried recently, but the prereleases were clearly faster than 9 when using MKL-backed functions. It's probably not MKL.
Aug
13
comment How to unprotect a variable in a package
@Nick Out of curiosity, are any of these packages public? If yes, which package is it? Sounds like a big project.
Aug
13
comment How to unprotect a variable in a package
@Nick Sure. But why not avoid it in the first place? Do you have unit tests for the package? If not, you might not even notice that something broke until someone tries to use an affected function (if you're unlucky, otherwise it'll complain on package load). Combinatorica uses some capitalized private names, and they have to keep patching it with each release now ...
Aug
13
comment Is this 30% slowdown in Mathematica 10 due to DownValues lookup time?
Let me correct that. It's a consistent 70% regardless of the order of benchmarking: {{1.71146, 1.67136, 1.68109}, {1.70866, 1.720955, 1.671026}, {1.745761, 1.695245, 1.746422}}.
Aug
13
comment Is this 30% slowdown in Mathematica 10 due to DownValues lookup time?
I got {{1.74210, 1.72303, 1.65135}, {1.74516, 1.685781, 1.717439}, {1.695056, 1.720064, 1.707282}}. I ran it in v9 first, then in v10. It's a laptop, so it slows down as it heats up. This may account for part of the slowdown (I see 70%, not 30%). OS X 10.9.4.
Aug
13
comment How to unprotect a variable in a package
@Nick Even some of the packages that come with Mathematica have conflicts with new builtins and this is how they deal with the conflicts. Just one thing to keep in mind: make sure any private package symbols, i.e. everything that's not explicitly exported inbetween BeginPackage and Begin, does not start with a capital letter. If private symbols conflict, it will be harder to fix them. If public symbols conflict, it's a single change that's needed for each conflict.
Aug
13
revised Edit built in symbol
avoid the misunderstanding that the user wants to modify `Symbol`
Aug
13
comment Breaking out of a NestList
I was wrong, please ignore.
Aug
13
comment Export dataset to JSON
@Thijs I think either here or usual email to support at wolfram.com. I wouldn't expect much unless several people ask for the same though. (At least two of us for now.)
Aug
13
answered Export dataset to JSON
Aug
13
revised How to unprotect a variable in a package
added 63 characters in body
Aug
13
answered How to unprotect a variable in a package
Aug
13
revised Manipulate crashes after running 4 minutes
added 58 characters in body
Aug
13
comment Problem with NDSolve
Please update both this post and the identical one you made on Wolfram Community, and cross-link them. This is to avoid duplication of effort.