I'm idly wondering what a small dsl/scripting language would look like if it was primarily/only focused on:
* State machines
* Message Queues
* Byte manipulation/ser+deser
Basically, I want a scripting language that is the Raspberry Pi's PIO assembly language.
Conversation
Replying to
Yeah, at some point I'm going to realize I'm just re-inventing a lisp or forth or erlang or something.
I'm trying to figure out a useful little scripting lang for embedded applications, that is relatively compact/simple. (at least smaller than a wasm or circuitpython or lua)
3
2
This is a holy grail to me as well.
Gut feeling is that the generality needed for an Erlang-like scripting lang is too great to fit it into that kind of code/data space.
Forth as a scripting lang with some decent primitives goes a long way, but good luck selling that :-)
1
I've made several attempts at a "safe Forth". Not satisfied, but not done trying either.
Stack machines and refcount GC mix well.
But cleaning up the original Forth idea to remove all unsafe constructs is not an easy task.
2
1
1
1
In good Forth DIY tradition, probably not :-)
TBH I'm a bit lost about what to do with this, but Forth as a protocol works for me, Forth as an instruction set also (e.g. tiny control CPU in FPGA).
As a stand-alone language without meta system, Forth is stuck in the past.
1
Example of Forth as CPU (though this doesn't have a separate data stack since I didn't need a data path, it's just a CPU with call/return, loops and peripheral register access)
1
1
Example of Forth as a protocol. Interpreter in browser listening to WebSocket. Erlang code sends stack programs.



