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/chickadee/Live-Coding.html | 133 ------------------------------------- 1 file changed, 133 deletions(-) delete mode 100644 manuals/chickadee/Live-Coding.html (limited to 'manuals/chickadee/Live-Coding.html') diff --git a/manuals/chickadee/Live-Coding.html b/manuals/chickadee/Live-Coding.html deleted file mode 100644 index e34b29e..0000000 --- a/manuals/chickadee/Live-Coding.html +++ /dev/null @@ -1,133 +0,0 @@ - - - - - - -Live Coding (The Chickadee Game Toolkit) - - - - - - - - - - - - - - - - - - - -
-

-Next: , Previous: , Up: Top   [Contents][Index]

-
-
-

4 Live Coding

- -

One of the biggest appeals of any Lisp dialect is the ability to use -the “read-eval-print loop” (REPL for short) to build programs -iteratively and interactively while the program is running. However, -programs that run in an event loop and respond to user input (such as -a game using the Chickadee library!) require special care for this -workflow to be pleasant. -

-

If you are using the chickadee play command to run your -game, then the --repl or --repl-server arguments are all -you need to get a live coding environment running. -

-

If, however, you are using run-game to start the game loop then -it’s still fairly easy to hook up a special kind of REPL by yourself. -

-

First, create a cooperative REPL server (It’s important to use Guile’s -cooperative REPL server instead of the standard REPL server in -(system repl server) to avoid thread synchronization issues). -Then, in the game loop’s update procedure, call -poll-coop-repl-server and pass the REPL object. Here is a -template to follow: -

-
-
(use-modules (chickadee)
-             (system repl coop-server))
-
-(define repl (spawn-coop-repl-server))
-
-(define (update dt)
-  (poll-coop-repl-server repl)
-  ...)
-
-(run-game #:update update ...)
-
- -

To use the REPL, connect to it via port 37146. Telnet will do the -trick, but using the Geiser -extension for Emacs is by far the best way to develop at the REPL with -Guile. Use M-x connect-to-guile to connect to the REPL server. -

- - - - - -- cgit v1.2.3