This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-10-21
Channels
- # announcements (10)
- # aws (38)
- # beginners (220)
- # calva (2)
- # cider (26)
- # clj-kondo (194)
- # cljs-dev (4)
- # clojure (190)
- # clojure-dev (7)
- # clojure-europe (3)
- # clojure-italy (6)
- # clojure-nl (4)
- # clojure-uk (8)
- # clojured (1)
- # clojurescript (29)
- # code-reviews (31)
- # community-development (9)
- # core-async (24)
- # cursive (38)
- # data-science (51)
- # datomic (52)
- # dirac (2)
- # emacs (3)
- # events (1)
- # figwheel-main (4)
- # fulcro (49)
- # graphql (13)
- # heroku (1)
- # hoplon (19)
- # immutant (3)
- # leiningen (1)
- # nrepl (59)
- # off-topic (12)
- # onyx (2)
- # pathom (51)
- # reitit (15)
- # shadow-cljs (88)
- # spacemacs (6)
- # sql (3)
- # tools-deps (107)
- # xtdb (11)
just pushed [metosin/malli "0.0.1-SNAPSHOT"]
. Goal is to get initial stable out next week.
Does Reitit support shared routing for reitit.http
style routing tables? ie. I've got something that looks like:
(r/router ["/api" ["/status" {:get {:name :api/status}}]])
And (r/match-by-name :api/status)
returns nil
. Is this expected?@rschmukler not atm, but here's the issue, comments welcome: https://github.com/metosin/reitit/issues/271
Ah, I'm sorry for not searching GH issues first
What is the value proposition over spec from mali? The avoidance of macros? What are the disadvantage of Mali over spec? :)
(Just trying time understand, no bad intentions)
@ikitommi thanks for the quick response - weighed in with my thoughts on the issue. Depending on your feelings, I might be willing to try my hand at a PR
@neo2551 The major advantage I see in Mali is that things are plain old data. They can be extended with additional meta data (eg. error messages, json encoding behavior, descriptions) which enables you to re-use them for more than just the conformed shape of data (eg. serialization, forms, API introspection).
Another advantage I see is dropping the registry. spec-based libraries use the registry for global state which can lead to a lot of boiler plate around dealing w/ checking the shape of what you're dealing with. ie. If I am using the registry for rich data-based specs, then, I always have to check whether I have a keyword or the actual map. This can be both boilerplatey and non-performant
(Don't get me wrong, the registry can be good too, but I like that mali is explicit about it)
I have reitit setup to pass transit data to my client. Most of the body works fine, but with a decimal value I get [TaggedValue: f, 18.87]
when I try to render it using str
. How can I render just the number?
I have the following middleware setup, I thought muuntaja would take care of this.
[parameters/parameters-middleware
muuntaja/format-negotiate-middleware
muuntaja/format-response-middleware
exception/exception-middleware
muuntaja/format-request-middleware
coercion/coerce-response-middleware
coercion/coerce-request-middleware
multipart/multipart-middleware]