I think more than anything I have been so happy with Elm thanks to The Elm Architecture. So I was wondering if anyone is working on an example, and if it is gonna be a goal to have a library for doing TEA in Roc
do you mean like for UI programming? Or do you have another use case in mind?
I can see myself use TEA on a lot of projects, not only UI. I think Lamdera is a good example. I think elms game dev slack channel is another good way of utilizing TEA.
Having a library to “instanciate” a MVU or MU that can hook into a platforms event system would be nice IMO.
But for using SDL or WebAssembly + HTML hooks are obvious ideas too. I would just think that having a TEA pattern library would be obvious for a descendant language :big_smile:
The pattern itself is just a reducer. One could make a platform expose such an API if they wanted. Maybe a UI platform based on SDL, and the platform controls view updates using this kind of pattern. elixir GenServers also have a similar pattern
TEA itself has a particular runtime behavior but abstractly it’s mostly just the reducer pattern
Functional languages generally make it easy to implement this kind of separation of actions and state
That being said, I think there might be something like TEA in the examples folder, I’m pretty sure I remember seeing an example with that name
I think I saw a talk by @Richard Feldman where he mentioned a TEA example?
I can't find it in the example folder tho
It may have been removed :(
But in any case it definitely is possible to imitate a similar API to TEA
Yeah seems that Roc has a lot of flexibility :smile:
Can’t wait for more documentation to arrive so that it’ll be a little easier to create some good platforms
Speaking of SDL, I have an open PR that tries to use it but then it exposed some bugs but it’s all good
I've also been working on a wgpu platform in parallel to the SDL one. Would provide a lot of similar functionality to SDL and will likely have a TEA like interface
nice
I just added a #show and tell stream so folks can share progress on things like these platforms! :smiley:
Last updated: Jul 06 2025 at 12:14 UTC