4 ms·
Say you want to model a Turing machine. You can allocate a fixed length tape (making a linear bounded automaton), or a tape that can grow (closer to a "real" Tu
by e12e 9y ago
Say you want to model a Turing machine. You can allocate a fixed length tape (making a linear bounded automaton), or a tape that can grow (closer to a "real" Turing machine).
Now, you could argue that writing to a part of the finite tape that's so far clear is "allocating memory" - but at the same time that could be a single section of statically allocated memory from the perspective of the Os that runs your vm...
For some related fun, I still think the nim "howistart" is great (but I haven't tried to follow along in a while, not sure if the code works straight away with up to date nim (but I see there's a notice mentioning a 2018 update, so I hope it's still /again working!)):
http://howistart.org/posts/nim/1/ http://howistart.org/posts/nim/1/
- e12e 9y agoAlthough, looking at the github repo; I'm confused. Can't find the change related to 2018 update, but there's this: https://github.com/howistart/howistart/pull/50/files https://github.com/howistart/howistart/pull/50/files