-
quaint-lang
An experimental statically typed procedural language with first-class resumable functions.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
> I would like to build a rich "process api" that can fork, merge, pause, yield, yield until, drop while, synchronize, wait (latch), react according to events. I feel every distributed systems builds this again and again.
Years ago I attempted to build an experimental language with first-class resumable functions. Every function can be invoked by the caller through a special reference type called "quaint". The caller can resume or stop the execution of the function either after reaching a timeout, or after passing a "wait label":
https://github.com/bbu/quaint-lang
I really like this.
Thank you for your comment and sharing.
I have a lightweight 1:M:N runtime (1 scheduler thread, M kernel threads, N lightweight threads) which preempts by setting hot loops to the limit.
https://github.com/samsquire/preemptible-thread (Rust, Java and C)
How do you preempt code that is running?
The reactivity and intuitive single-threaded concurrency makes it a really nice language for low-powered devices. Or robotics, which is a lot about reacting to sensor input.
It has a dedicated Arduino repo too[1].
In practice it's more of a research language by Francisco Sant’Anna, a professor at UERJ, Brazil, than a language with a big community around it. He's currently working on a new version caleld Dynamic Ceu, or dceu[2]
In the same paradigm there is the Blech[3] language, I believe originating from Bosch. Sadly, that project also has lost some steam.
[0] https://github.com/ceu-lang/ceu-arduino
[1] http://ceu-lang.org/
[2] https://github.com/fsantanna/dceu
[3] https://github.com/blech-lang/blech
The reactivity and intuitive single-threaded concurrency makes it a really nice language for low-powered devices. Or robotics, which is a lot about reacting to sensor input.
It has a dedicated Arduino repo too[1].
In practice it's more of a research language by Francisco Sant’Anna, a professor at UERJ, Brazil, than a language with a big community around it. He's currently working on a new version caleld Dynamic Ceu, or dceu[2]
In the same paradigm there is the Blech[3] language, I believe originating from Bosch. Sadly, that project also has lost some steam.
[0] https://github.com/ceu-lang/ceu-arduino
[1] http://ceu-lang.org/
[2] https://github.com/fsantanna/dceu
[3] https://github.com/blech-lang/blech
The reactivity and intuitive single-threaded concurrency makes it a really nice language for low-powered devices. Or robotics, which is a lot about reacting to sensor input.
It has a dedicated Arduino repo too[1].
In practice it's more of a research language by Francisco Sant’Anna, a professor at UERJ, Brazil, than a language with a big community around it. He's currently working on a new version caleld Dynamic Ceu, or dceu[2]
In the same paradigm there is the Blech[3] language, I believe originating from Bosch. Sadly, that project also has lost some steam.
[0] https://github.com/ceu-lang/ceu-arduino
[1] http://ceu-lang.org/
[2] https://github.com/fsantanna/dceu
[3] https://github.com/blech-lang/blech
Shameless plug: I work on [PROS](https://github.com/purduesigbots/pros), an open source programming environment for VEX. We've talked about adding coroutine support there, this article is an additional push for getting that done!
In practice we actually do; I had to simplify for the article. We have a few utilities like a `runUntilDone` that make simple sequences easier to write. Example: https://github.com/frc-2175/2023RobotCode/blob/main/src/lua/...
I suppose we could make more utilities for running coroutines "in parallel", but I haven't really felt the need. At that point we usually have to worry about exit conditions and it feels natural to just write a loop.