Am 17.11.2013 03:02, schrieb David A. Wheeler: > I've tweaked the "readable" code to address some of the portability issues > that Joerg Wittenberger noted. It should now be easier to port the code to > other Schemes. > > The main code now uses R6RS/R7RS exception syntax and makes a call to a > special init-sweet. > The guile-specific code now "implements" R6RS/R7RS exception syntax, and its > version of init-sweet calls the guile-specific "debug-set!. That eliminates > those > guile-specific portions from the main code line. Implementations that > support R6RS/R7RS > exception syntax and need no special initialization should now work unchanged. > > Joerg: I hope that helps. This version works on guile.
Does it? Then either guile has an (eq? eq eq?) evaluate to true or the exception handler was never invoked. That is: I would guess. My problem with this corner of the code is that I don't understand what it is supposed to do. (define (t-expr-catch port) (init-sweet) (guard (exception ((eq exception 'readable) (read-to-unindented-line port) (t-expr-catch port))) (t-expr port))) 1. I would believe that this ought to be ((eq? exception 'readable) ...) Note thee missing question mark. 2. The exception handler will somehow catch all exceptions from read-error, correct? Then it handles them by ignoring the error input and some following text, still correct? Somehow the error will only appear on the error port (which is something I'd have to handle somehow special anyway, since when I'm running this in a server, it will only garble my error log file. But also the guard implementation itself looks suspicious to me: (define-syntax guard (syntax-rules () ((guard (exception ((eq exception2 value) run-when-true ...)) body) (catch value (lambda () body) (lambda (key . args) run-when-true ...))))) Besides that it again relies on my assumption that guile must have eq as alias to eq?, I don't see where the identifier exception2 becomes bound. /Jörg ------------------------------------------------------------------------------ DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access Free app hosting. Or install the open source package on any LAMP server. Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native! http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk _______________________________________________ Readable-discuss mailing list Readable-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/readable-discuss