Julia für Numerik

Einführung in die wissenschaftliche Programmierung

Autor

Meik Hellmund

Updated

22. April 2024

Was ist Julia?

Julia ist eine noch recht junge für scientific computing konzipierte moderne Programmiersprache.

Ein kleines Codebeispiel:

using CairoMakie
a = [3, 7, 5, 3]
b = [1, 3, 7, 4]
δ = π/2
t = LinRange(-π, π, 300)
f = Figure(size=(800, 180))
for i in 1:4
    x = sin.( a[i] .* t .+ δ )
    y = sin.( b[i] .* t )
    lines(f[1, i], x, y, axis=(; aspect = 1))
end
f

Geschichte

  • 2009 Beginn der Entwicklung am Computer Science and Artificial Intelligence Laboratory des MIT
  • 2012 erste release v0.1
  • 2018 Version v1.0
  • aktuell: v1.10.2 vom 1. März 2024

Zum ersten release 2012 haben die Schöpfer von Julia ihre Ziele und Motivation in dem Blogbeitrag Why we created Julia interessant zusammengefasst.

Für ein Bild von Stefan Karpinski, Viral Shah, Jeff Bezanson und Alan Edelman bitte hier klicken: https://news.mit.edu/2018/julia-language-co-creators-win-james-wilkinson-prize-numerical-software-1226.

Warum Julia?

“Julia is an open-source, multi-platform, high-level, high-performance programming language for technical computing.

Julia has an LLVM-based JIT compiler that allows it to match the performance of languages such as C and FORTRAN without the hassle of low-level code. Because the code is compiled on the fly you can run (bits of) code in a shell or REPL , which is part of the recommended workflow .

Julia is dynamically typed, provides multiple dispatch, and is designed for parallelism and distributed computation.

Julia has a built-in package manager.”

open source
  • offene Entwicklung auf GitHub
  • Implementierungen für alle gängigen Betriebssysteme
high-performance programming language for technical computing
  • viele Funktionen für scientific computing eingebaut,
  • (bewusste) Ähnlichkeit zu Python, R und Matlab,
  • komplexe Berechnungen in wenigen Zeilen
  • einfaches Interface zu anderen Sprachen wie C oder Python
a JIT compiler
  • interaktives Arbeiten möglich: read-eval-print loop (REPL) mit
  • just-in-time (JIT) Compilation
  • dadurch Laufzeiten vergleichbar mit statischen Sprachen wie C/C++, Fortran oder Rust
a built-in package manager

Eine kleine Auswahl an Online-Material zu Julia