News for hackers. Stuff that matters.
Re:Lisp.py by busterarm on Wednesday July 20, 2022 @10:46AM (#32166482)
How does one Lisp without TCO?

(Yes, I know some do without, but usually not without a great reason...for example Clojure needing to maintain JVM calling conventions)

Re:Lisp.py by rscho on Wednesday July 20, 2022 @10:56AM (#32166643)
Scheme guarantees TCO, but not Lisp in general I think. I seem to remember that Common Lisp does not guarantee TCO either.
Re:Lisp.py by arunix on Thursday July 21, 2022 @07:42AM (#32178191)
Common Lisp does not guarantee it, but a few implementations do provide it

https://0branch.com/notes/tco-cl.html

Re:Lisp.py by capableweb on Wednesday July 20, 2022 @10:47AM (#32166502)
One focuses on the learning aspects rather than creating a production lisp. If you want a production lisp, there are plenty out there.

And regardless, adding TCO is relatively simple as well, so not exactly a hard problem to figure out after you've written the first version of your toy lisp.

Re:Lisp.py by busterarm on Wednesday July 20, 2022 @10:51AM (#32166563)
We're talking about Lisp in Python here. Python itself famously[1,2] refuses to have TCO.

1: http://neopythonic.blogspot.com/2009/04/tail-recursion-elimi... 2: http://neopythonic.blogspot.com/2009/04/final-words-on-tail-...

Re:Lisp.py by capableweb on Wednesday July 20, 2022 @10:54AM (#32166616)
Re:Lisp.py by Xophmeister on Wednesday July 20, 2022 @05:05PM (#32172318)
You can implement TCO in Python manually with continuation-passing style and trampolines.
Re:Lisp.py by fami-com on Wednesday July 20, 2022 @03:20PM (#32170833)
Common Lisp doesn't guarantee TCO, and yet people manage just fine
Re:Lisp.py by kazinator on Wednesday July 20, 2022 @12:02PM (#32167703)
Generally, by doing actual work instead of linear recursion exercises.