53,207 reputation
5147242
bio website mathprogramming-intro.org
location St. Petersburg, Russia
age 37
visits member for 2 years, 3 months
seen 32 mins ago

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


Jun
21
comment Looking for “Longest Common Substring” solution
@Mr.Wizard Yes, I made a misprint. No idea why. Perhaps I was thinking of Publicist badges earned by R.M. Thanks in any case :)
Jun
21
comment GatherBy Option to group results?
gatherBy[expr_,f_,postf_]:=Map[postf,GatherBy[expr,f]], for a start. You seem to want some postprocessing.
Jun
21
comment GatherBy Option to group results?
It depends on what you do. I don't hesitate to introduce my own functions and use them, and so do many others. If you design some functionality for others, then you may have to think about this. But in any case, overloading built-in functions is a bad idea, mainly because you never know what you change. It has been discussed and proven many times that tiny convenience benefits of doing this are likely to cause serious trouble later. The only technique I know which can allow you to safely change the syntax is preprocessors/code generation, but in Mathematica there is no real compile stage.
Jun
21
comment GatherBy Option to group results?
It's not clear to me why you insist on adding syntax to existing built-in functions. Instead, you can write your own gatherBy, and introduce any syntax you like. The essential part of your question can be answered similarly to what I did for your previous one, but I guess this type of solution is not what you are after.
Jun
21
comment Looking for “Longest Common Substring” solution
@Mr.Wizard I suspected this would happen, but wasn't sure. Your vote gave me more than Good Answer - you gave me a Publicist badge :). So, thanks again.
Jun
21
awarded  Populist
Jun
21
comment Happy 2K prime question
No matter how it is written, it is a cool method. +1.
Jun
21
awarded  Good Answer
Jun
21
comment Looking for “Longest Common Substring” solution
@Mr.Wizard Thanks :)
Jun
21
comment Happy 2K prime question
@belisarius Oh, I see. I try to not touch the bundled one, it is not a standard JRE (e.g. it includes a compiler, which is normally not the case for JRE, you need JDK for that).
Jun
21
comment Happy 2K prime question
@belisarius No problem :) I will edit the scoring section when I get some time. B.t.w., what platform are you in? The reloader should work out of the box, because it uses the JVM which comes bundled with Mathematica. So if it doesn't, I want to know about it, so I can see what the problem is, and fix it.
Jun
21
comment Happy 2K prime question
+1, very nice observation.
Jun
21
comment Using Boost with CreateLibrary
Regarding getting an effect similar to what we have in Java (I mean the suability aspect): with Java, it is so easy because it has a Reflection API, and a very high-level JLink interface (which generates Mathematica boilerplate code behind the scenes), built on top of that. With C / LibraryLink, I expect that this would be harder - we need similar layers of automation.
Jun
21
comment Safely nesting RuleDelayed
Sure, no problem :)
Jun
21
awarded  Enlightened
Jun
21
awarded  Nice Answer
Jun
21
comment Looking for “Longest Common Substring” solution
@Ajasja Yes, I have the C loader in my plans as well :). It is a little harder to make it easy to use, because JLink already generates boilerplate Mathematica code for you - this is why it is so easy to use it, because Java is a higher-level language, and because when we load as a shared library, crashes in our code would crash the kernel, but all these problems are solvable.
Jun
21
revised Happy 2K prime question
Added Java solution
Jun
21
comment Happy 2K prime question
This is very cool!+1
Jun
20
comment Happy 2K prime question
@belisarius Thanks, and happy 2K for you too! And, I am not done with this yet :)