This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-05-01
Channels
- # announcements (1)
- # babashka (73)
- # bangalore-clj (7)
- # beginners (295)
- # calva (128)
- # chlorine-clover (3)
- # cider (9)
- # cljsrn (10)
- # clojure (63)
- # clojure-europe (11)
- # clojurescript (1)
- # clojureverse-ops (3)
- # conjure (3)
- # emacs (7)
- # fulcro (13)
- # graalvm (8)
- # honeysql (16)
- # jobs-discuss (14)
- # malli (21)
- # meander (8)
- # onyx (1)
- # pathom (7)
- # portkey (2)
- # quil (3)
- # re-frame (4)
- # reagent (31)
- # reitit (2)
- # rewrite-clj (40)
- # shadow-cljs (29)
- # sql (20)
- # xtdb (13)
Are there any projects or examples out there for nifty crux/Malli compat stuff. Schemas or crux helper functions etc
Good timing! See @U0A5V8ZR6 's new lib https://mobile.twitter.com/spacegangster/status/1388092289084428299
@U051V5LLP is the initiator and the sponsor on this one 🙏
Yeah so cool! I had a 5 min play with this yesterday! Great work!
Any further examples/projects anyone has seen? @U899JBRPF
Nothing else that's hit my radar yet, but I'm also very interested by the intersection :) Semi-related: I am also curious about the possibility of Malli->Alloy tooling that could assist with modelling in Crux
Can connect in a bit and see what we come up with
@UJWLUPW13 do you have any use-cases in mind you're looking for? or dev workflows? I have some of my own ideas for helper code I'd want related to crux, but I'm interested to hear of others.
@U899JBRPF do you have any links or materials on alloy as it relates to crux?
Not yet. Just getting started integrating malli and crux (and new to both). Just wrote a transformer that santises crux entities to be passed on to a json api. transforms :crux.db/id -> id and strips out entity type im transacting in. Will get a better feel for what I need as I work with both
Malli coersion for crux database migration is going to be 👌
And UI generation
Mr Reiman, maybe you could be interested making a video review of the EQL generation I wrote and giving your opinion on a better way to write schema transformers? I think this could be beneficial for those writing transformers based on malli. If yes — we could schedule a video call @U055NJ5CC If no — no worries.
sure @U0A5V8ZR6, would like to do that, just super busy at work atm, between projects. If the code - and the goal - is available somewhere, I could first try to read that, between things.
Yep, you can look at it here: https://github.com/dvingo/malli-code-gen/blob/main/src/malli_code_gen/gen_eql.clj We have a branch merge pending. If we merge it before you look at the code – we’ll leave you a link in https://github.com/dvingo/malli-code-gen cc @U055NJ5CC Not rushing you with the review. If you can say at what period you will be probably available for that (in a week or three) that would help. Good luck with the workload!
Hey @U051V5LLP > do you have any links or materials on alloy as it relates to crux? Nothing published from me yet, but this is worth a look https://www.hillelwayne.com/post/formally-modeling-migrations/ and, whilst not directly Alloy-related, I think principles of https://en.wikipedia.org/wiki/Object-role_modeling are also relevant
i'm mucking with jsonista/malli and would like to use keywords for some map values, eg: { :Nested { :Map { :enums "values" :other "string" }}} How do i get the values for :enums to be keywords, eg :values... yet leave other strings as strings?
@joel380 you need to describe a schema with all the parts that need transformations. in your case, simplest way to do it would be:
(require '[malli.provider :as mp]
'[malli.core :as m]
'[malli.transform :as mt])
;; infer schema from example value
(def schema (mp/provide [{:Nested {:Map {:enums :values}}}]))
;; create json-decoder for the schema
(def from-json (m/decoder schema (mt/json-transformer)))
;; apply
(from-json {:Nested {:Map {:enums "values" :other "string"}}})
; => {:Nested {:Map {:enums :values, :other "string"}}}