An introductory 101 series to get to know the power of Julialang.
Author: Stephan Sahm, Julia User Group Munich.
Outline:
- 01 first notebook shows how to use PyJulia
- 02 second notebook is about JuliaCall
- 03 using Python from Julia with both PyCall and PythonCall
- special extra - Julia vs C++
Why was Julia created? Definitely read this now impressively old post by Julia founders by Jeff Bezanson, Stefan Karpinski, Viral B. Shah, and Alan Edelman https://julialang.org/blog/2012/02/why-we-created-julia/.
Here my favourite passage
We want the speed of C with the dynamism of Ruby. We want a language that's homoiconic, with true macros like Lisp, but with obvious, familiar mathematical notation like Matlab. We want something as usable for general programming as Python, as easy for statistics as R, as natural for string processing as Perl, as powerful for linear algebra as Matlab, as good at gluing programs together as the shell. Something that is dirt simple to learn, yet keeps the most serious hackers happy. We want it interactive and we want it compiled.
Why this needs to be an extra language? Why cannot Python be made that fast for instance? Checkout the official compact answer to this in the julia manual F&Q https://docs.julialang.org/en/v1/manual/faq/#Why-don't-you-compile-Matlab/Python/R/%E2%80%A6-code-to-Julia?-1
Here my favourite passage
Julia's advantage is that good performance is not limited to a small subset of “built-in” types and operations, and one can write high-level type-generic code that works on arbitrary user-defined types while remaining fast and memory-efficient. Types in languages like Python simply don't provide enough information to the compiler for similar capabilities, so as soon as you used those languages as a Julia front-end you would be stuck.
If does not work for you, you can install the package locally.
This process is identical to how mybinder.org is actually doing it. Hence you will get the very same environment.
-
Install docker
-
Install repo2docker by running
python3 -m pip install --user jupyter-repo2docker
If you do not have python, consider installing it via miniforge.
-
Execute repo2docker on this repository. It will take several 10 minutes to build everything.
jupyter-repo2docker https://github.com/jolin-io/fall-in-love-with-julia-13
Usually, a browser is opened automatically for you, but if not, an url is also printed at the very end of the command output. Copy that one to your browser and you are ready to go.