Fork me on GitHub

:and requires two leaves, you have only one.


@ikitommi What would be your preferred media for discussing some design choices malli could potentially have a stake in? I’ve been thinking for quite a while that there’s two topics I’d like to have persistently discussed, decided and documented, namely the plumbing&porcelain concept for schemas themselves I’ve mentioned before and swagger2 vs openapi3 vs postman collections generation, and while we could discuss those things here, the ephemeral nature of Slack and this unpaid Clojurians Slack instance especially isn’t very good documentation wise… 🙂


I'll just chime in to mention that some folks here (#data-science IIRC) have been using Zulip for that with apparent success! Doesn't lose history and has a much better (i.e. usable) threading model


Second chime in: I've been using Zulip quite a bit, and I think I prefer it to Slack. I don't see a huge difference, but it would be possible to have a single malli channel with different topics, where design could be one.


Yup! I actually consume this slack's content through Zulip's mirror.


Huh, cool. Didn't know that was possible. Do you happen to have a link?


Sure! Each one of slack-archive's topics is a channel (after you invite @UFNE73UF4, that is)

👍 4

Looks like Zulip’s free tier has limited search, are you sure it’s not going to lose history?


Or is someone paying/hosting that? 🙂 Sorry, not familiar with Zulip’s hosting scheme…


> Zulip Cloud Standard is free for open source projects! 🎉


@ikitommi that could maybe actually work for Metosin’s OSS? --^


Zulip-admin here. We're indeed using Zulip's OSS-plan ( Happy to answer any more questions.


btw I see @UFNE73UF4 is no longer a member of this channel... :thinking_face:


scratch that (bots don’t appear in the member-list)


Thanks for keeping Zulip working 🙂 It's been really helpful for doing Scicloj-work 💯


yw!, great to hear.


late to the thread here but I'd like to propose ClojureVerse for this. Long form asynchronous is more suitable for writing out proposals and discussing their merit. Happy to set up a Malli category.

👍 4

Worth noting that Zulip also favours long form, async content (with proper quoting, nesting, etc) given the threading model. (And I also consume ClojureVerse through Zulip's mirror - annoucements, but still) simple_smile


oh, what would the category mean? all the discussion still go to the main feed?


But, as the discussions are anyway in threads in clojureverse, one could just not read the malli thread/s if that’s not relevant to them.


Thanks for the reference!


@roklenarcic @suomi.esko there are two ways that the properties are used: 1. top-down: generators use this. the first generator that is found is used. [:and {:gen/elements ["a" "b" "c"], :error/message "fail"} string?] short-circuits on that gen. decoders & encoders compose top-down, json-schema overrides work this way etc. 2. after-the-fact: error messages are looked for after the error has happened. here: it the example, the failure happens at string? , which doesn’t know any of the parent decorations for errors. this is bad, and should be fixed in a coherent way, related issues: &


the error message thing could be “easily” fixed so that the error message formatter looks also at the parent schemas (all the information is available in malli.core/explain result.


… but would not solve [:map [:x {:error/message "fail"} string?]]], where the info is in the entry meta.


ideas welcome, will put my hammock on the backyard this week, so will think about how to do this


@suomi.esko maybe a open malli video chat? google hangouts for example later this week? issues have persistent discussion, but as things link, the discussion is bit scattered.


Hmm, video chat could probably be an interesting way to solve this, as I have no idea if this is like 5, 15 or 50 minute topic and it’s not quite clear to myself either entirely what the whole scope is…


(def Country
  [:map {:id "Country"}
   [:name [:enum :FI :PO]]
   [:neighbors any?]])

(def Burger
  [:map {:id "Burger"}
   [:name string?]
   [:description {:optional true} string?]
   [:origin [:maybe [:maybe Country]]]
   [:price pos-int?]])

(def OrderLine
  [:map {:id "OrderLine"}
   [:burger Burger]
   [:amount int?]])

(def Order
  [:map {:id "Order"}
   [:lines [:vector OrderLine]]
   [:delivery [:map
               [:delivered boolean?]
               [:address [:map
                          [:street string?]
                          [:zip int?]
                          [:country Country]]]]]])


(require '[malli.mermaid :as mermaid])

(mermaid/class-diagram Order)
;   class Country {
;     + :name [:enum :FI :PO]
;     + :neighbors any?
;   }
;   class Burger {
;     + :name string?
;     + :description string?
;     + :origin Country
;     + :price pos-int?
;   }
;   Burger o-- Country
;   class OrderLine {
;     + :burger Burger
;     + :amount int?
;   }
;   OrderLine o-- Burger
;   class OrderDeliveryAddress {
;     <<embedded>>
;     + :street string?
;     + :zip int?
;     + :country Country
;   }
;   OrderDeliveryAddress o-- Country
;   class OrderDelivery {
;     <<embedded>>
;     + :delivered boolean?
;     + :address OrderDeliveryAddress
;   }
;   OrderDelivery *-- OrderDeliveryAddress
;   class Order {
;     + :lines OrderLine
;     + :delivery OrderDelivery
;   }
;   Order o-- OrderLine
;   Order *-- OrderDelivery"


(59 loc 😉)


Wow that's awesome


The tree structure logic is the mermaid namespace, right? I think it could be useful to have generic function to generate a dependency tree