This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-04-17
Channels
- # ai (115)
- # announcements (8)
- # babashka (26)
- # beginners (7)
- # biff (8)
- # calva (1)
- # cider (10)
- # clerk (2)
- # clj-together (11)
- # clojure (26)
- # clojure-boston (1)
- # clojure-denmark (3)
- # clojure-europe (23)
- # clojure-nl (1)
- # clojure-norway (33)
- # clojure-uk (3)
- # clojurescript (14)
- # conjure (3)
- # cursive (65)
- # emacs (10)
- # events (18)
- # exercism (6)
- # honeysql (14)
- # hyperfiddle (11)
- # kaocha (6)
- # nbb (17)
- # off-topic (58)
- # pathom (5)
- # reagent (28)
- # reitit (1)
- # releases (1)
- # sci (3)
- # shadow-cljs (22)
- # xtdb (29)
Has anyone knows about the current status of any modern game engine wrapper for Clojurescript?
Is it possible to detect in general (shadow-cljs / vanilla CLJS) if the compiler is running in advanced mode?
I think you can do it like this :
(ns org.foo.macros
(:require [cljs.env :as env]))
(defmacro m [x]
(case (get-in @env/*compiler* [:options :optimizations])
:advanced `(js/console.log "In advanced")
`(js/console.log "Not advanced")))
so basically use a macro, and at macroexpansion time emit different code
I only tested it on shadow he
it's not actually that important, but I think I could avoid some work in non-production builds
please allow the user to choose what to include or not, via properties example: guardrails https://github.com/fulcrologic/guardrails#clojurescript-considerations
what is the cljs equivelant to (ns-unalias *ns* 'foo)
? I can't seem to find a good answer online at the moment
there isn't one. CLJS doesn't have actual vars at runtime, so doing this does nothing useful.
Hmmm. I had gotten myself into a situation where I was using re-frame
and reitit.frontend
and had aliased :require [re-frame.core :as rf]
and had decided to just refer in what I needed there and use the rf
alias for reitit.frontend
like their docs. Was not able to do so because of an alias error, just like I would get in Clojure. I had to work around that as it couldn't be rectified. Wasn't a big deal at all, true, but it would've been a little useful haha