Python

Introduction to Julia

Julia is a high-level, high-performance dynamic language for technical computing. Julia’s programming language is a flexible dynamic language, appropriate for scientific and numerical computing, with performance comparable to traditional statically-typed languages.

While it is a general-purpose language and can be used to write any application, many of its features are well suited for numerical analysis and computational science. It uses a just-in-time (JIT) compiler that is referred to as “just-ahead-of-time” (JAOT) in the Julia community, as Julia compiles all code (by default) to machine code before running it.

Advantages of Julia:

  • Free and open source (MIT licensed)
  • User-defined types are as fast and compact as built-ins
  • No need to vectorize code for performance; devectorized code is fast
  • Designed for parallelism and distributed computation
  • Lightweight “green” threading (coroutines)
  • Unobtrusive yet powerful type system
  • Elegant and extensible conversions and promotions for numeric and other types
  • Efficient support for Unicode, including but not limited to UTF-8
  • Call C functions directly (no wrappers or special APIs needed)
  • Powerful shell-like capabilities for managing other processes
  • Lisp-like macros and other metaprogramming facilities

Julia provides asynchronous I/O, metaprogramming, debugging, logging, profiling, package manager…etc. One can build entire Applications and Microservices in Julia.

Editors and IDE

  • VS code
  • Emacs
  • Notepad++
  • Jupyter
  • Pluto.jl
  • Vim

Essential tools

  • Debugger.jl
  • Profiler
  • Revise
  • GPUs

One can download the software from https://julialang.org/downloads/ or can use online editor https://julialang.org/learning/code-examples/

Sample Code Snippet

function display(a)
    z = 0
    for i=1:50
        z = z^2 + a
    end
    return z
end

for y=1.0:-0.05:-1.0
    for x=-2.0:0.0315:0.5
        abs(display(complex(x, y))) < 2 ? print("*") : print(" ")
    end
    println()
end

Loading

One thought on “Introduction to Julia

Comments are closed.

Translate »