It was surprisingly easy to get my stack based programming language to generate the file format of git.sr.ht/~rabbits/dotgrid by @neauoire

Implemented variable bindings (in one global dictionary) and graphics state (for now only a x,y position).

#theWorkshop

Follow

@l3kn I love the way you've managed to incorporate braces with stack based stuff. I dig Forth conceptually, but the lack of code organization makes it tough to read for me (primarily C background)

@jefftime PostScript uses a similar syntax but
I didn't look up how it's implement internally yet.

Everything inside { ... } is treated similar to quoted list in Lisp, unquoting (pushing the contents on the stack and processing them) when looking up a variable value or when using if / ifelse / for.

Sign in to participate in the conversation
Fosstodon

Fosstodon is an English speaking Mastodon instance that is open to anyone who is interested in technology; particularly free & open source software.