Getting started with Julia


#1

Python and R are pretty widely known in data science and statistics circles. Lesser known is Julia, but it is picking up because of efficiency gains.

I had some trouble setting up a Julia development environment because the official steps, while accurate, confused me. So here goes, a step by step guide to get up and running with Julia, using Atom as your IDE, on your fancy lean and mean metal af Arch Labs box.

1. Install Julia. There are packages available for Arch, so you can just use pacli, the package manager of your choice, or fire up a terminal and use this command:

sudo pacman -S julia

2. Run Julia in a console, and install a few packages. This is where things are not so clear in the Getting Juno instructions. I didn’t grok this somehow, but it’s crucial to fire up the correct console and run the correct cli for the commands you want to use. The packages you need to install are Atom, and another Julia script.

You should also be able to install them from a console after you run Julia like this. I’m including the command to get Julia up and running. Again, this is from a Julia cli:

Julia
Pkg.clone(“Atom”)
Pkg.clone(“https://github.com/JunoLab/Juno.jl”)

How you install them is up to you, since there are a few package managers that can do the job for you. Some of them are available straight from Julia, as above. I also used this general method for installing atom packages from git repositories, from a normal console, because for some reason I already had npm installed. Again, this is a normal terminal (Termite, in my case):

cd ~/.atom/packages
git clone https://github.com/url_to_your_package
cd your_package
npm install

Another tip here: When you type Julia in the console, you should see endearing ASCII art as a welcome screen. That’s how you know Julia is installed and ready to serve you. If you don’t see that, well, it’s back to the drawing board.

If you install Atom first and then install the Juno package from Atom, it probably will not work. This is because this package installation step is missing. You’ll have a nightmare on your hands trying to find a Julia console, because it doesn’t work from Atom, even if you already have Julia installed. If this happens to you, you may have to uninstall Atom and start with setting up Julia first.

3. Install Atom. There are also Atom packages available, so you can use the package manager of your choice or type this in the terminal:

sudo pacman -S atom

4. Install the Juno packages for Atom. From here on, you can follow the rest of the instructions in the Getting Juno instructions. That would be these steps:

In Atom, go to Settings (Ctrl , or Cmd , on OS X) and go to the “Install” panel.
Type uber-juno into the search box and hit enter. Click the install button on the package of the same name.

Now you can fire up Atom and it shouldn’t give you problems when you type enter in the Julia console to start Julia. Hope this helps someone! Skål!


#2

There you go, Robert’s my mother’s brother.


#3

Thank you…nicely done! I think the post is better suited for Tutorial & Tips category.


#4

Great tuto in there.


#5

I found a great resource on learning programming with Julia. This site is primarily about quantitative economics, but it starts off with Python and Julia tutorials. The programming tutorials start from scratch, from setting up your environment to basic programming principles, so you can just do those if you are not interested in advanced quantitative economics modelling.


#6

Thanks, I moved it, I think.