Getting started with Julia Programming Language - Ivo Balbaert - E-Book

Getting started with Julia Programming Language E-Book

Ivo Balbaert

0,0
32,39 €

-100%
Sammeln Sie Punkte in unserem Gutscheinprogramm und kaufen Sie E-Books und Hörbücher mit bis zu 100% Rabatt.
Mehr erfahren.
Beschreibung

This book is for you if you are a data scientist or working on any technical or scientific computation projects. The book assumes you have a basic working knowledge of high-level dynamic languages such as MATLAB, R, Python, or Ruby.

Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:

EPUB
MOBI

Seitenzahl: 254

Veröffentlichungsjahr: 2015

Bewertungen
0,0
0
0
0
0
0
Mehr Informationen
Mehr Informationen
Legimi prüft nicht, ob Rezensionen von Nutzern stammen, die den betreffenden Titel tatsächlich gekauft oder gelesen/gehört haben. Wir entfernen aber gefälschte Rezensionen.



Table of Contents

Getting Started with Julia
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
The Rationale for Julia
The scope of Julia
Julia's place among the other programming languages
A comparison with other languages for the data scientist
MATLAB
R
Python
Useful links
Summary
1. Installing the Julia Platform
Installing Julia
Windows version – usable from Windows XP SP2 onwards
Ubuntu version
OS X
Building from source
Working with Julia's shell
Startup options and Julia scripts
Packages
Adding a new package
Installing and working with Julia Studio
Installing and working with IJulia
Installing Sublime-IJulia
Installing Juno
Other editors and IDEs
How Julia works
Summary
2. 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
Formatting numbers and strings
Regular expressions
Ranges and arrays
Other ways to create arrays
Some common functions for arrays
How to convert an array of chars to a string
Dates and times
Scope and constants
Summary
3. Functions
Defining functions
Optional and keyword arguments
Anonymous functions
First-class functions and closures
Recursive functions
Map, filter, and list comprehensions
Generic functions and multiple dispatch
Summary
4. Control Flow
Conditional evaluation
Repeated evaluation
The for loop
The while loop
The break statement
The continue statement
Exception handling
Scope revisited
Tasks
Summary
5. Collection Types
Matrices
Tuples
Dictionaries
Keys and values – looping
Sets
Making a set of tuples
Example project – word frequency
Summary
6. More on Types, Methods, and Modules
Type annotations and conversions
Type conversions and promotions
The type hierarchy – subtypes and supertypes
Concrete and abstract types
User-defined and composite types
When are two values or objects equal or identical?
Multiple dispatch example
Types and collections – inner constructors
Type unions
Parametric types and methods
Standard modules and paths
Summary
7. Metaprogramming in Julia
Expressions and symbols
Eval and interpolation
Defining macros
Built-in macros
Testing
Debugging
Benchmarking
Starting a task
Reflection capabilities
Summary
8. I/O, Networking, and Parallel Computing
Basic input and output
Working with files
Reading and writing CSV files
Using DataFrames
Other file formats
Working with TCP sockets and servers
Interacting with databases
Parallel operations and computing
Creating processes
Using low-level communications
Parallel loops and maps
Distributed arrays
Summary
9. Running External Programs
Running shell commands
Interpolation
Pipelining
Calling C and FORTRAN
Calling Python
Performance tips
Tools to use
Summary
10. The Standard Library and Packages
Digging deeper into the standard library
Julia's package manager
Installing and updating packages
Publishing a package
Graphics in Julia
Using Gadfly on data
Summary
A. List of Macros and Packages
Macros
List of packages
Index

Getting Started with Julia

Getting Started with Julia

Copyright © 2015 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.

Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.

First published: February 2015

Production reference: 1200215

Published by Packt Publishing Ltd.

Livery Place

35 Livery Street

Birmingham B3 2PB, UK.

ISBN 978-1-78328-479-5

www.packtpub.com

Credits

Author

Ivo Balbaert

Reviewers

Pascal Bugnion

Michael Otte

Dustin E. Stansbury

Commissioning Editor

Kevin Colaco

Acquisition Editor

Kevin Colaco

Content Development Editor

Neeshma Ramakrishnan

Technical Editors

Mrunmayee Patil

Shali Sasidharan

Copy Editor

Rashmi Sawant

Project Coordinator

Purav Motiwalla

Proofreaders

Mario Cecere

Paul Hindle

Indexer

Monica Ajmera Mehta

Production Coordinator

Conidon Miranda

Cover Work

Conidon Miranda

About the Author

Ivo Balbaert is currently a lecturer in (web) programming and databases at CVO Antwerpen (www.cvoantwerpen.be), a community college in Belgium. He received a PhD degree in applied physics from the University of Antwerp in 1986. He worked for 20 years in the software industry as a developer and consultant in several companies, and for 10 years as a project manager at the University Hospital of Antwerp. From 2000 onward, he switched to partly teaching and developing software (KHM Mechelen, CVO Antwerp).

He also wrote an introductory book in Dutch about developing in Ruby and Rails, Programmeren met Ruby en Rails, Van Duuren Media. In 2012, he authored a book on the Go programming language, The Way To Go, iUniverse. In 2013, in collaboration with Dzenan Ridzanovic, he authored Learning Dart and Dart Cookbook, both by Packt Publishing.

I would like to thank the technical reviewers Pascal Bugnion, Michael Otte, and Dustin Stansbury for the many useful remarks that improved the text.

About the Reviewers

Pascal Bugnion is a data scientist with a strong analytical background as well as a passion for software development. He pursued a materials science undergraduate degree at Oxford University. He then went on to complete a PhD in computational physics at Cambridge University, during which he developed and applied the quantum Monte Carlo methods to solid­state physics. This resulted in four publications, including an article in Physical Review Letters, the leading physics journal. He now works as a database architect for SCL Elections, a company that specializes in predicting voter behavior.

Pascal is strongly interested in contributing to open source software, especially the Python scientific stack. He has contributed to NumPy, matplotlib, and IPython, and maintains Scikit­Monaco, a Python library for Monte Carlo integration as well as GMaps, a Python module for embedding Google maps in IPython notebooks.

Michael Otte has interests that include the application of artificial intelligence to robotics, with a focus on path planning algorithms and multirobot systems. He has been using the Julia language since 2012 to implement motion planning, graph search, and other algorithms, many of which have appeared in top peer-reviewed publications. See www.ottelab.com for more details. He is currently a research associate with the Department of Aerospace Engineering Sciences at the University of Colorado at Boulder. Prior to this, he was a postdoctoral associate with the Laboratory for Information and Decision Systems (LIDS) at the Massachusetts Institute of Technology. He received his PhD and MS degrees at the University of Colorado at Boulder in computer science and a BS degree in aeronautical engineering and computer science from Clarkson University.

Dustin Stansbury received his BS degree in both physics and psychology from Appalachian State University and his PhD degree in vision science from the University of California, Berkeley. His graduate research focused on developing hierarchical statistical models of the mammalian visual and auditory systems. He currently works in the field of music retrieval and regularly contributes to his machine learning blog, theclevermachine.

Dustin has contributed a chapter to the text book, Scene Vision: Making sense of what we see, MIT Press 2014, Cambridge MA.

www.PacktPub.com

Support files, eBooks, discount offers, and more

For support files and downloads related to your book, please visit www.PacktPub.com.

Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at <[email protected]> for more details.

At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.

https://www2.packtpub.com/books/subscription/packtlib

Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can search, access, and read Packt's entire library of books.

Why subscribe?

Fully searchable across every book published by PacktCopy and paste, print, and bookmark contentOn demand and accessible via a web browser

Free access for Packt account holders

If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib today and view 9 entirely free books. Simply use your login credentials for immediate access.

Preface

Julia is a new programming language that was developed at MIT in the Applied Computing Group under the supervision of Prof. Alan Edelman. Its development started in 2009, and it was first presented publicly in February 2012. It is still a fairly young language when you look at the current Version number (0.3), but its foundation is stable; the core language has had no backwards incompatible changes since Version 0.1. It is based on clear and solid principles, and its popularity is steadily increasing in the technical, data scientist, and high-performance computing arenas. In the section The Rationale for Julia, we present an overview of the principles on which Julia is based and compare them to other languages.

What this book covers

Chapter 1, Installing the Julia Platform, guides you with the installation of all the necessary components required 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 the code with them.

Chapter 3, Functions, explains 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 explains how this 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 the 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 using DataFrames. We can explore the networking capabilities, and shows 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 other languages and also discusses performance tips.

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

Appendix, List of Macros and Packages, provides you with handy reference lists of the macros and packages used in this book.

What you need for this book

To run the code examples in the book, you will need the Julia platform for your computer, which can be downloaded from http://julialang.org/downloads/. To work more comfortably with Julia scripts, a development environment such as IJulia, Sublime Text, or LightTable is advisable. Chapter 1, Installing the Julia Platform, contains detailed instructions to set up your Julia environment.

Who this book is for

This book is intended for the data scientist and for all those who work in technical and scientific computation projects. It will get you up and running quickly with Julia to start simplifying your projects applications. The book assumes that you already have some basic working knowledge of high-level dynamic languages such as MATLAB, R, Python, or Ruby.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of.

To send us general feedback, simply e-mail <[email protected]>, and mention the book's title in the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files from your account at http://www.packtpub.com for all the Packt Publishing books you have purchased. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title.

To view the previously submitted errata, go to https://www.packtpub.com/books/content/support and enter the name of the book in the search field. The required information will appear under the Errata section.

Piracy

Piracy of copyrighted material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at <[email protected]> with a link to the suspected pirated material.

We appreciate your help in protecting our authors and our ability to bring you valuable content.

Questions

If you have a problem with any aspect of this book, you can contact us at <[email protected]>, and we will do our best to address the problem.

The Rationale for Julia

This introduction will present you with the reasons why Julia is quickly growing in popularity in the technical, data scientist, and high-performance computing arena. We will cover the following topics:

The scope of JuliaJulia's place among other programming languagesA comparison with other languages for the data scientistUseful links

The scope of Julia

The core designers and developers of Julia (Jeff Bezanson, Stefan Karpinski, and Viral Shah) have made it clear that Julia was born out of a deep frustration with the existing software toolset in the technical computing disciplines. Basically, it boils down to the following dilemma:

Prototyping is a problem in this domain that needs a high-level, easy-to-use, and flexible language that lets the developer concentrate on the problem itself instead of on low-level details of the language and computation.The actual computation of a problem needs maximum performance; a factor of 10 in computation time makes a world of difference (think of one day versus ten days), so the production version often has to be (re)written in C or FORTRAN.Before Julia, practitioners had to be satisfied with a "speed for convenience" trade-off, use developer-friendly and expressive, but decades-old interpreted languages such as MATLAB, R, or Python to express the problem at a high level. To program the performance-sensitive parts and speed up the actual computation, people had to resort to statically compiled languages such as C or FORTRAN, or even the assembly code. Mastery on both the levels is not evident: writing high-level code in MATLAB, R, or Python for prototyping on the one hand, and writing code that does the same thing in C, which is used for the actual execution.

Julia was explicitly designed to bridge this gap. It gives you the possibility of writing high-performance code that uses CPU and memory resources as effectively as can be done in C, but working in pure Julia all the way down, reduces the need for a low-level language. This way, you can rapidly iterate using a simple programming model from the problem prototype to near-C performance. The Julia developers have proven that working in one environment that has the expressive capabilities as well as the pure speed is possible using the recent advances in Low Level Virtual Machine Just in Time (LLVM JIT) compiler technologies (for more information, see http://en.wikipedia.org/wiki/LLVM).

In summary, they designed Julia to have the following specifications:

Julia is open source and free with a liberal (MIT) license.It is designed to be an easy-to-use and learn, elegant, clear and dynamic, interactive language by reducing the development time. To that end, Julia almost looks like the pseudo code with an obvious and familiar mathematical notation; for example, here is the definition for a polynomial function, straight from the code:
x -> 7x^3 + 30x^2 + 5x + 42

Notice that there is no need to indicate the multiplications.

It provides the computational power and speed without having to leave the Julia environment.Metaprogramming and macro capabilities (due to its homoiconicity (refer to Chapter 7, Metaprogramming in Julia), inherited from Lisp), to increase its abstraction power.Also, it is usable for general programming purposes, not only in pure computing disciplines.It has built-in and simple to use concurrent and parallel capabilities to thrive in the multicore world of today and tomorrow.

Julia unites this all in one environment, something which was thought impossible until now by most researchers and language designers.

The Julia logo

Julia's place among the other programming languages

Julia reconciles and brings together the technologies that before were considered separate, namely:

The dynamic, untyped, and interpreted languages on the one hand (Python, Ruby, Perl, MATLAB/Octave, R, and so on)The statically typed and compiled languages on the other (C, C++, Fortran, and Fortress)

How can Julia have the flexibility of the first and the speed of the second category?

Julia has no static compilation step. The machine code is generated just-in-time by an LLVM-based JIT compiler. This compiler, together with the design of the language, helps Julia to achieve maximal performance for numerical, technical, and scientific computing. The key for the performance is the type information, which is gathered by a fully automatic and intelligent type inference engine, that deduces the type from the data contained in the variables. Indeed, because Julia has a dynamic type system, declaring the type of variables in the code is optional. Indicating types is not necessary, but it can be done to document the code, improve tooling possibilities, or in some cases, to give hints to the compiler to choose a more optimized execution path. This optional typing discipline is an aspect it shares with Dart. Typeless Julia is a valid and useful subset of the language, similar to traditional dynamic languages, but it nevertheless runs at statically compiled speeds. Julia applies generic programming and polymorphic functions to the limit, writing an algorithm just once and applying it to a broad range of types. This provides common functionality across drastically different types, for example: size is a generic function with 50 concrete method implementations. A system called dynamic multiple dispatch efficiently picks the optimal method for all of a function's arguments from tens of method definitions. Depending on the actual types very specific and efficient native code implementations of the function are chosen or generated, so its type system lets it align closer with primitive machine operations.

Note

In summary, data flow-based type inference implies multiple dispatch choosing specialized execution code.

However, do keep in mind that types are not statically checked. Exceptions due to type errors can occur at runtime, so thorough testing is mandatory. As to categorizing Julia in the programming language universe, it embodies multiple paradigms, such as procedural, functional, metaprogramming, and also (but not fully) object oriented. It is by no means an exclusively class-based language such as Java, Ruby, or C#. Nevertheless, its type system offers a kind of inheritance and is very powerful. Conversions and promotions for numeric and other types are elegant, friendly, and swift, and user-defined types are as fast and compact as built-in types. As for functional programming, Julia makes it very easy to design programs with pure functions and has no side effects; functions are first-class objects, as in mathematics.

Julia also supports a multiprocessing environment based on a message passing model to allow programs to run via multiple processes (local or remote) using distributed arrays, enabling distributed programs based on any of the models for parallel programming.

Julia is equally suited for general programming as is Python. It has as good and modern (Unicode capable) string processing and regular expressions as Perl or other languages. Moreover, it can also be used at the shell level, as a glue language to synchronize the execution of other programs or to manage other processes.

Julia has a standard library written in Julia itself, and a built-in package manager based on GitHub, which is called Metadata, to work with a steadily growing collection of external libraries called packages. It is cross platform, supporting GNU/Linux, Darwin/OS X, Windows, and FreeBSD for both x86/64 (64-bit) and x86 (32-bit) architectures.

A comparison with other languages for the data scientist

Because speed is one of the ultimate targets of Julia, a benchmark comparison with other languages is displayed prominently on the Julia website (http://julialang.org/). It shows that Julia's rivals C and Fortran, often stay within a factor of two of fully optimized C code, and leave the traditional dynamic language category far behind. One of Julia's explicit goals is to have sufficiently good performance that you never have to drop down into C. This is in contrast to the following environments, where (even for NumPy) you often have to work with C to get enough performance when moving to production. So, a new era of technical computing can be envisioned, where libraries can be developed in a high-level language instead of in C or FORTRAN. Julia is especially good at running MATLAB and R-style programs. Let's compare them somewhat more in detail.

MATLAB

Julia is instantly familiar to MATLAB users; its syntax strongly resembles that of MATLAB, but Julia aims to be a much more general purpose language than MATLAB. The names of most functions in Julia correspond to the MATLAB/Octave names, and not the R names. Under the covers, however, the way the computations are done, things are extremely different. Julia also has equally powerful capabilities in linear algebra, the field where MATLAB is traditionally applied. However, using Julia won't give you the same license fee headaches. Moreover, the benchmarks show that it is from 10 to 1,000 times faster depending on the type of operation, also when compared to Octave (the open source version of MATLAB). Julia provides an interface to the MATLAB language with the package MATLAB.jl (https://github.com/lindahua/MATLAB.jl).

R

R was until now the chosen development language in the statistics domain. Julia proves to be as usable as R in this domain, but again with a performance increase of a factor of 10 to 1,000. Doing statistics in MATLAB is frustrating, as is doing linear algebra in R, but Julia fits both the purposes. Julia has a much richer type system than the vector-based types of R. Some statistics experts such as Douglas Bates heavily support and promote Julia as well. Julia provides an interface to the R language with the package Rif.jl (https://github.com/lgautier/Rif.jl).

Python

Again, Julia has a performance head start of a factor of 10 to 30 times as compared to Python. However, Julia compiles the code that reads like Python into machine code that performs like C. Furthermore, if necessary you can call Python functions from within Julia using the PyCall package (https://github.com/stevengj/PyCall.jl).

Because of the huge number of existing libraries in all these languages, any practical data scientist can and will need to mix the Julia code with R or Python when the problem at hand demands it.

Julia can also be applied to data analysis and big data, because these often involve predictive analysis, modeling problems that can often be reduced to linear algebra algorithms, or graph analysis techniques, all things Julia is good at tackling.

In the field of High Performance Computing (HPC), a language such as Julia has long been lacking. With Julia, domain experts can experiment and quickly and easily express a problem in such a way that they can use modern HPC hardware as easily as a desktop PC. In other words, a language that gets users started quickly without the need to understand the details of the underlying machine architecture is very welcome in this area.

Useful links

The following are the links that can be useful while using Julia:

The main Julia website can be found at http://julialang.org/For documentation, refer to http://docs.julialang.org/en/latestView the packages at http://pkg.julialang.org/indexorg.htmlSubscribe to the mailing lists at http://julialang.org/community/Get support at an IRC channel from http://webchat.freenode.net/?channels=julia

Summary

In this introduction, we gave an overview of Julia's characteristics and compared them to the existing languages in its field. Julia's main advantage is its ability to generate specialized code for different input types. When coupled with the compiler's ability to infer these types, this makes it possible to write the Julia code at an abstract level while achieving the efficiency associated with the low-level code. Julia is already quite stable and production ready. The learning curve for Julia is very gentle; the idea being that people who don't care about fancy language features should be able to use it productively too and learn about new features only when they become useful or needed.

Chapter 1. Installing the Julia Platform

This chapter guides you through the download and installation of all the necessary components of Julia. The topics covered in this chapter are as follows:

Installing JuliaWorking with Julia's shellStart-up options and Julia scriptsPackagesInstalling and working with Julia StudioInstalling and working with IJuliaInstalling Sublime-IJuliaInstalling JunoOther editors and IDEsWorking of Julia

By the end of this chapter, you will have a running Julia platform. Moreover, you will be able to work with Julia's shell as well as with editors or integrated development environments with a lot of built-in features to make development more comfortable.

Installing Julia

The Julia platform in binary (that is, executable) form can be downloaded from http://julialang.org/downloads/. It exists for three major platforms (Windows, Linux, and OS X) in 32- and 64-bit format, and is delivered as a package or in an archive format. You should use the current official stable release when doing serious professional work with Julia (at the time of writing, this is Version 0.3). If you would like to investigate the latest developments, install the upcoming version (which is now Version 0.4). The previous link contains detailed and platform-specific instructions for the installation. We will not repeat these instructions here completely, but we will summarize some important points.

Windows version – usable from Windows XP SP2 onwards

You need to keep the following things in mind if you are using the Windows OS:

As a prerequisite, you need the 7zip extractor program, so first download and install http://www.7-zip.org/download.html.Now, download the julia-n.m.p-win64.exe file to a temporary folder (n.m.p is the version number, such as 0.2.1 or 0.3.0; win32/win64 are respectively the 32- and 64-bit version; a release candidate file looks like julia-0.4.0-rc1-nnnnnnn-win64 (nnnnnnn is a checksum number such as 0480f1b).Double-click on the file (or right-click, and select Run as Administrator if you want Julia installed for all users on the machine). Clicking OK on the security dialog message, and then choosing the installation directory (for example, c:\julia) will extract the archive into the chosen folder, producing the following directory structure, and taking some 400 MB of disk space:

The Julia folder structure in Windows

A menu shortcut will be created which, when clicked, starts the Julia command-line version or Read Evaluate Print Loop (REPL), as shown in the following screenshot:

The Julia REPL

On Windows, if you have chosen C:\Julia as your installation directory, this is the C:\Julia\bin\julia.exe file. Add C:\Julia\bin to your PATH