Book Image

Mastering Julia - Second Edition

By : Malcolm Sherrington
Book Image

Mastering Julia - Second Edition

By: Malcolm Sherrington

Overview of this book

Julia is a well-constructed programming language which was designed for fast execution speed by using just-in-time LLVM compilation techniques, thus eliminating the classic problem of performing analysis in one language and translating it for performance in a second. This book is a primer on Julia’s approach to a wide variety of topics such as scientific computing, statistics, machine learning, simulation, graphics, and distributed computing. Starting off with a refresher on installing and running Julia on different platforms, you’ll quickly get to grips with the core concepts and delve into a discussion on how to use Julia with various code editors and interactive development environments (IDEs). As you progress, you’ll see how data works through simple statistics and analytics and discover Julia's speed, its real strength, which makes it particularly useful in highly intensive computing tasks. You’ll also and observe how Julia can cooperate with external processes to enhance graphics and data visualization. Finally, you will explore metaprogramming and learn how it adds great power to the language and establish networking and distributed computing with Julia. By the end of this book, you’ll be confident in using Julia as part of your existing skill set.
Table of Contents (14 chapters)

Derived and composite types

Julia implements a composite-aggregation object model rather than the most common inheritance ones, which are all used for sub-typing and polymorphism.

While this might seem restrictive, it allows the use of a multiple dispatch call mechanism rather than the single dispatch one employed in the usual object-orientated ones.

Coupled with Julia’s system of types, multiple dispatch is extremely powerful. Moreover, it is a more logical approach for data scientists and scientific programmers, if for no other reason than exposing this to you, the analyst/programmer, is a reason to use Julia. In fact, there are lots of other reasons as well, as we will see later in this chapter.

A look at the Rational type

The Rational number type was introduced in the previous chapter and, like most of Julia, it is implemented in the language itself. The source is in base/rational.jl and is available for inspection.

To see the source code for Julia, go to...