Is anyone else here learning Julia, or thinking of learning it? If so, I’ll plan to post some learning resources here and maybe some notes as well – perhaps cool/helpful features and also things to be wary of. That last category especially applies to me as I’m trying to move from mostly using Python to mostly using Julia, and I’ve already noticed a few interesting gotchas.
To start things off …
This is the best general introduction to Julia that I’ve found so far:
It’s fairly detailed and is kept up-to-date.
The best supplement to the above that I’ve found so far is the Julia documentation itself:
Bear in mind I’ve only explored online materials. Because Julia is still fairly young and still changing so much, print books don’t seem like a good idea as yet. At least, the ones I’ve browsed were already outdated.
(1) Julia’s REPL does quadruple duty.
? switches to help mode, where you can enter any term to see the documentation on it or get a list of all the functions that have a particular string in their description.
] switches to the package manager, where you can add, update, and remove packages.
; switches you to shell mode, where you can use usual shell commands like
cd, etc. (This is very handy for checking/setting your working directory, among other things.)
Speaking of shell features, the default mode already offers tab completion and you can move back and forth through your command history with the up/down arrows.
(2) Julia has a lot of functions and features available for manipulating arrays.
One especially handy feature is that any scalar function, even user defined ones, can be applied element-wise to a vector using Julia’s dot syntax.
For a function, the dot comes after the function name. For example, if
f is a scalar function,
Some operations, such as multiplication, will broadcast to the elements of an array automatically, even without the dot syntax. But including the dot doesn’t hurt in these cases.