clojure-austin

camdez 2024-08-21T15:27:54.102179Z

Anyone used https://github.com/oliyh/martian? I just ran across it yesterday and it looks pretty awesome to me. I’ve increasingly wondered what the point is of wrapping APIs in libraries and these days tend to use HTTP clients more directly. I’d been sort of writing my own wrappers so I’d have a protocol I could easily mock for testing, but the most recent one I’ve written only has a single request method… I’ve just found myself drifting more and more towards simplicity. But then when it comes to logging and mocking, it’s nice to have named operations, and argument validation, and Martian seems like exactly the direction I was heading in. The author gave a talk to London Clojurians that I’m looking forward to watching when I have a minute: https://www.youtube.com/watch?v=smzc8XlvlSQ

staypufd 2024-08-21T15:28:45.860149Z

No. Ill have to watch that.

camdez 2024-08-21T15:28:47.986569Z

If I understand correctly, it’s basically like the https://github.com/mcohen01/amazonica approach vs the https://github.com/cognitect-labs/aws-api approach.

camdez 2024-08-21T15:29:14.800239Z

(aws-api being more Martian style).

staypufd 2024-08-21T15:32:57.248709Z

Nice. Just reading thru docs and it looks like a huge timesaver in addition to its other benefits.

jakebasile 2024-08-25T14:42:25.178429Z

I was on the other side of something like this: needed to provide a conforming API interface for a tool that would work with any generic API that implemented it. It can be pretty constraining on the producing side but the benefit of being able to point that third party client to it is quite nice, and because you have such a (hopefully) well-defined schema to implement there's a lot less bikeshedding at the design phase. Codegen over a schema like this on the consumer side would be equally nice in many cases though if there is an official Java wrapper I'd usually default to that.