This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-12-27
Channels
- # adventofcode (7)
- # announcements (31)
- # babashka (15)
- # beginners (14)
- # calva (45)
- # circleci (6)
- # clojure (27)
- # clojure-europe (19)
- # clojure-france (2)
- # clojure-gamedev (4)
- # clojure-uk (2)
- # clojurescript (26)
- # conjure (14)
- # data-science (6)
- # deps-new (7)
- # depstar (4)
- # emacs (13)
- # events (1)
- # fulcro (20)
- # graalvm (2)
- # hoplon (30)
- # joker (11)
- # london-clojurians (1)
- # malli (26)
- # pathom (2)
- # re-frame (13)
- # reagent (8)
- # reclojure (3)
- # reveal (8)
- # robots (4)
- # shadow-cljs (29)
- # sql (5)
- # tools-deps (28)
- # vim (4)
sorry if I missed something basic, but is there a way to specify that a string field should match a regular expression, without resorting to SCI functions?
@ikitommi can I trouble you for one more gist comment? this is not urgent so I’m happy to wait until your status is not “vacationing” 🙂 https://gist.github.com/stevebuik/e63735d99fca94041120f9b0e25b616d
not urgent because I can work around the perf by not using recursion in my initial spec replacements. full recursion will be useful but can come later
I wonder if I/we could turn this into a useful sample for others to learn from? happy to do this if you agree it would be useful
Thank you for such a big upgrade to Spec 🙂 BTW I’m also noticing some very slow perf when compiling medium complexity nested schemas. Are you interested in test cases for that as well?
The compilation slowness appears to be caused by liberal use of :merge. when I remove it and just compose maps (i.e. inline) I see compile speeds improve by 10x
I’ve worked around both the compilation (i.e. validator) and runtime perf issues so this is not urgent for me. I’ll be happy to provide more test cases if you need them
I'm asking this since babashka pods communicate via edn or json, which doesn't have a built-in way to represent bytes. transit does have it
@borkdude atm, there is no default encoding/decoding bytes and strings. Looking at OpenAPI docs, the guide is: > base64-encoded characters, for example, U3dhZ2dlciByb2Nrcw==
so, there could be a byte<->string transformers in malli.transform
to make this a default
Is this a bug? If so, I will log it….
(m/validator [:schema
{:registry (merge
(m/base-schemas)
{:person [:multi {:dispatch :person/gender}]})}
:person])
Execution error (ExceptionInfo) at malli.core/-fail! (core.cljc:79).
:malli.core/child-error {:type :enum, :properties nil, :children nil, :min 1}