There are some scripts that I find convenient to code in elisp, and I like to be able to run these with little startup time.
The natural solution is to use `emacs --batch --eval` together with `server-eval-at` to reuse an already loaded server, but this solution needs a lot of throwaway servers already started and a load balancer. (Is there a Jupyter kernel for elisp? I already have a prototype server (https://github.com/NightMachinary/JupyterGarden
) that starts throwaway Jupyter kernels and load-balances requests to them.)
If the server could just fork, eval the request, return it, and die, everything would be easy and painless.
The fork API could be:
(let-fork ((some_val (expensive_compute)) ...)
(message "Computed: %s" some_val)))
Where emacs forks for every binding, and computes the results, and finally, asynchronously calls the supplied callback function with all of the bindings available, similar to a closure.
I am sure there are better API designs, but my point is that this fork API should be very easy and work with synchronous third-party code, just like a shell (or GNU Parallel). Parallelism via multiprocessing should be easy and painless.
The third-party packages for parallelism that I have skimmed, start a fresh emacs instance, and do not fork, which is useless, as all the needed data and behavior needs to be manually reloaded by the user.
PS: Please use reply-to-all, I am not currently subscribed to the list. Thank you.