Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Julia 1.0 Programming Cookbook

You're reading from   Julia 1.0 Programming Cookbook Over 100 numerical and distributed computing recipes for your daily data science work?ow

Arrow left icon
Product type Paperback
Published in Nov 2018
Publisher Packt
ISBN-13 9781788998369
Length 460 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Przemysław Szufel Przemysław Szufel
Author Profile Icon Przemysław Szufel
Przemysław Szufel
Bogumił Kamiński Bogumił Kamiński
Author Profile Icon Bogumił Kamiński
Bogumił Kamiński
Arrow right icon
View More author details
Toc

Table of Contents (12) Chapters Close

Preface 1. Installing and Setting Up Julia FREE CHAPTER 2. Data Structures and Algorithms 3. Data Engineering in Julia 4. Numerical Computing with Julia 5. Variables, Types, and Functions 6. Metaprogramming and Advanced Typing 7. Handling Analytical Data 8. Julia Workflow 9. Data Science 10. Distributed Computing 11. Other Books You May Enjoy

Julia IDEs

Integrated Desktop Environments (IDEs) are integrated tools that provide a complete environment for software development and testing. IDEs provide visual support for the development process, including syntax highlighting, interactive code editing, and visual debugging.

Getting ready

Before installing an IDE, you should have Julia installed (either from binaries or source), following the instructions given in previous recipes.

In the GitHub repository for this recipe, you will find the SublimeText.txt file that contains configuration for Sublime Text described in this recipe. The configuration process of other IDEs described in this recipe is completely done with a point and click interface.

How to do it...

The three most popular Julia IDEs are Juno, Microsoft Visual Studio Code, and Sublime Text. In subsequent sections, we discuss the installation process for each particular IDE. 

Juno

Juno is the recommended IDE for Julia development. The Juno IDE is available at http://junolab.org/. However, Juno runs as a plugin to Atom (https://atom.io/). Hence, in order to install Juno, you need to take the following steps:

  1. Make sure that you have installed Julia and added it to the command path (following the instructions given in previous sections).
  2. Download and install Atom, available at https://atom.io/.
  3. Once the installation is complete, Atom will start automatically.
  4. Press Ctrl + , (Ctrl key + comma key) to open the Atom settings screen.
  5. Select the Install tab.
  6. In the Search packages field, type uber-juno and press Enter.
  7. You will see the uber-juno package developed by JunoLab—click Install to install the package.
  8. In order to test your installation, click the Show console tab on the left.

Please note that when being run for the first time from Atom, Julia takes longer to start. This happens because Juno is installed along with several other packages that are being compiled before their first use. 

Microsoft Visual Studio Code

Note that at the time of publishing this book the Microsoft Visual Studio Code does not yet support Julia 1.0. However, since we believe that this support will be available very soon, we provide the instructions below.

The Microsoft Visual Studio Code editor can be obtained from https://code.visualstudio.com/. Simply download the installer executable and install using the default settings. After launching Visual Studio Code, perform the following steps:

  1. Click Extensions tab (or press Ctrl + Shift + X).

  2. In the search box, type julia. You will see Julia Language Support on the list. Click the green Install button to start the installation.

  3. Click File | New File to create a new, empty file.

  4. Click File | Save As... to save the newly created file. In the Save As... type drop-down list, select Julia (please note that the file type list might not be sorted alphabetically and Julia type might be at the bottom of the list).

  5. Open the Terminal tab and issue the julia command.

After following these steps, you will have a Julia file open in the editor and an active Julia Terminal. Pressing Ctrl + Enter will now send the currently highlighted code line to the Terminal to execute it.

Sublime Text

Another option for the IDE is utilizing the functionality of Sublime Text:

  1. If you are using Sublime Text, then add the package named Julia through Package Control.
  1. Next, the simplest thing to add is a custom build system for Julia (Tools | Build System | New Build System):
{
"cmd": ["ConEmu64", "/cmd", "julia -i", "$file"],
"selector": "source.julia"
}
  1. Now, you can execute an opened Julia script by pressing Ctrl + B in the console in interactive mode (-i switch).

The preceding example assumes that ConEmu64 and julia are defined in the search path. 

The only inconvenience of this method is that if there is an error in the Julia script, the console will be immediately terminated (a cleaner way to test your scripts is to keep your Terminal with Julia open) and use the include command, as explained in the recipe Useful options for interaction with Julia in this chapter. 

See also

You have been reading a chapter from
Julia 1.0 Programming Cookbook
Published in: Nov 2018
Publisher: Packt
ISBN-13: 9781788998369
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image