This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-12-16
Channels
- # adventofcode (24)
- # announcements (3)
- # aws (3)
- # babashka (16)
- # beginners (88)
- # biff (5)
- # calva (27)
- # cider (15)
- # cljs-dev (70)
- # clojure (87)
- # clojure-austin (3)
- # clojure-belgium (6)
- # clojure-europe (59)
- # clojure-nl (1)
- # clojure-norway (14)
- # clojure-uk (3)
- # clojurescript (37)
- # data-science (2)
- # datalevin (40)
- # datomic (1)
- # emacs (23)
- # events (2)
- # graalvm (13)
- # graphql (7)
- # gratitude (1)
- # holy-lambda (193)
- # inf-clojure (15)
- # lsp (27)
- # malli (9)
- # off-topic (20)
- # polylith (6)
- # reitit (29)
- # releases (2)
- # scittle (13)
- # shadow-cljs (51)
- # transit (15)
- # xtdb (29)
Does scittle not have clojure.core/promise
? I don’t know how to make js/Promise
work for me. I want to make a promise, put it somewhere, and deliver to it later.
:msg "{:ex \"\\\"#error {:message \\\\\\\"Could not resolve symbol: promise\\\\\\\", :data {:type :sci/error, :line 1, :column 1, :message \\\\\\\"Could not resolve symbol: promise\\\\\\\", :sci.impl/callstack #object[cljs.core.Volatile {:val ({:line 1, :column 1, :ns #object[To main], :file nil})}], :file nil, :phase \\\\\\\"analysis\\\\\\\"}, :cause #error {:message \\\\\\\"Could not resolve symbol: promise\\\\\\\", :data {:type :sci/error, :line nil, :column nil, :file nil, :phase \\\\\\\"analysis\\\\\\\"}}}\\\"\", :status [\"error\" \"done\"], :id \"354\", :session \"aef012af-d259-442d-91e3-5e1712963442\", :ns \"main\"}"
You can do this like this in JS:
(js/Promise. (fn [resolve reject]
(resolve 10))
You can do anything you want instead of (resolve 10)
to send 10
to the part of the program that's waiting on that promiseIm trying to deliver it from the onmessage of a websocket that i registered before constructing the promise.