All Projects → Unrepl → Unravel

Unrepl / Unravel

Unravel your REPL

Programming Languages

python
139335 projects - #7 most used programming language
clojure
4091 projects
clojurescript
191 projects

Labels

Projects that are alternatives of or similar to Unravel

Bull Repl
Bull / BullMQ queue command line REPL
Stars: ✭ 121 (-25.77%)
Mutual labels:  repl
Portkey
Live-coding the Cloud
Stars: ✭ 139 (-14.72%)
Mutual labels:  repl
Android Debugport
A Read-Eval-Print-Loop server for Android and SQLite
Stars: ✭ 147 (-9.82%)
Mutual labels:  repl
Shadow Cljs
ClojureScript compilation made easy
Stars: ✭ 1,774 (+988.34%)
Mutual labels:  repl
Replem
🚴 Instantly try npm modules in REPL environment
Stars: ✭ 132 (-19.02%)
Mutual labels:  repl
Nudge4j
Get inside your JVM
Stars: ✭ 144 (-11.66%)
Mutual labels:  repl
Telegram Clonebot
Simple Bot to clone Google Drive Files (or Folders) to your Team Drive[or Normal Drive]. P.S This is not a Mirror Bot. Enjoy ✌🏻
Stars: ✭ 114 (-30.06%)
Mutual labels:  repl
Lumo
Fast, cross-platform, standalone ClojureScript environment
Stars: ✭ 1,861 (+1041.72%)
Mutual labels:  repl
Gomacro
Interactive Go interpreter and debugger with REPL, Eval, generics and Lisp-like macros
Stars: ✭ 1,784 (+994.48%)
Mutual labels:  repl
Spiral
Emacs Clojure IDE based on UNREPL
Stars: ✭ 146 (-10.43%)
Mutual labels:  repl
Vim Ipython Cell
Seamlessly run Python code in IPython from Vim
Stars: ✭ 127 (-22.09%)
Mutual labels:  repl
Eval In Repl
Consistent ESS-like eval interface for various REPLs
Stars: ✭ 130 (-20.25%)
Mutual labels:  repl
Pry Byebug
Step-by-step debugging and stack navigation in Pry
Stars: ✭ 1,827 (+1020.86%)
Mutual labels:  repl
Lips
Scheme based powerful lisp interpreter written in JavaScript
Stars: ✭ 120 (-26.38%)
Mutual labels:  repl
Janet
A dynamic language and bytecode vm
Stars: ✭ 2,216 (+1259.51%)
Mutual labels:  repl
N
Node.js REPL with lodash
Stars: ✭ 118 (-27.61%)
Mutual labels:  repl
Local Repl
🐚 Project-specific configuration for the Node.js REPL
Stars: ✭ 143 (-12.27%)
Mutual labels:  repl
Atom Chlorine
An Atom plugin to integrate with Socket-REPL over Clojure, ClojureScript, ClojureCLR, Joker, Babashka, Clojerl, Lumo and Plank
Stars: ✭ 155 (-4.91%)
Mutual labels:  repl
Discord Musicbot
Very simple discord music bot with the discord.js with Song Name playing. It can able to play music with the song name
Stars: ✭ 148 (-9.2%)
Mutual labels:  repl
Finkel
Haskell in S-expression
Stars: ✭ 146 (-10.43%)
Mutual labels:  repl

unravel

Unravel your REPL

npm version

Unravel is a simple command-line client for Clojure REPLs. It is based on the unrepl protocol, so instead of relying on nREPL, unravel communicates with your Clojure process through a Socket Server REPL.

Unravel provides a richer user experience by:

  • showing docstring and arglist of vars as you type them
  • eliding long or infinite sequences but allowing the user to request a continuation

Installation

To use unravel you need Clojure 1.8.0 or above.

Simple installation

On macOS, the easiest way to install unravel is via brew:

brew install unrepl/bin/unravel

On Linux or macOS you can also install (or update) unravel via npm:

sudo npm install -g unravel-repl

In either case you should end up with an unravel binary in your PATH:

unravel --version

Installation from git

For a more up-to-date version, you can check out master:

git clone https://github.com/pesterhazy/unravel.git
cd unravel
npm install
scripts/run [--debug] <host> <port>

Usage

Connect to a Clojure Socket REPL:

unravel [--debug] <host> <port>

In addition to common readline shortcuts, the following keybindings are available:

  • Control-D: exit the REPL
  • Control-O: show docstring for symbol under the cursor
  • <Tab>: complete var or namespace

Lines starting with #__ are treated as special commands and interpreted by the REPL client. The following specials are available:

  • #__help shows a help screen
  • #__1, #__2, #__3 ...: expand the numberd lazy seq ellipsis
  • #__: expand the most recent lazy seq ellipsis

Launching a Socket REPL

You can easily enable the Socket REPL feature for your Clojure project, whether you use boot, lein or a plain clojure jar. The Socket REPL does not have any dependencies other than Clojure 1.8.0.

To launch a Clojure process with a Socket REPL listening on port 50505 using boot, use:

boot -i "(do (require 'clojure.core.server) (clojure.core.server/start-server {:port 50505 :name :repl :accept 'clojure.core.server/repl}))" wait

Or if you have boot >= 2.7.2:

boot socket-server --port 50505 wait

Using Leiningen:

JVM_OPTS='-Dclojure.server.myrepl={:port,50505,:accept,clojure.core.server/repl}' lein repl

Using a plain Clojure jar:

java -Dclojure.server.myrepl="{:port 50505,:accept,clojure.core.server/repl}" -jar ~/.m2/repository/org/clojure/clojure/1.8.0/clojure-1.8.0.jar

As of Clojure 1.9 you can use the clojure command line tool:

clojure -J-Dclojure.server.myrepl="{:port 50505,:accept,clojure.core.server/repl}"

You can then connect to the process by running unravel in a separate terminal window:

unravel localhost 50505

Changes

0.2.2

  • Print vars correctly
  • Update unrepl
  • Use 'user as init-ns
  • Don't write to socket after closing connection
  • Update to Lumo 1.6.0

0.2.1

  • Enable lumo caching (3x startup time improvement)
  • Interrupt running process on SIGINT
  • Fix exceptions when connected to Boot-based socket server

0.2.0

  • Live docs for vars and namespaces
  • Use separate tooling connection for tab completion and docs
  • Start in "user" namespace

0.1.6

  • Fix installation via NPM

0.1.5

  • Add repl specials
  • Expand lazy seq ellipsis
  • Fix issue with non-existant namespaces

0.1.4

  • Tab completion (namespaces and vars)
  • Pretty-print exceptions
  • Use tagged literals
  • Re-prompt on newline or Control-C

0.1.3

Persistent history

0.1.2

Distribute via npm

0.1.0

Show docstring

Future work

See TODO.md for a list of planned improvements. Unravel is developed in conjunction with unrepl.

Resources

  • The Ultimate Guide To Clojure REPLs on the Socket REPL

  • replicant: proof of concept of using Socket REPL for tooling

Join the #unrepl channel in the Clojurians slack!

Contributing

See [contributing.md].

Copyright

(c) 2017 Paulus Esterhazy

Unrepl payload.clj (c) 2017 Christophe Grand

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].