It is worth pointing out that this blog post is old, from January. Julia 0.5 adds a phenomenal new feature, the dot syntax [1], that automatically fuses vectorized expressions. I believe that feature was added quite a while after this blog post was written.
Currently the dot syntax works for all functions, except for operators like .+, but in julia 0.6 it will work across the board. At that point, an expression like
A.*B.*C
will automatically be translated into the de-vectorized loop version that the author identifies as the fasted way to implement something like that, without the need for any macros or other special tricks.
At the highest level, Julia operates on all of the elements of a matrix for each operation, is 1-based, assigns by reference, is case-sensitive, has the range operator (:) like python, but doesn't allow negative indices to read from the end.
Now for some get off my lawn:
In terms of learnability from easiest to hardest, I would rank them:
Python
MATLAB
Julia
R
I'm still hoping for a pure functional language that operates on matrices and doesn't introduce a lot of non-imperative operators and terminology. For example closures with immutable data gets us a fair part of the way to Clojure, without the learning curve. For the most part I've given up on ever learning Erlang, Haskell, Scala, etc even though I know Scheme. Maybe F#, I dunno. I feel that Rust is one level of abstraction beneath my pain threshold. Swift is too micromanagy when it comes to nulls. Javascript has abandoned its scripting roots to regress back towards C++ and its new syntactic sugar isn't helping things. I really want to like Go but worry it will be superseded by a truly concurrent language running on video cards with automagic error handling. I've given up on CUDA and OpenCL due to their roots in OpenGL, because their metaphors are too cumbersome compared to MATLAB. C++ and PHP are still my most loved and hated languages because they do everything wrong but excel at things like performance and laziness. In the end, these are my primary goals.
Preferring php to Haskell gives you exactly the wrong kind of laziness. :)
Jokes aside, Python seems to strike the best balance between being "scripty" for semi-interactive work and being well-engineered for larger (though not excessively large) and more complex code.
I was curious about that as well. I've known folks who were genuinely discouraged and exhausted from working with matlab, and are now happy toiling in python. I've not converted them to the Julia side yet, but I will!
Julia is definitely harder to learn than python, but it's far and away worth the effort, and its only ever going to get easier. There's merit in having to push your mind a bit when learning a new skill. Struggling has certainly helped me concrete my skillset. I remember my first time reading sicp, and it was very difficult and foreign to me at the time, but after sticking it out I realized what a huge effect it has had on my work, my ability to push myself to learn new things, and how I think about programming problems to an extent.
Julia feels like a modern, less academic scheme in a lot of ways, and I see all these people so much more intelligent than me that are making it into an even stronger language and I just get this sense of pride about it all.
9 comments
[ 2.0 ms ] story [ 37.5 ms ] threadCurrently the dot syntax works for all functions, except for operators like .+, but in julia 0.6 it will work across the board. At that point, an expression like
will automatically be translated into the de-vectorized loop version that the author identifies as the fasted way to implement something like that, without the need for any macros or other special tricks.[1] http://docs.julialang.org/en/latest/manual/functions/#dot-sy...
http://docs.julialang.org/en/release-0.5/manual/noteworthy-d...
At the highest level, Julia operates on all of the elements of a matrix for each operation, is 1-based, assigns by reference, is case-sensitive, has the range operator (:) like python, but doesn't allow negative indices to read from the end.
Now for some get off my lawn:
In terms of learnability from easiest to hardest, I would rank them:
Python
MATLAB
Julia
R
I'm still hoping for a pure functional language that operates on matrices and doesn't introduce a lot of non-imperative operators and terminology. For example closures with immutable data gets us a fair part of the way to Clojure, without the learning curve. For the most part I've given up on ever learning Erlang, Haskell, Scala, etc even though I know Scheme. Maybe F#, I dunno. I feel that Rust is one level of abstraction beneath my pain threshold. Swift is too micromanagy when it comes to nulls. Javascript has abandoned its scripting roots to regress back towards C++ and its new syntactic sugar isn't helping things. I really want to like Go but worry it will be superseded by a truly concurrent language running on video cards with automagic error handling. I've given up on CUDA and OpenCL due to their roots in OpenGL, because their metaphors are too cumbersome compared to MATLAB. C++ and PHP are still my most loved and hated languages because they do everything wrong but excel at things like performance and laziness. In the end, these are my primary goals.
Jokes aside, Python seems to strike the best balance between being "scripty" for semi-interactive work and being well-engineered for larger (though not excessively large) and more complex code.
Julia is definitely harder to learn than python, but it's far and away worth the effort, and its only ever going to get easier. There's merit in having to push your mind a bit when learning a new skill. Struggling has certainly helped me concrete my skillset. I remember my first time reading sicp, and it was very difficult and foreign to me at the time, but after sticking it out I realized what a huge effect it has had on my work, my ability to push myself to learn new things, and how I think about programming problems to an extent.
Julia feels like a modern, less academic scheme in a lot of ways, and I see all these people so much more intelligent than me that are making it into an even stronger language and I just get this sense of pride about it all.
So yeah, matlab sucks.
So is there a reason @devec is not applied by default?