This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-07-23
Channels
- # announcements (1)
- # aws (13)
- # babashka (31)
- # beginners (102)
- # calva (46)
- # cider (16)
- # clj-kondo (1)
- # cljs-dev (3)
- # clojars (1)
- # clojure (396)
- # clojure-argentina (1)
- # clojure-australia (4)
- # clojure-europe (64)
- # clojure-nl (2)
- # clojure-uk (8)
- # clojurescript (20)
- # conjure (5)
- # cursive (4)
- # datomic (15)
- # emacs (48)
- # graalvm (69)
- # graalvm-mobile (1)
- # jobs (4)
- # jobs-rus (1)
- # lsp (6)
- # malli (15)
- # meander (2)
- # observability (11)
- # off-topic (10)
- # pathom (2)
- # portal (4)
- # re-frame (19)
- # reitit (1)
- # remote-jobs (3)
- # sci (1)
- # shadow-cljs (51)
- # tools-deps (11)
- # vim (12)
- # xtdb (13)
does #malli work with #babashka ? (just did a demo for my team and our infra human is curious)
we have an issue here: https://github.com/babashka/babashka/discussions/906 to consider including it
@U0509NKGK there are alternatives which currently work, such as spartan.spec (a spec drop-in replacement) and minimallist
if you could tell me how exactly malli would be useful for infra, please discuss in the issue, it could be an argument to include it
truly just pure curiosity at this point 🙂
Is there a reason :ref
schemas just die for regex parsing? Why do they have to be surrounded by :maybe
?
@ben.sless refs directly in sequence schemas are disallowed, rationale: https://github.com/metosin/malli/blob/master/src/malli/impl/regex.cljc#L1-L34
It would be good to add in the readme that recursive seqexp reference schemas have to have another level of indirection via either maybe or schema
Here's an example with hiccup, which is recursive:
(def Hiccup
[:schema {:registry {"hiccup" [:orn
[:node [:catn
[:name keyword?]
[:props [:? [:map-of keyword? any?]]]
[:children [:* [:schema [:ref "hiccup"]]]]]]
[:primitive [:orn
[:nil nil?]
[:boolean boolean?]
[:number number?]
[:text string?]]]]}}
"hiccup"])
(def parse-hiccup (m/parser Hiccup))