1 Julia Basics
1.1 Why Julia?
Slow language is not suitable for this task — learning neural networks embedded in differential equations.
In short - Solving two language problems: C++
is fast but difficult; Python
is easy but slow. Julia
is fast and easy. - Language for Mathematics: writing Julia
is just like writing mathematics. - Similar syntax as Matlab
; Simple as Python
; Fast as C++
.
More advantages and disadvantages can be seen in Why Julia? · Julia for Optimization and Learning
1.2 Installation: Julia+VSCode
Julia
+ VScode
1.2.1 Recommended
We recommend to install Julia via juliaup
. We are using the latest, stable version of Julia (which at the time of this writing is v1.10
). Once you have installed juliaup
you can get any Julia version you want via:
juliaup add $JULIA_VERSION
# or more concretely:
juliaup add 1.10
# but please, just use the latest, stable version
Now you should be able to start Julia and be greeted with the following:
$ julia
_
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.10.0 (2023-12-25)
_/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |
julia>
1.2.2 Alternatives
Julia can also be installed from the official website download page. The appropriate version is the 64-bits version for the Windows operating system in most cases. In case of difficulties, see platform-specific instructions.
1.2.3 Editor
There is no one way to install/develop and run Julia, which may be strange for users coming from MATLAB, but for users of general purpose languages such as Python, C++ this is quite common. Most of the Julia programmers to date are using
- Visual Studio Code,
- and the corresponding Julia extension.
This setup is described in a comprehensive step-by-step guide in Julia for Optimization & Learning.
For other editors, we refer to Julia IDE
1.3 Packages and Environment Management
Julia
manages packages and environments like Rust
. Very convenient! Strongly recommendation: go through this document Working with Environment · Pkg.jl quickly.
To set up the same environment as me, you can follow the guides in Song921012/Julia_Tutorial_on_AI4MathBiology
1.4 Other Julia Courses and Materials
- Official documentation
- Slack channel: Community
- Important:Cheatsheet for differences between Julia and Matlab and Python
- Cheatsheet of basic functions
- Cheatsheet of advanced functions
- Think Julia: How to Think Like a Computer Scientist
- From Zero to Julia!
- Recommended: Julia for Optimization and Learning
- Scientific Programming in Julia
- Julia Data Science
- Statistics with Julia: Fundamentals for Data Science, Machine Learning and Artificial Intelligence