Sync up to trunk.

svn: r18291
This commit is contained in:
Stevie Strickland 2010-02-23 07:25:24 +00:00
commit 8cc22294ff
8 changed files with 3093 additions and 49 deletions

View File

@ -70,16 +70,18 @@
(define (get-translating-acks)
(string-append
"Thanks to "
"ChongKai Zhu, "
"Ian Barland, "
"Biep Durieux, "
"Tim Hanson, "
"Chihiro Kuraya, "
"Philippe Meunier, "
"Irina Mintiy, "
"Sergey Semerikov, "
"Jens Axel Søgaard, "
"Francisco Solsona, "
"Mike Sperber, "
"Reini Urban, "
"ChongKai Zhu, "
"and "
"Paolo Zoppetti "
"for their help translating DrScheme's GUI to other languages."))

View File

@ -358,7 +358,7 @@ if we later change @scheme[handle] so that it, say, opens a file, then
the file handles will also belong to @scheme[cust], so they will be
reliably closed when @scheme[cust] is shut down.
In fact, it's a good idea to change @scheme[serve] to that it uses a
In fact, it's a good idea to change @scheme[serve] so that it uses a
custodian, too:
@schemeblock[

File diff suppressed because it is too large Load Diff

View File

@ -11,7 +11,9 @@
(prefix portuguese: "portuguese-string-constants.ss")
(prefix japanese: "japanese-string-constants.ss")
(prefix traditional-chinese: "traditional-chinese-string-constants.ss")
(prefix simplified-chinese: "simplified-chinese-string-constants.ss"))
(prefix simplified-chinese: "simplified-chinese-string-constants.ss")
(prefix russian: "russian-string-constants.ss")
(prefix ukrainian: "ukrainian-string-constants.ss"))
(require mzlib/file
mzlib/etc
@ -26,20 +28,22 @@
;; table : (listof (list symbol regexp regexp))
;; this table indicates what the default value of the natural language
;; preference is. the first regexp is used under Windows and the second
;; is used on other platofmr.s All regexps are compared to the result
;; is used on other platforms. All regexps are compared to the result
;; of (system-language+country)
(define table
'((english #rx"^en_" #rx"^English_")
(spanish #rx"^es_" #rx"^Espanol_")
(german #rx"^de_" #rx"^German_")
(french #rx"^fr_" #rx"French_")
(dutch #rx"nl_" #rx"^Netherlands_")
(danish #rx"^da_DK" #rx"^Danish_")
(portuguese #rx"^pt_" #rx"Portuguese_")
(japanese #rx"^ja_" #rx"^Japan_")
'((english #rx"^en_" #rx"^English_")
(spanish #rx"^es_" #rx"^Espanol_")
(german #rx"^de_" #rx"^German_")
(french #rx"^fr_" #rx"French_")
(dutch #rx"nl_" #rx"^Netherlands_")
(danish #rx"^da_DK" #rx"^Danish_")
(portuguese #rx"^pt_" #rx"Portuguese_")
(japanese #rx"^ja_" #rx"^Japan_")
(traditional-chinese #rx"^zh_(HK|TW)" #rx"Chinese_China")
(simplified-chinese #rx"^zh_CN" #rx"Chinese_(Hong|Taiwan)")))
(simplified-chinese #rx"^zh_CN" #rx"Chinese_(Hong|Taiwan)")
(russian #rx"^ru_" #rx"^Russian_")
(ukrainian #rx"^uk_" #rx"^Ukrainian_")))
;; default-language : -> symbol
;; uses `table' and system-language+contry to find what language to start with
(define (default-language)
@ -67,7 +71,7 @@
(define-struct sc (language-name constants ht))
(define available-string-constant-sets
(list
(list
(make-sc 'english english:string-constants #f)
(make-sc 'spanish spanish:string-constants #f)
(make-sc 'french french:string-constants #f)
@ -77,7 +81,9 @@
(make-sc 'portuguese portuguese:string-constants #f)
(make-sc 'japanese japanese:string-constants #f)
(make-sc 'traditional-chinese traditional-chinese:string-constants #f)
(make-sc 'simplified-chinese simplified-chinese:string-constants #f)))
(make-sc 'simplified-chinese simplified-chinese:string-constants #f)
(make-sc 'russian russian:string-constants #f)
(make-sc 'ukrainian ukrainian:string-constants #f)))
(define first-string-constant-set (car available-string-constant-sets))

File diff suppressed because it is too large Load Diff

View File

@ -589,8 +589,7 @@ A typical program does not use all three of these functions. Furthermore,
collection of all these functions is your @tech{world} program.
@centerline{An extended example is available in
@link["http://www.ccs.neu.edu/home/matthias/HtDP2e/"]{How to Design Worlds/2e}.}
@link["http://www.ccs.neu.edu/home/matthias/HtDP2e/"]{How to Design Programs/2e}.}
@; -----------------------------------------------------------------------------
@section[#:tag "world2"]{The World is not Enough}
@ -979,10 +978,7 @@ optional handlers:
(on-tick tick-expr)
#:contracts
([tick-expr (-> (unsyntax @tech{UniverseState}) bundle?)])]{
tell DrScheme to apply @scheme[tick-expr] to the current list of
participating worlds and the current state of the
universe.
}
tell DrScheme to apply @scheme[tick-expr] to the current state of the universe.}
@defform/none[#:literals (on-tick)
(on-tick tick-expr rate-expr)
@ -990,8 +986,7 @@ optional handlers:
([tick-expr (-> (unsyntax @tech{UniverseState}) bundle?)]
[rate-expr (and/c real? positive?)])]{
tell DrScheme to apply @scheme[tick-expr] as above but use the specified
clock tick rate instead of the default.
}
clock tick rate instead of the default.}
}
@item{
@ -1040,7 +1035,7 @@ optional handlers:
In order to explore the workings of a universe, it is necessary to launch a
server and several world programs on one and the same computer. We
recommend launching one server out of one DrScheme tab and as many worlds
as necessary out of second lab. For the latter, the teachpack provides a
as necessary out of a second tab. For the latter, the teachpack provides a
special form.
@defform[(launch-many-worlds expression ...)]{

View File

@ -1,13 +1,8 @@
#lang scheme
(require schemeunit
schemeunit/private/check
schemeunit/private/test-case
schemeunit/private/test-suite
schemeunit/text-ui
xml
scheme/runtime-path)
(require/expose schemeunit/private/test-suite
(current-seed))
(define (validate-xml? xml)
(error 'validate-xml? "Not implemented"))
@ -17,26 +12,14 @@
(define (read-xml/file f)
(with-input-from-file f
(lambda () (read-xml))))
(define (dir->test-suite d name path->test-case)
(make-schemeunit-test-suite
(test-suite
name
(lambda (fdown fup fhere seed)
(parameterize
([current-seed seed]
[current-test-case-around (test-suite-test-case-around fhere)]
[current-check-around (test-suite-check-around fhere)])
(for-each (lambda (p)
(define t (path->test-case (build-path d p)))
(if (schemeunit-test-suite? t)
(current-seed (apply-test-suite t fdown fup fhere (current-seed)))
t))
(filter (lambda (p)
(define ext (filename-extension p))
(and ext (bytes=? #"xml" ext)))
(directory-list d))))
(current-seed))
void
void))
(for ([p (directory-list d)]
#:when (let ([ext (filename-extension p)])
(and ext (bytes=? #"xml" ext))))
(path->test-case (build-path d p)))))
(define (not-wf-dir->test-suite d)
(define (path->test-case f)

View File

@ -388,7 +388,7 @@
(cset-meet (cg e e*) (cg e* e))]
[((Hashtable: s1 s2) (Hashtable: t1 t2))
;; the key is contravariant, the value is invariant
(cset-meet* (list (cg t1 s1) (cg t2 s2) (cg s2 t2)))]
(cset-meet* (list (cg t1 s1) (cg s1 t1) (cg t2 s2) (cg s2 t2)))]
[((Syntax: s1) (Syntax: s2))
(cg s1 s2)]
;; parameters are just like one-arg functions