It was surprisingly easy to get my stack based programming language to generate the file format of by @neauoire

· · Web · 2 · 4 · 10

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

Obligatory quadtree grammar,
I think I need to figure out how to implement arrays next.

Alternative output device,
the interpreter now generates json files in the format used by my AxiDraw driver.

The "save" at the bottom looks weird because the lower part is getting clipped.

Added lines and floating point numbers, it's nice to make something that doesn't go away when I turn off my computer

@l3kn pull dotgrid, I've replaced lineto to just line. I might implement lineto at some point which will use the latest point as a starting-off position. But for now, it's line, arc and bezier.

@neauoire Thanks for making such a nice piece of software to play with, this is just what I needed after weeks of learning for exams!

@l3kn I'm very happy you like it. Would you likeit if I added point() so you can draw individual pixels?

@neauoire That would be great, maybe also filled rectangles?

@l3kn You'll have to implement rectfill yourself from point ;)

It's up!

@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.

@l3kn AAAAAH that's so pretty. Do you think I could use that on XXIIVV?

@l3kn the moiré effect on the circles when you move the image is interesting.

@jameschip I'd like to get there at some point, normal PostScript would probably be a better fit for it.

For now I'm working through the list of features I'd like to have in my language, then try to make a minimal image to test the new ones.

If you DM me your address I can send you some of the A4 drafts,
I might take a while to get to that though.

@nasser Thanks! I really like these kinds of single-purpose programming languages and for some reason including the source code adds a lot to it. It's a bit like a puzzle, trying to relate elements of the code to elements of the picture

Sign in to participate in the conversation

Merveilles is a community project aimed at the establishment of new ways of speaking, seeing and organizing information — A culture that seeks augmentation through the arts of engineering and design. A warm welcome to any like-minded people who feel these ideals resonate with them.