TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Coroutine iters in Common Lisp

59 pointsby codr4lifeover 8 years ago

4 comments

ScottBursonover 8 years ago
I have long thought that a coroutine mechanism was one of the most unfortunate omissions from the ANSI Common Lisp standard. The Lisp Machines had a mechanism called "stack groups" that supported efficient coroutines, but I guess it wasn't considered critical for Common Lisp to have such a thing. As you've noticed, though, adding coroutines in a way that's general, efficient, and portable is very hard.
评论 #13413449 未加载
评论 #13408217 未加载
ykmover 8 years ago
Shameless plug: I had created a similar library[0] for common lisp, though it didn&#x27;t use conditions and restarts, also lacked a definitive yield construct. It still is profound how a major feature for other programming language is trivial to add to common lisp.<p>[0]: <a href="https:&#x2F;&#x2F;github.com&#x2F;ykm&#x2F;cl-iterators" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;ykm&#x2F;cl-iterators</a>
评论 #13407808 未加载
vselovedover 8 years ago
I presented a very similar implementation here: <a href="http:&#x2F;&#x2F;lisp-univ-etc.blogspot.com&#x2F;2016&#x2F;05&#x2F;improving-lisp-ux-one-form-at-time.html" rel="nofollow">http:&#x2F;&#x2F;lisp-univ-etc.blogspot.com&#x2F;2016&#x2F;05&#x2F;improving-lisp-ux-...</a> Still, a lot of interesting questions remain, which are discussed here: <a href="http:&#x2F;&#x2F;lisp-univ-etc.blogspot.com&#x2F;2016&#x2F;05&#x2F;improving-lisp-ux-one-form-at-time.html#comment-2682947352" rel="nofollow">http:&#x2F;&#x2F;lisp-univ-etc.blogspot.com&#x2F;2016&#x2F;05&#x2F;improving-lisp-ux-...</a>
kazinatorover 8 years ago
TXR Lisp is a dialect with CL roots, supporting delimited continuations.<p>They can be used directly via a lower-level API or via the obtain&#x2F;yield mechanism.<p><a href="http:&#x2F;&#x2F;www.nongnu.org&#x2F;txr&#x2F;txr-manpage.html#N-01C4E6B4" rel="nofollow">http:&#x2F;&#x2F;www.nongnu.org&#x2F;txr&#x2F;txr-manpage.html#N-01C4E6B4</a><p>Here is an example of obtain&#x2F;yield wrapped in the object system to create green-thread-like objects:<p><a href="http:&#x2F;&#x2F;www.nongnu.org&#x2F;txr&#x2F;rosetta-solutions-main.html#Synchronous%20concurrency" rel="nofollow">http:&#x2F;&#x2F;www.nongnu.org&#x2F;txr&#x2F;rosetta-solutions-main.html#Synchr...</a>
评论 #13408349 未加载