This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-04-01
Channels
- # announcements (19)
- # asami (4)
- # babashka (34)
- # beginners (137)
- # calva (22)
- # cider (4)
- # clj-kondo (25)
- # cljs-dev (4)
- # clojure (67)
- # clojure-australia (1)
- # clojure-berlin (1)
- # clojure-europe (35)
- # clojure-germany (3)
- # clojure-nl (5)
- # clojure-serbia (3)
- # clojure-uk (8)
- # clojuredesign-podcast (2)
- # clojurescript (11)
- # conjure (56)
- # data-oriented-programming (1)
- # datascript (1)
- # datomic (6)
- # deps-new (11)
- # eastwood (1)
- # fulcro (11)
- # honeysql (48)
- # inf-clojure (1)
- # jobs (1)
- # joker (6)
- # lsp (26)
- # malli (2)
- # meander (3)
- # off-topic (48)
- # pathom (4)
- # polylith (4)
- # re-frame (19)
- # releases (2)
- # remote-jobs (1)
- # rewrite-clj (127)
- # shadow-cljs (6)
- # spacemacs (3)
- # tools-deps (43)
- # xtdb (16)
Welcome lazy generators! recursive generators are now orders of magnitude faster, ping @adam678
(time
(let [schema [:schema {:registry {::A [:tuple [:= :A]]
::B [:tuple [:= :B]]
::C [:tuple [:= :C]]
::D [:tuple [:= :D]]
::E [:tuple [:= :E] [:ref ::item]]
::F [:tuple [:= :F] [:ref ::item]]
::G [:tuple [:= :G] [:ref ::item]]
::item [:multi {:dispatch first}
[:A ::A]
[:B ::B]
[:C ::C]
[:D ::D]
[:E ::E]
[:F ::F]
[:G ::G]]}}
::E]
valid? (m/validator schema)]
(is (every? valid? (mg/sample schema {:size 10000})))))
; => "Elapsed time: 230 msecs"
🎉 9
That was fast! Just tested it with my real world example and it seems to work just perfectly. (Generating WASM instructions where an instruction may contain a list of instructions). Thanks a lot!