Having difficulties applying Julia

Hi,

I’m new to Julia and not what I would call an advanced programmer. I’m an engineer and I and know some languages including C and Python. I found Julia and find it very interesting.

I’d like to explain my problem of getting into Julia with an example: I often use programming to deal with data from measurements. I have large sets of various data, mostly in form of excel sheets or csv. To analyse these data I most often use Python. To do this, I use Spyder, write the necessary code (e.g. load exel data, perform some math-magic, draw some plots and spit out some values). I then have finished “scripts” i can always execute when i have new data to be analysed, or change/add functionality of the code.

I now found julia very promising, because it seems to have an even easier way to work with vectors, arrays or complex numbers.

But I cant seem to find an IDE that I can write my code and execute it, change a line, execute again …

I found the Julia console, which is not very applicable for my use case. Also stuff like Jupiter notebooks and alike seems like a terrible solution for my use case (or i just dont understand how to employ that). I installed JuliaPRO/Atom, which looks somewhat similar to Sypder, but there is no way of simply writing code in a file, press a Run button and have the code executed and your results in the console.

Can you maybe point me to a programming environment that is similar to Spyder for Python?

Thanks

I’m not sure I understand how JuliaPRO/Atom (I assume you mean the Juno part of JuliaPro) does not achieve your aim? You can simply write a *.jl file and hit the run button (or Ctrl+Enter) to execute the code in the file and see the results in the integrated REPL and/or plot pane.

Could you explain what you’re missing from this?

1 Like

I’m pretty sure JuliaPro/JunoLab/Atom should have that functionality. That is the ‘default’ programming environment for Julia, I think it is safe to say. You can also try out VS Code with the Julia plugin for similar functionality.

1 Like

Well… I seem to be missing the run button …

I see that Ctrl+Enter runs the line the cursor is in, but not the whole script.

Anyway, I dont see any buttons at all in Atom… and in the pulldown menus there is no run also.

uber-juno for atom, and julilang for vscode allow this. When your cursor is on a line of code you push (command+return) for atom and (control+return) in vscode.

Here are screenshots with 0.6.2, since you are using JuliaPro and m understanding is that JuliaPro is still on 0.6.

I think the shortcut for running the whole file is Ctrl+shift+enter? Not at a computer so can’t check at the moment.

Atom itself is just a text editor (developed by GitHub) and not specifically built for Julia. The Juno packages turns it I to a Julia IDE with a bunch of extra functionality. IIRC it used to add a sidebar with buttons, though now that you bring it up I haven’t seen them for a while. I never used them (the keyboard shortcuts are what I use).

1 Like

If all you have is ‘a script’ which you want to run, you can simply run it in the REPL by including it:

include("C:\\temp\\myscript.jl")

This will run all of the code (which itself might read and write data/plots).

you can also load the file into a REPL

julia> include("luhn_algo.jl")
#or
julia> include("PATH_TO_FILE.jl")

Ah … I just found out its ALT+Enter … problem solved.

Thanks !

1 Like