From 25c5eac5e6ca1035db1eddd7bea9ac78531da57e Mon Sep 17 00:00:00 2001 From: David Thompson Date: Thu, 28 Dec 2023 11:23:49 -0500 Subject: Delete manuals! Good riddance! These are hosted on files.dthompson.us now! --- manuals/sly/Agendas.html | 163 ----------------------------------------------- 1 file changed, 163 deletions(-) delete mode 100644 manuals/sly/Agendas.html (limited to 'manuals/sly/Agendas.html') diff --git a/manuals/sly/Agendas.html b/manuals/sly/Agendas.html deleted file mode 100644 index b30aa98..0000000 --- a/manuals/sly/Agendas.html +++ /dev/null @@ -1,163 +0,0 @@ - - - - - -Sly: Agendas - - - - - - - - - - - - - - - - - - - - -
-

-Previous: , Up: Time   [Contents][Index]

-
-
- -

4.3.3 Agendas

- -
-
(use-modules (sly agenda))
-
- -

Agendas are used to schedule procedures to be called at distinct -points in time. One agenda, stored in the current-agenda -parameter, is active at any given time. A global agenda is initially -bound and is sufficient for most needs. When a separate scheduler is -required (see REPL for one such case), the parameter can be -rebound using parameterize or with-agenda form. -

-
-
Scheme Procedure: make-agenda
-

Create a new, empty agenda. -

- -
-
Scheme Syntax: agenda? obj
-

Return #t if obj is an agenda. -

- -
-
Scheme Variable: current-agenda
-

A parameter containing the current, dynamically scoped agenda object. -

- -
-
Scheme Procedure: agenda-time
-

Return the time of the current agenda. -

- -
-
Scheme Syntax: with-agenda agenda body
-

Evaluate body with current-agenda bound to agenda. -

- -
-
Scheme Procedure: agenda-tick!
-

Increment time by 1 for the current agenda and run scheduled -procedures. -

- -
-
Scheme Procedure: agenda-clear!
-

Remove all scheduled procedures from the current agenda. -

- -
-
Scheme Procedure: schedule thunk [delay]
-

Schedule thunk to be applied after delay ticks of the -current agenda. The default delay is one tick. -

- -
-
Scheme Procedure: schedule-interval thunk interval
-

Schedule thunk to be applied every interval ticks of the -current agenda, forever. -

- -
-
Scheme Procedure: schedule-each thunk
-

Schedule thunk to be applied upon every tick of the current -agenda, forever. -

- -

Coroutines become particularly useful for game programming when -combined with the agenda. For example, a computer controller opponent -could periodically pause its AI algorithm to give the rest of the game -world a chance to do some processing. By using the wait -procedure, algorithms that span multiple ticks of game time can be -written in a straightforward, natural way. -

-
-
Scheme Procedure: wait delay
-

Abort the current coroutine prompt and schedule the continuation to be -run after delay ticks of the current agenda. -

-
-
-

-Previous: , Up: Time   [Contents][Index]

-
- - - - - -- cgit v1.2.3