This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-05-21
Channels
- # aws (3)
- # beginners (98)
- # boot (18)
- # cider (6)
- # cljsrn (8)
- # clojure (56)
- # clojure-dev (11)
- # clojure-spec (3)
- # clojure-turkiye (1)
- # clojurescript (34)
- # core-async (42)
- # cursive (8)
- # datascript (79)
- # defnpodcast (2)
- # dirac (13)
- # emacs (14)
- # jobs-discuss (3)
- # onyx (27)
- # overtone (1)
- # pedestal (1)
- # protorepl (1)
- # re-frame (40)
- # reagent (5)
- # unrepl (29)
- # vim (3)
I'm a bit out of the loop on this one, can someone fill me in on what the status is of unrepl for ClojureScript? (bootstrapped or otherwise)
ok so I'm having a go at this, using reader conditionals to smooth over the differences, but this is problematic because a regular clojure repl doesn't allow reader conditionals
@plexus not a problem. At the moment only Clojure REPL can be upgraded and I have control on the reader during the upgrade.
[:unrepl.upgrade/failed]
RuntimeException Conditional read not allowed clojure.lang.Util.runtimeException (Util.java:221)
user=>
Anyone know if there's a way to "compile" cljc to clj or cljs? i.e. to only expand the reader conditionals, but leave everything else as is?
@plexus if I understand right..the reader should read only the relevant parts so a cljs repl on nrepl+piggieback (you need a cljs repl I guess) should read the cljs part only. No need to get rid of the unwanted parts. It makes so much more sense to have it on bootstrap though (Lumo)
it does it when reading from a CLJC file, but on the REPL it just throws an error when using reader conditionals
Uhm odd, what is the error?
lumo: #error {:message read-cond body must be a list, :data {:type :runtime-exception}, :cause #error {:message read-cond body must be a list, :data {:type :runtime-exception}}}
Sounds like a syntax error somewhere, but I have never seen that..It can be anything
@plexus well Clojure complains as soon as the ?
is read it doesn't attempt to read further. So you could still have two problems (a syntax reported by cljs and a Clojure setup).
https://danielcompton.net/2015/05/21/conditional-read-not-allowed-clojure-reader-conditionals
so while some environments might accept reader conditionals fine it seems we can't assume that all will
Uhm, but you are in a nrepl for the first and therefore if you have conditionals in cljc file only it should work...This is very odd indeed
@cgrand could you say in a few words what you think needs to happen for unrepl to work on Lumo? I started porting print.clj to cljc, I thought that would be a good start, but I'm not sure how you see things or what else is involved
@plexus the hard part is the upgrade stuff. For explicitly started unrepl server the big missing part is print.cljc
Upgrading a stock cljs (self hosted) repl requires more work. I have one working with both lumo and a branch of Planck. I'd like it to go upstream but some issues with var bindings must be solved first.
so is this helpful? https://github.com/plexus/unrepl/blob/lumo_support/src/unrepl/print.cljc
ok, I'm starting to see what you're saying. The blob instantiates a reader, so you have some leverage there as to how that behaves
@plexus if it helps with your reader conditional issue, Alex's lib might be of interest: https://github.com/aengelberg/cljsee
mfikes: ha, good to know, I ended up implementing more or less the same thing https://github.com/plexus/unrepl/blob/lumo_support/src/unrepl/filter_cljc.clj
@plexus the hard part is the upgrade stuff. For explicitly started unrepl server the big missing part is print.cljc
Upgrading a stock cljs (self hosted) repl requires more work. I have one working with both lumo and a branch of Planck. I'd like it to go upstream but some issues with var bindings must be solved first.
so is this helpful? https://github.com/plexus/unrepl/blob/lumo_support/src/unrepl/print.cljc
mfikes: ha, good to know, I ended up implementing more or less the same thing https://github.com/plexus/unrepl/blob/lumo_support/src/unrepl/filter_cljc.clj