Julia
Table of Content
Overview
- Julia is a new programming language designed for the needs of data scientists, statisticians, scientific computing, and engineers with high performance of a compiled languages and agility of the dynamic ones.
- Julia looks like Python, feels like Lisp and runs like C.
- Languages in general are Performance Oriented or Productive. So we generally use one language to quickly solve the problem for prototyping and other to deploy in production to provide high performance. This problem is called as Two Language Problem. Julia tries to solve this problem by providing Performance, Productivity and Generality.
- Julia has below differentiating factors:
- Multiple Dispatch: Julia implements a type system based on parametric polymorphism and multiple dispatch. During operator overloads most of the programing languages rely on interpreter to decide what that operator context is used for. In julia this is resolved at compilation.
- Dynamic and Optional Typed: Julia will determine datatype for you instead of developer specifying it. This feature is similar to Javascript but user can also explicitly provide specific datatype.
- Functional: It is more a functional language than an object oriented.
- JIT Compiled: It's performance is the combination between the LLVM-based just-in-time (JIT) compiler and a series of strategic design decisions that allow the compiler to generate code that approaches, and most of the times matches, the performance of C. Julia Benchmarks
History
- The Julia project was created by Jeff Bezanson, Alan Edelman, Viral Shah and Stefan Karpinski.
- It was created in 2009 and released in 2012.
Installation
- Julia is easy to install on Windows 10.
- Download the executable from here
- Julia will be installed in a location similar to "C:\Users\systemname\AppData\Local\Julia-1.1.0"
- Add "C:\Users\systemname\AppData\Local\Julia-1.1.0\bin" to path variable and run julia.exe

- You can work with julia in two modes
- You can also run Julia in a browser by registering into Juliabox

- Run Julia in Google Colab
- Create a new Notebook (File -> New Python 3 notebook)
- Save notebook to your drive or github. In this tutorial i will save it into github (File -> Save a Copy in Github).
Modules
- 01-helloworld.jl
- 02-comments.jl
- Comments:
- Single line Comment:
- Start with the # symbol
# This is a sample single line comment
x= 1
- Start with the # symbol
- Multi line Comment:
- Start with the #= and ends with =#
#=
This is a multi line comment example
Use can add as many as possible
=#
- Start with the #= and ends with =#
- Single line Comment:
- Comments:
- Variables:
- Variable names can be as long as you like without spaces.
- Variable names are case-sensitive.
- Variable names must begin with a letter (A-Z or a-z), underscore ('_'), or a subset of Unicode code points greater than 00A0; in particular, Unicode character categories Lu/Ll/Lt/Lm/Lo/Nl (letters), Sc/So (currency and other symbols), and a few other letter-like characters (e.g. a subset of the Sm math symbols) are allowed.
- Subsequent characters may also include ('!') and digits (0-9 and other characters in categories Nd/No), as well as other Unicode code points: diacritics and other modifying marks (categories Mn/Mc/Me/Sk), some punctuation connectors (category Pc), primes, and a few other characters.
- They can contain almost all Unicode names (in UTF-8 encoding).
- Julia’s keywords should not be used.
- Naming Conventions:
- Word separation can be indicated by underscores ('_') such as your_name, but use of underscores is discouraged.
- Names of variables are in lower case.
- Names of Types and Modules begin with a capital letter and word separation is shown with CamelCase instead of underscores.
- Names of functions and macros are in lower case, without underscores.
- Mutating or In-place or Call-by-Reference functions that modify their inputs have names that end in ('!')
Appendix
- Tips
- To run code, you give first argument as julia program file (
PROGRAM_FILE) followed by arguments(ARG)
$ echo 'println(PROGRAM_FILE); for x in ARGS; println(x); end' > script.jl
$ julia script.jl foo bar
script.jl
foo
bar - If you have code that you want executed whenever Julia is run, you can put it in
~/.julia/config/startup.jl
$ echo 'println("Greetings! 你好! 안녕하세요?")' > ~/.julia/config/startup.jl
$ julia
Greetings! 你好! 안녕하세요?
- To run code, you give first argument as julia program file (
- References used
- Tutorial Reference

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.


