Re: [Chicken-users] srfi-29 egg problems: [EMAIL PROTECTED] doesn't seem to work?
On Mar 7, 2008, at 12:47 AM, felix winkelmann wrote: On Fri, Mar 7, 2008 at 5:18 AM, Robin Lee Powell <[EMAIL PROTECTED]> wrote: On Thu, Mar 06, 2008 at 09:46:49AM +0100, felix winkelmann wrote: You need a version of "format" that is more capable than the builtin one (which builds on [sf]printf). Install "format-modular" or "format", and load that before srfi-29. Did that; now I get: Error: (vector-ref) out of range #("12:00" "Fred") It seems the "1" in the format-string must be "0" to work. Is srfi-29 here incompatible with CL? (Oh, Scott... why? WHY?) No. The problem is the SRFI-29 example. It jumps to the 2nd argument but then doesn't reset to the 1st afterwards. The French format string should be "[EMAIL PROTECTED], c'est [EMAIL PROTECTED]" Per the CL HyperSpec: "Directives after a [EMAIL PROTECTED] will take arguments in sequence beginning with the one gone to." cheers, felix ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users Best Wishes, Kon ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] srfi-29 egg problems: [EMAIL PROTECTED] doesn't seem to work?
On Mar 7, 2008, at 12:47 AM, felix winkelmann wrote: On Fri, Mar 7, 2008 at 5:18 AM, Robin Lee Powell <[EMAIL PROTECTED]> wrote: On Thu, Mar 06, 2008 at 09:46:49AM +0100, felix winkelmann wrote: You need a version of "format" that is more capable than the builtin one (which builds on [sf]printf). Install "format-modular" or "format", and load that before srfi-29. Did that; now I get: Error: (vector-ref) out of range #("12:00" "Fred") It seems the "1" in the format-string must be "0" to work. Is srfi-29 here incompatible with CL? (Oh, Scott... why? WHY?) This maybe my fault. I will look into it. cheers, felix ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users Best Wishes, Kon ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] srfi-29 egg problems: [EMAIL PROTECTED] doesn't seem to work?
On Fri, Mar 7, 2008 at 5:18 AM, Robin Lee Powell <[EMAIL PROTECTED]> wrote: > On Thu, Mar 06, 2008 at 09:46:49AM +0100, felix winkelmann wrote: > > > > You need a version of "format" that is more capable than the > > builtin one (which builds on [sf]printf). Install "format-modular" > > or "format", and load that before srfi-29. > > Did that; now I get: > > Error: (vector-ref) out of range > #("12:00" "Fred") > It seems the "1" in the format-string must be "0" to work. Is srfi-29 here incompatible with CL? (Oh, Scott... why? WHY?) cheers, felix ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] srfi-29 egg problems: [EMAIL PROTECTED] doesn't seem to work?
On Thu, Mar 06, 2008 at 09:46:49AM +0100, felix winkelmann wrote: > > You need a version of "format" that is more capable than the > builtin one (which builds on [sf]printf). Install "format-modular" > or "format", and load that before srfi-29. Did that; now I get: Error: (vector-ref) out of range #("12:00" "Fred") 2 Call history: (localized-message (quote goodbye) myname) (quote goodbye) (display #\newline) (display (localized-message (quote time) "12:00" myname)) (localized-message (quote time) "12:00" myname) [localized-message] (apply format (cons (localized-template (quote hello-program) message-name) args)) [localized-message] (cons (localized-template (quote hello-program) message-name) args) [localized-message] (localized-template (quote hello-program) message-name) <-- Code attached. Not that it matters, as srfi-29 isn't sufficient for me (see http://search.cpan.org/~petdance/Locale-Maketext-1.12/lib/Locale/Maketext/TPJ13.pod ) but now I'm curious. :) -Robin -- Lojban Reason #17: http://en.wikipedia.org/wiki/Buffalo_buffalo Proud Supporter of the Singularity Institute - http://singinst.org/ http://www.digitalkingdom.org/~rlpowell/ *** http://www.lojban.org/ (require-extension format-modular) (require-extension srfi-29) (let ((translations '(((en) . ((time . "Its ~a, ~a.") (goodbye . "Goodbye, ~a."))) ((fr) . ((time . "[EMAIL PROTECTED], c'est ~a.") (goodbye . "Au revoir, ~a.")) (for-each (lambda (translation) (let ((bundle-name (cons 'hello-program (car translation (declare-bundle! bundle-name (cdr translation translations)) (define localized-message (lambda (message-name . args) (apply format (cons (localized-template 'hello-program message-name) args (current-language 'fr) (let ((myname "Fred")) (display (localized-message 'time "12:00" myname)) (display #\newline) (display (localized-message 'goodbye myname)) (display #\newline)) ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] srfi-29 egg problems: [EMAIL PROTECTED] doesn't seem to work?
On Wed, Mar 5, 2008 at 8:28 AM, Robin Lee Powell <[EMAIL PROTECTED]> wrote: > > I copied the attached example directly from > http://srfi.schemers.org/srfi-29/srfi-29.html , with the following > changes: > > 1. I don't use store-bundle! or load-bundle! at all > > 2. I force the language to French. > > Actually running it gives me: > > Error: (fprintf) illegal format-string character: #\1 > > Call history: > > (localized-message (quote goodbye) myname) > (quote goodbye) > (display #\newline) > (display (localized-message (quote time) "12:00" > myname)) > (localized-message (quote time) "12:00" myname) > [localized-message] (apply format (cons > (localized-template (quote hello-program) message-name) args)) > [localized-message] (cons (localized-template (quote > hello-program) message-name) args) > [localized-message] (localized-template (quote > hello-program) message-name) <-- > > This seems te be coming from the "[EMAIL PROTECTED], c'est ~a." string, which > srfi-29 says it supports. Am I missing something? > > CHICKEN Version 2.726 > > Just downloaded the egg, so should be the latest. > You need a version of "format" that is more capable than the builtin one (which builds on [sf]printf). Install "format-modular" or "format", and load that before srfi-29. cheers, felix ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
[Chicken-users] srfi-29 egg problems: [EMAIL PROTECTED] doesn't seem to work?
I copied the attached example directly from http://srfi.schemers.org/srfi-29/srfi-29.html , with the following changes: 1. I don't use store-bundle! or load-bundle! at all 2. I force the language to French. Actually running it gives me: Error: (fprintf) illegal format-string character: #\1 Call history: (localized-message (quote goodbye) myname) (quote goodbye) (display #\newline) (display (localized-message (quote time) "12:00" myname)) (localized-message (quote time) "12:00" myname) [localized-message] (apply format (cons (localized-template (quote hello-program) message-name) args)) [localized-message] (cons (localized-template (quote hello-program) message-name) args) [localized-message] (localized-template (quote hello-program) message-name) <-- This seems te be coming from the "[EMAIL PROTECTED], c'est ~a." string, which srfi-29 says it supports. Am I missing something? CHICKEN Version 2.726 Just downloaded the egg, so should be the latest. -Robin -- Lojban Reason #17: http://en.wikipedia.org/wiki/Buffalo_buffalo Proud Supporter of the Singularity Institute - http://singinst.org/ http://www.digitalkingdom.org/~rlpowell/ *** http://www.lojban.org/ ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users