←
Conor190 posts
Conor avatar

Conor

@_csinclair_

🧙‍♂️ Conjurer of interfaces and abstractions 👨‍💻 Crafter of tooling to ease the burden of mundanity 🐭 Man of Vim 🥷 Full Stack Ninja ⌨️ Web Tech Enthusiast

◷ Joined November 2018▧ 31 Photos and videos
Conor avatar
Conor@_csinclair_·Nov 10

I just released a new video: Adding Time to Your Ash Resources ⏲︎ Invitations, reviews, approvals, expiry, deletion. All state machines with a time dimension. Ash Workflow now has a mix generator for 10 of them. Run one on an existing Ash Resource and the workflow is right there in your codebase, ready to tweak to your desires. youtu.be/9eeKUQBKBZo

Conor avatar
Conor@_csinclair_·Nov 5

This is such a cool idea! I haven't considered how well calculations would fit for UI rendering. I've gotta try this!

We also love the Ash Framework @ZachSDaniel1 @joshprice - and we kept asking ourselves why use a completely different programming model as soon as we step outside the business domain? In any nontrivial application, the UI is about half of the complexity and for largely reasons it is in an isolated world of its own. It turns out that Ash is already 'UI complete' - we can represent arbitrary screens as UI resources and their render trees as calculations. Data loading comes through relationships and reactivity from notifiers. We support full differential rendering and Phoenix wire compatibility (Datastar is also supported). With this design, you can directly expose your UI to embedded agents via ash_ai (and soon, ash_hyperlang). Link to the repo in the replies.

Post attachment
Conor avatar
Conor@_csinclair_·Nov 3

So if you write a typed_view over an append-only table, with say 2 columns on the view: valid_from & valid_to. Add a read that filters on now() Add as_of Every returned row is as it was at that moment.

Conor avatar
Conor@_csinclair_·Nov 3

Setting as_of on a read swaps every now() in the action’s filter for the datetime you specified.

Conor avatar
Conor@_csinclair_·Nov 3

It turns out AshTypedSql views can already read at any point in time. It took literally zero effort, thanks to the awesome new as_of option that came with Ash’s new Temporal resources. @ZachSDaniel1 really cooked with that one!

Conor avatar
Conor@_csinclair_·Oct 30

This means you can have: - Queries: reads or writes, with arguments and their types worked out for you - Views: the fields on the resource are autogenerated for you - Functions: these are converted into Ash.Exprs This gives us the best of both worlds, SQL for views into data at whatever level of complexity, and typed Ash resources sitting on top.

Conor avatar
Conor@_csinclair_·Oct 30

Inspired by Squirrel in the Gleam ecosystem squirrel.hexdocs.pm/ Postgres itself describes your SQL, so the types come straight from the database rather than a parser or anything hand-written.