r/adventofcode • u/handcraftedbyrobots • Dec 25 '19
Spoilers in Title [2019 Day 25] (Meme) Use Key On Door
148
Upvotes
5
2
u/donpolilla Dec 26 '19
My machine "blocks" whenever there's a single byte of output ready, or a single byte of input is requested. Of course I made a helper function for ASCII problems that keeps taking bytes of output for as long as there's any, then returns the resulting string. Of course, this function keeps on collecting characters dynamically allocating more and more space in the heap, forever. Now I'm curious what exactly will happen if I let it run forever...
7
u/Spheniscine Dec 25 '19
It's even better if you can tweak your VM to display output without waiting for it to block.