Ismael Celis
@ismaelcelis.com
830 followers 370 following 910 posts
Posts Media Videos Starter Packs
ismaelcelis.com
I extracted the little OpenAPI #ruby client I was using for this. Work in progress. github.com/ismasan/smidge
ismaelcelis.com
Also zero experience, but intrigued by the idea for a while. The basic idea is that "consistency" means ensuring that the facts that led to a decision haven't changed. Ie instead of version numbers you check that no new events of the same type and identifiers exist, before appending new ones.
ismaelcelis.com
Fuck this I'm too lazy to learn a new editor so I just installed .. err... LazyVim from scratch.
ismaelcelis.com
Where can I watch that?
ismaelcelis.com
Yeah, the argument is that whatever state you need to build, it's only there to make the one decision that each handler needs to make (eg "can I add this product to this cart?"). So, state is contextual to each decision, not necessarily spanning multiple decisions on the same "entities".
ismaelcelis.com
Where do you sit on "aggregate-less" DCB?
ismaelcelis.com
Life's too short to fix Vim. Time to give Zed another try?
ismaelcelis.com
Chatting to APIs via OpenAPI specs => LLM works pretty well, as long as the spec is complete.
ismaelcelis.com
Writing an OpenAPI parser with Plumb.
ismaelcelis.com
The actual web app also used this in-process API client to read and write data. So the entire app was server-driven, API-first. It was great for dog-fooding your own API, and simple to setup.
ismaelcelis.com
This is how I was testing Hypermedia APIs in Ruby some years ago. "root" is a client representing the API's root, exposing links as methods. In tests, the client uses a test adapter that talks directly to the Rack app instead of issuing actual HTTP requests. You test the API by navigating it.
ismaelcelis.com
Super easy setup for that terminal LLM chat.
ismaelcelis.com
And now that the client's done, it was pretty easy to turn a remote OpenAPI spec into RubyLLM tools, so that I can chat with the API.
ismaelcelis.com
Ok this was easier than I thought. This example uses an HTTP adapter that just sends in-process request objects to the Rack app (no actual network usage). Ideal for testing!
ismaelcelis.com
By using an in-process adapter (like Faraday's test adapter), you can use the client to more ergonomically test the API as you write it. This is something I've done in the past with hypermedia APIs and clients, like in this old library (Steppe's precursor) github.com/ismasan/brid...
GitHub - ismasan/bridger: Helpers to write and test hypermedia APIs in Ruby Rack apps, framework agnostic
Helpers to write and test hypermedia APIs in Ruby Rack apps, framework agnostic - ismasan/bridger
github.com
ismaelcelis.com
It's really simple, and it just returns responses as defined by the API's definitions, including validations