3 ms·
Ruby-ish pseudo code is somewhat remote from working Forth.
by kazinator 8y ago
Ruby-ish pseudo code is somewhat remote from working Forth.
- vidarh 8y agoIt's remote in that it looks very different, but not in terms of complexity. The operations used in the pseudo code are basically just. - Pushing registers onto the stack - Iterating over the stack - Appending to a linked list - Popping the first entry off a linked list - Iterating over a linked list - Calling a function/method ("free") to release the memory. In it's most naive form this would mean appending it to a linked list of free memory. The two first requires dipping into assembler in a lot of languages. The rest will be tiny in most languages, including Forth, but my Forth knowledge is very rudimentary hence why I didn't try.