This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-01-05
Channels
- # announcements (1)
- # babashka (61)
- # babashka-sci-dev (1)
- # beginners (54)
- # biff (17)
- # cider (4)
- # circleci (1)
- # clj-commons (39)
- # clj-kondo (26)
- # cljdoc (40)
- # clojure (41)
- # clojure-europe (32)
- # clojure-norway (4)
- # clojure-portugal (1)
- # clojure-uk (2)
- # clojurescript (59)
- # clr (69)
- # conjure (7)
- # cursive (22)
- # data-science (16)
- # datalevin (1)
- # datomic (19)
- # docker (31)
- # funcool (1)
- # honeysql (6)
- # hoplon (1)
- # hyperfiddle (41)
- # introduce-yourself (1)
- # juxt (2)
- # leiningen (5)
- # nbb (14)
- # nextjournal (38)
- # off-topic (47)
- # polylith (2)
- # rdf (5)
- # re-frame (4)
- # reitit (27)
- # releases (6)
- # scittle (10)
- # shadow-cljs (24)
- # sql (11)
- # squint (1)
- # tools-build (33)
- # tree-sitter (4)
- # vim (39)
Hello!
Is not being able to destructure defmethod
parameters a known limitation? or maybe a bug?
For example, with the following code:
(defmulti greeting :language)
(defmethod greeting :english
[{:keys [friend]}]
(prn (str "Hello " friend)))
I get the following error:
---- Scittle error ------------------------------
Message: Could not resolve symbol: friend
Data: {:type :sci/error, :line nil, :column nil, :file "profile_picker.cljs", :phase "analysis"}
Location: profile_picker.cljs:11:8 scittle.js:587:452
Phase: analysis scittle.js:587:452
----- Context ------------------------------------ scittle.js:587:452
07 (defmulti greeting :language)
08
09 (defmethod greeting :english
10 [{:keys [friend]}]
11 (prn (str "Hello " friend)))
^--- Could not resolve symbol: friend
12
13
14 (defn main
15 []
16 (let [settings (rf/subscribe [::settings/settings])] scittle.js:587:452
Thank you!This is fixed in a new version of SCI. I’ll release a new version of scittle, then this will be supported
Great, thanks!
Wow, that was fast! Thanks a ton
Sure! We are building a web-based wizard for the https://www.gethop.dev/ . For bootstrapping new HOP projects we are using edn files, but they are a bit long and tedious to edit. So we wanted to have a UI that would facilitate that job. As we are experienced in building web applications in CLJS we thought Scittle would be a perfect fit because: • We can integrate it in our https://github.com/gethop-dev/hop-cli (based on Babashka) using http-kit server. • It's easy to setup and we don't need to incorporate any CLJS compiler. • It has all the ingredients we need to build a simple UI with technologies that we already master: reagent and re-frame
https://github.com/babashka/scittle: execute Clojure(Script) directly from browser script tags via SCI!
v0.5.14 (2023-01-05)
• Fix destructuring in defmethod
(by upgrading SCI)