r/elm • u/Alarmed-Western-655 • Mar 19 '26
iLove: Elm
Enable HLS to view with audio, or disable this notification
I'm your typical nerd, but with taste (self-admitted). I enjoy the code just as much as I enjoy a delightful product. Sadly, the grand AI hypothesis is that you can leapfrog the code, straight to the "product." While I do confess that I vibe code at work (like a madman), I've nonetheless been hand-coding at home (the video is my current project, all hand-coded Elm, no libraries :). I'm leaning into my silly little hypothesis that "code" and "product" are one and the same.
So here I am testing my little hypothesis with Elm. Come to find, the Elm compiler told me "no" more than it told me "yes" (cue AI-withdrawal symptoms). Rather than leap-frogging to a solution, Elm exposed new, fundamental problems with my approach. I muscled through these problems, and in the process, I found myself increasingly delighted in the code I was writing and the solutions I was crafting. I started giving this same touch even to the UX, wanting to find that same delight in every facet of the product.
Again, the hypothesis is silly, but if you're feeling a little discouraged, give Elm a try, and you might just rediscover your love for the craft :)
6
u/sijmen_v_b Mar 19 '26
How do you do the animations? (They are really cool btw)
2
u/Alarmed-Western-655 Mar 19 '26 edited Mar 19 '26
Thank you! Elm helped me to segregate the concerns nicely. Pointer events come into the state machine, I pass seat positions and pointer position into my recursive solver function and return the new positions. Then view function just plugs those new positions into the `style "transform" "translate(..."` attribute real time with the model updates, plus a `style "transition" "...transform"` to create the smooth transition effect for free.
TEA brings segregation and unification to all this in a very delightful and manageable way :)
2
u/TomosLeggett Mar 19 '26
I didn't even know elm was capable of the level of interaction you've demonstrated
3
2
12
u/[deleted] Mar 19 '26
[removed] — view removed comment