With all this talk about Forth as a protocol, I issue a warning. My Lua test system has a simple web GUI communicating over websocket. The individual websocket messages are atoms. Structured data is sent as an atom stream.
Conversation
Replying to
However I did remove the RPN language as a programmer interface, opting for structured data, e.g. (add 1 2) implemented on top of the RPN language (1 2 quote add 2 call).
1
The reason for adding the wrapper: While the implementation feels simple, I realized I was going to need to explain all this, and the impedance mismatch of translating (prefix) Lua function calls to RPN protocol to eventuall map to (prefix) JavaScript calls seemed a little much.
1
So it is hidden. But why does this still feel right? Something for later, but I think the idea is mostly that all serialization formats are, well, serial. And will use some kind of "language" to build structured data from the stream. Why not make that language an actual language?
1
Because if you do, you could fuse the deserialization and the interpretation into a single operation. This makes sense for resource constrained devices: the "host" could still use nested data structure, but the "target" can fold over the stream without needing storage.
