Julia 1.0 Programming

Book description

Enter the exciting world of Julia, a high-performance language for technical computing

Key Features

  • Leverage Julia's high speed and efficiency for your applications
  • Work with Julia in a multi-core, distributed, and networked environment
  • Apply Julia to tackle problems concurrently and in a distributed environment

Book Description

The release of Julia 1.0 is now ready to change the technical world by combining the high productivity and ease of use of Python and R with the lightning-fast speed of C++. Julia 1.0 programming gives you a head start in tackling your numerical and data problems. You will begin by learning how to set up a running Julia platform, before exploring its various built-in types. With the help of practical examples, this book walks you through two important collection types: arrays and matrices. In addition to this, you will be taken through how type conversions and promotions work.

In the course of the book, you will be introduced to the homo-iconicity and metaprogramming concepts in Julia. You will understand how Julia provides different ways to interact with an operating system, as well as other languages, and then you'll discover what macros are. Once you have grasped the basics, you'll study what makes Julia suitable for numerical and scientific computing, and learn about the features provided by Julia. By the end of this book, you will also have learned how to run external programs.

This book covers all you need to know about Julia in order to leverage its high speed and efficiency for your applications.

What you will learn

  • Set up your Julia environment to achieve high productivity
  • Create your own types to extend the built-in type system
  • Visualize your data in Julia with plotting packages
  • Explore the use of built-in macros for testing and debugging, among other uses
  • Apply Julia to tackle problems concurrently
  • Integrate Julia with other languages such as C, Python, and MATLAB

Who this book is for

Julia 1.0 Programming is for you if you are a statistician or data scientist who wants a crash course in the Julia programming language while building big data applications. A basic knowledge of mathematics is needed to understand the various methods that are used or created during the course of the book to exploit the capabilities that Julia is designed with.

Table of contents

  1. Title Page
  2. Copyright and Credits
    1. Julia 1.0 Programming Second Edition
  3. Packt Upsell
    1. Why subscribe?
    2. Packt.com
  4. Contributors
    1. About the author
    2. About the reviewer
    3. Packt is searching for authors like you
  5. Preface
    1. Who this book is for
    2. What this book covers
    3. To get the most out of this book
      1. Download the example code files
      2. Conventions used
    4. Get in touch
      1. Reviews
  6. Installing the Julia Platform
    1. Installing Julia
      1. Windows OS
      2. OS X
      3. Linux OS
      4. Building from source
      5. JuliaPro
    2. Working with Julia's REPL
    3. Startup options and Julia scripts
    4. Packages
      1. Adding a new package
    5. Installing and working with IJulia
    6. Installing Juno
    7. Installing julia-vscode
    8. Installing Sublime-IJulia
    9. Other editors and IDEs
    10. How Julia works
    11. Summary
  7. Variables, Types, and Operations
    1. Variables, naming conventions, and comments
    2. Types
    3. Integers
    4. Floating point numbers
    5. Elementary mathematical functions and operations
    6. Rational and complex numbers
    7. Characters
    8. Strings
      1. Formatting numbers and strings
    9. Regular expressions
    10. Ranges and arrays
      1. Other ways to create arrays
      2. Some common functions for arrays
    11. Dates and times
    12. Scope and constants
    13. Summary
  8. Functions
    1. Defining functions
    2. Optional and keyword arguments
    3. Anonymous functions
    4. First-class functions and closures
    5. functions
    6. Broadcasting
    7. Map, filter, and list comprehensions
    8. Generic functions and multiple dispatch
    9. Summary
  9. Control Flow
    1. Conditional evaluation
    2. Repeated evaluation
      1. for loops
      2. while loops
      3. The break statement
      4. The continue statement
    3. Exception handling
    4. Scope revisited
    5. Tasks
    6. Summary
  10. Collection Types
    1. Matrices
    2. Tuples
    3. Dictionaries
      1. Keys and values – looping
    4. Sets
    5. An example project – word frequency
    6. Summary
  11. More on Types, Methods, and Modules
    1. Type annotations
      1. Type conversions and promotions
    2. The type hierarchy – subtypes and supertypes
    3. Concrete and abstract types
    4. User-defined and composite types
      1. When are two values or objects equal or identical?
      2. A multiple-dispatch example
    5. Types and collections – inner constructors
    6. Type unions
    7. Parametric types and methods
    8. Standard modules and paths
    9. Summary
  12. Metaprogramming in Julia
    1. Expressions and symbols
    2. Evaluation and interpolation
    3. Defining macros
    4. Built-in macros
      1. Testing
      2. Debugging
      3. Benchmarking
      4. Starting a task
    5. Reflection capabilities
    6. Summary
  13. I/O, Networking, and Parallel Computing
    1. Basic input and output
    2. Working with files
      1. Reading and writing CSV files
    3. Using DataFrames
      1. Other file formats
    4. Working with TCP sockets and servers
    5. Interacting with databases
    6. Parallel operations and computing
      1. Creating processes
      2. Using low-level communications
      3. Parallel loops and maps
    7. Summary
  14. Running External Programs
    1. Running shell commands
      1. Interpolation
      2. Pipelining
    2. Calling C and Fortran
    3. Calling Python
    4. Performance tips
      1. Tools to use
    5. Summary
  15. The Standard Library and Packages
    1. Digging deeper into the standard library
    2. Julia's package manager
      1. Installing and updating packages
    3. Graphics in Julia
    4. Using Plots on data
    5. Summary
  16. Other Books You May Enjoy
    1. Leave a review - let other readers know what you think

Product information

  • Title: Julia 1.0 Programming
  • Author(s): Ivo Balbaert
  • Release date: September 2018
  • Publisher(s): Packt Publishing
  • ISBN: 9781788999090