HN user

syncurrent

25 karma
Posts0
Comments14
View on HN
No posts found.

In `proto_activities` this blinking would look like this:

  pa_activity (Blinker, pa_ctx_tm(), uint32_t onMs, uint32_t offMs) {
    pa_repeat {
      turn_on_LED();
      pa_delay_ms (onMs);
  
      turn_off_LED();
      pa_delay_ms (offMs);
    }
  } pa_end
Here the activity definition automatically creates the structure to hold the pc, timer and other variables which would outlast a single tick.

Somewhat related to Fibres are the Trails of synchronous reactive programming languages. Both allow efficient logical concurrency based on cooperative scheduling. The nice thing with Trails is that the scheduling can be determined by the compiler by extracting dependencies from the synchronous reactive program thus increasing determinism of your app.

Weird Languages 5 years ago

I find synchronous languages like Esterel, Céu, or Blech both weird and eye opening. I created a DSL for Swift (called Pappe) to bring some of the ideas to a more mainstream language.