4 ms·
Okay... how do you do this in Lisp? Also, PG, does Arc support Time Travel instructions? ;)
by Readmore 20y ago
Okay... how do you do this in Lisp? Also, PG, does Arc support Time Travel instructions? ;)
- notabel 20y agoDoing it in Lisp would be exceedingly tricky, since, while most dialects have some sort of laziness construction, it's explicit, so you don't get the automatic evaluation order reduction that happens in Haskell. (NB: Unless I'm wrong. I've never tried it, it's possible that there's some nice trick for it that just isn't occuring to me.) It's unlikely that the situation is any different in Arc; Haskell is just fundamentally different from other languages (other than Clean), in that lazy evaluation is the default behavior. In Lisp you can ask to create a thunk and then ask to evaluate it later; in Haskell, everything is a thunk, and the compiler/runtime evaluates it when needed.
- dfranke 20y agoFully reentrant continuations feel a lot like time travel. In fact, I once overslept my first class because when my alarm went off and I woke up groggy, I shut off my alarm thinking "I'll just remember my current continuation and if I oversleep I'll call it back later with an error."