In order to use Julia we need to install it first. So, now is the time to go to julialang.org, click ‘Download’ and choose the version suitable for your machine’s OS.
To check the installation open the Terminal and type:
julia --version
When I wrote those words the first time I used Julia version ~1.8, currently I’m using:
VERSION
1.10.6
running on a Gnu/Linux operating system. Keep that in mind, cause sometimes it may make a difference, e.g. reading the contents of a file (file path) may be OS specific.
At the bottom of the Julia’s web page you will find ‘Editors and IDEs’ section presenting the most popular editors that will enable you to effectively write and execute pieces of Julia’s code.
For starters I would go with Visual Studio Code a popular, user friendly code editor for Julia. In the link above you will find the installation and configuration instructions for the editor.
From now on you’ll be able to use it interactively (to run Julia code from this book).
All You need to do is to create a file, e.g. chapter03.jl
(or open that file from the code_snippets), type the code presented in this chapter and run it by marking the code and pressing Ctrl+Enter
.