2 ms·
Is there some way to break computation? I had a look at the tutorial, and went from: (take 10 nats) via (take 1 (reverse (take 1000 nats))) to doing the same wi
by e12e 12y ago
Is there some way to break computation? I had a look at the tutorial, and went from: (take 10 nats) via (take 1 (reverse (take 1000 nats))) to doing the same with 10000000 (or so). ctrl-z and pkill let me go on to to other things, but it would've been nice if ctrl-c worked as well...?
- egi 12y agoIf you install egison on your machine, ctrl-c should work on your machine. However, ctrl-c does not work online egison currently.
- e12e 12y agoHm, you're right -- could be that cpu/swappiness was the issue. If instantiate less from the lazy sequence, I can indeed break with ctrl-c, so eg: 30000 is about enough not to eat all resources, and still take enough time that I can ctrl-c--out (and also does complete without crashing if I let it run a little while, about a second I think): (take 1 (reverse (take 30000 nats))) Anyone know if this is a known issue with Haskell (I assuming this is a pretty straight wrap for Haskell lazy lists?) -- that you can get the compiler/runtime into a tight loop eating so many resources that it isn't possible to abort cleanly?
- egi 12y agoThank you for letting me to know about this issue. I noticed this problem for the first time. Our implementation of lazy evaluation is not straight wrap of Haskell. I'll look into about this.