One REPL to Rule Them All
Sep 11, 2016
For the last few weeks I’ve had 3 Clojure related terminals:
- lein trampoline run
- lein trampoline figwheel
- lein trampoline repl
I’m sure Clojure veterans are screaming, “Oh the humanity!!! why?”
I’ve increasingly been unsettled with this workflow on my low spec (4GB RAM) MacBook Air it’s brutal in terms of memory consumption. Trying to pinch every ounce of performance out of my Air I think I might’ve found a better (read less memory intensive) workflow:
- lein trampoline repl.
- import and start clj project.
- import and use figwheel-sidecar.
This gets everything into one repl and reduces the memory overhead of my previous workflow by about 1/2 the memory usage.
I suspect there will be all sorts of new issues that I’ll need to address but I’ll take them for a lower memory footprint.
In excrutiating detail the start up is (see the sidecar wiki for project config):
1
2
3
4
5
;; lein trampoline repl
(use 'project.core)
(start-app [])
(use 'figwheel-sidecar.repl-api)
(start-figwheel!)