Skip to content

Comment on Hacking Coroutines into C

Comments

A similar approach, but rooted in the idea of synchronous languages like Esterel or Blech:

https://github.com/frameworklabs/proto_activities

This is Céu[0] erasure! ... I'm joking, I'm joking, although I do think it deserves a mention.

Seriously though, neat library! It took me a moment to realize that everything with a pa_ prefix is a macro, for the dumb reason of being used to only see those in ALL_CAPS. Not saying you can't use lower-case macros but I think a short sentence mentioning it before the demo code, and with a "see the protothread under the hood page[1] for an explanation of how it generally works" would help a lot with demystifying the code for people unfamiliar with the concepts involved.

[0] https://ceu-lang.github.io/

[1] https://dunkels.com/adam/pt/expansion.html

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.