A single-shot nREPL client designed for shell invocation
Branch: develop
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci
deps Add deps to image Jan 7, 2019
doc Initial commit Nov 30, 2018
rc
src
test/rep
.gitignore
CHANGELOG.adoc
LICENSE Initial commit Nov 30, 2018
Makefile kakoune: Installation script and instructions Dec 20, 2018
README.adoc
project.clj Prepare for more development Feb 18, 2019
reflectconfig.json
rep.1.adoc First use of --print removes defaults for that key Feb 2, 2019

README.adoc

rep

A single-shot nREPL client designed for shell invocation.

This connects to a running nREPL server (like kind started with lein repl, for example), sends some code to be evaluated, and prints the results and output.

$ rep '(clojure.tools.namespace.repl/refresh)'
:reloading ()
:ok

Unlike other nREPL clients, rep does not try to maintain a persistent connection, meaning that thread-local variables and bindings like *e and *1 will not persist across invocations of rep. Perhaps there are other limitations because of this?

Installation

Download the latest Linux or MacOS binaries from the GitHub releases tab above.

Building with Graal

This is a somewhat graaling process right now, so bear with me.

You’ll first need to install GraalVM.

Graal currently (rc11) has some issues with some of the bytecode that Clojure creates (see below), so we need to use a patched clojure and spec.alpha. The .circleci/images/primary/build.sh script will build and install these into your local maven repository. The script requires a maven install.

You will need at least, and possibly exactly, leiningen 2.8.3, due to how it attempts to side-load nREPL. It is available as deps/lein.

$ deps/lein native-image

You will find it in 'target/default+uberconf/rep'.

Usage, Options, and Examples

Using with Kakoune

The rc/ folder contains scripts which add a ,e user mode to Kakoune. To link this to Kakoiune’s autoload directory, do the following:

$ make install

rep must be in the path for the plugin to work.

Graal/Bytecode Issues

At the moment, Graal doesn’t deal well with the way Clojure generates bytecode from its 'locking' macro, so to build bytecode that Graal can handle, we need to apply this patch. This issue is being tracked here and here.

License

Copyright © 2018 Jason M. Felice, except for included code written by other people.

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.