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 Programming Projects

You're reading from   Julia Programming Projects Learn Julia 1.x by building apps for data analysis, visualization, machine learning, and the web

Arrow left icon
Product type Paperback
Published in Dec 2018
Publisher Packt
ISBN-13 9781788292740
Length 500 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Adrian Salceanu Adrian Salceanu
Author Profile Icon Adrian Salceanu
Adrian Salceanu
Arrow right icon
View More author details
Toc

Table of Contents (13) Chapters Close

Preface 1. Getting Started with Julia Programming FREE CHAPTER 2. Creating Our First Julia App 3. Setting Up the Wiki Game 4. Building the Wiki Game Web Crawler 5. Adding a Web UI for the Wiki Game 6. Implementing Recommender Systems with Julia 7. Machine Learning for Recommender Systems 8. Leveraging Unsupervised Learning Techniques 9. Working with Dates, Times, and Time Series 10. Time Series Forecasting 11. Creating Julia Packages 12. Other Books You May Enjoy

Choosing an IDE

An IDE is very important when working with a programming language. A powerful source code editor, code completion, and a good linter and debugger can significantly influence the learning curve and the productivity of using a language. You will be happy to learn that there are some very good IDE and editor options for Julia—and chances are you'll find your favorite one among these.

The IDE choices reflect the pragmatism of the language as a whole. From choosing LLVM as the compiler to providing efficient ways for calling functions from other languages, to using git and GitHub to power the package manager, the Julia core team takes a don't reinvent the wheel approach. Following the same line of thinking, the Julia community has built powerful IDEs upon existing industry established editors, such as Atom and Visual Studio Code.

Juno (Atom)

Juno (http://junolab.org) is the most advanced Julia IDE and the de facto editor of choice for Julia professionals. It is based on the Atom editor and it can be considered the official development tool, being also distributed with the previously mentioned JuliaPro distribution.

To get it, either download and install JuliaPro from https://juliacomputing.com/products/juliapro.html or do a manual install of Atom and the required plugins.

If you choose the manual install, first you need to download Atom from https://atom.io. Once it's up and running, go to the Settings pane (you can use the shortcut Ctrl/cmd and ,) and then go to the Install panel. Type uber-juno into the search box and press Enter. Next, click the install button on the package with the same name. Atom will pick it up from here, installing all the required Atom and Julia packages.

Once configured, the IDE options will be available in Atom's menu, under Packages > Julia. Various panes can also be enabled from here, to list variables, visualize plots, or search the documentation.

For further information, check out http://junolab.org and https://github.com/JunoLab/uber-juno/blob/master/setup.md.

Visual Studio Code

Visual Studio Code is a cross-platform extendable editor from Microsoft. It is available for all the big three platforms at https://code.visualstudio.com. Once installed, run it and from the menu click View > Extensions or use the shortcut Shift and Ctrl/cmd and X. Search for julia and install the Julia extension from julialang.

The Julia support in Visual Studio Code is not (yet) as powerful as Juno, but if you prefer it, it makes for a great coding experience, providing syntax highlighting, code completion, hover help, evaluation of Julia code, linting, code navigation, and more. Visual Studio Code is also snappier and uses fewer resources than Atom, which makes it an appealing option when running on a less powerful workstation (although Atom has greatly improved in this regard with recent versions).

The extension might need a bit of help figuring out where it can find the Julia binary. If that is the case, you'll get an informative error message, asking you to set the julia.executablePath configuration option. This should point to the julia binary, and depends on your operating system and the way you installed Julia (see the previous section for details on the installation).

To set the configuration, go to Preferences > Settings (Ctrl/cmd and ,) and in the right pane, the one used to overwrite the defaults, add the following:

"julia.executablePath": "/path/to/your/julia/folder/bin/julia" 

IJulia (JuliaBox)

We already mentioned JuliaBox (https://www.juliabox.com) in the previous section—it allows creating, editing, and running IJulia Jupyter notebooks in the cloud. IJulia can also be installed on the local development machine.

IJulia is a Julia language backend for the Jupyter interactive environment (also used by IPython). It allows us to interact with the Julia language using Jupyter/IPython's powerful graphical notebook, which combines code, formatted text, math, and multimedia in a single document.

Although IJulia/Jupyter is not really an IDE, nor a classical editor, it is a powerful environment for editing and executing Julia scripts, and it's especially popular for data science and scientific computing. Let's take a few moments to set it up.

Start a new Julia REPL and execute the following:

julia> using Pkg
julia> Pkg.add("IJulia")

This will install the IJulia package, while also adding a required minimal Python and Jupyter distribution called Miniconda. This Python distribution is private to Julia (not in your PATH). Once finished, continue by executing the following:

julia> using IJulia
julia> notebook()

This will open the home page of your local Jupyter install in your default browser, at http://localhost:8888/tree. From the toolbar choose New > Julia 1.0.0 (or whatever version you are currently running) to create a new notebook. You can now create rich documents using embedded executable Julia code.

There's another way of running IJulia as a desktop app, through Interact. You can download it and give it a try at https://nteract.io/desktop.

If you're new to Jupyter, it's worth learning more about it. Go check it out at http://jupyter.org.

You can also find IJulia notebooks for each chapter in this book in the chapter's support file repository. The notebooks will allow you to go through the code we're writing, step by step. For instance, you can find the code for this chapter at https://github.com/PacktPublishing/Julia-Programming-Projects/blob/master/Chapter01/Chapter%201.ipynb. You can download it on your computer and open it with the local IJulia installation, or upload it to JuliaBox through their Google Drive integration.

Other options

The preceding choices are the most common IDE and editor options for Julia. But there are a few more out there.

For the vim enthusiasts, there's also julia-vim (https://github.com/JuliaEditorSupport/julia-vim).

If you prefer Emacs, you'll be pleased to know that Julia supports it as well https://github.com/JuliaEditorSupport/julia-emacs.

If you'd rater go with one of the IDEs provided by JetBrains (like IntelliJ IDEA), you'll be happy to hear that a plugin is available, at https://plugins.jetbrains.com/plugin/10413-julia

Finally, there is also support for Sublime Text, available at https://github.com/JuliaEditorSupport/Julia-sublime. The plugin provides a good Julia editing experience, supporting syntax highlighting, code completion, and jumping to definition, among other things.

You have been reading a chapter from
Julia Programming Projects
Published in: Dec 2018
Publisher: Packt
ISBN-13: 9781788292740
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