(fork! me :on :github)

Pink Gorilla

An interactive notebook for Clojure land - resurrected 2019

Pink GorillaGitHub Actions status |pink-gorilla/gorilla-notebookClojars Project

WTF Jupther

Via Docker Image

prebuild docker images

We provide uberjar Docker images which can be run as follows:

docker run --rm -p 9000:9000 pinkgorillawb/gorilla-notebook:jdk

If you want some samples to play with, you may want to clone and mount the samples repo into the container:

git clone https://github.com/pink-gorilla/sample-notebooks
docker run --rm -p 9000:9000 -v `pwd`/sample-notebooks/samples:/work/sample-notebooks:rw pinkgorillawb/gorilla-notebook:jdk
docker run -p 9000:9000 -v `pwd`/.m2:/root/.m2:rw -v `pwd`/notebooks:/tmp/notebooks:rw --rm clojure:tools-deps clojure -Sdeps '{:deps {org.pinkgorilla/gorilla-notebook {:mvn/version "0.4.9"}}}' -m pinkgorilla.core

via ctr.run

If you aim at running a Docker image built on demand from git by ctr.run (which is awesome) you can

docker run -p 9000:9000 -v `pwd`/.m2:/root/.m2:rw ctr.run/github.com/pink-gorilla/gorilla-notebook:a-branch-name gorilla-notebook.sh -c /root/.m2/custom.edn

custom build docker image

docker build --rm -t me/gorilla-notebook:builder .

inside a servlet container

The uberjar may also work by just dropping it into another webapp (in WEB-INF/lib) . Whether you are lucky or not depends on the dependencies of your app. If all goes well, Pink Gorilla will appear at .../your-app-context/gorilla-repl/worksheet.html.

./script/build-uberwar.sh

should give you the standalone war file. Drop it into your servlet container and visit the root url of the webapp.

from source

npm install
./script/build-uberjar.sh

The uberjar is what the Docker image uses. It can be run by executing

java -jar target/gorilla-notebook-standalone.jar

Development

npm install
lein build-tailwind-dev
./script/run-repls-with-jpda.sh

builds css and spins up the webserver and a Shadow CLJS build with JPDA debugging. NREPL should be serving you Clojure and ClojureScript at port 8703.

There are a bunch of aliases in project.clj you might want to check. Try

lein help

VS Code repl

FAQ

Is Gorilla Notebook ready for day to day use?

The future is uncertain, but we are not aware of any technical issues which should be holding back users.

What about migration from Gorilla REPL?

Being a decendant from Gorilla REPL we aim at a smooth migration path for the brave and also remain backwards compatible. However:

Extensibility

We try to keep the code shipping with the bare notebook application minimal and aim at runtime customization where possible. The application (Jar/Uberjar/Docker Image) ships two flavors:

We support JVM library (pomegranate)-, ClojureScript- and JavaScript (requirejs) extensibility at runtime.

Contributing

Contribution of pretty much any kind is welcome. Feel free to get in touch. We are on Clojurians Slack and on Clojurians Zulip #PinkGorillaDev.

History

In 2016, Andreas was working on the first iteration of Gorilla REPL modernisation. Amongst other things, Reagent was introduced at that time. Unfortunately, it went silent - for almost three years. This issue revived the project.