@rdiaz02 and @patrick
I didn’t answer before because I don’t have that really prepared carefully.
I do have some short notes here:
But reading such notes (and, IMHO, reading these instructions in general) doesn’t give the user the correct idea. A small demonstration is usually much better. A small video is here illustrating the use of Revise.
But, basically, what one needs is to keep the REPL open, but develop the code mostly in files, which are tracked by Revise. Put the code in functions, even one when is just plotting something, like:
# file: myplot.jl
plot(data, linewidth=2, color=:blue, label="test")
Because then you can, in the REPL, use something like:
julia> using Revise # normally started always by default in your startup.jl file
julia> data = readdlm("mydata.dat")
julia> myplot(data) # this gets you the first plot, and may take some seconds
# change something in the `myplot` function above
julia> myplot(data) # this is fast now, and tunning the plot is easy
# change the data
julia> data2 = readdlm("./mynewdata.dat")
With that the responsiveness of the development is really good, better than other alternatives, because you don’t need anymore to worry about compiling anything, rerunning the script, etc. Just modify the function (
myplot) in this case in the corresponding file, and run it again in the REPL.
If you are developing a package, then the same thing holds, but then the
includet will be substituted by
using your package, which is loaded installed as a
dev package in the environment.