[plt-scheme] Ideas for PLaneT

From: Jacob Matthews (jacobm at cs.uchicago.edu)
Date: Thu Jan 19 18:30:27 EST 2006

Jens Axel Søgaard wrote:

> The first step is to fetch all the PLaneT packages.
> The following fetches them, but is there a smarter
> way (that avoids compiling them)?

You can at least use the planet --download command, which downloads a 
package but does not install it. Once you have the .plt file you can 
unpack it as you would any other .plt file.

-jacob

>
>
> /Jens Axel Søgaard
>
>
> ;;; fetch all PLaneT packages
>
> (require (planet "htmlprag.ss" ("neil" "htmlprag.plt"))
>          (lib "url.ss" "net")
>          (lib "match.ss"))
>
> ; url->sxml : url-string -> sxml
> ;  fetch the page with the url url, parse it and return the parse tree
> (define (url->sxml url)
>   (html->sxml (get-pure-port (string->url url))))
>
> (define (sxml->requires sxml)
>   (match sxml
>     [('tt text)
>      (list (read-from-string text))]
>     [(item ...)
>      (apply append
>             (map sxml->requires sxml))]
>     [else '()]))
>
> (define (robust-eval sexpr)
>   (display sexpr)
>   (newline)
>   (with-handlers
>       ([(lambda (o) #t) (lambda (o) 'ignore)])
>     (eval sexpr)))
>
> (map robust-eval
>      (sxml->requires (url->sxml "http://planet.plt-scheme.org/300/")))
>
>
> _________________________________________________
>  For list-related administrative tasks:
>  http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>



Posted on the users mailing list.