Skip to main content

Timeline for Shortest auto-destructive loop

Current License: CC BY-SA 3.0

6 events
when toggle format what by license comment
Dec 27, 2016 at 19:00 comment added M L For your second example, Here’s a full colored debug Dump of my DUP interpreter. it’s obvious once you see how the data stack (ds) and the return stack (rs) work, the latter not being transparent in FALSE, though.
Dec 27, 2016 at 18:36 comment added M L @ConnorO'Brien: I would say that your first solution should crash any interpreter. I just made a debug run with my own interpreter, and it’s obvious that the first . empties the data stack, while in the second loop $ tries to duplicate the top element of the empty stack, which should lead to an error (well, my interpreter does). The second version should not be valid because it does not even finish the first loop because it already tries to access the empty stack prematurely.
Dec 27, 2016 at 18:20 comment added M L @MamaFunRoll I love DUP, I just wrote a DUP interpreter and I’m playing around with it.
Dec 24, 2016 at 3:12 comment added Conor O'Brien @MamaFunRoll oh yeah, I forgot that you made RETURN! I gotta try that one. :D
Dec 24, 2016 at 3:04 comment added Mama Fun Roll You should also try DUP, which is basically a superset of FALSE. That's what I used to make RETURN.
Dec 23, 2016 at 23:08 history answered Conor O'Brien CC BY-SA 3.0