This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-02-24
Channels
- # announcements (5)
- # aws (24)
- # babashka (41)
- # beginners (130)
- # bristol-clojurians (2)
- # calva (39)
- # chlorine-clover (64)
- # cider (30)
- # clojure (202)
- # clojure-belgium (1)
- # clojure-dev (99)
- # clojure-europe (5)
- # clojure-hungary (4)
- # clojure-italy (10)
- # clojure-losangeles (8)
- # clojure-nl (11)
- # clojure-norway (6)
- # clojure-spec (7)
- # clojure-uk (12)
- # clojurescript (52)
- # core-typed (26)
- # cursive (19)
- # data-science (19)
- # datomic (19)
- # duct (10)
- # emacs (17)
- # fulcro (22)
- # graalvm (11)
- # jobs (3)
- # kaocha (28)
- # leiningen (6)
- # lumo (2)
- # malli (10)
- # nrepl (2)
- # off-topic (23)
- # pathom (2)
- # pedestal (7)
- # re-frame (3)
- # reagent (30)
- # reitit (2)
- # remote-jobs (2)
- # shadow-cljs (77)
- # sql (10)
- # test-check (22)
- # tools-deps (37)
- # vscode (1)
- # yada (3)
Made some progress on using Reveal (would have been more straightforward except I was typing vlaad
instead of vlaaad
, amongst other things 🤪). Now it does start, but when I try to connect Chlorine it gives a bunch of errors like
Clojure 1.10.1
Syntax error reading source at (REPL:1:3).
Conditional read not allowed
(:cljs :using-cljs-repl :clj :using-clj-repl :cljr :using-cljr-repl :joker :using-joker-repl :clje :using-clje-repl :bb :using-bb-repl)
Execution error (IllegalArgumentException) at user/eval3943 (REPL:1).
Wrong number of args passed to keyword: :cljs
:using-unknown-repl
=> :using-unknown-repl
Syntax error reading source at (REPL:3:74).
Conditional read not allowed
The alias I'm using looks like
:reveal {:extra-deps {vlaaad/reveal {:mvn/version "0.1.0-ea4"}}
:jvm-opts ["-Dclojure.server.repl={:port,50505,:accept,vlaaad.reveal.prepl/-main}"]}
I'm guessing this is something to do with Chlorine initializing the connection? Maybe https://clojure.atlassian.net/projects/CLJ/issues/CLJ-2453?
Running from the command line directly seems to work fine.@dave.dixon Chlorine expects a standard socket repl -- you're starting a prepl I think?
Reveal is. @vlaaad is looking into starting a standard repl. See https://github.com/vlaaad/reveal/issues/2
Yes, that's probably the problem. When Chlorine connects, the first thing it does is send a form to detect which clojure "flavor" is running
Right. I was going to suggest starting Reveal's regular main and also starting a standard socket REPL -- that's how we work with REBL.
Reveal needs an API to "submit" form/value data so that you can programmatically add things to its browser.
Given that it has nrepl Middleware that should be in place already -- you can probably see what function needs to be called.
There is no regular main in Reveal, but I'm going to add normal REPL without prepl backend. FYI, there is no static REBL-like submit function, but calling vlaaad.reveal.ui/make will return a function that can be used to submit values. Then making it static is just a matter of def-ing it where you want
Hey @vlaaad! I was just about to send you a message! Good to see you here. I think your project and Chlorine have lots of common ground. The only thing is that reveal is just Clojure, right? Any plans to implement a cljs version?
For example, lots of people ask me for a way to navigate the rendered result with the keyboard, or to search parts of the result with a string...
I think one of the biggest strengths of tools like Reveal is being in-process: it can effortlessly keep references to objects, which allows lots of meaningful inspections. Cross-process is bound to be limited by serialization, that's why I don't have plans to explore clojurescript support. With that said, since Reveal can prepls, and can receive prepls as parameters, it can already connect to cljs environments
I apologize if this is a FAQ… is there a known issue related to loading a file using Chlorine, then switching to the REPL in the terminal and attempting to call a fn in a var in the loaded namespace and getting this:
user=> (my-ns/my-fn)
Execution error (IllegalStateException) at unrepl.core/non-eliding-write (REPL:31).
Attempting to call unbound fn: #'unrepl.core/write
?Wow, I never saw this issue. What are the steps to reproduce?
(I think I saw Sean having this problem, but evaluating inside Chlorine. It'll be wonderful if I can reproduce it 🙂)
Ah, I'm "glad" someone else has run into that problem! I was never able to track down how to repro, and it hasn't happened since I last mentioned it in this channel!
There's no open issue, I'll be glad if you open it with the screen recording!
I'll update to Java 13 and see if I can reproduce here (please, when you open the issue, run java -version
so I can see the exact Java version)
I ran into it on Adopt OpenJDK 11.
(11.0.5)
openjdk version "13.0.2" 2020-01-14
OpenJDK Runtime Environment AdoptOpenJDK (build 13.0.2+8)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 13.0.2+8, mixed mode, sharing)
Somehow I can't reproduce on Linux (just installed OpenJDK 13.0.2). I'm hoping is not something specific of some O.S. (I saw some issues on MacOSX before, but they were unrelated to JDK / Clojure REPL)
@mauricio.szabo How does the "break evaluation" piece work in Chlorine?
When I start an evaluation, UNREPL sends me a code that can be used to stop the evaluation. So, I use another connection to the socket REPL and send this command to stop the evaluation
Over in the #clojure-dev channel, we are talking about prepl not supporting interruptible evals, and @ghadi mentioned that nREPL's way of handling it -- calling Thread/stop -- is "broken" so I wondered about Chlorine/unrepl.
UNREPL runs all code on (future ....)
So it just cancels the future
OK. Cool.
@aviflax can you send me the full contents of the editor when you tried to load-file?
I can point you to the repo, let me just make sure I can reproduce on master (as opposed to the branch I’m working on that’s currently local only)
@aviflax thanks a lot! I can reproduce this issue just fine! I'll see if there's a fix, or if it's some error with UNREPL 🙂
@mauricio.szabo I’ve got another commit on that branch, locally… in which I fixed the new code, which means the tests are no longer failing. I thought I’d see if the unrepl problem still occurs, and it does not
I can push that commit if that’d be helpful to you, or hold off, whatever’s more helpful
Yes, I just found the issue too...
For some reason, the output stream of clojure.test
does not redirect to the socket. Just after connecting, Chlorine does the redirection right here: https://github.com/mauricioszabo/repl-tooling/blob/master/src/repl_tooling/repl_client/clojure.cljs#L155-L157
Yes, that's good. When I re-issue this command, it works So, probably what I'll do is re-bound this variable from time to time... maybe? 😄
Thank you too, for reproducing this error! 🙂