Julia by Example
scolvin.com
scolvin.com
Oh, and one more tip for OSX users wanting to try out Julia. You might want to just use the app bundle provided on the Julia homepage rather than compiling from the homebrew tap. I spent close to an hour waiting for all the dependencies to compile before giving up when I realized I don't want to be doing this every time it's updated.
I hope we'll see more advanced tutorials appear for Julia soon. I'm quite comfortable with using C++ now for all my scientific computing code, but it really isn't "nice" to work with. It would be nice if there was something like SciPy [2] for Julia, to get researchers going quickly.
This tutorial looks promising, building knowledge carefully but not too much "hand holding", like it's for programmers experienced in other languages. Got part of the way though it so far, obviously not a "one-shot" kind of exercise.
My only complaint is the same one I make with many other tutorials of this kind. I find it very annoying when some feature or function is used in an example, but the function comes "out of the blue", not defined or explained, as though the reader is supposed to magically divine its meaning or definition.
In this case, everything goes along swimmingly until encountering the function/method "repr(a)" in "Arrays" examples. I dutifully spend several minutes tracking it down, and what do you know, basically the same as (->string ...) in Scheme (i.e., object->string representation).
I'm not giving up on Julia. I'll carry on from that point when I return to the site. But really, IMO every newly introduced term/function/feature should be defined so that the example can actually be completely understood.
Otherwise there's a substantial risk of losing readers who will not so likely be motivated to keep trying to figure it out.
</end of minor rant mode>
help?> repr
Base.repr(x)
Create a string from any value using the "showall" function.However as language geek, I do follow its development.
It is quite interesting to see another dynamic language in the same footsteps of Lisp dialects and Dylan, where performance, ability to compile to native code and simple FFI are considered important features to be part of the main implementation.
Really looking for Julia becomes widely used.
People from my age remember programming languages where you index from one, can select the base index or use enumerations as indexes.
Tooling, performance and libraries are much more important than base indexes.
Then again, I favored those C alternatives back when C wasn't an option at all. So I am biased.
But can't you do a[begin] to reach the first item in a julia array? That should really abstract it away no?