Julia (Programming Language)
Julia (Programming Language)
Julia is a high-level dynamic programming language designed to address the requirements of high-performance
numerical and scientic computing while also being effective for general-purpose programming,[12][13][14][15]
web use[16][17] or as a specication language.[18] Distinctive aspects of Julias design include a type system with
parametric types in a fully dynamic programming language and multiple dispatch as its core programming
paradigm. It allows concurrent, parallel and distributed
computing, and direct calling of C and Fortran libraries without glue code. Julia is garbage-collected,[19]
uses eager evaluation and includes ecient libraries for
oating-point calculations, linear algebra, random number generation, fast Fourier transforms and regular expression matching.
Language features
4 NOTES
hygienic, but also supports deliberate capture when de- faster than Python or R).[29] Development of Julia besired (like for anaphoric macros) using the esc construct. gan in 2009 and an open-source version was publicized
in February 2012.[4][30]
Interaction
The Julia ocial distribution includes an interactive session shell, called Julias REPL, which can be used to experiment and test code quickly.[24] The following frag- 3.1 Current and future platforms
ment represents a sample session on the REPL:[25]
[31]
[32]
julia> p(x) = 2x^2 + 1; f(x, y) = 1 + 2p(x)y julia> While Julia uses JIT (MCJIT from LLVM) Julia
println(Hello world!", " I'm on cloud ", f(0, 4), " as generates native machine code, directly, the rst time a
Julia supports recognizable syntax!") Hello world! I'm function is run (not a bytecode that is run on a VM, as
with e.g. Java/JVM or Java/Dalvik in Android).
on cloud 9 as Julia supports recognizable syntax!
Current support is for 32- and 64-bit (all except for
The REPL gives user access to the system shell and to ancient pre-Pentium 4-era, to optimize for newer) x86
help mode, by pressing ; or ? after the prompt (preceding processors (and with download of executables or source
each command), respectively. The REPL also keeps the code also available for other architectures). Experhistory of commands, even between sessions. For other imental and early support for ARM, AARCH64, and
[33]
Including
examples, see the Julia documentation,[26] which gives POWER (little-endian) is available too.
Raspberry
Pi
1
and
later
(e.g.
requires
at
support
for
code that can be tested inside the Julias interactive sec[34][35]
least
armv6").
tion or saved into a le with a .jl extension and run from
the command line by typing (for example):[27]
Support for GNU Hurd is being worked on.[36]
$ julia <lename>
Julia version 0.6 is planned for 2016 and 1.0 for 2017 and
Julia is also supported by Jupyter, an online interac- some features are discussed for 2+ that is also planned,
[37]
tive notebooks environment (project Jupyter is a multi- e.g. "multiple inheritance for abstract types.
language extension, that evolved, from the IPython
command shell; now includes IJulia). See for other ways
in the next section.
3.2 Julia2C source-to-source compiler
A Julia2C source-to-source compiler from Intel Labs is
available.[38] This source-to-source compiler is a fork of
Julia, that implements the same Julia language syntax,
Julias ccall keyword is used to call C-exported or Fortran which emits C code (for compatibility with more CPUs)
shared library functions individually.
instead of native machine code, for functions or whole
Julia has Unicode 9.0 support, with UTF-8 used for programs. The compiler is also meant to allow analyzing
[39]
source code (and by default for strings) and e.g. option- code at a higher level than C.
ally allowing common math symbols for many operators, Intels ParallelAccelerator.jl can be thought of as a parsuch as for the in operator.
tial Julia to C++ compiler, but the objective is parallel
2.1
Julia has packages supporting markup languages such as speedup (can by 100x over plain Julia, for the older
[40]
and could in cases also speed up serial
HTML, (and also for HTTP), XML, JSON and BSON. 0.4 version,
code manyfold for that version), not compiling the full
language to C++ (its only an implementation detail, that
may be dropped later). It needs not compile all syntax, as
3 Implementation
the rest is handled by Julia.
Julias core is implemented in C and C++ (the LLVM dependency is in C++), its parser in Scheme (femtolisp),
and the LLVM compiler framework is used for justin-time (JIT) generation of 64-bit or 32-bit optimized
machine code (i.e. not for VM[28] ) depending on the platform Julia runs on. With some exceptions (e.g., libuv),
the standard library is implemented in Julia itself. The
most notable aspect of Julias implementation is its speed,
which is often within a factor of two relative to fully optimized C code (and thus often an order of magnitude
4 Notes
[1] Calling newer Python 3 also works[20][21] (and PyPy[22] )
and calling in the other direction, from Python to Julia, is
also supported with pyjulia. Even calling recursively (back
and forth) between these languages is possible, without (or
with) using Polyglot.jl, that supports additional languages
to Python.
References
[5] http://julialang.org/downloads/
[6] http://julialang.org/downloads/oldreleases.html
[7] https://github.com/JuliaLang/julia/releases/tag/v0.5.0
[8] https://julialang.org
[9] Non-GPL Julia?
[10] Introduce USE_GPL_LIBS Makele ag to build Julia
without GPL libraries. Note that this commit does not
remove GPL utilities such as git and busybox that are included in the Julia binary installers on Mac and Windows.
It lets you build from source without any GPL library dependencies.
[11] http://julia.readthedocs.org/en/latest/manual/
introduction/
[12] The Julia Language (ocial website).
[13] Bryant, Avi (15 October 2012). Matlab, R, and Julia:
Languages for data analysis. O'Reilly Strata.
[14] Krill, Paul (18 April 2012). New Julia language seeks to
be the C for scientists. InfoWorld.
[15] Finley, Klint (3 February 2014). Out in the Open: Man
Creates One Programming Language to Rule Them All.
Wired.
[16] Escher lets you build beautiful interactive Web UIs in Julia. Retrieved 27 July 2015.
[17] Getting Started with Node Julia. node-julia.
[18] Moss, Robert (26 June 2015). Using Julia as a Specication Language for the Next-Generation Airborne Collision Avoidance System. Archived from the original on
1 July 2015. Retrieved 29 June 2015. Airborne collision
avoidance system
[19] Suspending Garbage Collection for Performance...good
idea or bad idea?".
[20] PyCall.jl. stevengj. github.com.
[21] Using PyCall in julia on Ubuntu with python3. juliausers at Google Groups. to import modules (e.g. python3numpy)
julialang.org.
Retrieved 18
[29] Julia: A Fast Dynamic Language for Technical Computing (PDF). 2012.
[30] Gibbs, Mark (9 January 2013). Pure and Julia are cool
languages worth checking out. Network World (column).
Retrieved 7 February 2013.
[31] Support MCJIT. Retrieved 26 May 2015.
[32] Using MCJIT with the Kaleidoscope Tutorial. 22 July
2013. Retrieved 26 May 2015.
[33] https://github.com/JuliaLang/julia/blob/v0.5.0/
README.md
[34] Cross-compiling for ARMv6. Retrieved 16 May 2015.
I believe #10917 should x this. The CPU used there
arm1176jzf-s.
[35] ARM build failing during bootstrap on Raspberry Pi 2.
Retrieved 16 May 2015. I can conrm (FINALLY) that it
works on the Raspberry Pi 2 [..] I guess we can announce
alpha support for arm in 0.4 as well.
[36] https://github.com/JuliaLang/openlibm/pull/129
building tests on GNU/kFreeBSD and GNU/Hurd
[37] https://github.com/JuliaLang/julia/issues/6975
faces for Abstract Types
Fix
Inter-
[38] https://github.com/IntelLabs/julia/tree/j2c/j2c
[39] Julia2C initial release. By translating Julia to C, we
leverage the high-level abstractions (matrix, vector, ..),
which are easier to analyze, and can potentially add the
rich extensions of C (like openmp, tbb, ...).
The tool may also extend Julia to new architectures where
the only available tool chain is for C
[..]
Translation from C to Julia might be harder.
[40] Lindsey Kuper (1 Mar 2016). An introduction to ParallelAccelerator.jl.
External links
Ocial website
The Julia manual
Julia Package Listing a searchable listing of all
(currently over 1100) registered packages
EXTERNAL LINKS
7.1
Text
7.2
Images
7.3
Content license