3 ms·
I was thinking some some subset of a stack-based language, enough to define different data types, eg. arr_name 1 2 3 4 5 array; float_name 5.75 float Sort of l
by kumarsw 6y ago
I was thinking some some subset of a stack-based language, enough to define different data types, eg.
arr_name 1 2 3 4 5 array;
float_name 5.75 float
Sort of like how Clojure or KiCad uses S-expressions to store data. The idea was that like Forth, the parser for such a data structure would be minimal and suitable for even a crappy programmer to implement. I'd thought this would be useful for minimal systems like microcontrollers or locked-down corporate systems with no chance of installing third-party libraries.
- iujjkfjdkkdkf 6y agoInteresting - if you had a parsing language defined, you could combine raw data with transformations, e.g. float_name 5.75 DUP MUL float so the transformed data gets loaded in. Could be cool for arrays or more complex data where you want to save the raw data and a record of how it gets transformed. And I understand you are targeting a minimal implementation, but the concept could also apply to bigger datasets and higher level languages, e.g. array_name 1 2 3 4 5 "x if x%2 ==0" array