guile-user
[Top][All Lists]
Advanced

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

Re: 8sync tutorial part 1


From: Marko Rauhamaa
Subject: Re: 8sync tutorial part 1
Date: Mon, 25 Apr 2016 00:06:35 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Christopher Allan Webber <address@hidden>:

>   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



reply via email to

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