diff --git a/collects/meta/web/www/learning.rkt b/collects/meta/web/www/learning.rkt index 4ca5ab4d85..deb3f7e290 100644 --- a/collects/meta/web/www/learning.rkt +++ b/collects/meta/web/www/learning.rkt @@ -1,17 +1,6 @@ #lang at-exp s-exp "shared.rkt" -(define brown-pubs - @a[href: "http://www.cs.brown.edu/~sk/Publications/Papers/"]{ - Brown PLT Publications}) -(define nwu-pubs - @a[href: "http://www.eecs.northwestern.edu/~robby/pubs/"]{ - Northwestern PLT Publications}) -(define neu-pubs - @a[href: "http://www.ccs.neu.edu/scheme/pubs/"]{ - Northeastern PLT Publications}) -(define utah-pubs - @a[href: "http://www.cs.utah.edu/plt/publications/"]{Utah PLT Publications}) -;; TODO: add calpoly & byu? +(require "people.rkt" racket/list) (provide learning) (define learning @@ -28,8 +17,12 @@ @text{@-teachscheme — a workshop to train teachers using @-htdp in the classroom.} @text{@-bootstrap — a curriculum for middle-school students.}] - @parlist[@strong{Publications} - techreports brown-pubs nwu-pubs neu-pubs utah-pubs] + @(apply parlist @strong{PLT Publications} + (cons techreports + (for*/list ([place (in-list all-places)] + [pubs (in-value (place-pubs-url place))] + #:when pubs) + @a[href: pubs]{@(place-name place)}))) @parlist[@strong{Graduate Study} @text{We welcome applications from students interested in @|graduate-study|.}]}) @@ -39,6 +32,25 @@ @(define (box-style border-width color) @list{border: @|border-width|px solid black; padding: 5px; @; background: @|color|@";"}) + @(define place-names + (add-between + (sort (map (lambda (p) + (regexp-replace #rx", [A-Z][A-Z]$" (place-location p) "")) + all-places) + stringsymbol x) x)]) + (hash-ref! + t x + (lambda () + (let* ([rx (regexp-quote (string-downcase (symbol->string x)))] + [rx (pregexp (string-append "\\b" rx "\\b"))]) + (let loop ([found #f] [l all]) + (cond + [(null? l) (or found (error name "couldn't find: ~.a" x))] + [(not (regexp-match? rx (get-search-string (car l)))) + (loop found (cdr l))] + [found (error name "ambiguous search: ~.a" x)] + [else (loop (car l) (cdr l))]))))))))) + (values people places + (finder 'find-person people person-search-string) + (finder 'find-place places place-search-string)))) (provide people) (define people @page[#:part-of 'community]{ @p{“PLT” refers to the group that is the core of the Racket development team. PLT consists of numerous people distributed across several - different universities in the USA: @places} + different universities in the USA: + @(ul (map (lambda (p) + @li{@a[href: (place-url p)]{ + @(place-name p), @(place-location p)}}) + all-places))} @h4{Affiliates} @p{We work with @ul*{@~ The crew at @a[href: "http://untyped.com"]{Untyped}