3 ms·
Good question. At the beginning of my work day, I open Emacs with Cider installed, and start a JVM inside there using Cider (M-x cider-jack-in), and do all my
by sdegutis 10y ago
Good question.
At the beginning of my work day, I open Emacs with Cider installed, and start a JVM inside there using Cider (M-x cider-jack-in), and do all my work in the same JVM all day.
Because we make heavy use of immutability, it's easy to completely tear down all our existing namespaces and the single global variable representing the app, reload all namespaces and their functions, recreate a new app instance, and start it. And I bound all this to Cmd-R in Emacs.
So any time I make a change to our web app during development, I just hit Cmd-R and it reloads the entire app in about 0.2 seconds. I don't even notice it, honestly.
This is better than what we used to do, which was to poll the disk for changes to any files, and reload them when they've changed. That was much harder on the disk, and half the time I'm saving, I'm not ready for its code to be reloaded yet anyway.
For tests, we just use Cider's built-in features, which let us either run the tests whose code changed, or all tests, depending on what we want to test.
- JBReefer 10y agothanks for the write up, real work examples are so useful!