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
Interesting! I might dig a bit more into forth, I've skimmed it as a lang before, but never dove in.
My primary use case would be "pre-interpreted" (and serialized) representations, as a sort of command/RPC script that could be sent over the wire.
1
1
I call this "protocol oriented programming": protocols optimized for parsing using simple stack machines. Structured data = stack machine program.
Used in synthesizer that's under development but currently on hold. Lots of work still. Hope to pick this up in winter.
1
1
Replying to
Very cool! I'll let you know if I make any progress on my particular yak, or let me know if you want to have a chat about it some time!
1
1
Replying to
Send me an email if you want to be subjected to incoherent rambling.
I'm a bit stuck.. my ideas are going all over the place. Looks like I will touch the code again this week so might be a good time to weed it out and write something about it.
1
I think I know what I want. A stack machine model that fits into contemporary architectures, i,e, a meta system that can be used to reason about meaning of programs, while still using the compression aspect of Forth, i.e. let a human do the code factoring & instantiation.
base semantics would then be a "pure" stack machine, with read/write implemented as communication ports
1
1
and use something like CSP to glue them together, which gives a nice strict semantics that can be compiled to event handler state machines
forth-like protocols then follow naturally
all very vague but i believe there is a concrete form hidden here
1


