From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Marko Rauhamaa Newsgroups: gmane.lisp.guile.user Subject: Re: 8sync tutorial part 1 Date: Mon, 25 Apr 2016 00:06:35 +0300 Message-ID: <87a8kiwwbo.fsf@elektro.pacujo.net> References: <87eg9ueoz8.fsf@dustycloud.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1461532012 27975 80.91.229.3 (24 Apr 2016 21:06:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 24 Apr 2016 21:06:52 +0000 (UTC) Cc: guile-user@gnu.org To: Christopher Allan Webber Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sun Apr 24 23:06:52 2016 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1auREx-0003xI-5v for guile-user@m.gmane.org; Sun, 24 Apr 2016 23:06:51 +0200 Original-Received: from localhost ([::1]:56641 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1auREw-0005oJ-Fz for guile-user@m.gmane.org; Sun, 24 Apr 2016 17:06:50 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44195) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1auREm-0005gy-TV for guile-user@gnu.org; Sun, 24 Apr 2016 17:06:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1auREl-0007no-RN for guile-user@gnu.org; Sun, 24 Apr 2016 17:06:40 -0400 Original-Received: from [2001:1bc8:1a0:5384:7a2b:cbff:fe9f:e508] (port=41818 helo=pacujo.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1auREl-0007nd-Jy for guile-user@gnu.org; Sun, 24 Apr 2016 17:06:39 -0400 Original-Received: from elektro.pacujo.net (192.168.1.200) by elektro.pacujo.net; Mon, 25 Apr 2016 00:06:35 +0300 Original-Received: by elektro.pacujo.net (sSMTP sendmail emulation); Mon, 25 Apr 2016 00:06:35 +0300 In-Reply-To: <87eg9ueoz8.fsf@dustycloud.org> (Christopher Allan Webber's message of "Sun, 24 Apr 2016 15:22:35 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2001:1bc8:1a0:5384:7a2b:cbff:fe9f:e508 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.org gmane.lisp.guile.user:12555 Archived-At: Christopher Allan Webber : > 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