Contents

Install Julia

Julia, a general-purpose programming language focused on ease of syntax, composibility, and high performance.

Install Julia

Windows: download and run the installer in the official website. MacOS/Linux: install Julia using jill bash script:

1
bash -ci "$(curl -fsSL https://raw.githubusercontent.com/abelsiqueira/jill/master/jill.sh)"

Or using its python fork jill.py installer.

1
2
3
4
5
6
# pip is required

[[ -x $(command -v pip) ]] && pip install -U --user jill
[[ -x $(command -v pip3) ]] && pip3 install -U --user jill

~/.local/bin/jill install --confirm

Configurations

  • ~/.profile: for some environment variables before Julia startup
  • ~/.julia/config/startup.jl: environment for regular Julia startup
  • ~.julia/config/startup_ijulia.jl: environment for IJulia Jupyter kernel startup

Auto-activate Project.toml

In ~/.profile, add the following line

1
export JULIA_PROJECT=@.

Use all CPU cores by default

In ~/.profile, add the following line

1
export JULIA_NUM_THREADS=$(nproc)

Or in ~/.bashrc, add the following line

1
alias julia="julia --threads auto"

Custom Miniconda location

Add the following line to ~/.julia/config/startup.jl,

1
ENV["CONDA_JL_HOME"] = "/path/to/conda/install"

or add the following line to ~/.profile:

1
export CONDA_JL_HOME=/path/to/conda/install

Autoload Revise.jl

Add the following lines to ~/.julia/config/startup.jl:

1
2
3
4
5
6
try
    using Revise
catch e
    @warn "Error initializing Revise" exception=(e, catch_backtrace())
end

Add the following lines to ~.julia/config/startup_ijulia.jl:

1
2
3
4
5
try
    @eval using Revise
catch e
    @warn "Error initializing Revise" exception=(e, catch_backtrace())
end