Delimcc in practice?

Is delimcc robust and usable in practice? I see it’s supposed to work on bytecode and native, and I’ve tested it a bit on linux, successfully. But I’m wondering if there are gotchas or if it’s brittle, and whether it interacts at all with threads and exceptions.

2 Likes

I’ve had some difficulty with the native version on macos, but bytecode works fine.

I’ve never used it but I remember interesting points and discussions from this article: http://gallium.inria.fr/blog/generators-iterators-control-and-continuations/, that you might already have seen.

Indeed, I remember this blog post. I’m more wondering about the robustness of the native variant (and am a bit worried since there’s no CI, no repo, no issues, and already negative feedback from @jfeser)

delimcc is maintained in an old-school way. In my experience it does work with native compilation (I’ve tested it as part of this work), but it is not fast (because the runtime hacking causes overhead) if you want to use continuations heavily. Compiler/runtime-supported implementations (as enabled by Multicore, or recently proposed for GHC) may be an order of magnitude faster.

I think of delimcc as an excellent library to get experience programming with delimited control operators, and test ideas for expressivity, rather than for performance.

The thing is, effects in multicore seems to be years (plural) away, the way I see it. I’m more worried about reliability than raw performance in this particular case…

1 Like

When I last tried it (4.06.1+multicore), the effects system worked fine for implementing an equivalent to ECMAscript or python generators using delimited continuations, if that is what you were thinking of using delimcc for. The concurrency in question was single-native-threaded though.

3 Likes