This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-11-18
Channels
- # architecture (33)
- # asami (1)
- # aws (1)
- # babashka (19)
- # beginners (48)
- # bristol-clojurians (1)
- # calva (5)
- # cider (12)
- # cljdoc (15)
- # cljsrn (7)
- # clojure (151)
- # clojure-europe (19)
- # clojure-losangeles (1)
- # clojure-nl (2)
- # clojure-provo (4)
- # clojure-spec (9)
- # clojure-uk (21)
- # clojuredesign-podcast (28)
- # clojurescript (33)
- # core-typed (1)
- # cryogen (2)
- # css (6)
- # cursive (10)
- # data-science (1)
- # datomic (20)
- # events (3)
- # expound (72)
- # figwheel-main (5)
- # fulcro (43)
- # graalvm (6)
- # helix (1)
- # kaocha (13)
- # leiningen (2)
- # malli (1)
- # meander (93)
- # membrane (4)
- # off-topic (17)
- # pathom (6)
- # portland-or (5)
- # re-frame (25)
- # reagent (6)
- # reitit (7)
- # reveal (30)
- # shadow-cljs (25)
- # vim (2)
Has anyone tried to have docstrings for their compiled JS packages? We're trying to ship a shadow-cljs->js package that is friendly for javascript users and trying to get docstrings to render in VSCode.
Are there any ClojureScript runtimes / platforms (not sure of the common term there -- the JavaScript engine plus whatever is around it for running ClojureScript with a REPL) that enable two or more REPL connections to it simultaneously? I know this is built-in with Clojure on the JVM, but if I understand correctly that is trivial with a multi-threaded JVM. It seems like it would be much trickier with a single-threaded JavaScript runtime.
@andy.fingerhut ClojureScript socket REPLs support that
Are there multiple threads handling the multiple REPL interactions outside of the JavaScript runtime? Or are they just all somehow handled in some kind of event loop in a single thread?
I'm trying to understand how reagent decides to re-render components, so if I have something like this: https://gist.github.com/LeifAndersen/037507a44a0945fba2807b0bb63f28d6
In particular:
(defn counter-view [db]
[:h1 (:counter db)])
(defn home-page [db]
[counter (select-keys db [:counter])])
And by modified, I just mean another element changes:
(defn default-db []
{:counter (r/atom 0)
:label (r/atom "Count")})
Okay, by putting println
statements before returning the elements, it 'looks' like only the components with changed atoms are re-rendered.
Okay, another question, I find that functions like this tend to work:
(defn foo [fs]
(fs.readdirSync ...))
Is this actually supposed to be possible, or is it some undefined behavior that just 'happens' to work?.
just happened to work accidentally mostly. (.readdirSync fs ...)
would be the more correct way but unlikely that the other way will be removed at this point
or if fs
is an alias from a :require
in the ns
then (fs/readdirSync ...)
would also work
Hello friends, I am trying to make this https://clojurescript.org/guides/webpack work, and running into an error: "[webpack-cli] Compilation finished\nasset main.js 644 bytes [emitted] (name: main)\n\nERROR in main\nModule not found: Error: Can't resolve 'out/index.js' in '/path/to/myproject/foo'\n\nwebpack 5.5.1 compiled with 1 error in 35 ms\n",
thats in build.edn
? like you have out/index.js
somewhere when you need "./out/index.js"
Now I run into: > cljs.user=> Exception in thread āThread-6ā http://java.io.FileNotFoundException: ./out/main.js (Is a directory)
I run into the same issue myself, when following the https://clojurescript.org/guides/webpack exactly. I think I resolved both issues by changing āout/main.jsā in the recommended build.edn
to ā./outā.
The āhello worldā works at that point; Iām not clear on whether or not this is quite what was intended. It felt odd to have a main.js
file inside a main.js
directory.
I ran into the same issue. Here is the corrected build.edn file:
{:main hello-bundler.core
:output-to "out/index.js"
:output-dir "out"
:target :bundle
:bundle-cmd {:none ["npx" "webpack" "./out/index.js" "-o" "./out" "--mode=development"]
:default ["npx" "webpack" "./out/index.js" "-o" "./out"]}
:closure-defines {cljs.core/*global* "window"}} ;; needed for advance