Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - j.kalsbach

#1
newLISP newS / EBook: Practical Common Lisp
January 24, 2005, 04:18:54 AM
Hello,



I found a good ebook about common lisp. Practical Common Lisp by Peter Seibel



Here is some code to fetch the files:



;;CONFIG

(setq proxy "") ;;"http://proxy.intra.mlsystems.de:8080">http://proxy.intra.mlsystems.de:8080");; your proxy or null-string

(setq lroot "d:/software/practical common lisp/") ;; where to store the files

;;CONFIG END

(env "HTTP_PROXY" proxy)

(define (get-pcl)

    (letn  ((root "http://www.gigamonkeys.com/book/">http://www.gigamonkeys.com/book/")

            (files( filter (lambda(x)

                             (regex ".html'" x ))

                           (parse (get-url root) "=|>" 0))))

           (println "get "  lroot "index.html")

           (device (open (string lroot "index.html") "write"))

           (println (get-url root))

           (close (device))

           (dolist (afile files)

             (let ((fname (trim afile "'")))

               (println "get " (string lroot fname))

               (device (open (string lroot fname ) "write"))

               (println (get-url (string root fname)))

               (close (device))))))

 



Regards,



Jörg