some cleanup and misc improvements
svn: r3755
This commit is contained in:
parent
daf17eb616
commit
02357fd0c9
|
@ -37,7 +37,7 @@
|
|||
(make-sec "Libraries" #rx"SRFI|MzLib|Framework|PLT Miscellaneous|Teachpack|Swindle" '())
|
||||
(make-sec "Writing extensions" #rx"Tools|Inside|Foreign" '())
|
||||
(make-sec "Other" #rx"" '())))
|
||||
|
||||
|
||||
; manual is doc collection subdirectory, e.g. "mred"
|
||||
(define (main-manual-page manual)
|
||||
(let* ([entry (assoc (string->path manual) known-docs)]
|
||||
|
@ -48,14 +48,14 @@
|
|||
(let ([href (get-help-url doc-dir)])
|
||||
`(A ((HREF ,href)) ,name))
|
||||
name)))
|
||||
|
||||
|
||||
; string string string -> xexpr
|
||||
; man is manual name
|
||||
; ndx is index into the manual
|
||||
; txt is the link text
|
||||
;; warning: if the index file isn't present, this page
|
||||
(define (manual-entry man ndx txt)
|
||||
(with-handlers ([exn:fail?
|
||||
;; warning: if the index file isn't present, this page
|
||||
(lambda (x)
|
||||
`(font ((color "red")) ,txt " [" ,(exn-message x) "]"))])
|
||||
`(A ((HREF ,(finddoc-page man ndx))) ,txt)))
|
||||
|
|
|
@ -2,80 +2,60 @@
|
|||
(require "private/util.ss"
|
||||
"../private/get-help-url.ss"
|
||||
"../private/manuals.ss"
|
||||
(lib "servlet.ss" "web-server"))
|
||||
|
||||
(lib "servlet.ss" "web-server"))
|
||||
|
||||
(provide interface-version timeout start)
|
||||
|
||||
|
||||
(define interface-version 'v1)
|
||||
(define timeout +inf.0)
|
||||
|
||||
|
||||
(define items
|
||||
`(("Help Desk" "How to get help" "/servlets/howtouse.ss")
|
||||
("Software" "How to run programs" "/servlets/howtoscheme.ss"
|
||||
("Tour" ,(get-manual-index "tour"))
|
||||
("Languages" "/servlets/scheme/what.ss")
|
||||
("Manuals" "/servlets/manuals.ss")
|
||||
("Release" "/servlets/releaseinfo.ss")
|
||||
,(manual-entry "drscheme" "frequently asked questions" "FAQ"))
|
||||
("Program Design" "Learning to program in Scheme" "/servlets/howtoprogram.ss"
|
||||
("Teachpacks" "/servlets/teachpacks.ss")
|
||||
("Why DrScheme?" "/servlets/research/why.ss"))
|
||||
("External Resources" "Additional information" "/servlets/resources.ss"
|
||||
("TeachScheme!" "/servlets/resources/teachscheme.ss")
|
||||
("Libraries" "/servlets/resources/libext.ss")
|
||||
("Mailing Lists" "/servlets/resources/maillist.ss"))))
|
||||
|
||||
(define (item i)
|
||||
(let ([title (car i)] [subtitle (cadr i)] [url (caddr i)] [subs (cdddr i)])
|
||||
`(LI (B (A ([HREF ,url]) ,title)) ": " ,subtitle
|
||||
,@(if (null? subs)
|
||||
'()
|
||||
`((BR) nbsp nbsp nbsp nbsp nbsp nbsp
|
||||
(FONT ([SIZE "-2"])
|
||||
,@(apply append
|
||||
(map (lambda (s)
|
||||
(let ([s (if (and (pair? s) (symbol? (car s)))
|
||||
s
|
||||
`(A ([HREF ,(cadr s)]) ,(car s)))])
|
||||
`(,s ", ")))
|
||||
subs))
|
||||
"...")))
|
||||
(BR) (BR))))
|
||||
|
||||
(define (start initial-request)
|
||||
(report-errors-to-browser send/finish)
|
||||
`(html
|
||||
(head (title "PLT Help Desk"))
|
||||
(BODY
|
||||
(TABLE ((CELLSPACING "0")
|
||||
(CELLPADDING "0"))
|
||||
(TR
|
||||
(TD
|
||||
(H1 "PLT Help Desk")
|
||||
(UL
|
||||
(LI
|
||||
(B
|
||||
(A ((HREF "/servlets/howtouse.ss")) "Help Desk"))
|
||||
": How to get help"))
|
||||
(UL
|
||||
(LI
|
||||
(B
|
||||
(A ((HREF "/servlets/howtoscheme.ss")) "Software"))
|
||||
": How to run programs"
|
||||
(BR)
|
||||
'nbsp 'nbsp 'nbsp 'nbsp 'nbsp 'nbsp
|
||||
(FONT ((SIZE "-2"))
|
||||
(a ((href ,(get-manual-index "tour"))) "Tour") ", "
|
||||
(A ((HREF "/servlets/scheme/what.ss")) "Languages") ", "
|
||||
(A ((HREF "/servlets/manuals.ss")) "Manuals") ", "
|
||||
(A ((HREF "/servlets/releaseinfo.ss")) "Release") ", "
|
||||
,(manual-entry "drscheme"
|
||||
"frequently asked questions"
|
||||
"FAQ") ", "
|
||||
"...")))
|
||||
(UL
|
||||
(LI
|
||||
(B
|
||||
(A ((HREF "/servlets/howtoprogram.ss")) "Program Design"))
|
||||
": Learning to program in Scheme"
|
||||
(BR) 'nbsp 'nbsp 'nbsp 'nbsp 'nbsp 'nbsp
|
||||
(FONT ((SIZE "-2"))
|
||||
(a ((href ,(get-manual-index "teachpack"))) "Teachpacks")
|
||||
", "
|
||||
(A ((HREF "/servlets/research/why.ss")) "Why DrScheme?") ", "
|
||||
"...")))
|
||||
|
||||
(UL
|
||||
(LI
|
||||
(B
|
||||
(A ((HREF "/servlets/resources.ss")) "External Resources"))
|
||||
": Additional information"
|
||||
|
||||
(BR)
|
||||
'nbsp 'nbsp 'nbsp 'nbsp 'nbsp 'nbsp
|
||||
(FONT ((SIZE "-2"))
|
||||
(A ((HREF "/servlets/resources/teachscheme.ss")) "TeachScheme!") ", "
|
||||
(A ((HREF "/servlets/resources/libext.ss")) "Libraries") ", "
|
||||
(A ((HREF "/servlets/resources/maillist.ss")) "Mailing Lists") ", "
|
||||
"...")))
|
||||
(P)
|
||||
'nbsp 'nbsp 'nbsp
|
||||
(B
|
||||
(A ((HREF "/servlets/acknowledge.ss"))
|
||||
(FONT ((COLOR "limegreen"))
|
||||
"Acknowledgements")))
|
||||
'nbsp 'nbsp 'nbsp 'nbsp
|
||||
(B
|
||||
(A ((mzscheme
|
||||
"((dynamic-require '(lib |bug-report.ss| |help|) 'help-desk:report-bug))"))
|
||||
(FONT ((COLOR "limegreen"))
|
||||
"Send a bug report")))
|
||||
(P)
|
||||
(I "Version: " ,(plt-version)))))))))
|
||||
(body
|
||||
(table ([cellspacing "0"] [cellpadding "0"])
|
||||
(TR (TD (H1 "PLT Help Desk")
|
||||
(UL ,@(map item items))
|
||||
(P) nbsp nbsp nbsp
|
||||
(B (A ((HREF "/servlets/acknowledge.ss"))
|
||||
(FONT ([COLOR "forestgreen"]) "Acknowledgements")))
|
||||
nbsp nbsp nbsp nbsp
|
||||
(B (A ((mzscheme
|
||||
"((dynamic-require '(lib |bug-report.ss| |help|) 'help-desk:report-bug))"))
|
||||
(FONT ([COLOR "forestgreen"]) "Send a bug report")))
|
||||
(P)
|
||||
(I "Version: " ,(plt-version)))))))))
|
||||
|
|
|
@ -1,72 +1,67 @@
|
|||
(module what mzscheme
|
||||
(require "../private/util.ss"
|
||||
"../../private/manuals.ss")
|
||||
(require "../private/headelts.ss")
|
||||
|
||||
(require (lib "servlet.ss" "web-server"))
|
||||
"../../private/manuals.ss"
|
||||
"../private/headelts.ss"
|
||||
(lib "servlet.ss" "web-server"))
|
||||
(provide interface-version timeout start)
|
||||
(define interface-version 'v1)
|
||||
(define timeout +inf.0)
|
||||
|
||||
|
||||
(define (start initial-request)
|
||||
|
||||
(define stupid-internal-define-syntax (report-errors-to-browser send/finish))
|
||||
|
||||
|
||||
(define stupid-internal-define-syntax
|
||||
(report-errors-to-browser send/finish))
|
||||
|
||||
(define (standout-text s)
|
||||
(color-with "forestgreen"
|
||||
`(B ,s)))
|
||||
|
||||
`(HTML
|
||||
(HEAD ,hd-css
|
||||
,@hd-links
|
||||
(TITLE "Scheme Languages"))
|
||||
(BODY
|
||||
(H1 "Scheme Languages")
|
||||
(A ((NAME "scheme") (VALUE "Language Family")))
|
||||
(A ((NAME "r5rs") (VALUE "r5rs")))
|
||||
(A ((NAME "language levels") (VALUE "language levels")))
|
||||
"From the introduction of "
|
||||
,(main-manual-page "r5rs") " (R5RS):"
|
||||
(color-with "forestgreen" `(B ,s)))
|
||||
|
||||
`(HTML
|
||||
(HEAD ,hd-css ,@hd-links (TITLE "Scheme Languages"))
|
||||
(BODY
|
||||
(H1 "Scheme Languages")
|
||||
(A ([NAME "scheme"] [VALUE "Language Family"]))
|
||||
(A ([NAME "r5rs"] [VALUE "r5rs"]))
|
||||
(A ([NAME "language levels"] [VALUE "language levels"]))
|
||||
"From the introduction of " ,(main-manual-page "r5rs") " (R5RS):"
|
||||
(P)
|
||||
(DL
|
||||
(DD
|
||||
"Scheme is a statically scoped and properly "
|
||||
"tail-recursive dialect of the Lisp programming "
|
||||
"language [...] designed to have an exceptionally "
|
||||
"clear and simple semantics and few different ways "
|
||||
"to form expressions. A wide variety of programming "
|
||||
"paradigms, including imperative, functional, and "
|
||||
"message passing styles, find convenient expression "
|
||||
"in Scheme."))
|
||||
(DL (DD "Scheme is a statically scoped and properly "
|
||||
"tail-recursive dialect of the Lisp programming "
|
||||
"language [...] designed to have an exceptionally "
|
||||
"clear and simple semantics and few different ways "
|
||||
"to form expressions. A wide variety of programming "
|
||||
"paradigms, including imperative, functional, and "
|
||||
"message passing styles, find convenient expression "
|
||||
"in Scheme."))
|
||||
(P)
|
||||
"DrScheme supports many dialects of Scheme. "
|
||||
"The following dialects are specifically designed for "
|
||||
"teaching computer science. In DrScheme's "
|
||||
(A ((HREF "/servlets/scheme/what.ss#lang-sel")) "language selection menu")
|
||||
(A ([HREF "/servlets/scheme/what.ss#lang-sel"])
|
||||
"language selection menu")
|
||||
", they are found under the heading " (B "How to Design Programs") "."
|
||||
(UL
|
||||
(LI
|
||||
(A ((NAME "beg") (VALUE "Beginning Student language")))
|
||||
(UL
|
||||
(LI
|
||||
(A ([NAME "beg"] [VALUE "Beginning Student language"]))
|
||||
,(standout-text "Beginning Student")
|
||||
" is a pedagogical version of Scheme "
|
||||
"that is tailored for beginning computer "
|
||||
"science students.")
|
||||
(LI
|
||||
(A ((NAME "begla") (VALUE "Beginning Student with List Abbreviations language")))
|
||||
"science students.")
|
||||
(LI
|
||||
(A ([NAME "begla"] [VALUE "Beginning Student with List Abbreviations language"]))
|
||||
,(standout-text "Beginning Student with List Abbreviations")
|
||||
" extends Beginning Student with convenient "
|
||||
"(but potentially confusing) ways to write lists, "
|
||||
"including quasiquote.")
|
||||
(LI
|
||||
(A ((NAME "int") (VALUE "Intermediate Student language")))
|
||||
"including quasiquote.")
|
||||
(LI
|
||||
(A ([NAME "int"] [VALUE "Intermediate Student language"]))
|
||||
,(standout-text "Intermediate Student")
|
||||
" adds local bindings and higher-order functions.")
|
||||
(LI
|
||||
(A ((NAME "intlam") (VALUE "Intermediate Student with Lambda language")))
|
||||
" adds local bindings and higher-order functions.")
|
||||
(LI
|
||||
(A ([NAME "intlam"] [VALUE "Intermediate Student with Lambda language"]))
|
||||
,(standout-text "Intermediate Student with Lambda")
|
||||
" adds anonymous functions.")
|
||||
(LI
|
||||
(A ((NAME "adv") (VALUE "Advanced Student language")))
|
||||
" adds anonymous functions.")
|
||||
(LI
|
||||
(A ([NAME "adv"] [VALUE "Advanced Student language"]))
|
||||
,(standout-text "Advanced Student")
|
||||
" adds mutable state."))
|
||||
"The "
|
||||
|
@ -74,26 +69,27 @@
|
|||
" language is designed for use with the MIT Press "
|
||||
"textbook with that name."
|
||||
(P)
|
||||
"Other dialects are designed for practicing programmers. "
|
||||
"The " (A ((NAME "r5rs2") (VALUE "R5RS Scheme language")))
|
||||
"Other dialects are designed for practicing programmers. "
|
||||
"The " (A ([NAME "r5rs2"] [VALUE "R5RS Scheme language"]))
|
||||
,(standout-text "R5RS")
|
||||
" language is a standard dialect of Scheme that is "
|
||||
"defined by the "
|
||||
"defined by the "
|
||||
,(main-manual-page "r5rs") ". "
|
||||
(A ((NAME "full") (VALUE "PLT Scheme language")))
|
||||
(A ([NAME "full"] [VALUE "PLT Scheme language"]))
|
||||
"In DrScheme's "
|
||||
(A ((HREF "/servlets/scheme/what.ss#lang-sel")) "language selection menu")
|
||||
(A ([HREF "/servlets/scheme/what.ss#lang-sel"])
|
||||
"language selection menu")
|
||||
", the following languages "
|
||||
"are found under the heading " (B "PLT") ":"
|
||||
(UL
|
||||
(LI
|
||||
(LI
|
||||
,(standout-text "Textual (MzScheme)")
|
||||
" is a superset of R5RS Scheme. "
|
||||
"In addition to the the base Scheme language, "
|
||||
"PLT Scheme provides exceptions, threads, "
|
||||
"objects, modules, components, regular expressions, "
|
||||
"TCP support, filesystem utilities, and process "
|
||||
"control operations. This language is defined in "
|
||||
"control operations. This language is defined in "
|
||||
,(main-manual-page "mzscheme")
|
||||
". ")
|
||||
(LI
|
||||
|
@ -102,17 +98,16 @@
|
|||
"and adds a graphical toolbox, "
|
||||
"described in "
|
||||
,(main-manual-page "mred") ".")
|
||||
(LI
|
||||
,(standout-text "Pretty Big")
|
||||
" is a superset of the "
|
||||
(standout-text "Graphical (MrEd)")
|
||||
" language, and adds forms from the "
|
||||
(standout-text "Pretty Big")
|
||||
" language."
|
||||
" For those forms that are in both languages,"
|
||||
" Pretty Big behaves like Graphical (MrEd)."))
|
||||
(LI ,(standout-text "Pretty Big")
|
||||
" is a superset of the "
|
||||
(standout-text "Graphical (MrEd)")
|
||||
" language, and adds forms from the "
|
||||
(standout-text "Pretty Big")
|
||||
" language."
|
||||
" For those forms that are in both languages,"
|
||||
" Pretty Big behaves like Graphical (MrEd)."))
|
||||
"The "
|
||||
(A ((NAME "module") (VALUE "module")))
|
||||
(A ([NAME "module"] [VALUE "module"]))
|
||||
,(standout-text "module")
|
||||
" language supports development using PLT Scheme's "
|
||||
,(manual-entry "mzscheme" "modules" `(CODE "module"))
|
||||
|
@ -122,18 +117,18 @@
|
|||
"See "
|
||||
,(manual-entry "drscheme" "language levels" "the DrScheme manual")
|
||||
" for further details on the languages, "
|
||||
"especially the teaching languages."
|
||||
"especially the teaching languages."
|
||||
(P)
|
||||
"DrScheme's set of languages can be extended, "
|
||||
"so the above list mentions only the languages installed "
|
||||
"by default. "
|
||||
"Documentation for all languages is available "
|
||||
"through the "
|
||||
(A ((HREF "/servlets/manuals.ss")) "manuals page") "."
|
||||
"through the "
|
||||
(A ([HREF "/servlets/manuals.ss"]) "manuals page") "."
|
||||
(P)
|
||||
(A ((NAME "lang-sel") (VALUE "language, setting")))
|
||||
(A ([NAME "lang-sel"] [VALUE "language, setting"]))
|
||||
"DrScheme's default language is Beginning Student. "
|
||||
"To change the language, select the "
|
||||
"To change the language, select the "
|
||||
(B "Choose Language...")
|
||||
" item in the "
|
||||
(B "Language") " menu."))))
|
||||
" item in the "
|
||||
(B "Language") " menu."))))
|
||||
|
|
Loading…
Reference in New Issue
Block a user