This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-07-12
Channels
- # announcements (2)
- # beginners (36)
- # boot (6)
- # calva (2)
- # cider (18)
- # clj-kondo (1)
- # cljdoc (2)
- # cljs-dev (2)
- # clojure (130)
- # clojure-boston (1)
- # clojure-brasil (3)
- # clojure-czech (1)
- # clojure-europe (11)
- # clojure-italy (4)
- # clojure-losangeles (37)
- # clojure-nl (9)
- # clojure-seattle (2)
- # clojure-sweden (8)
- # clojure-uk (23)
- # clojurescript (13)
- # core-async (21)
- # cursive (13)
- # data-science (6)
- # datomic (12)
- # emacs (36)
- # figwheel-main (9)
- # fulcro (76)
- # juxt (2)
- # keechma (18)
- # leiningen (4)
- # off-topic (13)
- # pedestal (37)
- # re-frame (21)
- # reitit (2)
- # shadow-cljs (78)
- # spacemacs (23)
- # sql (13)
- # tools-deps (25)
- # uncomplicate (4)
- # unrepl (1)
- # vim (27)
A recently-created alternative can be used to put a thin recursive cljs.core/ILookup
wrapper around JavaScript objects, making for more familiar / idiomatic use than getValueByKeys
for nested access:
(get-in (->clj ui/Responsive) [:onlyMobile :maxWidth])
See https://github.com/mfikes/cljs-bean@mfikes Is there anything we should be aware of when using cljs-bean? For example to not mutate passed JS object, etc.
IIUC it clones the underlying object when you change it via the implemented interfaces (e.g. assoc
)
Yeah, you should not mutate passed objects or arrays. It is true that it also doesn't mutate passed object or arrays.
I am currently trying to go through the modern-CLJS tutorials, and figured I might try and set up the boot-environment the author suggests - it works fine so far. One thing that irritates me though: both boot repl -c and CIDER weasel connect seem to reload code on saving files (via boot-reload), but complain about usage of undeclared symbols in the namespace I'm in.
boot serve -d target watch reload cljs-repl cljs target
is the boot-command,
I went into my namespace with (in-ns
and namespace-file is just one defn
.
I have the feeling understanding this might be quite important, so I figured I should askIIUC it clones the underlying object when you change it via the implemented interfaces (e.g. assoc
)
tried to run clojurescript tests against quickjs and it fails with > SyntaxError: functions can only be labelled inside blocks > at builds/out-adv/core-advanced-test.js:183
hello! does anyone know how to get this to work? * Start Figwheel somewhere * Open a browser session for that Figwheel instance * Connect Cursive to the browser session’s ClojureScript REPL
Have you seen this page? https://github.com/bhauman/lein-figwheel/wiki/Running-figwheel-in-a-Cursive-Clojure-REPL
yes, but i dont want to run figwheel in Cursive, i want to run it with ‘lein build-dev’
:thinking_face:
When I start my Figwheel REPL, it outputs a log message “Starting nREPL server on port: 7002” — do you get a message like that?
yup. here is what i tried
I tried starting Remote Repl in Cursive, switching it to CLJS, then running (figwheel.main.api/cljs-repl "dev")
i get the following output
Connecting to remote nREPL server...
Clojure 1.10.1
(figwheel.main.api/cljs-repl "dev")
Prompt will show when REPL connects to evaluation environment (i.e. a REPL hosting webpage)
Figwheel Main Controls:
(figwheel.main/stop-builds id ...) ;; stops Figwheel autobuilder for ids
(figwheel.main/start-builds id ...) ;; starts autobuilder focused on ids
(figwheel.main/reset) ;; stops, cleans, reloads config, and starts autobuilder
(figwheel.main/build-once id ...) ;; builds source one time
(figwheel.main/clean id ...) ;; deletes compiled cljs target files
(figwheel.main/status) ;; displays current state of system
Figwheel REPL Controls:
(figwheel.repl/conns) ;; displays the current connections
(figwheel.repl/focus session-name) ;; choose which session name to focus on
In the cljs.user ns, controls can be called without ns ie. (conns) instead of (figwheel.repl/conns)
Docs: (doc function-name-here)
Exit: :cljs/quit
Results: Stored in vars *1, *2, *3, *e holds last exception object
Execution error (ExceptionInfo) at figwheel.main/nrepl-repl (main.cljc:1525).
Failed to launch Figwheel CLJS REPL: nREPL connection found but unable to load piggieback.
This is commonly caused by
A) not providing piggieback as a dependency and/or
B) not adding piggieback middleware into your nrepl middleware chain.
Please see the documentation for piggieback here
Note: Cider will inject this config into your project.clj.
This can cause confusion when your are not using Cider.
I do have piggieback dependency in my “dev” profile in project.clj and :repl-options {:nrepl-middleware [cider.piggieback/wrap-cljs-repl]}