Julia: Difference between revisions

From ArchWiki
(the julia package now (version 1.4.0) depends on openblas and mbedtls)
 
(20 intermediate revisions by 11 users not shown)
Line 3: Line 3:
[[ja:Julia]]
[[ja:Julia]]
[[zh-hans:Julia]]
[[zh-hans:Julia]]
{{Note|https://julialang.org/ has beautiful and open-source documentation, non-Arch-specific information should be contributed there.}}
{{Note|https://julialang.org/ has beautiful and open-source [https://docs.julialang.org/ documentation], non-Arch-specific information should be contributed there.}}


[https://julialang.org/ Julia] is a high-level, high-performance dynamic programming language for numerical computing. It provides a sophisticated compiler, distributed parallel execution, numerical accuracy, and an extensive mathematical function library.
[https://julialang.org/ Julia] is a high-level, high-performance dynamic programming language for numerical computing. It provides a sophisticated compiler, distributed parallel execution, numerical accuracy, and an extensive mathematical function library.
Line 9: Line 9:
== Installation ==
== Installation ==


[[Install]] the {{Pkg|julia}} package. To learn and use Julia, please read [https://docs.julialang.org/ upstream documents].
{{Note|The {{Pkg|julia}} package is compiled against system libraries and is therefore '''unsupported''' by the upstream. While it may be suitable for basic usage it is incompatible with external packages (e.g. MKL, LLVM, LLVMExtra, or packages that depend on these, like CUDA or Flux) which rely on Julia's bundled versions of its dependencies. For example, Sundials.jl (which is a dependency of DifferentialEquations.jl) [https://github.com/SciML/Sundials.jl/issues/358 fails] to precompile with this package, but builds without errors with the official builds. Bugs reported to Julia's maintainers against this binary will be [https://github.com/JuliaLinearAlgebra/MKL.jl/issues/105#issuecomment-1025985667 closed].}}
 
[[Install]] {{AUR|julia-bin}}. The package provides official builds compiled against [https://github.com/maleadt/LLVM.jl/issues/253 patched LLVM libs].
 
[[Install]] {{AUR|juliaup}}. The package provides a binary manager, similar to ''rustup'', that allow to use different versions of Julia.
 
== Tips and tricks ==
 
If you get the following error while using {{ic|pyplots()}} with {{AUR|julia-bin}},
 
WARNING: You are using Matplotlib 0.0.0, which is no longer officialy supported by the Plots community. To ensure smooth Plots.jl integration update your Matplotlib library to a version >= 2.0.0
 
first install {{Pkg|python-matplotlib}} and {{Pkg|tk}}. Then, install [https://github.com/JuliaInterop/VersionParsing.jl VersionParsing.jl] with {{ic|] add VersionParsing}} within the Julia prompt[https://github.com/JuliaPlots/Plots.jl/issues/1432], and restart Julia.


== Integration with editors ==
== Integration with editors ==


=== Vim ===  
=== Vim ===


==== Syntax highlighting and more ====
==== Syntax highlighting and more ====
Line 22: Line 34:


The [https://github.com/zyedidia/julialint.vim julialint] plugin combined with the [https://github.com/tonyhffong/Lint.jl Lint.jl] package can provide linting.
The [https://github.com/zyedidia/julialint.vim julialint] plugin combined with the [https://github.com/tonyhffong/Lint.jl Lint.jl] package can provide linting.
==== REPL vim bindings ====
The [https://github.com/caleb-allen/VimBindings.jl VimBindings.jl] package provides [[vim]] emulation within the Julia REPL.
=== Emacs ===
==== Syntax highlighting ====
[https://github.com/JuliaEditorSupport/julia-emacs julia-emacs].
==== Linting ====
[https://github.com/non-Jedi/lsp-julia lsp-julia]: provides linting using the LSP protocol.
==== REPL integration ====
[https://github.com/tpapp/julia-repl julia-repl]: for interacting with a Julia REPL running inside [[Emacs]].

Latest revision as of 18:31, 27 December 2023

Note: https://julialang.org/ has beautiful and open-source documentation, non-Arch-specific information should be contributed there.

Julia is a high-level, high-performance dynamic programming language for numerical computing. It provides a sophisticated compiler, distributed parallel execution, numerical accuracy, and an extensive mathematical function library.

Installation

Note: The julia package is compiled against system libraries and is therefore unsupported by the upstream. While it may be suitable for basic usage it is incompatible with external packages (e.g. MKL, LLVM, LLVMExtra, or packages that depend on these, like CUDA or Flux) which rely on Julia's bundled versions of its dependencies. For example, Sundials.jl (which is a dependency of DifferentialEquations.jl) fails to precompile with this package, but builds without errors with the official builds. Bugs reported to Julia's maintainers against this binary will be closed.

Install julia-binAUR. The package provides official builds compiled against patched LLVM libs.

Install juliaupAUR. The package provides a binary manager, similar to rustup, that allow to use different versions of Julia.

Tips and tricks

If you get the following error while using pyplots() with julia-binAUR,

WARNING: You are using Matplotlib 0.0.0, which is no longer officialy supported by the Plots community. To ensure smooth Plots.jl integration update your Matplotlib library to a version >= 2.0.0

first install python-matplotlib and tk. Then, install VersionParsing.jl with ] add VersionParsing within the Julia prompt[1], and restart Julia.

Integration with editors

Vim

Syntax highlighting and more

julia-vim

Linting

The julialint plugin combined with the Lint.jl package can provide linting.

REPL vim bindings

The VimBindings.jl package provides vim emulation within the Julia REPL.

Emacs

Syntax highlighting

julia-emacs.

Linting

lsp-julia: provides linting using the LSP protocol.

REPL integration

julia-repl: for interacting with a Julia REPL running inside Emacs.