Fork me on GitHub
#reitit
<
2019-10-21
>
niwinz09:10:16

malli is deployed on clojars?

ikitommi10:10:30

just pushed [metosin/malli "0.0.1-SNAPSHOT"]. Goal is to get initial stable out next week.

niwinz10:10:01

nice, i probably go to adopt it on uxbox instead of cljs.spec

👍 8
rschmukler18:10:43

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?

ikitommi18:10:46

@rschmukler not atm, but here's the issue, comments welcome: https://github.com/metosin/reitit/issues/271

rschmukler18:10:01

Ah, I'm sorry for not searching GH issues first

David Pham18:10:03

What is the value proposition over spec from mali? The avoidance of macros? What are the disadvantage of Mali over spec? :)

David Pham18:10:18

(Just trying time understand, no bad intentions)

rschmukler18:10:13

@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

rschmukler19:10:10

@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).

rschmukler19:10:39

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

rschmukler19:10:05

(Don't get me wrong, the registry can be good too, but I like that mali is explicit about it)

hackeryarn22:10:08

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?

hackeryarn22:10:12

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]