Starting at 08 Aug 2018 the new version 1.0 of Julia official page come with this intro:
The much anticipated 1.0 release of Julia is the culmination of nearly a decade of work to build a language for greedy programmers. JuliaCon2018 celebrated the event with a reception where the community officially set the version to 1.0.0 together.
Julia was first publicly announced with a number of strong demands on the language:
We want a language that’s open source, with a liberal license. We want the speed of C with the dynamism of Ruby. We want a language that’s homoiconic, with true macros like Lisp, but with an obvious, familiar mathematical notation like Matlab. We want something as usable for general programming as Python, as easy for statistics as R, as natural for string processing as Perl, as powerful for linear algebra as Matlab, as good at gluing programs together as the shell. Something that is dirt simple to learn yet keeps the most serious hackers happy. We want it interactive and we want it compiled.
…
some advantages of Julia over comparable systems include:
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
Today I install it and works great.
I tested some examples and I read a part of the documentation to see how this working.
First, this is the Julia folder:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | \Julia-1.0.0>dir Volume in drive C has no label. Volume Serial Number is 687F-6145 Directory of c:\Julia-1.0.0 08/10/2018 09:15 PM <DIR> . 08/10/2018 09:15 PM <DIR> .. 08/10/2018 09:15 PM <DIR> bin 08/10/2018 09:15 PM <DIR> etc 08/10/2018 09:15 PM <DIR> include 08/10/2018 09:15 PM 666 julia.lnk 08/10/2018 09:15 PM <DIR> lib 08/09/2018 02:00 AM 5,265 LICENSE.md 08/10/2018 09:15 PM <DIR> share 08/10/2018 09:15 PM 112,412 Uninstall.exe 3 File(s) 118,343 bytes 7 Dir(s) 203,773,190,144 bytes free |
The bin folder come with many dll files and this applications: 7z, julia and BusyBox .
The BusyBox is a multi-call binary that combines many common Unix utilities into a single executable.
Start the julia shell and use this commands:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | julia> println("Hello Julia!") Hello Julia! julia> versioninfo() Julia Version 1.0.0 Commit 5d4eaca0c9 (2018-08-08 20:58 UTC) Platform Info: OS: Windows (x86_64-w64-mingw32) CPU: Intel(R) Pentium(R) CPU 2117U @ 1.80GHz WORD_SIZE: 64 LIBM: libopenlibm LLVM: libLLVM-6.0.0 (ORCJIT, ivybridge) julia> cd() julia> pwd() julia> readdir() ... julia> 1+2 3 julia> ans 3 |
The variable ans is bound to the value of the last evaluated expression whether it .
Use the ] to use packages and Ctr+C to exit to julia shell.
You can run this commands to update , build and add packages:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | (v1.0) pkg> update Updating registry at Resolving package versions... ... (v1.0) pkg> build Cloning default registries into ... Updating git-repo `https://github.com/JuliaRegistries/General.git` Resolving package versions... [ Info: no packages to build ... (v1.0) pkg> add Calculus Resolving package versions... Installed Compat ─── v1.0.1 Installed Calculus ─ v0.4.1 ... (v1.0) pkg> update ... |
Use ? to see help of packages:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | (v1.0) pkg> ? Welcome to the Pkg REPL-mode. To return to the julia> prompt, either press backspace when the input line is empty or press Ctrl+C. Synopsis pkg> [--env=...] cmd [opts] [args] Multiple commands can be given on the same line by interleaving a ; between the commands. Environment The --env meta option determines which project environment to manipulate. By default, this looks for a git repo in the parents directories of the current working directory, and if it finds one, it uses that as an environment. Otherwise, it uses a named environment (typically found in ~/.julia/environments) looking for environments named v$(VERSION.major).$(VERSION.minor).$(VERSION.patch), v$(VERSION.major).$(VERSION.minor), v$(VERSION.major) or default in order. Commands What action you want the package manager to take: help: show this message status: summarize contents of and changes to environment add: add packages to project develop: clone the full package repo locally for development rm: remove packages from project or manifest up: update packages in manifest test: run tests for packages build: run the build script for packages pin: pins the version of packages free: undoes a pin, develop, or stops tracking a repo. instantiate: downloads all the dependencies for the project resolve: resolves to update the manifest from changes in dependencies of developed packages generate: generate files for a new project preview: previews a subsequent command without affecting the current state precompile: precompile all the project dependencies gc: garbage collect packages not used for a significant time activate: set the primary environment the package manager manipulates |
There’s a big list of official packages available at pkg.julialang.org.
Let’s see one example with Calculus package:
Using the derivative() function will evaluate the numerical derivative at a specific point.
This examples works with derivative and higher order derivatives for f(x) = sin(x) and f(x) = sin(x)*2x :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | julia> derivative(sin, pi, :central) -0.9999999999441258 julia> derivative(sin, pi, :forward) -0.9999999993684132 julia> derivative(sin, pi, :complex) -1.0 julia> derivative(x -> sin(x), pi) -0.9999999999441258 julia> derivative(x -> sin(x), 3/pi) 0.5776661771287944 julia> derivative(x -> sin(x), 5/pi) -0.020751614455901516 julia> derivative(x -> sin(x), 5*pi) -0.9999999984918415 julia> f(x) = sin(x)*2x f (generic function with 1 method) julia> f'(0.0) 0.0 julia> f''(0.0) 3.999999999902217 julia> f'''(0.0) 0.0 julia> f'(1.0) 2.7635465813211457 |
You can see many examples at juliabyexample.helpmanual.io website .