One REPL to Rule Them All

Sep 11, 2016

For the last few weeks I’ve had 3 Clojure related terminals:

  1. lein trampoline run
  2. lein trampoline figwheel
  3. 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:

  1. lein trampoline repl.
  2. import and start clj project.
  3. 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):

;; lein trampoline repl
(use 'project.core)
(start-app [])
(use 'figwheel-sidecar.repl-api)

tags: [ clojure testing ]