Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
How RxHTML Works (adama-platform.com)
14 points by mathgladiator on May 25, 2023 | hide | past | favorite | 13 comments


What is RxHTML? The article does not make it clear, and Googling just comes up with that page. Something to do with "A programming language for board games powered by the JVM"?


RxHTML started as patterns emerged while building useful things with Adama, so RxHTML is a templating language on top of a reactive document. ( https://book.adama-platform.com/rxhtml/ref.html )

My web-dev skills are fairly old school where I usually just used Mustache to make things look nice, and RxHTML is my attempt at something like mustache except it respects HTML (rather than just string templating). The reason I wanted to build yet another template engine is that I wanted to deal with differentiation.

If you see the entire state of a page as S, and then f is the template such that f(S) is the web page; RxHTML is to address how to handle f(S + dS/dt...) where we can template efficiently as the underlying state changes.

This blog post was written for me to help clarify what RxHTML is to a friend.


> Recently, I have even introduced a new meta level called EdHTML where I generate RxHTML from the backend’s reflected schema

>> grug tempted to reach for club and yell "big brain no maintain code! big brain move on next architecture committee leave code for grug deal with!"

-- https://grugbrain.dev/


Or the Unix way with simple layering of tools...


Those are some terrible variable names


Thr javascript is generated as I'm working towards minimizing the output size. I've got more awfulness to bring forth.


That's fair but a second step to minify the code might make development a little easier? Or a debug flag so that you can see meaningful names.


That's fair as well. Honestly, this is the first version, and I've just been surprised by how little I've had to debug things. The handful of things that I've added to RxHTML are carrying me farther than I thought.


Is this some ‘most unreadable code’ competition or something?


For generated code? Yes...


Assembler. You’ve invented assembler.


this is like writing jsx but without compiler


RxHTML is the compiler.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: