This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-03-08
Channels
- # announcements (6)
- # beginners (100)
- # calva (17)
- # cljs-dev (31)
- # cljsrn (2)
- # clojars (3)
- # clojure (137)
- # clojure-australia (1)
- # clojure-europe (41)
- # clojure-gamedev (3)
- # clojure-italy (1)
- # clojure-nl (3)
- # clojure-poland (16)
- # clojure-serbia (7)
- # clojure-taiwan (1)
- # clojure-uk (10)
- # clojurescript (10)
- # cursive (25)
- # data-oriented-programming (4)
- # datomic (26)
- # fulcro (39)
- # graalvm (6)
- # jobs (2)
- # jobs-discuss (2)
- # kaocha (19)
- # klipse (1)
- # leiningen (3)
- # lsp (18)
- # malli (21)
- # meander (26)
- # off-topic (29)
- # pathom (39)
- # polylith (3)
- # practicalli (2)
- # re-frame (11)
- # reitit (8)
- # rewrite-clj (7)
- # sci (11)
- # shadow-cljs (44)
- # sql (8)
- # tools-deps (32)
- # xtdb (3)
Why can't I call (or access in any way) cljs.repl/repl
(https://github.com/clojure/clojurescript/blob/69b66374d857a176c5a9cd8cc0cbb7506876640d/src/main/clojure/cljs/repl.cljc#L1226)?
λ clj -Srepro -Sdeps '{:deps {org.clojure/clojurescript {:mvn/version "RELEASE"}}}' -M -m cljs.main --repl
ClojureScript 1.10.773
cljs.user=> (require '[cljs.repl :as repl])
nil
cljs.user=> (repl/repl)
WARNING: Use of undeclared Var cljs.repl/repl at line 1 <cljs repl>
Execution error (TypeError) at (<cljs repl>:1).
undefined is not an object (evaluating 'cljs.repl.repl.call')
cljs.user=> (repl/pst)
TypeError: undefined is not an object (evaluating 'cljs.repl.repl.call')
@
@
eval code@
eval@[native code]
@http://localhost:9000/clojure/browser/repl.js:119:300
clojure$browser$repl$evaluate_javascript@http://localhost:9000/clojure/browser/repl.js:122:4
@http://localhost:9000/clojure/browser/repl.js:385:57
@http://localhost:9000/clojure/browser/repl.js:387:4
@http://localhost:9000/goog/messaging/abstractchannel.js:141:21
@http://localhost:9000/goog/net/xpc/crosspagechannel.js:729:19
@http://localhost:9000/goog/net/xpc/nativemessagingtransport.js:321:23
@http://localhost:9000/goog/events/events.js:753:25
@http://localhost:9000/goog/events/events.js:879:34
@http://localhost:9000/goog/events/events.js:296:42
nil
My use case is that I want to connect to a ClojureScript Socket REPL (https://gist.github.com/swannodette/f1a9bfbf7cc4d0c43e61) from my editor and start a new REPL inside the original REPL, but I guess that's not possible.
you can start a CLJ REPL and then start the CLJS REPL from there. CLJS from inside CLJS doesn't work.
Right, thanks. I think I can make that work. Ideally, I'd really like to start something like a CLJC REPL, but let's see if I can make that work.
I am getting an Eval timed out!
error when trying to pprint a (very) large map in a cljs repl (i’m using CIDER). any way to get around this? Like when I pprint a huge map in clojure it will truncate the output at some point.
@andrea_fleckenstein you might benefit from https://github.com/brandonbloom/fipp which is faster than pprint and supports cljs
there are also dynamic vars in clojure.core
that control printing
clojure.core/*print-level*
can limit the depth of printing large nested things
clojure.core/*print-length*
can limit how many elements of a large collection will be printed