What if your API was a data structure instead of a set of handler functions?
We released https://github.com/flybot-sg/lasagna-pattern, a pull-based data toolbox for Clojure/ClojureScript built on the work of @renewdoit.
The idea: collections implement ILookup and Mutable, so the client sends EDN patterns that walk your data. One endpoint, no route table. Authorization is the shape of the map itself: missing role = missing subtree, no middleware. Reads and writes use the same syntax. Mutations return the full entity.
'{:guest {:posts ?all} :member {:me ?user}}
Three independent libs on Clojars: pattern (DSL), collection (CRUD), remote (HTTP transport).
Try it live in the browser: https://pattern.flybot.sg (sandbox + remote mode against https://www.flybot.sg)
Full write-up: https://www.flybot.sg/posts/18
Feedback welcome!The pull pattern language made me think of Specter. Given that you're also building a new lisp-like language, I suppose you hope to eventually translate this to the Flybot language once it'll be ready for this?
Yes, I hope so. The Flybot language is very different from Clojure, though; it is a language built for AI, and human programmers become observers.
eca Announcing http://web.eca.dev - Control your #eca sessions remotely! Now you can approve, send new prompts and manage chats from you phone for free! The way it works is, you configure servers to allow remote connections and a password via config, then you can use http://web.eca.dev or spawn your own https://github.com/editor-code-assistant/eca-web host! For how it works, check https://eca.dev/config/remote/. Come to #eca! 🎉
org.clj-commons/humanize 1.2
humanize is a small Clojure[Script] library to format things in a human-readable format, such as file sizes,
time durations, and lists.
https://github.com/clj-commons/humanize/
New in 1.2:
• Added relative-datetime used to output an approximate span of time between two points,
e.g., "two days, 10 minutes ago".
https://github.com/clj-commons/humanize/milestone/5?closed=1