Fwd: [plt-scheme] already imported identitfiers in "pretty-big"

From: Corey Sweeney (corey.sweeney at gmail.com)
Date: Thu Apr 13 17:28:02 EDT 2006

My thought was that someone might still want a 1-ref.ss that provides things
"the reference implentation way", for portability. (i.e. i was unsure if the
"polymorpic" token in the mzlib/list.ss definitions caused any compatibility
issues with the reference implementation).  Personally changing
srfi/1/selector.ss is fine with me too.


I guess the next question is, is any of the srfi functionality missing in
the mzlib/list.ss functions?  for example, srfi-1 specs that infintie lists
are allowed to be passed to map,


----
I think it'd go something like:
    {i didn't get to test this one, I wrote it directly as a patch}


*** selector.ss.orig    Thu Apr 13 16:03:25 2006
--- selector.ss    Thu Apr 13 16:04:20 2006
***************
*** 37,42 ****
--- 37,45 ----

    (require (lib "optional.ss" "srfi"))
    (require (lib "receive.ss" "srfi" "8"))
+   (require (only (lib "list.ss" "mzlib")
+         third fourth fifth sixth seventh eighth))
+

    (provide
     first second
***************
*** 54,63 ****

    (define first  car)
    (define second cadr)
!   (define third  caddr)
!   (define fourth cadddr)
!   (define (fifth   x) (car    (cddddr x)))
!   (define (sixth   x) (cadr   (cddddr x)))
!    (define (seventh x) (caddr  (cddddr x)))
!    (define (eighth  x) (cadddr (cddddr x)))
    (define (ninth   x) (car  (cddddr (cddddr x))))
--- 57,66 ----

    (define first  car)
    (define second cadr)
! ;  (define third  caddr)
! ;  (define fourth cadddr)
! ;  (define (fifth   x) (car    (cddddr x)))
! ;  (define (sixth   x) (cadr   (cddddr x)))
! ;  (define (seventh x) (caddr  (cddddr x)))
! ;  (define (eighth  x) (cadddr (cddddr x)))
    (define (ninth   x) (car  (cddddr (cddddr x))))



Corey

On 4/13/06, Robby Findler <robby at cs.uchicago.edu> wrote:
>
> It also seems to make sense to have collects/srfi/1/selector.ss
> re-export (lib "list.ss")'s definitions instead of defining its own.
> Did you consider that one?
>
> Robby
>
> At Thu, 13 Apr 2006 13:56:37 -0500, "Corey Sweeney" wrote:
> > Ok, I took a look, and obviously "mzlib/list.ss" can't be missing any of
> the
> > srfi functionality for these functions, so i propose starting with the
> > following changes:
> >
> > copy srfi/1.ss to srfi/1-ref.ss
> >
> >
> >
> > *** /home/corey/1.ss    Thu Apr 13 13:49:27 2006
> > --- /home/corey/1.ss.orig    Thu Apr 13 13:41:02 2006
> > ***************
> > *** 1,13 ****
> >   ;; module loader for SRFI-1
> >   (module |1| mzscheme
> >
> > !   (require (all-except (lib "list.ss" "srfi" "1")
> > !                        third fourth fifth sixth))
> > !   (require (only (lib "list.ss" "mzlib")
> > !     third fourth fifth sixth))
> >
> > !   (provide  third fourth fifth sixth
> > !     (all-from-except (lib "list.ss" "srfi" "1")
> >                  s:append! s:reverse!
> >                  s:map s:for-each
> >                  s:member
> > --- 1,9 ----
> >   ;; module loader for SRFI-1
> >   (module |1| mzscheme
> >
> > !   (require (lib "list.ss" "srfi" "1"))
> >
> > !   (provide (all-from-except (lib "list.ss" "srfi" "1")
> >                  s:append! s:reverse!
> >                  s:map s:for-each
> >                  s:member
> >
> >
> > On 4/13/06, Corey Sweeney <corey.sweeney at gmail.com> wrote:
> > >
> > >
> > >
> > > On 4/12/06, Danny Yoo <dyoo at hkn.eecs.berkeley.edu> wrote:
> > > >
> > > >
> > > >
> > > > and not see conflicts.  And we can go the extra step and put the
> srfi-1
> > > > functions into my-big-language as well.  This does pretty much what
> > > > you're
> > > > planning earlier, except we avoid touching plt-pretty-big-text.ss .
> > >
> > >
> > > Agreed
> > >
> > > (Aside: I feel really cheesy about doing a copy-and-paste here; is
> there a
> > > > nicer way to do this?)
> > >
> > >
> > > Well one way would be to make mzlib/list.ss just require then provide
> it's
> > > functions from list.ss.  However if mzlib/list.ss has some advantage
> over
> > > srfi/1/list.ss , (performance?) then we could have srfi/1/list.ss
> require
> > > those functions that are in mzlib/list.ss , and are not extended by
> > > srfi/1/list.ss , and then require/provide just those functions that
> have
> > > extended functionality into mzlib/list.ss .
> > >
> > > By the way, what is the advantage of the functions writen in
> mzlib/list.ss
> > > that are also in srfi/1/list.ss?
> > >
> > >
> > > Corey
> > >
> > >
> > >
> > > Best of wishes!
> > > >
> > >
> > >
> > >
> > > --
> > > ((lambda (y) (y y)) (lambda (y) (y y)))
> > >
> >
> >
> >
> > --
> > ((lambda (y) (y y)) (lambda (y) (y y)))
> > _________________________________________________
> >   For list-related administrative tasks:
> >   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>



--
((lambda (y) (y y)) (lambda (y) (y y)))
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20060413/24e7ca6b/attachment.html>

Posted on the users mailing list.