Saltar al contenido ForoHackers

Julia: start here

Julia
#3085 · · Citar · Denunciar

Julia is a dynamic language for scientific and numerical computing that compiles to fast machine code. It aims to remove the split between the prototyping language and the fast one: you write readable, high-level code and it runs at speeds close to C. Its design centres on multiple dispatch and a strong numerical library.

Key concepts

  • Just-in-time compilation: functions are compiled to machine code on first call for the types they receive.
  • Multiple dispatch: the method that runs is chosen from the types of all arguments, the central organising idea.
  • Type stability: code whose result type depends only on input types is what the compiler can make fast.
  • Arrays and broadcasting: built-in n-dimensional arrays and dotted syntax that applies functions elementwise.
  • Composability: packages written independently work together through shared types and dispatch.
  • Metaprogramming: macros and code that generates code.

Vocabulary

  • Method: one specialisation of a function for specific argument types.
  • Broadcast: applying a function across arrays with the dot syntax.
  • Package environment: a project-specific set of dependencies recorded in files.
  • Latency on first call: the compile delay the first time a function runs.

What to study, in order

  1. Basic syntax, arrays, functions and the REPL, writing small numerical scripts.
  2. Types, structs and multiple dispatch; define your own type with arithmetic methods.
  3. Performance basics: type stability, avoiding global variables, and benchmarking.
  4. Package environments and plotting or data libraries for your field.
  5. Solve a numerical problem you know, such as a differential equation, and compare with another language.
  6. Read the manual's section on performance tips.

Related tags

#numerical-analysis #data-science #computational-science #hpc

No has iniciado sesión, así que esto se publica como anónimo: no se guarda con ello ninguna cuenta, nombre ni dirección, y no puede llevar enlaces ni imágenes. Inicia sesión o únete para publicar con tu nombre. Los registros de nuestro servidor web guardan la dirección y la hora de cada petición hasta 14 días; para que la tuya no quede en ellos, usa Tor. Para escribir al equipo de forma confidencial, usa el buzón. Firmar como fuente habitual (una clave guardada solo en este navegador)

Enviar tarda unos segundos aquí: tu navegador resuelve antes una prueba de trabajo contra el spam.

Responder