Re: SBCL Fibers proposal
mike thomas <[email protected]> Fri, 13 Mar 2026 09:59:47 +1000
| Newsgroups | gmane.lisp.steel-bank.devel |
|---|---|
| Message-ID | <CAFh3CN3QV_Tch76bQyNC6TLVPxV=Hh1ijrvUN9VKVr2d=3L5SA@mail.gmail.com> |
Hi Steve. I pseudo-believe because an AI told me that Franz didn't have any coroutines but that Clozure CL (CCL), it's descendant, does: https://github.com/svspire/ccl-coroutines/blob/master/ccl-coroutines-args.lisp Cheers Mike Thomas ---------------------------------------------------------------------------------------- Brave browser's search result gave me the above link as follows: There is no official documentation for coroutines in Franz Lisp (now known as Clozure CL) within the provided search results. While Franz Lisp historically had features like "stack groups" that enabled lightweight concurrency, these were removed in favor of native OS threads and are not directly usable for coroutines. However, a coroutine implementation for Clozure CL (CCL) exists in the open-source project ccl-coroutines, which uses fake stack-groups and semaphores to simulate coroutines. This implementation allows functions to yield values and resume execution later, enabling generator-like behavior. It is documented in the source code, particularly in ccl-coroutines-args.lisp, and supports features like: - make-sg: Creates a stack-group coroutine. - sg-resume: Resumes a coroutine, optionally passing arguments. - yield: Yields a value and suspends execution (defined as a macro). - sg-return: Returns values to the resumer. This approach is not a native coroutine system but a workaround using CCL's process and semaphore facilities. It is suitable for use cases like generators or cooperative multitasking but has performance limitations due to OS scheduler dependency. For further details, refer to the GitHub repository: ccl-coroutines/ccl-coroutines-args.lisp <https://github.com/svspire/ccl-coroutines/blob/master/ccl-coroutines-args.lisp> . AI-generated answer. Please verify critical facts. Elaborate How do I implement a coroutine in Clozure CL? <https://search.brave.com/ask?q=How%20do%20I%20implement%20a%20coroutine%20in%20Clozure%20CL%3F&source=llmFollowup&quickAnswerKey=08d6dc68a7525f6eee9cf0c4e6bd6925ed73&quickAnswerQuery=franz%20lisp%20coroutines%20documentation>What are the performance implications of using coroutines in Franz Lisp? <https://search.brave.com/ask?q=What%20are%20the%20performance%20implications%20of%20using%20coroutines%20in%20Franz%20Lisp%3F&source=llmFollowup&quickAnswerKey=08d6dc68a7525f6eee9cf0c4e6bd6925ed73&quickAnswerQuery=franz%20lisp%20coroutines%20documentation>Can coroutines in CCL handle nested yields? <https://search.brave.com/ask?q=Can%20coroutines%20in%20CCL%20handle%20nested%20yields%3F&source=llmFollowup&quickAnswerKey=08d6dc68a7525f6eee9cf0c4e6bd6925ed73&quickAnswerQuery=franz%20lisp%20coroutines%20documentation> Copy Share On Fri, Mar 13, 2026 at 9:45 AM steve gonedes <[email protected]> wrote: > On 3/12/26 18:25, Charles Zhang via Sbcl-devel wrote: > > > > > > > > Hi Anthony, > > > > My notes aren't as detailed as Christophe's review, but I did spend > > enough time looking at your proposal that I think I should share them > > anyway. tl;dr is I think dynamic binding needs to be redesigned/ > > rewritten and please start adding citations to the claims to make this > > easier to review and allow us to have more time to help you fix the sbcl > > parts you're not sure about rather than spending time to refute the llm > > on things it says verbosely that are totally wrong. org file is pasted > > inline in this email. > > > > are fibers like coroutines. I remeber franz acl used to have an > implementation before hardware threads where common place? I believe the > coroutines can be stack allocated. anyone remember or have a link? > > > > > _______________________________________________ > Sbcl-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/sbcl-devel > _______________________________________________ Sbcl-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sbcl-devel