Skip to content

upgradable plain repl implementations for cljs

Notifications You must be signed in to change notification settings

Unrepl/plain-repl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

upgradable plain repl implementations for cljs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published