This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Scheme book recommendations


From: "Peter C. Norton" <spacey@lenin.nu>
Subject: Re: Scheme book recommendations
Date: Tue, 6 Jun 2000 14:35:49 -0700
Message-ID: <20000606143549.E10326@lenin.nu>

> On Tue, Jun 06, 2000 at 11:11:06PM +0200, Mikael Djurfeldt wrote:
> > It may be that this kind of litterature is simply missing.  Yet, it is
> > true that it is exactly what Guile needs.
> > 
> > Is the perl examples available on the net?  Maybe you could organize
> > some kind of coordinated effort to translate them?  Maybe you could
> > post a list of the examples, and people could grab one of them and
> > provide a translation?
> 
> It used to be available from anonymous uucp and ftp.  Ahh... the days.  It's
> probably still available.
> 
> Yeah, they seem available at CPAN mirrors in, i.e.,
> ftp://ftp.perl.org/CPAN/scripts/nutshell/ch6
> ftp://ftp.perl.org/CPAN/scripts/nutshell/ch7
> 
> I'm on it.  Who wants to help me?

here are first attempts at readdir and security:


#! /usr/bin/guile -s
!#

(define files '())

(let* ((dport (opendir "."))
       (regexp (make-regexp "^\\."))
       (entry (readdir dport)))
  (while (not (eof-object? entry))
	 (if (not (regexp-exec regexp entry))
	     (set! files (cons entry files)))
	 (set! entry (readdir dport)))
  (set! files (sort files string<?))
  (closedir dport))

; not in original perl code
(for-each (lambda (entry)
	    (display entry)
	    (display "\n"))
	  files)

#! /usr/bin/guile -s
!#

(putenv "PATH=/bin:/usr/bin")
(if (or (not (getenv "SHELL"))
	(not (eq (getenv "SHELL") "SHELL=")))
    (putenv "SHELL=/bin/sh"))
(if (or (not (getenv "IFS"))
	(not (eq (getenv "IFS") "IFS=")))
    (putenv "IFS="))

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]