JuliaKurs23/index.qmd

123 lines
4.1 KiB
Plaintext

# Was ist Julia? {.unnumbered}
Julia ist eine noch recht junge für *scientific computing* konzipierte moderne Programmiersprache.
Ein kleines Codebeispiel:
```{julia}
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 {.unnumbered}
- 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](https://julialang.org/blog/2012/02/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>.
:::{.content-hidden unless-format="xxx"}
Kurzfassung:
> We want a language that is
>
> - open source
> - with the speed of C
> - obvious, familiar mathematical notation like Matlab
> - 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
> - dirt simple to learn, yet keeps the most serious hackers happy
Formale Syntax
:
- Algorithmisches Denken
- Gefühl für die Effizienz und Komplezität von Algorithmen
- Besonderheiten der Computerarithmetik, insbes. Gleitkommazahlen
- „Ökosystem“ der Sprache:
- die Kunst des Debugging.
:::
## Warum Julia? {.unnumbered}
:::{.callout-tip .titlenormal icon=false}
## aus [The fast track to Julia](https://cheatsheet.juliadocs.org/)
"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](https://github.com/JuliaLang/julia)
- 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*
: - riesiges *ecosystem* an einfach installierbaren Paketen, z.B.
- [Mathematische Optimierung](https://jump.dev/)
- [Machine Learning](https://fluxml.ai/)
- [Data Visualization](https://docs.makie.org/stable/)
- [Differentialgleichungen](https://docs.sciml.ai/DiffEqDocs/stable/)
- [Mathematische Modellierung](https://sciml.ai/)
## Eine kleine Auswahl an Online-Material zu Julia {.unnumbered}
- [Dokumentation](https://docs.julialang.org/en/v1/) - die offizielle Dokumentation
- [Cheat Sheet](https://juliadocs.github.io/Julia-Cheat-Sheet/) - "a quick & dirty overview"
- [Introducing Julia](https://en.wikibooks.org/wiki/Introducing_Julia)-- ein WikiBook
- [The Julia Express](http://bogumilkaminski.pl/files/julia_express.pdf) - Kurzfassung, Julia auf 16 Seiten
- [Think Julia](https://benlauwens.github.io/ThinkJulia.jl/latest/book.html) - Einführung in die Programmierung mit Julia als Sprache
- Das [Julia Forum](https://discourse.julialang.org/)
- Was fürs Auge: [Beispiele zum Julia-Grafikpaket `Makie`](https://beautiful.makie.org/)