Rock It 《ML》JupyterLab 【戊】 Julia

在結束 Rock It《ML》文本系列前,略為介紹

Julia (programming language)

Julia is a high-level general-purpose[13] dynamic programming language whose designers intend it to address the needs of high-performance numerical analysis and computational science, without the need of separate compilation to be fast.[14][15][16][17] It is also useful for low-level systems programming,[18] as a specification language,[19] with work being done on client[20] and server web use.[21]

Distinctive aspects of Julia’s design include a type system with parametric polymorphism and 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,[22] uses eager evaluation, and includes efficient libraries for floating-point calculations, linear algebra, random number generation, and regular expression matching. Many libraries are available, including some (e.g., for fast Fourier transforms) that were previously bundled with Julia and are now separate.[23]

History

Work on Julia was started in 2009, by Jeff Bezanson, Stefan Karpinski, Viral B. Shah, and Alan Edelman, who set out to create a free language that was both high-level and fast. On 14 February 2012 the team launched a website with a blog post explaining the language’s mission.[24] In an interview with Infoworld in April 2012, Karpinski said of the name “Julia”: “There’s no good reason, really. It just seemed like a pretty name.”[25] Bezanson said he chose the name on the recommendation of a friend.[26]

Since the 2012 launch, the Julia community has grown, with over 3,200,000 downloads as of January 2019[27]. The Official Julia Docker images have seen over 1,000,000 downloads.[28]. The JuliaCon[29] academic conference for Julia users and developers has been held annually since 2014.

Version 0.3 was released in August 2014, version 0.4 in October 2015, and version 0.5 in October 2016.[30] Versions 0.5 and earlier are no longer maintained.[31] Julia 0.6 was released in June 2017,[32] and was the stable release version until 8 August 2018.

Both Julia 0.7 (a useful release for testing packages, and knowing how to upgrade them for 1.0[33]) and version 1.0 were released on 8 August 2018. Work on Julia 0.7 was a “huge undertaking” (e.g., because of “entirely new optimizer”), and some changes were made to the syntax (with the syntax now stable, and same for 1.x and 0.7) and semantics; the iteration interface was simplified.[34]

The release candidate for Julia 1.0 (Julia 1.0.0-rc1) was released on 7 August 2018, and the final version a day later. The team has stated code that runs without warnings on Julia 0.7 will run identically on Julia 1.0.[35]

Julia 1.1 was released on 21 January 2019 with, e.g., a new “exception stack” language feature. As promised (by the semantic versioning Julia, and many of the external packages, follows) all old syntax from Julia 1.0 should still work, while Julia 1.1 may not work in Julia 1.0. There are mostly non-breaking additions to the standard library, while there are some small changes explained in Julia’s NEWS file.

Bugfix releases are expected roughly monthly, for Julia 1.1.x and 1.0.x (1.0.x currently has long-term support; for at least a year) and Julia 1.0.1, 1.0.2, and 1.0.3 have followed that schedule (no such bugfix releases in the pipeline for 0.7-release). Julia 1.2 is due 15 March 2019.[36]

 

以求完整也。

有興趣讀者可造訪其網頁,讀讀

Julia in a Nutshell

Julia is fast!

Julia was designed from the beginning for high performance. Julia programs compile to efficient native code for multiple platforms via LLVM.

Dynamic

Julia is dynamically-typed, feels like a scripting language, and has good support for interactive use.

Optionally typed

Julia has a rich language of descriptive datatypes, and type declarations can be used to clarify and solidify programs.

General

Julia uses multiple dispatch as a paradigm, making it easy to express many object-oriented and functional programming patterns. The standard library provides asynchronous I/O, process control, logging, profiling, a package manager, and more.

Easy to use

Julia has high level syntax, making it an accessible language for programmers from any background or experience level.

 

有個初步了解。

ROCK 64 上

Download Julia

Long-term support release (v1.0.3)

Users updating code written on older versions to work with 1.0 may be interested in using Julia 0.7 during the upgrade process, available on the old releases page. It is a transitional release that provides deprecation warnings for functionality that differs between Julia 0.6 and 1.0.

 

安裝辦法如下︰

wget https://julialang-s3.julialang.org/bin/linux/aarch64/1.0/julia-1.0.3-linux-aarch64.tar.gz

tar -zxvf julia-1.0.3-linux-aarch64.tar.gz

ln -s /home/rock64/julia-1.0.3/bin/julia /usr/bin/julia

 

然後動手吧☆

Getting Started

Julia installation is straightforward, whether using precompiled binaries or compiling from source. Download and install Julia by following the instructions at https://julialang.org/downloads/.

The easiest way to learn and experiment with Julia is by starting an interactive session (also known as a read-eval-print loop or “REPL”) by double-clicking the Julia executable or running julia from the command line:

rock64@rock64:~$ julia 
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.0.3 (2018-12-18)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

julia> 1 + 2
3

julia> ans
3

julia>

To exit the interactive session, type CTRL-D (press the Control/^ key together with the d key), or type exit(). When run in interactive mode, julia displays a banner and prompts the user for input. Once the user has entered a complete expression, such as 1 + 2, and hits enter, the interactive session evaluates the expression and shows its value. If an expression is entered into an interactive session with a trailing semicolon, its value is not shown. The variable ans is bound to the value of the last evaluated expression whether it is shown or not. The ans variable is only bound in interactive sessions, not when Julia code is run in other ways.