[racket] Racket v5.0

From: Madoka Machitani (madokama at gmail.com)
Date: Tue Jun 8 02:08:05 EDT 2010

Congrats to the official release of Racket!!

That said, I think I have spotted a bug in the example program of the
Racket website:

#lang racket ; Simple web scraper
(require net/url net/uri-codec)
(define (let-me-google-that-for-you str)
  (let* ([g "http://www.google.com/search?q="]
         [u (string-append g (uri-encode str))]
         [rx #rx"(?<=<h3 class=\"r\">).*?(?=</h3>)"])
    (regexp-match* rx (get-pure-port (string->url g)))))

The last occurence of `g' above has to be replaced with `u', right?


Posted on the users mailing list.