EBook: Practical Common Lisp

Notices and updates
Locked
j.kalsbach
Posts: 1
Joined: Sun Jan 23, 2005 9:34 am

EBook: Practical Common Lisp

Post by j.kalsbach »

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");; 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/")
(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

HPW
Posts: 1390
Joined: Thu Sep 26, 2002 9:15 am
Location: Germany
Contact:

Post by HPW »

It's not only a ebook, it's the web preview of a real book.
You can preorder on amazon. (As I did)
I think it is worth to get a place on the lisp-book-shelf.

I asked Peter Seibel if he wants to mention newLISP somewhere
in his book, but he was not sure if newLISP would fit in there.
(No more language wars)

So wait and see!
Hans-Peter

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post by Lutz »

Thanks for the tip and the program.
Here a small improvement, you could replace:

(device (open (string lroot "index.html") "write"))
(println (get-url root))
(close (device))

with the shorter:

(write-file (string lroot "index.html") (get-url root))

Lutz

Locked