Julia 1.0 Programming
Dynamic and high-performance programming to build fast scientific applications, 2nd Edition
Ivo Balbaert
- 196 pages
- English
- ePUB (mobile friendly)
- Available on iOS & Android
Julia 1.0 Programming
Dynamic and high-performance programming to build fast scientific applications, 2nd Edition
Ivo Balbaert
About This Book
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.
Frequently asked questions
Information
Variables, Types, and Operations
- Variables, naming conventions, and comments
- Types
- Integers
- Floating point numbers
- Elementary mathematical functions and operations
- Rational and complex numbers
- Characters
- Strings
- Regular expressions
- Ranges and arrays
- Dates and times
- Scope and constants
Variables, naming conventions, and comments
julia> y = 7 7 typeof(y) # Int64 julia> y + z ERROR: UndefVarError: z not defined
julia> x + y ERROR: MethodError: no method matching +(::String, ::Int64) julia> x = 3.5; x + y 10.5
# Calculate the gravitational acceleration grav_acc: gc = 6.67e-11 # gravitational constant in m3/kg s2 mass_earth = 5.98e24 # in kg radius_earth = 6378100 # in m grav_acc = gc * mass_earth / radius_earth^2 # 9.8049 m/s2
julia> print(x) 3.5
Types
julia> x = 10 10 julia> x = "hello" "hello"