Closed vendethiel closed 8 years ago
That's not a bug. There are two version of u
. One where you provide a list to iterate over and a starting value:
u+GH[1 2 3)0
and one, where you only provide a starting value. In this case H
iterates over 0, 1, 2, ...
until infinity. In this case u
stops, when the lambda expression computes a values, that it computed earlier.
In your code you invoced the second case. G
will get the following values:
[1, 2, 3] -> [1, 2, 3, 0] -> [1, 2, 3, 0, 1] -> [1, 2, 3, 0, 1, 2] -> ...
The list gets bigger each time. Therefore G
will never reach a value, that it had before. So this will create an infinite loop.
Btw. if you want the the first value to be the starting value, you can use:
.U+bZ[1 2 3
makes sense, thanks. I still think it's a bug that the runtime is not bounded?
@vendethiel One major use case for the unbounded runtime is that it allows you to make interactive programs, by using functions like w
and E
.
oh, okay, fair enough :). Thanks!
@isaacg1 maybe I can then request a "compile only" button? So I can realize the generated code, and why it hangs
@vendethiel The solution to that is not a compile only button, but real time feedback, if I ever get around to it… D:
trying to compile this code:
hangs on pyth.herokuapp