Reputation
Next tag badge:
215/100 score
20/20 answers
Badges
7 212 301
Impact
~449k people reached

Aug
19
comment Strange behavior with Cases and Position with SetDelayed
@Szabolcs Strange, this is the first thing I tried, and it didn't work. Now I haved tried again and it worked. Will check a few more times, if this works reliably, I will mention this, sure.
Aug
19
revised Strange behavior with Cases and Position with SetDelayed
added 355 characters in body
Aug
19
comment Strange behavior with Cases and Position with SetDelayed
@N.J.Evans But for me this didn't work even if I replaced f -> g everywhere: fun2[list_List] := Evaluate@(Cases[list, g[x_] :> x] -> Position[list, g[_]]); fun2[{g[a], g[b]}].
Aug
19
comment Strange behavior with Cases and Position with SetDelayed
@N.J.Evans I don't think so. It has some other symbol g in it, and Evaluate just causes its r.h.s. to evaluate immediately, so I don't see how this could possibly work. It didn't work for me anyway.
Aug
19
answered Strange behavior with Cases and Position with SetDelayed
Aug
18
comment How to reference StringExpression named parts from a package without full Context path?
Well, the main point was coming from @AlbertRetey, so I'd rather see his answer here - I just gave a small technical hint.
Aug
18
comment How to reference StringExpression named parts from a package without full Context path?
You want something like bigStringExpr[someLetters_Symbol, anInteger_Symbol] := With[{sl = someLetters, int = anInteger }, StartOfString ~~ Pattern[sl, ToUpperCase@Alphabet[] ..] ~~ "@" ~~ Pattern[int, (Except["0", DigitCharacter] ~~ DigitCharacter ...)] ~~ EndOfString], where With serves to full the system and avoid those complaints.
Aug
17
awarded  Good Answer
Aug
14
comment Having used Mathematica as a “gateway” language, where to from here?
@ndroock1 Thanks. In fact, I do have a plan to write an improved version of the book. I may actually have enough time soon to at least kick-start the work in this direction.
Aug
14
awarded  Guru
Aug
11
comment Different Set Semantics - Why is assoc[“a”] =. different from assoc[[“a”]] =.?
Well, ok. I am not a big fan of this design, but it is obviously convenient for the end-user and this indeed justifies Unset working with the similar syntax.
Aug
10
comment Streaming`LazyList`Testing may have a leak
@paramecium It doesn't work like that. The symbols do have long names anyway. The real problem here is that the context that wasn't supposed to be loaded, was unconditionally loaded (added to $ContextPath). This is simply a bug (my bug), there is nothing deeper about it. It came out of an oversight: the testing part wasn't supposed to ever be loaded by the system in production mode. Part of this has to do with the fact that Streaming functionality is still not finalized, but, due to its coupling to Dataset and the autoloading mechanism, still gets loaded.
Aug
10
awarded  Enlightened
Aug
10
awarded  Nice Answer
Aug
9
answered Detect if code is running in the cloud
Aug
8
comment Recursive list contruction
The big difference between Mathematica and Scheme regarding lists is that while in Scheme they are essentially linked lists, in Mathematica they are arrays. This leads to all sorts of troubles when one tries to directly translate the list-manipulation code (particularly recursive functions) from Scheme to Mathematica. I do recommend to read this post of mine on linked lists in Mathematica - they are the closest analog in Mathematica for Scheme's lists, and they are well-suited to use with recursive code.
Aug
8
comment Awkward DatabaseLink JDBC Error
This surely isn't a two-minute task, but if you add such code to your app, it will help a lot in the long run. Because obviously right now your question can only be answered by someone who had this exact problem, as there is very little extra context you have available (what @TheToad said).
Aug
8
comment Awkward DatabaseLink JDBC Error
As an alternative to debugging, you can add logging (which is a good thing to do in general), to your application code, as well as an ability to execute the code in specific dynamic environments (like environments which would, for example, intercept all messages and log the associated execution stack and / or other information. On this site, there were many examples of how to construct such environments). You can then update your client's code, and get the log back for analysis.
Aug
8
awarded  Enlightened
Aug
8
awarded  Nice Answer