Book Image

Julia 1.0 Programming Complete Reference Guide

By : Ivo Balbaert, Adrian Salceanu
Book Image

Julia 1.0 Programming Complete Reference Guide

By: Ivo Balbaert, Adrian Salceanu

Overview of this book

Julia offers the high productivity and ease of use of Python and R with the lightning-fast speed of C++. There’s never been a better time to learn this language, thanks to its large-scale adoption across a wide range of domains, including fintech, biotech and artificial intelligence (AI). You will begin by learning how to set up a running Julia platform, before exploring its various built-in types. This Learning Path walks you through two important collection types: arrays and matrices. You’ll be taken through how type conversions and promotions work, and in further chapters you'll study how Julia interacts with operating systems and other languages. You’ll also learn about the use of macros, what makes Julia suitable for numerical and scientific computing, and how to run external programs. Once you have grasped the basics, this Learning Path goes on to how to analyze the Iris dataset using DataFrames. While building a web scraper and a web app, you’ll explore the use of functions, methods, and multiple dispatches. In the final chapters, you'll delve into machine learning, where you'll build a book recommender system. By the end of this Learning Path, you’ll be well versed with Julia and have the skills you need to leverage its high speed and efficiency for your applications. This Learning Path includes content from the following Packt products: • Julia 1.0 Programming - Second Edition by Ivo Balbaert • Julia Programming Projects by Adrian Salceanu
Table of Contents (18 chapters)

What this book covers

Chapter 1, Installing the Julia Platform, explains how to install all the necessary components for a Julia environment. It teaches you how to work with Julia's console (the REPL) and discusses some of the more elaborate development editors you can use.

Chapter 2, Variables, Types, and Operations, discusses the elementary built-in types in Julia and the operations that can be performed on them so that you are prepared to start writing code with them.

Chapter 3, Functions, teaches you why functions are the basic building blocks of Julia, and how to effectively use them.

Chapter 4, Control Flow, shows Julia's elegant control constructs, how to perform error handling, and how to use coroutines (called Tasks in Julia) to structure the execution of your code.

Chapter 5, Collection Types, explores the different types that group individual values, such as arrays and matrices, tuples, dictionaries, and sets.

Chapter 6, More on Types, Methods, and Modules, digs deeper into the type concept and how it is used in multiple dispatch to get C-like performance. Modules, a higher code organizing concept, are discussed as well.

Chapter 7, Metaprogramming in Julia, touches on deeper layers of Julia, such as expressions and reflection capabilities, and demonstrates the power of macros.

Chapter 8, I/O, Networking, and Parallel Computing, shows how to work with data in files and databases by using DataFrames. It also looks at networking capabilities, and how to set up a parallel computing environment with Julia.

Chapter 9, Running External Programs, looks at how Julia interacts with the command-line and with other languages and also discusses performance tips.

Chapter 10, The Standard Library and Packages, digs deeper into the standard library, and demonstrates important packages for the visualization of data.

Chapter 11, Creating Our First Julia App, will show you how to perform data analysis against the Iris dataset with Julia. We take a look at RDatasets, a package that provides access to 700 learning datasets distributed with the R language. We'll load the Iris dataset and we'll manipulate it using standard data analysis functions. We also look more closely at the data by employing common visualization techniques using Gadfly. In the process, we cover strings and regular expressions, numbers, tuples, ranges, and arrays. Finally, we'll see how to persist and (re)load our data with CSV, Feather, and MongoDB.

Chapter 12, Setting Up the Wiki Game, introduces our first fully featured Julia project, a Wikipedia web crawler disguised as a popular game. In the first iteration, we will build a program that gets a random web page from Wikipedia. Then we'll learn about parsing the HTML response using CSS selectors. We'll use this to introduce key concepts such as functions, pairs, dictionaries, exceptions, and conditional evaluation.

Chapter 13, Building the Wiki Game Web Crawler, will build upon the foundations set in the previous chapter, and we'll build a Wikipedia web scraper that implements the requirements of the wiki game.

Chapter 14, Adding a Web UI for the Wiki Game, will see us finish the Wiki Game by adding a web UI. We'll build a simple web app that will allow the player to start a new game, render the Wikipedia articles picked by the game engine, and navigate between linked Wikipedia articles. The UI will also keep track of and display current game progress and determine a session as a win or a loss.

Chapter 15, Implementing Recommender Systems with Julia, will have you take on a more challenging example project and build a few basic recommender systems. We'll set up a supervised machine learning system powered by Julia and we will develop some simple movie recommenders.

Chapter 16, Machine Learning for Recommender Systems, will show you how to implement a more powerful recommender system using the Recommender.jl package. We will use a sample dataset to train our system and generate book recommendations as we'll learn about model-based recommenders.