This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-10-29
Channels
- # announcements (2)
- # babashka (2)
- # beginners (76)
- # boot (6)
- # calva (7)
- # cider (12)
- # clara (4)
- # clj-kondo (11)
- # cljdoc (9)
- # cljs-dev (21)
- # cljsrn (7)
- # clojure (72)
- # clojure-dev (158)
- # clojure-europe (2)
- # clojure-italy (3)
- # clojure-losangeles (3)
- # clojure-nl (5)
- # clojure-spec (29)
- # clojure-uk (93)
- # clojurescript (40)
- # cursive (7)
- # data-science (1)
- # datomic (28)
- # defnpodcast (5)
- # duct (5)
- # emacs (7)
- # events (2)
- # figwheel-main (5)
- # fulcro (55)
- # graalvm (2)
- # instaparse (1)
- # jobs (5)
- # juxt (1)
- # luminus (3)
- # nyc (2)
- # pathom (3)
- # planck (25)
- # re-frame (2)
- # reagent (4)
- # reitit (23)
- # shadow-cljs (381)
- # spacemacs (6)
- # sql (19)
- # tools-deps (7)
- # xtdb (4)
I'm attempting to call a macro with a #js {}
object literal, and getting a ClassCastException
in the compilation phase. Is this not supported?
Hmm I confused myself:
clj -A:fig:build
Syntax error compiling at (src/form_validator/core.cljs:9:7).
No such var: s/explain-data
(ns form-validator.core
(:require [cljs.spec.alpha :as s]))
(def conf (atom {:atom atom}))
(defn ?spec-problems
"Return nil if pass."
[spec value]
(-> (s/explain-data spec value)
:cljs.spec.alpha/problems))
Why I have this error? I am using fighweel-main. I am sure I didn’t have it a few months ago.
But when and open the same running process ( clj -A:fig:build
) in web browser or clj -A:test:test-watch
it works. But when I want to use REPL directly it doesn’t work. Is it ClojureScript / figwhee-main / Cursive issue?to make it clear: I am running the REPL which work for web browser in Cursive. This is the same REPL where I am trying to load the namespace.
Folks, something very noob that I simply assumed would work. When consuming your clojurescript code from JS, it seems multimethods are not exported the same way that functions are (as in, they can't be called directly).
mulitmethods are not regular JS functions. In JS you call use .call
or create a regular function in CLJS that calls the multimethod
It's basically what we are preferring to do here @lilactown
I want to integrate re-frame into an existing project I have. I don't want to run the lein new re-frame
command since that will build a new directory with a project.clj and other stuff. If I already have a project structure should I just emulate the project structure that the script builds and look at how the script creates the project.clj and incorporate that into my existing project.clj?
(About hot reload of cljc files in figwheel) Has anyone experienced this/has any idea? https://github.com/bhauman/figwheel-main/issues/218 I'm stuck and this thing really slows my workflow 🙂
when running shadow-cljs build I get Circular dependency detected: cljs.core -> cljs.core
how can I figure out whats causing this? I tried building with the --verbose option but it doesn't give me much info other than
-> build target: :browser stage: :configure
<- build target: :browser stage: :configure (8 ms)
there was a time when CLJS didn't have "vars" as described here: https://clojurescript.org/about/differences#_vars_and_the_global_environment when they were introduced, did this mean a drop in performance because of more indirection? and are vars compiled away in advanced compilation?
not sure what you mean. CLJS still doesn’t have vars, as described there :thinking_face:
@lilactown I mean this: > In ClojureScript def yields the value, unless the REPL option :def-emits-var is set (this defaults to true for REPLs). and this:
cljs.user=> (var assoc)
#'cljs.core/assoc
call it whatever you want to call it, but it's an indirection that resembles something like a var
if you explicitly call var
in your code, it will create a special var object at the call site and yes, it does impact code size