TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Coroutine iters in Common Lisp

59 点作者 codr4life超过 8 年前

4 条评论

ScottBurson超过 8 年前
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 未加载
ykm超过 8 年前
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 未加载
vseloved超过 8 年前
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>
kazinator超过 8 年前
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 未加载