This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-10-07
Channels
- # announcements (2)
- # babashka (34)
- # beginners (114)
- # biff (7)
- # calva (16)
- # cider (2)
- # clj-kondo (46)
- # clj-on-windows (14)
- # clojars (13)
- # clojure (33)
- # clojure-europe (17)
- # clojure-nl (2)
- # clojure-norway (8)
- # clojure-spec (3)
- # clojure-uk (3)
- # clojurescript (25)
- # community-development (1)
- # datalevin (1)
- # emacs (53)
- # fulcro (31)
- # gratitude (2)
- # jobs (1)
- # lambdaisland (12)
- # lsp (57)
- # malli (3)
- # nbb (1)
- # off-topic (92)
- # pathom (2)
- # pedestal (2)
- # releases (5)
- # shadow-cljs (25)
- # sql (3)
- # squint (1)
- # testing (6)
- # vim (11)
is it possible to "include" files at compile-time? i'd want to read my i18n dictionary YAML files into a tongue dictionary. is this possible?
Is is save to assume there are no issues with https://shadow-cljs.github.io/docs/UsersGuide.html#infer-externs when there are no compiler warnings? For example in the following situation I'll get a compiler warning:
(defn some-interop-fn [obj]
(.interopCall2 (.interopCall1 obj)))
If I typehint the obj
the compiler warning disappears, does the compiler not need a typehint on the result of the first call?Hi, all The question is about https://clojureverse.org/t/modern-js-with-cljs-class-and-template-literals/7450 macro. Is there a way to imitate a js behavior for empty constructor in the derived class? i.e. if there is an empty constructor then
constructor(...args){
super(...args)
}
will be generated.At the moment macro throws on the missing constructor and I can't use
[this & args]
and can't apply a super macro clause, something like this
(constructor [this & args]
(apply super args))
Don't know is it worth an issue š As it seems like not a 1st tier feature for shadow
CLJS doesn't support the rest/spread JS operators, so this isn't currently possible to support no
but given that JS doesn't really use variadic things very much. are you sure this isn't just a lazy way to write constructur(a,b,c) { super(a,b,c) }
?
On regard of vararg have took this from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/constructor#description, but haven't notice large note right below the default constructor description about that there is no argument spreading. Same https://tc39.es/ecma262/multipage/ecmascript-language-functions-and-classes.html#sec-runtime-semantics-classdefinitionevaluation (point 14.a.iv). So, you are totally right here. Anyway, I can't write proper constructor with a macro without a knowledge of super class constructor args number, right?
There is only one arg on super class in my case actually. So, just
(constructor [this arg]
(super arg))
works like a charm.BTW, let me take this opportunity to give huge respect for this beast (shadow I mean)
depends on what it is I guess. generally yes, but best ask before sitting down to write a bunch of code š
change how? I mean the first sentence is "All of this is subject to change.", this is not meant to be final in any way and is just an example
ā¢ add an example of using that css start alongside shadow/watch build watches
ā¢ add (binding [*out* (io/writer (System/out))])
around the prn
calls because if it's run separately (with a shadow-cljs run for example) and it jacks in to an already-running server it loses its original stdout and crashes
if you start shadow with yarn shadow-cljs watch app for example, then in a separate terminal you start the css watch with yarn shadow-cljs run dev.css/start, after which if you save a cljs file in a "bad" state (some typo, missing :
in a css map or something) it'll try to prn to stdout but it doesn't have its own anymore resulting in a closed stream exception