[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Announcing 8sync: an asynchronous programming language for Guile

From: Amirouche Boubekki
Subject: Re: Announcing 8sync: an asynchronous programming language for Guile
Date: Sun, 06 Dec 2015 15:38:22 +0100
User-agent: Roundcube Webmail/1.1.2

Le 2015-12-05 15:58, Christopher Allan Webber a écrit :
Amirouche Boubekki writes:

* Agenda

** The canonical callback based event loop API is not visible enough

It should be obvious coming from outside Guile world what/where
is the event loop. As such, agenda doesn't seem like a good name.

"Agenda" is not a unique name for this.  That's what SICP uses, that's
what Sly uses.

Ok with agenda, maybe that's a native idiom I don't get.

Still I think that the canonical event loop API should be implemented
in an obvious way. If otherwise, it should be clear why it's not done that
way. In my implementation I don't rely on intermediate data-structures
and it's obvious imho:

- how to run procedure in the loop asap
- how to register a callback to run when a port is ready
- how to pause a procedure until a port is ready

And afaik, it doesn't forbid functional programming. The only mutations
that happen, happen inside the loop primitives to register and run select

** Agenda has both `schedule` and `queue`

For a proof of concept, queue/schedule is not useful to demonstrate
the purpose of eightsync as it's an optimization.

It's no mere optimization.  "schedule" is future events that haven't
been queued; it's only for time-delayed events. The queue is for things
that must be done immediately.

Sure it is an optimisation. Only `schedule` is needed to implemented
both "call later" and "call asap" which is "call later" with a delay of 0.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]