The Wayback Machine - https://web.archive.org/web/20201109000202/https://github.com/rahgadda/Julia
Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

README.md

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
      • REPEL (Read–Eval–Print Loop): This is an interactive terminal that reads and executes Julia code.
      • Script Mode/Non Interactive Mode: Julia code can be stored in ".jl" files and can be executed using two approached showed below. We will used this approach in this course.
  • 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
      • Multi line Comment:
        • Start with the #= and ends with =#
          #=
          This is a multi line comment example
          Use can add as many as possible
          =#
  • 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! 你好! 안녕하세요?
  • References used
  • Tutorial Reference

About

My Learning on Julia [I am not interested to steal others work, but record and document my ways of learning.]

Topics

Resources

Releases

No releases published

Packages

No packages published
You can’t perform that action at this time.