Update October 2019: The project has resurrected. Current state of affairs is here on Github.
TL;DR: I love the REPL experience. I wanted a ClojureScript ? project. I picked Gorilla REPL. Scope increased all the time. You may find the result useful now.
History & Motivation
Current State of all the Things
Fast forward to today. At this time, I consider mostly working/ok:
- ClojureScript migration of application client code
- Recent versions of dependency libraries
- Parinfer (optional)
- Separate, dedicated nREPL middleware stack
- Figwheel/Devcards/Testing (latter bare bones)
- Componentized (incl. Tesla-Microservice)
- Standalone uberjar / Docker image
- Drop in uberjar capabilities (dropping the uberjar into some WEB-INF/lib should work … sometimes)
- Standalone uberwar
- Roll in jar (use as a library)
- Proxy based loading of remote worksheets (in case CORS is not in place)
- Pomegranate dependencies for non leiningen based deployments
Work in progress/experimental stage:
- Remote nREPL delegation
- Client/Browser REPL (replumb)
- Clojail execution
- Mobile/PWA capabilities
- Clean up messy places (e.g. nREPL code /Ring handlers)
- Error handling
- Node.js backend
On the radar:
- Implementing tests
- Better extensibility
- Interruptable eval
- Improve composabitly of (ring) handlers
- Code sharing UI/services
- Revisit (Clo)Jupyter
- Peridically save to localStorage
- Introduce garden
Other than that, some of the open issues have been addressed.
I tried really hard to remain backwards compatible and preserve existing functionality. Given the nature of reagent, this did not seem reasonably possible with regards to persisted html in worksheets. I ended up introducing version 2 persistence (transit based) while still supporting version 1 persistence (shamelessly discarding output).
Given my limited resources and the sheer amount of changes, I am sure I introduced a bunch of new issues.
Here are a few „new“ sample use cases I have been playing around with. The standard Leiningen based usage (which is hopefully still working) is not covered.
There are two Docker images. A 200MB
0.3.6-alpine version which should be fine for pretty much anything other than Spark (… all in one process that is due to native library loading issue), and a full blown 400MB
docker run --name gorilla-repl -p 9000:9000 deas/gorilla-repl:0.3.6-alpine
and open a fresh worksheet. Shift+Enter evaluates the active code segment, Alt+Shift+Enter the whole sheet. Alternatively, if you are into Big Data, you might want to try the sparkling ✨ example instead. Be patient with that one – downloading and launching Spark(ling) takes a moment
Download the standalone.jar, run
java -jar target/gorilla-repl-ng-standalone.jar
and open a fresh worksheet. The sparkling link above should work just as well.
This file may also work as an „all-in drop in“ for webapps (try putting it in
For convenience, I rolled gorilla REPL into lambdalf. Download the repo extension, put it in
/opt/alfresco/modules/platform, restart the server and you should find a fresh worksheet here. The MIME type example should work as well.
JEE War File
I don’t have a lot of sample worksheets to offer. You might want to look at Jony’s test repository over at github for some inspiration.
I had a chat with the Jony Hudson (the original author) and Ben Bailey. At this time, Jony seems fairly busy with other things and I don’t expect him to put a lot of effort into Gorilla REPL in the near future.
Nothing is set in stone. Experiments will be reverted if it turns out they do more harm than good. Using a Node as a backend (working) appears awesome – just as using Spark on top of Alfresco. Still, I personally don’t have a meaningful use case … yet. :)
For now, the long term goals are to expand use cases while keeping the software stable/compatible and development fun. Short term goal is cleaning things up and adding tests.
If you feel like jumping in, you are welcome! Source along with instructions to get started hacking on it are on Github. Don’t expect things to be perfect. There surely are traces of migration and experimentation.
Finally, I want to thank all the people who built the stuff my work is based on. ?