This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-09-29
Channels
- # announcements (6)
- # babashka (23)
- # beginners (15)
- # biff (15)
- # calva (17)
- # clara (5)
- # clj-kondo (41)
- # cljdoc (2)
- # cljs-dev (67)
- # cljsrn (18)
- # clojure (19)
- # clojure-europe (25)
- # clojure-nl (2)
- # clojure-norway (9)
- # clojure-uk (2)
- # clojurescript (26)
- # core-typed (6)
- # cursive (15)
- # data-science (30)
- # datahike (1)
- # datomic (18)
- # docker (6)
- # emacs (10)
- # events (2)
- # graalvm (15)
- # graphql (5)
- # hugsql (4)
- # jobs-discuss (1)
- # joker (7)
- # lsp (36)
- # malli (28)
- # off-topic (46)
- # other-languages (1)
- # pathom (5)
- # pedestal (6)
- # polylith (5)
- # reitit (2)
- # releases (1)
- # rewrite-clj (63)
- # shadow-cljs (7)
- # spacemacs (16)
- # squint (6)
- # tools-deps (6)
- # xtdb (13)
I don't think we advance compile the node part of our electron app, but we do advance compile the browser part
Just checked, we use :simple
for the node process, :advanced
for the browser process
As for reasons, bundle size is not as important for a .dmg
file, which is anyway 50M+ because you're shipping an entire Chromium browser etc
:advanced
is less code, so it does improve startup time a little bit even if no network is involved
What JS/CLJS libraries do people use/recommend for tries? I’d imagine that such libs would be commonly used, e.g. for text searches.
Mutable or immutable tries? A lot of the persistent collections are built on tries under the hood. You mean like some of those fancy suffix tree string search data structures?
Not sure if it fits your usecase, but clojure.data.avl
, and tonsky's persistent-sorted-set
are pretty cool, depending on what you are looking for. https://github.com/tonsky/persistent-sorted-set, https://github.com/clojure/data.avl, provided you are looking for immutable offerings.
Is this the best way to get a ^js ~ctx
type hint inside a macro? I had to use ^{:tag ~'js}
to prevent namespace-qualification:
`^js/React.Element ($ (.-Provider ^{:tag ~'js} ~ctx) …)
ah, of course! ty
note that it is almost always better to create a helper function that handles the tag, than doing the tagging in the macro
(defn get-provider [^js ctx] (.-Provider ctx))
in use (get-provider ~ctx)
in the macro
:advanced
will cause it to be inlined most likely anyways so there isn't even any code difference
I like that
also in the above the $
(which I assume is a macro) could handle the tagging, so having the ^js/React.Element
is not actually needed if it did
this is the issue I’m trying to fix: https://github.com/lilactown/helix/pull/104
also, technically I think ^js
would put externs on Object whereas ^js/Object
would put externs on Object.prototype. Does that matter?
maybe that difference wasn’t actually intended, but it’s there
Is there some documentation somewhere on the relationship between tags and externs..?
Word, thanks!