This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-12-20
Channels
- # adventofcode (38)
- # announcements (8)
- # aws (4)
- # babashka (131)
- # beginners (263)
- # calva (2)
- # clj-kondo (12)
- # cljdoc (12)
- # cljsrn (3)
- # clojure (122)
- # clojure-europe (3)
- # clojure-finland (2)
- # clojure-nl (13)
- # clojure-uk (80)
- # clojured (1)
- # clojuredesign-podcast (3)
- # clojurescript (78)
- # core-async (19)
- # cursive (19)
- # datomic (7)
- # duct (10)
- # events (1)
- # fulcro (7)
- # graalvm (12)
- # graphql (3)
- # juxt (4)
- # malli (10)
- # music (3)
- # nrepl (4)
- # off-topic (25)
- # pathom (4)
- # pedestal (1)
- # re-frame (78)
- # reagent (8)
- # shadow-cljs (91)
- # sql (8)
- # vim (3)
- # xtdb (2)
@rschmukler malli.provider, transformer, so it could if there is a use case for it. Some kind of extension mechanism would be good anyway, adding inferring to :tuple
and :multi
currently require a lot of internal refactoring. Not easy to add inferrers to own schemas.
as it's not complete yet, would be good to add the missing inferrers and options to controls those and see what kind of architecture evolves out of those.
maybe options like {:infer {:multi {:stats ...,. :schema ..., :opts {:dispatch #{:type 'first}, :min 2, :propability 0.90}}}
,
e.g. callback to participate in extracting stats out of samples, and converting those into schemas + opts for what kind of multis to look and how many samples needed
might be better to start with just options and hard-code the impl, and try to extract the callback mechanism later.
@ikitommi the other thing I was thinking about is the ability to code options. ie. imagine a LocalDateTime parser that has an property of :date/format "MM/dd/yyyy"
- ideally it'd be good to specify "try these formats when you try to parse things as a date" etc
Still thinking about how it could look
idea: If the inferrer is good, there could be a tool that records all args and return values for functions and infers defn-schemas out of those. I think @ambrosebs did something similar with spec (using core.typed)