38,307 reputation
3105197
bio website mathprogramming-intro.org
location St. Petersburg, Russia
age 36
visits member for 1 year, 4 months
seen 11 mins ago
stats profile views 3,116

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


56m
awarded  Good Answer
2h
comment Why changing list's head takes time?
@YvesKlett All right, I followed your suggestion.
2h
answered Why changing list's head takes time?
5h
comment Problem with Compile Function
@SjoerdC.deVries Thanks :-). Re: deserved more - I don't disagree :). It just so happenned to have been placed here, but I still like this piece of code.
5h
comment rule-based implementation of an algorithm
@swish ReplacePart won't help, since it copies the entire list even when only one or a few points are modified. Besides, it does not delete points, so Delete will likely be more appropriate (but will have the same problem).
5h
revised rule-based implementation of an algorithm
edited tags
6h
answered rule-based implementation of an algorithm
8h
comment Why changing list's head takes time?
Because HoldComplete unpacks, when Apply is used (or, rather, Apply unpacks).
18h
awarded  Good Answer
1d
comment How to apply multiple/complicated requirements for a pattern in a function input
The last line in your post will work - you just need extra parentheses: myfunction[W_?(MatrixQ[#,NumericQ]&)]. See this question for an explanation. If this was the main difficulty you had here, I'd consider this question a duplicate.
1d
comment How can I set multiple values to local variables in a Module?
In my answer to a similar question about With on SO, I posted a macro which can do this. You can just replace With with Module there, if that kind of solution fits you.
1d
awarded  Enlightened
1d
awarded  Nice Answer
2d
revised Having used Mathematica as a “gateway” language, where to from here?
Added mentions of Groovy and JRuby
2d
comment Having used Mathematica as a “gateway” language, where to from here?
@GaryS.Weaver Thanks. Re: add - agree on JRuby ad Groovy, while Java is on one hand sort of obvious (JLink), on the other hand, I would not recommend it unless necessary, given all the modern alternatives. I used to code in Java for a living, but that was out of necessity rather than voluntary for those Java projects I worked on. I still use it when it is a good tool for a job, but I already know it, while this was a question of which new language to learn. One can really learn OO when working with huge Java projects (I did), but one can probably do just as well with Scala these days.
2d
comment Having used Mathematica as a “gateway” language, where to from here?
@Stefan Re:"hub" - yes, it won't be very easy, but I think it's quite possible, and also I feel that this direction has a huge potential. Generally, we seem to live in a very eclectic time, where a lot of knowledge and resources have been accumulated in narrow (sub)fields, while few attempts were made so far towards the synthesis. Since the common denominator must be a broad and permissive medium, imposing least possible contraints (in the first place, on thinking / expressing ourselves), I view Mathematica as a viable candidate for such an integration medium for programming.
2d
awarded  Nice Answer
2d
comment Having used Mathematica as a “gateway” language, where to from here?
@Jens I have not used Python for anything serious, so can't comment on that, but I have no problem to believe that it is great as a technology integrator (I also know that lots of people are using it in this capacity). The reason I think that Mathematica still has huge potential here is that I think it is important what thinking mode does the integrating medium impose on the developer. This mode will naturally be limited to what that language allows (again, in terms of thinking process). I think Mathematica allows very powerful generic thinking process which would be hard to achieve otherwise.
2d
comment Having used Mathematica as a “gateway” language, where to from here?
@Jens Re: what things - more efficient implementations of some algorithms than Mathematica easily allows. Adding more functionality via reusing other languages in areas where Mathematica's own functionality is currently missing. Constructing applications where Mathematica is used a a back-end (perhaps one of ), in the larger infrastructure. Borrowing powerful programming techniques from other languages and porting them to Mathematica. I could go on with the list. My point is, Mathematica's role and potential as a technology integrator I view currently as just as important, as its core role.
2d
revised Having used Mathematica as a “gateway” language, where to from here?
deleted 7 characters in body