This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-12-18
Channels
- # adventofcode (326)
- # aws (1)
- # beginners (67)
- # cider (52)
- # cljs-dev (5)
- # cljsrn (5)
- # clojure (104)
- # clojure-art (2)
- # clojure-austin (34)
- # clojure-france (12)
- # clojure-greece (38)
- # clojure-india (2)
- # clojure-italy (6)
- # clojure-spec (11)
- # clojure-uk (32)
- # clojurescript (51)
- # core-async (5)
- # cursive (11)
- # data-science (5)
- # datascript (3)
- # datomic (3)
- # defnpodcast (7)
- # fulcro (26)
- # graphql (10)
- # hoplon (1)
- # instaparse (2)
- # jobs (1)
- # klipse (3)
- # lumo (13)
- # off-topic (50)
- # om (2)
- # onyx (19)
- # parinfer (1)
- # pedestal (4)
- # re-frame (18)
- # ring-swagger (1)
- # spacemacs (1)
- # specter (42)
- # sql (9)
- # uncomplicate (18)
- # unrepl (13)
Hi, what’s the rationale behind the lumo.repl/executeXXX
functions being synchronous? and/or: is there a reason for eval and print being bolted together in executeXXX
?
@cgrand you're refering to this part? https://github.com/anmonteiro/lumo/blob/master/src/cljs/snapshot/lumo/repl.cljs#L222-L223 I've been looking at this a tiny bit, when removeing this part, the repl just won't work.
no, not with dev, I remember just typeing command and press enter, and nothing happens and the promt disappears.
my main issue is there https://github.com/anmonteiro/lumo/blob/master/src/cljs/snapshot/lumo/repl.cljs#L1148
what’s the problem with that
To explain what’s the problem: if you want to make a REPL upgradable then you need to consider the fact that the E in REPL may expand to another REPL, yielding a RR’E’P’L’PL (where all the prime versions are the user upgrade). If you want to allow the user to process input you have to prevent your main loop from processing it. If you want to support several connections at once in JS you can’t do that by blocking.
we just get a value out of evaluation and it’s going straight to printing, I’d like to potentially suspend the loop here so it means introcuding a callback
can’t you use lumo.core/eval
?
@anmonteiro sure I can. It all depends on what is your goal.
Do you want to make lumo repls “upgradable” or do you want to require user to add some unrepl stuff to their classpath and specify a special :accept
?
To explain what’s the problem: if you want to make a REPL upgradable then you need to consider the fact that the E in REPL may expand to another REPL, yielding a RR’E’P’L’PL (where all the prime versions are the user upgrade). If you want to allow the user to process input you have to prevent your main loop from processing it. If you want to support several connections at once in JS you can’t do that by blocking.