Initial web content & build script.

This commit is contained in:
Eli Barzilay 2010-06-05 12:38:40 -04:00
parent e09d6567c8
commit d8f8dfe9b7
18 changed files with 517 additions and 0 deletions

View File

@ -976,6 +976,7 @@ path/s is either such a string or a list of them.
"collects/meta/check-dists.rkt" drdr:command-line #f
"collects/meta/contrib/completion/racket-completion.bash" responsible (samth sstrickl) drdr:command-line #f
"collects/meta/drdr" responsible (jay) drdr:command-line #f
"collects/meta/web/build.rkt" drdr:command-line #f
"collects/mred" responsible (mflatt)
"collects/mred/edit-main.rkt" drdr:command-line (mzc *)
"collects/mred/edit.rkt" drdr:command-line (gracket-text "-t" *)

70
collects/meta/web/build.rkt Executable file
View File

@ -0,0 +1,70 @@
#!/bin/sh
#|
exe="racket";
if [ -x "$PLTHOME/bin/racket" ]; then exe="$PLTHOME/bin/racket"; fi
exec "$exe" "$0" "$@"
|#
#lang racket/base
(require racket/cmdline racket/runtime-path
racket/string racket/file
"html/resource.rkt" "config.rkt" "navbar.rkt")
(define build-mode #f)
(define distribute? #f)
(define warn? #t)
(command-line
#:once-any
[("-l" "--local")
"create content that is viewable in the build directory"
" (all links are relative) "
(set! build-mode 'local)]
[("-w" "--web")
"create content that is viewable on the Racket web pages"
(set! build-mode 'web)]
#:once-each
[("-o" "--output") dir
"output directory"
" (defaults to the current directory)"
(unless (directory-exists? dir)
(printf "Creating \"~a\"\n" dir) (make-directory dir))
(current-directory dir)]
[("-f")
"avoid warning about directory cleanup"
(set! warn? #f)]
[("-d" "--dist")
"distribute resulting content"
" (will only work with the right access to the servers)"
(set! distribute? #t)])
(unless build-mode (raise-user-error 'build "build mode not specified"))
(define-runtime-path here ".")
(let ([build (file-or-directory-identity (current-directory))])
(let loop ([dir here])
(if (equal? build (file-or-directory-identity dir))
(raise-user-error 'build "might clobber sources, refusing to build")
(let-values ([(base name dir?) (split-path dir)])
(when base (loop base))))))
(let ([paths (sort (map path->string (directory-list)) string<?)])
(when (pair? paths)
(if (or (not warn?)
(begin (printf "Directory not empty, these will be deleted: ~a.\n"
(string-join paths ", "))
(printf "Continue? ") (flush-output)
(regexp-match? #rx" *[yY]" (read-line))))
(for-each delete-directory/files paths)
(raise-user-error 'build "Aborting."))))
(printf "Building~a ~a content...\n"
(if distribute? " and distributing" "") build-mode)
(parameterize ([url-roots (and (eq? 'web build-mode)
(map (lambda (site)
(list (site-dir site)
(site-url site)))
sites))])
(render-all))
(printf "Done.\n")

View File

@ -0,0 +1,8 @@
#lang racket/base
(provide (struct-out site) sites)
(struct site (dir url))
(define sites (list (site "www" "http://racket-lang.org/")
(site "download" "http://download.racket-lang.org/")
(site "stubs/git" "http://git.racket-lang.org/")
(site "stubs/blog" "http://blog.racket-lang.org/")))

View File

@ -0,0 +1,6 @@
#lang at-exp s-exp "shared.rkt"
(provide index)
(define index
(page #:link-title "Download" #:window-title "Download Racket"
"TODO"))

View File

@ -0,0 +1,4 @@
#lang at-exp s-exp "../common.rkt"
(require "index.rkt")
(provide (rename-out [index download]))

View File

@ -0,0 +1,5 @@
#lang at-exp s-exp "../common.rkt"
(provide page (all-from-out "../common.rkt"))
(define-pager page "download")

View File

@ -0,0 +1,5 @@
#lang at-exp s-exp "common.rkt"
(require "www/main.rkt" "download/main.rkt")
(set-navbar! (list main download -docs -planet community outreach+research)
help)

View File

@ -0,0 +1,7 @@
#lang at-exp s-exp "shared.rkt"
(provide blog)
(define blog
(page #:file "blog/"
;; #:part-of community <-- TODO: is doing this a good idea
"This is a stub page to get the header for the blog."))

View File

@ -0,0 +1,6 @@
#lang at-exp s-exp "shared.rkt"
(provide git)
(define git
(page #:title "Development Repository" #:file "git/"
"This is a stub page to get the header for the gitweb server."))

View File

@ -0,0 +1,11 @@
#lang at-exp s-exp "shared.rkt"
(provide pre-root)
(define pre-root
(page #:file "pre/" #:title "Prebuilt materials"
"This is a stub page to get the header for the nightly builds root."))
(provide pre-installers)
(define pre-installers
(page #:file "pre/installers/" #:title "Nightly build installers"
"This is a stub page to get the header for the nightly installers."))

View File

@ -0,0 +1,5 @@
#lang at-exp s-exp "../common.rkt"
(provide page (all-from-out "../common.rkt"))
(define-pager page "stubs")

View File

@ -0,0 +1,64 @@
#lang at-exp s-exp "shared.rkt"
(require "../stubs/blog.rkt" "../stubs/git.rkt" "../stubs/pre.rkt")
(define (TT . xs)
@tt[style: "background-color: #dde;"]{@xs})
(define (maillist-email name)
@TT{@big{@strong{@name}}@"@"racket-lang.org})
(define (maillist-url name)
(define url "http://lists.racket-lang.org/")
@text{@a[href: `(,url ,name "/")]{Subscribe}
or @a[href: `(,url ,name "archive/")]{browse}})
;; TODO: Need to finish the setup for gmane and google-groups
;; (define (gmane name)
;; @a[href: `("http://dir.gmane.org/gmane.lisp.scheme." ,name)]{Gmane})
;; (define google-groups
;; @a[href: "http://groups.google.com/group/plt-scheme"]{Google Groups})
(define (irc-chan name)
@text{@TT{#@big{@strong{@name}}} on
@a[href: "http://www.freenode.net"]{@tt{freenode.net}}})
(provide community)
(define community
(page
(parlist @strong{Mailing Lists}
@text{@maillist-email{users} @mdash a discussion list for all things
related to Racket. Ask your questions here!
(@maillist-url{users}.)
@; These are not set up yet
@; also via @gmane{racket} and @|google-groups|).
}
@text{@maillist-email{announce} @mdash a low-volume, moderated list
for announcements, only. (@maillist-url{announce}.)}
@text{@maillist-email{dev} @mdash a mailing list for Racket development,
for the people who want to see how the sausages are made and help make
them. (@maillist-url{dev}.)
@; @";" also on @gmane{plt.dev}.)
})
(parlist @strong{Discussion Channels}
@text{@irc-chan{racket} @mdash an informal discussion channel for all
things related to Racket.})
(parlist @strong{Resources for Learning}
(apply parlist @text{Documentation for getting started:} intros)
@text{@-cookbook @mdash useful recipes, many of which apply to Racket.}
@text{@-htdp @mdash a textbook for introductory programming, but also
worthwhile for experience programmers who are new to @|ldquo|functional
programming.@|rdquo|}
@text{@-plai @mdash a textbook on programming languages.}
@text{@-teachscheme @mdash a workshop to train teachers using @-htdp in
the classroom.})
(parlist @strong{PLT Scheme Inc.}
@text{@blog @mdash announcements, helpful hints, and thoughtful rants.}
;;TODO @text{@people @mdash the people behind Racket.}
)
(parlist @strong{Development}
@text{@git (also available on
@a[href: "http://github.com/plt/racket/"]{GitHub})}
@text{@pre-installers and @|pre-root|.}
;;TODO: proper reference
@a[href: "http://download.racket-lang.org/chronology/"]{
Release Announcements}
)))

View File

@ -0,0 +1,40 @@
#lang at-exp s-exp "shared.rkt"
(require "community.rkt")
(provide help)
(define help
(page #:link-title "Need Help?"
(parlist @strong{Don't Panic!}
@text{Racket has a variety of resources designed to help you
with any problems you may have.})
(parlist @strong{Help Desk}
@text{Your first stop should always be with the help system that's
built into Racket and available from DrRacket's help menu
@strong{or by pressing F1 with the cursor on a search term}.
This documentation is customized for your installation, and
may include documentation for optional packages you've
installed. As a second line of defense, the documentation
for the core of the most recent version of Racket is
available
@a[href: "http://docs.plt-scheme.org"]{from this web site}.}
@text{Not sure what to search for? The documentation includes a
@a[href: "http://docs.plt-scheme.org/guide/"]{guide} (also
located in your local copy of the documentation) that
provides a narrative introduction to many of Racket's
features.})
(parlist @strong{Learning how to Program}
@text{Try going through @|-htdp|.})
(parlist @strong{Searching the Web}
@text{The
@-cookbook is
a wiki for Scheme snippets, many of which work in Racket.
Additionally, your favorite search engine may well provide
answers for many of your questions.})
(parlist @strong{The Mailing List}
@text{The @tt|{users@racket-lang.org}| mailing list is a great
source for answers to questions when the above resources
don't pan out@";" sign up for it in the @community area of
the website.})
@br
@text{Thanks for using Racket!}))

View File

@ -0,0 +1,6 @@
#lang at-exp s-exp "shared.rkt"
(provide index)
(define index
(page #:link-title "About" #:window-title "Racket"
"TODO"))

View File

@ -0,0 +1,5 @@
#lang at-exp s-exp "../common.rkt"
(require "index.rkt" "community.rkt" "outreach+research.rkt"
"help.rkt" "new-name.rkt")
(provide (rename-out [index main]) community outreach+research help)

View File

@ -0,0 +1,179 @@
#lang at-exp s-exp "shared.rkt"
(define name i)
(define (url str) (tt (a href: str str)))
(define ((FAQ tag . ques) . answer)
@div[class: 'faqentry]{
@div[class: 'faqques]{@a[name: tag]{@ques}}
@div[class: 'faqans]{@answer}})
(define styles
@style/inline{
.nestedheading {
text-align: center;
font-weight: bold;
font-size: large;
}
.nested {
width: 80%;
margin-left: auto;
margin-right: auto;
margin-top: 1em;
margin-bottom: 1em;
}
.faqsection {
margin-left: auto;
margin-right: auto;
margin-top: 2em;
width: 90%;
}
.faqques {
font-weight: bold;
margin-top: 1em;
margin-bottom: 1em;
}
.faqans {
margin-left: 1em;
}})
(define new-name
(page #:title "From PLT Scheme to Racket"
styles
@div[class: 'nestedheading]{PLT Scheme is a Racket}
@div[class: 'nested]{Sure, it has parentheses, uses the keyword
@tt{lambda}, provides lexical scope, and emphasizes macros @|ndash| but
don't be fooled. PLT Scheme is no minimalist embodiment of 1930s math or
1970s technology. PLT Scheme is a cover for a gang of academic hackers
who want to fuse cutting-edge programming-language research with everyday
programming. They draw you in with the promise of a simple and polite
little Scheme, but soon you'll find yourself using modules, contracts,
keyword arguments, classes, static types, and even curly braces.}
@div[class: 'nestedheading]{Racket is a Scheme}
@div[class: 'nested]{Racket is still a dialect of Lisp and a descendant of
Scheme. The tools developed by PLT will continue to support R5RS, R6RS,
the old @tt{mzscheme} environment, Typed Scheme, and more. At the same
time, instead of having to say @|ldquo|PLT's main variant of
Scheme,@|rdquo| programmers can now simply say @|ldquo|Racket@|rdquo| to
refer to the specific descendant of Scheme that powers PLT's languages
and libraries.}
@div[class: 'faqsection]{
@div[class: 'nestedheading]{Anticipated Questions}
@@FAQ["why"]{
Why change the name?
}{
The @name{Scheme} part of the name @name{PLT Scheme} is misleading, and
it is often an obstacle to explaining and promoting PLT research and
tools.
For example, when you type @|ldquo|scheme@|rdquo| into Google, the
first hit is a Wikipedia entry written from an R5RS perspective.
That's appropriate for a Wikipedia page on Scheme, but it's not a good
introduction to PLT Scheme. As long as we call our language
@name{Scheme}, we struggle to explain our language, and we are usually
forced to start the explanation with a disclaimer. At the same time,
to the degree that the PLT community has defined @name{Scheme} though
market share, publications, and educational outreach, we interfere with
everyone else's ability to define @name{Scheme} @|ndash| and many have
a valid claim to that ability.
By switching to @name{Racket}, we expect to resolve this
communication problem.}
@@FAQ["what"]{What will the change look like?
}{
@name{DrScheme} becomes @name{DrRacket}. The @tt{mzscheme} executable
becomes @tt{racket}, and @tt{mred} becomes @tt{gracket} (following a
common convention for @|ldquo|GUI @tt{racket}@|rdquo|). We change each
@tt{#lang scheme} to @tt{#lang racket} in the Racket distribution,
although @tt{#lang scheme} will be supported for backward
compatibility. The @url{http://plt-scheme.org} site will be replaced by
@url{http://racket-lang.org}. The @tt{plt-scheme} mailing list becomes
the @tt{racket} mailing list (@tt{users@"@"racket-lang.org}).
The Racket site and documentation will note that Racket is a descendant
of Scheme, but most current uses of the word @|ldquo|Scheme@|rdquo|
(which implicitly mean PLT Scheme) will be replaced by
@|ldquo|Racket.@|rdquo|
Racket programmers are @name{Racketeers}, of course.}
@@FAQ["scheme"]{
Does this mean that PLT will no longer implement Scheme?
}{
There will be no difference between the current @tt{#lang scheme}
and the new @tt{#lang racket}, but the latter will become the
preferred form.
In addition, PLT will continue to support standards such as R5RS
and R6RS. The transition from/to various Scheme languages to/from
Racket will be as easy/difficult as before.}
@@FAQ["transition"]{What happens to all of the old programs, scripts,
address books, bookmarks, papers, etc. that refer to @name{PLT
Scheme} instead of @name{Racket}?}{
Old executables, web sites, mailing addresses, and module names will
forward to the new ones. We will work to make the transition as
painless as possible and to preserve old references for as long as
possible.}
@@FAQ["edu"]{
How can I tell my department that we should teach with Racket in
instead of Scheme? They've never heard of @name{Racket}.
}{
If you felt comfortable claiming that PLT Scheme was Scheme before,
then you can still say that you want to teach with Scheme, even if the
environment is called @name{DrRacket}. Racket is a descendant of
Scheme, just like PLT Scheme was.}
@@FAQ["brand"]{
Aren't you worried that you will lose brand recognition by switching
from the name @name{Scheme} to @name{Racket}?
}{
Yes. Nevertheless, we think the long-term benefit of a new name will
outweigh the short-term difficulties of changing.}
@@FAQ["plt"]{
Instead of picking a new name, why not just call the language
@name{PLT}?
}{
Some of us tried that, informally. It felt awkward, because we use
@name{PLT} to refer to a group of people, and because we have used
@name{PLT} as a modifier for @name{Scheme} and other nouns. Switching
the language name from one noun to another sounds better, it's clearer,
and it's easier to explain.}
@@FAQ["suggestions"]{
Couldn't you find a better name?
@name{[Insert name here]} would be better.
}{
Thank you for the suggestion. The name @name{Racket} meets some basic
criteria: it isn't used already, it's easy to pronounce and spell, and
it has a vague connection to the word @|ldquo|scheme.@|rdquo| Mostly,
though, we just like it.}
}))

View File

@ -0,0 +1,90 @@
#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?
(provide outreach+research)
(define outreach+research
(page
#:title "Outreach & Research"
#:link-title @list{Outreach@|nbsp|&@|nbsp|Research}
(parlist
@strong{Outreach}
@text{@-teachscheme @mdash a workshop to train teachers using @-htdp in
the classroom.}
@text{@-bootstrap @mdash a curriculum for middle-school students.})
(parlist @strong{Publications}
techreports brown-pubs nwu-pubs neu-pubs utah-pubs)
(parlist @strong{Graduate Study}
@text{We welcome applications from students interested in
@|graduate-study|.})))
(define graduate-study
(page #:file "common-plt-app.html" #:part-of outreach+research
(define (box-style border-width color)
@list{border: @|border-width|px solid black; padding: 5px; @;
background: @|color|@";"})
@h1{Graduate Study with PLT}
@p{An open letter to graduate applicants:}
@div[style: (box-style 3 "#ddd")]{
@p{Dear Prospective Graduate Student,
@br{}@br{}
Thank you for your interest in working with PLT. We get several
inquiries every year from students interested in working with one or
more of us. We're flattered and, of course, interested in your
applications. Because you are more interested in PLT than in our
specific institutions, we have created the following common
application form. By filling it in once, you can automatically apply
to all current PLT institutions.}
@p[style: (box-style 1 "#bbb")]{
Yes, we know you don't like Boston/Chicago/Providence/Provo/Salt Lake
City/San Luis Obispo/Worcester (circle those applicable). But we like
them, or we wouldn't be living there. Think about the message you're
sending by rejecting our choices. Moreover, we think very highly of
our colleagues@|mdash|more highly than we think of your judgment in
this matter@|mdash|so for your own good, we're going to forward your
application to them anyway.}
@p{How many years have you programmed in Scheme?}
@p{How many years have you programmed in PLT Scheme?}
@p{If the two numbers above are not identical, justify.}
@p{How many PLT Scheme Web applications have you written?}
@p{What problems did you find with the PLT Scheme Web server in the
process? Please list bug report numbers.}
@p{Which wheels did you inadvertently reinvent?}
@p{Do you prefer your calculi Classic or Featherweight?}
@p{Should types be intervals or ideals?}
@p{In your opinion, which Barendregt proof has the highest hours spent
understanding-to-symbols ratio?}
@p{Which is your favorite combinator?}
@p{Thank you for your interest. Don't be a cat squandering the popcorn.}
@p[align: 'right]{@|mdash|Shriram, Outreach Coordinator, PLT}}
@p{Seriously, we @em{do} enjoy working with graduate students. If you
are inspired by the PLT project and want to drive the next generation of
innovation, you should strongly consider graduate study with us. We
look forward to hearing from you. All of us, no matter where we may
live.}
@p[align: 'right]{
@|mdash|@;
@a[href: "http://www.ccs.neu.edu/home/matthias/"]{Matthias},
@a[href: "http://www.eecs.northwestern.edu/~robby/"]{Robby},
@a[href: "http://www.cs.wpi.edu/~kfisler/"]{Kathi},
@a[href: "http://www.cs.utah.edu/~mflatt/"]{Matthew},
@a[href: "http://www.cs.brown.edu/~sk/"]{Shriram}}))
(define techreports
(page #:file "techreports/" #:part-of outreach+research
#:title "Technical Reports"
#:extra-headers
@meta[http-equiv: "refresh"
content: "2;url=http://plt-scheme.org/techreports/"]
"TODO"))

View File

@ -0,0 +1,5 @@
#lang at-exp s-exp "../common.rkt"
(provide page (all-from-out "../common.rkt"))
(define-pager page "www")