Christopher Allan Webber <[email protected]>:
> http://dustycloud.org/tmp/8sync-tutorial-part1.html
>
> It gets into the basics of the agenda, using delays to keep things
> simple.
Comments:
* A typo: The text talks about "run-at" but the example has
"run-delay".
* I'm guessing "run-delay" is a macro. In my opinion you should use
macros very sparingly. Here, the only point of the macro seems to be
to avoid a "lambda". I would prefer:
(run-delay (lambda (hello-snore)) 1)
or -- in this particular case --
(run-delay hello-snore 1)
* I'm guessing the "run-delay" macro as well as "start-agenda" operate
on a singleton, global context. I'd advice making that context
visible and explicit:
(define 8sync (make-8sync))
(define (hello-snore)
...
(run-delay 8sync hello-snore 1))
(start-agenda 8sync (make-agenda ...))
> IO / ports stuff is coming in the next chapter.
That's when things will get interesting. Looking forward to the
installment.
Warning: I actually *like* the callback hell, which you have said you
want to avoid. On the other hand, the first chapter of the tutorial
seems to consist of nothing but callbacks!
Marko