Juliad and julias, wrappers to DaemonMode and -J sysimage for quicker Linux/Cygwin scripts

FWIW, as an old linuxer, I have created for my own usage two scripts to facilitate the use of either sysimage or DaermonMode.jl to get faster frequently used scripts (=faster TTFX, Time to First X). Sorry, I have done this in bash shell, as a first step/prototyping step before writing that in pure Julia.

So I would like to have advices / comments about those prototype implementations. Please take a look to juliad (for julia local d aemon) and julias (for julia s ysimage) at https://github.com/jdadavid/juliashellutils and comment and suggest! Many thanks in advance.

Excerpts from the Readme

julias : Julia launcher wrapper for using local JuliaSysimage.[dll|so] if its exists and is up to date
Usage : julias : [+h] [+v|+q] [+f] [+J juliax] [julia_options] file.jl [args]
launch Julia with sysimage "JuliaSysimage.[dll|so]" if found
   +h : this help
   +v : verbose
   +q : quiet (no warnings, e.g. about out of date or force)
   +f : force use of sysimage even if out of date
   +J juliax : use juliax executable for julia
juliad : launches Julia daemon server (if necessary),  and client, to execute julia file with reduced TTFX
#  wraps excellent DaemonMode by @dmolina (see https://github.com/dmolina/DaemonMode.jl)
#  You must have added DaemonMode to the project that will be used (or the default v1.x env)
Usage  : juliad [+h] [+v] [+l] [+k] [+s] [+J juliax] [julia_options] file.jl [args]
    +h : this help
    +v : verbose (vs launching steps)
    +l : list running server and exits
    +k : kill running server and exits
    +s : launch julia with startup file (default is without)
    +J juliax  : use "juliax" as julia executable
Notes:
  - the principle is to lauch one daemon per directory (=project)
  - the script creates a local file '.juliad' which stores the status of a running daemon
  - as of current, status is (port used, julia_args(project, use_startup))
3 Likes

Regarding julias:

I have a similar script KiteSimulators.jl/run_julia at main Β· aenarete/KiteSimulators.jl Β· GitHub with the following differences:

  1. The script lives in the bin folder of a project
  2. It uses one sysimage per major Julia version because I often switch versions
  3. I have also a .bat version for Windows
2 Likes

Thanks for the comment, I will take a look to your scripts, including the β€œ.bat” one - for myself I use Linux, or cygwin on Windows (or, more and more, WSL2), so no real need for .bat, but could be a nice addition.

NB. I just update my julias and juliad scripts, changing command switch β€œ+” to β€œ=” so they can coexist with Juliaup/julia(launcher), which already used β€œ+” as switch.

1 Like

This looks cool, and has some really nice ideas, thanks for sharing. I have my own hacky version of this called juliab (interesting that people seems to go for julia + 1 letter). I also recently saw this vaguely similar thing too Tool: sysimage_creator for IJulia users

It would be interesting to see if these projects/ideas could be combined somehow.

2 Likes