3 Expert Tips To Get Started with Julia

A language that performs huge scientific and high performance numerical calculations with great efficacy sounds cool. But its not exactly something every programmer needs. Does that mean Julia is of no relevance to the majority of coders and developers out there? Definitely not.

Apart from its exploits in solving scientific and numerical high performance calculations, Julia work amazingly well as a specification language. For those of you who don’t know, a specification language is one that describes a system at a level that is higher than the programming languages and is used in the systems design analysis and requirement analysis.

So How can YOU use Julia?

Here is your first Julia code and few major points to consider:

Using PyPlot
n = 50
srand(1)
x = rand(n)
y = rand(n)
area = pi .* (15 .* rand(n)).^2 # 0 to 15 point radiuses
scatter(x, y, s=area, alpha=0.5)

When you run this code on Julia, you will notice small circles scattered across a graph plot.Here’s the part where you say Wait, did you say run the code on Julia? Where? When? How? Well, here is the deal. To run a code on Julia, we will need to ensure that we have our setup ready.Below are the major points that we are going to discuss in this blog post:

1. Installing Julia

2. Installation of packages

3. Running the Code

 1. Installing Julia

There are a few easy ways to use Julia on your system. We are going to discuss them here one by one. It is important to note that some of these methods might sound like they are a temporary solution, but bear with us.

JuliaBox

Juliabox is the easiest option to explain and also to use. All you need to do is type JuliaBox on the browser, sign in with a google account and start using Julia. Dont have a Google account? Don’t worry, there are other options.

Use an IDE

Some people like it, some don’t, but installing IDEs is definitely one way of using a programming language. Juno is regarded as one of the best IDEs to write Julia code,but again, it can differ from person to person. If you are in favour, download the combo package from Julias official site and start working straight away.

Use Command Line

Whether you love it or hate it, you can’t ignore it. The command line black screen is another option of working on Julia. All you need to do is download the package from the official Julia website and start coding. Programmers often prefer working on the command line, but for those of you who don’t, there is another option.

Using iJulia Notebooks

Have you heard of iPython? If yes, then meet its distant cousin “iJulia Notebooks”, which is equally exciting and worthwhile. If you have not heard of iPython before, then don’t worry, you will, because to use iJulia Notebooks you’ll have to install iPython first. Next add the IJulia package onJulia and then you’re ready to start using the iJulia Notebooks.

2. Installation of packages

There are a total of 966 registered Julia packages at the time of this post and the number will only get higher in the coming years. However, you won’t need all of them and you can easily find the most relevant ones to you by visiting the Julia website.PyPlot, Gadfly, Mocha etc are some of the popular packages that are used in Julia.

Installing a package

To install a package on Julia, all you need to do is type the command given below on your Julia and interface and run it.

Pkg.add("Gadfly")

Using a package

The above command will install the package Gadfly along with all its dependencies. Once the package is installed, you can start using it by using the keyword “using”(see what we did there?)

 Using Gadfly

3. Running a code

Once you have your Julia environment ready and have installed all the relevant packages, bingo, the interface is now your playground and you can try all your tricks and skills on it.

http://stoneriverelearning.com/courses/unlimited-subscription-stone-river-elearning

Comments