60,667 reputation
6183275
bio website mathprogramming-intro.org
location St. Petersburg, Russia
age 38
visits member for 2 years, 10 months
seen 7 secs ago

Ok, an obligatory note: opinions expressed here are mine and not those of my employer.


Jan
19
comment Convert boolean test function to pattern?
@Mr.Wizard I forgot :). I don't have much to add to what you mentioned. I just think that this is one of the cases where, while the question may be a basic one, it may not be obvious straight from the docs (in the sense that it may not be clear for a novice exactly where to look for it), so I think we can keep this question alive on the site.
Jan
19
comment Error in setting matrix elements
Not sure about deletion. It may be better to close this but keep it alive. If you make a slightly more specific / descriptive title, it may drive future visitors to that question. I take it that you tried to find something on the topic before asking, and did not find that one. And I only found it because I remember answering it. So, right now I am for closing, let's see what others think.
Jan
19
comment Error in setting matrix elements
The problem with this is that ReplacePart copies entire expression, so a single element assignment using ReplacePart will not have a constant time complexity. For most applications, this will be a disaster.
Jan
19
comment Error in setting matrix elements
See also this Mathgroup thread
Jan
19
comment Global variable initialization in packages
@murray This is also what I think would be very beneficial for our community. Once some such system is in place and becomes widely used, I think that the package manager, which will have a programmatic interface, will take care of these issues for all projects, and what IMO is really important, in a uniform and consistent way. So, to learn about the version number etc. of some particular project installed by the package manager, one will execute one and the same command, independent of the package / project in question - with the project's specifics showing up only in its name / id.
Jan
19
comment Global variable initialization in packages
@murray The question is, why do you need those globals. I don't have a strong opinion on the matter. On one hand, I do like this idea. On the other hand, it may introduce extra frigility / maintainance costs, particularly when there is also some automatic versioning in place. Perhaps, I am with you as far as individual packages are concerned, and they don't rely much on each other. But all serious open source communities have automated package managers, where each project has a special descriptor file storing meta-information such as version number, author's name, dependencies, etc.
Jan
19
comment Convert boolean test function to pattern?
@Mr.Wizard Not sure I agree with closing of this question. If it is not an exact duplicate (i.e. wasn't asked before exactly in this form), then I think it deserves an answer and an open status, since this is a pretty common operation and some folks without lots of experience may not immediately realize the connection. You could e.g. convert some of your comments to an answer.
Jan
19
awarded  Nice Answer
Jan
18
comment Global variable initialization in packages
@murray I partly agree, but versioning is a more complex matter. I am in fact working on a versioning system / package manager for Mathematica projects that will be robust. Generally, proper versioning should IMO be a task for a computer, not a user, since maintaining the version variable can be pretty error-prone. In other words, as for versioning, I think it is best factored out from the rest of the package's code. My personal opinion, of course.
Jan
18
revised Value of $BaseDirectory within Ant script?
corrected a typo
Jan
18
comment Value of $BaseDirectory within Ant script?
I added a section answering your specific question on accessing $UserBaseDirectory etc.
Jan
18
revised Value of $BaseDirectory within Ant script?
added 85 characters in body
Jan
18
revised Value of $BaseDirectory within Ant script?
added 2124 characters in body
Jan
18
answered Value of $BaseDirectory within Ant script?
Jan
18
revised Global variable initialization in packages
Added a link and a few explanations, fixed some grammar / typos
Jan
18
comment Global variable initialization in packages
@AlexanderSchmitz Thanks. This answer came out of my continuous attempts to eliminate global variables in my code, since a while ago I held an opinion on this very close to what you formulated in your answer. I finally came to a conclusion that this is not often possible or even desirable - which is what I tried to express here.
Jan
18
revised Global variable initialization in packages
added 237 characters in body
Jan
18
revised Global variable initialization in packages
added 2 characters in body
Jan
18
answered Global variable initialization in packages
Jan
18
comment For any symbol, how can I get the full context-qualified name of the symbol as a string?
@JoelKlein Having UniqueContext[] would be quite handy, and not only for this problem. It would have to be efficient, however (e.g. Contexts[] can be quite slow).