• Stars
    star
    338
  • Rank 124,931 (Top 3 %)
  • Language
    Clojure
  • License
    Eclipse Public Li...
  • Created about 13 years ago
  • Updated about 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

REPL-y: A fitter, happier, more productive REPL for Clojure.

CircleCI Clojars Project cljdoc badge downloads badge

REPL-y

A fitter, happier, more productive REPL for Clojure.

Improvements over the existing REPL that comes in clojure.jar

  • A number of readline commands, some not available in earlier JLine versions:
    • navigation to the start/end of lines, and forward/back by word
    • history navigation and search
    • and much much more
  • CTRL-C:
    • kills the currently running command, breaks out of infinite loops, etc.
    • doesn't bail out of the process - stops interruption-friendly operations
  • Code completion for:
    • Clojure vars and namespaces
    • Clojure namespace-qualified vars
    • Java classes, packages
    • Java package-qualified classes, static methods
  • Optional nREPL integration

Installation

REPLy is bundled with Leiningen and Boot. If you're using one of the two then you're covered.

Here's how to get a standalone version up and running (assuming you have Leiningen installed):

git clone https://github.com/trptcolin/reply.git
cd reply
lein do deps, compile

Usage

Leiningen

The easiest way to use REPLy is simply to run lein repl. That's it!

If you want to check out the latest stuff on REPLy master, you can run lein trampoline run in this project.

Boot

Boot bundles REPLy, so all you have to do is:

boot repl

Clojure CLI (tools.deps)

Starting REPLy using the clojure command is as easy as:

# Assuming Clojure 1.9, and Clojure CLI 1.10.1.727 or later
clojure -Sdeps '{:deps {reply/reply {:mvn/version "0.5.0"}}}' -M -m reply.main

# Assuming Clojure 1.9 and later, and Clojure CLI before 1.10.1.727
clojure -Sdeps '{:deps {reply {:mvn/version "0.5.0"}}}' -m reply.main

Note: Use clojure -Sdescribe to see your Clojure CLI version. On the other hand, the Clojure version, being Clojure just a library, depends on the deps. To see what you could consider the default Clojure, you could use clojure -e '(clojure-version)'. More information about the distinction between Clojure CLI and Clojure.

Other

If for some reason your use case requires avoiding the tools listed so far, you can use the bin scripts as a guide (you're probably used to shell scripting anyway, in that case). If you want to add additional dependencies to the classpath, setting $USER_CP will. For example: USER_CP=$(lein classpath) reply.

If you want to use REPLy from another piece of software, your entry point should be reply.main/launch-nrepl. There are lots of options, which you can learn more about by running (println (last (reply.main/parse-args ["-h"]))).

Debugging

If you're having problems, feel free to open an issue, but the following may help.

For keybinding issues, check out ~/.inputrc - you can mostly use the same specifications there as you can with normal readline applications like bash, but from time to time we do come across missing features that we then add to jline.

To get a very detailed look at what jline is doing under the hood, you can export JLINE_LOGGING=trace (or debug) before starting REPLy. There may be more output than you'd like, but this kind of output is especially helpful when debugging keybinding issues.

You can use the --standalone flag to rule out any nREPL-related questions, but I'm not aware of anyone using --standalone for other purposes. Please let me know if you are!

Thanks

Thanks to the developers of Clojure, JLine, nREPL, incomplete, for their work on the excellent projects that this project depends upon.

Special thanks to 8th Light for allowing me to work on this during our open-source Friday afternoons.

License

Copyright (C) 2011-2021 Colin Jones

Distributed under the Eclipse Public License, the same as Clojure. See the LICENSE file for details.

More Repositories

1

consistency_fail

A tool for detecting missing unique indexes in Rails projects
Ruby
339
star
2

macro-workshop

A Clojure macros workshop
Clojure
39
star
3

versioneer

Provides version introspection for Leiningen-generated projects
Clojure
39
star
4

sicp-study

Working through exercises in SICP (Abelson/Sussman _The Structure and Interpretation of Computer Programs_)
Scheme
9
star
5

tictactoe-scala

The classic Tic-Tac-Toe game in Scala
Scala
7
star
6

toga

A Clojure wrapper for Cassandra
Clojure
7
star
7

clojureslim

The Slim (Simple List Invocation Method) protocol for Fitnesse, implented for Clojure
Clojure
7
star
8

c10k

Learning about C and networking via the C10K problem: http://www.kegel.com/c10k.html
C
7
star
9

tictactoe-clojure

The classic Tic-Tac-Toe game in Clojure
Clojure
7
star
10

vimfiles

my Vim setup
Vim Script
6
star
11

tictactoe-java

My first apprenticeship project at 8th Light
Java
6
star
12

lein-plugin

A Leiningen plugin to manage Leiningen plugins
Clojure
5
star
13

algorithms-clojure

8th Light University homework
Clojure
5
star
14

taking-command-of-the-command-line-workshop

A hands-on workshop focused on the Unix command line!
Ruby
4
star
15

node-mini-twitter

A toy Node.js app for the Twitter API
JavaScript
3
star
16

keypressr

Merb web app to improve programmers' typing skills
Ruby
3
star
17

minisculus

An Eden Development programming challenge
Clojure
3
star
18

object-vector-is-not-a-value

Scala
2
star
19

slowdb

A non-blockchain slow database
C
2
star
20

speclj-template

A leiningen template for speclj
Clojure
2
star
21

presentations

2
star
22

story-of-a-girl

JavaScript
2
star
23

speling_expirt

for Ruby Sparring 2009: Hangman
Ruby
2
star
24

trptcolin.github.com

an online resume. ish.
2
star
25

algorithms-ruby

8th Light University homework
Ruby
2
star
26

test-driven-carousel

Toy project from Test-Driven React by Trevor Burnham (PragProg)
JavaScript
1
star
27

clojure-refactoring-exercises

Clojure
1
star
28

spec-race-repro

CLJ-2026 repro case
Clojure
1
star
29

try_git

1
star
30

centiservices

HTML
1
star