unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Marko Rauhamaa <marko@pacujo.net>
To: Christopher Allan Webber <cwebber@dustycloud.org>
Cc: guile-user@gnu.org
Subject: Re: 8sync tutorial part 1
Date: Mon, 25 Apr 2016 00:06:35 +0300	[thread overview]
Message-ID: <87a8kiwwbo.fsf@elektro.pacujo.net> (raw)
In-Reply-To: <87eg9ueoz8.fsf@dustycloud.org> (Christopher Allan Webber's message of "Sun, 24 Apr 2016 15:22:35 -0500")

Christopher Allan Webber <cwebber@dustycloud.org>:

>   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	other threads:[~2016-04-24 21:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-24 20:22 8sync tutorial part 1 Christopher Allan Webber
2016-04-24 21:06 ` Marko Rauhamaa [this message]
2016-04-24 22:15   ` Christopher Allan Webber
2016-04-25  4:50     ` Marko Rauhamaa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87a8kiwwbo.fsf@elektro.pacujo.net \
    --to=marko@pacujo.net \
    --cc=cwebber@dustycloud.org \
    --cc=guile-user@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).