Interested in Julia but don't know where to start (aside from Julia's Wikipedia entry [1] and official website [2])? This beginner-friendly repo might be of help!
Some programmers prefer getting down to the nitty gritty of Julia by looking at a substantial Julia program. That's a legit ask! Here I present you a Julia project that, despite its size measured in lines of code, exemplifies most features that an average programmer might need to get acclimated to Julia routines right away. It's a tool to preprocess electroencephalogram (EEG) data (i.e., brainwaves) by denoising, detecting bad channels, and fixing them. Find out more and try it via this repo.
If you prefer being walked through some Julia basics, take a look at these tutorials. You can also run them locally if you have already installed Jupyter Notebook. I use VSCode to run and read Jupyter Notebooks, but most people are more comfortable with tools by the official distributor, namely Project Jupyter. If you have problems running the notebook, you can run the .jl Julia files instead.
Title | Jupyter Notebook | Julia file |
---|---|---|
1. Names and types in Julia | Tut1_NamesType.ipynb | tutorial_1.jl |
2. Selection control structures in Julia | Tut2_SelectionControl.ipynb | tutorial_2.jl |
3. Loops and subroutines in Julia | Tut3_LoopsSubroutines.ipynb | tutorial_3.jl |
4. Structs and (more on) types | Tut4_StructsTypes.ipynb | tutorial_4.jl |
Julia was developed by Jeff Bezanson, Stefan Karpinski, Viral B. Shah, and Alan Edelman with the goal of making a language, I guess, has the best features of popular languages like C, Ruby, Lisp, Matlab, Python, R and Perl—talking about free lunch for all! No, seriously, it's written in the first blog posted on Julia's official site titled "Why We Created Julia" [3]. But Julia is not meant to be a universal programming language: it was built with "scientific computing, machine learning, data mining, arge-scale linear algebra, [and] distributed and parallel computing" in mind [3].
Since its development in 2009 [4], Julia has been used for multiple purposes, the most popular of which are data science, visualization, machine learning, and scientific computing. Below are some of the most popular Jula projects on GitHub:
- Pluto reactive notebooks as an alternative to Jupyter notebooks (fonsp/Pluto.jl)
- DifferentialEquations.jl, a package for numerically solving differential equations (SciML/DifferentialEquations.jl)
- Gadfly plotting and data visualization system (GiovineItalia/Gadfly.jl)
- MLJ toolbox for machine learning (alan-turing-institute/MLJ.jl)
- JuliaDB for parallel analytical database (JuliaData/JuliaDB.jl)
The official Julia website has instructions for downloading and installing Julia on the platform you're using—take a look here. But if you're using Linux, consider installing Julia through your distro's package manager (it will save you a few steps); just make sure the package you're installing is from the official repository.
If you're more of a visual learner, here are some usefull YouTube videos:
- (Windows) "How to Install Julia language and Set up Path Environment Variable in Windows 10", Example Program
- (macOS) "How to install Julia and Jupyter notebooks", The Julia Programming Language
- (Linux) "SDJ B1.0 | Appendix - Download and Install Julia in Linux(Debian)", MrDataPsycho
The official website suggests a few editors and IDEs, but the Julia community recommends Microsoft's VS Code because it has a lot of cool packages for all sorts of workflows in Julia [5]. Instructions to install VS Code and set up Julia on VS Code here.
Did you know that you could run Julia in the Jupyter interactive environment (which is mostly used for workflows in data science and machine learning)? or that you could run IJulia notebooks in VS Code? Learn more and install the IJulia kernel here if you're interested.
When you're done installing Julia and setting up your programming environment, download any .jl in this repository and open it using your IDE. Then click run (or whatever buttons that compiles and runs the script; in VS Code, it's the little play button at the top right corner of the editor).
If you want to try creating a new file and runs with your IDE, create a file named helloWorld.jl
, open it and copy these lines into the editor:
"""
Doc-string, which is similar to Python. Your compiler will ignore this part.
"""
function helloworld()
# comment, which is similar to Python. Your compiler will ignore this comment.
print("Hello world!")
end
# run script
helloworld()
And if you're feeling adventurous and wanting to run a Julia command in the terminal, type julia
, click enter, and type in, e.g., print("Hello world!")
.
Want to learn more about Julia beyond this repo? The official Julia website curated a pretty comprehensive list of learning resources, from books to MOOCs, and from data science to high-performance computing. Take a look here!
[1] "Julia (programming language) - Wikipedia", En.wikipedia.org, 2022. [Online]. Available: https://en.wikipedia.org/wiki/Julia_(programming_language). [Accessed: 27- Feb- 2022].
[2] e. Jeff Bezanson, "The Julia Programming Language", Julialang.org, 2022. [Online]. Available: https://julialang.org. [Accessed: 27- Feb- 2022].
[3] e. Jeff Bezanson, "Why We Created Julia", Julialang.org, 2022. [Online]. Available: https://julialang.org/blog/2012/02/why-we-created-julia/. [Accessed: 27- Feb- 2022].
[4] S. D'Cunha, "How A New Programming Language Created By Four Scientists Now Used By The World's Biggest Companies", Forbes, 2022. [Online]. Available: https://www.forbes.com/sites/suparnadutt/2017/09/20/this-startup-created-a-new-programming-language-now-used-by-the-worlds-biggest-companies/?sh=39661ad77de2. [Accessed: 27- Feb- 2022].
[5] "IDE for Julia", JuliaLang, 2022. [Online]. Available: https://discourse.julialang.org/t/ide-for-julia/61931/6. [Accessed: 27- Feb- 2022].