Stephen Smith's Blog

Musings on Machine Learning…

Getting Productive with Julia

with 3 comments


Julia is a programming language that is used quite extensively by the scientific community. It is open source, it just reached its version 1.0 milestone after quite a few years of development and it is nearly as fast as C but with many features associated with interpretive languages like R or Python.

There don’t seem to be many articles on getting all up and running with Julia, so I thought I’d write about some things that I found useful. This is all based on playing with Julia on my laptop running Ubuntu Linux.

Run in the Cloud

One option is to avoid any installation hassles is to just run in the cloud. You can do this with JuliaBox. JuliaBox gives you a Jupyter Notebook interface where you can either play with the various tutorials or do your own programming. Just beware the resources you get for free are quite limited and JuliaBox makes its money by charging you for additional time and computing power.

Sadly at this point, there aren’t very many options for running Julia in the cloud since the big AI clouds seem to only offer Python and R. I’m hoping that Google’s Kaggle will add it as an option, since the better performance will open up some intriguing possibilities in their competitions.

JuliaBox gives you easy direct access to all the tutorials offered from Julia’s learning site. Running through the YouTube videos and playing with these notebooks is a great way to get up to speed with Julia.

Installing Julia

Julia’s website documents how to install Julia onto various operating systems. Generally the Julia installation is just copying files to the right places and adding the Julia executable to the PATH. On Ubuntu you can search for Julia in the Ubuntu Software App and install it from there. Either way this is usually pretty easy straight forward. This gives you the ability to run Julia programs by typing “julia sourefile.jl” at a command prompt. If you just type “julia” you get the REPL environment for entering commands.

You can do quite a lot in REPL, but I don’t find it very useful myself except for doing things like package management.

If you like programming by coding in your favorite text editor and then just running the program, then this is all you need. For many purposes this works out great.

The Juno IDE

If you enjoy working in full IDE’s then there is Juno which is based on the open source Atom IDE. There are commercial variants of this IDE with full support, but I find the free version works just fine.

To install Juno you follow these instructions. Basically this involves installing the Atom IDE by downloading and running a .deb installation package. Then from within Atom, adding Julia support to the IDE.

Atom has integration with Julia’s debugger Gallium as well as provides a plot plane and access to watch variables. The editor is fairly good with syntax highlighting. Generally not a bad way to develop in Julia.


JuliaBox mentioned above uses Jupyter and runs it in the cloud. However, you can install it locally as well. Jupyter is a very popular and powerful notebook metaphor for developing programs where you see  the results of each incremental bit of code as you write it. It is really good at displaying all sorts of fancy formats like graphs. It is web based and will run a local web server that will use the local Julia installation to run. If you develop in Python or R, then you’ve probably already played with Jupyter.

To install it you first have to install Jupyter. The best way to do this is to use “sudo apt install jupyter”. This will install the full Jupyter environment with full Python support. To add Julia Jupyter support, you need to run Julia another way (like just entering julia to get the REPL) and type “Pkg.add(“IJulia”)”. Now next time you start Jupyter (usually by typing “jupyter notebook”), you can create a new notebook based on Julia rather than Python.

Julia Packages

Once you have the core Julia programming environment up and running, you will probably want to install a number of add-on packages. The package manager is call Pkg and you need to type “using Pkg” before using it. These are all installed by the Pkg.add(“”) command. You only need to add a package once. You will probably want to run “Pkg.update()” now and again to see if the packages you are using have been updated.

There are currently about 1900 registered Julia packages. Not all of them have been updated to Julia version 1.0 yet, so check the compatibility first. There are a lot of useful packages for things like machine learning, scientific calculations, data frames, plotting, etc. Certainly have a look at the package library before embarking on writing something from scratch.


These are currently the main ways to play with Julia. I’m sure since Julia is a very open community driven system, that these will proliferate. I don’t miss using the giant IDEs Visual Studio or Eclipse, these have become far too heavy and slow in my opinion. I find I evenly distribute my time between using Jupyter, Juno and just edit/run. Compared to Python it may appear their aren’t nearly as many tools for Julia, but with the current set, I don’t feel deprived.


Written by smist08

October 10, 2018 at 3:55 am

3 Responses

Subscribe to comments with RSS.

  1. Hi Stephen,

    Its about Sage300,

    I am getting null pointer error while connecting to Accpac.

    I am trying to connect through the following code:

    try {“inside try——-“);
    session = new Session(new ProgramSet(), new SharedDataSet(), sageConnectionConfig.get(USER_ID), sageConnectionConfig.get(SECRET), sageConnectionConfig.get(COMPANY_ID), new Date());“new7—–“+session);
    program = new Program(session, sageConnectionConfig.get(APP_ID), sageConnectionConfig.get(PROGRAM_NAME), sageConnectionConfig.get(APP_VERSION));
    } catch (Exception e) {“exception in connection—–“+e);
    }“Program Detail : ” + program.getProgramName());
    Please find the logs:

    INFO 2018-10-25 16:10:15,369 [http-8007-2] ( (getConnection) – Inside get Connection1 ……
    INFO 2018-10-25 16:10:15,369 [http-8007-2] ( (getConnection) – ProgramSet—\AccWin\AccPac
    INFO 2018-10-25 16:10:15,369 [http-8007-2] ( (getConnection) – SharedDataSet—–\\ZABEN0APP03\AccData\Accpac
    INFO 2018-10-25 16:10:15,369 [http-8007-2] ( (getConnection) – User—–mobipro
    INFO 2018-10-25 16:10:15,369 [http-8007-2] ( (getConnection) – Password: ontheroad
    INFO 2018-10-25 16:10:15,369 [http-8007-2] ( (getConnection) – CompanyName—–BSCDAT
    INFO 2018-10-25 16:10:15,369 [http-8007-2] ( (getConnection) – Date—–Thu Oct 25 16:10:15 CAT 2018
    INFO 2018-10-25 16:10:15,369 [http-8007-2] ( (getConnection) – APP_ID—–XZ
    INFO 2018-10-25 16:10:15,369 [http-8007-2] ( (getConnection) – PROGRAM_NAME—–XZ0001
    INFO 2018-10-25 16:10:15,369 [http-8007-2] ( (getConnection) – APP_VERSION—–61A
    INFO 2018-10-25 16:10:15,369 [http-8007-2] ( (getConnection) – inside try——-
    DEBUG 2018-10-25 16:10:15,369 [http-8007-2] ( () – Start Session(\AccWin\AccPac,\\ZABEN0APP03\AccData\Accpac,userID=mobipro,companyID=BSCDAT,sessionDate=Thu Oct 25 16:10:15 CAT 2018)
    ERROR 2018-10-25 16:10:15,385 [http-8007-2] ( (resolveException) – error in entity controller! null
    ERROR 2018-10-25 16:10:15,385 [http-8007-2] ( (resolveException) – error in entity controller! [Ljava.lang.StackTraceElement;@d38976
    INFO 2018-10-25 16:10:15,385 [http-8007-2] ( (resolveException) – info errorjava.lang.NullPointerException
    DEBUG 2018-10-25 16:10:15,385 [http-8007-2] ( (processRequest) – Could not complete request
    at com.mobicule.msales.integration.restful.controller.Sage300IntegrationController.postOrderEntry(
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

    If you compare logs and code, you will find that after it will not print New7 in logs, i.e we are getting null pointer error inside connection only.

    Also, we are having sage portal and sage component on different machine and can you please specify from where it is taking ProgramSet and SharedDataSet values and its impact?

    Please help!

    Ashish Bajaj

    October 29, 2018 at 7:03 am

    • It gets those values from the registry. It could be the Java program doesn’t have sufficient access rights for the network share.


      October 29, 2018 at 9:06 pm

      • Hi Stephen,

        Thank you for the quick response, but in addition we are having admin rights to the shared folder.
        Also when we are trying to post receipt in accpac through mobility application we are getting error: org.springframework.web.util.NestedServletException: Handler processing failed; nested exception is orgOpenSDD domain org value 1.

        I have search about this error but unable to get any information on this. Can you please help on this.

        Thank You for your support.

        Ashish Bajaj

        October 30, 2018 at 7:59 am

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: