lambda' ->
λ'
This commit is contained in:
parent
0a2262bea5
commit
4d5ba08653
|
@ -7,7 +7,7 @@
|
|||
(provide parlist)
|
||||
(define (parlist first . rest)
|
||||
(list (div class: 'parlisttitle first)
|
||||
(map (lambda (p) (div class: 'parlistitem p)) rest)))
|
||||
(map (λ (p) (div class: 'parlistitem p)) rest)))
|
||||
|
||||
;; a div that is centered, but the text is still left-justified
|
||||
(provide center-div)
|
||||
|
@ -58,7 +58,7 @@
|
|||
[else (let ([len (string-length (cadr text))])
|
||||
(set! N (if N (min len N) len))
|
||||
(loop (cddr text)
|
||||
(list* (lambda () (make-string (- len N) #\space))
|
||||
(list* (λ () (make-string (- len N) #\space))
|
||||
"\n" r)))]))))
|
||||
(let loop ([list (drop-ws list #t)] [cur '()] [r '()])
|
||||
(define (get-r) (cons (drop-indentation/reverse (drop-ws cur #f)) r))
|
||||
|
@ -119,7 +119,7 @@
|
|||
"page-break-before: always;")
|
||||
(if sec-in-subsec? title* title)))))
|
||||
(values (add-section #f) (add-section #t)
|
||||
(and toc? (lambda () (collect-subs) (->li/reverse sections)))))
|
||||
(and toc? (λ () (collect-subs) (->li/reverse sections)))))
|
||||
(define-syntax (sections stx)
|
||||
(define (make-it stx args)
|
||||
(with-syntax ([sec (datum->syntax stx 'section)]
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
(syntax-local-name))])
|
||||
(if name (list '#:id `',name) '())))]
|
||||
;; delay body, allow definitions
|
||||
[body #`(lambda () (begin/text #,@xs))])
|
||||
[body #`(λ () (begin/text #,@xs))])
|
||||
#'(layouter id ... x ... body))])))
|
||||
|
||||
(define (get-path who id file sfx dir)
|
||||
|
@ -71,7 +71,7 @@
|
|||
#:extra-body-attrs [body-attrs #f]
|
||||
#:resources resources ; see below
|
||||
#:referrer [referrer
|
||||
(lambda (url . more)
|
||||
(λ (url . more)
|
||||
(a href: url (if (null? more) linktitle more)))]
|
||||
;; will be used instead of `this' to determine navbar highlights
|
||||
#:part-of [part-of #f]
|
||||
|
@ -146,7 +146,7 @@
|
|||
CLOSE)))
|
||||
(define (links-table this)
|
||||
(table width: "100%"
|
||||
(tr (map (lambda (nav navpart)
|
||||
(tr (map (λ (nav navpart)
|
||||
(td class: 'navlinkcell
|
||||
(span class: 'navitem
|
||||
(span class: (if (eq? (pages->part-of this) navpart)
|
||||
|
@ -154,7 +154,7 @@
|
|||
nav))))
|
||||
(force pages-promise)
|
||||
(force pages-parts-of-promise)))))
|
||||
(lambda (this)
|
||||
(λ (this)
|
||||
(div class: 'racketnav
|
||||
(div class: 'navcontent
|
||||
(table border: 0 cellspacing: 0 cellpadding: 0 width: "100%"
|
||||
|
@ -168,7 +168,7 @@
|
|||
(define headers
|
||||
@list{@link[rel: "icon" href: icon type: "image/ico"]
|
||||
@link[rel: "shortcut icon" href: icon]})
|
||||
(lambda () headers))
|
||||
(λ () headers))
|
||||
|
||||
(define (html-head-maker style favicon)
|
||||
(define headers
|
||||
|
@ -176,7 +176,7 @@
|
|||
@meta[http-equiv: "Content-Type" content: "text/html; charset=utf-8"]
|
||||
@favicon
|
||||
@style})
|
||||
(lambda (title* more-headers)
|
||||
(λ (title* more-headers)
|
||||
(head "\n" (title title*)
|
||||
"\n" headers
|
||||
(and more-headers (list "\n" more-headers))
|
||||
|
@ -186,14 +186,14 @@
|
|||
(let* ([favicon (html-favicon-maker icon)]
|
||||
[make-head (html-head-maker style favicon)]
|
||||
[make-navbar (navbar-maker logo)])
|
||||
(lambda (what . more)
|
||||
(λ (what . more)
|
||||
(apply (case what
|
||||
[(head) make-head]
|
||||
[(navbar) make-navbar]
|
||||
[(favicon-headers) favicon]
|
||||
[(icon-path) (lambda () (url-of icon))]
|
||||
[(logo-path) (lambda () (url-of logo))]
|
||||
[(style-path) (lambda () (url-of style))]
|
||||
[(icon-path) (λ () (url-of icon))]
|
||||
[(logo-path) (λ () (url-of logo))]
|
||||
[(style-path) (λ () (url-of style))]
|
||||
[else (error 'resources "internal error")])
|
||||
more))))
|
||||
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
(define (make-style dir)
|
||||
(resource/referrer (web-path dir "plt.css")
|
||||
(file-writer output (list racket-style "\n"))
|
||||
(lambda (url) (link rel: "stylesheet" type: "text/css"
|
||||
href: url title: "default"))))
|
||||
(λ (url) (link rel: "stylesheet" type: "text/css"
|
||||
href: url title: "default"))))
|
||||
|
||||
(define page-sizes
|
||||
@list{
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
(define url (resource path renderer))
|
||||
(if (eq? referrer values)
|
||||
url
|
||||
(referable (lambda args (apply referrer (url) args)) url)))
|
||||
(referable (λ args (apply referrer (url) args)) url)))
|
||||
(define (url-of referable [absolute? #f])
|
||||
(cond [(referable? referable) ((referable-resource referable) absolute?)]
|
||||
[(resource? referable) (referable absolute?)]
|
||||
|
@ -45,7 +45,7 @@
|
|||
(path->string file)))])
|
||||
(resource (if (eq? void file-op)
|
||||
(void) (if dir (web-path dir target) target))
|
||||
(lambda (file) (file-op source file)))))
|
||||
(λ (file) (file-op source file)))))
|
||||
|
||||
(provide copyfile-resource symlink-resource)
|
||||
(define copyfile-resource (make-path-resourcer copy-file))
|
||||
|
|
|
@ -9,12 +9,12 @@
|
|||
["i386-win32" "Windows x86"]
|
||||
["x86_64-win32" "Windows x64"]
|
||||
["(ppc|i386|x86_64)-osx-mac"
|
||||
,(lambda (_ cpu)
|
||||
,(λ (_ cpu)
|
||||
(format "Macintosh OS X (~a)"
|
||||
(if (equal? cpu "ppc") "PPC" (format "Intel ~a" cpu))))]
|
||||
["(ppc|68k)-mac-classic" "Macintosh Classic (\\1)"]
|
||||
["(ppc|i386)-darwin"
|
||||
,(lambda (_ cpu)
|
||||
,(λ (_ cpu)
|
||||
(format "Macintosh Darwin (~a)"
|
||||
(if (equal? cpu "ppc") "PPC" "Intel")))]
|
||||
["i386-linux(-gcc2)?" "Linux i386"]
|
||||
|
@ -114,9 +114,8 @@
|
|||
(struct mirror (location url person email))
|
||||
|
||||
(define mirrors
|
||||
(map (lambda (m)
|
||||
(mirror (car m) (regexp-replace #rx"/?$" (cadr m) "/")
|
||||
(caddr m) (cadddr m)))
|
||||
(map (λ (m) (mirror (car m) (regexp-replace #rx"/?$" (cadr m) "/")
|
||||
(caddr m) (cadddr m)))
|
||||
-mirrors-))
|
||||
|
||||
;; ----------------------------------------------------------------------------
|
||||
|
@ -132,9 +131,9 @@
|
|||
(let ([t (make-hash)]
|
||||
[months '#("January" "February" "March" "April" "May" "June" "July"
|
||||
"August" "September" "October" "November" "December")])
|
||||
(lambda (v)
|
||||
(λ (v)
|
||||
(hash-ref! t v
|
||||
(lambda ()
|
||||
(λ ()
|
||||
(define info (get-version-tag-info v))
|
||||
(if info
|
||||
(let* ([tagger (car info)]
|
||||
|
@ -198,18 +197,18 @@
|
|||
(error 'precedes "could not find ~s in precedence list: ~s" x l)]
|
||||
[(=? (car l) x) n]
|
||||
[else (loop (cdr l) (add1 n))])))
|
||||
(lambda (x y) (< (num-of x) (num-of y))))
|
||||
(λ (x y) (< (num-of x) (num-of y))))
|
||||
|
||||
;; sorted by version (newest first), and then by -installer-orders-
|
||||
(define all-installers
|
||||
(sort
|
||||
(call-with-input-file installers-data parse-installers)
|
||||
(let ([fns `([,(lambda (i)
|
||||
(let ([fns `([,(λ (i)
|
||||
(version->integer (release-version (installer-release i))))
|
||||
. ,>]
|
||||
,@(map (lambda (o) (cons (car o) (order->precedes (cdr o))))
|
||||
,@(map (λ (o) (cons (car o) (order->precedes (cdr o))))
|
||||
(-installer-orders-)))])
|
||||
(lambda (i1 i2)
|
||||
(λ (i1 i2)
|
||||
(let loop ([fns fns])
|
||||
(if (null? fns)
|
||||
#f
|
||||
|
@ -224,11 +223,10 @@
|
|||
|
||||
(define package->name
|
||||
(let ([t (make-hasheq)])
|
||||
(lambda (package)
|
||||
(λ (package)
|
||||
(hash-ref! t package
|
||||
(lambda ()
|
||||
(string-titlecase
|
||||
(regexp-replace #rx"-" (symbol->string package) " ")))))))
|
||||
(λ () (string-titlecase
|
||||
(regexp-replace #rx"-" (symbol->string package) " ")))))))
|
||||
|
||||
(define platform-names
|
||||
(for/list ([pn (in-list -platform-names-)])
|
||||
|
@ -236,17 +234,16 @@
|
|||
|
||||
(define platform->name
|
||||
(let ([t (make-hash)])
|
||||
(lambda (platform)
|
||||
(λ (platform)
|
||||
(hash-ref! t platform
|
||||
(lambda ()
|
||||
(or (for/or ([pn (in-list platform-names)])
|
||||
;; find out if a regexp applied by checking if the result is
|
||||
;; different (relies on regexp-replace returning the same
|
||||
;; string when fails)
|
||||
(let ([new (regexp-replace (car pn) platform (cadr pn))])
|
||||
(and (not (eq? new platform)) new)))
|
||||
(error 'platform->name "unrecognized platform: ~e"
|
||||
platform)))))))
|
||||
(λ () (or (for/or ([pn (in-list platform-names)])
|
||||
;; find out if a regexp applied by checking if the result
|
||||
;; is different (relies on regexp-replace returning the
|
||||
;; same string when fails)
|
||||
(let ([new (regexp-replace (car pn) platform (cadr pn))])
|
||||
(and (not (eq? new platform)) new)))
|
||||
(error 'platform->name "unrecognized platform: ~e"
|
||||
platform)))))))
|
||||
|
||||
(define (suffix->name suffix)
|
||||
(cond [(assoc suffix -file-type-names-) => cadr]
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
})
|
||||
(define release-page
|
||||
(let ([t (make-hash)])
|
||||
(lambda (rel) (hash-ref! t rel (lambda () (release-page* rel))))))
|
||||
(λ (rel) (hash-ref! t rel (λ () (release-page* rel))))))
|
||||
|
||||
(define all-version-pages
|
||||
(let ()
|
||||
|
@ -86,21 +86,21 @@
|
|||
rules: 'groups]{
|
||||
@thead{
|
||||
@tr{@td{@nbsp @strong{Version & Release Notes}}
|
||||
@(map (lambda (p) @th[align: 'center]{@(package->name p)})
|
||||
@(map (λ (p) @th[align: 'center]{@(package->name p)})
|
||||
all-packages)}}
|
||||
@(let ([sep (tr style: "height: 4px; margin: 0; padding: 0;"
|
||||
(td) (map (lambda (_) (td)) all-packages))])
|
||||
(td) (map (λ (_) (td)) all-packages))])
|
||||
(define (cell rel pkg)
|
||||
@td[align: 'center]{
|
||||
@nbsp @(make-page rel pkg){[download]} @nbsp})
|
||||
@tbody{
|
||||
@sep
|
||||
@(map (lambda (r)
|
||||
@(map (λ (r)
|
||||
@list{
|
||||
@tr[class: 'version-row]{
|
||||
@td{@|nbsp nbsp| @strong{Version @release-version[r]},
|
||||
@(release-page r){@release-date-string[r]} @nbsp}
|
||||
@(map (lambda (p) (cell r p)) all-packages)}
|
||||
@(map (λ (p) (cell r p)) all-packages)}
|
||||
@sep})
|
||||
all-releases)})
|
||||
@tfoot{
|
||||
|
|
|
@ -49,15 +49,14 @@
|
|||
(Choose the nearest site)}
|
||||
@ul{@(let ([mirrors
|
||||
(filter-map
|
||||
(lambda (m)
|
||||
(λ (m)
|
||||
(define url
|
||||
(mirror-link
|
||||
(string-append (mirror-url m) path)
|
||||
size
|
||||
(lambda ()
|
||||
(format "~a <~a>"
|
||||
(mirror-person m)
|
||||
(mirror-email m)))))
|
||||
(λ () (format "~a <~a>"
|
||||
(mirror-person m)
|
||||
(mirror-email m)))))
|
||||
(and url @li{@a[href: url]{@(mirror-location m)}}))
|
||||
mirrors)])
|
||||
(case (length mirrors)
|
||||
|
@ -75,7 +74,6 @@
|
|||
(provide installer->page)
|
||||
(define installer->page
|
||||
(let ([t (make-hasheq)])
|
||||
(lambda (inst . more)
|
||||
(let ([page (hash-ref! t inst (lambda ()
|
||||
(render-installer-page inst)))])
|
||||
(λ (inst . more)
|
||||
(let ([page (hash-ref! t inst (λ () (render-installer-page inst)))])
|
||||
(if (null? more) page (apply page more))))))
|
||||
|
|
|
@ -41,7 +41,7 @@ Polling a URL can result in one of four options:
|
|||
(define known-mirrors
|
||||
(if (and known-mirrors-file (file-exists? known-mirrors-file))
|
||||
(call-with-input-file* known-mirrors-file
|
||||
(lambda (inp) (for/list ([x (in-producer read eof inp)]) x)))
|
||||
(λ (inp) (for/list ([x (in-producer read eof inp)]) x)))
|
||||
'()))
|
||||
|
||||
;; main entry to getting a known entry result: given the url, return the
|
||||
|
@ -76,9 +76,8 @@ Polling a URL can result in one of four options:
|
|||
(set! known-mirrors
|
||||
`(,@(if entry (remq entry known-mirrors) known-mirrors) ,new))
|
||||
(call-with-output-file* known-mirrors-file #:exists 'truncate
|
||||
(lambda (outp)
|
||||
(for ([entry (in-list known-mirrors)])
|
||||
(fprintf outp "~s\n" entry)))))
|
||||
(λ (outp) (for ([entry (in-list known-mirrors)])
|
||||
(fprintf outp "~s\n" entry)))))
|
||||
(when (and new ; we computed a new value
|
||||
(equal? result size) ; we had a good result
|
||||
(not (equal? (caddr new) size))) ; but now it's bad
|
||||
|
@ -102,9 +101,8 @@ Polling a URL can result in one of four options:
|
|||
(provide mirror-link)
|
||||
(define (mirror-link url size get-responsible-email)
|
||||
(and (or (not known-mirrors-file) ; no file => don't check, just use all
|
||||
(let ([r (known-mirror-get
|
||||
url size (lambda () (validate url size))
|
||||
get-responsible-email)])
|
||||
(let ([r (known-mirror-get url size (λ () (validate url size))
|
||||
get-responsible-email)])
|
||||
(or (eq? r #t) (equal? r size))))
|
||||
url))
|
||||
|
||||
|
@ -159,7 +157,7 @@ Polling a URL can result in one of four options:
|
|||
(error 'verify-ftp "bad ftp url: ~a" url)))))
|
||||
(define port (or port? 21))
|
||||
(define ch (make-channel))
|
||||
(thread (lambda ()
|
||||
(thread (λ ()
|
||||
(with-handlers ([exn:fail? exn-message])
|
||||
(define c
|
||||
(ftp-establish-connection host port "anonymous" "anonymous@"))
|
||||
|
|
|
@ -13,19 +13,18 @@
|
|||
(define git
|
||||
(let* ([exe (or (find-executable-path "git")
|
||||
(warn "no `git' executable => no release info"))]
|
||||
[try (lambda (dir) (and dir (directory-exists? dir) dir))]
|
||||
[try (λ (dir) (and dir (directory-exists? dir) dir))]
|
||||
[dir (and exe (or (ormap try (list (getenv "GIT_DIR") THIS-GIT))
|
||||
(warn "no git dir found => no release info\n (~a)"
|
||||
"set $GIT_DIR to a racket repo .git dir")))]
|
||||
[nowhere (open-output-nowhere)])
|
||||
(and dir
|
||||
(lambda args
|
||||
(define o (open-output-string))
|
||||
(parameterize ([current-directory dir]
|
||||
[current-output-port o]
|
||||
[current-error-port nowhere])
|
||||
(and (apply system* exe "--no-pager" args)
|
||||
(get-output-string o)))))))
|
||||
(λ args (define o (open-output-string))
|
||||
(parameterize ([current-directory dir]
|
||||
[current-output-port o]
|
||||
[current-error-port nowhere])
|
||||
(and (apply system* exe "--no-pager" args)
|
||||
(get-output-string o)))))))
|
||||
|
||||
(provide get-version-tag-info)
|
||||
(define (get-version-tag-info version)
|
||||
|
@ -41,9 +40,9 @@
|
|||
(bad "no git info for ~s (missing tag)" version))]
|
||||
[tag (car text)]
|
||||
[text (cdr text)]
|
||||
[check (lambda (x) (or x (bad "malformed git info for ~s" tag)))]
|
||||
[check (λ (x) (or x (bad "malformed git info for ~s" tag)))]
|
||||
[sep (check (regexp-match-positions #rx"\n\n" text))]
|
||||
[meta (map (lambda (h)
|
||||
[meta (map (λ (h)
|
||||
(let ([m (check (regexp-match-positions #rx" " h))])
|
||||
(list (string->symbol (substring h 0 (caar m)))
|
||||
(substring h (cdar m)))))
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
(text->lines (cons (string-append (car text) (cadr text))
|
||||
(cddr text)))]))
|
||||
(define (do-line chars colors)
|
||||
(let loop ([chars (map (lambda (c) (if (eq? #\space c) nbsp c))
|
||||
(let loop ([chars (map (λ (c) (if (eq? #\space c) nbsp c))
|
||||
(string->list chars))]
|
||||
[colors (string->list colors)])
|
||||
(let* ([class (car colors)]
|
||||
|
@ -41,11 +41,10 @@
|
|||
(define (headers)
|
||||
(list
|
||||
(style/inline type: 'text/css
|
||||
(add-newlines (map (lambda (c)
|
||||
@list{.c@(car c) {
|
||||
color: #@(cadr c);
|
||||
background-color: #@(caddr c);
|
||||
}})
|
||||
(add-newlines (map (λ (c) @list{.c@(car c) {
|
||||
color: #@(cadr c);
|
||||
background-color: #@(caddr c);
|
||||
}})
|
||||
colors)))
|
||||
(meta http-equiv: "refresh"
|
||||
content: (list "2;URL=" (url-of main)))))
|
||||
|
|
|
@ -21,16 +21,14 @@
|
|||
|
||||
(define lists
|
||||
@page[#:title "Mailing Lists" #:file "" #:part-of 'community
|
||||
(define (list-cells what) (map (lambda (r) (r what)) list-renderers))
|
||||
(define (list-cells what) (map (λ (r) (r what)) list-renderers))
|
||||
]{
|
||||
@p{This is the Racket mailing list server. We have several public mailing
|
||||
lists, some are listed below with several mirrors for each one. The
|
||||
complete list of public mailing lists is available on
|
||||
@a[href: "listinfo"]{this page}.}
|
||||
@(define gap1
|
||||
(tr (map (lambda (_) @td{@div[style: "height: 1ex;"]{}}) MLs)))
|
||||
@(define gap2
|
||||
(tr (map (lambda (_) @td{}) MLs)))
|
||||
@(define gap1 (tr (map (λ (_) @td{@div[style: "height: 1ex;"]{}}) MLs)))
|
||||
@(define gap2 (tr (map (λ (_) @td{}) MLs)))
|
||||
@(define (sec . text)
|
||||
@list{@gap1
|
||||
@tr{@td[style: '("background-color: #dddddd; font-weight: bold;"
|
||||
|
@ -77,7 +75,7 @@
|
|||
@td{@form[action: url method: method
|
||||
style: "display: inline; clear: none;"]{
|
||||
@div{@body}}})
|
||||
(lambda (what)
|
||||
(λ (what)
|
||||
(case what
|
||||
[(header-cell)
|
||||
@th[style: "width: 33%;"]{
|
||||
|
@ -147,7 +145,7 @@
|
|||
@div[style: "margin-left: 2em;"]{
|
||||
@description
|
||||
@br
|
||||
[@a[href: (list lists name "/")]{list page},
|
||||
[@a[href: (list (url-of lists) name "/")]{list page},
|
||||
@gmane-link["dir"]{gmane mirror},
|
||||
@mail-archive-link[""]{mail-archive}@;
|
||||
@(and google-groups-url
|
||||
|
@ -159,5 +157,5 @@
|
|||
|
||||
(define (mailing-lists-quick)
|
||||
@text{@(apply parlist @strong{Mailing Lists}
|
||||
(map (lambda (r) (r 'quick)) list-renderers))
|
||||
@p{See the @a[href: lists]{mailing list server} for more details.}})
|
||||
(map (λ (r) (r 'quick)) list-renderers))
|
||||
@p{See the @lists{mailing list server} for more details.}})
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
|
||||
(provide blog)
|
||||
(define blog
|
||||
@plain[#:file "" #:referrer (lambda (u) @a[href: u]{Blog})]{
|
||||
@plain[#:file "" #:referrer (λ (u) @a[href: u]{Blog})]{
|
||||
@; This is the blogger style template file, with one hole for the CSS and one
|
||||
@; for the navbar, and a few more tweaks (first by soegaard and then by eli).
|
||||
@;
|
||||
|
|
|
@ -125,8 +125,7 @@
|
|||
|
||||
;; xhtml strict doesn't allow lists inside <p>, so fake our own paragraphs
|
||||
;; using divs:
|
||||
(define p*
|
||||
(make-separated-tag values (lambda text (apply div class: 'p text))))
|
||||
(define p* (make-separated-tag values (λ text (apply div class: 'p text))))
|
||||
|
||||
@page[#:title "git intro" #:extra-headers style]{
|
||||
|
||||
|
@ -2570,7 +2569,7 @@
|
|||
your global .gitconfig file. For example, I have these settings:
|
||||
@pre|{[sendemail]
|
||||
from = Eli Barzilay <eli@barzilay.org>
|
||||
bcc = eli@eli.barzilay.org
|
||||
bcc = eli@barzilay.org
|
||||
suppresscc = self}|
|
||||
and you can see more in the @man{git-config} and @man{git-send-email} man
|
||||
pages. The address to send the patches to is also configurable — you can
|
||||
|
|
|
@ -577,14 +577,13 @@
|
|||
@a[href: "author.html#%(sequence)s"]{[author]}})
|
||||
@(define navcell
|
||||
(let ([n 0])
|
||||
(lambda ()
|
||||
(set! n (add1 n))
|
||||
@td{@ul[style: "font-size: x-small;"]{
|
||||
@; need only one of these things, at the end
|
||||
@(when (= n 2) (list "\n" @comment{threads} "\n"))@;
|
||||
%(prev_wsubj)s
|
||||
%(next_wsubj)s
|
||||
@li{@sorted-by}}})))
|
||||
(λ () (set! n (add1 n))
|
||||
@td{@ul[style: "font-size: x-small;"]{
|
||||
@; need only one of these things, at the end
|
||||
@(when (= n 2) (list "\n" @comment{threads} "\n"))@;
|
||||
%(prev_wsubj)s
|
||||
%(next_wsubj)s
|
||||
@li{@sorted-by}}})))
|
||||
@; --------------------
|
||||
@; Based on the Mailman file "article.html" (no revision specified)
|
||||
@; Modified to fit the racket pages
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
null
|
||||
(cons (list type (sub1 start) (sub1 end) 0)
|
||||
(loop mode)))))]
|
||||
[substring* (lambda (bstr start [end (bytes-length bstr)])
|
||||
[substring* (λ (bstr start [end (bytes-length bstr)])
|
||||
(bytes->string/utf-8 (subbytes bstr start end)))]
|
||||
[e (parameterize ([read-accept-reader #t]
|
||||
[current-namespace expand-namespace])
|
||||
|
@ -67,7 +67,7 @@
|
|||
null)))]
|
||||
[(pair? e) (append (loop (car e)) (loop (cdr e)))]
|
||||
[else null]))]
|
||||
[link-mod (lambda (mp-stx priority #:orig? [always-orig? #f])
|
||||
[link-mod (λ (mp-stx priority #:orig? [always-orig? #f])
|
||||
(if (or always-orig?
|
||||
(syntax-original? mp-stx))
|
||||
(let ([mp (syntax->datum mp-stx)])
|
||||
|
@ -93,7 +93,7 @@
|
|||
(map loop (syntax->list #'(form ...))))]
|
||||
[(#%require spec ...)
|
||||
(apply append
|
||||
(map (lambda (spec)
|
||||
(map (λ (spec)
|
||||
;; Need to add support for renaming forms, etc.:
|
||||
(if (module-path? (syntax->datum spec))
|
||||
(link-mod spec 2)
|
||||
|
@ -114,13 +114,12 @@
|
|||
null))]
|
||||
[tokens
|
||||
(sort (append ids mods language
|
||||
(filter (lambda (x) (not (eq? (car x) 'symbol)))
|
||||
(filter (λ (x) (not (eq? (car x) 'symbol)))
|
||||
;; Drop #lang entry:
|
||||
(cdr tokens)))
|
||||
(lambda (a b)
|
||||
(or (< (cadr a) (cadr b))
|
||||
(and (= (cadr a) (cadr b))
|
||||
(> (cadddr a) (cadddr b))))))])
|
||||
(λ (a b) (or (< (cadr a) (cadr b))
|
||||
(and (= (cadr a) (cadr b))
|
||||
(> (cadddr a) (cadddr b))))))])
|
||||
(let loop ([pos 0] [tokens tokens])
|
||||
(cond
|
||||
[(null? tokens) (list (substring* bstr pos))]
|
||||
|
|
|
@ -275,10 +275,9 @@
|
|||
@doc["more/"]{build a web server from scratch}. Racket includes both
|
||||
@doc[""]{batteries} and a @doc["drracket/"]{programming environment},
|
||||
so @doc["getting-started/"]{get started}!}}
|
||||
@((lambda xs
|
||||
(table class: 'threepanes
|
||||
(tr (map (lambda (x) (td (div class: 'panetitle (car x)) (cdr x)))
|
||||
xs))))
|
||||
@((λ xs (table class: 'threepanes
|
||||
(tr (map (λ (x) (td (div class: 'panetitle (car x)) (cdr x)))
|
||||
xs))))
|
||||
(list "Grow your Program"
|
||||
@p{Racket's
|
||||
@doc["guide/intro.html#(part._.Interacting_with_.Racket)"]{
|
||||
|
@ -408,8 +407,8 @@
|
|||
(define loud (copyfile (in-here "loud.png")))
|
||||
|
||||
(define more.css
|
||||
@plain[#:referrer (lambda (url) (link rel: "stylesheet" type: "text/css"
|
||||
href: url title: "default"))]{
|
||||
@plain[#:referrer (λ (url) (link rel: "stylesheet" type: "text/css"
|
||||
href: url title: "default"))]{
|
||||
.bodycontent {
|
||||
background-image: url('@loud');
|
||||
background-repeat: no-repeat;
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
RewriteRule ^(.*)$ http://pre.racket-lang.org@;
|
||||
/irc-logs/@||racket/@|"$1"| [P]
|
||||
}
|
||||
(lambda (text) @a[href: "irc-logs/"]{@text})))
|
||||
(λ (text) @a[href: "irc-logs/"]{@text})))
|
||||
|
||||
(provide irc-quick)
|
||||
(define (irc-quick)
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
background: @|color|@";"})
|
||||
@(define place-names
|
||||
(add-between
|
||||
(sort (map (lambda (p)
|
||||
(sort (map (λ (p)
|
||||
(regexp-replace #rx", [A-Z][A-Z]$" (place-location p) ""))
|
||||
all-places)
|
||||
string<?)
|
||||
|
|
|
@ -260,9 +260,8 @@
|
|||
|
||||
(define key->number
|
||||
(let ([t (for/hash ([k bib-fields] [i (in-naturals)]) (values k i))])
|
||||
(lambda (key)
|
||||
(hash-ref t key (lambda ()
|
||||
(error 'key->number "unknown field name: ~e" key))))))
|
||||
(λ (key) (hash-ref t key
|
||||
(λ () (error 'key->number "unknown field name: ~e" key))))))
|
||||
|
||||
;; converts the hash to an alist with the order specified by bib-fields
|
||||
(define (bib->alist bib)
|
||||
|
@ -315,8 +314,7 @@
|
|||
;; turn non-strings to strings, join multiple strings, normalize
|
||||
;; spaces
|
||||
(let* ([val (cdr a)]
|
||||
[val (map (lambda (x) (if (string? x) x (format "~a" x)))
|
||||
val)]
|
||||
[val (map (λ (x) (if (string? x) x (format "~a" x))) val)]
|
||||
[val (string-append* (add-between val "\n"))]
|
||||
[val (regexp-replace* #rx"\t" val " ")]
|
||||
[val (regexp-replace* #rx" +" val " ")]
|
||||
|
@ -337,10 +335,9 @@
|
|||
(define version->integer
|
||||
(let ([t (for*/hash ([v (in-list (map car versions+dates))])
|
||||
(values v (-version->integer (regexp-replace #rx"^0+" v ""))))])
|
||||
(lambda (ver)
|
||||
(λ (ver)
|
||||
(hash-ref t ver
|
||||
(lambda ()
|
||||
(error 'version->integer "unknown pltreport version: ~e" ver))))))
|
||||
(λ () (error 'version->integer "unknown pltreport version: ~e" ver))))))
|
||||
|
||||
;; "V...V" version range
|
||||
;; "...V", "V..." open-ended version range
|
||||
|
@ -356,7 +353,7 @@
|
|||
[str (regexp-replace #rx"^ +" str "")]
|
||||
[str (regexp-replace #rx" +$" str "")]
|
||||
[l (regexp-split #rx" *[.][.][.] *" str)]
|
||||
[l (map (lambda (x)
|
||||
[l (map (λ (x)
|
||||
(cond [(equal? "" x) #f]
|
||||
[(equal? "*" x) v:3->4]
|
||||
[(equal? "!" x) v:4->5]
|
||||
|
@ -366,12 +363,12 @@
|
|||
(apply
|
||||
(case-lambda [(ver)
|
||||
(if ver
|
||||
(lambda (v) (equal? ver (version->integer v)))
|
||||
(lambda (v) #f))]
|
||||
(λ (v) (equal? ver (version->integer v)))
|
||||
(λ (v) #f))]
|
||||
[(from to)
|
||||
(let ([from (or from -inf.0)]
|
||||
[to (or to +inf.0)])
|
||||
(lambda (v) (<= from (version->integer v) to)))]
|
||||
(λ (v) (<= from (version->integer v) to)))]
|
||||
[_ (error 'versions->pred "bad versions spec: ~e" str)])
|
||||
l)))
|
||||
|
||||
|
@ -387,7 +384,7 @@
|
|||
|
||||
(define (author->string author)
|
||||
(let ([r (hash-ref authors* author
|
||||
(lambda () (person-bibname (find-person author))))])
|
||||
(λ () (person-bibname (find-person author))))])
|
||||
(if (string? r)
|
||||
r
|
||||
(let ([r (string-join (map author->string r) " and ")])
|
||||
|
@ -400,7 +397,7 @@
|
|||
(define doc-defs*
|
||||
(for/list ([d doc-defs])
|
||||
(apply
|
||||
(lambda (docname docnum versions author title . attrs)
|
||||
(λ (docname docnum versions author title . attrs)
|
||||
`(,(versions->pred versions)
|
||||
[#:docname ,docname]
|
||||
[#:number-template ,(format "PLT-TR~~a-~a-v~~a" (or docnum docname))]
|
||||
|
|
|
@ -70,28 +70,26 @@
|
|||
(define places0
|
||||
(make-all
|
||||
;; make a place
|
||||
(lambda (nick name #:location loc #:url url #:pubs [pubs #f] . people)
|
||||
(λ (nick name #:location loc #:url url #:pubs [pubs #f] . people)
|
||||
(place nick name loc url pubs people))
|
||||
;; make a person
|
||||
(lambda (nick name #:url url #:bibname [bibname name])
|
||||
(λ (nick name #:url url #:bibname [bibname name])
|
||||
(person nick name url bibname (make-placeholder #f)))))
|
||||
(for* ([place (in-list places0)]
|
||||
[person (in-list (place-people place))])
|
||||
(placeholder-set! (person-place person) place))
|
||||
(define places (make-reader-graph places0))
|
||||
(define people (append-map place-people places))
|
||||
(when (ormap (lambda (p) (null? (place-people p))) places)
|
||||
(when (ormap (λ (p) (null? (place-people p))) places)
|
||||
(error 'places "all places should have people in them"))
|
||||
(define (make-finder what xs get-nick)
|
||||
(define t (make-hasheq))
|
||||
(for ([x (in-list xs)])
|
||||
(hash-update! t (get-nick x)
|
||||
(lambda (old)
|
||||
(if old (error what "got duplicate nicks") x))
|
||||
(λ (old) (if old (error what "got duplicate nicks") x))
|
||||
#f))
|
||||
(lambda (nick)
|
||||
(or (hash-ref t nick #f)
|
||||
(error what "nick not found: ~s" nick))))
|
||||
(λ (nick) (or (hash-ref t nick #f)
|
||||
(error what "nick not found: ~s" nick))))
|
||||
(values places (make-finder 'places places place-nick)
|
||||
people (make-finder 'people people person-nick))))
|
||||
|
||||
|
@ -101,9 +99,8 @@
|
|||
@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:
|
||||
@(ul (map (lambda (p)
|
||||
@li{@a[href: (place-url p)]{
|
||||
@(place-name p), @(place-location p)}})
|
||||
@(ul (map (λ (p) @li{@a[href: (place-url p)]{
|
||||
@(place-name p), @(place-location p)}})
|
||||
all-places))}
|
||||
@p{Also, Racket is supported by a band of volunteers who contribute not
|
||||
only code and documentation but also infectious enthusiasm—too many to
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#:note [note #f])
|
||||
(define tr-name @list{PLT-TR-2010-@num})
|
||||
(define author-strings
|
||||
(map (lambda (a) (if (eq? 'plt a) "PLT" (person-bibname (find-person a))))
|
||||
(map (λ (a) (if (eq? 'plt a) "PLT" (person-bibname (find-person a))))
|
||||
authors*))
|
||||
(define (link fmt [ver 'recent]) @a[href: (doc-url docname fmt ver)]{[@fmt]})
|
||||
(define (title-line link?)
|
||||
|
|
Loading…
Reference in New Issue
Block a user