News for hackers. Stuff that matters.
Re:Cap'n Web: a new RPC system for browsers and web servers by kentonv on Monday September 22, 2025 @04:18PM (#45338910)
> I wonder why they don't just do `.toString()` on the mapping function and then parse the resulting Javascript into an AST and figure out property accesses from that.

That sounds incredibly complicated, and not something we could do in a <10kB library!

Re:Cap'n Web: a new RPC system for browsers and web servers by actionfromafar on Monday September 22, 2025 @06:21PM (#45340336)
Maybe Fabrice Bellard could spare an afternoon.
Re:Cap'n Web: a new RPC system for browsers and web servers by sonthonax on Tuesday September 23, 2025 @03:37AM (#45343936)
To the contrary, a simple expression language is one of those things that can easily be done in that size.
Re:Cap'n Web: a new RPC system for browsers and web servers by kentonv on Tuesday September 23, 2025 @09:35AM (#45346836)
But the suggestion wasn't to design a simple expression language.

The suggestion was to parse _JavaScript_. (That's what `.toString()` on a function does... gives you back the JavaScript.)