|
|
|
|
|
by tess0r
2364 days ago
|
|
I agree. I've written an interpreter in rust [1] and input handling, esp for numbers, was really annoying. I guess the best reference for implementing new interpreters is npiet and testing all example images. [1] https://github.com/tessi/rpiet |
|
npiet is good, and I use its examples for testing, but FYI it diverges from the spec in how it handles whitespace. According to DMM, if the cursor enters a loop entirely within whitespace, the program should terminate. Currently, npiet doesn't have a cycle-detection algorithm so it hangs.
One of these days I'll get around to making my test infrastructure and polishing up my tests... but I've recently had some weird thoughts about a place&route algorithm to replace my existing Piet backend and that's more interesting. First step, design a router that creates right-hand-rule paths through whitespace? What am I even doing with my life...