From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thien-Thi Nguyen Newsgroups: gmane.lisp.guile.user Subject: Re: rfc (define-module ... #:use-modules ...) Date: Sun, 07 Oct 2007 17:15:52 +0200 Message-ID: <878x6f6jmf.fsf@ambire.localdomain> References: <87przvnf6i.fsf@ambire.localdomain> <200710052347.l95Nlojq003807@fcs13.keithdiane.us> <877im0lg1x.fsf@ambire.localdomain> <200710070405.l9745DBe003737@fcs13.keithdiane.us> <87hcl36zb3.fsf@ambire.localdomain> <87przrvw90.fsf@chbouib.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: sea.gmane.org 1191770260 1506 80.91.229.12 (7 Oct 2007 15:17:40 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 7 Oct 2007 15:17:40 +0000 (UTC) Cc: guile-user@gnu.org To: ludo@gnu.org (Ludovic =?iso-8859-1?Q?Court=E8s?=) Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sun Oct 07 17:17:38 2007 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IeXsv-0001BC-8T for guile-user@m.gmane.org; Sun, 07 Oct 2007 17:17:37 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IeXsp-0002ge-Mi for guile-user@m.gmane.org; Sun, 07 Oct 2007 11:17:31 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IeXsl-0002gL-0j for guile-user@gnu.org; Sun, 07 Oct 2007 11:17:27 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IeXsi-0002fH-LP for guile-user@gnu.org; Sun, 07 Oct 2007 11:17:26 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IeXsi-0002fE-Gw for guile-user@gnu.org; Sun, 07 Oct 2007 11:17:24 -0400 Original-Received: from ppp-56-36.21-151.libero.it ([151.21.36.56] helo=ambire.localdomain) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IeXsc-0007b7-Uj; Sun, 07 Oct 2007 11:17:19 -0400 Original-Received: from ttn by ambire.localdomain with local (Exim 4.63) (envelope-from ) id 1IeXrE-0003v7-KK; Sun, 07 Oct 2007 17:15:52 +0200 In-Reply-To: <87przrvw90.fsf@chbouib.org> ("Ludovic =?iso-8859-1?Q?Court?= =?iso-8859-1?Q?=E8s=22's?= message of "Sun\, 07 Oct 2007 16\:23\:55 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.50 (gnu/linux) X-Detected-Kernel: Genre and OS details not recognized. X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:6197 Archived-At: --=-=-= Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable () ludo@gnu.org (Ludovic Court=E8s) () Sun, 07 Oct 2007 16:23:55 +0200 I'm not sure I fully understand what `check-r6rs-library' does (and I don't have `(ice-9 accumulate)' also...). to give you an idea, i have appended the output of running the `compile-command' (see the Local Variables at eof). the module (ice-9 accumulate) is a "reduced strength (ice-9 q)" that started out as just a pet for hobbit (long term goal: aiming for that cool super-\beta optimization), but turned out to be a good fit in many contexts. My guess is that we'd better rewrite the interpreter altogether (in Scheme or a subset thereof) to have one more "manageable", amenable to deep changes like this... towards this end, another approach is to integrate hobbit and gcc. an interpreter would fall out of that (somewhere, at some point). thi --=-=-= Content-Disposition: attachment; filename=out.text Content-Description: mostly ok but not hogwash checking: ex-6-4-macros.r6rs checking: checking: ok: is `(my-helpers id-stuff)' checking: (export ...) ok: one is `find-dup' ok: (export ...) count: 1 checking: (import ...) checking: checking: ok: is `(r6rs)' ok: one is `(r6rs)' ok: one is `(r6rs)' ok: (import ...) count: 1 ok: one is `(define (find-dup l) ...)' ok: rest forms count: 1 ok: syntax ok: known: defs ok: : (lambda (l) (and (pair? l) (let loop ((rest (cdr l))) (cond [ (null? rest) (find-dup (cdr l)) ] [ (bound-identifier=? (car l) (car rest)) (car rest) ] [else (loop (cdr rest)) ])))) ok: known: names ok: : find-dup checking: checking: ok: is `(my-helpers values-stuff)' checking: (export ...) ok: one is `mvlet' ok: (export ...) count: 1 checking: (import ...) checking: checking: ok: is `(r6rs)' ok: one is `(r6rs)' ok: one is `(r6rs)' checking: `for' checking: checking: ok: is `(my-helpers id-stuff)' ok: one is `(my-helpers id-stuff)' ok: one is `expand' ok: one is `(for (my-helpers id-stuff) expand)' ok: (import ...) count: 2 ok: one is `(define-syntax mvlet ...)' ok: rest forms count: 1 ok: syntax ok: known: defs ok: : (lambda (stx) (syntax-case stx () [ (_ [ (id ...) expr] body0 body ...) (not (find-dup (syntax (id ...)))) (syntax (call-with-values (lambda () expr) (lambda (id ...) body0 body ...))) ])) ok: known: names ok: : mvlet checking: checking: ok: is `(let-div)' checking: (export ...) ok: one is `let-div' ok: (export ...) count: 1 checking: (import ...) checking: checking: ok: is `(r6rs)' ok: one is `(r6rs)' ok: one is `(r6rs)' checking: checking: ok: is `(my-helpers values-stuff)' ok: one is `(my-helpers values-stuff)' ok: one is `(my-helpers values-stuff)' checking: checking: ok: is `(r6rs r5rs)' ok: one is `(r6rs r5rs)' ok: one is `(r6rs r5rs)' ok: (import ...) count: 3 ok: one is `(define (quotient+remainder n d) ...)' ok: one is `(define-syntax let-div ...)' ok: rest forms count: 2 ok: syntax ok: known: defs ok: : (lambda (n d) (let ([q (quotient n d) ]) (values q (- n (* q d))))) ok: : (syntax-rules () [ (_ n d (q r) body0 body ...) (mvlet [ (q r) (quotient+remainder n d) ] body0 body ...) ]) ok: known: names ok: : quotient+remainder ok: : let-div ok: ex-6-4-macros.r6rs checking: ex-6-4.r6rs checking: checking: ok: is `(stack)' checking: (export ...) ok: one is `make' ok: one is `push!' ok: one is `pop!' ok: one is `empty!' ok: (export ...) count: 4 checking: (import ...) checking: checking: ok: is `(r6rs)' ok: one is `(r6rs)' ok: one is `(r6rs)' ok: (import ...) count: 1 ok: one is `(define (make) ...)' ok: one is `(define (push! s v) ...)' ok: one is `(define (pop! s) ...)' ok: one is `(define (empty! s) ...)' ok: rest forms count: 4 ok: syntax ok: known: defs ok: : (lambda () (list (quote ()))) ok: : (lambda (s v) (set-car! s (cons v (car s)))) ok: : (lambda (s) (let ([v (caar s) ]) (set-car! s (cdar s)) v)) ok: : (lambda (s) (set-car! s (quote ()))) ok: known: names ok: : make ok: : push! ok: : pop! ok: : empty! checking: checking: ok: is `(balloons)' checking: (export ...) ok: one is `make' ok: one is `push' ok: one is `pop' ok: (export ...) count: 3 checking: (import ...) checking: checking: ok: is `(r6rs)' ok: one is `(r6rs)' ok: one is `(r6rs)' ok: (import ...) count: 1 ok: one is `(define (make w h) ...)' ok: one is `(define (push b amt) ...)' ok: one is `(define (pop b) ...)' ok: rest forms count: 3 ok: syntax ok: known: defs ok: : (lambda (w h) (cons w h)) ok: : (lambda (b amt) (cons (- (car b) amt) (+ (cdr b) amt))) ok: : (lambda (b) (display "Boom! ") (display (* (car b) (cdr b))) (newline)) ok: known: names ok: : make ok: : push ok: : pop checking: checking: ok: is `(party)' checking: (export ...) checking: (rename ( ) ...) checking: ( ) ok: ( ) is `(balloon:make make)' checking: ( ) ok: ( ) is `(balloon:push push)' ok: one is `(rename (balloon:make make) (balloon:push push))' ok: one is `push!' ok: one is `make-party' checking: (rename ( ) ...) checking: ( ) ok: ( ) is `(party-pop! pop!)' ok: one is `(rename (party-pop! pop!))' ok: (export ...) count: 4 checking: (import ...) checking: checking: ok: is `(r6rs)' ok: one is `(r6rs)' ok: one is `(r6rs)' checking: checking: checking: ok: is `(stack)' ok: one is `(stack)' ok: one is `(only (stack) make push! pop!)' ok: one is `(only (stack) make push! pop!)' checking: checking: checking: ok: is `(balloons)' ok: one is `(balloons)' ok: one is `(prefix (balloons) balloon:)' ok: one is `(prefix (balloons) balloon:)' ok: (import ...) count: 3 ok: one is `(define (make-party) ...)' ok: one is `(define (party-pop! p) ...)' ok: rest forms count: 2 ok: syntax ok: known: defs ok: : (lambda () (let ([s (make) ]) (push! s (balloon:make 10 10)) (push! s (balloon:make 12 9)) s)) ok: : (lambda (p) (balloon:pop (pop! p))) ok: known: names ok: : make-party ok: : party-pop! checking: checking: ok: is `(main)' checking: (export ...) ok: (export ...) count: 0 checking: (import ...) checking: checking: ok: is `(r6rs)' ok: one is `(r6rs)' ok: one is `(r6rs)' checking: checking: ok: is `(party)' ok: one is `(party)' ok: one is `(party)' ok: (import ...) count: 2 ok: one is `(define p ...)' ok: one is `(pop! p)' ok: one is `(push! p (push (make 5 5) 1))' ok: one is `(pop! p)' ok: rest forms count: 4 ok: syntax ok: known: defs ok: : (make-party) ok: known: names ok: : p ok: ex-6-4.r6rs checking: hello.r6rs checking: checking: checking: ok: is `(42 33 21)' ok: is `(foo bar zzz (42 33 21))' checking: (export ...) ok: one is `nothing' checking: (rename ( ) ...) checking: ( ) ok: ( ) is `(foo bar)' checking: ( ) ok: ( ) is `(xxx yy)' ok: one is `(rename (foo bar) (xxx yy))' ok: one is `is' ok: one is `actually' checking: (rename ( ) ...) checking: ( ) ok: ( ) is `(a b)' checking: ( ) ok: ( ) is `(c d)' ok: one is `(rename (a b) (c d))' ok: one is `here' ok: (export ...) count: 6 checking: (import ...) checking: `for' checking: checking: checking: ok: is `(sdl misc-utils)' ok: one is `(sdl misc-utils)' ok: one is `(prefix (sdl misc-utils) MISC:)' ok: one is `run' ok: one is `(for (prefix (sdl misc-utils) MISC:) run)' checking: checking: checking: ok: is `42' checking: checking: checking: ok: is `(<= 22)' checking: ok: is `(>= 44)' ok: is `(and (<= 22) (>= 44))' ok: is `(not (and (<= 22) (>= 44)))' ok: is `(not (and (<= 22) (>= 44)))' checking: checking: ok: is `(<= 22)' checking: ok: is `(>= 42)' ok: is `(or (<= 22) (>= 42))' ok: is `(or (<= 22) (>= 42))' ok: count: 3 ok: is `(ice-9 foo (42 (not (and (<= 22) (>= 44))) (or (<= 22) (>= 42))))' ok: one is `(ice-9 foo (42 (not (and (<= 22) (>= 44))) (or (<= 22) (>= 42))))' ok: one is `(ice-9 foo (42 (not (and (<= 22) (>= 44))) (or (<= 22) (>= 42))))' ok: (import ...) count: 2 ok: one is `(define ((a b) c) ...)' ok: one is `((a 10) 20)' ok: rest forms count: 2 ok: syntax ok: known: defs ok: : (lambda (b) (lambda (c) (+ b c))) ok: known: names ok: : a ok: hello.r6rs checking: hogwash.r6rs checking: checking: checking: ok: is `(42 33 21)' ok: is `(foo bar zzz (42 33 21))' checking: (export ...) ok: one is `nothing' checking: (rename ( ) ...) checking: ( ) ok: ( ) is `(foo bar)' ok: one is `(rename (foo bar))' ok: one is `is' ok: one is `actually' checking: (rename ( ) ...) checking: ( ) ok: ( ) is `(a b)' checking: ( ) ok: ( ) is `(c d)' ok: one is `(rename (a b) (c d))' ok: one is `here' ok: (export ...) count: 6 checking: (import ...) checking: checking: checking: ok: is `(foo bar baz)' ok: one is `(foo bar baz)' ok: one is `(prefix (foo bar baz) SDL:)' ok: one is `(prefix (foo bar baz) SDL:)' ok: (import ...) count: 1 ok: one is `(define (a b) ...)' ok: one is `(a 19)' hogwash.r6rs:16:3: bad `define' placement: `(define f ...)' (while checking ) (while checking hogwash.r6rs) ERROR: syntax error --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://lists.gnu.org/mailman/listinfo/guile-user --=-=-=--