Hello, 

I have adapted SRFI 158: Generators and Accumulators for Bigloo. It can be 
found at https://github.com/donaldsonjw/srfi158. Both the Bigloo native and jvm 
backends are supported. The SRFI 158 library requires coroutines, and the 
sample implementation, unsurprisingly, leverages call/cc for its 
implementation. Unfortunately, Bigloo’s support for call/cc is poor, so this 
library instead provides 2 different, non call/cc-based coroutine 
implementations. The native backend implements coroutines via the makecontext 
family of procedures, and the jvm backend uses a thread-based implementation. I 
am certain there are still some rough edges and would appreciate any feedback, 
if someone gives it a try.
N.B., I have only tested the make-context corroutine implementation on X86-64 
Linux, and given that the performance difference, at least in my limited and 
non-scientific benchmarking, does not seem to be too great, I am considering 
just supporting the thread-based implementation for both the native and jvm 
backends.
Thank You,Joseph Donaldson 







Reply via email to