News for hackers. Stuff that matters.
Re:Hy by alexanderdmitri on Sunday August 04, 2019 @02:35PM (#20608379)
How does Hy manage recursion given the limitations there in Python?
Re:Hy by gilch on Sunday August 04, 2019 @05:21PM (#20609298)
It doesn't. Or does the same way as Python: imperative loops. TCO is a key feature of Scheme, but not of Lisps in general. Clojure doesn't have it. You can always trampoline like Clojure's loop does.
Re:Hy by alexanderdmitri on Sunday August 04, 2019 @05:52PM (#20609448)
10-4, thank you!
Re:Hy by jedimastert on Monday August 05, 2019 @06:19AM (#20612834)
What kind of limitations are you referring to?
Re:Hy by alexanderdmitri on Tuesday August 06, 2019 @12:19AM (#20622092)
Python limits the stack to a 1000 and a series of recursive calls hitting that ceiling will throw a `RecursionError`.
Re:Hy by gilch on Tuesday August 06, 2019 @12:28AM (#20622133)
You can actually set this to a higher number in the sys module. Maybe not too high if you don't like segfaults.