News for hackers. Stuff that matters.

Show HN: Reactive DOM Updates in Ruby

https://github.com/aalin/rdom

Hi everyone,

I've been working on this thing for a while. It transpiles Haml into Ruby, and then it streams patches to the browser which update the DOM.

There is a memory leak in s.rb, which I'm not really sure how to solve. Seems like objects stay alive for longer than they should because of circular references or something but I'm not sure what's going on to be honest.

I think this approach has potential though.

( 2 comments | 2 points | on HN )
Re:Show HN: Reactive DOM Updates in Ruby by scsteps on Tuesday May 02, 2023 @10:40AM (#35788200)
I think this is really awesome. I’m doing a deep dive in how various “backend languages” are being used to create interactive front ends (i.e. Phoenix LiveView) and I might even look into this as another example.
Re:Show HN: Reactive DOM Updates in Ruby by quechimba on Tuesday May 02, 2023 @05:35PM (#35794553)
That's really nice to hear! :)

I think rdom could turn into something usable if I could only fix that memory leak.

I'm also working on Mayu Live (https://github.com/mayu-live/framework), but I made rdom to experiment granular updates with signals, inspired by SolidJS (been watching a lot of streams by Ryan Carniato).