This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-05-16
Channels
- # announcements (2)
- # asami (124)
- # babashka (30)
- # babashka-sci-dev (73)
- # beginners (40)
- # biff (1)
- # calva (39)
- # clj-kondo (54)
- # clj-otel (1)
- # cljdoc (59)
- # cljs-dev (8)
- # clojars (2)
- # clojure (96)
- # clojure-austin (16)
- # clojure-boston (6)
- # clojure-europe (51)
- # clojure-nl (1)
- # clojure-norway (1)
- # clojure-russia (60)
- # clojure-uk (4)
- # clojurescript (34)
- # community-development (6)
- # cursive (2)
- # datahike (10)
- # datascript (18)
- # emacs (109)
- # etaoin (1)
- # events (3)
- # figwheel-main (41)
- # fulcro (13)
- # helix (4)
- # introduce-yourself (5)
- # jobs (1)
- # leiningen (5)
- # lsp (8)
- # malli (6)
- # meander (7)
- # nrepl (6)
- # off-topic (60)
- # pathom (29)
- # polylith (8)
- # re-frame (5)
- # reitit (1)
- # releases (1)
- # remote-jobs (1)
- # rewrite-clj (33)
- # sci (3)
- # shadow-cljs (3)
- # xtdb (82)
regarding promesa
is recursion supported (eg via loop
/ recur
or reduce
)? I can get it to work with function recursion but I'm worried about blowing up the stack at some future date
(defn fetch-all
[api-url search-conditions]
(loop [page 0
result []]
(p/let [search-conditions' (if (zero? page) search-conditions (conj search-conditions ["page" page]))
{:keys [content pagination]} (fetch-borrowers-page api-url search-conditions')
{:keys [page totalPages]} pagination]
(if (= page (dec totalPages))
(concat result content)
(recur (inc page)
(concat result content))))))
internal/process/esm_loader.js:74
internalBinding('errors').triggerUncaughtException(
^
I don't know promesa but I think if you use async code, you must use it all the way up. Try using p/loop and p/recur
and therefore fetch-all will be async too, its inevitable.
they don't yet have p/loop
and p/recur
but knowing @U04V15CAJ it will be there already 🌪️
I saw them in the doc https://funcool.github.io/promesa/latest/promesa.core.html
Does figwheel-main already work with ClojureScript 1.11.51 or will it need adjustment due to the removal/vendorization of data.json etc.?
@phill there is also a CLJS classpath problem that is being fixed and released promptly in ClojureScript 1.11.54
1.11.54 should be available soon if not already - a minor tweak for a Figwheel bug report from @bhauman
I am a JS refugee who made extensive use of RxJS in my largest project.
What is the motivation behind vendorizing clojure.data.json etc? I looked at the ticket but it didn't seem to contain any of the underlying reasoning https://clojure.atlassian.net/browse/CLJS-3372
According to some previous discussions here - performance. It's not just vendored, it's AOT compiled.
The release notes https://clojurescript.org/news/2022-05-13-release go into some detail on the subject
AOT is about load time for CLJS - vendorizing is about avoiding dep conflicts which can't be resolved in a sensible way
I am late in the party. What does it mean exactly to vendorize a namespace?
Copy it into your own sources and change the namespaces so that there are no conflicts with the same lib brought in as a dependency.
Thank you for the clarification @U2FRKM4TW
Also, does it mean that I now have to include an explicit clojure.data.json dependency if I'm using it in my project?