Skip to content

Latest commit

 

History

History
37 lines (27 loc) · 929 Bytes

README.md

File metadata and controls

37 lines (27 loc) · 929 Bytes

plain-repl

A Clojure library designed to ... well, that part is up to you.

Usage

Make sure you have lumo 1.8.0-beta or above installed.

Start a lumo socket repl lumo -c src/ -n '{"port": 5557, "accept": "plain-repl.repl.lumo/accept"}'.

Start a client nc localhost 5557.

In the clent type

(require '[plain-repl.lumo :as p])
(let [s (p/suspension)
      in p/*in*
      print-fn *print-fn*]
  ((fn echo []
     (binding [p/*in* in]
       (p/read (fn [form e]
                 (if (or e (= 'fin form))
                   (p/resume s form nil)
                   (binding [*print-fn* print-fn]
                     (prn 'you 'said form)
                     (echo))))))))
  s)

Now the repl should have been upgraded.

License

Copyright © 2017 FIXME

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