Code Self Study Forum

Julia Resources and Notes

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 …

Julia Resources

This is the best general introduction to Julia that I’ve found so far:
https://en.wikibooks.org/wiki/Introducing_Julia
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:
https://docs.julialang.org/en/

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.

Cool Features

(1) Julia’s REPL does quadruple duty.

Entering a ? 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.

Entering a ] switches to the package manager, where you can add, update, and remove packages.

Entering a ; switches you to shell mode, where you can use usual shell commands like ls, pwd, 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 example, [1,2,3].^2 yeilds [1,4,9].

For a function, the dot comes after the function name. For example, if f is a scalar function, f.([1,2,3]) yields [f(1),f(2),f(3)].

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.

2 Likes

I saw a link to this site yesterday:
https://www.juliaacademy.com/

1 Like

Although this site doesn’t seem to make it clear, I believe it is being put together by Julia Computing, the organization started by the creators of Julia.

1 Like