From 617a6af686f16c96b0061cf5d5885ed45df61cd1 Mon Sep 17 00:00:00 2001 From: Ryan Culpepper Date: Sat, 16 Oct 2010 18:47:32 -0600 Subject: [PATCH 001/441] Alpha version number for the v5.0.2 release --- src/racket/src/schvers.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/racket/src/schvers.h b/src/racket/src/schvers.h index 1f04c3eb3e0..fea4623d185 100644 --- a/src/racket/src/schvers.h +++ b/src/racket/src/schvers.h @@ -13,12 +13,12 @@ consistently.) */ -#define MZSCHEME_VERSION "5.0.1.8" +#define MZSCHEME_VERSION "5.0.1.900" #define MZSCHEME_VERSION_X 5 #define MZSCHEME_VERSION_Y 0 #define MZSCHEME_VERSION_Z 1 -#define MZSCHEME_VERSION_W 8 +#define MZSCHEME_VERSION_W 900 #define MZSCHEME_VERSION_MAJOR ((MZSCHEME_VERSION_X * 100) + MZSCHEME_VERSION_Y) #define MZSCHEME_VERSION_MINOR ((MZSCHEME_VERSION_Z * 1000) + MZSCHEME_VERSION_W) From f29e7130f75d3561e8505829ae025cc84f6d124d Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Sat, 16 Oct 2010 21:08:26 -0400 Subject: [PATCH 002/441] New Racket version 5.0.1.900. --- src/worksp/gracket/gracket.manifest | 2 +- src/worksp/gracket/gracket.rc | 8 ++++---- src/worksp/mzcom/mzcom.rc | 8 ++++---- src/worksp/mzcom/mzobj.rgs | 6 +++--- src/worksp/racket/racket.rc | 8 ++++---- src/worksp/starters/start.rc | 8 ++++---- 6 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/worksp/gracket/gracket.manifest b/src/worksp/gracket/gracket.manifest index 09a45493a53..ae7eb2b7d5a 100644 --- a/src/worksp/gracket/gracket.manifest +++ b/src/worksp/gracket/gracket.manifest @@ -1,7 +1,7 @@ Date: Sat, 16 Oct 2010 07:29:49 -0600 Subject: [PATCH 003/441] fix an interaction of `dynamic-wind' pre thunks and composable continuations Merge to 5.0.2 (cherry picked from commit caa747e5c65a45f59b7b60908f7553cdfe89e83a) --- collects/tests/racket/prompt-tests.rktl | 162 +++++++++++++++++++++++- src/racket/src/fun.c | 53 +++++--- 2 files changed, 199 insertions(+), 16 deletions(-) diff --git a/collects/tests/racket/prompt-tests.rktl b/collects/tests/racket/prompt-tests.rktl index 60c9bcf5f30..67bc988b32e 100644 --- a/collects/tests/racket/prompt-tests.rktl +++ b/collects/tests/racket/prompt-tests.rktl @@ -1739,6 +1739,167 @@ (continuation-mark-set->list (current-continuation-marks) 'x))))) a))))) + +;; ---------------------------------------- +;; Tests related to cotinuations that capture pre-thunk frames + +;; Simple case: +(let ([t + (lambda (wrapper) + (test + '(pre1 mid1 post1 pre2 mid1 post1 post2) + 'cc1 + (let ([k #f] + [recs null]) + (define (queue v) (set! recs (cons v recs))) + (call-with-continuation-prompt + (lambda () + (dynamic-wind + (lambda () + (queue 'pre1) + (call-with-composable-continuation + (lambda (k0) + (set! k k0)))) + (lambda () (queue 'mid1)) + (lambda () (queue 'post1))))) + (wrapper + (lambda () + (dynamic-wind + (lambda () (queue 'pre2)) + (lambda () (k)) + (lambda () (queue 'post2))))) + (reverse recs))))]) + (t (lambda (f) (f))) + (t call-with-continuation-prompt)) + +;; Mix in some extra dynamic winds: +(test + '(pre1 mid1 post1 pre2 mid1 post1 post2 pre2 mid1 post1 post2) + 'cc2 + (let ([k #f] + [k2 #f] + [recs null]) + (define (queue v) (set! recs (cons v recs))) + (call-with-continuation-prompt + (lambda () + (call-with-continuation-prompt + (lambda () + (dynamic-wind + (lambda () + (queue 'pre1) + ((call-with-composable-continuation + (lambda (k0) + (set! k k0) + void)))) + (lambda () (queue 'mid1)) + (lambda () (queue 'post1))))) + (let/ec esc + (dynamic-wind + (lambda () (queue 'pre2)) + (lambda () + (k (lambda () + (let/cc k0 + (set! k2 k0)))) + (esc)) + (lambda () (queue 'post2)))))) + (call-with-continuation-prompt + (lambda () (k2))) + (reverse recs))) + +;; Even more dynamic-winds: +(test + '(pre0 pre1 mid1 post1 post0 + pre1.5 pre2 pre0 mid1 post1 post0 post2 post1.5 + pre3 pre1.5 pre2 pre0 mid1 post1 post0 post2 post1.5 post3) + 'cc3 + (let ([k #f] + [k2 #f] + [recs null]) + (define (queue v) (set! recs (cons v recs))) + (call-with-continuation-prompt + (lambda () + (dynamic-wind + (lambda () + (queue 'pre0)) + (lambda () + (dynamic-wind + (lambda () + (queue 'pre1) + ((call-with-composable-continuation + (lambda (k0) + (set! k k0) + void)))) + (lambda () (queue 'mid1)) + (lambda () (queue 'post1)))) + (lambda () + (queue 'post0))))) + (call-with-continuation-prompt + (lambda () + (dynamic-wind + (lambda () (queue 'pre1.5)) + (lambda () + (dynamic-wind + (lambda () (queue 'pre2)) + (lambda () (k (lambda () + (call-with-composable-continuation + (lambda (k0) + (set! k2 k0)))))) + (lambda () (queue 'post2)))) + (lambda () (queue 'post1.5))))) + (call-with-continuation-prompt + (lambda () + (dynamic-wind + (lambda () (queue 'pre3)) + (lambda () (k2)) + (lambda () (queue 'post3))))) + (reverse recs))) + +;; Arrange for the captured pre-thunk to trigger extra cloning +;; of dynmaic wind records in continuation application: +(test + '(pre1 pre2 post2 post1 pre1 pre2 post2 post1 last pre2 post2 post1) + 'cc4 + (let ([k #f] + [k2 #f] + [recs null] + [tag (make-continuation-prompt-tag)]) + (define (queue v) (set! recs (cons v recs))) + (call-with-continuation-prompt + (lambda () + (dynamic-wind + (lambda () + (queue 'pre1) + ((call-with-composable-continuation + (lambda (k0) + (set! k k0) + void)))) + (lambda () + (dynamic-wind + (lambda () (queue 'pre2)) + (lambda () + ((call-with-composable-continuation + (lambda (k0) + (set! k2 k0) + void)))) + (lambda () (queue 'post2)))) + (lambda () (queue 'post1))))) + (let ([k3 + (call-with-continuation-prompt + (lambda () + (call-with-continuation-prompt + (lambda () + (k2 (lambda () + (call-with-composable-continuation + (lambda (k0) + (abort-current-continuation tag (lambda () k0))))))))) + tag)]) + (queue 'last) + (call-with-continuation-prompt + (lambda () + (k void)) + tag)) + (reverse recs))) + ;; ---------------------------------------- ;; Try long chain of composable continuations @@ -1804,4 +1965,3 @@ (k (lambda () (abort-current-continuation (default-continuation-prompt-tag) (lambda () 45)))))))) - diff --git a/src/racket/src/fun.c b/src/racket/src/fun.c index 2efcb55a081..a5841f9c2a0 100644 --- a/src/racket/src/fun.c +++ b/src/racket/src/fun.c @@ -5141,7 +5141,7 @@ static Scheme_Overflow *clone_overflows(Scheme_Overflow *overflow, void *limit, } static Scheme_Dynamic_Wind *clone_dyn_wind(Scheme_Dynamic_Wind *dw, - Scheme_Object *limit_prompt_tag, int limit_depth, + Scheme_Object *limit_prompt_tag, int limit_depth, int limit_count, Scheme_Dynamic_Wind *tail, int keep_tail, int composable) { @@ -5153,6 +5153,8 @@ static Scheme_Dynamic_Wind *clone_dyn_wind(Scheme_Dynamic_Wind *dw, break; if (composable && limit_prompt_tag && (dw->prompt_tag == limit_prompt_tag)) break; + if (cnt == limit_count) + break; scheme_ensure_dw_id(dw); naya = MALLOC_ONE_RT(Scheme_Dynamic_Wind); memcpy(naya, dw, sizeof(Scheme_Dynamic_Wind)); @@ -5525,13 +5527,15 @@ static MZ_MARK_STACK_TYPE exec_dyn_wind_pres(Scheme_Dynamic_Wind_List *dwl, { Scheme_Thread *p = scheme_current_thread; int old_cac = scheme_continuation_application_count; + int need_clone = 0; + Scheme_Dynamic_Wind *dw; for (; dwl; dwl = dwl->next) { if (dwl->dw->pre) { - p->dw = dwl->dw->prev; p->next_meta = dwl->meta_depth + dwl->dw->next_meta; if (dwl->meta_depth > 0) { - scheme_apply_dw_in_meta(dwl->dw, 0, dwl->meta_depth, cont); + if (!skip_dws) + scheme_apply_dw_in_meta(dwl->dw, 0, dwl->meta_depth, cont); } else { /* Restore the needed part of the mark stack for this dynamic-wind context. Clear cached info on restore @@ -5555,6 +5559,19 @@ static MZ_MARK_STACK_TYPE exec_dyn_wind_pres(Scheme_Dynamic_Wind_List *dwl, } p = scheme_current_thread; } + + if (p->dw != dwl->dw->prev) { + /* something happened in the pre-thunk to change the + continuation that we're building */ + need_clone = 1; + } + + if (need_clone) { + dw = clone_dyn_wind(dwl->dw, NULL, -1, 1, p->dw, 0, 0); + dw->next_meta = p->next_meta; + } else + dw = dwl->dw; + p->dw = dw; } return copied_cms; } @@ -5603,7 +5620,7 @@ static Scheme_Cont *grab_continuation(Scheme_Thread *p, int for_prompt, int comp else if (prompt) { Scheme_Dynamic_Wind *dw; if (p->dw) { - dw = clone_dyn_wind(p->dw, prompt_tag, -1, NULL, 0, composable); + dw = clone_dyn_wind(p->dw, prompt_tag, -1, -1, NULL, 0, composable); cont->dw = dw; cont->next_meta = p->next_meta; } else @@ -6031,7 +6048,7 @@ static void restore_continuation(Scheme_Cont *cont, Scheme_Thread *p, int for_pr p->next_meta = common_next_meta; if (p->dw) { /* can be empty if there's only the implicit prompt */ /* also, there may be no dw with prompt_tag if there's only the implicit prompt */ - all_dw = clone_dyn_wind(p->dw, cont->prompt_tag, -1, NULL, 1, 0); + all_dw = clone_dyn_wind(p->dw, cont->prompt_tag, -1, -1, NULL, 1, 0); for (dw = all_dw; dw && !SAME_OBJ(dw->prompt_tag, cont->prompt_tag); dw = dw->prev) { p->dw = p->dw->prev; } @@ -6048,8 +6065,12 @@ static void restore_continuation(Scheme_Cont *cont, Scheme_Thread *p, int for_pr if (cont->dw) { int meta_depth; + /* The allow_dw chain that we build up here is actually + premature, in that the tail to splice onto may change + in pre-thunks. It doesn't usually happen, and we can + detect that case in exec_dyn_wind_pres() in re-clone. */ common_depth = (p->dw ? p->dw->depth : -1); - all_dw = clone_dyn_wind(cont->dw, NULL, cont->common_dw_depth, p->dw, 0, 0); + all_dw = clone_dyn_wind(cont->dw, NULL, cont->common_dw_depth, -1, p->dw, 0, 0); if ((common_depth != -1) && (common_depth != all_dw->depth)) { /* Move p->next_meta to the last added dw's next_meta. */ @@ -6077,7 +6098,6 @@ static void restore_continuation(Scheme_Cont *cont, Scheme_Thread *p, int for_pr copied_cms = exec_dyn_wind_pres(dwl, dwl_len, cont, copied_cms, clear_cm_caches, &sub_conts, cont->skip_dws); p = scheme_current_thread; - p->dw = all_dw; p->next_meta = cont->next_meta; } } @@ -8734,6 +8754,17 @@ Scheme_Object *scheme_dynamic_wind(void (*pre)(void *), p = scheme_current_thread; + if (pre) { + ASSERT_SUSPEND_BREAK_ZERO(); + p->suspend_break++; + pre(data); + p = scheme_current_thread; + --p->suspend_break; + } + + /* set up `dw' after pre(), in case a continuation + is captured in pre() and composed later */ + dw = MALLOC_ONE_RT(Scheme_Dynamic_Wind); #ifdef MZTAG_REQUIRED dw->type = scheme_rt_dyn_wind; @@ -8749,14 +8780,6 @@ Scheme_Object *scheme_dynamic_wind(void (*pre)(void *), dw->depth = 0; dw->next_meta = p->next_meta; - if (pre) { - ASSERT_SUSPEND_BREAK_ZERO(); - p->suspend_break++; - pre(data); - p = scheme_current_thread; - --p->suspend_break; - } - p->next_meta = 0; p->dw = dw; From 0b8537e24670fee2cf97c58b71d714b15661707c Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Sat, 16 Oct 2010 22:24:16 -0500 Subject: [PATCH 004/441] fixed mangled test case (cherry picked from commit 93260c7dd0d2d9a846121b140cecc6693e48942a) --- collects/redex/tests/tl-test.rkt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/collects/redex/tests/tl-test.rkt b/collects/redex/tests/tl-test.rkt index f071a0c17df..3684c5d138e 100644 --- a/collects/redex/tests/tl-test.rkt +++ b/collects/redex/tests/tl-test.rkt @@ -564,10 +564,9 @@ (v .... 2)) (define-metafunction/extension f M g : v -> v - [(g 2) 2])) + [(g 2) 2]) -(current-traced-metafunctions 'all) -(term (g (2))) + (term (g (2)))) (let () (define-metafunction empty-language From fef3bc2b7748551adf2ca8f576029b6ccb2af173 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sun, 17 Oct 2010 06:34:06 -0600 Subject: [PATCH 005/441] initialize `make-flvector' result with default 0.0s Merge to 5.0.2 (cherry picked from commit 51f20afd0b4d93b27645351dbe8b3e903dd4e0b6) --- src/racket/src/number.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/racket/src/number.c b/src/racket/src/number.c index 455eb1009f2..a3a0020ff20 100644 --- a/src/racket/src/number.c +++ b/src/racket/src/number.c @@ -3321,6 +3321,8 @@ static Scheme_Object *do_make_flvector (const char *name, int as_shared, int arg { Scheme_Double_Vector *vec; long size; + double d; + int i; if (SCHEME_INTP(argv[0])) size = SCHEME_INT_VAL(argv[0]); @@ -3348,14 +3350,14 @@ static Scheme_Object *do_make_flvector (const char *name, int as_shared, int arg #endif vec = scheme_alloc_flvector(size); - if (argc > 1) { - int i; - double d = SCHEME_DBL_VAL(argv[1]); - for (i = 0; i < size; i++) { - vec->els[i] = d; - } + if (argc > 1) + d = SCHEME_DBL_VAL(argv[1]); + else + d = 0.0; + for (i = 0; i < size; i++) { + vec->els[i] = d; } - + return (Scheme_Object *)vec; } From 83dfd8850512025f161e2de6e9890f0eaaeec547 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sun, 17 Oct 2010 08:51:18 -0600 Subject: [PATCH 006/441] fix --disable-jit plus --disable-futures Merge to 5.0.2 (cherry picked from commit aaeb21e0cc165a53fb8577fe35212af1b1b53876) --- src/racket/src/fun.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/racket/src/fun.c b/src/racket/src/fun.c index a5841f9c2a0..a32297bd888 100644 --- a/src/racket/src/fun.c +++ b/src/racket/src/fun.c @@ -8358,6 +8358,8 @@ static Scheme_Object *continuation_prompt_available(int argc, Scheme_Object *arg JIT-generated code. The code here manages capture and restore for the runstack and mark stack, while the rest is in the JIT. */ +#ifdef MZ_USE_JIT + struct Scheme_Lightweight_Continuation { MZTAG_IF_REQUIRED /* scheme_rt_lightweight_cont */ Scheme_Current_LWC *saved_lwc; @@ -8639,6 +8641,12 @@ int scheme_push_marks_from_thread(Scheme_Thread *p2, Scheme_Cont_Frame_Data *d) return 0; } +#else + +void scheme_init_thread_lwc(void) XFORM_SKIP_PROC { } + +#endif + /*========================================================================*/ /* dynamic-wind */ /*========================================================================*/ From 9610515529af5eb128c9d46e70de3b15967c679d Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sun, 17 Oct 2010 08:53:44 -0600 Subject: [PATCH 007/441] fix 3m problem with --disable-jit and --disable-futures Merge to 5.0.2 (cherry picked from commit 68079d738d89324de0e4dfc1622a193239ab4b4f) --- src/racket/src/fun.c | 2 ++ src/racket/src/mzmark.c | 4 ++++ src/racket/src/mzmarksrc.c | 4 ++++ 3 files changed, 10 insertions(+) diff --git a/src/racket/src/fun.c b/src/racket/src/fun.c index a32297bd888..81d136d4610 100644 --- a/src/racket/src/fun.c +++ b/src/racket/src/fun.c @@ -9823,7 +9823,9 @@ static void register_traversers(void) GC_REG_TRAV(scheme_rt_dyn_wind_cell, mark_dyn_wind_cell); GC_REG_TRAV(scheme_rt_dyn_wind_info, mark_dyn_wind_info); GC_REG_TRAV(scheme_cont_mark_chain_type, mark_cont_mark_chain); +#ifdef MZ_USE_JIT GC_REG_TRAV(scheme_rt_lightweight_cont, mark_lightweight_cont); +#endif } END_XFORM_SKIP; diff --git a/src/racket/src/mzmark.c b/src/racket/src/mzmark.c index 01ad1b3693f..15b3802ed40 100644 --- a/src/racket/src/mzmark.c +++ b/src/racket/src/mzmark.c @@ -3319,6 +3319,8 @@ static int mark_cont_mark_chain_FIXUP(void *p, struct NewGC *gc) { #define mark_cont_mark_chain_IS_CONST_SIZE 1 +#ifdef MZ_USE_JIT + static int mark_lightweight_cont_SIZE(void *p, struct NewGC *gc) { return gcBYTES_TO_WORDS(sizeof(Scheme_Lightweight_Continuation)); @@ -3352,6 +3354,8 @@ static int mark_lightweight_cont_FIXUP(void *p, struct NewGC *gc) { #define mark_lightweight_cont_IS_CONST_SIZE 1 +#endif + #endif /* FUN */ /**********************************************************************/ diff --git a/src/racket/src/mzmarksrc.c b/src/racket/src/mzmarksrc.c index 6c60c9aa24a..cfd9d10e458 100644 --- a/src/racket/src/mzmarksrc.c +++ b/src/racket/src/mzmarksrc.c @@ -1336,6 +1336,8 @@ mark_cont_mark_chain { gcBYTES_TO_WORDS(sizeof(Scheme_Cont_Mark_Chain)); } +#ifdef MZ_USE_JIT + mark_lightweight_cont { mark: Scheme_Lightweight_Continuation *lw = (Scheme_Lightweight_Continuation *)p; @@ -1349,6 +1351,8 @@ mark_lightweight_cont { gcBYTES_TO_WORDS(sizeof(Scheme_Lightweight_Continuation)); } +#endif + END fun; /**********************************************************************/ From 81a6c4ff435429cd44e4ff65896200f1937511dd Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sun, 17 Oct 2010 19:20:18 -0700 Subject: [PATCH 008/441] fix problem with recursive prints in custom printers Merge to 5.0.2 (cherry picked from commit bb799ee9eea58f3ce3abb75b2aa4214277ae6a0f) --- src/racket/src/print.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/racket/src/print.c b/src/racket/src/print.c index a47332ea70e..f7e5ce2dea5 100644 --- a/src/racket/src/print.c +++ b/src/racket/src/print.c @@ -3983,7 +3983,6 @@ static void custom_write_struct(Scheme_Object *s, Scheme_Hash_Table *ht, a[1] = o; if (notdisplay >= 3) { a[2] = scheme_bin_plus(pp->depth_delta, scheme_make_integer(notdisplay - 3)); - pp->depth_delta = a[2]; } else a[2] = (notdisplay ? scheme_true : scheme_false); From 478425520f98d8608dbe2972a1151aa6ab63c73c Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sun, 17 Oct 2010 19:24:40 -0700 Subject: [PATCH 009/441] fix quotability annotation on HtDP-language structs Merge to 5.0.2 (cherry picked from commit 9f959f247ee12fabcab48796e5340198bbb9755e) --- collects/lang/private/teach.rkt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/collects/lang/private/teach.rkt b/collects/lang/private/teach.rkt index ae4150420c3..d5febf48dfa 100644 --- a/collects/lang/private/teach.rkt +++ b/collects/lang/private/teach.rkt @@ -824,6 +824,8 @@ #,@(map-with-index (lambda (i _) #`(recur (raw-generic-access r #,i))) fields)))) + (cons prop:custom-print-quotable + 'never) (cons prop:custom-write ;; Need a transparent-like printer, but hide auto field. ;; This simplest way to do that is to create an instance From ee41160d08cf5359ae50358b65ea9669dd069dce Mon Sep 17 00:00:00 2001 From: John Clements Date: Sun, 17 Oct 2010 18:10:27 -0700 Subject: [PATCH 010/441] exr -> expr (cherry picked from commit 9f7eeee570b70f24724a8aa1cd8eb486122952ef) --- collects/scribblings/reference/define-struct.scrbl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collects/scribblings/reference/define-struct.scrbl b/collects/scribblings/reference/define-struct.scrbl index 75a963f6516..06360bb8682 100644 --- a/collects/scribblings/reference/define-struct.scrbl +++ b/collects/scribblings/reference/define-struct.scrbl @@ -21,7 +21,7 @@ (code:line #:inspector inspector-expr) (code:line #:auto-value auto-expr) (code:line #:guard guard-expr) - (code:line #:property prop-expr val-exr) + (code:line #:property prop-expr val-expr) (code:line #:transparent) (code:line #:prefab) (code:line #:constructor-name constructor-id) From 6772e78474d1aea2f7276443a789e3ef23877733 Mon Sep 17 00:00:00 2001 From: John Clements Date: Sun, 17 Oct 2010 20:13:34 -0700 Subject: [PATCH 011/441] r/exact-integer?/fixnum/ (cherry picked from commit bb160fbc043f4a6c7a69f0a024592c1160eaceb3) --- collects/scribblings/reference/hashes.scrbl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collects/scribblings/reference/hashes.scrbl b/collects/scribblings/reference/hashes.scrbl index d9c592837ce..07d8ac85fa8 100644 --- a/collects/scribblings/reference/hashes.scrbl +++ b/collects/scribblings/reference/hashes.scrbl @@ -435,7 +435,7 @@ Returns a @tech{fixnum}; for any two calls with @scheme[eqv?] values, the returned number is the same.} -@defproc[(equal-hash-code [v any/c]) exact-integer?]{ +@defproc[(equal-hash-code [v any/c]) fixnum?]{ Returns a @tech{fixnum}; for any two calls with @scheme[equal?] values, the returned number is the same. A hash code is computed even when From ef2e9705395dc5c7fc8fb5c89df87332fc9a1cbf Mon Sep 17 00:00:00 2001 From: Mike Sperber Date: Mon, 18 Oct 2010 09:36:17 +0200 Subject: [PATCH 012/441] For DMdA, follow Robby's fix for htpd-langs.ss. Namely, don't set an uncaught-exception-handler. (cherry picked from commit 2a418b9cf0b8f7e2623d3987f92e9bb8d746dab9) --- collects/deinprogramm/deinprogramm-langs.rkt | 5 ----- 1 file changed, 5 deletions(-) diff --git a/collects/deinprogramm/deinprogramm-langs.rkt b/collects/deinprogramm/deinprogramm-langs.rkt index 8758535a8c2..d3c653b435e 100644 --- a/collects/deinprogramm/deinprogramm-langs.rkt +++ b/collects/deinprogramm/deinprogramm-langs.rkt @@ -191,11 +191,6 @@ ;; hack: the test-engine code knows about the test~object name; we do, too (namespace-set-variable-value! 'test~object (build-test-engine)) - (uncaught-exception-handler - (let ((previous (uncaught-exception-handler))) - (lambda (exc) - (display-results) - (previous exc)))) ;; record signature violations with the test engine (signature-violation-proc (lambda (obj signature message blame) From 33d4a451b33d0f7b9e5eeb48c2f8f4a91a268299 Mon Sep 17 00:00:00 2001 From: Mike Sperber Date: Mon, 18 Oct 2010 09:37:48 +0200 Subject: [PATCH 013/441] Unbreak the test-engine-test.rkt test suite. - signatures are only in ASL now - the error messages for the DMdA languages are different (cherry picked from commit 32455894bce355f48e2159f3104a200afd4e9df9) --- collects/tests/drracket/test-engine-test.rkt | 42 +++++++++----------- 1 file changed, 19 insertions(+), 23 deletions(-) diff --git a/collects/tests/drracket/test-engine-test.rkt b/collects/tests/drracket/test-engine-test.rkt index a61d5fc1117..3f4f9348ff2 100644 --- a/collects/tests/drracket/test-engine-test.rkt +++ b/collects/tests/drracket/test-engine-test.rkt @@ -12,7 +12,7 @@ (define (set-language close-dialog?) (set-language-level! (language) close-dialog?)) -(define (common) +(define (common-test-engine) (test-expression "(check-expect 1 1)" "The test passed!" #:repl-expected "Both tests passed!") @@ -26,7 +26,7 @@ #:check-failures-expected (list (make-check-expect-failure "1" "2" 1 0)))) -(define (common-*sl) +(define (common-signatures-*sl) (test-expression "(: foo Integer) (define foo 5)" "" #:repl-expected "define: cannot redefine name: foo") @@ -36,13 +36,13 @@ #:signature-violations-expected (list (make-signature-violation "\"bar\"" 1 7)))) -(define (common-DMdA) +(define (common-signatures-DMdA) (test-expression "(: foo integer) (define foo 5)" "" - #:repl-expected "define: cannot redefine name: foo") + #:repl-expected "define: Zweite Definition fĂŒr denselben Namen") (test-expression "(: foo integer) (define foo \"bar\")" "" - #:repl-expected "define: cannot redefine name: foo" + #:repl-expected "define: Zweite Definition fĂŒr denselben Namen" #:signature-violations-expected (list (make-signature-violation "\"bar\"" 1 7)))) @@ -65,8 +65,7 @@ (define (beginner) (parameterize ([language (list "How to Design Programs" #rx"Beginning Student(;|$)")]) (prepare-for-test-expression) - (common) - (common-*sl))) + (common-test-engine))) ; @@ -89,8 +88,7 @@ (parameterize ([language (list "How to Design Programs" #rx"Beginning Student with List Abbreviations(;|$)")]) (prepare-for-test-expression) - (common) - (common-*sl))) + (common-test-engine))) ; @@ -112,8 +110,7 @@ (define (intermediate) (parameterize ([language (list "How to Design Programs" #rx"Intermediate Student(;|$)")]) (prepare-for-test-expression) - (common) - (common-*sl))) + (common-test-engine))) ; ; @@ -136,8 +133,7 @@ (parameterize ([language (list "How to Design Programs" #rx"Intermediate Student with lambda(;|$)")]) (prepare-for-test-expression) - (common) - (common-*sl))) + (common-test-engine))) ; @@ -160,33 +156,33 @@ (define (advanced) (parameterize ([language (list "How to Design Programs" #rx"Advanced Student(;|$)")]) (prepare-for-test-expression) - (common) - (common-*sl))) + (common-test-engine) + (common-signatures-*sl))) (define (DMdA-beginner) (parameterize ([language (list "DeinProgramm" #rx"Die Macht der Abstraktion - AnfĂ€nger(;|$)")]) (prepare-for-test-expression) - (common) - (common-DMdA))) + (common-test-engine) + (common-signatures-DMdA))) (define (DMdA-vanilla) (parameterize ([language (list "DeinProgramm" #rx"Die Macht der Abstraktion(;|$)")]) (prepare-for-test-expression) - (common) - (common-DMdA))) + (common-test-engine) + (common-signatures-DMdA))) (define (DMdA-assignments) (parameterize ([language (list "DeinProgramm" #rx"Die Macht der Abstraktion mit Zuweisungen(;|$)")]) (prepare-for-test-expression) - (common) - (common-DMdA))) + (common-test-engine) + (common-signatures-DMdA))) (define (DMdA-advanced) (parameterize ([language (list "DeinProgramm" #rx"Die Macht der Abstraktion - fortgeschritten(;|$)")]) (prepare-for-test-expression) - (common) - (common-DMdA))) + (common-test-engine) + (common-signatures-DMdA))) (define (prepare-for-test-expression) (let ([drs (wait-for-drscheme-frame)]) From c4766f1fafe06120896fd6dae87fe3ad29c6f798 Mon Sep 17 00:00:00 2001 From: Mike Sperber Date: Mon, 18 Oct 2010 10:00:49 +0200 Subject: [PATCH 014/441] Made sperber responsible for `test-engine-tests.rkt'. (cherry picked from commit 0821f694afffbc347644a210cda4327ace1c511d) --- collects/meta/props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collects/meta/props b/collects/meta/props index 7ac191972e6..9cb417b48b2 100755 --- a/collects/meta/props +++ b/collects/meta/props @@ -1411,7 +1411,7 @@ path/s is either such a string or a list of them. "collects/tests/drracket/teaching-lang-coverage.rkt" responsible (robby matthias) drdr:command-line (gracket *) "collects/tests/drracket/teaching-lang-save-file.rkt" responsible (robby matthias) drdr:command-line (gracket *) "collects/tests/drracket/teachpack.rkt" responsible (robby matthias) drdr:command-line (gracket *) -"collects/tests/drracket/test-engine-test.rkt" drdr:command-line (gracket *) +"collects/tests/drracket/test-engine-test.rkt" responsible (sperber) drdr:command-line (gracket *) drdr:timeout 240 "collects/tests/drracket/time-keystrokes.rkt" drdr:command-line (gracket-text "-t" *) "collects/tests/errortrace/alert.rkt" responsible (eli) "collects/tests/framework" responsible (robby) From 9146b803eed91742b19b6bdf50f8bafc9b541768 Mon Sep 17 00:00:00 2001 From: Mike Sperber Date: Mon, 18 Oct 2010 10:10:27 +0200 Subject: [PATCH 015/441] Don't annoy the user with test-engine summaries. Make sure the test-engine summary is only printed when there's something new to say. (cherry picked from commit 43d097cc05f25637abbd1a4f4dbc1f779c7aa778) --- collects/test-engine/test-engine.rkt | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/collects/test-engine/test-engine.rkt b/collects/test-engine/test-engine.rkt index 3cc7fba2a41..d8b25f2562c 100644 --- a/collects/test-engine/test-engine.rkt +++ b/collects/test-engine/test-engine.rkt @@ -126,6 +126,7 @@ (define display-rep #f) (define display-event-space #f) (define silent-mode #t) + (define test-run-since-last-display? #f) (super-instantiate ()) @@ -172,11 +173,13 @@ [(mixed-results) (display-results display-rep display-event-space)])))) (else - (display-disabled port)))) + (display-disabled port))) + (set! test-run-since-last-display? #f)) (define/private (display-success port event-space count) - (clear-results event-space) - (send test-display display-success-summary port count)) + (when test-run-since-last-display? + (clear-results event-space) + (send test-display display-success-summary port count))) (define/public (display-results rep event-space) (cond @@ -190,16 +193,19 @@ [else (send test-display display-results)])) (define/public (display-untested port) - (unless silent-mode - (send test-display display-untested-summary port))) + (when (and test-run-since-last-display? + (not silent-mode)) + (send test-display display-untested-summary port))) (define/public (display-disabled port) - (send test-display display-disabled-summary port)) + (when test-run-since-last-display? + (send test-display display-disabled-summary port))) (define/pubment (initialize-test test) (inner (void) initialize-test test)) (define/pubment (run-test test) + (set! test-run-since-last-display? #t) (inner (void) run-test test)) (define/pubment (run-testcase testcase) From c1746d7649a66a7cf462fc0fb17fd62b5daedfec Mon Sep 17 00:00:00 2001 From: Mike Sperber Date: Mon, 18 Oct 2010 13:30:34 +0200 Subject: [PATCH 016/441] Two more (hopefully last) renamings "Vertrag" -> "Signatur" (i.e. "contract" -> "signature" in German) (cherry picked from commit 17c4cb925461ab9a0a4f117bb17dc682b30420d7) --- collects/deinprogramm/scribblings/DMdA-beginner.scrbl | 2 +- collects/deinprogramm/signature/signature-syntax.rkt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/collects/deinprogramm/scribblings/DMdA-beginner.scrbl b/collects/deinprogramm/scribblings/DMdA-beginner.scrbl index 7101baa3d52..5b3f51cf21e 100644 --- a/collects/deinprogramm/scribblings/DMdA-beginner.scrbl +++ b/collects/deinprogramm/scribblings/DMdA-beginner.scrbl @@ -153,7 +153,7 @@ Diese Form liefert die Signatur mit der Notation @scheme[sig]. Diese Form erklĂ€rt @scheme[sig] zur gĂŒltigen Signatur fĂŒr @scheme[id]. } -@subsection{Eingebaute VertrĂ€ge} +@subsection{Eingebaute Signaturen} @defidform[number]{ Signatur fĂŒr beliebige Zahlen. diff --git a/collects/deinprogramm/signature/signature-syntax.rkt b/collects/deinprogramm/signature/signature-syntax.rkt index bd5b66def5d..e8962846ec0 100644 --- a/collects/deinprogramm/signature/signature-syntax.rkt +++ b/collects/deinprogramm/signature/signature-syntax.rkt @@ -264,7 +264,7 @@ (define-for-syntax (within-signature-syntax-error stx name) (raise-syntax-error #f - "darf nur in VertrĂ€gen vorkommen" + "darf nur in Signaturen vorkommen" name)) ;; Expression -> Expression From 4965622a6395f0a26efff4878ad05a89e176983f Mon Sep 17 00:00:00 2001 From: Ryan Culpepper Date: Mon, 18 Oct 2010 08:40:50 -0600 Subject: [PATCH 017/441] Disabled redex test per Robby's request (no corresponding master commit) --- collects/redex/tests/tl-test.rkt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/collects/redex/tests/tl-test.rkt b/collects/redex/tests/tl-test.rkt index 3684c5d138e..52543da2151 100644 --- a/collects/redex/tests/tl-test.rkt +++ b/collects/redex/tests/tl-test.rkt @@ -549,7 +549,8 @@ (define-metafunction/extension f empty-language [(g any) 2]) (test (term (g 0)) 2)) - + + #: (let () (define-language L (v 1 (v))) @@ -2118,4 +2119,4 @@ (test-bad-equiv-arg test-->>)) (print-tests-passed 'tl-test.ss) - \ No newline at end of file + From d06ef8bc05135b4d3a7f6020c334285b240f6490 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Mon, 18 Oct 2010 13:45:10 -0700 Subject: [PATCH 018/441] fix non-inlined `in-vector' sequence on proxied vectors Merge to 5.0.2 Closes PR 11225 (cherry picked from commit ddca8cd29b005701fb49377521ffe8909ec20a0b) --- collects/racket/private/for.rkt | 2 +- collects/tests/racket/for.rktl | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/collects/racket/private/for.rkt b/collects/racket/private/for.rkt index 1fd601a8c86..654425ab3a3 100644 --- a/collects/racket/private/for.rkt +++ b/collects/racket/private/for.rkt @@ -420,7 +420,7 @@ (define (:vector-gen v start stop step) (values ;; pos->element - (lambda (i) (unsafe-vector-ref v i)) + (lambda (i) (unsafe-vector*-ref v i)) ;; next-pos ;; Minor optimisation. I assume add1 is faster than \x.x+1 (if (= step 1) add1 (lambda (i) (+ i step))) diff --git a/collects/tests/racket/for.rktl b/collects/tests/racket/for.rktl index bcd35ec4ba6..d03c4782276 100644 --- a/collects/tests/racket/for.rktl +++ b/collects/tests/racket/for.rktl @@ -110,6 +110,7 @@ (test-generator [(a b c)] (in-mlist (mlist 'a 'b 'c))) (test-generator [(a b c)] #(a b c)) (test-generator [(a b c)] (in-vector #(a b c))) +(test-generator [(a b c)] (in-vector (chaperone-vector #(a b c) (lambda (vec i val) val) (lambda (vec i val) val)))) (test-generator [(b c d)] (in-vector #(a b c d) 1)) (test-generator [(b c d)] (in-vector #(a b c d e) 1 4)) (test-generator [(b d f)] (in-vector #(a b c d e f g h) 1 7 2)) From 8007ba625691b77e0f175ee3fe8198268a1987fe Mon Sep 17 00:00:00 2001 From: Mike Sperber Date: Tue, 19 Oct 2010 11:56:24 +0200 Subject: [PATCH 019/441] Unbreak the stepper on `check-expect'. All kinds of things expand into (let () ...), so all kinds of things break. (cherry picked from commit fd5e9d4d6342933f0973b080a1bbf28c60107f1f) --- collects/test-engine/racket-tests.rkt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collects/test-engine/racket-tests.rkt b/collects/test-engine/racket-tests.rkt index f2154c25e2a..9a9ca793757 100644 --- a/collects/test-engine/racket-tests.rkt +++ b/collects/test-engine/racket-tests.rkt @@ -106,7 +106,7 @@ #'test-engine)))))))) 'stepper-skipto (append skipto/third ;; let - skipto/third skipto/second ;; unless (it expands into a begin) + skipto/third skipto/third ;; unless (it expands into (if (let-values () ...)) skipto/cdr skipto/third ;; application of insert-test '(syntax-e cdr cdr syntax-e car) ;; lambda ))) From 754dde06117d1eb428e6ae616b30a438b6d90467 Mon Sep 17 00:00:00 2001 From: John Clements Date: Tue, 19 Oct 2010 11:42:39 -0700 Subject: [PATCH 020/441] got testing harness working again. (cherry picked from commit 2083181d2e964f7c130b96ad5fa15647e695802c) --- collects/tests/stepper/automatic-tests.rkt | 4 +- collects/tests/stepper/test-engine.rkt | 20 ++-- collects/tests/stepper/through-tests.rkt | 133 +++++++++++---------- 3 files changed, 89 insertions(+), 68 deletions(-) diff --git a/collects/tests/stepper/automatic-tests.rkt b/collects/tests/stepper/automatic-tests.rkt index 638b280cc3d..44749096486 100644 --- a/collects/tests/stepper/automatic-tests.rkt +++ b/collects/tests/stepper/automatic-tests.rkt @@ -1,7 +1,8 @@ #lang scheme (require "through-tests.ss" - "test-engine.ss") + "test-engine.ss" + test-engine/racket-tests) (let ((outer-namespace (current-namespace))) (parameterize ([display-only-errors #t] @@ -9,6 +10,7 @@ [current-namespace (make-base-namespace)]) ;; make sure the tests' print-convert sees the teaching languages' properties (namespace-attach-module outer-namespace 'mzlib/pconvert-prop (current-namespace)) + (namespace-require 'test-engine/racket-tests) (if (run-all-tests-except '(bad-and bad-cons check-error begin-let-bug prims qq-splice time set! local-set! lazy1 lazy2 lazy3 local-struct/i local-struct/ilam)) (exit 0) diff --git a/collects/tests/stepper/test-engine.rkt b/collects/tests/stepper/test-engine.rkt index 7ae23940f24..cc221f15099 100644 --- a/collects/tests/stepper/test-engine.rkt +++ b/collects/tests/stepper/test-engine.rkt @@ -183,14 +183,20 @@ (error-display-handler current-error-display-handler))) ;; call-iter-on-each : (-> syntax?) (syntax? (-> 'a) -> 'a) -> void/c -;; call the given iter on each syntax in turn (iter bounces control) -;; back to us by calling the followup-thunk. +;; call the given iter on each syntax in turn (iter bounces control +;; back to us by calling the followup-thunk). (define (call-iter-on-each stx-thunk iter) - (let* ([next (stx-thunk)] - [followup-thunk (if (eof-object? next) void (lambda () (call-iter-on-each stx-thunk iter)))] - [expanded (expand next)]) - ;;(printf "~v\n" expanded) - (iter expanded followup-thunk))) + (parameterize ([current-namespace (make-base-empty-namespace)]) + (namespace-require 'racket/base) + (namespace-require 'test-engine/racket-tests) + ;; make the test engine happy by adding a binding for test~object: + (namespace-set-variable-value! 'test~object #f) + (let iter-loop () + (let* ([next (stx-thunk)] + [followup-thunk (if (eof-object? next) void iter-loop)] + [expanded (expand next)]) + ;;(printf "~v\n" expanded) + (iter expanded followup-thunk))))) (define (warn error-box who fmt . args) diff --git a/collects/tests/stepper/through-tests.rkt b/collects/tests/stepper/through-tests.rkt index c0086856ca3..9d31565cdb5 100755 --- a/collects/tests/stepper/through-tests.rkt +++ b/collects/tests/stepper/through-tests.rkt @@ -14,7 +14,7 @@ ) -(provide run-test run-tests run-all-tests run-all-tests-except) +(provide run-test run-tests/s run-all-tests run-all-tests-except) (define list-of-tests null) @@ -57,7 +57,7 @@ (run-one-test/helper maybe-test) (error 'run-test "test not found: ~.s" name)))) -(define (run-tests names) +(define (run-tests/s names) (ormap/no-shortcut run-test names)) @@ -68,12 +68,7 @@ (define (andmap/no-shortcut f args) (foldl (lambda (a b) (and a b)) #t (map f args))) -(t 'mz1 m:mz - (for-each (lambda (x) x) '(1 2 3)) - :: {(for-each (lambda (x) x) `(1 2 3))} -> (... {1} ...) - :: ... -> (... {2} ...) - :: ... -> (... {3} ...) - :: ... -> {(void)}) + ;; new test case language: ;; an expected is (listof step) @@ -105,17 +100,12 @@ ;; * a `finished-stepping' is added if no error was specified ;; * a `{...}' is replaced with `(hilite ...)' -(t 'mz-app m:mz - (+ 3 4) - :: {(+ 3 4)} -> {7}) - -(t 'mz-app2 m:mz - ((lambda (x) (+ x 3)) 4) - :: {((lambda (x) (+ x 3)) 4)} -> {(+ 4 3)} -> {7}) - -(t 'mz-if m:mz - (if 3 4 5) - :: {(if 3 4 5)} -> {4}) + (t 'mz1 m:mz + (for-each (lambda (x) x) '(1 2 3)) + :: {(for-each (lambda (x) x) `(1 2 3))} -> (... {1} ...) + :: ... -> (... {2} ...) + :: ... -> (... {3} ...) + :: ... -> {(void)}) (t 'simple-if m:upto-int/lam (if true false true) @@ -126,44 +116,6 @@ :: (if {(if true false true)} false true) -> (if {false} false true) :: {(if false false true)} -> {true}) -(t 'direct-app m:mz - ((lambda (x) x) 3) - :: {((lambda (x) x) 3)} -> {3}) - -; (m:mz "((lambda (x) x) (begin (+ 3 4) (+ 4 5)))" -; `((before-after ((begin (hilite (+ 3 4)) (+ 4 5))) -; ((begin (hilite 7) (+ 4 5)))) -; (before-after ((hilite (begin 7 (+ 4 5)))) ((hilite (+ 4 5)))) -; (before-after ((hilite (+ 4 5))) ((hilite 9))) -; (finished-stepping))) - -(t 'curried m:mz - ((lambda (a) (lambda (b) (+ a b))) 14) - :: {((lambda (a) (lambda (b) (+ a b))) 14)} - -> {(lambda (b) (+ 14 b))}) - -(t 'case-lambda m:mz - ((case-lambda ((a) 3) ((b c) (+ b c))) 5 6) - :: {((case-lambda ((a) 3) ((b c) (+ b c))) 5 6)} - -> {(+ 5 6)} - -> {11}) - -;; not really a part of base mzscheme anymore -#;(t '2armed-if m:mz - (if 3 4) - :: {(if 3 4)} -> {4}) - -;(m:mz "((call-with-current-continuation call-with-current-continuation) (call-with-current-continuation call-with-current-continuation))" -; `((before-after (((hilite ,h-p) (call-with-current-continuation call-with-current-continuation))) ((call-with-current-continuation call-with-current-continuation)) -; (((hilite ,h-p) (call-with-current-continuation call-with-current-continuation))) ((lambda args ...))) -; (before-after (((lambda args ...) (hilite ,h-p))) ((call-with-current-continuation call-with-current-continuation)) -; (((lambda args ...) (hilite ,h-p))) ((lambda args ...))))) - -;(m:mz '(begin (define g 3) g) -; `((before-after ((hilite ,h-p)) (g) -; ((hilite ,h-p)) 3))) - -;(syntax-object->datum (cadr (annotate-expr test2 'mzscheme 0 (lambda (x) x)))) (t 'top-def m:upto-int/lam (define a (+ 3 4)) @@ -1464,8 +1416,69 @@ -> (define (f x) (local ((define-struct a (b c))) x)) {(define-struct a_1 (b c))} {1}) - + ;; oh dear heavens; putting these tests early on seems to "mess up" the namespace + ;; so that test~object can't be seen by the teaching-language tests. This is almost + ;; certainly the stepper test framework doing something stupid. + #;(t 'mz1 m:mz + (for-each (lambda (x) x) '(1 2 3)) + :: {(for-each (lambda (x) x) `(1 2 3))} -> (... {1} ...) + :: ... -> (... {2} ...) + :: ... -> (... {3} ...) + :: ... -> {(void)}) + +(t 'mz-app m:mz + (+ 3 4) + :: {(+ 3 4)} -> {7}) + +(t 'mz-app2 m:mz + ((lambda (x) (+ x 3)) 4) + :: {((lambda (x) (+ x 3)) 4)} -> {(+ 4 3)} -> {7}) + +(t 'mz-if m:mz + (if 3 4 5) + :: {(if 3 4 5)} -> {4}) + +(t 'direct-app m:mz + ((lambda (x) x) 3) + :: {((lambda (x) x) 3)} -> {3}) + +; (m:mz "((lambda (x) x) (begin (+ 3 4) (+ 4 5)))" +; `((before-after ((begin (hilite (+ 3 4)) (+ 4 5))) +; ((begin (hilite 7) (+ 4 5)))) +; (before-after ((hilite (begin 7 (+ 4 5)))) ((hilite (+ 4 5)))) +; (before-after ((hilite (+ 4 5))) ((hilite 9))) +; (finished-stepping))) + +(t 'curried m:mz + ((lambda (a) (lambda (b) (+ a b))) 14) + :: {((lambda (a) (lambda (b) (+ a b))) 14)} + -> {(lambda (b) (+ 14 b))}) + +(t 'case-lambda m:mz + ((case-lambda ((a) 3) ((b c) (+ b c))) 5 6) + :: {((case-lambda ((a) 3) ((b c) (+ b c))) 5 6)} + -> {(+ 5 6)} + -> {11}) + +;; not really a part of base mzscheme anymore +#;(t '2armed-if m:mz + (if 3 4) + :: {(if 3 4)} -> {4}) + +;(m:mz "((call-with-current-continuation call-with-current-continuation) (call-with-current-continuation call-with-current-continuation))" +; `((before-after (((hilite ,h-p) (call-with-current-continuation call-with-current-continuation))) ((call-with-current-continuation call-with-current-continuation)) +; (((hilite ,h-p) (call-with-current-continuation call-with-current-continuation))) ((lambda args ...))) +; (before-after (((lambda args ...) (hilite ,h-p))) ((call-with-current-continuation call-with-current-continuation)) +; (((lambda args ...) (hilite ,h-p))) ((lambda args ...))))) + +;(m:mz '(begin (define g 3) g) +; `((before-after ((hilite ,h-p)) (g) +; ((hilite ,h-p)) 3))) + +;(syntax-object->datum (cadr (annotate-expr test2 'mzscheme 0 (lambda (x) x)))) + + ;; run whatever tests are enabled (intended for interactive use): (define (ggg) (parameterize (#;[disable-stepper-error-handling #t] @@ -1474,8 +1487,8 @@ #;[show-all-steps #t]) #;(run-tests '(check-expect forward-ref check-within check-within-bad check-error check-error-bad)) #;(run-tests '(teachpack-universe)) - (run-tests '(local-struct/i local-struct/ilam)) - #;(run-all-tests))) + (run-all-tests) + #;(run-test 'simple-if))) From 5f7993c6db978d502e3f393557d4e8a43b3fd7a7 Mon Sep 17 00:00:00 2001 From: John Clements Date: Tue, 19 Oct 2010 17:42:11 -0700 Subject: [PATCH 021/441] looks like a fix for cond (cherry picked from commit 0536d52efd294638a06ad29e2e92027d777cd78b) --- collects/tests/stepper/automatic-tests.rkt | 3 +- collects/tests/stepper/test-engine.rkt | 21 ---- collects/tests/stepper/through-tests.rkt | 129 +++++++++------------ 3 files changed, 58 insertions(+), 95 deletions(-) diff --git a/collects/tests/stepper/automatic-tests.rkt b/collects/tests/stepper/automatic-tests.rkt index 44749096486..b7327a177d7 100644 --- a/collects/tests/stepper/automatic-tests.rkt +++ b/collects/tests/stepper/automatic-tests.rkt @@ -1,8 +1,7 @@ #lang scheme (require "through-tests.ss" - "test-engine.ss" - test-engine/racket-tests) + "test-engine.ss") (let ((outer-namespace (current-namespace))) (parameterize ([display-only-errors #t] diff --git a/collects/tests/stepper/test-engine.rkt b/collects/tests/stepper/test-engine.rkt index cc221f15099..8757dbca387 100644 --- a/collects/tests/stepper/test-engine.rkt +++ b/collects/tests/stepper/test-engine.rkt @@ -6,7 +6,6 @@ lang/run-teaching-program (only-in srfi/13 string-contains) scheme/contract - #;(file "/Users/clements/clements/scheme-scraps/eli-debug.ss") "language-level-model.ss") @@ -93,11 +92,6 @@ ;; run the named test, return #t if a failure occurred during the test. -;; WARNING: evaluating code expanded using run-teaching-program causes mutation of the -;; current namespace. Unfortunately, wrapping a parameterize around each test (i.e., in this -;; file) causes unacceptable slowdown and severe weirdness. I tried saving and restoring -;; the namespace through mutation, and got severe weirdness again. - (define (run-one-test name models exp-str expected-steps) (unless (display-only-errors) (printf "running test: ~v\n" name)) @@ -270,20 +264,5 @@ -;; DEBUGGING TO TRY TO FIND OUT WHY THIS DOESN'T WORK IN AN AUTOMATED TESTER: -;; test-sequence : ll-model? string? steps? -> (void) -;; given a language model and an expression and a sequence of steps, -;; check to see whether the stepper produces the desired steps -;;define (test-sequence the-ll-model exp-str expected-steps error-box) -#;(match mz - [(struct ll-model (namespace-spec teachpack-specs render-settings show-lambdas-as-lambdas? enable-testing?)) - (let* ([p2 (open-input-string "134")] - [module-id (gensym "stepper-module-name-")] - ;; thunk this so that syntax errors happen within the error handlers: - [expanded-thunk - (lambda () (expand-teaching-program p2 read-syntax namespace-spec teachpack-specs #f module-id enable-testing?))]) - (display (expanded-thunk)) - (test-sequence/core render-settings show-lambdas-as-lambdas? expanded-thunk '() (box #f)))]) - diff --git a/collects/tests/stepper/through-tests.rkt b/collects/tests/stepper/through-tests.rkt index 9d31565cdb5..9f1b29a3caa 100755 --- a/collects/tests/stepper/through-tests.rkt +++ b/collects/tests/stepper/through-tests.rkt @@ -14,7 +14,7 @@ ) -(provide run-test run-tests/s run-all-tests run-all-tests-except) +(provide run-test run-tests run-all-tests run-all-tests-except) (define list-of-tests null) @@ -57,7 +57,7 @@ (run-one-test/helper maybe-test) (error 'run-test "test not found: ~.s" name)))) -(define (run-tests/s names) +(define (run-tests names) (ormap/no-shortcut run-test names)) @@ -107,6 +107,59 @@ :: ... -> (... {3} ...) :: ... -> {(void)}) +(t 'mz-app m:mz + (+ 3 4) + :: {(+ 3 4)} -> {7}) + +(t 'mz-app2 m:mz + ((lambda (x) (+ x 3)) 4) + :: {((lambda (x) (+ x 3)) 4)} -> {(+ 4 3)} -> {7}) + +(t 'mz-if m:mz + (if 3 4 5) + :: {(if 3 4 5)} -> {4}) + +(t 'direct-app m:mz + ((lambda (x) x) 3) + :: {((lambda (x) x) 3)} -> {3}) + +; (m:mz "((lambda (x) x) (begin (+ 3 4) (+ 4 5)))" +; `((before-after ((begin (hilite (+ 3 4)) (+ 4 5))) +; ((begin (hilite 7) (+ 4 5)))) +; (before-after ((hilite (begin 7 (+ 4 5)))) ((hilite (+ 4 5)))) +; (before-after ((hilite (+ 4 5))) ((hilite 9))) +; (finished-stepping))) + +(t 'curried m:mz + ((lambda (a) (lambda (b) (+ a b))) 14) + :: {((lambda (a) (lambda (b) (+ a b))) 14)} + -> {(lambda (b) (+ 14 b))}) + +(t 'case-lambda m:mz + ((case-lambda ((a) 3) ((b c) (+ b c))) 5 6) + :: {((case-lambda ((a) 3) ((b c) (+ b c))) 5 6)} + -> {(+ 5 6)} + -> {11}) + +;; not really a part of base mzscheme anymore +#;(t '2armed-if m:mz + (if 3 4) + :: {(if 3 4)} -> {4}) + +;(m:mz "((call-with-current-continuation call-with-current-continuation) (call-with-current-continuation call-with-current-continuation))" +; `((before-after (((hilite ,h-p) (call-with-current-continuation call-with-current-continuation))) ((call-with-current-continuation call-with-current-continuation)) +; (((hilite ,h-p) (call-with-current-continuation call-with-current-continuation))) ((lambda args ...))) +; (before-after (((lambda args ...) (hilite ,h-p))) ((call-with-current-continuation call-with-current-continuation)) +; (((lambda args ...) (hilite ,h-p))) ((lambda args ...))))) + +;(m:mz '(begin (define g 3) g) +; `((before-after ((hilite ,h-p)) (g) +; ((hilite ,h-p)) 3))) + +;(syntax-object->datum (cadr (annotate-expr test2 'mzscheme 0 (lambda (x) x)))) + + + (t 'simple-if m:upto-int/lam (if true false true) :: {(if true false true)} -> {false}) @@ -1416,69 +1469,7 @@ -> (define (f x) (local ((define-struct a (b c))) x)) {(define-struct a_1 (b c))} {1}) - ;; oh dear heavens; putting these tests early on seems to "mess up" the namespace - ;; so that test~object can't be seen by the teaching-language tests. This is almost - ;; certainly the stepper test framework doing something stupid. - - #;(t 'mz1 m:mz - (for-each (lambda (x) x) '(1 2 3)) - :: {(for-each (lambda (x) x) `(1 2 3))} -> (... {1} ...) - :: ... -> (... {2} ...) - :: ... -> (... {3} ...) - :: ... -> {(void)}) - -(t 'mz-app m:mz - (+ 3 4) - :: {(+ 3 4)} -> {7}) - -(t 'mz-app2 m:mz - ((lambda (x) (+ x 3)) 4) - :: {((lambda (x) (+ x 3)) 4)} -> {(+ 4 3)} -> {7}) - -(t 'mz-if m:mz - (if 3 4 5) - :: {(if 3 4 5)} -> {4}) - -(t 'direct-app m:mz - ((lambda (x) x) 3) - :: {((lambda (x) x) 3)} -> {3}) - -; (m:mz "((lambda (x) x) (begin (+ 3 4) (+ 4 5)))" -; `((before-after ((begin (hilite (+ 3 4)) (+ 4 5))) -; ((begin (hilite 7) (+ 4 5)))) -; (before-after ((hilite (begin 7 (+ 4 5)))) ((hilite (+ 4 5)))) -; (before-after ((hilite (+ 4 5))) ((hilite 9))) -; (finished-stepping))) - -(t 'curried m:mz - ((lambda (a) (lambda (b) (+ a b))) 14) - :: {((lambda (a) (lambda (b) (+ a b))) 14)} - -> {(lambda (b) (+ 14 b))}) - -(t 'case-lambda m:mz - ((case-lambda ((a) 3) ((b c) (+ b c))) 5 6) - :: {((case-lambda ((a) 3) ((b c) (+ b c))) 5 6)} - -> {(+ 5 6)} - -> {11}) - -;; not really a part of base mzscheme anymore -#;(t '2armed-if m:mz - (if 3 4) - :: {(if 3 4)} -> {4}) - -;(m:mz "((call-with-current-continuation call-with-current-continuation) (call-with-current-continuation call-with-current-continuation))" -; `((before-after (((hilite ,h-p) (call-with-current-continuation call-with-current-continuation))) ((call-with-current-continuation call-with-current-continuation)) -; (((hilite ,h-p) (call-with-current-continuation call-with-current-continuation))) ((lambda args ...))) -; (before-after (((lambda args ...) (hilite ,h-p))) ((call-with-current-continuation call-with-current-continuation)) -; (((lambda args ...) (hilite ,h-p))) ((lambda args ...))))) - -;(m:mz '(begin (define g 3) g) -; `((before-after ((hilite ,h-p)) (g) -; ((hilite ,h-p)) 3))) - -;(syntax-object->datum (cadr (annotate-expr test2 'mzscheme 0 (lambda (x) x)))) - - + ;; run whatever tests are enabled (intended for interactive use): (define (ggg) (parameterize (#;[disable-stepper-error-handling #t] @@ -1488,10 +1479,4 @@ #;(run-tests '(check-expect forward-ref check-within check-within-bad check-error check-error-bad)) #;(run-tests '(teachpack-universe)) (run-all-tests) - #;(run-test 'simple-if))) - - - - - - + #;(run-tests '(cond1)))) From c05b501f1be3f12b0b4a8f68f44ff02859da37d3 Mon Sep 17 00:00:00 2001 From: John Clements Date: Tue, 19 Oct 2010 17:45:43 -0700 Subject: [PATCH 022/441] may have fixed cond in stepper tests (cherry picked from commit 60dabc8ad710f6c81bf169b9cb5a900e2656113e) --- collects/stepper/private/annotate.rkt | 61 ++++++++++++----------- collects/stepper/private/macro-unwind.rkt | 4 +- collects/stepper/private/reconstruct.rkt | 3 +- 3 files changed, 34 insertions(+), 34 deletions(-) diff --git a/collects/stepper/private/annotate.rkt b/collects/stepper/private/annotate.rkt index 984685dced4..cf3e89998c7 100644 --- a/collects/stepper/private/annotate.rkt +++ b/collects/stepper/private/annotate.rkt @@ -146,36 +146,37 @@ [rewritten - (kernel:kernel-syntax-case stx #f - - ; cond : - [(if test (begin then) else-stx) - (let ([origin (syntax-property stx 'origin)] - [rebuild-if - (lambda (new-cond-test) - (let* ([new-then (recur-regular (syntax then))] - [rebuilt (stepper-syntax-property - (rebuild-stx `(if ,(recur-regular (syntax test)) - ,new-then - ,(recur-in-cond (syntax else-stx) new-cond-test)) - stx) - 'stepper-hint - 'comes-from-cond)]) - ; move the stepper-else mark to the if, if it's present: - (if (stepper-syntax-property (syntax test) 'stepper-else) - (stepper-syntax-property rebuilt 'stepper-else #t) - rebuilt)))]) - (cond [(cond-test stx) ; continuing an existing 'cond' - (rebuild-if cond-test)] - [(and origin (pair? origin) (eq? (syntax-e (car origin)) 'cond)) ; starting a new 'cond' - (rebuild-if (lambda (test-stx) - (and (eq? (syntax-source stx) (syntax-source test-stx)) - (eq? (syntax-position stx) (syntax-position test-stx)))))] - [else ; not from a 'cond' at all. - (rebuild-stx `(if ,@(map recur-regular (list (syntax test) (syntax (begin then)) (syntax else-stx)))) stx)]))] - [(begin body) ; else clauses of conds; ALWAYS AN ERROR CALL - (cond-test stx) - (stepper-syntax-property stx 'stepper-skip-completely #t)] + (kernel:kernel-syntax-case + stx + #f + ; cond : + [(#%if test (#%let () then) else-stx) + (let ([origin (syntax-property stx 'origin)] + [rebuild-if + (lambda (new-cond-test) + (let* ([new-then (recur-regular (syntax then))] + [rebuilt (stepper-syntax-property + (rebuild-stx `(if ,(recur-regular (syntax test)) + ,new-then + ,(recur-in-cond (syntax else-stx) new-cond-test)) + stx) + 'stepper-hint + 'comes-from-cond)]) + ; move the stepper-else mark to the if, if it's present: + (if (stepper-syntax-property (syntax test) 'stepper-else) + (stepper-syntax-property rebuilt 'stepper-else #t) + rebuilt)))]) + (cond [(cond-test stx) ; continuing an existing 'cond' + (rebuild-if cond-test)] + [(and origin (pair? origin) (eq? (syntax-e (car origin)) 'cond)) ; starting a new 'cond' + (rebuild-if (lambda (test-stx) + (and (eq? (syntax-source stx) (syntax-source test-stx)) + (eq? (syntax-position stx) (syntax-position test-stx)))))] + [else ; not from a 'cond' at all. + (rebuild-stx `(if ,@(map recur-regular (list (syntax test) (syntax (begin then)) (syntax else-stx)))) stx)]))] + [(begin body) ; else clauses of conds; ALWAYS AN ERROR CALL + (cond-test stx) + (stepper-syntax-property stx 'stepper-skip-completely #t)] ; wrapper on a local. This is necessary because teach.ss expands local into a trivial let wrapping a bunch of ; internal defines, and therefore the letrec-values on which I want to hang the 'stepper-hint doesn't yet diff --git a/collects/stepper/private/macro-unwind.rkt b/collects/stepper/private/macro-unwind.rkt index abc58e01440..f22d813b51c 100644 --- a/collects/stepper/private/macro-unwind.rkt +++ b/collects/stepper/private/macro-unwind.rkt @@ -244,7 +244,7 @@ (syntax-property stx 'user-source)) (eq? user-position (syntax-property stx 'user-position))) - (syntax-case stx (if begin) + (syntax-case stx (if begin let-values) ;; the else clause disappears when it's a ;; language-inserted else clause [(if test result) @@ -254,7 +254,7 @@ (loop (syntax else-clause)))] ;; else clause appears momentarily in 'before,' even ;; though it's a 'skip-completely' - [(begin . rest) null] + [(let-values () . rest) null] [else-stx (error 'unwind-cond "expected an if, got: ~.s" diff --git a/collects/stepper/private/reconstruct.rkt b/collects/stepper/private/reconstruct.rkt index 927f6d9e5c6..45bfada54f0 100644 --- a/collects/stepper/private/reconstruct.rkt +++ b/collects/stepper/private/reconstruct.rkt @@ -13,8 +13,7 @@ "model-settings.ss" "shared.ss" "my-macros.ss" - (for-syntax scheme/base) - #;(file "/Users/clements/clements/scheme-scraps/eli-debug.ss")) + (for-syntax scheme/base)) (provide/contract [reconstruct-completed (syntax? From 0ed9334cc1c09f20c1656794865cba0730b0383d Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Tue, 19 Oct 2010 21:06:32 -0400 Subject: [PATCH 023/441] Fix rendering in local build mode -- make it create file:// urls when insisting on an absolute url (currently happens only in the tr pages). (cherry picked from commit 1e2d4b816946b9ab94c572ac5bae53d688bc4ed8) --- collects/meta/web/html/resource.rkt | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/collects/meta/web/html/resource.rkt b/collects/meta/web/html/resource.rkt index 0a95328d431..54632f4eaa4 100644 --- a/collects/meta/web/html/resource.rkt +++ b/collects/meta/web/html/resource.rkt @@ -47,10 +47,10 @@ (define cached-roots '(#f . #f)) (define (current-url-roots) - ;; takes in a (listof (list prefix-string url-string . flags)), and produces - ;; an alist with lists of strings for the keys; the prefix-strings are split - ;; on "/"s, and the url-strings can be anything at all actually (they are put - ;; as-is before the path with a "/" between them). + ;; takes `url-roots', a (listof (list prefix-string url-string . flags)), and + ;; produces an alist with lists of strings for the keys; the prefix-strings + ;; are split on "/"s, and the url-strings can be anything at all actually + ;; (they are put as-is before the path with a "/" between them). (let ([roots (url-roots)]) (unless (eq? roots (car cached-roots)) (set! cached-roots @@ -86,7 +86,7 @@ ;; find shared prefix [(and (pair? t) (pair? c) (equal? (car t) (car c))) (loop (cdr t) (cdr c) (cons (car t) pfx))] - ;; done + ;; done with the shared prefix, deal with the root now ;; no roots => always use a relative path (useful for debugging) [(not roots) `(,@(map (lambda (_) "..") c) ,@t ,file*)] ;; share a root => use a relative path unless its an absolute root @@ -197,7 +197,13 @@ (printf " ~a\n" path) (renderer filename)))))) (define (url) (relativize filename dirpathlist (rendered-dirpath))) - (define absolute-url (delay (relativize filename dirpathlist ""))) + (define absolute-url + (delay (let ([url (relativize filename dirpathlist '())]) + (if (url-roots) + url + ;; we're in local build mode, and insist on an absolute url, + ;; so construct a `file://' result + (list* "file://" (current-directory) url))))) (add-renderer path render) (make-keyword-procedure (lambda (kws kvs . args) (keyword-apply referrer kws kvs (url) args)) From c8b04e77b26041a3b5476cb52bd93fb609da8b98 Mon Sep 17 00:00:00 2001 From: John Clements Date: Tue, 19 Oct 2010 23:28:45 -0700 Subject: [PATCH 024/441] copied 'mzlib/convert-prop attachment from outer layer to inner layer. (cherry picked from commit 70898379c5df85d8c67db0aa95370f9a984664a9) --- collects/tests/stepper/automatic-tests.rkt | 2 +- collects/tests/stepper/test-engine.rkt | 12 +++++++++--- collects/tests/stepper/through-tests.rkt | 4 ++-- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/collects/tests/stepper/automatic-tests.rkt b/collects/tests/stepper/automatic-tests.rkt index b7327a177d7..45cd396d465 100644 --- a/collects/tests/stepper/automatic-tests.rkt +++ b/collects/tests/stepper/automatic-tests.rkt @@ -8,7 +8,7 @@ [current-output-port (open-output-string)] [current-namespace (make-base-namespace)]) ;; make sure the tests' print-convert sees the teaching languages' properties - (namespace-attach-module outer-namespace 'mzlib/pconvert-prop (current-namespace)) + #;(namespace-attach-module outer-namespace 'mzlib/pconvert-prop (current-namespace)) (namespace-require 'test-engine/racket-tests) (if (run-all-tests-except '(bad-and bad-cons check-error begin-let-bug prims qq-splice time set! local-set! lazy1 lazy2 lazy3 local-struct/i local-struct/ilam)) diff --git a/collects/tests/stepper/test-engine.rkt b/collects/tests/stepper/test-engine.rkt index 8757dbca387..b8720a46558 100644 --- a/collects/tests/stepper/test-engine.rkt +++ b/collects/tests/stepper/test-engine.rkt @@ -176,12 +176,18 @@ (disable-stepper-error-handling)))) (error-display-handler current-error-display-handler))) +(define-namespace-anchor n-anchor) + ;; call-iter-on-each : (-> syntax?) (syntax? (-> 'a) -> 'a) -> void/c ;; call the given iter on each syntax in turn (iter bounces control ;; back to us by calling the followup-thunk). (define (call-iter-on-each stx-thunk iter) - (parameterize ([current-namespace (make-base-empty-namespace)]) - (namespace-require 'racket/base) + (let ([ns (make-base-namespace)]) + ;; gets structures to print correctly. Copied from fix in command-line tests. + (namespace-attach-module (namespace-anchor->empty-namespace n-anchor) + 'mzlib/pconvert-prop + ns) + (parameterize ([current-namespace ns]) (namespace-require 'test-engine/racket-tests) ;; make the test engine happy by adding a binding for test~object: (namespace-set-variable-value! 'test~object #f) @@ -190,7 +196,7 @@ [followup-thunk (if (eof-object? next) void iter-loop)] [expanded (expand next)]) ;;(printf "~v\n" expanded) - (iter expanded followup-thunk))))) + (iter expanded followup-thunk)))))) (define (warn error-box who fmt . args) diff --git a/collects/tests/stepper/through-tests.rkt b/collects/tests/stepper/through-tests.rkt index 9f1b29a3caa..193a007b985 100755 --- a/collects/tests/stepper/through-tests.rkt +++ b/collects/tests/stepper/through-tests.rkt @@ -1478,5 +1478,5 @@ #;[show-all-steps #t]) #;(run-tests '(check-expect forward-ref check-within check-within-bad check-error check-error-bad)) #;(run-tests '(teachpack-universe)) - (run-all-tests) - #;(run-tests '(cond1)))) + #;(run-all-tests) + (run-tests '(check-expect)))) From 3b23f247152230fb1feb7d79696478c9ef2dc600 Mon Sep 17 00:00:00 2001 From: Vincent St-Amour Date: Wed, 20 Oct 2010 14:31:52 -0400 Subject: [PATCH 025/441] Fix opt-lambda:. Merge to 5.0.2. (cherry picked from commit a15236ea4f1ba84c9351632e9469e1cd34b5375b) --- collects/tests/typed-scheme/succeed/opt-lambda.rkt | 9 +++++++++ collects/typed-scheme/private/prims.rkt | 1 + 2 files changed, 10 insertions(+) create mode 100644 collects/tests/typed-scheme/succeed/opt-lambda.rkt diff --git a/collects/tests/typed-scheme/succeed/opt-lambda.rkt b/collects/tests/typed-scheme/succeed/opt-lambda.rkt new file mode 100644 index 00000000000..5a55dd7bbb2 --- /dev/null +++ b/collects/tests/typed-scheme/succeed/opt-lambda.rkt @@ -0,0 +1,9 @@ +#lang typed/racket + +(: opt (case-lambda ( -> Void) + (Integer -> Void))) +(define opt + (opt-lambda: ((n : Integer 0)) + (display n))) +(opt) +(opt 1) diff --git a/collects/typed-scheme/private/prims.rkt b/collects/typed-scheme/private/prims.rkt index 92e9247fd2e..2f0a636b766 100644 --- a/collects/typed-scheme/private/prims.rkt +++ b/collects/typed-scheme/private/prims.rkt @@ -34,6 +34,7 @@ This file defines two sorts of primitives. All of them are provided into any mod "base-types.rkt" "base-types-extra.rkt" racket/flonum ; for for/flvector and for*/flvector + mzlib/etc (for-syntax syntax/parse syntax/private/util From 724313c766b6aff92858a6d2699f0bd61a016e6b Mon Sep 17 00:00:00 2001 From: John Clements Date: Wed, 20 Oct 2010 12:03:22 -0700 Subject: [PATCH 026/441] back to old style, not sure why (cherry picked from commit dfe6f78d805a99a79465c3d0fcf1653f41283b23) --- collects/test-engine/racket-tests.rkt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/collects/test-engine/racket-tests.rkt b/collects/test-engine/racket-tests.rkt index 9a9ca793757..a90d46e1cc9 100644 --- a/collects/test-engine/racket-tests.rkt +++ b/collects/test-engine/racket-tests.rkt @@ -106,7 +106,14 @@ #'test-engine)))))))) 'stepper-skipto (append skipto/third ;; let - skipto/third skipto/third ;; unless (it expands into (if (let-values () ...)) + skipto/third skipto/second + ;; something funny going on here; I can't see how Mike's + ;; fix could ever have worked. Possibly related: this + ;; file is still written in the mzscheme language? + ;; ... no, that doesn't seem to pan out. + ;; okay, I really don't understand why, but it appears + ;; that in this context, 'when' is still expanding + ;; into a begin, rather than a (let-values () ...) skipto/cdr skipto/third ;; application of insert-test '(syntax-e cdr cdr syntax-e car) ;; lambda ))) From eb76f9fbc2f6d2972bdaecb8f4df95c62d1d39bf Mon Sep 17 00:00:00 2001 From: John Clements Date: Wed, 20 Oct 2010 12:03:59 -0700 Subject: [PATCH 027/441] frightening bug, #%if was capturing everything (cherry picked from commit 34fbc9a06f2a9b53fa4095e88841e283ee0147c5) --- collects/stepper/private/annotate.rkt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collects/stepper/private/annotate.rkt b/collects/stepper/private/annotate.rkt index cf3e89998c7..6c61372cd93 100644 --- a/collects/stepper/private/annotate.rkt +++ b/collects/stepper/private/annotate.rkt @@ -150,7 +150,7 @@ stx #f ; cond : - [(#%if test (#%let () then) else-stx) + [(if test (let-values () then) else-stx) (let ([origin (syntax-property stx 'origin)] [rebuild-if (lambda (new-cond-test) From a3ed757fa9557447f0ef94dab5b8df7432668d2b Mon Sep 17 00:00:00 2001 From: John Clements Date: Wed, 20 Oct 2010 12:04:52 -0700 Subject: [PATCH 028/441] cosmetic changes only (cherry picked from commit d18f43a48802601fb65aacde1c2a1ce0b5362257) --- collects/tests/stepper/automatic-tests.rkt | 4 +++- collects/tests/stepper/through-tests.rkt | 19 +++++++++++++------ 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/collects/tests/stepper/automatic-tests.rkt b/collects/tests/stepper/automatic-tests.rkt index 45cd396d465..e7804b8eee6 100644 --- a/collects/tests/stepper/automatic-tests.rkt +++ b/collects/tests/stepper/automatic-tests.rkt @@ -5,7 +5,9 @@ (let ((outer-namespace (current-namespace))) (parameterize ([display-only-errors #t] - [current-output-port (open-output-string)] + ;; display-only-errors is insufficient, because the evals + ;; actually cause output. So we just eat stdout. + [current-output-port (open-output-string)] [current-namespace (make-base-namespace)]) ;; make sure the tests' print-convert sees the teaching languages' properties #;(namespace-attach-module outer-namespace 'mzlib/pconvert-prop (current-namespace)) diff --git a/collects/tests/stepper/through-tests.rkt b/collects/tests/stepper/through-tests.rkt index 193a007b985..0b0a76a67ca 100755 --- a/collects/tests/stepper/through-tests.rkt +++ b/collects/tests/stepper/through-tests.rkt @@ -23,7 +23,10 @@ [(list name models string expected-steps) (when (assq name list-of-tests) (error 'add-test "name ~v is already in the list of tests" name)) - (set! list-of-tests (append list-of-tests (list (list name (list models string expected-steps)))))])) + (set! list-of-tests + (append list-of-tests + (list (list name + (list models string expected-steps)))))])) (define (t1 name models string expected-steps) (add-test (list name models string expected-steps))) @@ -1460,23 +1463,27 @@ (t 'local-struct/i m:intermediate (define (f x) (local ((define-struct a (b c))) x)) (f 1) :: (define (f x) (local ((define-struct a (b c))) x)) {(f 1)} - -> (define (f x) (local ((define-struct a (b c))) x)) {(define-struct a_1 (b c))} {1}) + -> (define (f x) (local ((define-struct a (b c))) x)) + {(define-struct a_1 (b c))} {1}) (t 'local-struct/ilam m:intermediate-lambda (define (f x) (local ((define-struct a (b c))) x)) (f 1) :: (define (f x) (local ((define-struct a (b c))) x)) {(f 1)} - -> (define (f x) (local ((define-struct a (b c))) x)) {((lambda (x) (local ((define-struct a (b c))) x)) 1)} - -> (define (f x) (local ((define-struct a (b c))) x)) {(define-struct a_1 (b c))} {1}) + -> (define (f x) (local ((define-struct a (b c))) x)) + {((lambda (x) (local ((define-struct a (b c))) x)) 1)} + -> (define (f x) (local ((define-struct a (b c))) x)) + {(define-struct a_1 (b c))} {1}) ;; run whatever tests are enabled (intended for interactive use): (define (ggg) - (parameterize (#;[disable-stepper-error-handling #t] + (parameterize ([disable-stepper-error-handling #t] #;[display-only-errors #t] #;[store-steps #f] #;[show-all-steps #t]) - #;(run-tests '(check-expect forward-ref check-within check-within-bad check-error check-error-bad)) + #;(run-tests '(check-expect forward-ref check-within check-within-bad + check-error check-error-bad)) #;(run-tests '(teachpack-universe)) #;(run-all-tests) (run-tests '(check-expect)))) From 2c3c077d4573798220e91ab5c75112c4e5d402c5 Mon Sep 17 00:00:00 2001 From: Casey Klein Date: Wed, 20 Oct 2010 17:13:01 -0700 Subject: [PATCH 029/441] Revert "adjusted define-metafunction/extension so that it recompiles the old cases in the new language" This reverts commit 99d85159b69da057b83e1f2d17eaf75ad7f08e9d. Signed-off-by: Casey Klein --- collects/redex/private/reduction-semantics.rkt | 15 +++------------ collects/redex/tests/tl-test.rkt | 12 ------------ 2 files changed, 3 insertions(+), 24 deletions(-) diff --git a/collects/redex/private/reduction-semantics.rkt b/collects/redex/private/reduction-semantics.rkt index 288603e6e39..579698fe5c6 100644 --- a/collects/redex/private/reduction-semantics.rkt +++ b/collects/redex/private/reduction-semantics.rkt @@ -1521,16 +1521,8 @@ (syntax->list stuffs))) (syntax->list extras)))) -(define (build-metafunction lang cases parent-cases/wrong-lang wrap dom-contract-pat codom-contract-pat name relation?) - (let ([parent-cases (map (λ (parent-case) - (make-metafunc-case - (compile-pattern lang (metafunc-case-lhs-pat parent-case) #t) - (metafunc-case-rhs parent-case) - (metafunc-case-lhs-pat parent-case) - (metafunc-case-src-loc parent-case) - (metafunc-case-id parent-case))) - parent-cases/wrong-lang)] - [dom-compiled-pattern (and dom-contract-pat (compile-pattern lang dom-contract-pat #f))] +(define (build-metafunction lang cases parent-cases wrap dom-contract-pat codom-contract-pat name relation?) + (let ([dom-compiled-pattern (and dom-contract-pat (compile-pattern lang dom-contract-pat #f))] [codom-compiled-pattern (compile-pattern lang codom-contract-pat #f)]) (values (wrap @@ -1554,7 +1546,6 @@ (metafunc-proc-cases r))) (cover-case id c)))) (relation-coverage))))] - [all-cases (append cases parent-cases)] [metafunc (λ (exp) (let ([cache-ref (hash-ref cache exp not-in-cache)]) @@ -1565,7 +1556,7 @@ (redex-error name "~s is not in my domain" `(,name ,@exp)))) - (let loop ([cases all-cases] + (let loop ([cases (append cases parent-cases)] [num (- (length parent-cases))]) (cond [(null? cases) diff --git a/collects/redex/tests/tl-test.rkt b/collects/redex/tests/tl-test.rkt index 52543da2151..1d22c55a3db 100644 --- a/collects/redex/tests/tl-test.rkt +++ b/collects/redex/tests/tl-test.rkt @@ -531,18 +531,6 @@ (test (term (g 11 17)) 11) (test (term (h 11 17)) 11)) - (let () - (define-language L - (v 1)) - (define-extended-language M - L - (v .... 2)) - (define-metafunction L - [(f v) v]) - (define-metafunction/extension f M - [(g 17) 17]) - (test (term (g 2)) 2)) - (let () (define-metafunction empty-language [(f any) 1]) From 6dcdcc283fe611c34776fb9d57c20364d67e32fc Mon Sep 17 00:00:00 2001 From: Casey Klein Date: Thu, 21 Oct 2010 07:41:26 -0700 Subject: [PATCH 030/441] Deletes ill-formed, commented-out Redex test. Signed-off-by: Casey Klein --- collects/redex/tests/tl-test.rkt | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/collects/redex/tests/tl-test.rkt b/collects/redex/tests/tl-test.rkt index 1d22c55a3db..4d3dc054166 100644 --- a/collects/redex/tests/tl-test.rkt +++ b/collects/redex/tests/tl-test.rkt @@ -537,25 +537,6 @@ (define-metafunction/extension f empty-language [(g any) 2]) (test (term (g 0)) 2)) - - #: - (let () - (define-language L - (v 1 (v))) - (define-metafunction L - f : v -> v - [(f (v)) - any_1 - (where any_1 (f v))]) - - (define-extended-language M - L - (v .... 2)) - (define-metafunction/extension f M - g : v -> v - [(g 2) 2]) - - (term (g (2)))) (let () (define-metafunction empty-language From fad24a782f3c348b51256799671534fdd9fcbcfa Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Tue, 3 Aug 2010 21:36:51 -0400 Subject: [PATCH 031/441] v5.0.1 stuff (cherry picked from commit 5f5810cfea5fb6e447a9f4af68be87952b0d78ce) --- collects/meta/web/download/data.rkt | 3 ++- collects/meta/web/download/installers.txt | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/collects/meta/web/download/data.rkt b/collects/meta/web/download/data.rkt index 05f69dd6b75..6f6a88b8519 100644 --- a/collects/meta/web/download/data.rkt +++ b/collects/meta/web/download/data.rkt @@ -1,7 +1,8 @@ #lang racket/base (define -versions+dates- - '(["5.0" "June 2010"] + '(["5.0.1" "August 2010"] + ["5.0" "June 2010"] ["4.2.5" "April 2010"] ["4.2.4" "January 2010"] ["4.2.3" "December 2009"] diff --git a/collects/meta/web/download/installers.txt b/collects/meta/web/download/installers.txt index e625f0010d2..b78963ef8ff 100644 --- a/collects/meta/web/download/installers.txt +++ b/collects/meta/web/download/installers.txt @@ -1,3 +1,25 @@ +8.9M 5.0.1/racket-textual/racket-textual-5.0.1-bin-i386-linux-debian.sh +8.9M 5.0.1/racket-textual/racket-textual-5.0.1-bin-i386-linux-f12.sh +8.9M 5.0.1/racket-textual/racket-textual-5.0.1-bin-i386-linux-ubuntu-jaunty.sh +9.2M 5.0.1/racket-textual/racket-textual-5.0.1-bin-i386-osx-mac.dmg +6.9M 5.0.1/racket-textual/racket-textual-5.0.1-bin-i386-win32.exe +8.9M 5.0.1/racket-textual/racket-textual-5.0.1-bin-ppc-darwin.sh +9.2M 5.0.1/racket-textual/racket-textual-5.0.1-bin-ppc-osx-mac.dmg +9.0M 5.0.1/racket-textual/racket-textual-5.0.1-bin-x86_64-linux-f7.sh +4.9M 5.0.1/racket-textual/racket-textual-5.0.1-src-mac.dmg +4.8M 5.0.1/racket-textual/racket-textual-5.0.1-src-unix.tgz +6.8M 5.0.1/racket-textual/racket-textual-5.0.1-src-win.zip +47M 5.0.1/racket/racket-5.0.1-bin-i386-linux-debian.sh +47M 5.0.1/racket/racket-5.0.1-bin-i386-linux-f12.sh +47M 5.0.1/racket/racket-5.0.1-bin-i386-linux-ubuntu-jaunty.sh +48M 5.0.1/racket/racket-5.0.1-bin-i386-osx-mac.dmg +29M 5.0.1/racket/racket-5.0.1-bin-i386-win32.exe +46M 5.0.1/racket/racket-5.0.1-bin-ppc-darwin.sh +48M 5.0.1/racket/racket-5.0.1-bin-ppc-osx-mac.dmg +47M 5.0.1/racket/racket-5.0.1-bin-x86_64-linux-f7.sh +16M 5.0.1/racket/racket-5.0.1-src-mac.dmg +16M 5.0.1/racket/racket-5.0.1-src-unix.tgz +20M 5.0.1/racket/racket-5.0.1-src-win.zip 8.7M 5.0/racket-textual/racket-textual-5.0-bin-i386-linux-debian.sh 8.7M 5.0/racket-textual/racket-textual-5.0-bin-i386-linux-f12.sh 8.7M 5.0/racket-textual/racket-textual-5.0-bin-i386-linux-ubuntu-jaunty.sh From 3504ba170e478ffd03c99a48282bbb9c58cbcaca Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Thu, 21 Oct 2010 16:31:58 -0400 Subject: [PATCH 032/441] "/proj/scheme/" renamed to "/proj/racket/" at CCS. (cherry picked from commit 6d6492e9e3daaf37d95dfe9b23ab0e25314aeaae) --- collects/meta/web/www/people.rkt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/collects/meta/web/www/people.rkt b/collects/meta/web/www/people.rkt index 509d6de09a6..8ed487f2ef4 100644 --- a/collects/meta/web/www/people.rkt +++ b/collects/meta/web/www/people.rkt @@ -6,8 +6,8 @@ (place ; ------------------------------------------------------------------- 'neu "Northeastern University" #:location "Boston, MA" - #:url "http://www.ccs.neu.edu/scheme/" - #:pubs "http://www.ccs.neu.edu/scheme/pubs/" + #:url "http://www.ccs.neu.edu/racket/" + #:pubs "http://www.ccs.neu.edu/racket/pubs/" (person 'matthias "Matthias Felleisen" #:url "http://www.ccs.neu.edu/home/matthias/") (person 'eli "Eli Barzilay" From 49754fa3dd793241b3ce858442c580a41d6322d8 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Wed, 20 Oct 2010 22:56:17 -0400 Subject: [PATCH 033/441] Reformat, minor tweaks, reorganize part on sequence operations into a new section. (cherry picked from commit 655b066a9339f5fbe8f583c3b325974634f99338) --- .../scribblings/reference/sequences.scrbl | 870 +++++++++--------- 1 file changed, 440 insertions(+), 430 deletions(-) diff --git a/collects/scribblings/reference/sequences.scrbl b/collects/scribblings/reference/sequences.scrbl index 58e813473c1..bd11e88f713 100644 --- a/collects/scribblings/reference/sequences.scrbl +++ b/collects/scribblings/reference/sequences.scrbl @@ -2,34 +2,34 @@ @(require "mz.ss" (for-syntax racket/base) scribble/scheme - (for-label racket/generator + (for-label racket/generator racket/mpair)) @(define generator-eval - (lambda () - (let ([the-eval (make-base-eval)]) - (the-eval '(require racket/generator)) - the-eval))) + (let ([the-eval (make-base-eval)]) + (the-eval '(require racket/generator)) + the-eval)) @(define (info-on-seq where what) - @margin-note{See @secref[where] for information on using @|what| as sequences.}) + @margin-note{See @secref[where] for information on using @|what| as + sequences.}) @title[#:tag "sequences"]{Sequences} @guideintro["sequences"]{sequences} -A @deftech{sequence} encapsulates an ordered stream of values. The +A @deftech{sequence} encapsulates an ordered stream of values. The elements of a sequence can be extracted with one of the @scheme[for] syntactic forms or with the procedures returned by @scheme[sequence-generate]. -The sequence datatype overlaps with many other datatypes. Among +The sequence datatype overlaps with many other datatypes. Among built-in datatypes, the sequence datatype includes the following: @itemize[ @item{strings (see @secref["strings"])} - + @item{byte strings (see @secref["bytestrings"])} @item{lists (see @secref["pairs"])} @@ -48,300 +48,216 @@ built-in datatypes, the sequence datatype includes the following: ] -In addition, @scheme[make-do-sequence] creates a sequence given a -thunk that returns procedures to implement a generator, and the -@scheme[prop:sequence] property can be associated with a structure -type. +In addition, @scheme[make-do-sequence] creates a sequence given a thunk +that returns procedures to implement a generator, and the +@scheme[prop:sequence] property can be associated with a structure type. For most sequence types, extracting elements from a sequence has no side-effect on the original sequence value; for example, extracting the -sequence of elements from a list does not change the list. For other +sequence of elements from a list does not change the list. For other sequence types, each extraction implies a side effect; for example, -extracting the sequence of bytes from a port cause the bytes to be -read from the port. +extracting the sequence of bytes from a port cause the bytes to be read +from the port. -Individual elements of a sequence typically correspond to single -values, but an element may also correspond to multiple values. For -example, a hash table generates two values---a key and its value---for -each element in the sequence. +Individual elements of a sequence typically correspond to single values, +but an element may also correspond to multiple values. For example, a +hash table generates two values---a key and its value---for each element +in the sequence. +@; ---------------------------------------------------------------------- @section{Sequence Predicate and Constructors} -@defproc[(sequence? [v any/c]) boolean?]{ Return @scheme[#t] if -@scheme[v] can be used as a sequence, @scheme[#f] otherwise.} - -@defthing[empty-seqn sequence?]{ A sequence with no elements. } - -@defproc[(seqn->list [s sequence?]) list?]{ Returns a list whose -elements are the elements of the @scheme[s], which must be a one-valued sequence. -If @scheme[s] is infinite, this function does not terminate. } - -@defproc[(seqn-cons [v any/c] - ... - [s sequence?]) - sequence?]{ -Returns a sequence whose first element is @scheme[(values v ...)] and whose -remaining elements are the same as @scheme[s]. -} - -@defproc[(seqn-first [s sequence?]) - (values any/c ...)]{ -Returns the first element of @scheme[s].} - -@defproc[(seqn-rest [s sequence?]) - sequence?]{ -Returns a sequence equivalent to @scheme[s], except the first element is omitted.} - -@defproc[(seqn-length [s sequence?]) - exact-nonnegative-integer?]{ -Returns the number of elements of @scheme[s]. If @scheme[s] is infinite, this -function does not terminate. } - -@defproc[(seqn-ref [s sequence?] [i exact-nonnegative-integer?]) - (values any/c ...)]{ -Returns the @scheme[i]th element of @scheme[s].} - -@defproc[(seqn-tail [s sequence?] [i exact-nonnegative-integer?]) - sequence?]{ -Returns a sequence equivalent to @scheme[s], except the first @scheme[i] elements are omitted.} +@defproc[(sequence? [v any/c]) boolean?]{ + Return @scheme[#t] if @scheme[v] can be used as a sequence, + @scheme[#f] otherwise.} -@defproc[(seqn-append [s sequence?] ...) - sequence?]{ -Returns a sequence that contains all elements of each sequence in the order they appear in the original sequences. The -new sequence is constructed lazily. } - -@defproc[(seqn-map [f procedure?] - [s sequence?]) - sequence?]{ -Returns a sequence that contains @scheme[f] applied to each element of @scheme[s]. The new sequence is constructed lazily. } - -@defproc[(seqn-andmap [f (-> any/c ... boolean?)] - [s sequence?]) - boolean?]{ -Returns @scheme[#t] if @scheme[f] returns a true result on every element of @scheme[s]. If @scheme[s] is infinite and @scheme[f] never -returns a false result, this function does not terminate. } - -@defproc[(seqn-ormap [f (-> any/c ... boolean?)] - [s sequence?]) - boolean?]{ -Returns @scheme[#t] if @scheme[f] returns a true result on some element of @scheme[s]. If @scheme[s] is infinite and @scheme[f] never -returns a true result, this function does not terminate. } - -@defproc[(seqn-for-each [f (-> any/c ... any)] - [s sequence?]) - (void)]{ -Applies @scheme[f] to each element of @scheme[s]. If @scheme[s] is infinite, this function does not terminate. } - -@defproc[(seqn-fold [f (-> any/c any/c ... any/c)] - [i any/c] - [s sequence?]) - (void)]{ -Folds @scheme[f] over each element of @scheme[s] with @scheme[i] as the initial accumulator. If @scheme[s] is infinite, this function does not terminate. } - -@defproc[(seqn-filter [f (-> any/c ... boolean?)] - [s sequence?]) - sequence?]{ -Returns a sequence whose elements are the elements of @scheme[s] for which @scheme[f] returns a true result. Although the new sequence is constructed -lazily, if @scheme[s] has an infinite number of elements where @scheme[f] returns a false result in between two elements where @scheme[f] returns a true result -then operations on this sequence will not terminate during that infinite sub-sequence. } - -@defproc[(seqn-add-between [s sequence?] [e any/c]) - sequence?]{ -Returns a sequence whose elements are the elements of @scheme[s] except in between each is @scheme[e]. The new sequence is constructed lazily. } - -@defproc[(seqn-count [f procedure?] [s sequence?]) - exact-nonnegative-integer?]{ -Returns the number of elements in @scheme[s] for which @scheme[f] returns a true result. If @scheme[s] is infinite, this function does not terminate. } - @defproc*[([(in-range [end number?]) sequence?] [(in-range [start number?] [end number?] [step number? 1]) sequence?])]{ -Returns a sequence whose elements are numbers. The single-argument -case @scheme[(in-range end)] is equivalent to @scheme[(in-range 0 end -1)]. The first number in the sequence is @scheme[start], and each -successive element is generated by adding @scheme[step] to the -previous element. The sequence stops before an element that would be -greater or equal to @scheme[end] if @scheme[step] is non-negative, or -less or equal to @scheme[end] if @scheme[step] is negative. -@speed[in-range "number"]} + Returns a sequence whose elements are numbers. The single-argument + case @scheme[(in-range end)] is equivalent to @scheme[(in-range 0 end + 1)]. The first number in the sequence is @scheme[start], and each + successive element is generated by adding @scheme[step] to the + previous element. The sequence stops before an element that would be + greater or equal to @scheme[end] if @scheme[step] is non-negative, or + less or equal to @scheme[end] if @scheme[step] is negative. + @speed[in-range "number"]} @defproc[(in-naturals [start exact-nonnegative-integer? 0]) sequence?]{ -Returns an infinite sequence of exact integers starting with -@scheme[start], where each element is one more than the preceding -element. @speed[in-naturals "integer"]} + Returns an infinite sequence of exact integers starting with + @scheme[start], where each element is one more than the preceding + element. @speed[in-naturals "integer"]} @defproc[(in-list [lst list?]) sequence?]{ -Returns a sequence equivalent to @scheme[lst]. -@info-on-seq["pairs" "lists"] -@speed[in-list "list"]} + Returns a sequence equivalent to @scheme[lst]. + @info-on-seq["pairs" "lists"] + @speed[in-list "list"]} @defproc[(in-mlist [mlst mlist?]) sequence?]{ -Returns a sequence equivalent to @scheme[mlst]. -@info-on-seq["mpairs" "mutable lists"] -@speed[in-mlist "mutable list"]} + Returns a sequence equivalent to @scheme[mlst]. + @info-on-seq["mpairs" "mutable lists"] + @speed[in-mlist "mutable list"]} @defproc[(in-vector [vec vector?] - [start exact-nonnegative-integer? 0] - [stop (or/c exact-nonnegative-integer? #f) #f] - [step (and/c exact-integer? (not/c zero?)) 1]) + [start exact-nonnegative-integer? 0] + [stop (or/c exact-nonnegative-integer? #f) #f] + [step (and/c exact-integer? (not/c zero?)) 1]) sequence?]{ - -Returns a sequence equivalent to @scheme[vec] when no optional -arguments are supplied. - -@info-on-seq["vectors" "vectors"] - -The optional arguments @scheme[start], @scheme[stop], and -@scheme[step] are analogous to @scheme[in-range], except that a -@scheme[#f] value for @scheme[stop] is equivalent to -@scheme[(vector-length vec)]. That is, the first element in the -sequence is @scheme[(vector-ref vec start)], and each successive -element is generated by adding @scheme[step] to index of the previous -element. The sequence stops before an index that would be greater or -equal to @scheme[end] if @scheme[step] is non-negative, or less or -equal to @scheme[end] if @scheme[step] is negative. - -If @scheme[start] is less than @scheme[stop] and @scheme[step] is -negative, then the @exnraise[exn:fail:contract:mismatch]. Similarly, -if @scheme[start] is more than @scheme[stop] and @scheme[step] is -positive, then the @exnraise[exn:fail:contract:mismatch]. The -@scheme[start] and @scheme[stop] values are @emph{not} checked against -the size of @scheme[vec], so access can fail when an element is -demanded from the sequence. - -@speed[in-vector "vector"]} + Returns a sequence equivalent to @scheme[vec] when no optional + arguments are supplied. + + @info-on-seq["vectors" "vectors"] + + The optional arguments @scheme[start], @scheme[stop], and + @scheme[step] are analogous to @scheme[in-range], except that a + @scheme[#f] value for @scheme[stop] is equivalent to + @scheme[(vector-length vec)]. That is, the first element in the + sequence is @scheme[(vector-ref vec start)], and each successive + element is generated by adding @scheme[step] to index of the previous + element. The sequence stops before an index that would be greater or + equal to @scheme[end] if @scheme[step] is non-negative, or less or + equal to @scheme[end] if @scheme[step] is negative. + + If @scheme[start] is less than @scheme[stop] and @scheme[step] is + negative, then the @exnraise[exn:fail:contract:mismatch]. Similarly, + if @scheme[start] is more than @scheme[stop] and @scheme[step] is + positive, then the @exnraise[exn:fail:contract:mismatch]. The + @scheme[start] and @scheme[stop] values are @emph{not} checked against + the size of @scheme[vec], so access can fail when an element is + demanded from the sequence. + + @speed[in-vector "vector"]} @defproc[(in-string [str string?] - [start exact-nonnegative-integer? 0] - [stop (or/c exact-nonnegative-integer? #f) #f] + [start exact-nonnegative-integer? 0] + [stop (or/c exact-nonnegative-integer? #f) #f] [step (and/c exact-integer? (not/c zero?)) 1]) sequence?]{ -Returns a sequence equivalent to @scheme[str] when no optional -arguments are supplied. + Returns a sequence equivalent to @scheme[str] when no optional + arguments are supplied. -@info-on-seq["strings" "strings"] + @info-on-seq["strings" "strings"] -The optional arguments @scheme[start], @scheme[stop], and -@scheme[step] are as in @scheme[in-vector]. + The optional arguments @scheme[start], @scheme[stop], and + @scheme[step] are as in @scheme[in-vector]. -@speed[in-string "string"]} + @speed[in-string "string"]} @defproc[(in-bytes [bstr bytes?] - [start exact-nonnegative-integer? 0] - [stop (or/c exact-nonnegative-integer? #f) #f] + [start exact-nonnegative-integer? 0] + [stop (or/c exact-nonnegative-integer? #f) #f] [step (and/c exact-integer? (not/c zero?)) 1]) sequence?]{ -Returns a sequence equivalent to @scheme[bstr] when no optional -arguments are supplied. + Returns a sequence equivalent to @scheme[bstr] when no optional + arguments are supplied. -@info-on-seq["bytestrings" "byte strings"] + @info-on-seq["bytestrings" "byte strings"] -The optional arguments @scheme[start], @scheme[stop], and -@scheme[step] are as in @scheme[in-vector]. + The optional arguments @scheme[start], @scheme[stop], and + @scheme[step] are as in @scheme[in-vector]. -@speed[in-bytes "byte string"]} + @speed[in-bytes "byte string"]} -@defproc[(in-port [r (input-port? . -> . any/c) read] - [in input-port? (current-input-port)]) - sequence?]{ -Returns a sequence whose elements are produced by calling @scheme[r] -on @scheme[in] until it produces @scheme[eof].} +@defproc[(in-port [r (input-port? . -> . any/c) read] + [in input-port? (current-input-port)]) + sequence?]{ + Returns a sequence whose elements are produced by calling @scheme[r] + on @scheme[in] until it produces @scheme[eof].} @defproc[(in-input-port-bytes [in input-port?]) sequence?]{ -Returns a sequence equivalent to @scheme[(in-port read-byte in)].} + Returns a sequence equivalent to @scheme[(in-port read-byte in)].} -@defproc[(in-input-port-chars [in input-port?]) sequence?]{ Returns a -sequence whose elements are read as characters form @scheme[in] -(equivalent to @scheme[(in-port read-char in)]).} +@defproc[(in-input-port-chars [in input-port?]) sequence?]{ + Returns a sequence whose elements are read as characters form + @scheme[in] (equivalent to @scheme[(in-port read-char in)]).} @defproc[(in-lines [in input-port? (current-input-port)] [mode (or/c 'linefeed 'return 'return-linefeed 'any 'any-one) 'any]) sequence?]{ - -Returns a sequence equivalent to @scheme[(in-port (lambda (p) -(read-line p mode)) in)]. Note that the default mode is @scheme['any], -whereas the default mode of @scheme[read-line] is -@scheme['linefeed]. } + Returns a sequence equivalent to + @scheme[(in-port (lambda (p) (read-line p mode)) in)]. Note that the + default mode is @scheme['any], whereas the default mode of + @scheme[read-line] is @scheme['linefeed].} @defproc[(in-bytes-lines [in input-port? (current-input-port)] [mode (or/c 'linefeed 'return 'return-linefeed 'any 'any-one) 'any]) sequence?]{ + Returns a sequence equivalent to + @scheme[(in-port (lambda (p) (read-bytes-line p mode)) in)]. Note + that the default mode is @scheme['any], whereas the default mode of + @scheme[read-bytes-line] is @scheme['linefeed].} -Returns a sequence equivalent to @scheme[(in-port (lambda (p) -(read-bytes-line p mode)) in)]. Note that the default mode is @scheme['any], -whereas the default mode of @scheme[read-bytes-line] is -@scheme['linefeed]. } - @defproc[(in-hash [hash hash?]) sequence?]{ -Returns a sequence equivalent to @scheme[hash]. + Returns a sequence equivalent to @scheme[hash]. -@info-on-seq["hashtables" "hash tables"]} + @info-on-seq["hashtables" "hash tables"]} @defproc[(in-hash-keys [hash hash?]) sequence?]{ -Returns a sequence whose elements are the keys of @scheme[hash].} + Returns a sequence whose elements are the keys of @scheme[hash].} @defproc[(in-hash-values [hash hash?]) sequence?]{ -Returns a sequence whose elements are the values of @scheme[hash].} + Returns a sequence whose elements are the values of @scheme[hash].} @defproc[(in-hash-pairs [hash hash?]) sequence?]{ -Returns a sequence whose elements are pairs, each containing a key and -its value from @scheme[hash] (as opposed to using @scheme[hash] directly -as a sequence to get the key and value as separate values for each -element).} + Returns a sequence whose elements are pairs, each containing a key and + its value from @scheme[hash] (as opposed to using @scheme[hash] + directly as a sequence to get the key and value as separate values for + each element).} @defproc[(in-directory [dir (or/c #f path-string?) #f]) sequence?]{ - -Return a sequence that produces all of the paths for files, -directories, and links with @racket[dir]. If @racket[dir] is not -@racket[#f], then every produced path starts with @racket[dir] as its -prefix. If @racket[dir] is @racket[#f], then paths in and relative to -the current directory are produced.} + Return a sequence that produces all of the paths for files, + directories, and links with @racket[dir]. If @racket[dir] is not + @racket[#f], then every produced path starts with @racket[dir] as its + prefix. If @racket[dir] is @racket[#f], then paths in and relative to + the current directory are produced.} @defproc[(in-producer [producer procedure?] [stop any/c] [args any/c] ...) sequence?]{ -Returns a sequence that contains values from sequential calls to -@scheme[producer]. @scheme[stop] identifies the value that marks the -end of the sequence --- this value is not included in the sequence. -@scheme[stop] can be a predicate or a value that is tested against the -results with @scheme[eq?]. Note that you must use a predicate function -if the stop value is itself a function, or if the @scheme[producer] -returns multiple values.} + Returns a sequence that contains values from sequential calls to + @scheme[producer]. @scheme[stop] identifies the value that marks the + end of the sequence --- this value is not included in the sequence. + @scheme[stop] can be a predicate or a value that is tested against the + results with @scheme[eq?]. Note that you must use a predicate + function if the stop value is itself a function, or if the + @scheme[producer] returns multiple values.} @defproc[(in-value [v any/c]) sequence?]{ -Returns a sequence that produces a single value: @scheme[v]. This form -is mostly useful for @scheme[let]-like bindings in forms such as -@scheme[for*/list].} - -@defproc[(in-indexed [seq sequence?]) sequence?]{Returns a sequence -where each element has two values: the value produced by @scheme[seq], -and a non-negative exact integer starting with @scheme[0]. The -elements of @scheme[seq] must be single-valued.} - -@defproc[(in-sequences [seq sequence?] ...) sequence?]{Returns a -sequence that is made of all input sequences, one after the other. The -elements of each @scheme[seq] must all have the same number of -values.} - -@defproc[(in-cycle [seq sequence?] ...) sequence?]{Similar to -@scheme[in-sequences], but the sequences are repeated in an infinite -cycle.} - -@defproc[(in-parallel [seq sequence?] ...) sequence?]{Returns a -sequence where each element has as many values as the number of -supplied @scheme[seq]s; the values, in order, are the values of each -@scheme[seq]. The elements of each @scheme[seq] must be -single-valued.} + Returns a sequence that produces a single value: @scheme[v]. This + form is mostly useful for @scheme[let]-like bindings in forms such as + @scheme[for*/list].} + +@defproc[(in-indexed [seq sequence?]) sequence?]{ + Returns a sequence where each element has two values: the value + produced by @scheme[seq], and a non-negative exact integer starting + with @scheme[0]. The elements of @scheme[seq] must be single-valued.} + +@defproc[(in-sequences [seq sequence?] ...) sequence?]{ + Returns a sequence that is made of all input sequences, one after the + other. The elements of each @scheme[seq] must all have the same + number of values.} + +@defproc[(in-cycle [seq sequence?] ...) sequence?]{ + Similar to @scheme[in-sequences], but the sequences are repeated in an + infinite cycle.} + +@defproc[(in-parallel [seq sequence?] ...) sequence?]{ + Returns a sequence where each element has as many values as the number + of supplied @scheme[seq]s; the values, in order, are the values of + each @scheme[seq]. The elements of each @scheme[seq] must be + single-valued.} @defproc[(stop-before [seq sequence?] [pred (any/c . -> . any)]) -sequence?]{ Returns a sequence that contains the elements of -@scheme[seq] (which must be single-valued), but only until the last -element for which applying @scheme[pred] to the element produces -@scheme[#t], after which the sequence ends.} + sequence?]{ + Returns a sequence that contains the elements of @scheme[seq] (which + must be single-valued), but only until the last element for which + applying @scheme[pred] to the element produces @scheme[#t], after + which the sequence ends.} @defproc[(stop-after [seq sequence?] [pred (any/c . -> . any)]) -sequence?]{ Returns a sequence that contains the elements of -@scheme[seq] (which must be single-valued), but only until the element -(inclusive) for which applying @scheme[pred] to the element produces -@scheme[#t], after which the sequence ends.} + sequence?]{ + Returns a sequence that contains the elements of @scheme[seq] (which + must be single-valued), but only until the element (inclusive) for + which applying @scheme[pred] to the element produces @scheme[#t], + after which the sequence ends.} @defproc[(make-do-sequence [thunk (-> (values (any/c . -> . any) (any/c . -> . any/c) @@ -350,220 +266,314 @@ sequence?]{ Returns a sequence that contains the elements of (() () #:rest list? . ->* . any/c) ((any/c) () #:rest list? . ->* . any/c)))]) sequence?]{ + Returns a sequence whose elements are generated by the procedures and + initial value returned by the thunk. The generator is defined in terms + of a @defterm{position}, which is initialized to the third result of + the thunk, and the @defterm{element}, which may consist of multiple + values. + + The @scheme[thunk] results define the generated elements as follows: + @itemize[ + @item{The first result is a @scheme[_pos->element] procedure that takes + the current position and returns the value(s) for the current + element.} + @item{The second result is a @scheme[_next-pos] procedure that takes + the current position and returns the next position.} + @item{The third result is the initial position.} + @item{The fourth result takes the current position and returns a + true result if the sequence includes the value(s) for the current + position, and false if the sequence should end instead of + including the value(s).} + @item{The fifth result is like the fourth result, but it takes the + current element value(s) instead of the current position.} + @item{The sixth result is like the fourth result, but it takes both + the current position and the current element values(s) and + determines a sequence end after the current element is already + included in the sequence.}] + + Each of the procedures listed above is called only once per position. + Among the last three procedures, as soon as one of the procedures + returns @scheme[#f], the sequence ends, and none are called again. + Typically, one of the functions determines the end condition, and the + other two functions always return @scheme[#t].} -Returns a sequence whose elements are generated by the procedures and -initial value returned by the thunk. The generator is defined in terms -of a @defterm{position}, which is initialized to the third result of -the thunk, and the @defterm{element}, which may consist of multiple -values. +@defthing[prop:sequence struct-type-property?]{ -The @scheme[thunk] results define the generated elements as follows: + Associates a procedure to a structure type that takes an instance of + the structure and returns a sequence. If @scheme[v] is an instance of + a structure type with this property, then @scheme[(sequence? v)] + produces @scheme[#t]. + + @let-syntax[([car (make-element-id-transformer + (lambda (id) #'@schemeidfont{car}))]) + @examples[ + (define-struct train (car next) + #:property prop:sequence (lambda (t) + (make-do-sequence + (lambda () + (values train-car + train-next + t + (lambda (t) t) + (lambda (v) #t) + (lambda (t v) #t)))))) + (for/list ([c (make-train 'engine + (make-train 'boxcar + (make-train 'caboose + #f)))]) + c)]]} + +@; ---------------------------------------------------------------------- +@section{Additional Sequence Operations} + +@defthing[empty-seqn sequence?]{ + A sequence with no elements.} + +@defproc[(seqn->list [s sequence?]) list?]{ + Returns a list whose elements are the elements of the @scheme[s], + which must be a one-valued sequence. If @scheme[s] is infinite, this + function does not terminate.} -@itemize[ +@defproc[(seqn-cons [v any/c] + ... + [s sequence?]) + sequence?]{ + Returns a sequence whose first element is @scheme[(values v ...)] and whose + remaining elements are the same as @scheme[s].} - @item{The first result is a @scheme[_pos->element] procedure that takes - the current position and returns the value(s) for the current element.} +@defproc[(seqn-first [s sequence?]) + (values any/c ...)]{ + Returns the first element of @scheme[s].} - @item{The second result is a @scheme[_next-pos] procedure that takes - the current position and returns the next position.} +@defproc[(seqn-rest [s sequence?]) + sequence?]{ + Returns a sequence equivalent to @scheme[s], except the first element + is omitted.} - @item{The third result is the initial position.} +@defproc[(seqn-length [s sequence?]) + exact-nonnegative-integer?]{ + Returns the number of elements of @scheme[s]. If @scheme[s] is + infinite, this function does not terminate.} - @item{The fourth result takes the current position and returns a true - result if the sequence includes the value(s) for the current - position, and false if the sequence should end instead of - including the value(s).} +@defproc[(seqn-ref [s sequence?] [i exact-nonnegative-integer?]) + (values any/c ...)]{ + Returns the @scheme[i]th element of @scheme[s].} - @item{The fifth result is like the fourth result, but it takes the - current element value(s) instead of the current position.} +@defproc[(seqn-tail [s sequence?] [i exact-nonnegative-integer?]) + sequence?]{ + Returns a sequence equivalent to @scheme[s], except the first + @scheme[i] elements are omitted.} - @item{The sixth result is like the fourth result, but it takes both - the current position and the current element values(s) and - determines a sequence end after the current element is already - included in the sequence.} +@defproc[(seqn-append [s sequence?] ...) + sequence?]{ + Returns a sequence that contains all elements of each sequence in the + order they appear in the original sequences. The new sequence is + constructed lazily.} -] +@defproc[(seqn-map [f procedure?] + [s sequence?]) + sequence?]{ + Returns a sequence that contains @scheme[f] applied to each element of + @scheme[s]. The new sequence is constructed lazily.} + +@defproc[(seqn-andmap [f (-> any/c ... boolean?)] + [s sequence?]) + boolean?]{ + Returns @scheme[#t] if @scheme[f] returns a true result on every + element of @scheme[s]. If @scheme[s] is infinite and @scheme[f] never + returns a false result, this function does not terminate.} -Each of the procedures listed above is called only once per position. -Among the last three procedures, as soon as one of the procedures -returns @scheme[#f], the sequence ends, and none are called -again. Typically, one of the functions determines the end condition, -and the other two functions always return @scheme[#t].} +@defproc[(seqn-ormap [f (-> any/c ... boolean?)] + [s sequence?]) + boolean?]{ + Returns @scheme[#t] if @scheme[f] returns a true result on some + element of @scheme[s]. If @scheme[s] is infinite and @scheme[f] never + returns a true result, this function does not terminate.} -@defthing[prop:sequence struct-type-property?]{ +@defproc[(seqn-for-each [f (-> any/c ... any)] + [s sequence?]) + (void)]{ + Applies @scheme[f] to each element of @scheme[s]. If @scheme[s] is + infinite, this function does not terminate.} -Associates a procedure to a structure type that takes an instance of -the structure and returns a sequence. If @scheme[v] is an instance of -a structure type with this property, then @scheme[(sequence? v)] -produces @scheme[#t]. - -@let-syntax[([car (make-element-id-transformer (lambda (id) #'@schemeidfont{car}))]) - @examples[ - (define-struct train (car next) - #:property prop:sequence (lambda (t) - (make-do-sequence - (lambda () - (values train-car - train-next - t - (lambda (t) t) - (lambda (v) #t) - (lambda (t v) #t)))))) - (for/list ([c (make-train 'engine - (make-train 'boxcar - (make-train 'caboose - #f)))]) - c) - ]]} +@defproc[(seqn-fold [f (-> any/c any/c ... any/c)] + [i any/c] + [s sequence?]) + (void)]{ + Folds @scheme[f] over each element of @scheme[s] with @scheme[i] as + the initial accumulator. If @scheme[s] is infinite, this function + does not terminate.} +@defproc[(seqn-filter [f (-> any/c ... boolean?)] + [s sequence?]) + sequence?]{ + Returns a sequence whose elements are the elements of @scheme[s] for + which @scheme[f] returns a true result. Although the new sequence is + constructed lazily, if @scheme[s] has an infinite number of elements + where @scheme[f] returns a false result in between two elements where + @scheme[f] returns a true result then operations on this sequence will + not terminate during that infinite sub-sequence.} + +@defproc[(seqn-add-between [s sequence?] [e any/c]) + sequence?]{ + Returns a sequence whose elements are the elements of @scheme[s] + except in between each is @scheme[e]. The new sequence is constructed + lazily.} + +@defproc[(seqn-count [f procedure?] [s sequence?]) + exact-nonnegative-integer?]{ + Returns the number of elements in @scheme[s] for which @scheme[f] + returns a true result. If @scheme[s] is infinite, this function does + not terminate.} + +@; ---------------------------------------------------------------------- @section{Sequence Generators} -@defproc[(sequence-generate [seq sequence?]) (values (-> boolean?) - (-> any))]{ -Returns two thunks to extract elements from the sequence. The first -returns @scheme[#t] if more values are available for the sequence. The -second returns the next element (which may be multiple values) from the -sequence; if no more elements are available, the -@exnraise[exn:fail:contract].} +@defproc[(sequence-generate [seq sequence?]) + (values (-> boolean?) (-> any))]{ + Returns two thunks to extract elements from the sequence. The first + returns @scheme[#t] if more values are available for the sequence. + The second returns the next element (which may be multiple values) + from the sequence; if no more elements are available, the + @exnraise[exn:fail:contract].} +@; ---------------------------------------------------------------------- @section{Iterator Generators} @defmodule[racket/generator] -@defform[(generator () body ...)]{ Creates a function that returns a -value through @scheme[yield], each time it is invoked. When -the generator runs out of values to yield, the last value it computed -will be returned for future invocations of the generator. Generators -can be safely nested. - -Note: The first form must be @scheme[()]. In the future, the -@scheme[()] position will hold argument names that are used for the -initial generator call. - -@examples[#:eval (generator-eval) -(define g (generator () - (let loop ([x '(a b c)]) - (if (null? x) - 0 - (begin - (yield (car x)) - (loop (cdr x))))))) -(g) -(g) -(g) -(g) -(g) -] - -To use an existing generator as a sequence, you should use @scheme[in-producer] -with a stop-value known to the generator. - -@examples[#:eval (generator-eval) -(define my-stop-value (gensym)) -(define my-generator (generator () - (let loop ([x '(a b c)]) - (if (null? x) - my-stop-value - (begin - (yield (car x)) - (loop (cdr x))))))) - -(for/list ([i (in-producer my-generator my-stop-value)]) - i) -]} - -@defform[(infinite-generator body ...)]{ Creates a function similar to -@scheme[generator] but when the last @scheme[body] is executed the function -will re-execute all the bodies in a loop. - -@examples[#:eval (generator-eval) -(define welcome - (infinite-generator - (yield 'hello) - (yield 'goodbye))) -(welcome) -(welcome) -(welcome) -(welcome) -]} - -@defproc[(in-generator [expr any?] ...) sequence?]{ Returns a generator -that can be used as a sequence. The @scheme[in-generator] procedure takes care of the -case when @scheme[expr] stops producing values, so when the @scheme[expr] -completes, the generator will end. - -@examples[#:eval (generator-eval) -(for/list ([i (in-generator - (let loop ([x '(a b c)]) - (when (not (null? x)) - (yield (car x)) - (loop (cdr x)))))]) - i) -]} - -@defform[(yield expr ...)]{ Saves the point of execution inside a generator -and returns a value. @scheme[yield] can accept any number of arguments and will -return them using @scheme[values]. - -Values can be passed back to the generator after invoking @scheme[yield] by passing -the arguments to the generator instance. Note that a value cannot be passed back -to the generator until after the first @scheme[yield] has been invoked. - -@examples[#:eval (generator-eval) -(define my-generator (generator () (yield 1) (yield 2 3 4))) -(my-generator) -(my-generator) -] -@examples[#:eval (generator-eval) -(define pass-values-generator - (generator () - (let* ([from-user (yield 2)] - [from-user-again (yield (add1 from-user))]) - (yield from-user-again)))) - -(pass-values-generator) -(pass-values-generator 5) -(pass-values-generator 12) -]} - -@defproc[(generator-state [g any?]) symbol?]{ Returns a symbol that describes the state -of the generator. - - @itemize[ - @item{@scheme['fresh] - The generator has been freshly created and has not - been invoked yet. Values cannot be passed to a fresh generator.} - @item{@scheme['suspended] - Control within the generator has been suspended due - to a call to @scheme[yield]. The generator can be invoked.} - @item{@scheme['running] - The generator is currently executing. This state can - only be returned if @scheme[generator-state] is invoked inside the generator.} - @item{@scheme['done] - The generator has executed its entire body and will not - call @scheme[yield] anymore.} - ] - -@examples[#:eval (generator-eval) -(define my-generator (generator () (yield 1) (yield 2))) -(generator-state my-generator) -(my-generator) -(generator-state my-generator) -(my-generator) -(generator-state my-generator) -(my-generator) -(generator-state my-generator) - -(define introspective-generator (generator () ((yield 1)))) -(introspective-generator) -(introspective-generator - (lambda () (generator-state introspective-generator))) -(generator-state introspective-generator) -(introspective-generator) -]} +@defform[(generator () body ...)]{ + Creates a function that returns a value through @scheme[yield], each + time it is invoked. When the generator runs out of values to yield, + the last value it computed will be returned for future invocations of + the generator. Generators can be safely nested. + + Note: The first form must be @scheme[()]. In the future, the + @scheme[()] position will hold argument names that are used for the + initial generator call. + + @examples[#:eval generator-eval + (define g (generator () + (let loop ([x '(a b c)]) + (if (null? x) + 0 + (begin + (yield (car x)) + (loop (cdr x))))))) + (g) + (g) + (g) + (g) + (g)] + + To use an existing generator as a sequence, you should use + @scheme[in-producer] with a stop-value known for the generator. + + @examples[#:eval generator-eval + (define my-stop-value (gensym)) + (define my-generator (generator () + (let loop ([x '(a b c)]) + (if (null? x) + my-stop-value + (begin + (yield (car x)) + (loop (cdr x))))))) + + (for/list ([i (in-producer my-generator my-stop-value)]) + i)]} + +@defform[(infinite-generator body ...)]{ + Creates a function similar to @scheme[generator] but when the last + @scheme[body] is executed the function will re-execute all the bodies + in a loop. + + @examples[#:eval generator-eval + (define welcome + (infinite-generator + (yield 'hello) + (yield 'goodbye))) + (welcome) + (welcome) + (welcome) + (welcome)]} + +@defproc[(in-generator [expr any?] ...) sequence?]{ + Returns a generator that can be used as a sequence. The + @scheme[in-generator] procedure takes care of the case when + @scheme[expr] stops producing values, so when the @scheme[expr] + completes, the generator will end. + + @examples[#:eval generator-eval + (for/list ([i (in-generator + (let loop ([x '(a b c)]) + (when (not (null? x)) + (yield (car x)) + (loop (cdr x)))))]) + i)]} + +@defform[(yield expr ...)]{ + Saves the point of execution inside a generator and returns a value. + @scheme[yield] can accept any number of arguments and will return them + using @scheme[values]. + + Values can be passed back to the generator after invoking + @scheme[yield] by passing the arguments to the generator instance. + Note that a value cannot be passed back to the generator until after + the first @scheme[yield] has been invoked. + + @examples[#:eval generator-eval + (define my-generator (generator () (yield 1) (yield 2 3 4))) + (my-generator) + (my-generator)] + + @examples[#:eval generator-eval + (define pass-values-generator + (generator () + (let* ([from-user (yield 2)] + [from-user-again (yield (add1 from-user))]) + (yield from-user-again)))) + + (pass-values-generator) + (pass-values-generator 5) + (pass-values-generator 12)]} + +@defproc[(generator-state [g any?]) symbol?]{ + Returns a symbol that describes the state of the generator. + + @itemize[ + @item{@scheme['fresh] --- The generator has been freshly created and + has not been invoked yet. Values cannot be passed to a fresh + generator.} + @item{@scheme['suspended] --- Control within the generator has been + suspended due to a call to @scheme[yield]. The generator can + be invoked.} + @item{@scheme['running] --- The generator is currently executing. + This state can only be returned if @scheme[generator-state] is + invoked inside the generator.} + @item{@scheme['done] --- The generator has executed its entire body + and will not call @scheme[yield] anymore.}] + + @examples[#:eval generator-eval + (define my-generator (generator () (yield 1) (yield 2))) + (generator-state my-generator) + (my-generator) + (generator-state my-generator) + (my-generator) + (generator-state my-generator) + (my-generator) + (generator-state my-generator) + + (define introspective-generator (generator () ((yield 1)))) + (introspective-generator) + (introspective-generator + (lambda () (generator-state introspective-generator))) + (generator-state introspective-generator) + (introspective-generator)]} @defproc[(sequence->generator [s sequence?]) (-> any?)]{ - -Returns a generator that returns elements from the sequence, @scheme[s], -each time the generator is invoked.} + Returns a generator that returns elements from the sequence, + @scheme[s], each time the generator is invoked.} @defproc[(sequence->repeated-generator [s sequence?]) (-> any?)]{ - -Returns a generator that returns elements from the sequence, @scheme[s], -similar to @scheme[sequence->generator] but looping over the values in -the sequence when no more values are left.} + Returns a generator that returns elements from the sequence, + @scheme[s], similar to @scheme[sequence->generator] but looping over + the values in the sequence when no more values are left.} From 8be4a76a616a45f2a4b69ddc30692f5f63230d9e Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Thu, 21 Oct 2010 16:52:48 -0400 Subject: [PATCH 034/441] Rename `seqn-*' to `stream-*'. Later this will grow, to include a few kinds of streams in a unified way, and possibly change the sequence protocol to a point where these functions are not causing such big runtime penalties. (cherry picked from commit 2f5265854a02605a46386809d8a9dd96f6b0c9bc) --- collects/racket/private/sequence.rkt | 102 +++++------ .../scribblings/reference/sequences.scrbl | 52 +++--- collects/tests/racket/for.rktl | 163 +++++++++--------- collects/tests/racket/stress/sequence.rkt | 58 +++---- 4 files changed, 190 insertions(+), 185 deletions(-) diff --git a/collects/racket/private/sequence.rkt b/collects/racket/private/sequence.rkt index fdfdd3677b7..425ce1fdf06 100644 --- a/collects/racket/private/sequence.rkt +++ b/collects/racket/private/sequence.rkt @@ -1,7 +1,7 @@ (module sequence "pre-base.rkt" (require "list.rkt") - (define empty-seqn + (define empty-stream (make-do-sequence (λ () (values @@ -12,10 +12,10 @@ (λ (val) #t) (λ (pos val) #t))))) - (define (seqn->list s) + (define (stream->list s) (for/list ([v s]) v)) - (define-syntax-rule (-seqn-cons vs s) + (define-syntax-rule (-stream-cons vs s) (make-do-sequence (λ () (define-values (more? next) (sequence-generate s)) @@ -30,31 +30,31 @@ (or (zero? pos) (more?))) (λ _ #t) (λ _ #t))))) - (define seqn-cons + (define stream-cons (case-lambda [() - (error 'seqn-cons "expects a sequence to extend, but received no arguments")] + (error 'stream-cons "expects a sequence to extend, but received no arguments")] [(s) - (-seqn-cons (values) s)] + (-stream-cons (values) s)] [(v s) - (-seqn-cons (values v) s)] + (-stream-cons (values v) s)] [vs*s ; XXX double reverse is bad but moving split-at causes a problem I can't figure (define s*vs (reverse vs*s)) - (-seqn-cons (apply values (reverse (cdr s*vs))) (car s*vs))])) + (-stream-cons (apply values (reverse (cdr s*vs))) (car s*vs))])) - (define (seqn-first s) + (define (stream-first s) (define-values (more? next) (sequence-generate s)) (unless (more?) - (error 'seqn-first "expects a sequence with at least one element")) + (error 'stream-first "expects a sequence with at least one element")) (next)) - (define (seqn-rest s) + (define (stream-rest s) (make-do-sequence (λ () (define-values (more? next) (sequence-generate s)) (unless (more?) - (error 'seqn-rest "expects a sequence with at least one element")) + (error 'stream-rest "expects a sequence with at least one element")) (next) (values (λ (pos) (next)) @@ -64,16 +64,16 @@ (λ _ #t) (λ _ #t))))) - (define (seqn-length s) + (define (stream-length s) (define-values (more? next) (sequence-generate s)) (let loop ([i 0]) (if (more?) (begin (next) (loop (add1 i))) i))) - (define (seqn-ref s i) + (define (stream-ref s i) (unless (and (exact-integer? i) (i . >= . 0)) - (error 'seqn-ref "expects an exact non-negative index, but got ~e" i)) + (error 'stream-ref "expects an exact non-negative index, but got ~e" i)) (define-values (more? next) (sequence-generate s)) (let loop ([n i]) (cond @@ -83,18 +83,18 @@ (next) (loop (sub1 n))] [else - (error 'seqn-ref "expects a sequence with at least ~e element(s)" i)]))) + (error 'stream-ref "expects a sequence with at least ~e element(s)" i)]))) - (define (seqn-tail s i) + (define (stream-tail s i) (unless (and (exact-integer? i) (i . >= . 0)) - (error 'seqn-tail "expects an exact non-negative index, but got ~e" i)) + (error 'stream-tail "expects an exact non-negative index, but got ~e" i)) (make-do-sequence (λ () (define-values (more? next) (sequence-generate s)) (let loop ([n i]) (unless (zero? n) (unless (more?) - (error 'seqn-tail "expects a sequence with at least ~e element(s)" i)) + (error 'stream-tail "expects a sequence with at least ~e element(s)" i)) (next) (loop (sub1 n)))) (values @@ -105,7 +105,7 @@ (λ _ #t) (λ _ #t))))) - (define (-seqn-append s0 l) + (define (-stream-append s0 l) (if (null? l) s0 (make-do-sequence @@ -133,14 +133,14 @@ (λ _ #t) (λ _ #t)))))) - (define (seqn-append . l) + (define (stream-append . l) (unless (andmap sequence? l) - (error 'seqn-append "expects only sequence arguments, given ~e" l)) - (-seqn-append empty-seqn l)) + (error 'stream-append "expects only sequence arguments, given ~e" l)) + (-stream-append empty-stream l)) - (define (seqn-map f s) + (define (stream-map f s) (unless (procedure? f) - (error 'seqn-map "expects a procedure as the first argument, given ~e" f)) + (error 'stream-map "expects a procedure as the first argument, given ~e" f)) (make-do-sequence (λ () (define-values (more? next) (sequence-generate s)) @@ -152,37 +152,37 @@ (λ _ #t) (λ _ #t))))) - (define (seqn-andmap f s) + (define (stream-andmap f s) (define-values (more? next) (sequence-generate s)) (let loop () (if (more?) (and (call-with-values next f) (loop)) #t))) - (define (seqn-ormap f s) + (define (stream-ormap f s) (define-values (more? next) (sequence-generate s)) (let loop () (if (more?) (or (call-with-values next f) (loop)) #f))) - (define (seqn-for-each f s) + (define (stream-for-each f s) (define-values (more? next) (sequence-generate s)) (let loop () (when (more?) (call-with-values next f) (loop)))) - (define (seqn-fold f i s) + (define (stream-fold f i s) (define-values (more? next) (sequence-generate s)) (let loop ([i i]) (if (more?) (loop (call-with-values next (λ e (apply f i e)))) i))) - (define (seqn-filter f s) + (define (stream-filter f s) (unless (procedure? f) - (error 'seqn-filter "expects a procedure as the first argument, given ~e" f)) + (error 'stream-filter "expects a procedure as the first argument, given ~e" f)) (make-do-sequence (λ () (define-values (more? next) (sequence-generate s)) @@ -204,7 +204,7 @@ (λ _ #t) (λ _ #t))))) - (define (seqn-add-between s e) + (define (stream-add-between s e) (make-do-sequence (λ () (define-values (more? next) (sequence-generate s)) @@ -222,9 +222,9 @@ (λ _ #t) (λ _ #t))))) - (define (seqn-count f s) + (define (stream-count f s) (unless (procedure? f) - (error 'seqn-count "expects a procedure as the first argument, given ~e" f)) + (error 'stream-count "expects a procedure as the first argument, given ~e" f)) (define-values (more? next) (sequence-generate s)) (let loop ([n 0]) (if (more?) @@ -233,20 +233,20 @@ (loop n)) n))) - (provide empty-seqn - seqn->list - seqn-cons - seqn-first - seqn-rest - seqn-length - seqn-ref - seqn-tail - seqn-append - seqn-map - seqn-andmap - seqn-ormap - seqn-for-each - seqn-fold - seqn-filter - seqn-add-between - seqn-count)) \ No newline at end of file + (provide empty-stream + stream->list + stream-cons + stream-first + stream-rest + stream-length + stream-ref + stream-tail + stream-append + stream-map + stream-andmap + stream-ormap + stream-for-each + stream-fold + stream-filter + stream-add-between + stream-count)) diff --git a/collects/scribblings/reference/sequences.scrbl b/collects/scribblings/reference/sequences.scrbl index bd11e88f713..fadcc00919c 100644 --- a/collects/scribblings/reference/sequences.scrbl +++ b/collects/scribblings/reference/sequences.scrbl @@ -326,86 +326,86 @@ in the sequence. @; ---------------------------------------------------------------------- @section{Additional Sequence Operations} -@defthing[empty-seqn sequence?]{ +@defthing[empty-stream sequence?]{ A sequence with no elements.} -@defproc[(seqn->list [s sequence?]) list?]{ +@defproc[(stream->list [s sequence?]) list?]{ Returns a list whose elements are the elements of the @scheme[s], which must be a one-valued sequence. If @scheme[s] is infinite, this function does not terminate.} -@defproc[(seqn-cons [v any/c] - ... - [s sequence?]) +@defproc[(stream-cons [v any/c] + ... + [s sequence?]) sequence?]{ Returns a sequence whose first element is @scheme[(values v ...)] and whose remaining elements are the same as @scheme[s].} -@defproc[(seqn-first [s sequence?]) +@defproc[(stream-first [s sequence?]) (values any/c ...)]{ Returns the first element of @scheme[s].} -@defproc[(seqn-rest [s sequence?]) +@defproc[(stream-rest [s sequence?]) sequence?]{ Returns a sequence equivalent to @scheme[s], except the first element is omitted.} -@defproc[(seqn-length [s sequence?]) +@defproc[(stream-length [s sequence?]) exact-nonnegative-integer?]{ Returns the number of elements of @scheme[s]. If @scheme[s] is infinite, this function does not terminate.} -@defproc[(seqn-ref [s sequence?] [i exact-nonnegative-integer?]) +@defproc[(stream-ref [s sequence?] [i exact-nonnegative-integer?]) (values any/c ...)]{ Returns the @scheme[i]th element of @scheme[s].} -@defproc[(seqn-tail [s sequence?] [i exact-nonnegative-integer?]) +@defproc[(stream-tail [s sequence?] [i exact-nonnegative-integer?]) sequence?]{ Returns a sequence equivalent to @scheme[s], except the first @scheme[i] elements are omitted.} -@defproc[(seqn-append [s sequence?] ...) +@defproc[(stream-append [s sequence?] ...) sequence?]{ Returns a sequence that contains all elements of each sequence in the order they appear in the original sequences. The new sequence is constructed lazily.} -@defproc[(seqn-map [f procedure?] - [s sequence?]) +@defproc[(stream-map [f procedure?] + [s sequence?]) sequence?]{ Returns a sequence that contains @scheme[f] applied to each element of @scheme[s]. The new sequence is constructed lazily.} -@defproc[(seqn-andmap [f (-> any/c ... boolean?)] - [s sequence?]) +@defproc[(stream-andmap [f (-> any/c ... boolean?)] + [s sequence?]) boolean?]{ Returns @scheme[#t] if @scheme[f] returns a true result on every element of @scheme[s]. If @scheme[s] is infinite and @scheme[f] never returns a false result, this function does not terminate.} -@defproc[(seqn-ormap [f (-> any/c ... boolean?)] - [s sequence?]) +@defproc[(stream-ormap [f (-> any/c ... boolean?)] + [s sequence?]) boolean?]{ Returns @scheme[#t] if @scheme[f] returns a true result on some element of @scheme[s]. If @scheme[s] is infinite and @scheme[f] never returns a true result, this function does not terminate.} -@defproc[(seqn-for-each [f (-> any/c ... any)] - [s sequence?]) +@defproc[(stream-for-each [f (-> any/c ... any)] + [s sequence?]) (void)]{ Applies @scheme[f] to each element of @scheme[s]. If @scheme[s] is infinite, this function does not terminate.} -@defproc[(seqn-fold [f (-> any/c any/c ... any/c)] - [i any/c] - [s sequence?]) +@defproc[(stream-fold [f (-> any/c any/c ... any/c)] + [i any/c] + [s sequence?]) (void)]{ Folds @scheme[f] over each element of @scheme[s] with @scheme[i] as the initial accumulator. If @scheme[s] is infinite, this function does not terminate.} -@defproc[(seqn-filter [f (-> any/c ... boolean?)] - [s sequence?]) +@defproc[(stream-filter [f (-> any/c ... boolean?)] + [s sequence?]) sequence?]{ Returns a sequence whose elements are the elements of @scheme[s] for which @scheme[f] returns a true result. Although the new sequence is @@ -414,13 +414,13 @@ in the sequence. @scheme[f] returns a true result then operations on this sequence will not terminate during that infinite sub-sequence.} -@defproc[(seqn-add-between [s sequence?] [e any/c]) +@defproc[(stream-add-between [s sequence?] [e any/c]) sequence?]{ Returns a sequence whose elements are the elements of @scheme[s] except in between each is @scheme[e]. The new sequence is constructed lazily.} -@defproc[(seqn-count [f procedure?] [s sequence?]) +@defproc[(stream-count [f procedure?] [s sequence?]) exact-nonnegative-integer?]{ Returns the number of elements in @scheme[s] for which @scheme[f] returns a true result. If @scheme[s] is infinite, this function does diff --git a/collects/tests/racket/for.rktl b/collects/tests/racket/for.rktl index d03c4782276..36d10bb1e08 100644 --- a/collects/tests/racket/for.rktl +++ b/collects/tests/racket/for.rktl @@ -352,105 +352,110 @@ ;; New operators (require racket/private/sequence) -(test '(0 1 2) 'seqn->list (seqn->list (in-range 3))) -(arity-test seqn->list 1 1) -(err/rt-test (seqn->list 1)) +(test '(0 1 2) 'stream->list (stream->list (in-range 3))) +(arity-test stream->list 1 1) +(err/rt-test (stream->list 1)) -(test '() 'empty-seqn (seqn->list empty-seqn)) +(test '() 'empty-stream (stream->list empty-stream)) ; XXX How do I check rest arity? -(test '(0 1 2) 'seqn-cons (seqn->list (seqn-cons 0 (in-range 1 3)))) -(test '((0 1)) 'seqn-cons - (for/list ([(a b) (seqn-cons 0 1 empty-seqn)]) +(test '(0 1 2) 'stream-cons (stream->list (stream-cons 0 (in-range 1 3)))) +(test '((0 1)) 'stream-cons + (for/list ([(a b) (stream-cons 0 1 empty-stream)]) (list a b))) -(arity-test seqn-first 1 1) -(err/rt-test (seqn-first 1)) -(test 0 'seqn-first (seqn-first (in-naturals))) +(arity-test stream-first 1 1) +(err/rt-test (stream-first 1)) +(test 0 'stream-first (stream-first (in-naturals))) (test #t - 'seqn-first + 'stream-first (equal? (list 0 1) (call-with-values (λ () - (seqn-first (seqn-cons 0 1 empty-seqn))) + (stream-first (stream-cons 0 1 empty-stream))) (λ args args)))) -(arity-test seqn-rest 1 1) -(test '(1 2) 'seqn-rest (seqn->list (seqn-rest (in-range 3)))) - -(arity-test seqn-length 1 1) -(err/rt-test (seqn-length 1)) -(test 3 'seqn-length (seqn-length (in-range 3))) -(test 3 'seqn-length (seqn-length #hasheq((1 . 'a) (2 . 'b) (3 . 'c)))) - -(arity-test seqn-ref 2 2) -(err/rt-test (seqn-ref 2 0)) -(err/rt-test (seqn-ref (in-naturals) -1) exn:fail?) -(err/rt-test (seqn-ref (in-naturals) 1.0) exn:fail?) -(test 0 'seqn-ref (seqn-ref (in-naturals) 0)) -(test 1 'seqn-ref (seqn-ref (in-naturals) 1)) -(test 25 'seqn-ref (seqn-ref (in-naturals) 25)) - -(arity-test seqn-tail 2 2) -(err/rt-test (seqn-tail (in-naturals) -1) exn:fail?) -(err/rt-test (seqn-tail (in-naturals) 1.0) exn:fail?) -(test 4 'seqn-ref (seqn-ref (seqn-tail (in-naturals) 4) 0)) -(test 5 'seqn-ref (seqn-ref (seqn-tail (in-naturals) 4) 1)) -(test 29 'seqn-ref (seqn-ref (seqn-tail (in-naturals) 4) 25)) +(arity-test stream-rest 1 1) +(test '(1 2) 'stream-rest (stream->list (stream-rest (in-range 3)))) + +(arity-test stream-length 1 1) +(err/rt-test (stream-length 1)) +(test 3 'stream-length (stream-length (in-range 3))) +(test 3 'stream-length (stream-length #hasheq((1 . 'a) (2 . 'b) (3 . 'c)))) + +(arity-test stream-ref 2 2) +(err/rt-test (stream-ref 2 0)) +(err/rt-test (stream-ref (in-naturals) -1) exn:fail?) +(err/rt-test (stream-ref (in-naturals) 1.0) exn:fail?) +(test 0 'stream-ref (stream-ref (in-naturals) 0)) +(test 1 'stream-ref (stream-ref (in-naturals) 1)) +(test 25 'stream-ref (stream-ref (in-naturals) 25)) + +(arity-test stream-tail 2 2) +(err/rt-test (stream-tail (in-naturals) -1) exn:fail?) +(err/rt-test (stream-tail (in-naturals) 1.0) exn:fail?) +(test 4 'stream-ref (stream-ref (stream-tail (in-naturals) 4) 0)) +(test 5 'stream-ref (stream-ref (stream-tail (in-naturals) 4) 1)) +(test 29 'stream-ref (stream-ref (stream-tail (in-naturals) 4) 25)) ; XXX Check for rest -(err/rt-test (seqn-append 1) exn:fail?) -(err/rt-test (seqn-append (in-naturals) 1) exn:fail?) -(test '() 'seqn-append (seqn->list (seqn-append))) -(test 5 'seqn-append (seqn-ref (seqn-append (in-naturals)) 5)) -(test 5 'seqn-append (seqn-ref (seqn-append (in-range 3) (in-range 3 10)) 5)) - -(arity-test seqn-map 2 2) -(err/rt-test (seqn-map 2 (in-naturals)) exn:fail?) -(test '(1 2 3) 'seqn-map (seqn->list (seqn-map add1 (in-range 3)))) -(test 3 'seqn-map (seqn-ref (seqn-map add1 (in-naturals)) 2)) - -(arity-test seqn-andmap 2 2) -(err/rt-test (seqn-andmap 2 (in-naturals))) -(test #t 'seqn-andmap (seqn-andmap even? (seqn-cons 2 empty-seqn))) -(test #f 'seqn-andmap (seqn-andmap even? (in-naturals))) - -(arity-test seqn-ormap 2 2) -(err/rt-test (seqn-ormap 2 (in-naturals))) -(test #t 'seqn-ormap (seqn-ormap even? (seqn-cons 2 empty-seqn))) -(test #f 'seqn-ormap (seqn-ormap even? (seqn-cons 1 empty-seqn))) -(test #t 'seqn-ormap (seqn-ormap even? (in-naturals))) - -(arity-test seqn-for-each 2 2) -(err/rt-test (seqn-for-each 2 (in-naturals))) +(err/rt-test (stream-append 1) exn:fail?) +(err/rt-test (stream-append (in-naturals) 1) exn:fail?) +(test '() 'stream-append (stream->list (stream-append))) +(test 5 'stream-append (stream-ref (stream-append (in-naturals)) 5)) +(test 5 'stream-append + (stream-ref (stream-append (in-range 3) (in-range 3 10)) 5)) + +(arity-test stream-map 2 2) +(err/rt-test (stream-map 2 (in-naturals)) exn:fail?) +(test '(1 2 3) 'stream-map (stream->list (stream-map add1 (in-range 3)))) +(test 3 'stream-map (stream-ref (stream-map add1 (in-naturals)) 2)) + +(arity-test stream-andmap 2 2) +(err/rt-test (stream-andmap 2 (in-naturals))) +(test #t 'stream-andmap (stream-andmap even? (stream-cons 2 empty-stream))) +(test #f 'stream-andmap (stream-andmap even? (in-naturals))) + +(arity-test stream-ormap 2 2) +(err/rt-test (stream-ormap 2 (in-naturals))) +(test #t 'stream-ormap (stream-ormap even? (stream-cons 2 empty-stream))) +(test #f 'stream-ormap (stream-ormap even? (stream-cons 1 empty-stream))) +(test #t 'stream-ormap (stream-ormap even? (in-naturals))) + +(arity-test stream-for-each 2 2) +(err/rt-test (stream-for-each 2 (in-naturals))) (test (vector 0 1 2) - 'seqn-for-each + 'stream-for-each (let ([v (vector #f #f #f)]) - (seqn-for-each (λ (i) (vector-set! v i i)) (in-range 3)) + (stream-for-each (λ (i) (vector-set! v i i)) (in-range 3)) v)) -(arity-test seqn-fold 3 3) -(err/rt-test (seqn-fold 2 (in-naturals) 0)) -(test 6 'seqn-fold (seqn-fold + 0 (in-range 4))) - -(arity-test seqn-filter 2 2) -(err/rt-test (seqn-filter 2 (in-naturals)) exn:fail?) -(test 4 'seqn-filter (seqn-ref (seqn-filter even? (in-naturals)) 2)) - -(arity-test seqn-add-between 2 2) -(test 0 'seqn-add-between (seqn-ref (seqn-add-between (in-naturals) #t) 0)) -(test #t 'seqn-add-between (seqn-ref (seqn-add-between (in-naturals) #t) 1)) -(test 1 'seqn-add-between (seqn-ref (seqn-add-between (in-naturals) #t) 2)) -(test #t 'seqn-add-between (seqn-ref (seqn-add-between (in-naturals) #t) 3)) - -(arity-test seqn-count 2 2) -(test 0 'seqn-count (seqn-count even? empty-seqn)) -(test 1 'seqn-count (seqn-count even? (in-range 1))) -(test 5 'seqn-count (seqn-count even? (in-range 10))) +(arity-test stream-fold 3 3) +(err/rt-test (stream-fold 2 (in-naturals) 0)) +(test 6 'stream-fold (stream-fold + 0 (in-range 4))) + +(arity-test stream-filter 2 2) +(err/rt-test (stream-filter 2 (in-naturals)) exn:fail?) +(test 4 'stream-filter (stream-ref (stream-filter even? (in-naturals)) 2)) + +(arity-test stream-add-between 2 2) +(test 0 'stream-add-between + (stream-ref (stream-add-between (in-naturals) #t) 0)) +(test #t 'stream-add-between + (stream-ref (stream-add-between (in-naturals) #t) 1)) +(test 1 'stream-add-between + (stream-ref (stream-add-between (in-naturals) #t) 2)) +(test #t 'stream-add-between + (stream-ref (stream-add-between (in-naturals) #t) 3)) + +(arity-test stream-count 2 2) +(test 0 'stream-count (stream-count even? empty-stream)) +(test 1 'stream-count (stream-count even? (in-range 1))) +(test 5 'stream-count (stream-count even? (in-range 10))) (let* ([r (random 100)] [a (if (even? r) (/ r 2) (ceiling (/ r 2)))]) - (test a 'seqn-count (seqn-count even? (in-range r)))) + (test a 'stream-count (stream-count even? (in-range r)))) (report-errs) diff --git a/collects/tests/racket/stress/sequence.rkt b/collects/tests/racket/stress/sequence.rkt index 229c57220aa..ebbca86f48b 100644 --- a/collects/tests/racket/stress/sequence.rkt +++ b/collects/tests/racket/stress/sequence.rkt @@ -1,12 +1,13 @@ #lang racket (require tests/stress) -; seqn-first -; This ignores the greater flexiblity of seqn-first to have more than single-valued sequences +;; stream-first +;; This ignores the greater flexiblity of stream-first to have more than +;; single-valued sequences (stress 200 - ["seqn-first" - (seqn-first (in-naturals))] + ["stream-first" + (stream-first (in-naturals))] ["for/or (val)" (define s (in-naturals)) (for/or ([n s]) @@ -15,12 +16,12 @@ (for/or ([n (in-naturals)]) n)]) -; seqn-length -; The for/fold must be rewritten slightly differently for multi-valued +;; stream-length +;; The for/fold must be rewritten slightly differently for multi-valued (stress 20 - ["seqn-length" - (seqn-length (in-range 2000))] + ["stream-length" + (stream-length (in-range 2000))] ["for/fold (val)" (define s (in-range 2000)) (for/fold ([len 0]) @@ -31,12 +32,12 @@ ([i (in-range 2000)]) (add1 len))]) -; seqn-ref -; Ditto +;; stream-ref +;; Ditto (stress 20 - ["seqn-ref" - (seqn-ref (in-range 2000) 200)] + ["stream-ref" + (stream-ref (in-range 2000) 200)] ["for/or val" (define s (in-range 2000)) (for/or ([e s] @@ -49,12 +50,12 @@ #:when (i . = . 199)) e)]) -; seqn-andmap -; ditto +;; stream-andmap +;; ditto (stress 20 - ["seqn-andmap" - (seqn-andmap number? (in-range 2000))] + ["stream-andmap" + (stream-andmap number? (in-range 2000))] ["for/and val" (define s (in-range 2000)) (for/and ([e s]) @@ -63,12 +64,12 @@ (for/and ([e (in-range 2000)]) (number? e))]) -; seqn-ormap -; ditto +;; stream-ormap +;; ditto (stress 20 - ["seqn-ormap" - (seqn-ormap string? (in-range 2000))] + ["stream-ormap" + (stream-ormap string? (in-range 2000))] ["for/and val" (define s (in-range 2000)) (for/or ([e s]) @@ -77,12 +78,12 @@ (for/or ([e (in-range 2000)]) (string? e))]) -; seqn-fold -; The for/fold must be rewritten slightly differently for multi-valued +;; stream-fold +;; The for/fold must be rewritten slightly differently for multi-valued (stress 20 - ["seqn-fold" - (seqn-fold + 0 (in-range 2000))] + ["stream-fold" + (stream-fold + 0 (in-range 2000))] ["for/fold (val)" (define s (in-range 2000)) (for/fold ([sum 0]) @@ -93,12 +94,12 @@ ([i (in-range 2000)]) (+ i sum))]) -; seqn-count -; The for/fold must be rewritten slightly differently for multi-valued +;; stream-count +;; The for/fold must be rewritten slightly differently for multi-valued (stress 20 - ["seqn-count" - (seqn-count even? (in-range 2000))] + ["stream-count" + (stream-count even? (in-range 2000))] ["for/fold (val)" (define s (in-range 2000)) (for/fold ([num 0]) @@ -110,4 +111,3 @@ ([i (in-range 2000)] #:when (even? i)) (add1 num))]) - From ddf8fadf182f7824be10918268b45d6cb7f11f5b Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Thu, 21 Oct 2010 19:48:00 -0400 Subject: [PATCH 035/441] Rename `sequence' library to `stream', move from `racket/base' to `racket'. (cherry picked from commit 9e302a7106f5cbfe3e08c2d6ae17775ce70ac8f6) --- collects/racket/main.rkt | 2 ++ collects/racket/private/base.rkt | 7 ++----- .../racket/{private/sequence.rkt => stream.rkt} | 4 ++-- collects/scribblings/reference/pairs.scrbl | 15 ++++++++++----- collects/scribblings/reference/sequences.scrbl | 12 +++++++----- 5 files changed, 23 insertions(+), 17 deletions(-) rename collects/racket/{private/sequence.rkt => stream.rkt} (99%) diff --git a/collects/racket/main.rkt b/collects/racket/main.rkt index b83e18b3721..dbd5f73fc9c 100644 --- a/collects/racket/main.rkt +++ b/collects/racket/main.rkt @@ -23,6 +23,7 @@ racket/cmdline racket/promise racket/bool + racket/stream racket/local racket/system (for-syntax racket/base)) @@ -50,6 +51,7 @@ racket/cmdline racket/promise racket/bool + racket/stream racket/local racket/system) (for-syntax (all-from-out racket/base))) diff --git a/collects/racket/private/base.rkt b/collects/racket/private/base.rkt index 34b54f8c042..a1e784a3339 100644 --- a/collects/racket/private/base.rkt +++ b/collects/racket/private/base.rkt @@ -1,7 +1,6 @@ (module base "pre-base.rkt" - - (#%require "sequence.rkt" - "hash.rkt" + + (#%require "hash.rkt" "list.rkt" "string.rkt" "stxcase-scheme.rkt" @@ -23,7 +22,6 @@ regexp-replace* new-apply-proc) struct - (all-from "sequence.rkt") (all-from "hash.rkt") (all-from "list.rkt") (all-from-except "string.rkt" @@ -43,4 +41,3 @@ (rename -with-output-to-file with-output-to-file) call-with-input-file* call-with-output-file*)) - diff --git a/collects/racket/private/sequence.rkt b/collects/racket/stream.rkt similarity index 99% rename from collects/racket/private/sequence.rkt rename to collects/racket/stream.rkt index 425ce1fdf06..188adc85d23 100644 --- a/collects/racket/private/sequence.rkt +++ b/collects/racket/stream.rkt @@ -1,5 +1,5 @@ -(module sequence "pre-base.rkt" - (require "list.rkt") +(module stream "private/pre-base.rkt" + (require "private/list.rkt") (define empty-stream (make-do-sequence diff --git a/collects/scribblings/reference/pairs.scrbl b/collects/scribblings/reference/pairs.scrbl index 28abda429d6..ad003860aea 100644 --- a/collects/scribblings/reference/pairs.scrbl +++ b/collects/scribblings/reference/pairs.scrbl @@ -668,29 +668,34 @@ Like @scheme[assoc], but finds an element using the predicate @(interaction-eval #:eval list-eval (require racket/list (only-in racket/function negate))) -@defthing[empty null?]{The empty list. +@defthing[empty null?]{ +The empty list. @mz-examples[#:eval list-eval empty (eq? empty null) ]} -@defproc[(cons? [v any/c]) boolean?]{The same as @scheme[(pair? v)]. +@defproc[(cons? [v any/c]) boolean?]{ +The same as @scheme[(pair? v)]. @mz-examples[#:eval list-eval (cons? '(1 2)) ]} -@defproc[(empty? [v any/c]) boolean?]{The same as @scheme[(null? v)]. +@defproc[(empty? [v any/c]) boolean?]{ +The same as @scheme[(null? v)]. @mz-examples[#:eval list-eval (empty? '(1 2)) (empty? '()) ]} -@defproc[(first [lst list?]) any/c]{The same as @scheme[(car lst)], but only for lists (that are not empty). +@defproc[(first [lst list?]) any/c]{ +The same as @scheme[(car lst)], but only for lists (that are not empty). @mz-examples[#:eval list-eval (first '(1 2 3 4 5 6 7 8 9 10)) ]} -@defproc[(rest [lst list?]) list?]{The same as @scheme[(cdr lst)], but only for lists (that are not empty). +@defproc[(rest [lst list?]) list?]{ +The same as @scheme[(cdr lst)], but only for lists (that are not empty). @mz-examples[#:eval list-eval (rest '(1 2 3 4 5 6 7 8 9 10)) diff --git a/collects/scribblings/reference/sequences.scrbl b/collects/scribblings/reference/sequences.scrbl index fadcc00919c..603271f5c13 100644 --- a/collects/scribblings/reference/sequences.scrbl +++ b/collects/scribblings/reference/sequences.scrbl @@ -5,11 +5,6 @@ (for-label racket/generator racket/mpair)) -@(define generator-eval - (let ([the-eval (make-base-eval)]) - (the-eval '(require racket/generator)) - the-eval)) - @(define (info-on-seq where what) @margin-note{See @secref[where] for information on using @|what| as sequences.}) @@ -326,6 +321,8 @@ in the sequence. @; ---------------------------------------------------------------------- @section{Additional Sequence Operations} +@note-lib[racket/stream] + @defthing[empty-stream sequence?]{ A sequence with no elements.} @@ -441,6 +438,11 @@ in the sequence. @section{Iterator Generators} @defmodule[racket/generator] +@(define generator-eval + (let ([the-eval (make-base-eval)]) + (the-eval '(require racket/generator)) + the-eval)) + @defform[(generator () body ...)]{ Creates a function that returns a value through @scheme[yield], each time it is invoked. When the generator runs out of values to yield, From 750676a78c06891677a1e84c37ec6ececcd71df6 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Thu, 21 Oct 2010 20:25:37 -0400 Subject: [PATCH 036/441] Fix require in test suite (cherry picked from commit aebf9e77eff197049f5201785d3a37877a79aa2a) --- collects/tests/racket/for.rktl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collects/tests/racket/for.rktl b/collects/tests/racket/for.rktl index 36d10bb1e08..378936c9e8c 100644 --- a/collects/tests/racket/for.rktl +++ b/collects/tests/racket/for.rktl @@ -350,7 +350,7 @@ (maker) (maker) (maker)))) ;; New operators -(require racket/private/sequence) +(require racket/stream) (test '(0 1 2) 'stream->list (stream->list (in-range 3))) (arity-test stream->list 1 1) From b845c05e7db6e805806fd0a93792126b9d5da41f Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Thu, 21 Oct 2010 20:50:57 -0400 Subject: [PATCH 037/441] Another "/proj/scheme/" -> "/proj/racket" change. (cherry picked from commit f51fd94412c009957db4c61f18801d3c900748f8) --- collects/meta/build/build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/collects/meta/build/build b/collects/meta/build/build index d642f1457c4..5282ae073a6 100755 --- a/collects/meta/build/build +++ b/collects/meta/build/build @@ -76,7 +76,7 @@ defbuild() { # required). Warning: an `eval "foo=\"bar\""' is used to assign values. msets "/machines/D" "workdir=/var/tmp" "moveto=" "copytobak=" \ "configure_args=" "LDFLAGS=" "ext_lib_paths=" "renice=" -# defbuild "ccs-solaris" "sparc-solaris" "moveto=/proj/scheme" \ +# defbuild "ccs-solaris" "sparc-solaris" "moveto=/proj/racket" \ # "ext_lib_paths=/arch/unix/packages/openssl-0.9.7e" defbuild "pitcairn" "i386-win32" \ "workdir=f:" # no "/..." path (that can get interpreted as a flag) @@ -90,7 +90,7 @@ defbuild "macintel" "i386-osx-mac" \ "configure_args=--enable-sdk=/Developer/SDKs/MacOSX10.4u.sdk" # defbuild "galaga" "i386-linux-ubuntu-hardy" defbuild "champlain" "i386-linux-f12" -defbuild "ccs-linux" "i386-linux-ubuntu-jaunty" "moveto=/proj/scheme" +defbuild "ccs-linux" "i386-linux-ubuntu-jaunty" "moveto=/proj/racket" # defbuild "punge" "i386-linux-ubuntu-jaunty" "renice=20" # defbuild "bjorn" "i386-linux-gcc2" # defbuild "chicago" "i386-linux-debian" From b7ccf8d91ece9d6729bdb99b4100173d3f3514c7 Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Fri, 22 Oct 2010 14:43:58 -0500 Subject: [PATCH 038/441] fixed an (apparently VERY old) problem with lights out and the built-in boards please merge to release branch (cherry picked from commit 4f236386a97684fb622e96452564d0abec6acd14) --- collects/games/lights-out/board.rkt | 18 ++-- collects/games/lights-out/boards.rkt | 129 ++++++++++++++------------- 2 files changed, 79 insertions(+), 68 deletions(-) diff --git a/collects/games/lights-out/board.rkt b/collects/games/lights-out/board.rkt index 46f922b7075..bda7a8b7ba1 100644 --- a/collects/games/lights-out/board.rkt +++ b/collects/games/lights-out/board.rkt @@ -51,11 +51,14 @@ 6)] [button-panel (make-object horizontal-panel% dialog)] [cancel? #t] - [ok (make-object button% "OK" - button-panel - (lambda x - (set! cancel? #f) - (send dialog show #f)))] + [ok (new button% + [label "OK"] + [parent button-panel] + [style '(border)] + [callback + (lambda x + (set! cancel? #f) + (send dialog show #f))])] [cancel (make-object button% "Cancel" button-panel (lambda x @@ -76,9 +79,12 @@ (send random-slider get-value) (lambda (x) (make-vector (send random-slider get-value) 'o)))] [(prebuilt) - (board-board (list-ref boards (send prebuilt get-selection)))])))) + (to-vectors (board-board (list-ref boards (send prebuilt get-selection))))])))) (new-board))) + (define (to-vectors lsts) + (apply vector (map (λ (x) (apply vector x)) lsts))) + '(define (build-vector n f) (list->vector (let loop ([n n]) diff --git a/collects/games/lights-out/boards.rkt b/collects/games/lights-out/boards.rkt index 1c727ef7217..7886fc1ebb2 100644 --- a/collects/games/lights-out/boards.rkt +++ b/collects/games/lights-out/boards.rkt @@ -1,64 +1,69 @@ -(module boards mzscheme - (provide boards - (struct board (name board))) +#lang racket/base +(require racket/vector) - (define-struct board (name board)) +(provide boards + (struct-out board)) - (define boards - (list - (make-board - "1" - #(#(o o o o o) - #(o o o o o) - #(x o x o x) - #(o o o o o) - #(o o o o o))) - (make-board - "2" - #(#(x o x o x) - #(x o x o x) - #(o o o o o) - #(x o x o x) - #(x o x o x))) - (make-board - "3" - #(#(o x o x o) - #(x x o x x) - #(x x o x x) - #(x x o x x) - #(o x o x o))) - (make-board - "4" - #(#(o o o o o) - #(x x o x x) - #(o o o o o) - #(x o o o x) - #(x x o x x))) - (make-board - "5" - #(#(x x x x o) - #(x x x o x) - #(x x x o x) - #(o o o x x) - #(x x o x x))) - (make-board - "6" - #(#(o o o o o) - #(o o o o o) - #(x o x o x) - #(x o x o x) - #(o x x x o))) - (make-board - "7" - #(#(x x x x o) - #(x o o o x) - #(x o o o x) - #(x o o o x) - #(x x x x o))) - (make-board - "Diagonal" - #(#(o o o o x) - #(o o o x o) - #(o o x o o) - #(o x o o o) - #(x o o o o)))))) +(define-struct board (name board)) + +(define (build-board name vec) + (make-board name (vector-map vector-copy vec))) + +(define boards + (list + (make-board + "1" + '((o o o o o) + (o o o o o) + (x o x o x) + (o o o o o) + (o o o o o))) + (make-board + "2" + '((x o x o x) + (x o x o x) + (o o o o o) + (x o x o x) + (x o x o x))) + (make-board + "3" + '((o x o x o) + (x x o x x) + (x x o x x) + (x x o x x) + (o x o x o))) + (make-board + "4" + '((o o o o o) + (x x o x x) + (o o o o o) + (x o o o x) + (x x o x x))) + (make-board + "5" + '((x x x x o) + (x x x o x) + (x x x o x) + (o o o x x) + (x x o x x))) + (make-board + "6" + '((o o o o o) + (o o o o o) + (x o x o x) + (x o x o x) + (o x x x o))) + (make-board + "7" + '((x x x x o) + (x o o o x) + (x o o o x) + (x o o o x) + (x x x x o))) + (make-board + "Diagonal" + '((o o o o x) + (o o o x o) + (o o x o o) + (o x o o o) + (x o o o o))))) From 14222dc0e46f8cf84f9bf7933169e061bc660cc9 Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Fri, 22 Oct 2010 14:47:55 -0500 Subject: [PATCH 039/441] rleease notes. please merge to release branch. (cherry picked from commit aa056efb7487806953bbb623e0b0cb23a3c77e24) --- doc/release-notes/drracket/HISTORY.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/release-notes/drracket/HISTORY.txt b/doc/release-notes/drracket/HISTORY.txt index 93a6c473df2..e2fe0a551d7 100644 --- a/doc/release-notes/drracket/HISTORY.txt +++ b/doc/release-notes/drracket/HISTORY.txt @@ -1,3 +1,7 @@ +------------------------------ + Version 5.0.2 +------------------------------ + . Added image->color-list and color-list->bitmap to 2htdp/image From c0f1013b51c172b7be29d45dc5284b4baf8697e0 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Fri, 22 Oct 2010 14:07:12 -0600 Subject: [PATCH 040/441] adjust release notes for 5.0.2 Merge to 5.0.2 (cherry picked from commit 0b73790ac0097cad30281471833f61df25184463) --- doc/release-notes/gracket/HISTORY.txt | 6 ++++++ doc/release-notes/racket/HISTORY.txt | 21 ++++++--------------- 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/doc/release-notes/gracket/HISTORY.txt b/doc/release-notes/gracket/HISTORY.txt index ccd6fb4f811..51602102b35 100644 --- a/doc/release-notes/gracket/HISTORY.txt +++ b/doc/release-notes/gracket/HISTORY.txt @@ -1,3 +1,9 @@ +Version 5.0.2, October 2010 + +Minor bug fixes + +---------------------------------------------------------------------- + Version 5.0.1, July 2010 Minor bug fixes diff --git a/doc/release-notes/racket/HISTORY.txt b/doc/release-notes/racket/HISTORY.txt index 77a95f3de82..0f6925afc54 100644 --- a/doc/release-notes/racket/HISTORY.txt +++ b/doc/release-notes/racket/HISTORY.txt @@ -1,6 +1,8 @@ -Version 5.0.1.8 +Version 5.0.2, October 2010 Changed body of `when', `unless', `cond' clauses, `case' clauses, and `match' clauses to be internal-definition contexts +Added ->i to the contract library, improved ->*, adding #:pre and + #:post, as well as making the optional arguments clause optional. Added #true and #false, and changed #t/#T and #f/#F to require a delimiter afterward Added print-boolean-long-form @@ -9,25 +11,14 @@ Added read-accept-lang, which is set to #t when Added flonum? Changed continuation-marks to accept a #f argument to produce an empty set of marks - -Version 5.0.1.7 Added fxvectors Added unsafe-{s,u}16-{ref,set!} - -Version 5.0.1.6 Added prop:proxy-of - -Version 5.0.1.5 Added proxies to go with chaperones, and renamed chaperone property - as proxy property - -Version 5.0.1.3 -Added ->i to the contract library, improved ->*, adding #:pre and - #:post, as well as making the optional arguments clause optional. - -Version 5.0.1.2 + as proxy property; beware that the word "proxy" will change in + a future version, perhaps to "impersonator" Added collection-file-path and collection splicing at the file -level + level Version 5.0.1, July 2010 Continuation barriers now block only downward continuation jumps From 199895e52fdf2e224a0f98a239addf722997179e Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Fri, 22 Oct 2010 19:43:21 -0600 Subject: [PATCH 041/441] fix PPC JIT `vector-length' Merge to 5.0.2 (cherry picked from commit 93ba544c60b80693bb7d0db3cc8393e44a57b3dc) --- src/racket/src/jit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/racket/src/jit.c b/src/racket/src/jit.c index e1952071ec6..8d32ea8229a 100644 --- a/src/racket/src/jit.c +++ b/src/racket/src/jit.c @@ -7051,7 +7051,7 @@ static int generate_inlined_unary(mz_jit_state *jitter, Scheme_App2_Rec *app, in (void)jit_calli(bad_fxvector_length_code); else { (void)jit_calli(bad_vector_length_code); - jit_retval(JIT_R0); + /* can return with updated R0 */ } /* bad_vector_length_code may unpack a proxied object */ @@ -8725,7 +8725,7 @@ static int generate_inlined_nary(mz_jit_state *jitter, Scheme_App_Rec *app, int mz_rs_sync(); JIT_UPDATE_THREAD_RSPTR_IF_NEEDED(); mz_prepare(0); - mz_finish(scheme_current_future); + (void)mz_finish(scheme_current_future); jit_retval(JIT_R0); return 1; } else if (!for_branch) { From 617daddbd738792e8e02c5cba4a39bdc3ac496cb Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Fri, 22 Oct 2010 21:19:18 -0600 Subject: [PATCH 042/441] fix bogus reordering of floating-point args in unboxing mode Merge to 5.0.2 Closes PR 11272 (cherry picked from commit c512dbd6d3029c81b5c9e4c203c600837a0bfda6) --- collects/tests/racket/unsafe.rktl | 18 ++++++++++++++++++ src/racket/src/jit.c | 24 +++++++++++++++++++----- 2 files changed, 37 insertions(+), 5 deletions(-) diff --git a/collects/tests/racket/unsafe.rktl b/collects/tests/racket/unsafe.rktl index c7cf655afe3..f95df45a6ea 100644 --- a/collects/tests/racket/unsafe.rktl +++ b/collects/tests/racket/unsafe.rktl @@ -370,4 +370,22 @@ ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; A regression test to check that unsafe-fl/ doesn't +;; reorder its arguments when it isn't safe to do so, where the +;; unsafeness of the reordering has to do with safe-for-space +;; clearing of a variable that is used multiple times. + +(let () + (define weird #f) + (set! weird + (lambda (get-M) + (let* ([M (get-M)] + [N1 (unsafe-fl/ M (unsafe-fllog M))]) + (get-M) ; triggers safe-for-space clearing of M + N1))) + + (test 15388.0 floor (* 1000.0 (weird (lambda () 64.0))))) + +;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + (report-errs) diff --git a/src/racket/src/jit.c b/src/racket/src/jit.c index 8d32ea8229a..8e93bd77f97 100644 --- a/src/racket/src/jit.c +++ b/src/racket/src/jit.c @@ -2613,7 +2613,8 @@ static int is_constant_and_avoids_r1(Scheme_Object *obj) return (t >= _scheme_compiled_values_types_); } -static int is_relatively_constant_and_avoids_r1(Scheme_Object *obj, Scheme_Object *wrt) +static int is_relatively_constant_and_avoids_r1_maybe_fp(Scheme_Object *obj, Scheme_Object *wrt, + int fp_ok) { Scheme_Type t; @@ -2622,9 +2623,10 @@ static int is_relatively_constant_and_avoids_r1(Scheme_Object *obj, Scheme_Objec t = SCHEME_TYPE(obj); if (SAME_TYPE(t, scheme_local_type)) { - /* Must have clearing, other-clears, or flonum flag set */ + /* Must have clearing, other-clears, or flonum flag set, + otherwise is_constant_and_avoids_r1() would have returned 1. */ if (SCHEME_GET_LOCAL_FLAGS(obj) == SCHEME_LOCAL_FLONUM) - return 0; + return fp_ok; else { Scheme_Type t2 = SCHEME_TYPE(wrt); if (t2 == scheme_local_type) { @@ -2638,6 +2640,18 @@ static int is_relatively_constant_and_avoids_r1(Scheme_Object *obj, Scheme_Objec return 0; } +static int is_relatively_constant_and_avoids_r1(Scheme_Object *obj, Scheme_Object *wrt) +{ + return is_relatively_constant_and_avoids_r1_maybe_fp(obj, wrt, 0); +} + +static int can_reorder_unboxing(Scheme_Object *rand, Scheme_Object *rand2) +{ + /* Can we reorder `rand' and `rand2', given that we want floating-point + results (so it's ok for `rand' to be a floating-point local)? */ + return is_relatively_constant_and_avoids_r1_maybe_fp(rand, rand2, 1); +} + /*========================================================================*/ /* branch info */ /*========================================================================*/ @@ -4778,7 +4792,7 @@ static int can_fast_double(int arith, int cmp, int two_args) #ifdef CAN_INLINE_ALLOC # ifdef JIT_USE_FP_OPS -#define DECL_FP_GLUE(op) static void call_ ## op(void) { save_fp = scheme_double_ ## op(save_fp); } +#define DECL_FP_GLUE(op) static void call_ ## op(void) XFORM_SKIP_PROC { save_fp = scheme_double_ ## op(save_fp); } DECL_FP_GLUE(sin) DECL_FP_GLUE(cos) DECL_FP_GLUE(tan) @@ -5279,7 +5293,7 @@ static int generate_arith(mz_jit_state *jitter, Scheme_Object *rator, Scheme_Obj if (!args_unboxed && rand) scheme_signal_error("internal error: invalid mode"); - if (inlined_flonum1 && !inlined_flonum2) { + if (inlined_flonum1 && !inlined_flonum2 && can_reorder_unboxing(rand, rand2)) { GC_CAN_IGNORE Scheme_Object *tmp; reversed = !reversed; cmp = -cmp; From 2da74632feb5001487488a037996ca6bba982fe7 Mon Sep 17 00:00:00 2001 From: Kevin Tew Date: Fri, 22 Oct 2010 21:21:38 -0600 Subject: [PATCH 043/441] cpuid assembly fix Merge to 5.0.2 (cherry picked from commit c1f2dea1ed9206617b0be9d157c282b638f917ad) --- src/racket/src/future.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/racket/src/future.c b/src/racket/src/future.c index 12900981b50..0b069eb862a 100644 --- a/src/racket/src/future.c +++ b/src/racket/src/future.c @@ -546,14 +546,24 @@ void scheme_future_block_until_gc() } # else { +# if defined(i386) || defined(__i386__) +# define MZ_PUSH_EBX "pushl %%ebx" +# define MZ_POP_EBX "popl %%ebx" +# endif +# if defined(__x86_64) || defined(__x86_64__) || defined(__amd64__) +# define MZ_PUSH_EBX "pushq %%rbx" +# define MZ_POP_EBX "popq %%rbx" +# endif int _eax, _ebx, _ecx, _edx, op = 0; /* we can't always use EBX, so save and restore it: */ - asm ("pushl %%ebx \n\t" + asm (MZ_PUSH_EBX "\n\t" "cpuid \n\t" "movl %%ebx, %1 \n\t" - "popl %%ebx" + MZ_POP_EBX : "=a" (_eax), "=r" (_ebx), "=c" (_ecx), "=d" (_edx) : "a" (op)); } +# undef MZ_PUSH_EBX +# undef MZ_POP_EBX # endif #endif } From dbddb4a5aee2d224f38db9cbffcd5a288e5170cd Mon Sep 17 00:00:00 2001 From: John Clements Date: Sat, 23 Oct 2010 17:37:39 -0700 Subject: [PATCH 044/441] Updated HISTORY.txt Merge to 5.0.2 (cherry picked from commit f1be08bf1cadaba2b92855b3bea87803e5194e17) --- doc/release-notes/stepper/HISTORY.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/release-notes/stepper/HISTORY.txt b/doc/release-notes/stepper/HISTORY.txt index 109ba9ec597..e3f0cf543e4 100644 --- a/doc/release-notes/stepper/HISTORY.txt +++ b/doc/release-notes/stepper/HISTORY.txt @@ -1,5 +1,8 @@ Stepper ------- +Changes for v5.0.2: + +Bug fixes, Big Bang working again. Define-struct in local not working. Changes for v5.0.1: From 48752d84f7af4d4d22227ccba6be59e30e2ef1ef Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Mon, 25 Oct 2010 02:42:16 -0400 Subject: [PATCH 045/441] Organize dist-specs; remove bogus collection. Merge to 5.0.2. (cherry picked from commit 91f9f0c2d3d8b8e49b0faab04d167595d40c71ec) --- collects/meta/dist-specs.rkt | 4 +++- collects/mz/private/y.rkt | 3 --- 2 files changed, 3 insertions(+), 4 deletions(-) delete mode 100644 collects/mz/private/y.rkt diff --git a/collects/meta/dist-specs.rkt b/collects/meta/dist-specs.rkt index abade6fcca6..31e3ead6770 100644 --- a/collects/meta/dist-specs.rkt +++ b/collects/meta/dist-specs.rkt @@ -660,8 +660,10 @@ plt-extras :+= (package: "deinprogramm/") (collects: "teachpack/deinprogramm/") (doc: "DMdA-lib") -;; -------------------- unstable +;; -------------------- data mz-extras :+= (package: "data") + +;; -------------------- unstable mz-extras :+= (- (package: "unstable") ;; should "gui" mean DrRacket or GRacket? It's not ;; obvious that "framework" is only in DrRacket. diff --git a/collects/mz/private/y.rkt b/collects/mz/private/y.rkt deleted file mode 100644 index 1f210949bb5..00000000000 --- a/collects/mz/private/y.rkt +++ /dev/null @@ -1,3 +0,0 @@ -#lang racket -(provide y) -(define y 1) From e7a2a3b062bca761a1005aed7ed90171e8223c23 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Mon, 25 Oct 2010 06:36:35 -0600 Subject: [PATCH 046/441] fix typo in CPP macro Merge to 5.0.2 (cherry picked from commit 802e27eb85346c77aefdd1bf363414411045c22b) --- src/racket/src/jit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/racket/src/jit.c b/src/racket/src/jit.c index 8e93bd77f97..451de6772f5 100644 --- a/src/racket/src/jit.c +++ b/src/racket/src/jit.c @@ -1872,9 +1872,9 @@ static Scheme_Object *make_two_element_ivector(Scheme_Object *a, Scheme_Object * #ifdef MZ_USE_LWC # ifdef JIT_RUNSTACK_BASE -# define SAVE_RS_BASE_REG(x) jit_stxi_p((int)&((Scheme_Current_LWC *)0x0)->runstack_base_end, JIT_R0, JIT_RUNSTACK_BASE) +# define SAVE_RS_BASE_REG() jit_stxi_p((int)&((Scheme_Current_LWC *)0x0)->runstack_base_end, JIT_R0, JIT_RUNSTACK_BASE) # else -# define SAVE_RS_BASE_REG(x) (void)0 +# define SAVE_RS_BASE_REG() (void)0 # endif # define adjust_lwc_return_address(pc) ((jit_insn *)((char *)(pc) - jit_return_pop_insn_len())) # define mz_finish_lwe(d, refr) (mz_tl_ldi_p(JIT_R0, tl_scheme_current_lwc), \ From 6f2f04b97992a444ee67ba5bcc7199b85860f191 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Mon, 25 Oct 2010 10:51:35 -0600 Subject: [PATCH 047/441] swap `vector*-ref' and `vector-ref', etc. Merge to 5.0.2 (cherry picked from commit 5d8e000d6d37cb9a032f4bcf4d82c63d8e51bae1) --- collects/racket/match/compiler.rkt | 6 ++-- collects/racket/private/for.rkt | 6 ++-- collects/racket/vector.rkt | 28 ++++++++-------- collects/scribblings/reference/unsafe.scrbl | 28 ++++++++-------- .../racket/benchmarks/shootout/nbody-vec.rkt | 16 +++++----- collects/tests/racket/unsafe.rktl | 18 +++++------ collects/typed-scheme/optimizer/box.rkt | 4 +-- collects/typed-scheme/optimizer/sequence.rkt | 4 +-- collects/typed-scheme/optimizer/vector.rkt | 6 ++-- doc/release-notes/racket/HISTORY.txt | 1 + src/racket/src/jit.c | 32 +++++++++---------- src/racket/src/list.c | 8 ++--- 12 files changed, 79 insertions(+), 78 deletions(-) diff --git a/collects/racket/match/compiler.rkt b/collects/racket/match/compiler.rkt index 533d8774054..88e9d87861a 100644 --- a/collects/racket/match/compiler.rkt +++ b/collects/racket/match/compiler.rkt @@ -105,10 +105,10 @@ esc)] [(n ...) ns]) #`[(#,arity) - (let ([tmps (unsafe-vector*-ref #,x n)] ...) + (let ([tmps (unsafe-vector-ref #,x n)] ...) body)]))))])]) #`[(vector? #,x) - (case (unsafe-vector*-length #,x) + (case (unsafe-vector-length #,x) clauses ... [else (#,esc)])])] ;; it's a structure @@ -117,7 +117,7 @@ (let* ([s (Row-first-pat (car rows))] [accs (Struct-accessors s)] [accs (if (Struct-complete? s) - (build-list (length accs) (λ (i) #`(λ (x) (unsafe-struct*-ref x #,i)))) + (build-list (length accs) (λ (i) #`(λ (x) (unsafe-struct-ref x #,i)))) accs)] [pred (Struct-pred s)]) (compile-con-pat accs pred Struct-ps))] diff --git a/collects/racket/private/for.rkt b/collects/racket/private/for.rkt index 654425ab3a3..d07264c571b 100644 --- a/collects/racket/private/for.rkt +++ b/collects/racket/private/for.rkt @@ -420,7 +420,7 @@ (define (:vector-gen v start stop step) (values ;; pos->element - (lambda (i) (unsafe-vector*-ref v i)) + (lambda (i) (unsafe-vector-ref v i)) ;; next-pos ;; Minor optimisation. I assume add1 is faster than \x.x+1 (if (= step 1) add1 (lambda (i) (+ i step))) @@ -1236,9 +1236,9 @@ (define-sequence-syntax *in-vector (lambda () #'in-vector) (vector-like-gen #'vector? - #'unsafe-vector*-length + #'unsafe-vector-length #'in-vector - #'unsafe-vector*-ref)) + #'unsafe-vector-ref)) (define-sequence-syntax *in-string (lambda () #'in-string) diff --git a/collects/racket/vector.rkt b/collects/racket/vector.rkt index 9d9ea1e6dad..0262688cd6c 100644 --- a/collects/racket/vector.rkt +++ b/collects/racket/vector.rkt @@ -59,9 +59,9 @@ ;; length is passed to save the computation (define (vector-map/update f target length vs) (for ([i (in-range length)]) - (unsafe-vector*-set! + (unsafe-vector-set! target i - (apply f (map (lambda (vec) (unsafe-vector*-ref vec i)) vs))))) + (apply f (map (lambda (vec) (unsafe-vector-ref vec i)) vs))))) ;; check that `v' is a vector ;; that `v' and all the `vs' have the same length @@ -77,12 +77,12 @@ 0 f)) (unless (vector? v) (raise-type-error name "vector" 1 v)) - (let ([len (unsafe-vector*-length v)]) + (let ([len (unsafe-vector-length v)]) (for ([e (in-list vs)] [i (in-naturals 2)]) (unless (vector? e) (raise-type-error name "vector" e i)) - (unless (= len (unsafe-vector*-length e)) + (unless (= len (unsafe-vector-length e)) (raise (make-exn:fail:contract (format "~e: all vectors must have same size; ~a" @@ -138,8 +138,8 @@ ([i (in-range len)] #:when (apply f - (unsafe-vector*-ref v i) - (map (lambda (v) (unsafe-vector*-ref v i)) vs))) + (unsafe-vector-ref v i) + (map (lambda (v) (unsafe-vector-ref v i)) vs))) (add1 c)) (error 'vector-count "all vectors must have same size"))) (for/fold ([cnt 0]) ([i (in-vector v)] #:when (f i)) @@ -150,7 +150,7 @@ (raise-type-error name "vector" v)) (unless (exact-nonnegative-integer? n) (raise-type-error name "non-negative exact integer" n)) - (let ([len (unsafe-vector*-length v)]) + (let ([len (unsafe-vector-length v)]) (unless (<= 0 n len) (raise-mismatch-error name @@ -186,14 +186,14 @@ (let* ([vs (cons v vs)] [lens (for/list ([e (in-list vs)] [i (in-naturals)]) (if (vector? e) - (unsafe-vector*-length e) + (unsafe-vector-length e) (raise-type-error 'vector-append "vector" e i)))] [new-v (make-vector (apply + lens))]) (let loop ([start 0] [lens lens] [vs vs]) (when (pair? lens) (let ([len (car lens)] [v (car vs)]) (for ([i (in-range len)]) - (unsafe-vector*-set! new-v (+ i start) (unsafe-vector*-ref v i))) + (unsafe-vector-set! new-v (+ i start) (unsafe-vector-ref v i))) (loop (+ start len) (cdr lens) (cdr vs))))) new-v)) @@ -203,13 +203,13 @@ (procedure-arity-includes? f 1)) (raise-type-error name "procedure (arity 1)" f)) (unless (and (vector? xs) - (< 0 (unsafe-vector*-length xs))) + (< 0 (unsafe-vector-length xs))) (raise-type-error name "non-empty vector" xs)) - (let ([init-min-var (f (unsafe-vector*-ref xs 0))]) + (let ([init-min-var (f (unsafe-vector-ref xs 0))]) (unless (real? init-min-var) (raise-type-error name "procedure that returns real numbers" f)) (let-values ([(min* min-var*) - (for/fold ([min (unsafe-vector*-ref xs 0)] + (for/fold ([min (unsafe-vector-ref xs 0)] [min-var init-min-var]) ([e (in-vector xs 1)]) (let ([new-min (f e)]) @@ -228,11 +228,11 @@ (define (name val vec) (unless (vector? vec) (raise-type-error 'name "vector" 1 vec)) - (let ([sz (unsafe-vector*-length vec)]) + (let ([sz (unsafe-vector-length vec)]) (let loop ([k 0]) (cond [(= k sz) #f] [(cmp val - (unsafe-vector*-ref vec k)) + (unsafe-vector-ref vec k)) k] [else (loop (unsafe-fx+ 1 k))]))))) diff --git a/collects/scribblings/reference/unsafe.scrbl b/collects/scribblings/reference/unsafe.scrbl index 17d83d17380..285e6722b75 100644 --- a/collects/scribblings/reference/unsafe.scrbl +++ b/collects/scribblings/reference/unsafe.scrbl @@ -192,22 +192,22 @@ Unsafe variants of @scheme[car], @scheme[cdr], @scheme[mcar], @deftogether[( -@defproc[(unsafe-unbox [v (and/c box? (not/c chaperone?))]) any/c] -@defproc[(unsafe-set-box! [v (and/c box? (not/c chaperone?))] [val any/c]) void?] -@defproc[(unsafe-unbox* [b box?]) fixnum?] -@defproc[(unsafe-set-box*! [b box?] [k fixnum?]) void?] +@defproc[(unsafe-unbox [b box?]) fixnum?] +@defproc[(unsafe-set-box! [b box?] [k fixnum?]) void?] +@defproc[(unsafe-unbox* [v (and/c box? (not/c chaperone?))]) any/c] +@defproc[(unsafe-set-box*! [v (and/c box? (not/c chaperone?))] [val any/c]) void?] )]{ Unsafe versions of @scheme[unbox] and @scheme[set-box!].} @deftogether[( -@defproc[(unsafe-vector-length [v (and/c vector? (not/c chaperone?))]) fixnum?] -@defproc[(unsafe-vector-ref [v (and/c vector? (not/c chaperone?))] [k fixnum?]) any/c] -@defproc[(unsafe-vector-set! [v (and/c vector? (not/c chaperone?))] [k fixnum?] [val any/c]) void?] -@defproc[(unsafe-vector*-length [v vector?]) fixnum?] -@defproc[(unsafe-vector*-ref [v vector?] [k fixnum?]) any/c] -@defproc[(unsafe-vector*-set! [v vector?] [k fixnum?] [val any/c]) void?] +@defproc[(unsafe-vector-length [v vector?]) fixnum?] +@defproc[(unsafe-vector-ref [v vector?] [k fixnum?]) any/c] +@defproc[(unsafe-vector-set! [v vector?] [k fixnum?] [val any/c]) void?] +@defproc[(unsafe-vector*-length [v (and/c vector? (not/c chaperone?))]) fixnum?] +@defproc[(unsafe-vector*-ref [v (and/c vector? (not/c chaperone?))] [k fixnum?]) any/c] +@defproc[(unsafe-vector*-set! [v (and/c vector? (not/c chaperone?))] [k fixnum?] [val any/c]) void?] )]{ Unsafe versions of @scheme[vector-length], @scheme[vector-ref], and @@ -282,10 +282,10 @@ Unsafe versions of @scheme[u16vector-ref] and @deftogether[( -@defproc[(unsafe-struct-ref [v (not/c chaperone?)] [k fixnum?]) any/c] -@defproc[(unsafe-struct-set! [v (not/c chaperone?)] [k fixnum?] [val any/c]) void?] -@defproc[(unsafe-struct*-ref [v any/c] [k fixnum?]) any/c] -@defproc[(unsafe-struct*-set! [v any/c] [k fixnum?] [val any/c]) void?] +@defproc[(unsafe-struct-ref [v any/c] [k fixnum?]) any/c] +@defproc[(unsafe-struct-set! [v any/c] [k fixnum?] [val any/c]) void?] +@defproc[(unsafe-struct*-ref [v (not/c chaperone?)] [k fixnum?]) any/c] +@defproc[(unsafe-struct*-set! [v (not/c chaperone?)] [k fixnum?] [val any/c]) void?] )]{ Unsafe field access and update for an instance of a structure diff --git a/collects/tests/racket/benchmarks/shootout/nbody-vec.rkt b/collects/tests/racket/benchmarks/shootout/nbody-vec.rkt index c0cacef496b..f8775bdcaec 100644 --- a/collects/tests/racket/benchmarks/shootout/nbody-vec.rkt +++ b/collects/tests/racket/benchmarks/shootout/nbody-vec.rkt @@ -94,10 +94,10 @@ Correct output N = 1000 is (let loop-i ([i 0] [px 0.0] [py 0.0] [pz 0.0]) (if (unsafe-fx= i *system-size*) (begin - (set-body-vx! (unsafe-vector-ref *system* 0) (fl/ (fl- 0.0 px) +solar-mass+)) - (set-body-vy! (unsafe-vector-ref *system* 0) (fl/ (fl- 0.0 py) +solar-mass+)) - (set-body-vz! (unsafe-vector-ref *system* 0) (fl/ (fl- 0.0 pz) +solar-mass+))) - (let ([i1 (unsafe-vector-ref *system* i)]) + (set-body-vx! (unsafe-vector*-ref *system* 0) (fl/ (fl- 0.0 px) +solar-mass+)) + (set-body-vy! (unsafe-vector*-ref *system* 0) (fl/ (fl- 0.0 py) +solar-mass+)) + (set-body-vz! (unsafe-vector*-ref *system* 0) (fl/ (fl- 0.0 pz) +solar-mass+))) + (let ([i1 (unsafe-vector*-ref *system* i)]) (loop-i (unsafe-fx+ i 1) (fl+ px (fl* (body-vx i1) (body-mass i1))) (fl+ py (fl* (body-vy i1) (body-mass i1))) @@ -108,7 +108,7 @@ Correct output N = 1000 is (let loop-o ([o 0] [e 0.0]) (if (unsafe-fx= o *system-size*) e - (let* ([o1 (unsafe-vector-ref *system* o)] + (let* ([o1 (unsafe-vector*-ref *system* o)] [e (fl+ e (fl* (fl* 0.5 (body-mass o1)) (fl+ (fl+ (fl* (body-vx o1) (body-vx o1)) (fl* (body-vy o1) (body-vy o1))) @@ -116,7 +116,7 @@ Correct output N = 1000 is (let loop-i ([i (unsafe-fx+ o 1)] [e e]) (if (unsafe-fx= i *system-size*) (loop-o (unsafe-fx+ o 1) e) - (let* ([i1 (unsafe-vector-ref *system* i)] + (let* ([i1 (unsafe-vector*-ref *system* i)] [dx (fl- (body-x o1) (body-x i1))] [dy (fl- (body-y o1) (body-y i1))] [dz (fl- (body-z o1) (body-z i1))] @@ -128,13 +128,13 @@ Correct output N = 1000 is (define (advance) (let loop-o ([o 0]) (unless (unsafe-fx= o *system-size*) - (let* ([o1 (unsafe-vector-ref *system* o)]) + (let* ([o1 (unsafe-vector*-ref *system* o)]) (let loop-i ([i (unsafe-fx+ o 1)] [vx (body-vx o1)] [vy (body-vy o1)] [vz (body-vz o1)]) (if (unsafe-fx< i *system-size*) - (let* ([i1 (unsafe-vector-ref *system* i)] + (let* ([i1 (unsafe-vector*-ref *system* i)] [dx (fl- (body-x o1) (body-x i1))] [dy (fl- (body-y o1) (body-y i1))] [dz (fl- (body-z o1) (body-z i1))] diff --git a/collects/tests/racket/unsafe.rktl b/collects/tests/racket/unsafe.rktl index f95df45a6ea..84e9c82ff05 100644 --- a/collects/tests/racket/unsafe.rktl +++ b/collects/tests/racket/unsafe.rktl @@ -231,9 +231,9 @@ #:pre (lambda () (set-box! b 12)) #:post (lambda (x) (list x (unbox b))) #:literal-ok? #f))) - (test-un 3 'unsafe-unbox* (chaperone-box (box 3) - (lambda (b v) v) - (lambda (b v) v))) + (test-un 3 'unsafe-unbox (chaperone-box (box 3) + (lambda (b v) v) + (lambda (b v) v))) (for ([star (list values (add-star "vector"))]) (test-bin 5 (star 'unsafe-vector-ref) #(1 5 7) 1) @@ -243,13 +243,13 @@ #:pre (lambda () (vector-set! v 2 0)) #:post (lambda (x) (list x (vector-ref v 2))) #:literal-ok? #f))) - (test-bin 5 'unsafe-vector*-ref (chaperone-vector #(1 5 7) - (lambda (v i x) x) - (lambda (v i x) x)) + (test-bin 5 'unsafe-vector-ref (chaperone-vector #(1 5 7) + (lambda (v i x) x) + (lambda (v i x) x)) 1) - (test-un 3 'unsafe-vector*-length (chaperone-vector #(1 5 7) - (lambda (v i x) x) - (lambda (v i x) x))) + (test-un 3 'unsafe-vector-length (chaperone-vector #(1 5 7) + (lambda (v i x) x) + (lambda (v i x) x))) (test-bin 53 'unsafe-bytes-ref #"157" 1) (test-un 3 'unsafe-bytes-length #"157") diff --git a/collects/typed-scheme/optimizer/box.rkt b/collects/typed-scheme/optimizer/box.rkt index 7ad707e75b9..8642c368635 100644 --- a/collects/typed-scheme/optimizer/box.rkt +++ b/collects/typed-scheme/optimizer/box.rkt @@ -21,8 +21,8 @@ (define-syntax-class box-op #:commit ;; we need the * versions of these unsafe operations to be chaperone-safe - (pattern (~literal unbox) #:with unsafe #'unsafe-unbox*) - (pattern (~literal set-box!) #:with unsafe #'unsafe-set-box*!)) + (pattern (~literal unbox) #:with unsafe #'unsafe-unbox) + (pattern (~literal set-box!) #:with unsafe #'unsafe-set-box!)) (define-syntax-class box-opt-expr #:commit diff --git a/collects/typed-scheme/optimizer/sequence.rkt b/collects/typed-scheme/optimizer/sequence.rkt index f050e91eb27..2ca95990928 100644 --- a/collects/typed-scheme/optimizer/sequence.rkt +++ b/collects/typed-scheme/optimizer/sequence.rkt @@ -51,8 +51,8 @@ #:with opt (begin (log-optimization "in-vector" #'op) #'(let* ((i v*.opt) - (len (unsafe-vector*-length i))) - (values (lambda (x) (unsafe-vector*-ref i x)) + (len (unsafe-vector-length i))) + (values (lambda (x) (unsafe-vector-ref i x)) (lambda (x) (unsafe-fx+ 1 x)) 0 (lambda (x) (unsafe-fx< x len)) diff --git a/collects/typed-scheme/optimizer/vector.rkt b/collects/typed-scheme/optimizer/vector.rkt index 6e3195d9ae2..776a796f446 100644 --- a/collects/typed-scheme/optimizer/vector.rkt +++ b/collects/typed-scheme/optimizer/vector.rkt @@ -14,8 +14,8 @@ (define-syntax-class vector-op #:commit ;; we need the * versions of these unsafe operations to be chaperone-safe - (pattern (~literal vector-ref) #:with unsafe #'unsafe-vector*-ref) - (pattern (~literal vector-set!) #:with unsafe #'unsafe-vector*-set!)) + (pattern (~literal vector-ref) #:with unsafe #'unsafe-vector-ref) + (pattern (~literal vector-set!) #:with unsafe #'unsafe-vector-set!)) (define-syntax-class vector-expr #:commit @@ -43,7 +43,7 @@ (pattern (#%plain-app (~and op (~literal vector-length)) v:expr) #:with opt (begin (log-optimization "vector-length" #'op) - #`(unsafe-vector*-length #,((optimize) #'v)))) + #`(unsafe-vector-length #,((optimize) #'v)))) ;; same for flvector-length (pattern (#%plain-app (~and op (~literal flvector-length)) v:expr) #:with opt diff --git a/doc/release-notes/racket/HISTORY.txt b/doc/release-notes/racket/HISTORY.txt index 0f6925afc54..723f53f340f 100644 --- a/doc/release-notes/racket/HISTORY.txt +++ b/doc/release-notes/racket/HISTORY.txt @@ -1,6 +1,7 @@ Version 5.0.2, October 2010 Changed body of `when', `unless', `cond' clauses, `case' clauses, and `match' clauses to be internal-definition contexts +Swapped unsafe-vector*-ref with unsafe-vector-ref, etc. Added ->i to the contract library, improved ->*, adding #:pre and #:post, as well as making the optional arguments clause optional. Added #true and #false, and changed #t/#T and #f/#F to diff --git a/src/racket/src/jit.c b/src/racket/src/jit.c index 451de6772f5..bdc3e3f7fb9 100644 --- a/src/racket/src/jit.c +++ b/src/racket/src/jit.c @@ -7025,10 +7025,10 @@ static int generate_inlined_unary(mz_jit_state *jitter, Scheme_App2_Rec *app, in GC_CAN_IGNORE jit_insn *reffail, *ref; int unsafe = 0, for_fl = 0, for_fx = 0, can_chaperone = 0; - if (IS_NAMED_PRIM(rator, "unsafe-vector-length") + if (IS_NAMED_PRIM(rator, "unsafe-vector*-length") || IS_NAMED_PRIM(rator, "unsafe-fxvector-length")) { unsafe = 1; - } else if (IS_NAMED_PRIM(rator, "unsafe-vector*-length")) { + } else if (IS_NAMED_PRIM(rator, "unsafe-vector-length")) { unsafe = 1; can_chaperone = 1; } else if (IS_NAMED_PRIM(rator, "flvector-length")) { @@ -7151,7 +7151,7 @@ static int generate_inlined_unary(mz_jit_state *jitter, Scheme_App2_Rec *app, in __END_TINY_JUMPS__(1); return 1; - } else if (IS_NAMED_PRIM(rator, "unsafe-unbox")) { + } else if (IS_NAMED_PRIM(rator, "unsafe-unbox*")) { LOG_IT(("inlined unbox\n")); mz_runstack_skipped(jitter, 1); @@ -7164,7 +7164,7 @@ static int generate_inlined_unary(mz_jit_state *jitter, Scheme_App2_Rec *app, in (void)jit_ldxi_p(JIT_R0, JIT_R0, &SCHEME_BOX_VAL(0x0)); return 1; - } else if (IS_NAMED_PRIM(rator, "unsafe-unbox*")) { + } else if (IS_NAMED_PRIM(rator, "unsafe-unbox")) { GC_CAN_IGNORE jit_insn *ref, *ref2; LOG_IT(("inlined unbox\n")); @@ -8215,7 +8215,7 @@ static int generate_inlined_binary(mz_jit_state *jitter, Scheme_App3_Rec *app, i which = 0; for_fx = 1; can_chaperone = 0; - } else if (IS_NAMED_PRIM(rator, "unsafe-vector-ref")) { + } else if (IS_NAMED_PRIM(rator, "unsafe-vector*-ref")) { which = 0; unsafe = 1; can_chaperone = 0; @@ -8224,7 +8224,7 @@ static int generate_inlined_binary(mz_jit_state *jitter, Scheme_App3_Rec *app, i unsafe = 1; can_chaperone = 0; for_fx = 1; - } else if (IS_NAMED_PRIM(rator, "unsafe-vector*-ref")) { + } else if (IS_NAMED_PRIM(rator, "unsafe-vector-ref")) { which = 0; unsafe = 1; } else if (IS_NAMED_PRIM(rator, "flvector-ref")) { @@ -8236,13 +8236,13 @@ static int generate_inlined_binary(mz_jit_state *jitter, Scheme_App3_Rec *app, i jitter->unbox = 0; } can_chaperone = 0; - } else if (IS_NAMED_PRIM(rator, "unsafe-struct-ref")) { + } else if (IS_NAMED_PRIM(rator, "unsafe-struct*-ref")) { which = 0; unsafe = 1; base_offset = ((int)&((Scheme_Structure *)0x0)->slots); can_chaperone = 0; for_struct = 1; - } else if (IS_NAMED_PRIM(rator, "unsafe-struct*-ref")) { + } else if (IS_NAMED_PRIM(rator, "unsafe-struct-ref")) { which = 0; unsafe = 1; base_offset = ((int)&((Scheme_Structure *)0x0)->slots); @@ -8482,13 +8482,13 @@ static int generate_inlined_binary(mz_jit_state *jitter, Scheme_App3_Rec *app, i return 1; } else if (IS_NAMED_PRIM(rator, "set-box!") - || IS_NAMED_PRIM(rator, "unsafe-set-box*!")) { + || IS_NAMED_PRIM(rator, "unsafe-set-box!")) { GC_CAN_IGNORE jit_insn *ref, *ref2, *ref3, *reffail; int unsafe; LOG_IT(("inlined set-box!\n")); - unsafe = IS_NAMED_PRIM(rator, "unsafe-set-box*!"); + unsafe = IS_NAMED_PRIM(rator, "unsafe-set-box!"); generate_two_args(app->rand1, app->rand2, jitter, 1, 2); CHECK_LIMIT(); @@ -8522,8 +8522,8 @@ static int generate_inlined_binary(mz_jit_state *jitter, Scheme_App3_Rec *app, i (void)jit_movi_p(JIT_R0, scheme_void); return 1; - } else if (IS_NAMED_PRIM(rator, "unsafe-set-box!")) { - LOG_IT(("inlined unsafe-set-box!\n")); + } else if (IS_NAMED_PRIM(rator, "unsafe-set-box*!")) { + LOG_IT(("inlined unsafe-set-box*!\n")); generate_two_args(app->rand1, app->rand2, jitter, 1, 2); CHECK_LIMIT(); @@ -8766,7 +8766,7 @@ static int generate_inlined_nary(mz_jit_state *jitter, Scheme_App_Rec *app, int } else if (IS_NAMED_PRIM(rator, "fxvector-set!")) { which = 0; for_fx = 1; - } else if (IS_NAMED_PRIM(rator, "unsafe-vector-set!")) { + } else if (IS_NAMED_PRIM(rator, "unsafe-vector*-set!")) { which = 0; unsafe = 1; can_chaperone = 0; @@ -8775,19 +8775,19 @@ static int generate_inlined_nary(mz_jit_state *jitter, Scheme_App_Rec *app, int unsafe = 1; can_chaperone = 0; for_fx = 1; - } else if (IS_NAMED_PRIM(rator, "unsafe-vector*-set!")) { + } else if (IS_NAMED_PRIM(rator, "unsafe-vector-set!")) { which = 0; unsafe = 1; } else if (IS_NAMED_PRIM(rator, "flvector-set!")) { which = 3; base_offset = ((int)&SCHEME_FLVEC_ELS(0x0)); - } else if (IS_NAMED_PRIM(rator, "unsafe-struct-set!")) { + } else if (IS_NAMED_PRIM(rator, "unsafe-struct*-set!")) { which = 0; unsafe = 1; base_offset = ((int)&((Scheme_Structure *)0x0)->slots); can_chaperone = 0; for_struct = 1; - } else if (IS_NAMED_PRIM(rator, "unsafe-struct*-set!")) { + } else if (IS_NAMED_PRIM(rator, "unsafe-struct-set!")) { which = 0; unsafe = 1; base_offset = ((int)&((Scheme_Structure *)0x0)->slots); diff --git a/src/racket/src/list.c b/src/racket/src/list.c index d91e8fff7ff..6e4095334e4 100644 --- a/src/racket/src/list.c +++ b/src/racket/src/list.c @@ -3431,12 +3431,12 @@ static Scheme_Object *unsafe_set_mcdr (int argc, Scheme_Object *argv[]) return scheme_void; } -static Scheme_Object *unsafe_unbox (int argc, Scheme_Object *argv[]) +static Scheme_Object *unsafe_unbox_star (int argc, Scheme_Object *argv[]) { return SCHEME_BOX_VAL(argv[0]); } -static Scheme_Object *unsafe_unbox_star (int argc, Scheme_Object *argv[]) +static Scheme_Object *unsafe_unbox (int argc, Scheme_Object *argv[]) { if (SCHEME_NP_CHAPERONEP(argv[0])) return chaperone_unbox(argv[0]); @@ -3444,13 +3444,13 @@ static Scheme_Object *unsafe_unbox_star (int argc, Scheme_Object *argv[]) return SCHEME_BOX_VAL(argv[0]); } -static Scheme_Object *unsafe_set_box (int argc, Scheme_Object *argv[]) +static Scheme_Object *unsafe_set_box_star (int argc, Scheme_Object *argv[]) { SCHEME_BOX_VAL(argv[0]) = argv[1]; return scheme_void; } -static Scheme_Object *unsafe_set_box_star (int argc, Scheme_Object *argv[]) +static Scheme_Object *unsafe_set_box (int argc, Scheme_Object *argv[]) { if (SCHEME_NP_CHAPERONEP(argv[0])) chaperone_set_box(argv[0], argv[1]); From da7e1bae0c598821e931f7efad1fc824ad5c93fb Mon Sep 17 00:00:00 2001 From: Ryan Culpepper Date: Mon, 25 Oct 2010 11:27:16 -0600 Subject: [PATCH 048/441] data/gvector: fixed typo in constructor Merge to 5.0.2 (cherry picked from commit 24297a793fe21083d8b7da1293425e95ebee62e0) --- collects/data/gvector.rkt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collects/data/gvector.rkt b/collects/data/gvector.rkt index c8453117332..07de71a87a8 100644 --- a/collects/data/gvector.rkt +++ b/collects/data/gvector.rkt @@ -7,7 +7,7 @@ racket/vector) (define (make-gvector #:capacity [capacity 10]) - (make-gvector (make-vector capacity #f) 0)) + (gvector (make-vector capacity #f) 0)) (define gvector* (let ([gvector From 1b24ca0063fa52b55b6779eb546537332faafb82 Mon Sep 17 00:00:00 2001 From: Casey Klein Date: Mon, 25 Oct 2010 14:26:42 -0500 Subject: [PATCH 049/441] Updates Redex history for v5.0.2 release (merge to release branch) (cherry picked from commit d7b0271691d97080f74c3c84ba475dada76ec1b7) --- doc/release-notes/redex/HISTORY.txt | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/doc/release-notes/redex/HISTORY.txt b/doc/release-notes/redex/HISTORY.txt index 5c9fbac1b60..4b4d6a0577d 100644 --- a/doc/release-notes/redex/HISTORY.txt +++ b/doc/release-notes/redex/HISTORY.txt @@ -1,7 +1,17 @@ - * added pretty-print-parameters +v5.0.2 - * added grammar-style and paren-style that give finer-grained control - over the typesetting styles + * added `pretty-print-parameters' to control term pretty-printing + + * added `grammar-style' and `paren-style' typesetting parameters + + * added support for computed reduction rule names + + * added delimited control model to examples + + * added optional #:attempt-size and #:prepare keyword arguments to random + testing forms + + * fixed minor bugs v5.0.1 From 7708164561e025ff7ac1f15544b99398fe80b3d5 Mon Sep 17 00:00:00 2001 From: Casey Klein Date: Mon, 25 Oct 2010 15:18:16 -0500 Subject: [PATCH 050/441] Renames delim-cont tests so that they're not stripped by the distribution script. (Merge to release branch.) (cherry picked from commit f4c4b790496027e98dde415a4b88fb895a7f98de) --- collects/meta/props | 2 +- collects/redex/examples/delim-cont/README.txt | 2 +- collects/redex/examples/delim-cont/{tests.rkt => test.rkt} | 0 collects/redex/tests/run-tests.rkt | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) rename collects/redex/examples/delim-cont/{tests.rkt => test.rkt} (100%) diff --git a/collects/meta/props b/collects/meta/props index 9cb417b48b2..07420c49a7a 100755 --- a/collects/meta/props +++ b/collects/meta/props @@ -1188,7 +1188,7 @@ path/s is either such a string or a list of them. "collects/redex/examples/church.rkt" drdr:command-line (mzc *) "collects/redex/examples/combinators.rkt" drdr:command-line (mzc *) "collects/redex/examples/compatible-closure.rkt" drdr:command-line (mzc *) -"collects/redex/examples/delim-cont/tests.rkt" drdr:command-line (mzc *) +"collects/redex/examples/delim-cont/test.rkt" drdr:command-line (mzc *) "collects/redex/examples/letrec.rkt" drdr:command-line (mzc *) "collects/redex/examples/omega.rkt" drdr:command-line (mzc *) "collects/redex/examples/r6rs/r6rs-tests.rkt" drdr:command-line (mzc *) diff --git a/collects/redex/examples/delim-cont/README.txt b/collects/redex/examples/delim-cont/README.txt index 4403bc3f2d8..ddd8c457928 100644 --- a/collects/redex/examples/delim-cont/README.txt +++ b/collects/redex/examples/delim-cont/README.txt @@ -1,7 +1,7 @@ To run the tests using the model: --------------------------------- - 1. Open "tests.rkt" in DrRacket + 1. Open "test.rkt" in DrRacket 2. Change DrRacket's current language to "Use the langauge declared in the source" diff --git a/collects/redex/examples/delim-cont/tests.rkt b/collects/redex/examples/delim-cont/test.rkt similarity index 100% rename from collects/redex/examples/delim-cont/tests.rkt rename to collects/redex/examples/delim-cont/test.rkt diff --git a/collects/redex/tests/run-tests.rkt b/collects/redex/tests/run-tests.rkt index 672e36f9976..6fe9b9bb449 100644 --- a/collects/redex/tests/run-tests.rkt +++ b/collects/redex/tests/run-tests.rkt @@ -31,7 +31,7 @@ ("../examples/beginner.ss" main) "../examples/racket-machine/reduction-test.ss" "../examples/racket-machine/verification-test.ss" - "../examples/delim-cont/tests.rkt" + "../examples/delim-cont/test.rkt" ("../examples/r6rs/r6rs-tests.ss" main)) '()))) From 7dc309037eb4427cdd87b0743f6f42a6c7a26631 Mon Sep 17 00:00:00 2001 From: Matthias Felleisen Date: Tue, 26 Oct 2010 19:01:56 -0400 Subject: [PATCH 051/441] record? is working as it used, plus ability to auto-save images so I can write a test case, Closes PR11348 and PR11349 (cherry picked from commit 6457f1e4cc4aefc5e45a84d5168dda90c00dd6e8) --- collects/2htdp/private/syn-aux-aux.rkt | 6 +++- collects/2htdp/private/world.rkt | 49 +++++++++++++------------- collects/2htdp/tests/record.rkt | 40 +++++++++++++++++++++ collects/2htdp/universe.rkt | 5 +-- 4 files changed, 73 insertions(+), 27 deletions(-) create mode 100644 collects/2htdp/tests/record.rkt diff --git a/collects/2htdp/private/syn-aux-aux.rkt b/collects/2htdp/private/syn-aux-aux.rkt index 80a5e5ac66f..fbd8face8ad 100644 --- a/collects/2htdp/private/syn-aux-aux.rkt +++ b/collects/2htdp/private/syn-aux-aux.rkt @@ -18,7 +18,7 @@ ; ; ; ; ;;; -(provide nat> nat? proc> bool> num> ip> string> symbol>) +(provide nat> nat? proc> bool> num> ip> string> symbol> any>) ;; Any -> Boolean (define (nat? x) @@ -58,3 +58,7 @@ (define (nat> tag x spec) (check-arg tag (nat? x) spec "natural number" x) x) + +;; Symbol X String -> X +(define (any> tag x) + x) diff --git a/collects/2htdp/private/world.rkt b/collects/2htdp/private/world.rkt index b10b5f3ca6c..cb31063e18e 100644 --- a/collects/2htdp/private/world.rkt +++ b/collects/2htdp/private/world.rkt @@ -51,8 +51,8 @@ (class* object% (start-stop<%>) (inspect #f) (init-field world0) - (init-field name state register check-with on-key on-mouse) - (init on-release on-receive on-draw stop-when record?) + (init-field name state register check-with on-key on-mouse record?) + (init on-release on-receive on-draw stop-when) ;; ----------------------------------------------------------------------- (field @@ -341,9 +341,8 @@ (start!) (let ([w (send world get)]) (cond - [(stop w) (stop! (send world get))] - [(stop-the-world? w) - (stop! (stop-the-world-world (send world get)))])))))) + [(stop w) (stop! w)] + [(stop-the-world? w) (stop! (stop-the-world-world w))])))))) ; (define make-new-world (new-world world%)) @@ -357,7 +356,7 @@ (define aworld% (class world% (super-new) - (inherit-field world0 tick key release mouse rec draw rate width height) + (inherit-field world0 tick key release mouse rec draw rate width height record?) (inherit show callback-stop!) ;; Frame Custodian ->* (-> Void) (-> Void) @@ -365,9 +364,15 @@ ;; whose callbacks runs as a thread in the custodian (define/augment (create-frame frm play-back-custodian) (define p (new horizontal-pane% [parent frm][alignment '(center center)])) + (define (pb) + (parameterize ([current-custodian play-back-custodian]) + (thread (lambda () (play-back))) + (stop))) (define (switch) (send stop-button enable #f) - (send image-button enable #t)) + (if (and (string? record?) (directory-exists? record?)) + (pb) + (send image-button enable #t))) (define (stop) (send image-button enable #f) (send stop-button enable #f)) @@ -377,10 +382,7 @@ (define stop-button (btn break-button:label (b e) (callback-stop! 'stop-images) (switch))) (define image-button - (btn image-button:label (b e) - (parameterize ([current-custodian play-back-custodian]) - (thread (lambda () (play-back))) - (stop)))) + (btn image-button:label (b e) (pb))) (send image-button enable #f) (values switch stop)) @@ -392,10 +394,8 @@ ;; --- new callbacks --- (define-syntax-rule (def/cb ovr (pname name arg ...)) - (begin - ; (ovr pname) - (define/override (pname arg ...) - (when (super pname arg ...) (add-event 'name arg ...))))) + (define/override (pname arg ...) + (when (super pname arg ...) (add-event name arg ...)))) (def/cb augment (ptock tick)) (def/cb augment (pkey key e)) @@ -424,19 +424,20 @@ (send bm save-file (format "i~a.png" (zero-fill imag# digt#)) 'png) (set! bmps (cons bm bmps))) ;; --- choose place - (define img:dir (get-directory "image directory:" #f (current-directory))) + (define img:dir + (or (and (string? record?) (directory-exists? record?) record?) + (get-directory "image directory:" #f (current-directory)))) (when img:dir (parameterize ([current-directory img:dir]) - (define last - (foldr (lambda (event world) - (save-image (draw world)) - (show (text (format "~a/~a created" imag# total) 18 'red)) - (world-transition world event)) - world0 - event-history)) + (define worldN + (let L ([history event-history][world world0]) + (save-image (draw world)) + (if (empty? history) + world + (L (rest history) (world-transition world (first history)))))) (show (text (format "creating ~a" ANIMATED-GIF-FILE) 18 'red)) (create-animated-gif rate (reverse bmps)) - (show (draw last))))))) + (show (draw worldN))))))) ;; Number [Listof (-> bitmap)] -> Void ;; turn the list of thunks into animated gifs diff --git a/collects/2htdp/tests/record.rkt b/collects/2htdp/tests/record.rkt new file mode 100644 index 00000000000..96989555a3d --- /dev/null +++ b/collects/2htdp/tests/record.rkt @@ -0,0 +1,40 @@ +#lang racket + +(require 2htdp/universe) +(require 2htdp/image) + +(define (draw-number n) + (place-image (text (number->string n) 44 'red) + 50 50 + (empty-scene 100 100))) + +;; Nat String -> Nat +;; create n images in ./images directory +;; ASSUME: dir exists +(define (create-n-images n dir) + (parameterize ([current-directory dir]) + (for-each delete-file (directory-list))) + (with-output-to-file (format "./~a/index.html" dir) + (lambda () + (displayln "")) + #:exists 'replace) + (define final-world + (big-bang 0 + (on-tick add1) + (stop-when (curry = (+ n 1))) + (on-draw draw-number) + (record? dir))) + (sleep 1) + (define number-of-png + (parameterize ([current-directory dir]) + (define dlst (directory-list)) + ; (displayln dlst) + (length + (filter (lambda (f) (regexp-match "\\.png" (path->string f))) + dlst)))) + (unless (= (+ n 2) number-of-png) + (error 'record? "(~s, ~s) didn't record proper number of images: ~s" n dir + number-of-png))) + +(create-n-images 3 "images3/") +(create-n-images 0 "images0/") \ No newline at end of file diff --git a/collects/2htdp/universe.rkt b/collects/2htdp/universe.rkt index 838941f28f7..2ceae80a014 100644 --- a/collects/2htdp/universe.rkt +++ b/collects/2htdp/universe.rkt @@ -94,9 +94,10 @@ [(_ stop? last-picture) #'(list (proc> 'stop-when (f2h stop?) 1) (proc> 'stop-when (f2h last-picture) 1))])] - ;; (U #f Boolean) + ;; (U #f Any) ;; -- should the session be recorded and turned into PNGs and an animated GIF - [record? DEFAULT #'#f (expr-with-check bool> "expected a boolean")] + ;; -- if the value is a string and is the name of a local directory, use it! + [record? DEFAULT #'#f (expr-with-check any> "")] ;; (U #f String) ;; -- name specifies one string [name DEFAULT #'#f (expr-with-check string> "expected a string")] From 7318fc10ce476c159527cf0d0a57253383b2eac6 Mon Sep 17 00:00:00 2001 From: Matthias Felleisen Date: Wed, 27 Oct 2010 10:12:37 -0400 Subject: [PATCH 052/441] partial fix for pr11350 (cherry picked from commit f876a854c6211a5b2fc20e3c48d3f491e8b8c3a0) --- collects/2htdp/private/world.rkt | 12 ++++--- collects/2htdp/tests/record-stop-when.rkt | 40 +++++++++++++++++++++++ collects/2htdp/tests/record.rkt | 17 +++++----- 3 files changed, 56 insertions(+), 13 deletions(-) create mode 100644 collects/2htdp/tests/record-stop-when.rkt diff --git a/collects/2htdp/private/world.rkt b/collects/2htdp/private/world.rkt index cb31063e18e..3d15a16eda5 100644 --- a/collects/2htdp/private/world.rkt +++ b/collects/2htdp/private/world.rkt @@ -226,6 +226,11 @@ ;; Any ... -> Boolean (begin (define/public (name arg ...) + (define (last-draw) + (define draw0 draw) + (dynamic-wind (lambda () (set! draw last-picture)) + (lambda () (pdraw)) + (lambda () (set! draw draw0)))) (queue-callback (lambda () (with-handlers ([exn? (handler #t)]) @@ -245,8 +250,7 @@ (begin (set! nw (stop-the-world-world nw)) (send world set tag nw) - (when last-picture - (set! draw last-picture)) + (when last-picture (last-draw)) (when draw (pdraw)) (callback-stop! 'name) (enable-images-button)) @@ -270,9 +274,7 @@ [else (set! draw# (- draw# 1))])) (when (pstop) - (when last-picture - (set! draw last-picture) - (pdraw)) + (when last-picture (last-draw)) (callback-stop! 'name) (enable-images-button)) changed-world?)))))))) diff --git a/collects/2htdp/tests/record-stop-when.rkt b/collects/2htdp/tests/record-stop-when.rkt new file mode 100644 index 00000000000..de3c676ed9e --- /dev/null +++ b/collects/2htdp/tests/record-stop-when.rkt @@ -0,0 +1,40 @@ +#lang racket + +(require 2htdp/universe 2htdp/image (only-in lang/imageeq image=?)) + +(define (draw-number n) + (place-image (text (number->string n) 44 'red) + 50 50 + (empty-scene 100 100))) + +(define (draw-stop n) + stop) +(define stop (text "STOP" 44 'red)) + +;; -> Nat +;; make the clock tick n times, expected expected-n files in dir +(define (create-n-images) + (define dir "images0") + (unless (directory-exists? dir) + (make-directory dir)) + (parameterize ([current-directory dir]) + (for-each delete-file (directory-list))) + (with-output-to-file (format "./~a/index.html" dir) + (lambda () + (displayln "")) + #:exists 'replace) + (define final-world + (big-bang 0 + (on-tick add1) + (stop-when (curry = 5) draw-stop) + (on-draw draw-number) + (record? dir))) + (sleep 1) + (parameterize ([current-directory dir]) + (define dlst (directory-list)) + (displayln dlst) + (length + (filter (lambda (f) (regexp-match "\\.png" (path->string f))) + dlst)))) + +(create-n-images) diff --git a/collects/2htdp/tests/record.rkt b/collects/2htdp/tests/record.rkt index 96989555a3d..f22ca740f2a 100644 --- a/collects/2htdp/tests/record.rkt +++ b/collects/2htdp/tests/record.rkt @@ -8,10 +8,11 @@ 50 50 (empty-scene 100 100))) -;; Nat String -> Nat -;; create n images in ./images directory -;; ASSUME: dir exists -(define (create-n-images n dir) +;; Nat Nat String -> Nat +;; make the clock tick n times, expected expected-n files in dir +(define (create-n-images n expected-n dir) + (unless (directory-exists? dir) + (make-directory dir)) (parameterize ([current-directory dir]) (for-each delete-file (directory-list))) (with-output-to-file (format "./~a/index.html" dir) @@ -21,7 +22,7 @@ (define final-world (big-bang 0 (on-tick add1) - (stop-when (curry = (+ n 1))) + (stop-when (curry = n)) (on-draw draw-number) (record? dir))) (sleep 1) @@ -32,9 +33,9 @@ (length (filter (lambda (f) (regexp-match "\\.png" (path->string f))) dlst)))) - (unless (= (+ n 2) number-of-png) + (unless (= expected-n number-of-png) (error 'record? "(~s, ~s) didn't record proper number of images: ~s" n dir number-of-png))) -(create-n-images 3 "images3/") -(create-n-images 0 "images0/") \ No newline at end of file +(create-n-images 3 4 "images3/") +(create-n-images 0 0 "images0/") \ No newline at end of file From 0ac7d8f29aeb1371c0b427f89fe0129099d98370 Mon Sep 17 00:00:00 2001 From: Matthias Felleisen Date: Wed, 27 Oct 2010 10:21:14 -0400 Subject: [PATCH 053/441] documented record?, which has a slightly wider interface so that I can write automated tests for the raw functionality (cherry picked from commit 42bceaf900c69791a05725fc875778793ebfaa85) --- .../teachpack/2htdp/scribblings/universe.scrbl | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/collects/teachpack/2htdp/scribblings/universe.scrbl b/collects/teachpack/2htdp/scribblings/universe.scrbl index aaa03c0cc5f..a89f8f30aac 100644 --- a/collects/teachpack/2htdp/scribblings/universe.scrbl +++ b/collects/teachpack/2htdp/scribblings/universe.scrbl @@ -167,7 +167,7 @@ The design of a world program demands that you come up with a data (to-draw draw-expr width-expr height-expr) (stop-when stop-expr) (stop-when stop-expr last-scene-expr) (check-with world?-expr) - (record? boolean-expr) + (record? r-expr) (state boolean-expr) (on-receive rec-expr) (register IP-expr) @@ -470,12 +470,16 @@ and @scheme[big-bang] will close down all event handling.} @item{ -@defform[(record? boolean-expr) +@defform[(record? r-expr) #:contracts - ([boolean-expr boolean?])]{ - tells DrRacket to record all events and to enable a replay of the entire - interaction. The replay action also generates one png image per scene and - an animated gif for the entire sequence. + ([r-expr any/c])]{ + tells DrRacket to enable a visual replay of the interaction, + unless @scheme[#false]. + The replay action generates one png image per scene and + an animated gif for the entire sequence in the directory of the user's + choice. If @scheme[r-expr] evaluates to the name of an existing + directory/folder (in the local directory/folder), the directory is used to + deposit the images. }} @item{ From 0e2e35708de614f984134479b1305c859245eff8 Mon Sep 17 00:00:00 2001 From: Matthias Felleisen Date: Wed, 27 Oct 2010 10:35:11 -0400 Subject: [PATCH 054/441] improved testing for record? (cherry picked from commit f600531e50db6bb2e8cda7807380a4d2ebd269d9) --- collects/2htdp/tests/record-stop-when.rkt | 45 ++++++++++------------- collects/2htdp/tests/xtest | 5 +++ 2 files changed, 24 insertions(+), 26 deletions(-) diff --git a/collects/2htdp/tests/record-stop-when.rkt b/collects/2htdp/tests/record-stop-when.rkt index de3c676ed9e..cda9803e551 100644 --- a/collects/2htdp/tests/record-stop-when.rkt +++ b/collects/2htdp/tests/record-stop-when.rkt @@ -11,30 +11,23 @@ stop) (define stop (text "STOP" 44 'red)) -;; -> Nat -;; make the clock tick n times, expected expected-n files in dir -(define (create-n-images) - (define dir "images0") - (unless (directory-exists? dir) - (make-directory dir)) - (parameterize ([current-directory dir]) - (for-each delete-file (directory-list))) - (with-output-to-file (format "./~a/index.html" dir) - (lambda () - (displayln "")) - #:exists 'replace) - (define final-world - (big-bang 0 - (on-tick add1) - (stop-when (curry = 5) draw-stop) - (on-draw draw-number) - (record? dir))) - (sleep 1) - (parameterize ([current-directory dir]) - (define dlst (directory-list)) - (displayln dlst) - (length - (filter (lambda (f) (regexp-match "\\.png" (path->string f))) - dlst)))) -(create-n-images) +(define dir "images0") +(unless (directory-exists? dir) + (make-directory dir)) +(parameterize ([current-directory dir]) + (for-each delete-file (directory-list))) +(with-output-to-file (format "./~a/index.html" dir) + (lambda () + (displayln "")) + #:exists 'replace) +(define final-world + (big-bang 0 + (on-tick add1) + (stop-when (curry = 5) draw-stop) + (on-draw draw-number) + (record? dir))) +(sleep 1) +(unless (image=? (bitmap "images0/i1.png") (draw-number 0)) + (printf "this test needs to be revised -- image=? doesn't work\n")) + diff --git a/collects/2htdp/tests/xtest b/collects/2htdp/tests/xtest index 015d6edf30e..842230dbcde 100755 --- a/collects/2htdp/tests/xtest +++ b/collects/2htdp/tests/xtest @@ -30,3 +30,8 @@ gracket ufo-rename.rkt echo "--- ufo-rename.rkt ---" echo "" gracket world0-stops.rkt +echo "--- record.rkt ---" echo "" +gracket record.rkt +echo "--- record-stop-when.rkt ---" echo "" +gracket record-stop-when.rkt + From ea0f518a9b742660ca142c6127199ec648304916 Mon Sep 17 00:00:00 2001 From: Vincent St-Amour Date: Wed, 27 Oct 2010 16:14:03 -0400 Subject: [PATCH 055/441] Fixed a typo in the scribble docs. Merge to 5.0.2. (cherry picked from commit 25749736c9ccf300c1ad338017030614032f5224) --- collects/scriblib/scribblings/figure.scrbl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collects/scriblib/scribblings/figure.scrbl b/collects/scriblib/scribblings/figure.scrbl index b3500aef6bc..67c84a479f5 100644 --- a/collects/scriblib/scribblings/figure.scrbl +++ b/collects/scriblib/scribblings/figure.scrbl @@ -22,7 +22,7 @@ rendering support.} )]{ Creates a figure. The given @scheme[tag] is for use with -@scheme[figure-ref] or @scheme[fFgure-ref]. The @scheme[caption] is an +@scheme[figure-ref] or @scheme[Figure-ref]. The @scheme[caption] is an element. The @scheme[pre-flow] is decoded as a flow. For HTML output, the @scheme[figure*] and @scheme[figure*] functions From 5104ced03a02357efab16eeebc495b5e381701aa Mon Sep 17 00:00:00 2001 From: Matthias Felleisen Date: Wed, 27 Oct 2010 18:32:31 -0400 Subject: [PATCH 056/441] HISTORY pre-release check (cherry picked from commit 41c084c95f95e549961eaf36871422d82e630e44) --- doc/release-notes/teachpack/HISTORY.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/doc/release-notes/teachpack/HISTORY.txt b/doc/release-notes/teachpack/HISTORY.txt index 0afc0df16cb..3c864c20f3c 100644 --- a/doc/release-notes/teachpack/HISTORY.txt +++ b/doc/release-notes/teachpack/HISTORY.txt @@ -1,3 +1,15 @@ +------------------------------------------------------------------------ +Version 5.0.2. [Wed Oct 27 18:30:26 EDT 2010] + +* fixed stepper-universe interaction (on my side) +* record? allows specification of a directory +* small bug fixes +* small doc fixes + +* batch-io is now in shape to be used (somewhat) in 2e + +* robby added pinholes to his image teachpack + ------------------------------------------------------------------------ Version 5.0.1. [Tue Jul 20 20:52:09 EDT 2010] From 8340ad7111d11393378b562b670b0f3f51b0c038 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Wed, 3 Nov 2010 06:44:57 -0600 Subject: [PATCH 057/441] fix JIT bug related to ignored `let' bindings Closes PR 11380 (cherry picked from commit aaafe86dd0cfc1567ee21e4e5dc6480588cb99e0) --- src/racket/src/jit.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/racket/src/jit.c b/src/racket/src/jit.c index bdc3e3f7fb9..e681fdb9df0 100644 --- a/src/racket/src/jit.c +++ b/src/racket/src/jit.c @@ -251,6 +251,7 @@ typedef struct { #define mz_RECORD_STATUS(s) (jitter->status_at_ptr = _jit.x.pc, jitter->reg_status = (s)) #define mz_CURRENT_STATUS() ((jitter->status_at_ptr == _jit.x.pc) ? jitter->reg_status : 0) +#define mz_CLEAR_STATUS() (jitter->reg_status = 0) #define mz_RS_R0_HAS_RUNSTACK0 0x1 @@ -9693,6 +9694,7 @@ static int generate_non_tail_with_branch(Scheme_Object *obj, mz_jit_state *jitte CHECK_LIMIT(); mz_flostack_restore(jitter, flostack, flostack_pos, !for_branch, 1); FOR_LOG(--jitter->log_depth); + mz_CLEAR_STATUS(); return v; } @@ -9781,6 +9783,7 @@ static int generate_non_tail_with_branch(Scheme_Object *obj, mz_jit_state *jitte } jitter->pushed_marks = save_pushed_marks; + mz_CLEAR_STATUS(); END_JIT_DATA(21); } From e36787bdebb7403ea180a140d88cf695d5eaea4c Mon Sep 17 00:00:00 2001 From: Vincent St-Amour Date: Thu, 4 Nov 2010 11:21:40 -0400 Subject: [PATCH 058/441] Fixed potential danger with fixnum optimizations. (cherry picked from commit c0a6137c67228933ad94d88409ffd86e30e922ae) --- .../typed-scheme/typecheck/tc-expr-unit.rkt | 17 ++++++++++++++--- collects/typed-scheme/types/abbrev.rkt | 3 +++ 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/collects/typed-scheme/typecheck/tc-expr-unit.rkt b/collects/typed-scheme/typecheck/tc-expr-unit.rkt index d0788b9a7ca..0fd0402a41a 100644 --- a/collects/typed-scheme/typecheck/tc-expr-unit.rkt +++ b/collects/typed-scheme/typecheck/tc-expr-unit.rkt @@ -21,6 +21,17 @@ (import tc-if^ tc-lambda^ tc-app^ tc-let^ check-subforms^) (export tc-expr^) +;; Is the number a fixnum on all the platforms Racket supports? +;; This check is done at compile time to typecheck literals. +;; Since a zo file compiled on a 64-bit system can be used on 32-bit +;; systems, we can't use the host fixnum? predicate, or large 64-bit +;; fixnums will typecheck as fixnums but not be actual fixnums on the +;; target system. In combination with fixnum typed optimizations, bad +;; things could happen. +(define (portable-fixnum? n) + (and (exact-integer? n) + (< n (expt 2 31)))) + ;; return the type of a literal value ;; scheme-value -> type (define (tc-literal v-stx [expected #f]) @@ -34,9 +45,9 @@ [i:boolean (-val (syntax-e #'i))] [i:identifier (-val (syntax-e #'i))] [0 -Zero] - [(~var i (3d (conjoin number? fixnum? positive?))) -PositiveFixnum] - [(~var i (3d (conjoin number? fixnum? negative?))) -NegativeFixnum] - [(~var i (3d (conjoin number? fixnum?))) -Fixnum] + [(~var i (3d (conjoin number? portable-fixnum? positive?))) -PositiveFixnum] + [(~var i (3d (conjoin number? portable-fixnum? negative?))) -NegativeFixnum] + [(~var i (3d (conjoin number? portable-fixnum?))) -Fixnum] [(~var i (3d exact-positive-integer?)) -ExactPositiveInteger] [(~var i (3d exact-nonnegative-integer?)) -ExactNonnegativeInteger] [(~var i (3d exact-integer?)) -Integer] diff --git a/collects/typed-scheme/types/abbrev.rkt b/collects/typed-scheme/types/abbrev.rkt index e69967b355a..68bbdbfc4d5 100644 --- a/collects/typed-scheme/types/abbrev.rkt +++ b/collects/typed-scheme/types/abbrev.rkt @@ -174,6 +174,9 @@ (define -ExactPositiveInteger (make-Base 'Exact-Positive-Integer #'exact-positive-integer?)) +;; We can safely use the fixnum? prediate here, unlike in tc-expr-unit. +;; The fixnum? here will be part of the generated contracts, which run +;; on the target system, so we're safe. (define -PositiveFixnum (make-Base 'Positive-Fixnum #'(and/c number? fixnum? positive?))) (define -NegativeFixnum From b28bdb5bc5c5218b618ff188f1423088f3c25cb2 Mon Sep 17 00:00:00 2001 From: Vincent St-Amour Date: Thu, 4 Nov 2010 16:03:06 -0400 Subject: [PATCH 059/441] Fixed a fixnum typechecking issue. (cherry picked from commit 4c081c127ab91067c3a69568175d7274b090f986) --- .../typed-scheme/unit-tests/typecheck-tests.rkt | 6 ++++++ collects/typed-scheme/typecheck/tc-expr-unit.rkt | 15 ++++++--------- collects/typed-scheme/types/abbrev.rkt | 9 ++++----- 3 files changed, 16 insertions(+), 14 deletions(-) diff --git a/collects/tests/typed-scheme/unit-tests/typecheck-tests.rkt b/collects/tests/typed-scheme/unit-tests/typecheck-tests.rkt index 5512094393d..6c82cc3c2db 100644 --- a/collects/tests/typed-scheme/unit-tests/typecheck-tests.rkt +++ b/collects/tests/typed-scheme/unit-tests/typecheck-tests.rkt @@ -146,6 +146,12 @@ N] (tc-e/t (if (let ([y 12]) y) 3 4) -PositiveFixnum) (tc-e/t 3 -PositiveFixnum) + (tc-e/t 100 -PositiveFixnum) + (tc-e/t -100 -NegativeFixnum) + (tc-e/t 2147483647 -PositiveFixnum) + (tc-e/t -2147483647 -NegativeFixnum) + (tc-e/t 2147483648 -Pos) + (tc-e/t -2147483648 -Integer) (tc-e/t "foo" -String) (tc-e (+ 3 4) -Pos) [tc-e/t (lambda: () 3) (t:-> -PositiveFixnum : -true-lfilter)] diff --git a/collects/typed-scheme/typecheck/tc-expr-unit.rkt b/collects/typed-scheme/typecheck/tc-expr-unit.rkt index 0fd0402a41a..6932cf09f6e 100644 --- a/collects/typed-scheme/typecheck/tc-expr-unit.rkt +++ b/collects/typed-scheme/typecheck/tc-expr-unit.rkt @@ -22,15 +22,12 @@ (export tc-expr^) ;; Is the number a fixnum on all the platforms Racket supports? +;; This relies on Racket being compiled only on 32+ bit systems. ;; This check is done at compile time to typecheck literals. -;; Since a zo file compiled on a 64-bit system can be used on 32-bit -;; systems, we can't use the host fixnum? predicate, or large 64-bit -;; fixnums will typecheck as fixnums but not be actual fixnums on the -;; target system. In combination with fixnum typed optimizations, bad -;; things could happen. (define (portable-fixnum? n) (and (exact-integer? n) - (< n (expt 2 31)))) + (< n (expt 2 31)) + (> n (- (expt 2 31))))) ;; return the type of a literal value ;; scheme-value -> type @@ -45,9 +42,9 @@ [i:boolean (-val (syntax-e #'i))] [i:identifier (-val (syntax-e #'i))] [0 -Zero] - [(~var i (3d (conjoin number? portable-fixnum? positive?))) -PositiveFixnum] - [(~var i (3d (conjoin number? portable-fixnum? negative?))) -NegativeFixnum] - [(~var i (3d (conjoin number? portable-fixnum?))) -Fixnum] + [(~var i (3d (conjoin portable-fixnum? positive?))) -PositiveFixnum] + [(~var i (3d (conjoin portable-fixnum? negative?))) -NegativeFixnum] + [(~var i (3d (conjoin portable-fixnum?))) -Fixnum] [(~var i (3d exact-positive-integer?)) -ExactPositiveInteger] [(~var i (3d exact-nonnegative-integer?)) -ExactNonnegativeInteger] [(~var i (3d exact-integer?)) -Integer] diff --git a/collects/typed-scheme/types/abbrev.rkt b/collects/typed-scheme/types/abbrev.rkt index 68bbdbfc4d5..fa0711a3ff9 100644 --- a/collects/typed-scheme/types/abbrev.rkt +++ b/collects/typed-scheme/types/abbrev.rkt @@ -174,13 +174,12 @@ (define -ExactPositiveInteger (make-Base 'Exact-Positive-Integer #'exact-positive-integer?)) -;; We can safely use the fixnum? prediate here, unlike in tc-expr-unit. -;; The fixnum? here will be part of the generated contracts, which run -;; on the target system, so we're safe. +;; We're generating a reference to fixnum? rather than calling it, so +;; we're safe from fixnum size issues on different platforms. (define -PositiveFixnum - (make-Base 'Positive-Fixnum #'(and/c number? fixnum? positive?))) + (make-Base 'Positive-Fixnum #'(and/c fixnum? positive?))) (define -NegativeFixnum - (make-Base 'Negative-Fixnum #'(and/c number? fixnum? negative?))) + (make-Base 'Negative-Fixnum #'(and/c fixnum? negative?))) (define -Zero (-val 0)) (define -Real (*Un -InexactReal -ExactRational)) From 1652a908c7917b9e08680c9d137906179ee3d312 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Fri, 5 Nov 2010 01:33:57 -0400 Subject: [PATCH 060/441] Make the disabled places comment more prominent. (cherry picked from commit 84ec108c32a536c8238ca6861ab6aac7eda33db8) --- collects/scribblings/reference/places.scrbl | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/collects/scribblings/reference/places.scrbl b/collects/scribblings/reference/places.scrbl index aef84adfb32..3e0d1b3e2a2 100644 --- a/collects/scribblings/reference/places.scrbl +++ b/collects/scribblings/reference/places.scrbl @@ -22,13 +22,12 @@ hardware threads. @note-lib[racket/place] -@margin-note{Currently, parallel support for @racket[place] is is only enabled if you pass -@DFlag{enable-places} to @exec{configure} when you build Racket (and -that build currently only works with @exec{racket}, not with -@exec{gracket}). When parallel-places support is not enabled, -@racket[place] usage is a syntax error. -Places is only supported on Linux x86/x86_64, and Mac OS X -x86/x86_64 platforms.} +Note: currently, parallel support for @racket[place] is disabled by +default, and using it will raise an exception. Support can only be +enabled if you build Racket yourself, and pass @DFlag{enable-places} to +@exec{configure}. This works only for @exec{racket} (not +@exec{gracket}), and it is supported only on Linux x86/x86_64, and Mac +OS X x86/x86_64 platforms. @defproc[(place [module-path module-path?] [start-proc symbol?]) place?]{ Starts running @racket[start-proc] in parallel. @racket[start-proc] must From 49c1a0d9461e59a976b2d85fd4638d0986219468 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Fri, 5 Nov 2010 01:46:01 -0400 Subject: [PATCH 061/441] Clarify comment re `fixnum?' non-use at the syntax level, and add a note to the `fixnum?' documentation. (cherry picked from commit 9a485064ed81366579f2a5c7cebf591de7e07be2) --- collects/scribblings/reference/numbers.scrbl | 5 ++++- collects/typed-scheme/typecheck/tc-expr-unit.rkt | 7 ++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/collects/scribblings/reference/numbers.scrbl b/collects/scribblings/reference/numbers.scrbl index fda5625b5a9..9988202a4df 100644 --- a/collects/scribblings/reference/numbers.scrbl +++ b/collects/scribblings/reference/numbers.scrbl @@ -149,7 +149,10 @@ Returns @racket[(and (real? v) (inexact? v))].} @defproc[(fixnum? [v any/c]) boolean?]{ Return @racket[#t] if @racket[v] is a @techlink{fixnum}, @racket[#f] -otherwise.} +otherwise. + +Note: the result of this function is platform-dependent, so using it in +syntax transformers can lead to platform-dependent bytecode files.} @defproc[(flonum? [v any/c]) boolean?]{ diff --git a/collects/typed-scheme/typecheck/tc-expr-unit.rkt b/collects/typed-scheme/typecheck/tc-expr-unit.rkt index 6932cf09f6e..b5153d399e3 100644 --- a/collects/typed-scheme/typecheck/tc-expr-unit.rkt +++ b/collects/typed-scheme/typecheck/tc-expr-unit.rkt @@ -21,9 +21,10 @@ (import tc-if^ tc-lambda^ tc-app^ tc-let^ check-subforms^) (export tc-expr^) -;; Is the number a fixnum on all the platforms Racket supports? -;; This relies on Racket being compiled only on 32+ bit systems. -;; This check is done at compile time to typecheck literals. +;; Is the number a fixnum on *all* the platforms Racket supports? This +;; works because Racket compiles only on 32+ bit systems. This check is +;; done at compile time to typecheck literals -- so use it instead of +;; `fixnum?' to avoid creating platform-dependent .zo files. (define (portable-fixnum? n) (and (exact-integer? n) (< n (expt 2 31)) From 0f9db7f9aad7eb6ed80dfb035d7edf4e5e2e20ea Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Sat, 6 Nov 2010 21:25:44 -0400 Subject: [PATCH 062/441] Update version number for the v5.0.2 release --- src/racket/src/schvers.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/racket/src/schvers.h b/src/racket/src/schvers.h index fea4623d185..9821651ac88 100644 --- a/src/racket/src/schvers.h +++ b/src/racket/src/schvers.h @@ -13,12 +13,12 @@ consistently.) */ -#define MZSCHEME_VERSION "5.0.1.900" +#define MZSCHEME_VERSION "5.0.2" #define MZSCHEME_VERSION_X 5 #define MZSCHEME_VERSION_Y 0 -#define MZSCHEME_VERSION_Z 1 -#define MZSCHEME_VERSION_W 900 +#define MZSCHEME_VERSION_Z 2 +#define MZSCHEME_VERSION_W 0 #define MZSCHEME_VERSION_MAJOR ((MZSCHEME_VERSION_X * 100) + MZSCHEME_VERSION_Y) #define MZSCHEME_VERSION_MINOR ((MZSCHEME_VERSION_Z * 1000) + MZSCHEME_VERSION_W) From 76680b839c269e3b04f30fcf05ee23d7883da939 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Sat, 6 Nov 2010 21:25:52 -0400 Subject: [PATCH 063/441] New Racket version 5.0.2. --- src/worksp/gracket/gracket.manifest | 2 +- src/worksp/gracket/gracket.rc | 8 ++++---- src/worksp/mzcom/mzcom.rc | 8 ++++---- src/worksp/mzcom/mzobj.rgs | 6 +++--- src/worksp/racket/racket.rc | 8 ++++---- src/worksp/starters/start.rc | 8 ++++---- 6 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/worksp/gracket/gracket.manifest b/src/worksp/gracket/gracket.manifest index ae7eb2b7d5a..2d7d517ac58 100644 --- a/src/worksp/gracket/gracket.manifest +++ b/src/worksp/gracket/gracket.manifest @@ -1,7 +1,7 @@ Date: Sun, 7 Nov 2010 00:46:22 -0400 Subject: [PATCH 064/441] v5.0.2 stuff (cherry picked from commit c195e2b2013ed16a5733a475f01dd0695267ac10) --- collects/meta/web/download/data.rkt | 3 ++- collects/meta/web/download/installers.txt | 30 ++++++++++++++++++++--- 2 files changed, 28 insertions(+), 5 deletions(-) diff --git a/collects/meta/web/download/data.rkt b/collects/meta/web/download/data.rkt index 89381ac7fa2..2151633931c 100644 --- a/collects/meta/web/download/data.rkt +++ b/collects/meta/web/download/data.rkt @@ -1,7 +1,8 @@ #lang racket/base (define -versions+dates- - '(["5.0.1" "August 2010"] + '(["5.0.2" "November 2010"] + ["5.0.1" "August 2010"] ["5.0" "June 2010"] ["4.2.5" "April 2010"] ["4.2.4" "January 2010"] diff --git a/collects/meta/web/download/installers.txt b/collects/meta/web/download/installers.txt index b78963ef8ff..51e29f1d75b 100644 --- a/collects/meta/web/download/installers.txt +++ b/collects/meta/web/download/installers.txt @@ -6,8 +6,8 @@ 8.9M 5.0.1/racket-textual/racket-textual-5.0.1-bin-ppc-darwin.sh 9.2M 5.0.1/racket-textual/racket-textual-5.0.1-bin-ppc-osx-mac.dmg 9.0M 5.0.1/racket-textual/racket-textual-5.0.1-bin-x86_64-linux-f7.sh -4.9M 5.0.1/racket-textual/racket-textual-5.0.1-src-mac.dmg -4.8M 5.0.1/racket-textual/racket-textual-5.0.1-src-unix.tgz +5.6M 5.0.1/racket-textual/racket-textual-5.0.1-src-mac.dmg +5.5M 5.0.1/racket-textual/racket-textual-5.0.1-src-unix.tgz 6.8M 5.0.1/racket-textual/racket-textual-5.0.1-src-win.zip 47M 5.0.1/racket/racket-5.0.1-bin-i386-linux-debian.sh 47M 5.0.1/racket/racket-5.0.1-bin-i386-linux-f12.sh @@ -17,9 +17,31 @@ 46M 5.0.1/racket/racket-5.0.1-bin-ppc-darwin.sh 48M 5.0.1/racket/racket-5.0.1-bin-ppc-osx-mac.dmg 47M 5.0.1/racket/racket-5.0.1-bin-x86_64-linux-f7.sh -16M 5.0.1/racket/racket-5.0.1-src-mac.dmg -16M 5.0.1/racket/racket-5.0.1-src-unix.tgz +17M 5.0.1/racket/racket-5.0.1-src-mac.dmg +17M 5.0.1/racket/racket-5.0.1-src-unix.tgz 20M 5.0.1/racket/racket-5.0.1-src-win.zip +9.4M 5.0.2/racket-textual/racket-textual-5.0.2-bin-i386-linux-debian.sh +9.4M 5.0.2/racket-textual/racket-textual-5.0.2-bin-i386-linux-f12.sh +9.4M 5.0.2/racket-textual/racket-textual-5.0.2-bin-i386-linux-ubuntu-jaunty.sh +9.6M 5.0.2/racket-textual/racket-textual-5.0.2-bin-i386-osx-mac.dmg +7.2M 5.0.2/racket-textual/racket-textual-5.0.2-bin-i386-win32.exe +9.3M 5.0.2/racket-textual/racket-textual-5.0.2-bin-ppc-darwin.sh +9.6M 5.0.2/racket-textual/racket-textual-5.0.2-bin-ppc-osx-mac.dmg +9.5M 5.0.2/racket-textual/racket-textual-5.0.2-bin-x86_64-linux-f7.sh +5.7M 5.0.2/racket-textual/racket-textual-5.0.2-src-mac.dmg +5.6M 5.0.2/racket-textual/racket-textual-5.0.2-src-unix.tgz +7.0M 5.0.2/racket-textual/racket-textual-5.0.2-src-win.zip +48M 5.0.2/racket/racket-5.0.2-bin-i386-linux-debian.sh +48M 5.0.2/racket/racket-5.0.2-bin-i386-linux-f12.sh +48M 5.0.2/racket/racket-5.0.2-bin-i386-linux-ubuntu-jaunty.sh +50M 5.0.2/racket/racket-5.0.2-bin-i386-osx-mac.dmg +30M 5.0.2/racket/racket-5.0.2-bin-i386-win32.exe +48M 5.0.2/racket/racket-5.0.2-bin-ppc-darwin.sh +50M 5.0.2/racket/racket-5.0.2-bin-ppc-osx-mac.dmg +49M 5.0.2/racket/racket-5.0.2-bin-x86_64-linux-f7.sh +17M 5.0.2/racket/racket-5.0.2-src-mac.dmg +17M 5.0.2/racket/racket-5.0.2-src-unix.tgz +21M 5.0.2/racket/racket-5.0.2-src-win.zip 8.7M 5.0/racket-textual/racket-textual-5.0-bin-i386-linux-debian.sh 8.7M 5.0/racket-textual/racket-textual-5.0-bin-i386-linux-f12.sh 8.7M 5.0/racket-textual/racket-textual-5.0-bin-i386-linux-ubuntu-jaunty.sh From 41eb7b86f6feaf5c22591efab3b419e75236ff6e Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Sat, 29 Jan 2011 13:03:41 -0500 Subject: [PATCH 065/441] Alpha version number for the v5.1 release --- src/racket/src/schvers.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/racket/src/schvers.h b/src/racket/src/schvers.h index 81b362c6e9f..0d548af42c9 100644 --- a/src/racket/src/schvers.h +++ b/src/racket/src/schvers.h @@ -13,12 +13,12 @@ consistently.) */ -#define MZSCHEME_VERSION "5.0.99.7" +#define MZSCHEME_VERSION "5.0.99.900" #define MZSCHEME_VERSION_X 5 #define MZSCHEME_VERSION_Y 0 #define MZSCHEME_VERSION_Z 99 -#define MZSCHEME_VERSION_W 7 +#define MZSCHEME_VERSION_W 900 #define MZSCHEME_VERSION_MAJOR ((MZSCHEME_VERSION_X * 100) + MZSCHEME_VERSION_Y) #define MZSCHEME_VERSION_MINOR ((MZSCHEME_VERSION_Z * 1000) + MZSCHEME_VERSION_W) From 304e6dc873d4049c58123c3be695d710beadcb91 Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Sat, 29 Jan 2011 12:26:59 -0600 Subject: [PATCH 066/441] added a color:text method get-token-range and then used that to improve how f1 in drracket works Please include this commit on the release branch (cherry picked from commit 4090eabacb8d7b32900b4df18da06f14f1def40f) --- collects/drracket/private/unit.rkt | 42 ++++++++++++++++------ collects/framework/private/color.rkt | 18 +++++++--- collects/scribblings/framework/color.scrbl | 12 ++++++- 3 files changed, 57 insertions(+), 15 deletions(-) diff --git a/collects/drracket/private/unit.rkt b/collects/drracket/private/unit.rkt index 4b4b681fe1a..8d75db3dddb 100644 --- a/collects/drracket/private/unit.rkt +++ b/collects/drracket/private/unit.rkt @@ -238,16 +238,38 @@ module browser threading seems wrong. [before+ (and before (send text get-forward-sexp before))] [after (send text get-forward-sexp pos)] [after- (and after (send text get-backward-sexp after))]) - (cond - [(and before before+ - (<= before pos before+) - (eq? 'symbol (send text classify-position before))) - (send text get-text before before+)] - [(and after after- - (<= after- pos after) - (eq? 'symbol (send text classify-position after-))) - (send text get-text after- after)] - [else ""]))] + + (define (get-tokens start end) + (let loop ([i start]) + (cond + [(and (< i end) + (< i (send text last-position))) + (define-values (tstart tend) (send text get-token-range i)) + (cons (list (send text classify-position i) tstart tend) + (loop tend))] + [else '()]))) + + ;; find-searchable-tokens : number number -> (or/c #f (list symbol number number)) + (define (find-searchable-tokens start end) + (define tokens (get-tokens start end)) + (define raw-tokens (map (λ (x) (list-ref x 0)) tokens)) + (cond + [(equal? raw-tokens '(symbol)) + (car tokens)] + [(equal? raw-tokens '(constant symbol)) + (cadr tokens)] + [else #f])) + + (define searchable-token + (or (and before before+ + (<= before pos before+) + (find-searchable-tokens before before+)) + (and after after- + (<= after- pos after) + (find-searchable-tokens after- after)))) + (if searchable-token + (send text get-text (list-ref searchable-token 1) (list-ref searchable-token 2)) + ""))] [else (send text split-snip pos) (send text split-snip (+ pos 1)) diff --git a/collects/framework/private/color.rkt b/collects/framework/private/color.rkt index f7be4ce51e5..08ef4f5ecce 100644 --- a/collects/framework/private/color.rkt +++ b/collects/framework/private/color.rkt @@ -817,16 +817,26 @@ added get-regions ;; Determines whether a position is a 'comment, 'string, etc. (define/public (classify-position position) + (define tokens (get-tokens-at-position 'classify-position position)) + (and tokens + (let ([root-data (send tokens get-root-data)]) + (and root-data + (data-type root-data))))) + + (define/public (get-token-range position) + (define tokens (get-tokens-at-position 'get-token-range position)) + (values (and tokens (send tokens get-root-start-position)) + (and tokens (send tokens get-root-end-position)))) + + (define/private (get-tokens-at-position who position) (when stopped? - (error 'classify-position "called on a color:text<%> whose colorer is stopped.")) + (error who "called on a color:text<%> whose colorer is stopped.")) (let ([ls (find-ls position)]) (and ls (let ([tokens (lexer-state-tokens ls)]) (tokenize-to-pos ls position) (send tokens search! (- position (lexer-state-start-pos ls))) - (let ([root-data (send tokens get-root-data)]) - (and root-data - (data-type root-data))))))) + tokens)))) (define/private (tokenize-to-pos ls position) (when (and (not (lexer-state-up-to-date? ls)) diff --git a/collects/scribblings/framework/color.scrbl b/collects/scribblings/framework/color.scrbl index 979155fa5c6..2dd561e6a18 100644 --- a/collects/scribblings/framework/color.scrbl +++ b/collects/scribblings/framework/color.scrbl @@ -212,7 +212,7 @@ right kind. If @scheme[flash?] is true, the matching open parenthesis will be flashed. } - @defmethod*[(((classify-position (position natural-number?)) symbol?))]{ + @defmethod*[(((classify-position (position exact-nonnegative-integer?)) symbol?))]{ Return a symbol for the lexer-determined token type for the token that @@ -221,6 +221,16 @@ Must only be called while the tokenizer is started. } + @defmethod[(get-token-range [position exact-nonnegative-integer?]) + (values (or/c #f exact-nonnegative-integer?) + (or/c #f exact-nonnegative-integer?))]{ + + Returns the range of the token surrounding @racket[position], if there is a token there. + + This method must be called only when the tokenizer is started. + + } + @defmethod[#:mode augment (on-lexer-valid [valid? boolean?]) any]{ This method is an observer for when the lexer is working. It is called when the lexer's state changes from valid to invalid (and back). From dbad6461b1a121439309a0a1e080d957701b3e99 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sat, 29 Jan 2011 13:32:13 -0600 Subject: [PATCH 067/441] doc typo (cherry picked from commit e43fa461a424a1f47c13fb3f02004abbddb90952) --- collects/mzlib/scribblings/pconvert.scrbl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/collects/mzlib/scribblings/pconvert.scrbl b/collects/mzlib/scribblings/pconvert.scrbl index d3b51ab9e20..e7487c201c9 100644 --- a/collects/mzlib/scribblings/pconvert.scrbl +++ b/collects/mzlib/scribblings/pconvert.scrbl @@ -135,8 +135,9 @@ integer.} @defparam[current-print-convert-hook hook - (any/c/ (any/c . -> . any/c) - (any/c . -> . any/c))]{ + (any/c (any/c . -> . any/c) + (any/c . -> . any/c) + . -> . any/c)]{ Parameter that sets a procedure used by @scheme[print-convert] and @scheme[print-convert-expr] to convert values. The procedure From aeb104af1ec7e5a0e9d6155f1ae08ea0afb4e429 Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Sat, 29 Jan 2011 18:57:02 -0600 Subject: [PATCH 068/441] fix a docs typo closes PR 11677 (cherry picked from commit a7fb695c88741c049033081bb6cf7e9d58fd2918) --- collects/teachpack/2htdp/scribblings/image.scrbl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collects/teachpack/2htdp/scribblings/image.scrbl b/collects/teachpack/2htdp/scribblings/image.scrbl index eb5f4e9a767..d22aa8e81d8 100644 --- a/collects/teachpack/2htdp/scribblings/image.scrbl +++ b/collects/teachpack/2htdp/scribblings/image.scrbl @@ -68,7 +68,7 @@ Existing images can be rotated, scaled, flipped, and overlaid on top of each oth [mode (or/c 'outline "outline")] [pen-or-color (or/c image-color? pen?)]) image?])]{ - Constructs an ellipsis with the given width, height, mode, and color. + Constructs an ellipse with the given width, height, mode, and color. @mode/color-text From e5b2badea34f72ecfabd3dbc51007d3c82e6fc5d Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sun, 30 Jan 2011 07:47:10 -0600 Subject: [PATCH 069/441] fix problems with `read-language' error reporting (cherry picked from commit bc5ab1e03128db600a6909e2150ebfdfb9b3dee6) --- collects/scribblings/reference/read.scrbl | 4 +++- collects/tests/racket/read.rktl | 8 ++++++++ src/racket/src/read.c | 9 ++++++--- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/collects/scribblings/reference/read.scrbl b/collects/scribblings/reference/read.scrbl index 9355611abb0..3e63ed48b31 100644 --- a/collects/scribblings/reference/read.scrbl +++ b/collects/scribblings/reference/read.scrbl @@ -158,7 +158,9 @@ is @racket[#f]. If @racket[in] has a @litchar{#lang} or @litchar{#!} specification, but parsing and resolving the specification raises an exception, the -exception is propagated by @racket[read-language]. +exception is propagated by @racket[read-language]. Having at least +@litchar{#l} or @litchar{#!} (after comments and whitespace) counts as +starting a @litchar{#lang} or @litchar{#!} specification. If @racket[in] does not specify a @tech{reader language} with @litchar{#lang} or @litchar{#!}, then @racket[fail-thunk] is diff --git a/collects/tests/racket/read.rktl b/collects/tests/racket/read.rktl index 55a860963a9..38f93b84d36 100644 --- a/collects/tests/racket/read.rktl +++ b/collects/tests/racket/read.rktl @@ -1095,6 +1095,14 @@ (check-nothing ";" exn:fail:read:eof?) (check-nothing "#| |#" exn:fail:read:eof?) (check-nothing "8 9" exn:fail:read?)) +(err/rt-test (read-language (open-input-string "#l") void) exn:fail:read:eof?) +(err/rt-test (read-language (open-input-string "#la") void) exn:fail:read:eof?) +(err/rt-test (read-language (open-input-string ";;\n;\n#la") void) exn:fail:read:eof?) +(err/rt-test (read-language (open-input-string ";;\n;\n#lx") void) exn:fail:read?) +(test (void) read-language (open-input-string ";;\n;\n#xa") void) +;; Check error-message formatting: +(err/rt-test (read (open-input-string "#l")) + (lambda (exn) (regexp-match? #rx"`#l'" (exn-message exn)))) ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; diff --git a/src/racket/src/read.c b/src/racket/src/read.c index a1e31523d03..6f0535b408d 100644 --- a/src/racket/src/read.c +++ b/src/racket/src/read.c @@ -1547,16 +1547,19 @@ read_inner_inner(Scheme_Object *port, Scheme_Object *stxsrc, Scheme_Hash_Table * } return v; } else { + if (ch == EOF) --fl; scheme_read_err(port, stxsrc, line, col, pos, 6, ch, indentation, - "read: expected a single space after `#lang'", - found, fl); + "read%s: expected a single space after `#lang'", + (get_info ? "-language" : "")); return NULL; } } } } + if (ch == EOF) --fl; scheme_read_err(port, stxsrc, line, col, pos, fl, ch, indentation, - "read: bad input: `#%u'", + "read%s: bad input: `#%u'", + (get_info ? "-language" : ""), found, (intptr_t)fl); return NULL; } From 01c641d14f210f0452bc0246c3ff2d2ba5725560 Mon Sep 17 00:00:00 2001 From: Stephen Chang Date: Sun, 30 Jan 2011 12:10:47 -0500 Subject: [PATCH 070/441] fix lazy take bug -- invariant being tested on unforced argument (cherry picked from commit 808361b789efe494df60cdd85cb154627d9fdeb6) --- collects/lazy/lazy.rkt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/collects/lazy/lazy.rkt b/collects/lazy/lazy.rkt index 1171091cadf..8d386567ab8 100644 --- a/collects/lazy/lazy.rkt +++ b/collects/lazy/lazy.rkt @@ -576,8 +576,8 @@ (define* (take n l) (let ([n0 (! n)]) - (unless (exact-nonnegative-integer? n) - (raise-type-error 'take "non-negative exact integer" 0 n l)) + (unless (exact-nonnegative-integer? n0) + (raise-type-error 'take "non-negative exact integer" 0 n0 l)) (let loop ([n n0] [l l]) (if (zero? n) '() From 58f98ed1dcee69bfa6d6e6fa492ac326830e780a Mon Sep 17 00:00:00 2001 From: Stephen Chang Date: Sun, 30 Jan 2011 12:12:55 -0500 Subject: [PATCH 071/441] add test for lazy take bug fix -- invariant being incorrectly tested on unforced arg (cherry picked from commit 08d99f4858bb20f82c9266eaadf7de87dba19e4b) --- collects/tests/lazy/langimpl.rkt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/collects/tests/lazy/langimpl.rkt b/collects/tests/lazy/langimpl.rkt index 30f20406a21..6dbee9933a9 100644 --- a/collects/tests/lazy/langimpl.rkt +++ b/collects/tests/lazy/langimpl.rkt @@ -24,7 +24,9 @@ (! (first (take 4 test-lst1))) => 1 (! (second (take 4 test-lst1))) => 2 (! (third (take 4 test-lst1))) => 3 - (! (fourth (take 4 test-lst1))) =error> "take: index 4 too large for input list")) + (! (fourth (take 4 test-lst1))) =error> "take: index 4 too large for input list" + (! (list-ref (take (car (list 1)) (list 2)) 0)) => 2 + )) ; not working, only get 1 test passed #;(define (langimpl-tests) From 7c51edfe762f16cd39f043507a88e62f06f828c9 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Sun, 30 Jan 2011 13:52:04 -0500 Subject: [PATCH 072/441] Reorganize, improve, and extend lazy tests. (cherry picked from commit 6b5e09073a31c030122b310140060c6c7692ea96) --- collects/lazy/lazy.rkt | 4 +- collects/tests/lazy/forcers.rkt | 52 ++++++++++++++ collects/tests/lazy/lang.rkt | 113 ++++++++++++++++++------------- collects/tests/lazy/langimpl.rkt | 33 --------- collects/tests/lazy/main.rkt | 12 ++-- collects/tests/lazy/promise.rkt | 6 +- 6 files changed, 131 insertions(+), 89 deletions(-) create mode 100644 collects/tests/lazy/forcers.rkt delete mode 100644 collects/tests/lazy/langimpl.rkt diff --git a/collects/lazy/lazy.rkt b/collects/lazy/lazy.rkt index 8d386567ab8..b8810618032 100644 --- a/collects/lazy/lazy.rkt +++ b/collects/lazy/lazy.rkt @@ -337,7 +337,7 @@ (define* (~vector-set! vec i val) (~ (vector-set! (! vec) (! i) val))) (define* (~set-box! box val) (~ (set-box! (! box) val))) - ;; not much to do with these besides inserting strict points + ;; not much to do with these besides inserting strictness points and ~begin (define-syntax (~cond stx) (syntax-case stx () [(_ [test body ...] ...) @@ -598,6 +598,8 @@ ;; -------------------------------------------------------------------------- ;; mzlib/list functionality + ;; These are a hack, they're not the same due to different error + ;; messages (and they work with improper lists too). (define* (rest x) (~cdr x)) (define* (first x) (~car x)) (define* (second x) (~cadr x)) diff --git a/collects/tests/lazy/forcers.rkt b/collects/tests/lazy/forcers.rkt new file mode 100644 index 00000000000..6a922b60504 --- /dev/null +++ b/collects/tests/lazy/forcers.rkt @@ -0,0 +1,52 @@ +#lang racket/base + +(require tests/eli-tester lazy/force) + +(define (test-lazy/force) + (test (! 1) => 1 + (! (! 1)) => 1 + (! (~ 1)) => 1 + (! (~ (~ (~ 1)))) => 1)) + +(define (test-!list) + (test (!list (list 1 2 3)) => '(1 2 3) + (!list (~ (list 1 2 3))) => '(1 2 3) + (!list (~ (cons 1 (~ (cons 2 (~ (cons 3 (~ null)))))))) => '(1 2 3) + (!list 1) => 1 ; works on dotted lists + (!list (cons 1 2)) => '(1 . 2))) + +(define (test-!!list) + (test (!!list (list 1 2 3)) => '(1 2 3) + (!!list (list (~ 1) (~ 2) (~ 3))) => '(1 2 3) + (!!list (list* (~ 1) (~ 2) (~ 3))) => '(1 2 . 3) + (!!list (~ (cons (~ 1) (~ (cons (~ 2) (~ (cons (~ 3) (~ null)))))))) + => '(1 2 3) + (!!list (~ (cons (~ 1) (~ (list 2 3))))) => '(1 2 3) + (!!list (~ (cons (~ 1) (~ (list 2 (~ 3)))))) => '(1 2 3))) + +(define (test-!!) + (parameterize ([print-graph #t]) + (test + (!! (~ (cons (~ 1) (~ (cons (~ 2) (~ (cons (~ 3) (~ null)))))))) + => '(1 2 3) + (format "~s" (!! (letrec ([ones (~ (cons 1 (~ ones)))]) ones))) + => "#0=(1 . #0#)" + (format "~s" (!! (letrec ([ones (~ (cons 1 (~ ones)))]) (list ones ones)))) + => "(#0=(1 . #0#) #0#)" + (format "~s" (!! (letrec ([x (vector 1 (~ x))]) x))) + => "#0=#(1 #0#)" + (format "~s" (!! (letrec ([x (vector-immutable 1 (~ x))]) x))) + => "#0=#(1 #0#)" + (format "~s" (!! (letrec ([x (box (~ x))]) x))) + => "#0=#�#" + (format "~s" (!! (letrec ([x (box-immutable (~ x))]) x))) + => "#0=#�#" + (format "~s" (!! (letrec ([x (make-prefab-struct 'foo 1 (~ x))]) x))) + => "#0=#s(foo 1 #0#)"))) + +(provide forcer-tests) +(define (forcer-tests) + (test do (test-lazy/force) + do (test-!list) + do (test-!!list) + do (test-!!))) diff --git a/collects/tests/lazy/lang.rkt b/collects/tests/lazy/lang.rkt index 81feaa39694..535745cb3b7 100644 --- a/collects/tests/lazy/lang.rkt +++ b/collects/tests/lazy/lang.rkt @@ -1,54 +1,75 @@ -#lang scheme/base +#lang lazy -(require tests/eli-tester lazy/force) +(require tests/eli-tester) -;; Currently this has only tests for the lazy language `!' forcer. +;; tests for lazy language constructs -(define (test-lazy/force) - (test (! 1) => 1 - (! (! 1)) => 1 - (! (~ 1)) => 1 - (! (~ (~ (~ 1)))) => 1)) +(define (basic-tests) + (test + (! ((car (list if)) (< 1 2) 3 (error "poof"))) => 3 + (! ((car (list or)) 3 (error "poof"))) => 3 + (! ((car (list and)) (< 2 1) (error "poof"))) => #f + (!! (let ([x 0]) (set! x 1) (list x))) => '(1) ; implicit begin forces + (! (let ([x 0]) (when (zero? x) (error "poof")) 1)) =error> "poof" + (! (let ([x 0]) (when (zero? x) (set! x (add1 x)) (set! x (add1 x))) x)) + => 2 + (! (let ([x 1]) (unless (zero? x) (set! x (add1 x)) (set! x (add1 x))) x)) + => 3 + (! (let ([x 0]) (cond [(zero? x) (set! x (add1 x)) (set! x (add1 x))]) x)) + => 2 + (! (eq? 1 1)) => #t + (! (eq? 1 2)) => #f + (! (eqv? 1.0 1.0)) => #t + (! (eqv? 1.0 1)) => #f + (! (= 1.0 1)) => #t + (! (equal? (list 1.0) (list 1.0))) => #t + (! (letrec ([zs (cons 0 zs)]) (equal? (list zs zs) (list zs zs)))) => #t + )) -(define (test-!list) - (test (!list (list 1 2 3)) => '(1 2 3) - (!list (~ (list 1 2 3))) => '(1 2 3) - (!list (~ (cons 1 (~ (cons 2 (~ (cons 3 (~ null)))))))) => '(1 2 3) - (!list 1) => 1 ; works on dotted lists - (!list (cons 1 2)) => '(1 . 2))) +(define (list-tests) + (test + (! (car 0)) =error> "car: expects argument of type " + (! (cdr 0)) =error> "cdr: expects argument of type " + (! (car (cons 1 (/ 1 0)))) => 1 + (! (cdr (cons (/ 1 0) 1))) => 1 + (! (list-ref (list (/ 1 0) 1 (/ 1 0)) 1)) => 1 + (! (list-ref (cons 1 (/ 1 0)) 0)) => 1 ; doesn't force list structure + (! (list-tail (cons (/ 1 0) 0) 1)) => 0 + (! (length (list (/ 1 0) (/ 1 0) (/ 1 0)))) => 3 + (! (let ([l (list (/ 1 0) (/ 1 0))]) (length (append l l l)))) => 6 + (!! (member 1 (cons 0 (cons 1 2)))) => '(1 . 2) + (!! (memq 1 (cons 0 (cons 1 2)))) => '(1 . 2) + (!! (memv 1 (cons 0 (cons 1 2)))) => '(1 . 2) + (! (second (map car (list 1 2 3)))) =error> "expects argument of type" + (! (second (map car (list 1 '(2) 3)))) => 2 + )) -(define (test-!!list) - (test (!!list (list 1 2 3)) => '(1 2 3) - (!!list (list (~ 1) (~ 2) (~ 3))) => '(1 2 3) - (!!list (list* (~ 1) (~ 2) (~ 3))) => '(1 2 . 3) - (!!list (~ (cons (~ 1) (~ (cons (~ 2) (~ (cons (~ 3) (~ null)))))))) - => '(1 2 3) - (!!list (~ (cons (~ 1) (~ (list 2 3))))) => '(1 2 3) - (!!list (~ (cons (~ 1) (~ (list 2 (~ 3)))))) => '(1 2 3))) - -(define (test-!!) - (parameterize ([print-graph #t]) - (test - (!! (~ (cons (~ 1) (~ (cons (~ 2) (~ (cons (~ 3) (~ null)))))))) - => '(1 2 3) - (format "~s" (!! (letrec ([ones (~ (cons 1 (~ ones)))]) ones))) - => "#0=(1 . #0#)" - (format "~s" (!! (letrec ([ones (~ (cons 1 (~ ones)))]) (list ones ones)))) - => "(#0=(1 . #0#) #0#)" - (format "~s" (!! (letrec ([x (vector 1 (~ x))]) x))) - => "#0=#(1 #0#)" - (format "~s" (!! (letrec ([x (vector-immutable 1 (~ x))]) x))) - => "#0=#(1 #0#)" - (format "~s" (!! (letrec ([x (box (~ x))]) x))) - => "#0=#�#" - (format "~s" (!! (letrec ([x (box-immutable (~ x))]) x))) - => "#0=#�#" - (format "~s" (!! (letrec ([x (make-prefab-struct 'foo 1 (~ x))]) x))) - => "#0=#s(foo 1 #0#)"))) +(define (take-tests) + (define test-lst1 '(1 2 3)) + (test + (! (take "nonnum" test-lst1)) + =error> + #rx"take: expects type as 1st .* '\\(1 2 3\\)" + (! (take -1 test-lst1)) + =error> "take: expects type as 1st argument" + (! (take -1 "nonlist")) + =error> "take: expects type as 1st argument" + (! (take 0 "nonlist")) => '() + (! (take 1 "nonlist")) =error> "take: not a proper list: \"nonlist\"" + (! (take 0 null)) => '() + (! (take 0 test-lst1)) => '() + (!! (take 1 test-lst1)) => '(1) + (!! (take 2 test-lst1)) => '(1 2) + (!! (take 3 (take 4 test-lst1))) => '(1 2 3) ; doesn't force the error + (! (fourth (take 4 test-lst1))) ; this one does + =error> "take: index 4 too large for input list" + (! (list-ref (take (~ 1) (list 2)) 0)) => 2 + (! (take 0 (error))) => '() ; doesn't even force the list structure + (!! (take 1 (cons 0 (error "poof")))) => '(0) + )) (provide lang-tests) (define (lang-tests) - (test do (test-lazy/force) - do (test-!list) - do (test-!!list) - do (test-!!))) + (! (begin (basic-tests) + (list-tests) + (take-tests)))) diff --git a/collects/tests/lazy/langimpl.rkt b/collects/tests/lazy/langimpl.rkt deleted file mode 100644 index 6dbee9933a9..00000000000 --- a/collects/tests/lazy/langimpl.rkt +++ /dev/null @@ -1,33 +0,0 @@ -#lang scheme/base - -(require tests/eli-tester lazy) - -;; tests for lazy language constructs -;; add tests as needed - -(provide test-take) - -(define (test-take) - (define test-lst1 '(1 2 3)) - (test (! (take "nonnum" test-lst1)) =error> "take: expects type as 1st argument, given: \"nonnum\"; other arguments were: (1 2 3)" - (! (take -1 test-lst1)) =error> "take: expects type as 1st argument, given: -1; other arguments were: (1 2 3)" - (! (take -1 "nonlist")) =error> "take: expects type as 1st argument, given: -1; other arguments were: \"nonlist\"" - (! (take 0 "nonlist")) => '() ; this is how Racket's take behaves - (! (take 1 "nonlist")) =error> "take: not a proper list: \"nonlist\"" - (! (take 0 null)) => '() - (! (take 0 test-lst1)) => '() ; test for push#22080 - (! (car (take 1 test-lst1))) => 1 - (! (cdr (take 1 test-lst1))) => '() - (! (first (take 2 test-lst1))) => 1 - (! (second (take 2 test-lst1))) => 2 - (! (cddr (take 2 test-lst1))) => '() - (! (first (take 4 test-lst1))) => 1 - (! (second (take 4 test-lst1))) => 2 - (! (third (take 4 test-lst1))) => 3 - (! (fourth (take 4 test-lst1))) =error> "take: index 4 too large for input list" - (! (list-ref (take (car (list 1)) (list 2)) 0)) => 2 - )) - -; not working, only get 1 test passed -#;(define (langimpl-tests) - (test (test-take))) \ No newline at end of file diff --git a/collects/tests/lazy/main.rkt b/collects/tests/lazy/main.rkt index eb81b0fa868..d83898e1358 100644 --- a/collects/tests/lazy/main.rkt +++ b/collects/tests/lazy/main.rkt @@ -1,9 +1,7 @@ -#lang scheme/base +#lang racket/base -(require tests/eli-tester "promise.rkt" "lang.rkt" "langimpl.rkt") +(require tests/eli-tester "promise.rkt" "forcers.rkt" "lang.rkt") -(test do (lang-tests) -; do (langimpl-tests) ; not working, so import test-take directly - do (test-take) - do (promise-tests) -) +(test do (promise-tests) + do (forcer-tests) + do (lang-tests)) diff --git a/collects/tests/lazy/promise.rkt b/collects/tests/lazy/promise.rkt index 71e347fa9cc..0dfb2b9ef16 100644 --- a/collects/tests/lazy/promise.rkt +++ b/collects/tests/lazy/promise.rkt @@ -1,6 +1,8 @@ -#lang scheme/base +#lang racket/base -(require scheme/promise tests/eli-tester (for-syntax scheme/base)) +;; Tests for the various racket promises + +(require racket/promise tests/eli-tester (for-syntax racket/base)) ;; check that things are `promise?'s or not (define (test-types) From 60cc50a54bf2e274b024aa606fdbed55dcc3e24b Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sun, 30 Jan 2011 15:39:40 -0600 Subject: [PATCH 073/441] avoid `on-size' problems Merge to 5.1 (cherry picked from commit e2c43bf3ecc969112693e926bbbb7cf846fea4eb) --- collects/mred/private/wxwindow.rkt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/collects/mred/private/wxwindow.rkt b/collects/mred/private/wxwindow.rkt index dc18af233d6..7d82d2731d1 100644 --- a/collects/mred/private/wxwindow.rkt +++ b/collects/mred/private/wxwindow.rkt @@ -206,8 +206,8 @@ (set! old-h h) (as-exit (lambda () (send mred on-size w h))))) (let* ([p (area-parent)] - [x (- (get-x) (or (and p (send p dx)) 0))] - [y (- (get-y) (or (and p (send p dy)) 0))]) + [x (max -10000 (min 10000 (- (get-x) (or (and p (send p dx)) 0))))] + [y (max -10000 (min 10000 (- (get-y) (or (and p (send p dy)) 0))))]) (when (not (and (= x old-x) (= y old-y))) (set! old-x x) (set! old-y y) From 3112877e2b216fdebd7e3b6df82d76ed0e14ed38 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sun, 30 Jan 2011 15:39:50 -0600 Subject: [PATCH 074/441] cocoa: create window to show composition via an input method Merge to 5.1 (cherry picked from commit bbb12848d191d6d7a03513ce17463f649410a570) --- collects/mred/private/wx/cocoa/window.rkt | 71 +++++++++++++++++++++-- 1 file changed, 67 insertions(+), 4 deletions(-) diff --git a/collects/mred/private/wx/cocoa/window.rkt b/collects/mred/private/wx/cocoa/window.rkt index a6a597da60e..409b6ef5eb1 100644 --- a/collects/mred/private/wx/cocoa/window.rkt +++ b/collects/mred/private/wx/cocoa/window.rkt @@ -68,13 +68,15 @@ [-a _BOOL (resignFirstResponder) (and (super-tell resignFirstResponder) (let ([wx (->wx wxb)]) - (when wx (send wx is-responder wx #f)) + (when wx + (send wx is-responder wx #f) + (send wx set-saved-marked #f #f)) #t))] [-a _void (changeColor: [_id sender]) (let ([wx (->wx wxb)]) (when wx (send wx on-color-change)))]) -(import-class NSArray) +(import-class NSArray NSPanel NSTextView) (import-protocol NSTextInput) (define current-insert-text (make-parameter #f)) @@ -257,6 +259,12 @@ (substring s start (max (+ start (NSRange-length range)) (string-length s))))) +(define-objc-class InputMethodPanel NSPanel + [] + [-a _BOOL (canBecomeKeyWindow) #f] + [-a _BOOL (canBecomeMainWindow) #f] + [-a _void (windowDidResize: [_id notification]) + (reset-input-method-window-size)]) (define-objc-mixin (KeyMouseTextResponder Superclass) #:mixins (KeyMouseResponder) @@ -812,9 +820,64 @@ ;; For multi-key character composition: (define saved-marked #f) (define saved-sel #f) - (define/public (set-saved-marked v sel) (set! saved-marked v) (set! saved-sel sel)) + (define/public (set-saved-marked v sel) + (set! saved-marked v) + (set! saved-sel sel) + (if (and v + (not (string=? v "")) + ;; Don't show the window for an empty string or certain + ;; simple combinations (probably a better way than this); + (not (member v '("š" "ˆ" "ÂŽ" "`" "˜")))) + (create-compose-window) + (when compose-cocoa + (tellv compose-cocoa orderOut: #f)))) (define/public (get-saved-marked) saved-marked) - (define/public (get-saved-selected) saved-sel))) + (define/public (get-saved-selected) saved-sel) + + (define/private (create-compose-window) + (unless compose-cocoa + (set! compose-cocoa (tell (tell InputMethodPanel alloc) + initWithContentRect: #:type _NSRect (make-NSRect + (make-NSPoint 0 20) + (make-NSSize 300 20)) + styleMask: #:type _int (bitwise-ior NSUtilityWindowMask + NSResizableWindowMask + NSClosableWindowMask) + backing: #:type _int NSBackingStoreBuffered + defer: #:type _BOOL NO)) + (set! compose-text (tell (tell NSTextView alloc) + initWithFrame: #:type _NSRect (make-NSRect + (make-NSPoint 0 0) + (make-NSSize 10 10)))) + (tellv compose-cocoa setFloatingPanel: #:type _BOOL #t) + (tellv (tell compose-cocoa contentView) addSubview: compose-text) + (tellv compose-text sizeToFit) + (tellv compose-cocoa setContentBorderThickness: #:type _CGFloat 5.0 forEdge: #:type _int 1) + (let ([h (+ (NSSize-height + (NSRect-size + (tell #:type _NSRect + compose-cocoa frameRectForContentRect: + #:type _NSRect (make-NSRect (make-NSPoint 0 0) + (make-NSSize 0 0))))) + (NSSize-height (NSRect-size (tell #:type _NSRect compose-text frame))))]) + (tellv compose-cocoa setMinSize: #:type _NSSize (make-NSSize 1 h)) + (tellv compose-cocoa setMaxSize: #:type _NSSize (make-NSSize 32000 h)) + (tellv compose-cocoa setFrame: #:type _NSRect (make-NSRect (make-NSPoint 0 20) + (make-NSSize 300 h)) + display: #:type _BOOL #t)) + (reset-input-method-window-size) + (tellv compose-cocoa setDelegate: compose-cocoa)) + (tellv compose-text + setMarkedText: #:type _NSString saved-marked + selectedRange: #:type _NSRange (make-NSRange (car saved-sel) (cdr saved-sel))) + (tellv compose-cocoa orderFront: #f)))) + +(define (reset-input-method-window-size) + (tell compose-text setFrame: #:type _NSRect + (tell #:type _NSRect (tell compose-cocoa contentView) frame))) + +(define compose-cocoa #f) +(define compose-text #f) ;; ---------------------------------------- From 7b34013eda4d193cf350690ef925e2960e7c6d79 Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Mon, 31 Jan 2011 06:43:47 -0600 Subject: [PATCH 075/441] attempt to clarify the overlay/xy and underlay/xy documentation Merge to 5.1 (cherry picked from commit 3add4bce4d822a92f1b5f9729a62d8fd48b1a833) --- .../teachpack/2htdp/scribblings/image.scrbl | 25 +++++++++++-------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/collects/teachpack/2htdp/scribblings/image.scrbl b/collects/teachpack/2htdp/scribblings/image.scrbl index d22aa8e81d8..cb54ea8d119 100644 --- a/collects/teachpack/2htdp/scribblings/image.scrbl +++ b/collects/teachpack/2htdp/scribblings/image.scrbl @@ -661,17 +661,21 @@ the @scheme[point-count] argument determines how many points the star has. } @defproc[(overlay/xy [i1 image?] [x real?] [y real?] [i2 image?]) image?]{ - Constructs an image by overlaying @racket[i1] on top of @racket[i2] after - shifting @racket[i2] over by @racket[x] pixels to the right and @racket[y] - pixels down. + Constructs an image by overlaying @racket[i1] on top of @racket[i2]. + The images are initially lined up on their upper-left corners and + then @racket[i2] is shifted to the right + by @racket[x] pixels to and down by @racket[y] pixels. + + This is the same as @racket[(underlay/xy i2 (- x) (- y) i1)]. + @image-examples[(overlay/xy (rectangle 20 20 "outline" "black") 20 0 (rectangle 20 20 "outline" "black")) (overlay/xy (rectangle 20 20 "solid" "red") - 20 20 + 10 10 (rectangle 20 20 "solid" "black")) (overlay/xy (rectangle 20 20 "solid" "red") - -20 -20 + -10 -10 (rectangle 20 20 "solid" "black")) (overlay/xy (overlay/xy (ellipse 40 40 "outline" "black") @@ -738,9 +742,10 @@ the @scheme[point-count] argument determines how many points the star has. } @defproc[(underlay/xy [i1 image?] [x real?] [y real?] [i2 image?]) image?]{ - Constructs an image by underlaying @racket[i1] underneath of @racket[i2] after - shifting @racket[i2] over by @racket[x] pixels to the right and @racket[y] - pixels down. + Constructs an image by underlaying @racket[i1] underneath @racket[i2]. + The images are initially lined up on their upper-left corners and + then @racket[i2] is shifted to the right + by @racket[x] pixels to and down by @racket[y] pixels. This is the same as @racket[(overlay/xy i2 (- x) (- y) i1)]. @@ -748,10 +753,10 @@ the @scheme[point-count] argument determines how many points the star has. 20 0 (rectangle 20 20 "outline" "black")) (underlay/xy (rectangle 20 20 "solid" "red") - 20 20 + 10 10 (rectangle 20 20 "solid" "black")) (underlay/xy (rectangle 20 20 "solid" "red") - -20 -20 + -10 -10 (rectangle 20 20 "solid" "black")) (underlay/xy (underlay/xy (ellipse 40 40 "solid" "gray") From c417d1f39d3bd98b73aab9ae8fb8c68e545cc56f Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Mon, 31 Jan 2011 06:47:37 -0700 Subject: [PATCH 076/441] fix `read-language' exn construction in an EOF case Closes PR 11683 Merge to 5.1 (cherry picked from commit dd5f0dfc80ddaf6e7d3215519a08d907928c0e5a) --- collects/tests/racket/read.rktl | 7 +++++++ src/racket/src/read.c | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/collects/tests/racket/read.rktl b/collects/tests/racket/read.rktl index 38f93b84d36..3ccbb96391b 100644 --- a/collects/tests/racket/read.rktl +++ b/collects/tests/racket/read.rktl @@ -1103,6 +1103,13 @@ ;; Check error-message formatting: (err/rt-test (read (open-input-string "#l")) (lambda (exn) (regexp-match? #rx"`#l'" (exn-message exn)))) +;; Make sure read-language error here is this can comes from read-language +;; and not from an ill-formed srcloc construction: +(let () + (define p (open-input-string ";\n")) + (port-count-lines! p) + (err/rt-test (read-language p) + (lambda (exn) (regexp-match? #rx"read-language" (exn-message exn))))) ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; diff --git a/src/racket/src/read.c b/src/racket/src/read.c index 6f0535b408d..fb99bc50ebe 100644 --- a/src/racket/src/read.c +++ b/src/racket/src/read.c @@ -992,6 +992,13 @@ read_inner_inner(Scheme_Object *port, Scheme_Object *stxsrc, Scheme_Hash_Table * dispatch_ch = ch; if (get_info && (dispatch_ch != '#') && (dispatch_ch != ';')) { + /* If ch is EOF, then col or pos wasn't incremented by reading ch. + The col and pos might be used in an error message, which expects + to subtract one from each --- so counteract by adding one here. */ + if (ch == EOF) { + if (pos >= 0) pos++; + if (col >= 0) col++; + } return expected_lang("", ch, port, stxsrc, line, col, pos, get_info); } From 40055e2ba18c2da1ca41589395f12afc557aa3d5 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Mon, 31 Jan 2011 12:39:57 -0700 Subject: [PATCH 077/441] cocoa: fix problem with dispatching key-up events Closes PR 11635 Merge to 5.1 (cherry picked from commit 152c636e1cd943a8f306fb5f96ed0197c2215e08) --- collects/mred/private/wx/cocoa/menu-bar.rkt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/collects/mred/private/wx/cocoa/menu-bar.rkt b/collects/mred/private/wx/cocoa/menu-bar.rkt index 2a3fde20f57..3bf8f0f8dd5 100644 --- a/collects/mred/private/wx/cocoa/menu-bar.rkt +++ b/collects/mred/private/wx/cocoa/menu-bar.rkt @@ -58,7 +58,12 @@ (and r (begin (parameterize ([recurring-for-command #t]) - (tell r keyDown: evt)) + (let ([evt-type (tell #:type _NSInteger evt type)]) + (cond + [(= NSKeyDown evt-type) + (tell r keyDown: evt)] + [(= NSKeyUp evt-type) + (tell r keyUp: evt)]))) #t))))))))) (define cocoa-mb (tell (tell MyBarMenu alloc) init)) From ff18afc1a9a964231d100aef02e5791caad5dc92 Mon Sep 17 00:00:00 2001 From: Vincent St-Amour Date: Fri, 28 Jan 2011 12:36:50 -0500 Subject: [PATCH 078/441] Documented opt-lambda: and popt-lambda:. (cherry picked from commit 4b3e621d0ff54671befe96bff3c49109128e8861) --- collects/typed-scheme/scribblings/ts-reference.scrbl | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/collects/typed-scheme/scribblings/ts-reference.scrbl b/collects/typed-scheme/scribblings/ts-reference.scrbl index 84cb9545e72..710f0c70ef6 100644 --- a/collects/typed-scheme/scribblings/ts-reference.scrbl +++ b/collects/typed-scheme/scribblings/ts-reference.scrbl @@ -296,6 +296,14 @@ A function of multiple arities. Note that each @racket[formals] must have a different arity.} @defform[(pcase-lambda: (a ...) [formals body] ...)]{ A polymorphic function of multiple arities.} +@defform/subs[(opt-lambda: formals . body) +([formals ([v : t] ... [v : t default] ...) + ([v : t] ... [v : t default] ... . [v : t *]) + ([v : t] ... [v : t default] ... . [v : t ...])])]{ +A function with optional arguments.} +@defform[(popt-lambda: (a ...) formals . body)]{ +A polymorphic function with optional arguments.} + @subsection{Loops} From 7a6d3c91e753046a9ae8459b7a0aefb4ab0522b4 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Mon, 31 Jan 2011 19:24:49 -0700 Subject: [PATCH 079/441] update Racket history for v5.1 Merge to 5.1 (cherry picked from commit 44987d3ce2e376bca441a81a00878f8db4466bf5) --- doc/release-notes/racket/HISTORY.txt | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/doc/release-notes/racket/HISTORY.txt b/doc/release-notes/racket/HISTORY.txt index d271c0416aa..c0f3d7d52f3 100644 --- a/doc/release-notes/racket/HISTORY.txt +++ b/doc/release-notes/racket/HISTORY.txt @@ -1,12 +1,9 @@ -5.0.99.7 -add `current-get-interaction-input-port', which enables - `racket/gui' events to be dispatched while a REPL is blocked - -5.0.99.2 -proxy => impersonator -equal? equates C pointers when they refer to the same address - -5.0.99.1 +Version 5.1, February 2011 +Renamed "proxy" to "impersonator" +Added current-get-interaction-input-port, which enables + racket/gui events to be dispatched while a REPL is blocked +Changed equal? to equate C pointers when they refer to the + same address Internal: weak boxes are cleared before non-will-like finalizers; use late-weak boxes to get the old behavior From f3085a81687f707214b40e33ad9e0796678b91b2 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Mon, 31 Jan 2011 22:35:33 -0500 Subject: [PATCH 080/441] New Racket version 5.0.99.900. --- src/worksp/gracket/gracket.manifest | 2 +- src/worksp/gracket/gracket.rc | 8 ++++---- src/worksp/mzcom/mzcom.rc | 8 ++++---- src/worksp/mzcom/mzobj.rgs | 6 +++--- src/worksp/racket/racket.manifest | 2 +- src/worksp/racket/racket.rc | 8 ++++---- src/worksp/starters/start.rc | 8 ++++---- 7 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/worksp/gracket/gracket.manifest b/src/worksp/gracket/gracket.manifest index d75e6b00fa6..941b5f5e49b 100644 --- a/src/worksp/gracket/gracket.manifest +++ b/src/worksp/gracket/gracket.manifest @@ -1,6 +1,6 @@ - diff --git a/src/worksp/gracket/gracket.rc b/src/worksp/gracket/gracket.rc index 46976b91aae..8f0813a5e4f 100644 --- a/src/worksp/gracket/gracket.rc +++ b/src/worksp/gracket/gracket.rc @@ -17,8 +17,8 @@ APPLICATION ICON DISCARDABLE "gracket.ico" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 5,0,99,7 - PRODUCTVERSION 5,0,99,7 + FILEVERSION 5,0,99,900 + PRODUCTVERSION 5,0,99,900 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -36,11 +36,11 @@ BEGIN VALUE "CompanyName", "PLT Scheme Inc.\0" VALUE "FileDescription", "Racket GUI application\0" VALUE "InternalName", "GRacket\0" - VALUE "FileVersion", "5, 0, 99, 7\0" + VALUE "FileVersion", "5, 0, 99, 900\0" VALUE "LegalCopyright", "Copyright © 1995-2011\0" VALUE "OriginalFilename", "GRacket.exe\0" VALUE "ProductName", "Racket\0" - VALUE "ProductVersion", "5, 0, 99, 7\0" + VALUE "ProductVersion", "5, 0, 99, 900\0" END END BLOCK "VarFileInfo" diff --git a/src/worksp/mzcom/mzcom.rc b/src/worksp/mzcom/mzcom.rc index e8be126ef21..0438cdff0ae 100644 --- a/src/worksp/mzcom/mzcom.rc +++ b/src/worksp/mzcom/mzcom.rc @@ -53,8 +53,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 5,0,99,7 - PRODUCTVERSION 5,0,99,7 + FILEVERSION 5,0,99,900 + PRODUCTVERSION 5,0,99,900 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -70,12 +70,12 @@ BEGIN BLOCK "040904b0" BEGIN VALUE "FileDescription", "MzCOM Module" - VALUE "FileVersion", "5, 0, 99, 7" + VALUE "FileVersion", "5, 0, 99, 900" VALUE "InternalName", "MzCOM" VALUE "LegalCopyright", "Copyright 2000-2011 PLT (Paul Steckler)" VALUE "OriginalFilename", "MzCOM.EXE" VALUE "ProductName", "MzCOM Module" - VALUE "ProductVersion", "5, 0, 99, 7" + VALUE "ProductVersion", "5, 0, 99, 900" END END BLOCK "VarFileInfo" diff --git a/src/worksp/mzcom/mzobj.rgs b/src/worksp/mzcom/mzobj.rgs index 5050eba105c..c9060e92d7e 100644 --- a/src/worksp/mzcom/mzobj.rgs +++ b/src/worksp/mzcom/mzobj.rgs @@ -1,19 +1,19 @@ HKCR { - MzCOM.MzObj.5.0.99.7 = s 'MzObj Class' + MzCOM.MzObj.5.0.99.900 = s 'MzObj Class' { CLSID = s '{A3B0AF9E-2AB0-11D4-B6D2-0060089002FE}' } MzCOM.MzObj = s 'MzObj Class' { CLSID = s '{A3B0AF9E-2AB0-11D4-B6D2-0060089002FE}' - CurVer = s 'MzCOM.MzObj.5.0.99.7' + CurVer = s 'MzCOM.MzObj.5.0.99.900' } NoRemove CLSID { ForceRemove {A3B0AF9E-2AB0-11D4-B6D2-0060089002FE} = s 'MzObj Class' { - ProgID = s 'MzCOM.MzObj.5.0.99.7' + ProgID = s 'MzCOM.MzObj.5.0.99.900' VersionIndependentProgID = s 'MzCOM.MzObj' ForceRemove 'Programmable' LocalServer32 = s '%MODULE%' diff --git a/src/worksp/racket/racket.manifest b/src/worksp/racket/racket.manifest index 0b5d08fee35..a07b1295c68 100644 --- a/src/worksp/racket/racket.manifest +++ b/src/worksp/racket/racket.manifest @@ -1,6 +1,6 @@ - diff --git a/src/worksp/racket/racket.rc b/src/worksp/racket/racket.rc index 8909243ff5e..5f0abe42b22 100644 --- a/src/worksp/racket/racket.rc +++ b/src/worksp/racket/racket.rc @@ -29,8 +29,8 @@ APPLICATION ICON DISCARDABLE "racket.ico" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 5,0,99,7 - PRODUCTVERSION 5,0,99,7 + FILEVERSION 5,0,99,900 + PRODUCTVERSION 5,0,99,900 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -48,11 +48,11 @@ BEGIN VALUE "CompanyName", "PLT Scheme Inc.\0" VALUE "FileDescription", "Racket application\0" VALUE "InternalName", "Racket\0" - VALUE "FileVersion", "5, 0, 99, 7\0" + VALUE "FileVersion", "5, 0, 99, 900\0" VALUE "LegalCopyright", "Copyright © 1995-2011\0" VALUE "OriginalFilename", "racket.exe\0" VALUE "ProductName", "Racket\0" - VALUE "ProductVersion", "5, 0, 99, 7\0" + VALUE "ProductVersion", "5, 0, 99, 900\0" END END BLOCK "VarFileInfo" diff --git a/src/worksp/starters/start.rc b/src/worksp/starters/start.rc index 03a1e246255..3774e48ce96 100644 --- a/src/worksp/starters/start.rc +++ b/src/worksp/starters/start.rc @@ -22,8 +22,8 @@ APPLICATION ICON DISCARDABLE "mzstart.ico" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 5,0,99,7 - PRODUCTVERSION 5,0,99,7 + FILEVERSION 5,0,99,900 + PRODUCTVERSION 5,0,99,900 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -45,7 +45,7 @@ BEGIN #ifdef MZSTART VALUE "FileDescription", "Racket Launcher\0" #endif - VALUE "FileVersion", "5, 0, 99, 7\0" + VALUE "FileVersion", "5, 0, 99, 900\0" #ifdef MRSTART VALUE "InternalName", "mrstart\0" #endif @@ -60,7 +60,7 @@ BEGIN VALUE "OriginalFilename", "MzStart.exe\0" #endif VALUE "ProductName", "Racket\0" - VALUE "ProductVersion", "5, 0, 99, 7\0" + VALUE "ProductVersion", "5, 0, 99, 900\0" END END BLOCK "VarFileInfo" From 62e35844fb26f4022c2d5c66b7455a9c3dceb636 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Tue, 1 Feb 2011 06:41:49 -0700 Subject: [PATCH 081/441] fix problem with `raco exe' Merge to 5.1 (cherry picked from commit b70e1eca60d2795bd9a0224dad235b646704935d) --- collects/compiler/distribute.rkt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/collects/compiler/distribute.rkt b/collects/compiler/distribute.rkt index f31c28b1195..22c6cfab994 100644 --- a/collects/compiler/distribute.rkt +++ b/collects/compiler/distribute.rkt @@ -378,7 +378,9 @@ (let loop ([exts exts][counter counter]) (cond [(null? exts) (values null counter)] - [(eq? 'module (cadar (car exts))) + [(and (pair? (car (car exts))) + (pair? (cdar (car exts))) + (eq? 'module (cadar (car exts)))) (let-values ([(rest-exts counter) (loop (cdr exts) counter)]) (values (cons (car exts) rest-exts) counter))] From 2de895ce467d2facc4913a2616a411210b72a089 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Tue, 1 Feb 2011 07:52:19 -0700 Subject: [PATCH 082/441] minor man-page corrections Merge to 5.1 (cherry picked from commit 0011b386ba5e80dd33ce69ba0f1b05ce0d3284cd) --- man/man1/gracket.1 | 4 ++-- man/man1/racket.1 | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/man/man1/gracket.1 b/man/man1/gracket.1 index d07e1a8b9df..9f89b570bd5 100644 --- a/man/man1/gracket.1 +++ b/man/man1/gracket.1 @@ -30,11 +30,11 @@ is the same as supplying the option for interactive evaluation. .PP -Supplying a single non-switch argument to +Supplying non-switch, non-configuration arguments to .B gracket is the same as putting .B -u -before the argument to run it as a module-based script. +before the arguments to run the first one as a module-based script. .SH MORE INFORMATION For further information, run diff --git a/man/man1/racket.1 b/man/man1/racket.1 index 23b399ba0a8..5e3d980670a 100644 --- a/man/man1/racket.1 +++ b/man/man1/racket.1 @@ -25,11 +25,11 @@ is the same as supplying the option for interactive evaluation. .PP -Supplying a single non-switch argument to +Supplying non-switch, non-configuration arguments to .B racket is the same as putting .B -u -before the argument to run it as a module-based script. +before the arguments to run the first one as a module-based script. .SH MORE INFORMATION For further information, run From 0b9f8bcabe506acccee950e762a095342a73b881 Mon Sep 17 00:00:00 2001 From: Jay McCarthy Date: Tue, 1 Feb 2011 08:55:24 -0700 Subject: [PATCH 083/441] External versions Merge to release branch (cherry picked from commit 0aa19be48e0c736a6193ba284d9dc39c6f88af06) --- collects/web-server/compat/0/README | 4 ++-- collects/web-server/scribblings/faq.scrbl | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/collects/web-server/compat/0/README b/collects/web-server/compat/0/README index 9b75f4b4355..d07e4c9f18b 100644 --- a/collects/web-server/compat/0/README +++ b/collects/web-server/compat/0/README @@ -1,7 +1,7 @@ -In Racket 5.0.99.4 and before, the Web Server supported implicit +In Racket 5.0.2 and before, the Web Server supported implicit conversion of X-expressions and lists with the format (cons/c bytes? (listof (or/c string? bytes?))) into response data structures for output. -After 5.0.99.4, this implicit conversion has been generalized into any->response. In the process, implicit conversion has been completely removed from some internal plumbing AND the response structures have been streamlined---primarily for efficiency. +After 5.0.2, this implicit conversion has been generalized into any->response. In the process, implicit conversion has been completely removed from some internal plumbing AND the response structures have been streamlined---primarily for efficiency. This document describes the incompatible changes and how to restore the old behavior when that is possible. diff --git a/collects/web-server/scribblings/faq.scrbl b/collects/web-server/scribblings/faq.scrbl index dfa56abfc91..61d03a9baf5 100644 --- a/collects/web-server/scribblings/faq.scrbl +++ b/collects/web-server/scribblings/faq.scrbl @@ -5,7 +5,7 @@ @section{Why is my servlet failing with a @racket[can-be-response?] contract violation after updating Racket?} -After 5.0.99.4, the Web Server had a backwards incompatible change that prevents X-expressions and lists of bytes from being directly returned from servlets. Please read @filepath{PLTHOME/collects/web-server/compat/0/README} to learn about porting your servlets forward. Don't worry. It's easy. +After 5.0.2, the Web Server had a backwards incompatible change that prevents X-expressions and lists of bytes from being directly returned from servlets. Please read @filepath{PLTHOME/collects/web-server/compat/0/README} to learn about porting your servlets forward. Don't worry. It's easy. @section{Why are my templates not updating on the server when I change the file on disk?} From 51e37ac3824d7bb1a92f9230fde91285c2d5f95a Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Tue, 1 Feb 2011 10:12:24 -0600 Subject: [PATCH 084/441] updated release notes please merge to 5.1 branch (cherry picked from commit d5749aebba5893e52a80881be37a3f3e8ababb2a) --- doc/release-notes/drracket/HISTORY.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/release-notes/drracket/HISTORY.txt b/doc/release-notes/drracket/HISTORY.txt index e2fe0a551d7..338420147fe 100644 --- a/doc/release-notes/drracket/HISTORY.txt +++ b/doc/release-notes/drracket/HISTORY.txt @@ -1,7 +1,9 @@ ------------------------------ - Version 5.0.2 + Version 5.1 ------------------------------ + . same (the game) has a new scoring system and different graphics + . Added image->color-list and color-list->bitmap to 2htdp/image From bb5407a24a59be7edd877681bac0b543a04d5201 Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Tue, 1 Feb 2011 12:12:36 -0600 Subject: [PATCH 085/441] add an extra check to make sure drracket is more likely to startup when things go wrong in strange ways Please merge to the 5.1 release branch (cherry picked from commit 823b6629aae7a1c668c2dffb2d89a16fc4a5889c) --- collects/drracket/private/module-language.rkt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/collects/drracket/private/module-language.rkt b/collects/drracket/private/module-language.rkt index e7801396c56..34916eb38fc 100644 --- a/collects/drracket/private/module-language.rkt +++ b/collects/drracket/private/module-language.rkt @@ -82,7 +82,11 @@ (set! sandbox (make-evaluator 'racket/base))))) (define/override (first-opened settings) - (define ns (get-ns (get-auto-text settings))) + (define ns (with-handlers ((exn:fail? (lambda (x) #f))) + ;; get-ns can fail in all kinds of strange ways; + ;; just give up if it does, since an error here + ;; means drracket won't start up. + (get-ns (get-auto-text settings)))) (when ns (current-namespace ns))) (define/private (get-ns str) From b11a9de62b78e4db932fdc8bcacd9f7611964c5d Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Tue, 1 Feb 2011 14:49:57 -0600 Subject: [PATCH 086/441] fix the get-token-range method in the case that the colorer's current region doesn't start at the begining of the buffer Please merge to the release branch (cherry picked from commit 8c6c1a0e9bfee79db27b6234a806df533b5bd7cb) --- collects/framework/private/color.rkt | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/collects/framework/private/color.rkt b/collects/framework/private/color.rkt index 08ef4f5ecce..a1203f8fd18 100644 --- a/collects/framework/private/color.rkt +++ b/collects/framework/private/color.rkt @@ -817,16 +817,18 @@ added get-regions ;; Determines whether a position is a 'comment, 'string, etc. (define/public (classify-position position) - (define tokens (get-tokens-at-position 'classify-position position)) + (define-values (tokens ls) (get-tokens-at-position 'classify-position position)) (and tokens (let ([root-data (send tokens get-root-data)]) (and root-data (data-type root-data))))) (define/public (get-token-range position) - (define tokens (get-tokens-at-position 'get-token-range position)) - (values (and tokens (send tokens get-root-start-position)) - (and tokens (send tokens get-root-end-position)))) + (define-values (tokens ls) (get-tokens-at-position 'get-token-range position)) + (values (and tokens (+ (lexer-state-start-pos ls) + (send tokens get-root-start-position))) + (and tokens (+ (lexer-state-start-pos ls) + (send tokens get-root-end-position))))) (define/private (get-tokens-at-position who position) (when stopped? @@ -836,7 +838,7 @@ added get-regions (let ([tokens (lexer-state-tokens ls)]) (tokenize-to-pos ls position) (send tokens search! (- position (lexer-state-start-pos ls))) - tokens)))) + (values tokens ls))))) (define/private (tokenize-to-pos ls position) (when (and (not (lexer-state-up-to-date? ls)) From 8c312b3181fa97ebd168636f5f8f01c620e40d79 Mon Sep 17 00:00:00 2001 From: Vincent St-Amour Date: Tue, 1 Feb 2011 17:47:57 -0500 Subject: [PATCH 087/441] Document the Path-String type. (cherry picked from commit 3c081d8fa7ed9f7328d6f9acffda4ef591da4e47) --- collects/typed-scheme/scribblings/ts-reference.scrbl | 1 + 1 file changed, 1 insertion(+) diff --git a/collects/typed-scheme/scribblings/ts-reference.scrbl b/collects/typed-scheme/scribblings/ts-reference.scrbl index 710f0c70ef6..48bcd6dc7ba 100644 --- a/collects/typed-scheme/scribblings/ts-reference.scrbl +++ b/collects/typed-scheme/scribblings/ts-reference.scrbl @@ -79,6 +79,7 @@ default in Racket. @defidform[Input-Port] @defidform[Output-Port] @defidform[Path] +@defidform[Path-String] @defidform[Regexp] @defidform[PRegexp] @defidform[Bytes] From 6b121cdce64aa596eec408bb1c4741d1f9e65fea Mon Sep 17 00:00:00 2001 From: Ryan Culpepper Date: Tue, 1 Feb 2011 16:32:34 -0700 Subject: [PATCH 088/441] warning to stderr, not stdout See PR 11691 Merge to release branch (cherry picked from commit fd3595e7d30b7fcabba84185f8d5c4e6d63aa239) --- collects/parser-tools/lex.rkt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collects/parser-tools/lex.rkt b/collects/parser-tools/lex.rkt index 279287553d7..e9983ab9624 100644 --- a/collects/parser-tools/lex.rkt +++ b/collects/parser-tools/lex.rkt @@ -113,7 +113,7 @@ (let ((next-check (vector-ref next 1))) (or (>= next-check max-char-num) (loop (add1 next-check) (cdr nexts)))))))))) - (printf "Warning: lexer at ~a can accept the empty string.\n" stx))) + (eprintf "Warning: lexer at ~a can accept the empty string.\n" stx))) (with-syntax ((start-state-stx start) (trans-table-stx trans) (no-lookahead-stx no-look) From d01e6a8dcce2a586953aa405bfeb1cec23c2c8bb Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Tue, 1 Feb 2011 20:49:58 -0500 Subject: [PATCH 089/441] Comment out what looks like debugging output --- collects/datalog/lang/configure-runtime.rkt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/collects/datalog/lang/configure-runtime.rkt b/collects/datalog/lang/configure-runtime.rkt index 5985d59d781..25e9ad3f934 100644 --- a/collects/datalog/lang/configure-runtime.rkt +++ b/collects/datalog/lang/configure-runtime.rkt @@ -1,7 +1,7 @@ #lang racket/base (define (configure data) - (printf "Configuring\n") + ;; (printf "Configuring\n") (current-read-interaction even-read)) (provide configure) @@ -17,4 +17,4 @@ (current-read-interaction odd-read))) (define (odd-read src ip) (current-read-interaction even-read) - eof) \ No newline at end of file + eof) From 0b4f5a093db77044b99797a50c3be44b2cc2d9e2 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Tue, 1 Feb 2011 19:36:22 -0700 Subject: [PATCH 090/441] add missing mutex unlock in error path Merge to 5.1 (cherry picked from commit 9134aa4ee80c0320a3f441b9cbf77cf268acfbb0) --- src/racket/src/future.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/racket/src/future.c b/src/racket/src/future.c index 3f4dce37c12..deeb3130524 100644 --- a/src/racket/src/future.c +++ b/src/racket/src/future.c @@ -1660,6 +1660,7 @@ static void invoke_rtcall(Scheme_Future_State * volatile fs, future_t * volatile future->status = FINISHED; future->work_completed = 1; future->retval = 0; + mzrt_mutex_unlock(fs->future_mutex); } else { /* Signal the waiting worker thread that it can continue running machine code */ From 2e67a39ae87cbbaf58970e1aa544b6ff877d859b Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Wed, 2 Feb 2011 06:04:23 -0700 Subject: [PATCH 091/441] gtk: force display of images in button labels Merge to 5.1 (cherry picked from commit 7291d944c34b50f958896b4013121777adc4f8e3) --- collects/mred/private/wx/gtk/button.rkt | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/collects/mred/private/wx/gtk/button.rkt b/collects/mred/private/wx/gtk/button.rkt index 561a304d19e..719ffab2ba1 100644 --- a/collects/mred/private/wx/gtk/button.rkt +++ b/collects/mred/private/wx/gtk/button.rkt @@ -33,6 +33,16 @@ (define-gtk gtk_container_remove (_fun _GtkWidget _GtkWidget -> _void)) (define-gtk gtk_bin_get_child (_fun _GtkWidget -> _GtkWidget)) +(define _GtkSettings (_cpointer 'GtkSettings)) +(define-gtk gtk_settings_get_default (_fun -> _GtkSettings)) +(define-gobj g_object_set/boolean + (_fun _GtkSettings _string _gboolean (_pointer = #f) -> _void) + #:c-id g_object_set) +(define (force-button-images-on gtk) + ;; Globally turning on button images isn't really the right thing. + ;; Is there a way to enable image just for the widget `gtk'? + (g_object_set/boolean (gtk_settings_get_default) "gtk-button-images" #t)) + (define-signal-handler connect-clicked "clicked" (_fun _GtkWidget -> _void) (lambda (gtk) @@ -65,7 +75,8 @@ (release-pixbuf pixbuf) (if (pair? label) (begin - (gtk_button_set_image gtk image-gtk) + (force-button-images-on gtk) + (gtk_button_set_image gtk image-gtk) (gtk_button_set_image_position gtk (case (caddr label) From 3b47d8eb35ab16872ea4f91cf2bdcaa0fabc3d8f Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Wed, 2 Feb 2011 06:32:51 -0700 Subject: [PATCH 092/441] gtk: fix drag-and-drop URI decoding Closes PR 11695 Merge to 5.1 (cherry picked from commit 2d01241f7ad3c3905a9629c6aa33ad7cd4c7e653) --- collects/mred/private/wx/gtk/window.rkt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/collects/mred/private/wx/gtk/window.rkt b/collects/mred/private/wx/gtk/window.rkt index fc6b99f0b4f..5e5467712cc 100644 --- a/collects/mred/private/wx/gtk/window.rkt +++ b/collects/mred/private/wx/gtk/window.rkt @@ -1,6 +1,7 @@ #lang racket/base (require ffi/unsafe racket/class + net/uri-codec ffi/unsafe/atomic "../../syntax.rkt" "../../lock.rkt" @@ -121,7 +122,10 @@ => (lambda (m) (queue-window-event wx (lambda () - (let ([path (bytes->path (cadr m))]) + (let ([path + (string->path + (uri-decode + (bytes->string/utf-8 (cadr m))))]) (send wx on-drop-file path)))))])))))) ;; ---------------------------------------- From 9e101a29414c5710d15e3942659994fb2a361812 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Wed, 2 Feb 2011 06:46:03 -0700 Subject: [PATCH 093/441] gtk: map left-tab key to #\tab Closes PR 11697 Merge to 5.1 (cherry picked from commit 0eed4e9462a227326b2edd0e1c4b2d6e739043b4) --- collects/mred/private/wx/gtk/keycode.rkt | 1 + 1 file changed, 1 insertion(+) diff --git a/collects/mred/private/wx/gtk/keycode.rkt b/collects/mred/private/wx/gtk/keycode.rkt index 2f704832485..02c5b9a48b0 100644 --- a/collects/mred/private/wx/gtk/keycode.rkt +++ b/collects/mred/private/wx/gtk/keycode.rkt @@ -8,6 +8,7 @@ #hash((#xff08 . #\backspace) (#xffff . #\rubout) (#xff09 . #\tab) + (#xfe20 . #\tab) ; left tab (sometimes from ctl-shift-tab) (#xff0a . #\newline) (#xff0d . #\return) (#xff1b . escape) ; escape From 709947bbb186aa566853e50047708b9aa4fd4b9d Mon Sep 17 00:00:00 2001 From: Casey Klein Date: Wed, 2 Feb 2011 10:36:10 -0600 Subject: [PATCH 094/441] Updates the Redex history for v5.1 Please merge to release branch. (cherry picked from commit 309bb47c7e6dc0f4cdd0bcd6c3dfd426abb3f377) --- doc/release-notes/redex/HISTORY.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/doc/release-notes/redex/HISTORY.txt b/doc/release-notes/redex/HISTORY.txt index 4b4d6a0577d..5e477c17d9f 100644 --- a/doc/release-notes/redex/HISTORY.txt +++ b/doc/release-notes/redex/HISTORY.txt @@ -1,3 +1,17 @@ +v5.1 + + * adds an optional #:pred keyword argument to `test-->>' form + + * added the `redex-pseudo-random-generator' parameter + + * added option `::=' syntax to non-terminal definitions + + * added contract support to `define-relation' + + * added the `test-->∃' form + + * fixed minor bugs + v5.0.2 * added `pretty-print-parameters' to control term pretty-printing From 63af7b4af06a1faeee8a8900dfb007f1c9468e9f Mon Sep 17 00:00:00 2001 From: Vincent St-Amour Date: Wed, 2 Feb 2011 13:54:37 -0500 Subject: [PATCH 095/441] Fix make-->vector doc typo. Closes PR 11698. Merge to 5.1. (cherry picked from commit 62327c5f50ff8b11a39d9d213811a17e853fe10f) --- collects/mzlib/scribblings/struct.scrbl | 2 +- collects/scribblings/guide/contracts-exists.scrbl | 2 +- collects/scribblings/guide/contracts-structure.scrbl | 2 +- src/plot/plplot/plot3d.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/collects/mzlib/scribblings/struct.scrbl b/collects/mzlib/scribblings/struct.scrbl index 90f57cf50e0..d95166c621d 100644 --- a/collects/mzlib/scribblings/struct.scrbl +++ b/collects/mzlib/scribblings/struct.scrbl @@ -60,7 +60,7 @@ property. ]} -@defform[(make->vector struct-id)]{ +@defform[(make-->vector struct-id)]{ Builds a function that accepts a structure type instance (matching @scheme[struct-id]) and provides a vector of the fields of the diff --git a/collects/scribblings/guide/contracts-exists.scrbl b/collects/scribblings/guide/contracts-exists.scrbl index 13081b9d535..3e8d25763a5 100644 --- a/collects/scribblings/guide/contracts-exists.scrbl +++ b/collects/scribblings/guide/contracts-exists.scrbl @@ -44,7 +44,7 @@ data structure (perhaps accidentally) and thus any change in the representation (say to a more efficient representation that supports amortized constant time enqueue and dequeue operations) might break client code. -To ensure that the stack representation is abstact, we can use @racket[#:∃] in the +To ensure that the stack representation is abstract, we can use @racket[#:∃] in the @racket[provide/contract] expression, like this: @racketblock[(provide/contract #:∃ stack diff --git a/collects/scribblings/guide/contracts-structure.scrbl b/collects/scribblings/guide/contracts-structure.scrbl index 87ecd8d3747..c81c6dc996e 100644 --- a/collects/scribblings/guide/contracts-structure.scrbl +++ b/collects/scribblings/guide/contracts-structure.scrbl @@ -224,7 +224,7 @@ racket (code:comment "bst-between : number number -> contract") (code:comment "builds a contract for binary search trees") -(code:comment "whose values are betweeen low and high") +(code:comment "whose values are between low and high") (define (bst-between/c low high) (or/c null? (node/dc [val (between/c low high)] diff --git a/src/plot/plplot/plot3d.c b/src/plot/plplot/plot3d.c index b07d52d4706..1aa91fed65c 100644 --- a/src/plot/plplot/plot3d.c +++ b/src/plot/plplot/plot3d.c @@ -519,7 +519,7 @@ plsurf3d(PLFLT *x, PLFLT *y, PLFLT **z, PLINT nx, PLINT ny, if (ct == 2) { /* yes, xx and yy are the intersection points of the triangle with - * the contour line -- draw a straight line betweeen the points + * the contour line -- draw a straight line between the points * -- at the end this will make up the contour line */ if (opt & SURF_CONT) { From e0029e50a83d4c04841875b3f034edafbbd79f0a Mon Sep 17 00:00:00 2001 From: Vincent St-Amour Date: Wed, 2 Feb 2011 14:18:29 -0500 Subject: [PATCH 096/441] Fix more doc typoes. Closes PR 11694. Merge to 5.1. (cherry picked from commit 2935170eff16b7d86a2f24234189cc083e9f360f) --- collects/scribblings/guide/contracts-examples.scrbl | 4 ++-- collects/scribblings/guide/contracts-examples/2.rkt | 2 +- collects/scribblings/guide/contracts-examples/5.rkt | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/collects/scribblings/guide/contracts-examples.scrbl b/collects/scribblings/guide/contracts-examples.scrbl index 48a0b516134..c89b9b99e1b 100644 --- a/collects/scribblings/guide/contracts-examples.scrbl +++ b/collects/scribblings/guide/contracts-examples.scrbl @@ -16,7 +16,7 @@ Mitchell and McKim's principles for design by contract DbC are derived from the 1970s style algebraic specifications. The overall goal of DbC is to specify the constructors of an algebra in terms of its observers. While we reformulate Mitchell and McKim's terminology and - we use a mostly applicative, we + we use a mostly applicative approach, we retain their terminology of ``classes'' and ``objects'': @itemize[ @@ -28,7 +28,7 @@ Mitchell and McKim's principles for design by contract DbC are derived implementation a command typically returns an new object of the same class.} -@item{@bold{Separate basic queries from derived queries} +@item{@bold{Separate basic queries from derived queries.} A @italic{derived query} returns a result that is computable in terms of basic queries.} diff --git a/collects/scribblings/guide/contracts-examples/2.rkt b/collects/scribblings/guide/contracts-examples/2.rkt index 9a53886be49..022eab13aba 100644 --- a/collects/scribblings/guide/contracts-examples/2.rkt +++ b/collects/scribblings/guide/contracts-examples/2.rkt @@ -50,7 +50,7 @@ [initialize (->d ([p contract?] [s (p p . -> . boolean?)]) () - ;; Mitchel and McKim use (= (count s) 0) here to express + ;; Mitchell and McKim use (= (count s) 0) here to express ;; the post-condition in terms of a primitive query [result (and/c stack? is-empty?)])] diff --git a/collects/scribblings/guide/contracts-examples/5.rkt b/collects/scribblings/guide/contracts-examples/5.rkt index ceeb0f96ec1..e9ddf099263 100644 --- a/collects/scribblings/guide/contracts-examples/5.rkt +++ b/collects/scribblings/guide/contracts-examples/5.rkt @@ -1,7 +1,7 @@ #lang racket ;; Note: this queue doesn't implement the capacity restriction -;; of McKim and Mitchell's queue but this is easy to add. +;; of Mitchell and McKim's queue but this is easy to add. ;; a contract utility (define (all-but-last l) (reverse (cdr (reverse l)))) @@ -32,7 +32,7 @@ ;; primitive queries ;; Imagine providing this 'query' for the interface of the module - ;; only. Then in Scheme, there is no reason to have count or is-empty? + ;; only. Then in Racket there is no reason to have count or is-empty? ;; around (other than providing it to clients). After all items is ;; exactly as cheap as count. [items (->d ([q queue?]) () [result (listof (queue-p? q))])] From 728cf780b1a3fa457b34c40e90ea698ec6b0595e Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Wed, 2 Feb 2011 16:09:06 -0500 Subject: [PATCH 097/441] Avoid compiling plot if the source directory is missing (cherry picked from commit e91f243b641016468b2f8a98376193f26aae2302) --- src/racket/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/racket/configure.ac b/src/racket/configure.ac index 8b5b0978cc0..24888918525 100644 --- a/src/racket/configure.ac +++ b/src/racket/configure.ac @@ -1259,7 +1259,7 @@ fi makefiles="$makefiles foreign/Makefile" ac_configure_args="$ac_configure_args$SUB_CONFIGURE_EXTRAS" -if test "${enable_plot}" = "yes" ; then +if test -d "${srcdir}/plot" && test "${enable_plot}" = "yes" ; then makefiles="$makefiles plot/Makefile" MAKE_PLOT=plot From 0c03da259615a9dbb022a0eaf7658f69683a4cee Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Tue, 1 Feb 2011 20:39:43 -0700 Subject: [PATCH 098/441] fix problem with allocation while holding a future lock Merge to 5.1 (cherry picked from commit 9d204c01cf910c1290838fe9712e083acc4eb474) --- src/racket/src/future.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/src/racket/src/future.c b/src/racket/src/future.c index deeb3130524..9c60c64a03c 100644 --- a/src/racket/src/future.c +++ b/src/racket/src/future.c @@ -227,7 +227,7 @@ typedef struct Scheme_Future_State { future_t *future_waiting_lwc; int next_futureid; - mzrt_mutex *future_mutex; + mzrt_mutex *future_mutex; /* BEWARE: don't allocate while holding this lock */ mzrt_sema *future_pending_sema; mzrt_sema *gc_ok_c; mzrt_sema *gc_done_c; @@ -825,19 +825,28 @@ Scheme_Object *touch(int argc, Scheme_Object *argv[]) mzrt_mutex_lock(fs->future_mutex); if (ft->work_completed) { + int id; + double time_of_start; + double time_of_completion; + retval = ft->retval; + id = ft->id; + time_of_start = ft->time_of_start; + time_of_completion = ft->time_of_completion; + + mzrt_mutex_unlock(fs->future_mutex); + /* Log execution time */ if (scheme_log_level_p(scheme_main_logger, SCHEME_LOG_DEBUG)) { scheme_log(scheme_main_logger, SCHEME_LOG_DEBUG, 0, - "future: %d finished. start time: %f, finish time: %f (%f ms)", - ft->id, - ft->time_of_start, - ft->time_of_completion, - ft->time_of_completion - ft->time_of_start); + "future: %d finished. start time: %f, finish time: %f (%f ms)", + id, + time_of_start, + time_of_completion, + time_of_completion - time_of_start); } - mzrt_mutex_unlock(fs->future_mutex); break; } else if (ft->rt_prim) From 6934115feccf65893cbda1818f1adc36cf42590f Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Wed, 2 Feb 2011 16:09:21 -0700 Subject: [PATCH 099/441] fix typo (cherry picked from commit d704f9565b8db7cf456dac84c025b188425c06c9) --- collects/scribblings/scribble/manual.scrbl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collects/scribblings/scribble/manual.scrbl b/collects/scribblings/scribble/manual.scrbl index cdf1288bb75..c3baaea8bcb 100644 --- a/collects/scribblings/scribble/manual.scrbl +++ b/collects/scribblings/scribble/manual.scrbl @@ -208,7 +208,7 @@ without insetting the code.} @defform[(RACKETRESULTBLOCK0 datum ...)] )]{ -Like @racketblock[racketblock], etc., but colors the typeset text as a +Like @racket[racketblock], etc., but colors the typeset text as a result (i.e., a single color with no hyperlinks) instead of code.} @deftogether[( From 68e13d858706e391edc274c10dd38d8fea51348c Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Wed, 2 Feb 2011 16:10:40 -0700 Subject: [PATCH 100/441] re-generate `configure' script Merge to 5.1, along with e91f243b64101 (cherry picked from commit 309e1aec4f800c5a5f947fc5ce07bf80bed07e5e) --- src/configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/configure b/src/configure index 02106880ef8..29d69a8246f 100755 --- a/src/configure +++ b/src/configure @@ -9910,7 +9910,7 @@ fi makefiles="$makefiles foreign/Makefile" ac_configure_args="$ac_configure_args$SUB_CONFIGURE_EXTRAS" -if test "${enable_plot}" = "yes" ; then +if test -d "${srcdir}/plot" && test "${enable_plot}" = "yes" ; then makefiles="$makefiles plot/Makefile" MAKE_PLOT=plot From 9b9dc8c2f868e2cf9ac6042c22bdd1aae8a08951 Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Wed, 2 Feb 2011 16:05:59 -0600 Subject: [PATCH 101/441] missed a multiple-vlaues change in a short-cut case. Please merge to the 5.1 release branch (cherry picked from commit 63aa388d495fc753c9772cc645e32672a841cc89) --- collects/framework/private/color.rkt | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/collects/framework/private/color.rkt b/collects/framework/private/color.rkt index a1203f8fd18..365c48f0ea6 100644 --- a/collects/framework/private/color.rkt +++ b/collects/framework/private/color.rkt @@ -825,20 +825,23 @@ added get-regions (define/public (get-token-range position) (define-values (tokens ls) (get-tokens-at-position 'get-token-range position)) - (values (and tokens (+ (lexer-state-start-pos ls) - (send tokens get-root-start-position))) - (and tokens (+ (lexer-state-start-pos ls) - (send tokens get-root-end-position))))) + (values (and tokens ls + (+ (lexer-state-start-pos ls) + (send tokens get-root-start-position))) + (and tokens ls + (+ (lexer-state-start-pos ls) + (send tokens get-root-end-position))))) (define/private (get-tokens-at-position who position) (when stopped? (error who "called on a color:text<%> whose colorer is stopped.")) (let ([ls (find-ls position)]) - (and ls - (let ([tokens (lexer-state-tokens ls)]) + (if ls + (let ([tokens (lexer-state-tokens ls)]) (tokenize-to-pos ls position) (send tokens search! (- position (lexer-state-start-pos ls))) - (values tokens ls))))) + (values tokens ls)) + (values #f #f)))) (define/private (tokenize-to-pos ls position) (when (and (not (lexer-state-up-to-date? ls)) From 9215e3c4018d6ea75b564ebb749b8120fc9d8bcc Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Wed, 2 Feb 2011 19:00:27 -0700 Subject: [PATCH 102/441] fix `image-snip%' unmarshaling with filename Merge to 5.1 (cherry picked from commit c2c6c79a15b12d2ca689a75ed519f1fb364e1fd8) --- collects/racket/snip/private/snip.rkt | 3 +-- collects/tests/gracket/wxme.rkt | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/collects/racket/snip/private/snip.rkt b/collects/racket/snip/private/snip.rkt index 5ccae9bab5e..fecdc0bd7c3 100644 --- a/collects/racket/snip/private/snip.rkt +++ b/collects/racket/snip/private/snip.rkt @@ -787,8 +787,7 @@ (def/override (read [editor-stream-in% f]) (let ([scl (get-the-snip-class-list)] [can-inline? ((send f do-reading-version this) . > . 1)]) - (let ([filename (let ([s (send f get-bytes #f)]) - (subbytes s 0 (max 0 (sub1 (bytes-length s)))))]) + (let ([filename (send f get-bytes #f)]) (let-boxes ([type 0] [w 0.0] [h 0.0] diff --git a/collects/tests/gracket/wxme.rkt b/collects/tests/gracket/wxme.rkt index 4208af35ff6..c436b39fb99 100644 --- a/collects/tests/gracket/wxme.rkt +++ b/collects/tests/gracket/wxme.rkt @@ -1347,4 +1347,23 @@ ;; ---------------------------------------- +(let () + (define (mk) (make-object image-snip% (collection-file-path "b-run.png" "icons") 'unknown #f #f)) + + (define is (mk)) + (define copy-is + (let () + (define sp (open-output-string)) + (define t (new text%)) + (send t insert (mk)) + (send t save-port sp) + (define t2 (new text%)) + (send t2 insert-port (open-input-string (get-output-string sp))) + (send t2 find-first-snip))) + + (expect (send (mk) get-filename) + (send copy-is get-filename))) + +;; ---------------------------------------- + (done) From 4e9b5bcaef12c0b6f5544a4cc2c9247ee0f0ea8f Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Wed, 2 Feb 2011 20:10:44 -0600 Subject: [PATCH 103/441] adjust the wxme reader so that it now creates image-snip%s when it finds image-snips in file it used to create image% objects that were simple containers for the data in the file; the change _should_ be backwards compatibile; the only know incompatibility is that the get-filename method now returns a path instead of bytes (this is to match the image-snip% class) closes PR 1168 please merge to the 5.1 release branch (cherry picked from commit 0fce29f552eeef416bfb66459123614518f02513) --- collects/racket/snip/private/snip.rkt | 6 +- collects/scribblings/gui/wxme.scrbl | 20 +-- .../gracket/image-snip-unmarshalling.rkt | 142 ++++++++++++++++++ collects/wxme/image.rkt | 59 +++++++- collects/wxme/wxme.rkt | 8 +- 5 files changed, 219 insertions(+), 16 deletions(-) create mode 100644 collects/tests/gracket/image-snip-unmarshalling.rkt diff --git a/collects/racket/snip/private/snip.rkt b/collects/racket/snip/private/snip.rkt index fecdc0bd7c3..1bcd4f27dc6 100644 --- a/collects/racket/snip/private/snip.rkt +++ b/collects/racket/snip/private/snip.rkt @@ -49,7 +49,8 @@ readable-snip<%> - image-type?) + image-type? + int->img-type) ;; these are used only in contracts ;; we don't want the real definitions b/c they require the gui @@ -826,6 +827,9 @@ (values filename (int->img-type type) #f))]) + ;; the call to create an image-snip% object + ;; here should match the way that super-make-object + ;; is called in wxme/image.rkt (let ([snip (make-object image-snip% (if (equal? loadfile #"") #f diff --git a/collects/scribblings/gui/wxme.scrbl b/collects/scribblings/gui/wxme.scrbl index e49260956a5..875dd4bdd9a 100644 --- a/collects/scribblings/gui/wxme.scrbl +++ b/collects/scribblings/gui/wxme.scrbl @@ -3,6 +3,7 @@ (for-label wxme wxme/editor wxme/image + racket/snip (except-in wxme/comment reader) (except-in wxme/xml reader) (except-in wxme/scheme reader) @@ -302,7 +303,7 @@ Several compatibility mappings are installed automatically for the @racketmodname[wxme] library. They correspond to popular graphical elements supported by various versions of DrRacket, including comment boxes, fractions, XML boxes, Racket boxes, text boxes, and images -generated by the ``world'' and ``image'' teachpacks (or, more +generated by the @racketmodname[htdp/image] teachpack (or, more generally, from @racketmodname[mrlib/cache-image-snip]), and test-case boxes. @@ -323,7 +324,8 @@ special-comment content is the readable instance. XML, Racket, and text boxes similarly produce instances of @racket[editor%] and @racket[readable<%>] that expand in the usual way; see @racketmodname[wxme/xml], @racketmodname[wxme/scheme], and -@racket[wxme/text]. Images from the ``world'' and ``image'' teachpacks +@racket[wxme/text]. Images from the +@racketmodname[htdp/image] teachpack are packaged as instances of @racket[cache-image%] from the @racketmodname[wxme/cache-image] library. Test-case boxes are packaged as instances of @racket[test-case%] from the @@ -353,14 +355,14 @@ editor's content.} @defmodule[wxme/image] -@defclass[image% object% ()]{ +@defclass[image% image-snip% ()]{ Instantiated for images in a @tech{WXME} stream in text mode. - -@defmethod[(get-filename) (or/c bytes? false/c)]{ - -Returns a filename as bytes, or @racket[#f] if data is available -instead.} +This class can just be treated like @racket[image-snip%] and should +behave just like it, except it has the methods below in addition +in case old code still needs them. In other words, the methods +below are provided for backwards compatibility with earlier +verisons of Racket. @defmethod[(get-data) (or/c bytes? false/c)]{ @@ -543,7 +545,7 @@ rational numbers.}] @defthing[reader (is-a?/c snip-reader<%>)]{ A text-mode reader for images in a WXME stream generated by the -``image'' and ``world'' teachpacks---or, more generally, by +@racketmodname[htdp/image] teachpack---or, more generally, by @racketmodname[mrlib/cache-image-snip].}] diff --git a/collects/tests/gracket/image-snip-unmarshalling.rkt b/collects/tests/gracket/image-snip-unmarshalling.rkt new file mode 100644 index 00000000000..cb8a4937ea2 --- /dev/null +++ b/collects/tests/gracket/image-snip-unmarshalling.rkt @@ -0,0 +1,142 @@ +#lang racket/gui +(require wxme + wxme/image) + +#| + +This file tests the wxme image-snip reader against the normal +image-snip reader (ie image-snip-class%'s read method) + +It creates a bunch of different image-snip% objects +(the try-perms and below functions) +and then feeds them thru both paths to get two new image snips +(in the beginning of test-wxme-image-snip-reader/proc) +and compares a bunch of properties of them +(the end of that function). + +|# + +(define-syntax (test-wxme-image-snip-reader stx) + (syntax-case stx () + [(_ is) + (with-syntax ([line (syntax-line stx)]) + #'(test-wxme-image-snip-reader/proc line is))])) + +(define tests 0) +(define (test-wxme-image-snip-reader/proc line is) + (set! tests (+ tests 1)) + (define t (new text%)) + (send t insert is) + (define sp (open-output-string)) + (void (send t save-port sp)) + (define wp (wxme-port->port (open-input-string (get-output-string sp)))) + (define wxme-is (read-char-or-special wp)) + + (define t2 (new text%)) + (send t2 insert-port (open-input-string (get-output-string sp))) + (define copy-is (send t2 find-first-snip)) + + (define (warn . args) + (fprintf (current-error-port) + (string-append (format "FAILED test-wxme-image-snip-reader.rkt line ~a: " line) + (apply format args)))) + + (define-syntax-rule (cmp mtd) (cmp/proc (λ (x) (send x mtd)) 'mtd)) + (define (cmp/proc call-mtd mtd) + (let ([is-ans (call-mtd is)] + [wxme-is-ans (call-mtd wxme-is)] + [copy-is-ans (call-mtd copy-is)]) + (unless (same? copy-is-ans wxme-is-ans) + (warn "~a returned different results; copy-is: ~s wxme-is: ~s\n" + mtd + copy-is-ans + wxme-is-ans)) + #; + (unless (same? is-ans copy-is-ans) + (warn "~a returned different results; is: ~s copy-is: ~s\n" + mtd + is-ans + copy-is-ans)))) + + (when (is-a? is image%) + (warn "the input image-snip% is an image%\n")) + + (unless (is-a? wxme-is image%) + (warn "new image snip is not an image%\n")) + + (cmp get-filename) + (cmp get-filetype) + (cmp get-bitmap) + (cmp get-bitmap-mask)) + +(define (same? x y) + (cond + [(and (is-a? x bitmap%) + (is-a? y bitmap%)) + (and (= (send x get-width) + (send y get-width)) + (= (send x get-height) + (send y get-height)) + (= (send x get-depth) + (send y get-depth)) + (check? (bitmap->bytes x #f) + (bitmap->bytes y #f) + 'bitmap/#f) + (check? (bitmap->bytes x #t) + (bitmap->bytes y #t) + 'bitmap/#t))] + [else (equal? x y)])) + + +(define (check? a b what) + (cond + [(equal? a b) #t] + [else + ;(fprintf (current-error-port) "checking ~s, doesn't match\n~s\nvs\n~s\n\n" what a b) + #f])) + +(define (bitmap->bytes bmp alpha?) + (define w (send bmp get-width)) + (define h (send bmp get-height)) + (define bytes (make-bytes (* 4 w h) 0)) + (send bmp get-argb-pixels 0 0 w h bytes alpha?) + bytes) + +(define (try-perms files kinds relative-path?s inline?s) + (for* ([file (in-list files)] + [kind (in-list kinds)] + [relative-path? (in-list relative-path?s)] + [inline? (in-list inline?s)]) + (test-wxme-image-snip-reader (make-object image-snip% file kind relative-path? inline?)))) + +(try-perms (list (collection-file-path "b-run.png" "icons")) + '(unknown unknown/mask unknown/alpha + png png/mask png/alpha) + '(#f) + '(#f #t)) + +(parameterize ([current-directory (collection-path "icons")]) + (try-perms (list "b-run.png") + '(unknown unknown/mask unknown/alpha + png png/mask png/alpha) + '(#f) + '(#f #t))) + +(define (draw-circle bm) + (define bdc (make-object bitmap-dc% bm)) + (send bdc set-smoothing 'smoothed) + (send bdc set-brush "red" 'solid) + (send bdc draw-ellipse 1 1 8 8) + (send bdc set-bitmap #f)) + +(let ([bm (make-bitmap 10 10 #f)]) + (draw-circle bm) + (test-wxme-image-snip-reader (make-object image-snip% bm)) + (test-wxme-image-snip-reader (make-object image-snip% bm #f)) + (test-wxme-image-snip-reader (make-object image-snip% bm bm))) + +(let ([bm (make-bitmap 10 10)]) + (draw-circle bm) + (test-wxme-image-snip-reader (make-object image-snip% bm))) + +(printf "ran ~a tests\n" tests) diff --git a/collects/wxme/image.rkt b/collects/wxme/image.rkt index 27915207b2b..24e3dba79ba 100644 --- a/collects/wxme/image.rkt +++ b/collects/wxme/image.rkt @@ -1,11 +1,62 @@ +#lang racket/base +(require racket/class + racket/snip + "private/class-help.ss") -(module image mzscheme - (require mzlib/class - "private/class-help.ss") +(provide image%) - (provide image%) +#| + +This code is a bit strange in order to attempt to +preserve backwards compatibility with pre-5.1 versions. + +The old version is: (define image% (class object% (init-accessible filename data w h dx dy) (super-new)))) + +The things I attempted to preserve: + + - image% as a class whose objects can be tested with is-a? + + - the get-* methods that init-accessible provides; with the exception + of get-filename, which is now the image-snip% method, these are done + still with init-accessible + + The get-filename method changed, tho: it now returns a path (it returned + bytes before) + + - the constructor arity (there are now additional optional arguments that + wxme supplies to be able to call super-make-object) + +The main change is to make this file depend on racket/snip so that +image% can be a subclass of image-snip% and thus work with things like +the 2htdp/universe libraries (in executables) + + +|# + +(define image% + (class image-snip% + (init filename) + (init-accessible data w h dx dy) + (init [relative 1] [type 'unknown]) + ;; the call to super-make-object is intended to mimic the way that racket/snip/private/snip.rkt + ;; creates an image-snip% object in the image-snip-class% class's read method + (let ([data (get-data)]) + (super-make-object + (if data + (let-values ([(in out) (make-pipe)]) + (thread (λ () (display data out) (close-output-port out))) + in) + (if (bytes? filename) + (bytes->path filename) + #f)) + (if data 'unknown/alpha type) + (positive? relative) + (and data #t))) + (inherit resize set-offset) + (resize (get-w) (get-h)) + (set-offset (get-dx) (get-dy)))) diff --git a/collects/wxme/wxme.rkt b/collects/wxme/wxme.rkt index 819e60b1b1f..97f110c0dd9 100644 --- a/collects/wxme/wxme.rkt +++ b/collects/wxme/wxme.rkt @@ -8,6 +8,7 @@ mzlib/list scheme/gui/dynamic syntax/modread + (only racket/snip/private/snip int->img-type) "image.ss" "editor.ss" "private/compat.ss") @@ -449,7 +450,7 @@ [h (read-inexact who port vers "image-snip height")] [dx (read-inexact who port vers "image-snip x-offset")] [dy (read-inexact who port vers "image-snip y-offset")] - [rel? (read-integer who port vers "image-snip relative?")]) + [relative (read-integer who port vers "image-snip relative?")]) (let ([data (and (and (equal? filename #"") (cvers . > . 1) @@ -466,7 +467,10 @@ (loop (add1 i))))))))]) (if (header-plain-text? header) #"." - (make-object image% (if data #f filename) data w h dx dy)))))] + (make-object image% + (if data #f filename) + data w h dx dy + relative (int->img-type type))))))] [else (if (header-skip-content? header) #f From cc249dcdc22d1a75c56316bc90b709268acd11be Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Thu, 3 Feb 2011 06:16:26 -0700 Subject: [PATCH 104/441] fix jpeg writing Closes PR 11701 Merge to 5.1 (cherry picked from commit 16eb172e5af019ce8f0aa6563c65f8c06ad7bee8) --- collects/racket/draw/unsafe/jpeg.rkt | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/collects/racket/draw/unsafe/jpeg.rkt b/collects/racket/draw/unsafe/jpeg.rkt index 08e7753d1ce..9399aec0fcd 100644 --- a/collects/racket/draw/unsafe/jpeg.rkt +++ b/collects/racket/draw/unsafe/jpeg.rkt @@ -562,11 +562,13 @@ (define (init-destination m) (void)) -(define (empty-output-buffer m) +(define (do-empty-output-buffer m all?) (let* ([d (jpeg_compress_struct-dest m)] [b (jpeg_destination_mgr-buffer d)] [bstr (scheme_make_sized_byte_string b - (- BUFFER-SIZE (jpeg_destination_mgr-free_in_buffer d)) + (if all? + BUFFER-SIZE + (- BUFFER-SIZE (jpeg_destination_mgr-free_in_buffer d))) 0)] [out (ptr-ref (jpeg_compress_struct-client_data m) _scheme)]) (write-bytes bstr out) @@ -574,8 +576,11 @@ (set-jpeg_destination_mgr-free_in_buffer! d BUFFER-SIZE) #t)) +(define (empty-output-buffer m) + (do-empty-output-buffer m #t)) + (define (term-destination m) - (empty-output-buffer m) + (do-empty-output-buffer m #f) ;; Maybe add support to optionally close port as early as possible? (when #f (let ([in (ptr-ref (jpeg_decompress_struct-client_data m) _scheme)]) From bef9f8f0cb78253d10d32858a01c4c5be3db5c8e Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Thu, 3 Feb 2011 06:30:10 -0700 Subject: [PATCH 105/441] fix guide typos Closes PR 11700 Merge to 5.1 (cherry picked from commit 08cc4dffb2ebdf5d60abce6a121adf32817b4fdb) --- collects/scribblings/guide/match.scrbl | 6 +++--- collects/scribblings/guide/performance.scrbl | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/collects/scribblings/guide/match.scrbl b/collects/scribblings/guide/match.scrbl index 426294d9925..2918045db4e 100644 --- a/collects/scribblings/guide/match.scrbl +++ b/collects/scribblings/guide/match.scrbl @@ -84,9 +84,9 @@ variables} that are bound in the result expressions: (match '(1 2) [(list x) (+ x 1)] [(list x y) (+ x y)]) -(match (make-hat 23 'bowler) - [(struct shoe (sz col)) sz] - [(struct hat (sz stl)) sz]) +(match (hat 23 'bowler) + [(shoe sz col) sz] + [(hat sz stl) sz]) ] An ellipsis, written @litchar{...}, act like a Kleene star within a diff --git a/collects/scribblings/guide/performance.scrbl b/collects/scribblings/guide/performance.scrbl index 396a46b3c5f..e1db5497537 100644 --- a/collects/scribblings/guide/performance.scrbl +++ b/collects/scribblings/guide/performance.scrbl @@ -64,10 +64,10 @@ The module system aids optimization by helping to ensure that identifiers have the usual bindings. That is, the @racket[+] provided by @racketmodname[racket/base] can be recognized by the compiler and inlined, which is especially important for @tech{JIT}-compiled code. -In contrast, in a traditional interactive Racket system, the top-level +In contrast, in a traditional interactive Scheme system, the top-level @racket[+] binding might be redefined, so the compiler cannot assume a fixed @racket[+] binding (unless special flags or declarations -act as a poor-man's module system to indicate otherwise). +are used to compensate for the lack of a module system). Even in the top-level environment, importing with @racket[require] enables some inlining optimizations. Although a @racket[+] definition From 99866b29fdf6877b31f4434c97287c7e401eed5f Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Thu, 3 Feb 2011 10:23:16 -0500 Subject: [PATCH 106/441] Check for libracket instead of any .so file (cherry picked from commit 83d2e5c151609f8c578007b5b2f74fbee8c4e71d) --- collects/setup/unixstyle-install.rkt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collects/setup/unixstyle-install.rkt b/collects/setup/unixstyle-install.rkt index ef16708e3d6..c731c6d9582 100644 --- a/collects/setup/unixstyle-install.rkt +++ b/collects/setup/unixstyle-install.rkt @@ -383,7 +383,7 @@ (define (move/copy-distribution move?) (define do-tree (move/copy-tree move?)) (current-directory rktdir) - (when (ormap (lambda (p) (regexp-match #rx"[.]so" p)) (ls "lib")) + (when (ormap (lambda (p) (regexp-match #rx"libracket.*[.]so" p)) (ls "lib")) (error "Cannot handle distribution of shared-libraries (yet)")) (with-handlers ([exn? (lambda (e) (undo-changes) (raise e))]) (define binfiles (ls "bin")) ; see below From d1f4b2fdfc1457e90ae3b64ed7f10417d9887cce Mon Sep 17 00:00:00 2001 From: John Clements Date: Thu, 3 Feb 2011 10:24:42 -0800 Subject: [PATCH 107/441] stepper HISTORY.txt updated (cherry picked from commit b60aca2f8fe1a75d34bba01245d13af54e90ff15) --- doc/release-notes/stepper/HISTORY.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/doc/release-notes/stepper/HISTORY.txt b/doc/release-notes/stepper/HISTORY.txt index e3f0cf543e4..c47a687563f 100644 --- a/doc/release-notes/stepper/HISTORY.txt +++ b/doc/release-notes/stepper/HISTORY.txt @@ -1,5 +1,12 @@ Stepper ------- +Changes for v5.1: + +Quite a bit of rackety, retabbing, refactoring. There's no longer a closure +table, but instead functions expand into applicable structures. Cleanup of +unnecessary function arguments. Got rid of '2vals' idiom. Improved jump +to ... error messages. + Changes for v5.0.2: Bug fixes, Big Bang working again. Define-struct in local not working. From cebe089e1bbfb7d54f9b146c77c212575ac91101 Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Thu, 3 Feb 2011 17:59:43 -0600 Subject: [PATCH 108/441] don't show themodule langauge opt-in buttons when we're not in the module language anymore (this extra check is necessary because we might have moved languages between the time the timer is started and when it fires) closes PR 11705 Please merge to the release 5.1 branch (cherry picked from commit c119cef915e7e739540eb07bb31693713f2aea0c) --- collects/drracket/private/module-language-tools.rkt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/collects/drracket/private/module-language-tools.rkt b/collects/drracket/private/module-language-tools.rkt index e4360fb184b..a230666c34b 100644 --- a/collects/drracket/private/module-language-tools.rkt +++ b/collects/drracket/private/module-language-tools.rkt @@ -100,7 +100,9 @@ (unless timer (set! timer (new timer% [notify-callback - (λ () (move-to-new-language))] + (λ () + (when in-module-language? + (move-to-new-language)))] [just-once? #t]))) (send timer stop) (send timer start 200 #t))))) From fb36f2147703d66a3ed78fc80b574b4c8d7203db Mon Sep 17 00:00:00 2001 From: Ryan Culpepper Date: Thu, 3 Feb 2011 14:22:12 -0700 Subject: [PATCH 109/441] fixed doc typo Fixes PR 11703 Merge to release branch (cherry picked from commit 4ef3dfe6a8770e385fd9dd70d68d599df43b9cd1) --- collects/syntax/scribblings/parse/patterns.scrbl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collects/syntax/scribblings/parse/patterns.scrbl b/collects/syntax/scribblings/parse/patterns.scrbl index 610f0945797..9c15c864232 100644 --- a/collects/syntax/scribblings/parse/patterns.scrbl +++ b/collects/syntax/scribblings/parse/patterns.scrbl @@ -147,7 +147,7 @@ One of @ref[~commit s] or @ref[~commit h]: @defidform[~delimit-cut]{ -One of @ref[~delimit-cut s] or @ref[~describe h]: +One of @ref[~delimit-cut s] or @ref[~delimit-cut h]: @itemize[ @item{@ref[~delimit-cut h] if the subpattern is a @tech{proper @Hpattern}} @item{@ref[~delimit-cut s] otherwise} From 4bb3fd937aa668418184c53617f1953dbaa6a2b7 Mon Sep 17 00:00:00 2001 From: Ryan Culpepper Date: Thu, 3 Feb 2011 14:32:34 -0700 Subject: [PATCH 110/441] fix macro stepper bug (missing hash) Merge to release branch (cherry picked from commit 1054c504ead66fc348487ec726c92bb83a51bd67) --- collects/macro-debugger/syntax-browser/widget.rkt | 4 ++-- collects/macro-debugger/view/step-display.rkt | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/collects/macro-debugger/syntax-browser/widget.rkt b/collects/macro-debugger/syntax-browser/widget.rkt index fd75cdd0ff9..b84fddc62f1 100644 --- a/collects/macro-debugger/syntax-browser/widget.rkt +++ b/collects/macro-debugger/syntax-browser/widget.rkt @@ -117,8 +117,8 @@ (send -text change-style clickback-style a b))))) (define/public (add-syntax stx - #:binders [binders #f] - #:shift-table [shift-table #f] + #:binders [binders '#hash()] + #:shift-table [shift-table '#hash()] #:definites [definites #f] #:hi-colors [hi-colors null] #:hi-stxss [hi-stxss null] diff --git a/collects/macro-debugger/view/step-display.rkt b/collects/macro-debugger/view/step-display.rkt index 51259a617ef..d2f6f7d58d6 100644 --- a/collects/macro-debugger/view/step-display.rkt +++ b/collects/macro-debugger/view/step-display.rkt @@ -84,9 +84,9 @@ (show-poststep step shift-table)])) (define/public (add-syntax stx - #:binders [binders #f] + #:binders [binders '#hash()] #:definites [definites #f] - #:shift-table [shift-table #f]) + #:shift-table [shift-table '#hash()]) (send/i sbview sb:syntax-browser<%> add-syntax stx #:binders binders #:definites definites From 6eedd57f8b408d9e98f414b1a1dfd3a1117ceaa2 Mon Sep 17 00:00:00 2001 From: Ryan Culpepper Date: Thu, 3 Feb 2011 16:42:05 -0700 Subject: [PATCH 111/441] fixed race in rackunit gui Merge to release branch (cherry picked from commit 9d42ef9235e40de846fc480d6fcd13fa0f00a929) --- collects/rackunit/private/gui/view.rkt | 67 ++++++++++++++------------ 1 file changed, 36 insertions(+), 31 deletions(-) diff --git a/collects/rackunit/private/gui/view.rkt b/collects/rackunit/private/gui/view.rkt index 79315f597fe..4de4a148df8 100644 --- a/collects/rackunit/private/gui/view.rkt +++ b/collects/rackunit/private/gui/view.rkt @@ -71,8 +71,16 @@ still be there, just not visible? (view this) (controller controller))) - ;; for update management - (define update-queue (make-hasheq)) + ;; Update management + ;; Do adds in order, then updates in any order (hash). + + ;; add-queue : (listof (-> void)) + (define add-queue null) + + ;; update-queue : (imm-hashof model<%> #t) + (define update-queue '#hasheq()) + + ;; update-lock : semaphore (define update-lock (make-semaphore 1)) (send editor lock #t) @@ -83,12 +91,6 @@ still be there, just not visible? ;; View Links - (define/public (create-view-link model parent) - (parameterize ((current-eventspace eventspace)) - (queue-callback - (lambda () - (send tree-view create-view-link model parent))))) - (define/private (get-view-link model) (send tree-view get-view-link model)) @@ -108,10 +110,18 @@ still be there, just not visible? ;; Update Management + ;; create-view-link : model suite-result<%>/#f -> void + (define/public (create-view-link model parent) + (let ([proc (lambda () (send tree-view create-view-link model parent))]) + (semaphore-wait update-lock) + (set! add-queue (cons proc add-queue)) + (semaphore-post update-lock) + (process-updates))) + ;; queue-for-update : model -> void (define/public (queue-for-update model) (semaphore-wait update-lock) - (hash-set! update-queue model #t) + (set! update-queue (hash-set update-queue model #t)) (semaphore-post update-lock) (process-updates)) @@ -120,38 +130,33 @@ still be there, just not visible? (parameterize ((current-eventspace eventspace)) (queue-callback (lambda () - (let ([models-to-update (grab+clear-update-queue)]) - (for ([model models-to-update]) + (let-values ([(adds updates) (grab+clear-update-queue)]) + (for ([add (in-list adds)]) + (add)) + (for ([model (in-hash-keys updates)]) (do-model-update model))))))) - ;; grab+clear-update-queue : -> void + ;; grab+clear-update-queue : -> (values list hash) ;; ** Must be called from eventspace thread. (define/private (grab+clear-update-queue) (semaphore-wait update-lock) - (if (positive? (hash-count update-queue)) - (let ([old-queue update-queue]) - (set! update-queue (make-hasheq)) - (semaphore-post update-lock) - (reverse - (hash-map old-queue (lambda (k v) k)))) - (begin (semaphore-post update-lock) - null))) + (begin0 + (values (reverse add-queue) + update-queue) + (set! add-queue null) + (set! update-queue '#hasheq()) + (semaphore-post update-lock))) ;; do-model-update : model<%> -> void ;; ** Must be called from eventspace thread. (define/private (do-model-update model) (let ([view-link (get-view-link model)]) - (cond [view-link - (send tree-view update-item view-link) - (when (eq? model (get-selected-model)) - (show-model model))] - [(not view-link) - ;; If the view-link has not been created, - ;; yield until it is. - (unless (yield) - (error 'rackunit-gui - "internal error: no progress waiting for view-link")) - (do-model-update model)]))) + (unless view-link + ;; should not be possible + (error 'rackunit-gui "internal error: no view-link")) + (send tree-view update-item view-link) + (when (eq? model (get-selected-model)) + (show-model model)))) ;; Update display From 968eb414759007c569cd93c802f676c3174173a7 Mon Sep 17 00:00:00 2001 From: Ryan Culpepper Date: Thu, 3 Feb 2011 16:53:49 -0700 Subject: [PATCH 112/441] auto-open top-level test suites in rackunit gui Merge to release branch (cherry picked from commit e3c02f7072638719d3d7b81cd3dcde4c1171a101) --- collects/rackunit/private/gui/view.rkt | 27 ++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/collects/rackunit/private/gui/view.rkt b/collects/rackunit/private/gui/view.rkt index 4de4a148df8..9a716b04f5b 100644 --- a/collects/rackunit/private/gui/view.rkt +++ b/collects/rackunit/private/gui/view.rkt @@ -222,19 +222,22 @@ still be there, just not visible? ;; Construction - ;; create-view-link : result<%> suite-result<%>/#f-> item + ;; create-view-link : result<%> suite-result<%>/#f-> void (define/public (create-view-link model parent) - (let ([parent-link - (if parent - (get-view-link parent) - this)]) - (initialize-view-link (cond [(is-a? model suite<%>) - (send parent-link new-list)] - [(is-a? model case<%>) - (send parent-link new-item)]) - model))) - - ;; initialize-view-link : result<%> (U compound-item% item%) -> item + (let* ([parent-link + (if parent + (get-view-link parent) + this)] + [view-link + (cond [(is-a? model suite<%>) + (send parent-link new-list)] + [(is-a? model case<%>) + (send parent-link new-item)])]) + (initialize-view-link view-link model) + (when (and (is-a? model suite<%>) (not parent)) + (send view-link open)))) + + ;; initialize-view-link : result<%> (U compound-item% item%) -> void (define/private (initialize-view-link item model) (set-view-link model item) (send item user-data model) From cc4c928274a7d60e5c973b98ac360fa2e31b632e Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Thu, 3 Feb 2011 15:55:44 -0500 Subject: [PATCH 113/441] Try to kill the test thread after a minute, and exit after another minute. (cherry picked from commit 2fe690b29ebe2c0df572b25f675051e3f0232d3f) --- collects/tests/run-automated-tests.rkt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/collects/tests/run-automated-tests.rkt b/collects/tests/run-automated-tests.rkt index de5ce084a12..6fb9427d53e 100755 --- a/collects/tests/run-automated-tests.rkt +++ b/collects/tests/run-automated-tests.rkt @@ -73,7 +73,13 @@ (lambda () (sleep (* 60 timeout)) (echo "Timeout!") - (break-thread th))))) + (break-thread th) + (sleep 60) + (echo " A minute has passed, killing the test thread!") + (kill-thread th) + (sleep 60) + (echo " Another minute passed, aborting!") + (abort 1 "Goodbye."))))) (parameterize* ([exit-handler (lambda (n) (abort n "exit with error code ~a" n))] [current-namespace (make-base-empty-namespace)]) From bfae2d4573a5685c4b2afedc12343d2cae9464a2 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Thu, 3 Feb 2011 21:24:11 -0500 Subject: [PATCH 114/441] Proxy the irc logs from pre.racket-lang.org. That's where the bot needs to run; use a proxy instead of NFS. (cherry picked from commit d2a6da75617b3c97235f489188c50daa3aab23b8) --- collects/meta/web/www/irc.rkt | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/collects/meta/web/www/irc.rkt b/collects/meta/web/www/irc.rkt index 5e10970200c..42835d509ef 100644 --- a/collects/meta/web/www/irc.rkt +++ b/collects/meta/web/www/irc.rkt @@ -11,9 +11,14 @@ @page[#:title "IRC" #:part-of 'community]{ @iframe[src: webchat-link width: "100%" height: "400"]}) -(define irc-logs-symlink - (symlink "/home/scheme/irc-logs/racket/" "irc-logs")) -(define (irc-logs text) @a[href: (list irc-logs-symlink "/")]{@text}) +(define irc-logs + (let () + @plain[#:file "irc-logs/.htaccess" #:referrer values]{ + RewriteEngine on + RewriteRule ^(.*)$ http://pre.racket-lang.org@; + /irc-logs/@||racket/@|"$1"| [P] + } + (lambda (text) @a[href: "irc-logs/"]{@text}))) (define (irc-quick) @parlist[@strong{Discussion Channel} From c10d0a6f88364b98cd136c2c1229d8d0554e4c7a Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Thu, 3 Feb 2011 13:16:39 -0700 Subject: [PATCH 115/441] fix doc bug Closes PR 11690 Merge to 5.1 (cherry picked from commit ab588eb69ad01acdd24ee82f0d37471767c64c59) --- collects/scribblings/guide/pattern-macros.scrbl | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/collects/scribblings/guide/pattern-macros.scrbl b/collects/scribblings/guide/pattern-macros.scrbl index 4a967768fc7..877b7fc3dff 100644 --- a/collects/scribblings/guide/pattern-macros.scrbl +++ b/collects/scribblings/guide/pattern-macros.scrbl @@ -3,6 +3,8 @@ scribble/eval "guide-utils.ss") +@(define swap-eval (make-base-eval)) + @title[#:tag "pattern-macros"]{Pattern-Based Macros} A @deftech{pattern-based macro} replaces any code that matches a @@ -247,9 +249,9 @@ Given our macro definitions, the @racket[swap] or @racket[rotate] identifiers must be used after an open parenthesis, otherwise a syntax error is reported: -@interaction-eval[(define-syntax swap (syntax-rules ()))] +@interaction-eval[#:eval swap-eval (define-syntax swap (syntax-rules ()))] -@interaction[(+ swap 3)] +@interaction[#:eval swap-eval (+ swap 3)] An @deftech{identifier macro} works in any expression. For example, we can define @racket[clock] as an identifier macro that expands to @@ -481,3 +483,6 @@ Racket with just three small pattern-based macros: @racket[define-cbr], @racket[define-for-cbr], and @racket[define-get/put-id]. +@; ----------------------------------------------------------------- + +@close-eval[swap-eval] From 4e33afc1005d4c1681a894a5ef845636f4847acc Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Fri, 4 Feb 2011 07:11:48 -0700 Subject: [PATCH 116/441] fix dc<%> Closes PR 11706 Merge to 5.1 (cherry picked from commit 913f6b54868d594e4d47b84618df353f418a1805) --- collects/racket/draw/private/dc-intf.rkt | 68 +++++++++++++++++++++++- 1 file changed, 67 insertions(+), 1 deletion(-) diff --git a/collects/racket/draw/private/dc-intf.rkt b/collects/racket/draw/private/dc-intf.rkt index d0f9801192e..c5f53ec4159 100644 --- a/collects/racket/draw/private/dc-intf.rkt +++ b/collects/racket/draw/private/dc-intf.rkt @@ -6,4 +6,70 @@ (define dc<%> (interface () - draw-text)) + cache-font-metrics-key + clear + copy + draw-arc + draw-bitmap + draw-bitmap-section + draw-ellipse + draw-line + draw-lines + draw-path + draw-point + draw-polygon + draw-rectangle + draw-rounded-rectangle + draw-spline + draw-text + end-doc + end-page + erase + flush + get-alpha + get-background + get-brush + get-char-height + get-char-width + get-clipping-region + get-font + get-gl-context + get-initial-matrix + get-origin + get-pen + get-rotation + get-scale + get-size + get-smoothing + get-text-background + get-text-extent + get-text-foreground + get-text-mode + get-transformation + glyph-exists? + ok? + resume-flush + rotate + scale + set-alpha + set-background + set-brush + set-clipping-rect + set-clipping-region + set-font + set-initial-matrix + set-origin + set-pen + set-rotation + set-scale + set-smoothing + set-text-background + set-text-foreground + set-text-mode + set-transformation + start-doc + start-page + suspend-flush + transform + translate + try-color)) From 9721ad1ce734f2c12150cb28881a4db67a8dc842 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Fri, 4 Feb 2011 07:25:02 -0700 Subject: [PATCH 117/441] cocoa: fix problems with `radio-box%' in no-selection mode Closes PR 11708 Merge to 5.1 (cherry picked from commit 5d1b78384d390520edf970021bc0c144f78c259e) --- collects/mred/private/wx/cocoa/radio-box.rkt | 21 ++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/collects/mred/private/wx/cocoa/radio-box.rkt b/collects/mred/private/wx/cocoa/radio-box.rkt index 237ec581d14..558418df558 100644 --- a/collects/mred/private/wx/cocoa/radio-box.rkt +++ b/collects/mred/private/wx/cocoa/radio-box.rkt @@ -26,6 +26,9 @@ #:mixins (FocusResponder KeyMouseResponder CursorDisplayer) [wxb] (-a _void (clicked: [_id sender]) + ;; In case we were in 0-item mode, switch to Radio mode to + ;; ensure that only one button is selected: + (tellv self setMode: #:type _int NSRadioModeMatrix) (queue-window*-event wxb (lambda (wx) (send wx clicked))))) (define-objc-class MyImageButtonCell NSButtonCell @@ -127,15 +130,21 @@ (if (= i -1) (begin ;; Need to change to NSListModeMatrix to disable all. - ;; It seem that we don't have to change the mode back, for some reason. (tellv (get-cocoa) setMode: #:type _int NSListModeMatrix) (tellv (get-cocoa) deselectAllCells)) - (tellv (get-cocoa) selectCellAtRow: #:type _NSInteger (if horiz? 0 i) - column: #:type _NSInteger (if horiz? i 0)))) + (begin + (tellv (get-cocoa) setMode: #:type _int NSRadioModeMatrix) + (tellv (get-cocoa) selectCellAtRow: #:type _NSInteger (if horiz? 0 i) + column: #:type _NSInteger (if horiz? i 0))))) (define/public (get-selection) - (if horiz? - (tell #:type _NSInteger (get-cocoa) selectedColumn) - (tell #:type _NSInteger (get-cocoa) selectedRow))) + (let ([c (tell (get-cocoa) selectedCell)] + [pos (if horiz? + (tell #:type _NSInteger (get-cocoa) selectedColumn) + (tell #:type _NSInteger (get-cocoa) selectedRow))]) + (if (and c + (positive? (tell #:type _NSInteger c state))) + pos + -1))) (define/public (number) count) (define/override (maybe-register-as-child parent on?) From 08ff71d1a1bdb8ded13d698ed6e095fc77aa2908 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Fri, 4 Feb 2011 09:19:19 -0700 Subject: [PATCH 118/441] win32: fix horizontal `radio-box%' Merge to 5.1 (cherry picked from commit 8f404a46187da3c21dcf52185d0912abdf3ba85f) --- collects/mred/private/wx/win32/radio-box.rkt | 77 +++++++++++--------- 1 file changed, 41 insertions(+), 36 deletions(-) diff --git a/collects/mred/private/wx/win32/radio-box.rkt b/collects/mred/private/wx/win32/radio-box.rkt index e395003a5e2..329f5c86169 100644 --- a/collects/mred/private/wx/win32/radio-box.rkt +++ b/collects/mred/private/wx/win32/radio-box.rkt @@ -49,42 +49,47 @@ (define label-bitmaps null) (define radio-hwnds - (let loop ([y 0] [w 0] [labels labels]) - (if (null? labels) - (begin - (MoveWindow hwnd 0 0 w y #t) - null) - (let* ([label (car labels)] - [bitmap? (label . is-a? . bitmap%)] - [radio-hwnd - (CreateWindowExW/control 0 - "PLTBUTTON" - (if (string? label) - label - "") - (bitwise-ior BS_RADIOBUTTON WS_CHILD WS_CLIPSIBLINGS - (if bitmap? - BS_BITMAP - 0)) - 0 0 0 0 - hwnd - #f - hInstance - #f)]) - (when bitmap? - (let ([hbitmap (bitmap->hbitmap label)]) - (set! label-bitmaps (cons hbitmap label-bitmaps)) - (SendMessageW radio-hwnd BM_SETIMAGE IMAGE_BITMAP - (cast hbitmap _HBITMAP _LPARAM)))) - (ShowWindow radio-hwnd SW_SHOW) - (set-control-font font radio-hwnd) - (let-values ([(w1 h) - (auto-size font label 0 0 20 4 - (lambda (w h) - (MoveWindow radio-hwnd 0 (+ y SEP) w h #t) - (values w h)))]) - (cons radio-hwnd - (loop (+ y SEP h) (max w1 w) (cdr labels)))))))) + (let ([horiz? (memq 'horizontal style)]) + (let loop ([y 0] [w 0] [labels labels]) + (if (null? labels) + (begin + (MoveWindow hwnd 0 0 w y #t) + null) + (let* ([label (car labels)] + [bitmap? (label . is-a? . bitmap%)] + [radio-hwnd + (CreateWindowExW/control 0 + "PLTBUTTON" + (if (string? label) + label + "") + (bitwise-ior BS_RADIOBUTTON WS_CHILD WS_CLIPSIBLINGS + (if bitmap? + BS_BITMAP + 0)) + 0 0 0 0 + hwnd + #f + hInstance + #f)]) + (when bitmap? + (let ([hbitmap (bitmap->hbitmap label)]) + (set! label-bitmaps (cons hbitmap label-bitmaps)) + (SendMessageW radio-hwnd BM_SETIMAGE IMAGE_BITMAP + (cast hbitmap _HBITMAP _LPARAM)))) + (ShowWindow radio-hwnd SW_SHOW) + (set-control-font font radio-hwnd) + (let-values ([(w1 h) + (auto-size font label 0 0 20 4 + (lambda (w1 h1) + (if horiz? + (MoveWindow radio-hwnd (+ w SEP) 0 w1 h1 #t) + (MoveWindow radio-hwnd 0 (+ y SEP) w1 h1 #t)) + (values w1 h1)))]) + (cons radio-hwnd + (loop (if horiz? (max y h) (+ y SEP h)) + (if horiz? (+ w SEP w1) (max w1 w)) + (cdr labels))))))))) (unless (= val -1) (SendMessageW (list-ref radio-hwnds val) BM_SETCHECK 1 0)) From 1fba9e40fbbd7de41b2fe4fbbf0c7145ae634af5 Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Fri, 4 Feb 2011 13:06:23 -0600 Subject: [PATCH 119/441] add a little more about quasiquote to the guide Please merge to the 5.1 release branch (cherry picked from commit 74f8b0e2f13c47cbd13bf1b0a1275ee389fdbdf9) --- collects/scribblings/guide/match.scrbl | 16 +++++ collects/scribblings/guide/qq.scrbl | 97 ++++++++++++++++++++++++++ 2 files changed, 113 insertions(+) diff --git a/collects/scribblings/guide/match.scrbl b/collects/scribblings/guide/match.scrbl index 2918045db4e..7025ba9f1ab 100644 --- a/collects/scribblings/guide/match.scrbl +++ b/collects/scribblings/guide/match.scrbl @@ -119,6 +119,22 @@ pattern variables can be bound to lists of lists of matches: [(list (list '! x ...) ...) x]) ] + +The @racket[quasiquote] form (see @secref["qq"] for more about it) can also be used to build patterns. +While unquoted portions of a normal quasiquoted form mean regular racket evaluation, here unquoted +portions mean go back to regular pattern matching. + +So, in the example below, the with expression is the pattern and it gets rewritten into the +application expression, using quasiquote as a pattern in the first instance and quasiquote +to build an expression in the second. + +@interaction[ +#:eval match-eval +(match `{with {x 1} {+ x 1}} + [`{with {,id ,rhs} ,body} + `{{lambda {,id} ,body} ,rhs}]) +] + For information on many more pattern forms, see @racketmodname[racket/match]. Forms like @racket[match-let] and @racket[match-lambda] support diff --git a/collects/scribblings/guide/qq.scrbl b/collects/scribblings/guide/qq.scrbl index f9fa41dc496..30b674f2ff6 100644 --- a/collects/scribblings/guide/qq.scrbl +++ b/collects/scribblings/guide/qq.scrbl @@ -24,6 +24,63 @@ evaluated to produce a value that takes the place of the `(1 2 ,(+ 1 2), (- 5 1))) ] +This form can be used to write functions that build lists according to +certain patterns. + +@examples[ +(eval:alts (define (deep n) + (cond + [(zero? n) 0] + [else + (#,qq ((#,uq n) (#,uq (deep (- n 1)))))])) + (define (deep n) + (cond + [(zero? n) 0] + [else + (quasiquote ((unquote n) (unquote (deep (- n 1)))))]))) +(deep 8) +] + +Or even to cheaply construct expressions programmatically. (Of course, 9 times out of 10, +you should be using a @seclink["macros"]{macro} to do this +(the 10th time being when you're working through +a textbook like @hyperlink["http://www.cs.brown.edu/~sk/Publications/Books/ProgLangs/"]{PLAI}).) + +@examples[(define (build-exp n) + (add-lets n (make-sum n))) + + (eval:alts + (define (add-lets n body) + (cond + [(zero? n) body] + [else + (#,qq + (let ([(#,uq (n->var n)) (#,uq n)]) + (#,uq (add-lets (- n 1) body))))])) + (define (add-lets n body) + (cond + [(zero? n) body] + [else + (quasiquote + (let ([(unquote (n->var n)) (unquote n)]) + (unquote (add-lets (- n 1) body))))]))) + + (eval:alts + (define (make-sum n) + (cond + [(= n 1) (n->var 1)] + [else + (#,qq (+ (#,uq (n->var n)) + (#,uq (make-sum (- n 1)))))])) + (define (make-sum n) + (cond + [(= n 1) (n->var 1)] + [else + (quasiquote (+ (unquote (n->var n)) + (unquote (make-sum (- n 1)))))]))) + (define (n->var n) (string->symbol (format "x~a" n))) + (build-exp 3)] + The @racket[unquote-splicing] form is similar to @racket[unquote], but its @racket[_expr] must produce a list, and the @racket[unquote-splicing] form must appear in a context that produces @@ -35,6 +92,46 @@ is spliced into the context of its use. `(1 2 ,@(list (+ 1 2) (- 5 1)) 5)) ] +Using splicing we can revise the construction of our example expressions above +to have just a single @racket[let] expression and a single @racket[+] expression. + +@examples[(eval:alts + (define (build-exp n) + (add-lets + n + (#,qq (+ (#,(racket unquote-splicing) + (build-list + n + (λ (x) (n->var (+ x 1))))))))) + (define (build-exp n) + (add-lets + n + (quasiquote (+ (unquote-splicing + (build-list + n + (λ (x) (n->var (+ x 1)))))))))) + (eval:alts + (define (add-lets n body) + (#,qq + (let (#,uq + (build-list + n + (λ (n) + (#,qq + [(#,uq (n->var (+ n 1))) (#,uq (+ n 1))])))) + (#,uq body)))) + (define (add-lets n body) + (quasiquote + (let (unquote + (build-list + n + (λ (n) + (quasiquote + [(unquote (n->var (+ n 1))) (unquote (+ n 1))])))) + (unquote body))))) + (define (n->var n) (string->symbol (format "x~a" n))) + (build-exp 3)] + If a @racket[quasiquote] form appears within an enclosing @racket[quasiquote] form, then the inner @racket[quasiquote] effectively cancels one layer of @racket[unquote] and From ae73336ede1df5e53ab7a45c83ddac3a4d360a07 Mon Sep 17 00:00:00 2001 From: Ryan Culpepper Date: Fri, 4 Feb 2011 15:35:51 -0700 Subject: [PATCH 120/441] fixed macro stepper bug Merge to release branch (cherry picked from commit 2c1d49de6f4b10f8ea921a5c6fc03729c72878d4) --- collects/macro-debugger/model/reductions.rkt | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/collects/macro-debugger/model/reductions.rkt b/collects/macro-debugger/model/reductions.rkt index 925d3f2b1e0..2eb58fbaa59 100644 --- a/collects/macro-debugger/model/reductions.rkt +++ b/collects/macro-debugger/model/reductions.rkt @@ -1,5 +1,6 @@ #lang racket/base (require racket/match + (for-syntax racket/base) "../util/eomap.rkt" "stx-util.rkt" "deriv-util.rkt" @@ -34,9 +35,16 @@ ;; Syntax -(define-syntax-rule (match/count x . clauses) +(define-syntax-rule (match/count x clause ...) (begin (sequence-number (add1 (sequence-number))) - (match x . clauses))) + (let ([v x]) + (match v + clause ... + [_ (error 'match "failed to match ~e at line ~s" v (line-of x))])))) + +(define-syntax (line-of stx) + (syntax-case stx () + [(line-of x) #`(quote #,(syntax-line #'x))])) ;; Derivations => Steps @@ -472,7 +480,10 @@ ;; Add remark step? ]] [(struct local-remark (contents)) - (R [#:reductions (list (walk/talk 'remark contents))])])) + (R [#:reductions (list (walk/talk 'remark contents))])] + + [#f + (R)])) ;; List : ListDerivation -> RST (define (List ld) From e8a0c3c1872e94080822155ee166e371cbb86222 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Fri, 4 Feb 2011 19:17:11 -0700 Subject: [PATCH 121/441] cocoa: yet another hack around weird cocoa behavior Closes PR 11712 Merge to 5.1 (cherry picked from commit 845ca2d58668c40c2ce2ab314867974877b2da93) --- collects/mred/private/wx/cocoa/slider.rkt | 7 +++++++ collects/mred/private/wx/cocoa/window.rkt | 7 ++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/collects/mred/private/wx/cocoa/slider.rkt b/collects/mred/private/wx/cocoa/slider.rkt index c0e820e3c8d..e735287d695 100644 --- a/collects/mred/private/wx/cocoa/slider.rkt +++ b/collects/mred/private/wx/cocoa/slider.rkt @@ -8,6 +8,7 @@ "const.rkt" "utils.rkt" "window.rkt" + "queue.rkt" "../common/event.rkt" "../common/queue.rkt" "../common/freeze.rkt" @@ -158,6 +159,12 @@ (define/public (update-message [val (get-value)]) (tellv message-cocoa setTitleWithMnemonic: #:type _NSString (format "~a" val))) + (inherit get-cocoa-window) + (define/override (post-mouse-down) + ;; For some reason, dragging a slider disabled mouse-moved + ;; events for the window, so turn them back on: + (tellv (get-cocoa-window) setAcceptsMouseMovedEvents: #:type _BOOL #t)) + (define/override (maybe-register-as-child parent on?) (register-as-child parent on?))) diff --git a/collects/mred/private/wx/cocoa/window.rkt b/collects/mred/private/wx/cocoa/window.rkt index 409b6ef5eb1..906c034978a 100644 --- a/collects/mred/private/wx/cocoa/window.rkt +++ b/collects/mred/private/wx/cocoa/window.rkt @@ -98,7 +98,10 @@ [wxb] [-a _void (mouseDown: [_id event]) (unless (do-mouse-event wxb event 'left-down #t #f #f 'right-down) - (super-tell #:type _void mouseDown: event))] + (super-tell #:type _void mouseDown: event) + (let ([wx (->wx wxb)]) + (when wx + (send wx post-mouse-down))))] [-a _void (mouseUp: [_id event]) (unless (do-mouse-event wxb event 'left-up #f #f #f 'right-up) (super-tell #:type _void mouseUp: event))] @@ -727,6 +730,8 @@ [caps-down #f]) #f)) + (define/public (post-mouse-down) (void)) + (define/public (on-char s) (void)) (define/public (on-event m) (void)) (define/public (queue-on-size) (void)) From b32d2eeaace0ae8be236f1a2c90d11640601d414 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sat, 5 Feb 2011 06:41:09 -0700 Subject: [PATCH 122/441] futures: fix lightweight-continuation GC bug Merge to 5.1 (cherry picked from commit 7579b487913b3bf84d339686f2e77c0136359d53) --- src/racket/src/fun.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/racket/src/fun.c b/src/racket/src/fun.c index 3c223f67f58..e68dbf40f73 100644 --- a/src/racket/src/fun.c +++ b/src/racket/src/fun.c @@ -8516,6 +8516,7 @@ Scheme_Lightweight_Continuation *scheme_capture_lightweight_continuation(Scheme_ lw = (Scheme_Lightweight_Continuation *)storage[0]; lw->stack_slice = stack; + lwc = lw->saved_lwc; len = lwc->runstack_start - lwc->runstack_end; runstack_slice = MALLOC_N(Scheme_Object*, len); @@ -8535,6 +8536,7 @@ Scheme_Lightweight_Continuation *scheme_capture_lightweight_continuation(Scheme_ runstack_slice[i] = 0; } + lwc = lw->saved_lwc; len = lwc->cont_mark_stack_end - lwc->cont_mark_stack_start; if (len) { From cc3e6e18125a1ee72b2587a1c815cba1b8133ec1 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sat, 5 Feb 2011 06:42:08 -0700 Subject: [PATCH 123/441] futures: fix `future' when given a non-JITted procedure Merge to 5.1 (cherry picked from commit da6d4f3fbac79bf2369810c2252c9489e2ded99f) --- collects/tests/future/future.rkt | 12 ++++++++++++ src/racket/src/future.c | 24 +++++++++++++++--------- 2 files changed, 27 insertions(+), 9 deletions(-) diff --git a/collects/tests/future/future.rkt b/collects/tests/future/future.rkt index 3371ef6105a..907bd75cf46 100644 --- a/collects/tests/future/future.rkt +++ b/collects/tests/future/future.rkt @@ -202,3 +202,15 @@ We should also test deep continuations. (future (lambda () (and (eq? (touch f) f) (current-future))))))) + +;; Make sure that `future' doesn't mishandle functions +;; that aren't be JITted: +(check-equal? + (for/list ([i (in-range 10)]) (void)) + (map + touch + (for/list ([i (in-range 10)]) + (if (even? i) + (future void) + (future (parameterize ([eval-jit-enabled #f]) + (eval #'(lambda () (void))))))))) diff --git a/src/racket/src/future.c b/src/racket/src/future.c index 9c60c64a03c..3ade1735841 100644 --- a/src/racket/src/future.c +++ b/src/racket/src/future.c @@ -642,8 +642,13 @@ Scheme_Object *scheme_future(int argc, Scheme_Object *argv[]) } } - nc = (Scheme_Native_Closure*)lambda; - ncd = nc->code; + if (SAME_TYPE(SCHEME_TYPE(lambda), scheme_native_closure_type)) { + nc = (Scheme_Native_Closure*)lambda; + ncd = nc->code; + } else { + nc = NULL; + ncd = NULL; + } /* Create the future descriptor and add to the queue as 'pending' */ ft = MALLOC_ONE_TAGGED(future_t); @@ -655,17 +660,18 @@ Scheme_Object *scheme_future(int argc, Scheme_Object *argv[]) ft->status = PENDING; /* JIT the code if not already JITted */ - if (ncd->code == scheme_on_demand_jit_code) - { + if (ncd) { + if (ncd->code == scheme_on_demand_jit_code) scheme_on_demand_generate_lambda(nc, 0, NULL); + + if (ncd->max_let_depth > FUTURE_RUNSTACK_SIZE * sizeof(void*)) { + /* Can't even call it in a future thread */ + ft->status = PENDING_OVERSIZE; } - if (ncd->max_let_depth > FUTURE_RUNSTACK_SIZE * sizeof(void*)) { - /* Can't even call it in a future thread */ + ft->code = (void*)ncd->code; + } else ft->status = PENDING_OVERSIZE; - } - - ft->code = (void*)ncd->code; if (ft->status != PENDING_OVERSIZE) { mzrt_mutex_lock(fs->future_mutex); From 88c18e08f6c51ea0d00df499928a3c6718fad019 Mon Sep 17 00:00:00 2001 From: Jay McCarthy Date: Sat, 5 Feb 2011 07:13:17 -0700 Subject: [PATCH 124/441] Fixes PR11713 (cherry picked from commit b4c3d82c948ba263a19b680eeadde88ac7b7e4c6) --- collects/rackunit/scribblings/philosophy.scrbl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collects/rackunit/scribblings/philosophy.scrbl b/collects/rackunit/scribblings/philosophy.scrbl index 5b439a04b69..de659850d34 100644 --- a/collects/rackunit/scribblings/philosophy.scrbl +++ b/collects/rackunit/scribblings/philosophy.scrbl @@ -110,7 +110,7 @@ which is the ancestor of RackUnit and the most widely used frameworks in Java, .Net, Python, and Ruby, and many other languages. That this is insufficient for all users is apparent if one considers the proliferation of ``simpler'' -testing frameworks in Racket such as SRFI-78, or the +testing frameworks in Scheme such as SRFI-78, or the practice of beginner programmers. Unfortunately these simpler methods are inadequate for testing larger systems. To the best of my knowledge RackUnit is the only From a917f465f788e53bbd1e26f5350f8eac9b162f64 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Fri, 4 Feb 2011 12:23:03 -0700 Subject: [PATCH 125/441] add `file/resource' (cherry picked from commit b4ce4bbd2ce53dc6b1b1ed372514092ce6951ade) --- collects/file/resource.rkt | 251 +++++++++++++++++++++++ collects/file/scribblings/file.scrbl | 1 + collects/file/scribblings/resource.scrbl | 100 +++++++++ collects/tests/racket/mzlib-tests.rktl | 1 + collects/tests/racket/resource.rktl | 50 +++++ 5 files changed, 403 insertions(+) create mode 100644 collects/file/resource.rkt create mode 100644 collects/file/scribblings/resource.scrbl create mode 100644 collects/tests/racket/resource.rktl diff --git a/collects/file/resource.rkt b/collects/file/resource.rkt new file mode 100644 index 00000000000..d668497a7c5 --- /dev/null +++ b/collects/file/resource.rkt @@ -0,0 +1,251 @@ +#lang racket/base +(require ffi/unsafe + ffi/unsafe/define) + +(provide get-resource + write-resource) + +(define _HKEY (_cpointer/null 'HKEY)) + +(define (const-hkey v) + (cast (bitwise-ior v (arithmetic-shift -1 32)) _intptr _HKEY)) + +(define HKEY_CLASSES_ROOT (const-hkey #x80000000)) +(define HKEY_CURRENT_USER (const-hkey #x80000001)) +(define HKEY_LOCAL_MACHINE (const-hkey #x80000002)) +(define HKEY_USERS (const-hkey #x80000003)) +(define HKEY_CURRENT_CONFIG (const-hkey #x80000005)) + +(define REG_SZ 1) +(define REG_BINARY 3) +(define REG_DWORD 4) + +(define (section->hkey who section) + (cond + [(equal? section "HKEY_CLASSES_ROOT") + HKEY_CLASSES_ROOT] + [(equal? section "HKEY_CURRENT_CONFIG") + HKEY_CURRENT_CONFIG] + [(equal? section "HKEY_CURRENT_USER") + HKEY_CURRENT_USER] + [(equal? section "HKEY_LOCAL_MACHINE") + HKEY_LOCAL_MACHINE] + [(equal? section "HKEY_USERS") + HKEY_USERS] + [else + (raise-type-error who + (string-append + "\"HKEY_CLASSES_ROOT\", \"HKEY_CURRENT_CONFIG\", " + "\"HKEY_CURRENT_USER\", \"HKEY_LOCAL_MACHINE\", " + "or \"HKEY_USERS\"") + section)])) + +(define advapi-dll (and (eq? (system-type) 'windows) + (ffi-lib "Advapi32.dll"))) + +(define-ffi-definer define-advapi advapi-dll + #:default-make-fail make-not-available) + +(define win64? (equal? "win32\\x86_64" (path->string (system-library-subpath #f)))) +(define win_abi (if win64? #f 'stdcall)) + +(define _LONG _long) +(define _DWORD _int32) +(define _REGSAM _DWORD) + +(define KEY_QUERY_VALUE #x1) +(define KEY_SET_VALUE #x2) + +(define ERROR_SUCCESS 0) + +(define-advapi RegOpenKeyExW (_fun #:abi win_abi + _HKEY _string/utf-16 _DWORD _REGSAM (hkey : (_ptr o _HKEY)) + -> (r : _LONG) + -> (and (= r ERROR_SUCCESS) hkey))) +(define-advapi RegCreateKeyExW (_fun #:abi win_abi + _HKEY _string/utf-16 (_DWORD = 0) + (_pointer = #f) ; class + _DWORD ; options + _REGSAM + _pointer ; security + (hkey : (_ptr o _HKEY)) + (_ptr o _DWORD) ; disposition + -> (r : _LONG) + -> (and (= r ERROR_SUCCESS) hkey))) + +(define-advapi RegQueryValueExW (_fun #:abi win_abi + _HKEY _string/utf-16 (_pointer = #f) + (type : (_ptr o _DWORD)) + _pointer (len : (_ptr io _DWORD)) + -> (r : _LONG) + -> (if (= r ERROR_SUCCESS) + (values len type) + (values #f #f)))) +(define-advapi RegSetValueExW (_fun #:abi win_abi + _HKEY _string/utf-16 (_pointer = #f) + _DWORD _pointer _DWORD + -> (r : _LONG) + -> (= r ERROR_SUCCESS))) + +(define-advapi RegCloseKey (_fun #:abi win_abi _HKEY -> _LONG)) + +(define (check-platform who) + (unless (eq? 'windows (system-type)) + (raise + (make-exn:fail:unsupported + (format "~a: unsupported on this platform" who) + (current-continuation-marks))))) + +(define (extract-sub-hkey hkey entry op create-key?) + (cond + [(regexp-match #rx"^(.*)\\\\+([^\\]*)$" entry) + => (lambda (m) + (let ([sub-hkey (RegOpenKeyExW hkey (cadr m) 0 op)] + [sub-entry (caddr m)]) + (if (and (not sub-hkey) + create-key?) + (values (RegCreateKeyExW hkey (cadr m) 0 op #f) + sub-entry) + (values sub-hkey sub-entry))))] + [else (values hkey entry)])) + +(define (get-resource section entry [value #f] [file #f] + #:type [rtype (or (and (box? value) + (or + (and (exact-integer? (unbox value)) + 'integer) + (and (bytes? (unbox value)) + 'bytes))) + 'string)]) + (define hkey (section->hkey 'get-resource section)) + (unless (string? entry) + (raise-type-error 'get-resource "string" entry)) + (unless (or (not value) + (and (box? value) + (let ([value (unbox value)]) + (or (string? value) (bytes? value) (exact-integer? value))))) + (raise-type-error 'get-resource "box of string, byte string, or exact integer")) + (unless (not file) + (raise-type-error 'get-resource "#f" file)) + (unless (memq rtype '(string bytes integer)) + (raise-type-error 'get-resource "'string, 'bytes, or 'integer" rtype)) + + (check-platform 'get-resource) + + (define-values (sub-hkey sub-entry) + (extract-sub-hkey hkey entry KEY_QUERY_VALUE #f)) + + (and sub-hkey + (begin0 + (let-values ([(len type) + ;; Get size, first + (RegQueryValueExW sub-hkey sub-entry #f 0)]) + (and len + (let ([s (make-bytes len)]) + (let-values ([(len2 type2) + ;; Get value, now that we have a bytes string of the right size + (RegQueryValueExW sub-hkey sub-entry s len)]) + (and len2 + (let ([r + ;; Unmarhsal according to requested type: + (let ([s (cond + [(= type REG_SZ) + (cast s _pointer _string/utf-16)] + [(= type REG_DWORD) + (number->string (ptr-ref s _DWORD))] + [else + s])] + [to-string (lambda (s) + (if (bytes? s) + (bytes->string/utf-8 s #\?) + s))]) + (cond + [(eq? rtype 'string) (to-string s)] + [(eq? rtype 'integer) + (let ([n (string->number (to-string s))]) + (or (and n (exact-integer? n) n) + 0))] + [else + (if (string? s) + (string->bytes/utf-8 s) + s)]))]) + (if (box? value) + (begin + (set-box! value r) + #t) + r))))))) + (unless (eq? hkey sub-hkey) + (RegCloseKey sub-hkey))))) + +(define (write-resource section entry value [file #f] + #:type [type 'string] + #:create-key? [create-key? #f]) + (define hkey (section->hkey 'write-resource section)) + (unless (string? entry) + (raise-type-error 'write-resource "string" entry)) + (unless (or (string? value) (bytes? value) (exact-integer? value)) + (raise-type-error 'write-resource "string, byte string, or exact integer")) + (unless (not file) + (raise-type-error 'write-resource "#f" file)) + (unless (memq type '(string bytes dword)) + (raise-type-error 'write-resource "'string, 'bytes, or 'dword" type)) + + (check-platform 'write-resource) + + (define-values (sub-hkey sub-entry) + (extract-sub-hkey hkey entry KEY_SET_VALUE create-key?)) + + (and sub-hkey + (begin0 + (let ([v (case type + [(string) + (to-utf-16 + (cond + [(exact-integer? value) (number->string value)] + [(string? value) value] + [else (bytes->string/utf-8 value #\?)]))] + [(bytes) + (cond + [(exact-integer? value) + (string->bytes/utf-8 (number->string value))] + [(string? value) (string->bytes/utf-8 value)] + [else value])] + [(dword) + (to-dword-ptr + (cond + [(exact-integer? value) value] + [(string? value) (string->number value)] + [(bytes? value) + (string->number (bytes->string/utf-8 value #\?))]))])] + [ty (case type + [(string) REG_SZ] + [(bytes) REG_BINARY] + [(dword) REG_DWORD])]) + (RegSetValueExW sub-hkey sub-entry ty v (bytes-length v))) + (unless (eq? hkey sub-hkey) + (RegCloseKey sub-hkey))))) + +(define (to-utf-16 s) + (let ([v (malloc _gcpointer)]) + (ptr-set! v _string/utf-16 s) + (let ([p (ptr-ref v _gcpointer)]) + (let ([len (* 2 (+ 1 (utf-16-length s)))]) + (ptr-ref v (_bytes o len)))))) + +(define (utf-16-length s) + (for/fold ([len 0]) ([c (in-string s)]) + (+ len + (if ((char->integer c) . > . #xFFFF) + 2 + 1)))) + +(define (to-dword-ptr v) + (let ([v (if (and (exact-integer? v) + (<= (- (expt 2 31)) + v + (sub1 (expt 2 31)))) + v + 0)]) + (let ([p (malloc _DWORD)]) + (ptr-set! p _DWORD v) + (cast p _pointer (_bytes o (ctype-sizeof _DWORD)))))) diff --git a/collects/file/scribblings/file.scrbl b/collects/file/scribblings/file.scrbl index e9ccc916010..4ab38c6d8a5 100644 --- a/collects/file/scribblings/file.scrbl +++ b/collects/file/scribblings/file.scrbl @@ -13,6 +13,7 @@ @include-section["md5.scrbl"] @include-section["sha1.scrbl"] @include-section["gif.scrbl"] +@include-section["resource.scrbl"] @(bibliography (bib-entry #:key "Gervautz1990" diff --git a/collects/file/scribblings/resource.scrbl b/collects/file/scribblings/resource.scrbl new file mode 100644 index 00000000000..4fc5254a685 --- /dev/null +++ b/collects/file/scribblings/resource.scrbl @@ -0,0 +1,100 @@ +#lang scribble/doc +@(require "common.ss" + (for-label file/resource)) + +@title[#:tag "resource"]{Windows Registry} + +@defmodule[file/resource] + +@defproc[(get-resource [section (or/c "HKEY_CLASSES_ROOT" + "HKEY_CURRENT_CONFIG" + "HKEY_CURRENT_USER" + "HKEY_LOCAL_MACHINE" + "HKEY_USERS")] + [entry string?] + [value-box (or/f #f (box/c (or/c string? bytes? exact-integer?))) #f] + [file #f #f] + [#:type type (or/c 'string 'bytes 'integer) _derived-from-value-box]) + (or/c #f string? bytes? exact-integer? #t)]{ + +Gets a value from the Windows registry. Under platforms other than + Windows, an @racket[exn:fail:unsupported] exception is raised. + +The resource value is keyed on the combination of @racket[section] and + @racket[entry]. The result is @racket[#f] if no value is found for + the specified @racket[section] and @racket[entry]. If @racket[value-box] + is a box, then the result is @racket[#t] if a value is found, and the + box is filled with the value; when @racket[value-box] is @racket[#f], the result is the found + value. + +The @racket[type] argument determines how a value in the registry is + converted to a Racket value. If @racket[value-box] is a box, then the + default @racket[type] is derived from the initial box content, + otherwise the default @racket[type] is @racket['string]. + +Registry values of any format can be extracted. Values using the + registry format @tt{REG_SZ} are treated as strings, and values with + the format @tt{REG_DWORD} are treated as 32-bit signed integers. All + other formats are treated as raw bytes. Data from the registry is + converted to the requested type @racket[type]: + +@itemlist[ + + @item{A @tt{REG_SZ} registry value is converted to an integer using + @racket[string->number] (using @racket[0] if the result is not + an exact integer), and it is converted to bytes using + @racket[string->bytes/utf-8].} + + @item{A @tt{REG_DWORD} registry value is converted to a string or + byte string via @racket[number->string] and (for byte strings) + @racket[string->bytes/utf-8].} + + @item{Any other kind of registry value is converted to a string or + integer using @racket[bytes->string/utf-8] and (for integers) + @racket[string->number].} + +] + +The @racket[file] argument is included for backward compatibility and + must be @racket[#f]. + +To get the ``default'' value for an entry, use a trailing backslash. For +example, the following expression gets a command line for starting a +browser: + +@racketblock[ + (get-resource "HKEY_CLASSES_ROOT" + "htmlfile\\shell\\open\\command\\") +]} + +@defproc[(write-resource [section (or/c "HKEY_CLASSES_ROOT" + "HKEY_CURRENT_CONFIG" + "HKEY_CURRENT_USER" + "HKEY_LOCAL_MACHINE" + "HKEY_USERS")] + [entry string?] + [value (or/c string? bytes? exact-integer?)] + [file #f #f] + [#:type type (or/c 'string 'bytes 'integer) 'string] + [#:create-key? create-key? any/c #f]) + boolean?]{ + +Write a value to the Windows registry. Under platforms other than + Windows, an @racket[exn:fail:unsupported] exception is raised. + +The resource value is keyed on the combination of @racket[section] and + @racket[entry]. If @racket[create-key?] is false, the resource entry + must already exist, otherwise the write fails. The result is + @racket[#f] if the write fails or @racket[#t] if it succeeds. + +The @racket[type] argument determines the format of the value in the + registry: @racket['string] writes using the @tt{REG_SZ} format, + @racket['bytes] writes using the @tt{REG_BINARY} format, and + @racket['dword] writes using the @tt{REG_DWORD} format. Any kind of + @racket[value] can be converted for any kind of @racket[type] using + the inverse of the conversions for @racket[get-resource]. + +The @racket[file] argument must be @racket[#f]. A path is allowed for + backward compatibility of arguments, but providing a path causes an + @racket[exn:fail:unsupported] exception to be raised.} + diff --git a/collects/tests/racket/mzlib-tests.rktl b/collects/tests/racket/mzlib-tests.rktl index 81fc47b3944..5305a069b08 100644 --- a/collects/tests/racket/mzlib-tests.rktl +++ b/collects/tests/racket/mzlib-tests.rktl @@ -27,5 +27,6 @@ (load-in-sandbox "shared.rktl") (load-in-sandbox "kw.rktl") (load-in-sandbox "macrolib.rktl") +(load-in-sandbox "resource.rktl") (report-errs) diff --git a/collects/tests/racket/resource.rktl b/collects/tests/racket/resource.rktl new file mode 100644 index 00000000000..9ab8b8c98fa --- /dev/null +++ b/collects/tests/racket/resource.rktl @@ -0,0 +1,50 @@ + +;; This test modifies registry entries under Windows +;; within HKEY_CURRENT_USER\Software\PLT + +(load-relative "loadtest.rktl") + +(Section 'resource) + +(require file/resource) + +(when (eq? 'windows (system-type)) + (define key "HKEY_CURRENT_USER") + (define (entry s) (string-append "SOFTWARE\\PLT\\" s)) + + (test #t 'init (write-resource key (entry "Stuff") "Hello" #:create-key? #t)) + + ;; A string-valued resource: + (test #t write-resource key (entry "Stuff") "Hola") + (test "Hola" get-resource key (entry "Stuff")) + (test #"Hola" get-resource key (entry "Stuff") #:type 'bytes) + (test 0 get-resource key (entry "Stuff") #:type 'integer) + (let ([b (box "")]) + (test #t get-resource key (entry "Stuff") b) + (test "Hola" unbox b)) + (let ([b (box #"")]) + (test #t get-resource key (entry "Stuff") b) + (test #"Hola" unbox b)) + (let ([b (box 10)]) + (test #t get-resource key (entry "Stuff") b) + (test 0 unbox b)) + + ;; An integer-valued resource + (test #t write-resource key (entry "Count") 17 #:type 'dword) + (test "17" get-resource key (entry "Count")) + (test #"17" get-resource key (entry "Count") #:type 'bytes) + (test 17 get-resource key (entry "Count") #:type 'integer) + (test #t write-resource key (entry "Count") -17 #:type 'dword) + (test -17 get-resource key (entry "Count") #:type 'integer) + + ;; A bytes-valued resource: + (test #t write-resource key (entry "Data") #"i\377mage" #:type 'bytes) + (test "i?mage" get-resource key (entry "Data")) + (test #"i\377mage" get-resource key (entry "Data") #:type 'bytes) + (test 0 get-resource key (entry "Data") #:type 'integer) + + (void)) + +(report-errs) + + From e4db039f201f8f18b3b258e19b465354d7266791 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Fri, 4 Feb 2011 14:24:22 -0700 Subject: [PATCH 126/441] `file/resource': improve compatibility by generating "failure" results instead of exn:fail:unsupported (cherry picked from commit 337500552c8bbf3c3078236a483c889003b2a44c) --- collects/file/resource.rkt | 37 ++++++---------- collects/file/scribblings/resource.scrbl | 40 +++++++---------- collects/tests/racket/resource.rktl | 55 ++++++++++++++---------- 3 files changed, 61 insertions(+), 71 deletions(-) diff --git a/collects/file/resource.rkt b/collects/file/resource.rkt index d668497a7c5..3ff776541cd 100644 --- a/collects/file/resource.rkt +++ b/collects/file/resource.rkt @@ -32,13 +32,9 @@ HKEY_LOCAL_MACHINE] [(equal? section "HKEY_USERS") HKEY_USERS] + [(string? section) #f] [else - (raise-type-error who - (string-append - "\"HKEY_CLASSES_ROOT\", \"HKEY_CURRENT_CONFIG\", " - "\"HKEY_CURRENT_USER\", \"HKEY_LOCAL_MACHINE\", " - "or \"HKEY_USERS\"") - section)])) + (raise-type-error who "string" section)])) (define advapi-dll (and (eq? (system-type) 'windows) (ffi-lib "Advapi32.dll"))) @@ -89,15 +85,10 @@ (define-advapi RegCloseKey (_fun #:abi win_abi _HKEY -> _LONG)) -(define (check-platform who) - (unless (eq? 'windows (system-type)) - (raise - (make-exn:fail:unsupported - (format "~a: unsupported on this platform" who) - (current-continuation-marks))))) - -(define (extract-sub-hkey hkey entry op create-key?) +(define (extract-sub-hkey file hkey entry op create-key?) (cond + [(not (eq? 'windows (system-type))) (values #f #f)] + [file #f] [(regexp-match #rx"^(.*)\\\\+([^\\]*)$" entry) => (lambda (m) (let ([sub-hkey (RegOpenKeyExW hkey (cadr m) 0 op)] @@ -125,15 +116,14 @@ (let ([value (unbox value)]) (or (string? value) (bytes? value) (exact-integer? value))))) (raise-type-error 'get-resource "box of string, byte string, or exact integer")) - (unless (not file) - (raise-type-error 'get-resource "#f" file)) + (unless (or (not file) + (path-string? file)) + (raise-type-error 'get-resource "path string or #f" file)) (unless (memq rtype '(string bytes integer)) (raise-type-error 'get-resource "'string, 'bytes, or 'integer" rtype)) - (check-platform 'get-resource) - (define-values (sub-hkey sub-entry) - (extract-sub-hkey hkey entry KEY_QUERY_VALUE #f)) + (extract-sub-hkey file hkey entry KEY_QUERY_VALUE #f)) (and sub-hkey (begin0 @@ -185,15 +175,14 @@ (raise-type-error 'write-resource "string" entry)) (unless (or (string? value) (bytes? value) (exact-integer? value)) (raise-type-error 'write-resource "string, byte string, or exact integer")) - (unless (not file) - (raise-type-error 'write-resource "#f" file)) + (unless (or (not file) + (path-string? file)) + (raise-type-error 'write-resource "path string or #f" file)) (unless (memq type '(string bytes dword)) (raise-type-error 'write-resource "'string, 'bytes, or 'dword" type)) - (check-platform 'write-resource) - (define-values (sub-hkey sub-entry) - (extract-sub-hkey hkey entry KEY_SET_VALUE create-key?)) + (extract-sub-hkey file hkey entry KEY_SET_VALUE create-key?)) (and sub-hkey (begin0 diff --git a/collects/file/scribblings/resource.scrbl b/collects/file/scribblings/resource.scrbl index 4fc5254a685..ff290dce1ba 100644 --- a/collects/file/scribblings/resource.scrbl +++ b/collects/file/scribblings/resource.scrbl @@ -2,23 +2,27 @@ @(require "common.ss" (for-label file/resource)) +@(define-syntax-rule (compat section indexed-racket) + @elem{For backward compatibilty, the + result is @racket[#f] for platforms other than Windows, when + @racket[file] is not @racket[#f], or when @racket[section] is not + @indexed-racket["HKEY_CLASSES_ROOT"], + @indexed-racket["HKEY_CURRENT_CONFIG"], + @indexed-racket["HKEY_CURRENT_USER"], + @indexed-racket["HKEY_LOCAL_MACHINE"], or @indexed-racket["HKEY_USERS"].}) + @title[#:tag "resource"]{Windows Registry} @defmodule[file/resource] -@defproc[(get-resource [section (or/c "HKEY_CLASSES_ROOT" - "HKEY_CURRENT_CONFIG" - "HKEY_CURRENT_USER" - "HKEY_LOCAL_MACHINE" - "HKEY_USERS")] +@defproc[(get-resource [section string?] [entry string?] [value-box (or/f #f (box/c (or/c string? bytes? exact-integer?))) #f] - [file #f #f] + [file (or/c #f fail-path?) #f] [#:type type (or/c 'string 'bytes 'integer) _derived-from-value-box]) (or/c #f string? bytes? exact-integer? #t)]{ -Gets a value from the Windows registry. Under platforms other than - Windows, an @racket[exn:fail:unsupported] exception is raised. +Gets a value from the Windows registry. @compat[section indexed-racket] The resource value is keyed on the combination of @racket[section] and @racket[entry]. The result is @racket[#f] if no value is found for @@ -55,9 +59,6 @@ Registry values of any format can be extracted. Values using the ] -The @racket[file] argument is included for backward compatibility and - must be @racket[#f]. - To get the ``default'' value for an entry, use a trailing backslash. For example, the following expression gets a command line for starting a browser: @@ -67,20 +68,15 @@ browser: "htmlfile\\shell\\open\\command\\") ]} -@defproc[(write-resource [section (or/c "HKEY_CLASSES_ROOT" - "HKEY_CURRENT_CONFIG" - "HKEY_CURRENT_USER" - "HKEY_LOCAL_MACHINE" - "HKEY_USERS")] +@defproc[(write-resource [section string?] [entry string?] [value (or/c string? bytes? exact-integer?)] - [file #f #f] + [file (or/c path-string? #f) #f] [#:type type (or/c 'string 'bytes 'integer) 'string] [#:create-key? create-key? any/c #f]) boolean?]{ -Write a value to the Windows registry. Under platforms other than - Windows, an @racket[exn:fail:unsupported] exception is raised. +Write a value to the Windows registry. @compat[section racket] The resource value is keyed on the combination of @racket[section] and @racket[entry]. If @racket[create-key?] is false, the resource entry @@ -92,9 +88,5 @@ The @racket[type] argument determines the format of the value in the @racket['bytes] writes using the @tt{REG_BINARY} format, and @racket['dword] writes using the @tt{REG_DWORD} format. Any kind of @racket[value] can be converted for any kind of @racket[type] using - the inverse of the conversions for @racket[get-resource]. - -The @racket[file] argument must be @racket[#f]. A path is allowed for - backward compatibility of arguments, but providing a path causes an - @racket[exn:fail:unsupported] exception to be raised.} + the inverse of the conversions for @racket[get-resource].} diff --git a/collects/tests/racket/resource.rktl b/collects/tests/racket/resource.rktl index 9ab8b8c98fa..7f6a77da8ec 100644 --- a/collects/tests/racket/resource.rktl +++ b/collects/tests/racket/resource.rktl @@ -8,40 +8,49 @@ (require file/resource) -(when (eq? 'windows (system-type)) +(let () (define key "HKEY_CURRENT_USER") (define (entry s) (string-append "SOFTWARE\\PLT\\" s)) - - (test #t 'init (write-resource key (entry "Stuff") "Hello" #:create-key? #t)) + (define (rtest* kws kvs r . l) + (if (eq? 'windows (system-type)) + (keyword-apply test kws kvs r l) + (keyword-apply test kws kvs #f l))) + (define rtest (make-keyword-procedure rtest*)) + (define (xtest r alt-r . l) + (if (eq? 'windows (system-type)) + (apply test r l) + (apply test alt-r l))) + + (rtest #t 'init (write-resource key (entry "Stuff") "Hello" #:create-key? #t)) ;; A string-valued resource: - (test #t write-resource key (entry "Stuff") "Hola") - (test "Hola" get-resource key (entry "Stuff")) - (test #"Hola" get-resource key (entry "Stuff") #:type 'bytes) - (test 0 get-resource key (entry "Stuff") #:type 'integer) + (rtest #t write-resource key (entry "Stuff") "Hola") + (rtest "Hola" get-resource key (entry "Stuff")) + (rtest #"Hola" get-resource key (entry "Stuff") #:type 'bytes) + (rtest 0 get-resource key (entry "Stuff") #:type 'integer) (let ([b (box "")]) - (test #t get-resource key (entry "Stuff") b) - (test "Hola" unbox b)) + (rtest #t get-resource key (entry "Stuff") b) + (xtest "Hola" "" unbox b)) (let ([b (box #"")]) - (test #t get-resource key (entry "Stuff") b) - (test #"Hola" unbox b)) + (rtest #t get-resource key (entry "Stuff") b) + (xtest #"Hola" #"" unbox b)) (let ([b (box 10)]) - (test #t get-resource key (entry "Stuff") b) - (test 0 unbox b)) + (rtest #t get-resource key (entry "Stuff") b) + (xtest 0 10 unbox b)) ;; An integer-valued resource - (test #t write-resource key (entry "Count") 17 #:type 'dword) - (test "17" get-resource key (entry "Count")) - (test #"17" get-resource key (entry "Count") #:type 'bytes) - (test 17 get-resource key (entry "Count") #:type 'integer) - (test #t write-resource key (entry "Count") -17 #:type 'dword) - (test -17 get-resource key (entry "Count") #:type 'integer) + (rtest #t write-resource key (entry "Count") 17 #:type 'dword) + (rtest "17" get-resource key (entry "Count")) + (rtest #"17" get-resource key (entry "Count") #:type 'bytes) + (rtest 17 get-resource key (entry "Count") #:type 'integer) + (rtest #t write-resource key (entry "Count") -17 #:type 'dword) + (rtest -17 get-resource key (entry "Count") #:type 'integer) ;; A bytes-valued resource: - (test #t write-resource key (entry "Data") #"i\377mage" #:type 'bytes) - (test "i?mage" get-resource key (entry "Data")) - (test #"i\377mage" get-resource key (entry "Data") #:type 'bytes) - (test 0 get-resource key (entry "Data") #:type 'integer) + (rtest #t write-resource key (entry "Data") #"i\377mage" #:type 'bytes) + (rtest "i?mage" get-resource key (entry "Data")) + (rtest #"i\377mage" get-resource key (entry "Data") #:type 'bytes) + (rtest 0 get-resource key (entry "Data") #:type 'integer) (void)) From a25b553b8e9d182070f6fc86a80edf64237c4df5 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sat, 5 Feb 2011 07:25:47 -0700 Subject: [PATCH 127/441] `get-resource' and `write-resource': support .ini files (cherry picked from commit 18eb7c86b5f135445858de032d93c96f36c4ad4e) --- collects/file/resource.rkt | 195 ++++++++++++++--------- collects/file/scribblings/resource.scrbl | 49 ++++-- collects/tests/racket/resource.rktl | 17 +- 3 files changed, 170 insertions(+), 91 deletions(-) diff --git a/collects/file/resource.rkt b/collects/file/resource.rkt index 3ff776541cd..9a58731e07f 100644 --- a/collects/file/resource.rkt +++ b/collects/file/resource.rkt @@ -38,9 +38,13 @@ (define advapi-dll (and (eq? (system-type) 'windows) (ffi-lib "Advapi32.dll"))) +(define kernel-dll (and (eq? (system-type) 'windows) + (ffi-lib "kernel32.dll"))) (define-ffi-definer define-advapi advapi-dll #:default-make-fail make-not-available) +(define-ffi-definer define-kernel kernel-dll + #:default-make-fail make-not-available) (define win64? (equal? "win32\\x86_64" (path->string (system-library-subpath #f)))) (define win_abi (if win64? #f 'stdcall)) @@ -48,6 +52,7 @@ (define _LONG _long) (define _DWORD _int32) (define _REGSAM _DWORD) +(define _BOOL (make-ctype _int (lambda (v) (if v 1 0)) (lambda (v) (not (zero? v))))) (define KEY_QUERY_VALUE #x1) (define KEY_SET_VALUE #x2) @@ -85,10 +90,32 @@ (define-advapi RegCloseKey (_fun #:abi win_abi _HKEY -> _LONG)) +(define-kernel WritePrivateProfileStringW (_fun #:abi win_abi + _string/utf-16 ; app + _string/utf-16 ; key + _string/utf-16 ; val + _string/utf-16 ; filename + -> _BOOL)) +(define-kernel GetPrivateProfileStringW (_fun #:abi win_abi + _string/utf-16 ; app + _string/utf-16 ; key + _string/utf-16 ; default + _pointer ; result + _DWORD ; result size in wide chars + _string/utf-16 ; filename + -> _DWORD)) + +(define (file->ini f) + (cond + [(not f) (file->ini + (build-path (find-system-path 'home-dir) "mred.ini"))] + [(string? f) (file->ini (string->path f))] + [(path? f) (path->string (cleanse-path (path->complete-path f)))])) + (define (extract-sub-hkey file hkey entry op create-key?) (cond [(not (eq? 'windows (system-type))) (values #f #f)] - [file #f] + [file (values #f #f)] [(regexp-match #rx"^(.*)\\\\+([^\\]*)$" entry) => (lambda (m) (let ([sub-hkey (RegOpenKeyExW hkey (cadr m) 0 op)] @@ -122,50 +149,70 @@ (unless (memq rtype '(string bytes integer)) (raise-type-error 'get-resource "'string, 'bytes, or 'integer" rtype)) + (define (to-rtype s) + (let ([to-string (lambda (s) + (if (bytes? s) + (bytes->string/utf-8 s #\?) + s))]) + (cond + [(eq? rtype 'string) (to-string s)] + [(eq? rtype 'integer) + (let ([n (string->number (to-string s))]) + (or (and n (exact-integer? n) n) + 0))] + [else + (if (string? s) + (string->bytes/utf-8 s) + s)]))) + (define-values (sub-hkey sub-entry) (extract-sub-hkey file hkey entry KEY_QUERY_VALUE #f)) - (and sub-hkey - (begin0 - (let-values ([(len type) - ;; Get size, first - (RegQueryValueExW sub-hkey sub-entry #f 0)]) - (and len - (let ([s (make-bytes len)]) - (let-values ([(len2 type2) - ;; Get value, now that we have a bytes string of the right size - (RegQueryValueExW sub-hkey sub-entry s len)]) - (and len2 - (let ([r - ;; Unmarhsal according to requested type: - (let ([s (cond - [(= type REG_SZ) - (cast s _pointer _string/utf-16)] - [(= type REG_DWORD) - (number->string (ptr-ref s _DWORD))] - [else - s])] - [to-string (lambda (s) - (if (bytes? s) - (bytes->string/utf-8 s #\?) - s))]) - (cond - [(eq? rtype 'string) (to-string s)] - [(eq? rtype 'integer) - (let ([n (string->number (to-string s))]) - (or (and n (exact-integer? n) n) - 0))] - [else - (if (string? s) - (string->bytes/utf-8 s) - s)]))]) - (if (box? value) - (begin - (set-box! value r) - #t) - r))))))) - (unless (eq? hkey sub-hkey) - (RegCloseKey sub-hkey))))) + (cond + [sub-hkey + (begin0 + (let-values ([(len type) + ;; Get size, first + (RegQueryValueExW sub-hkey sub-entry #f 0)]) + (and len + (let ([s (make-bytes len)]) + (let-values ([(len2 type2) + ;; Get value, now that we have a bytes string of the right size + (RegQueryValueExW sub-hkey sub-entry s len)]) + (and len2 + (let ([r + ;; Unmarhsal according to requested type: + (let ([s (cond + [(= type REG_SZ) + (cast s _pointer _string/utf-16)] + [(= type REG_DWORD) + (number->string (ptr-ref s _DWORD))] + [else + s])]) + (to-rtype s))]) + (if (box? value) + (begin + (set-box! value r) + #t) + r))))))) + (unless (eq? hkey sub-hkey) + (RegCloseKey sub-hkey)))] + [(eq? 'windows (system-type)) + (let* ([SIZE 1024] + [dest (make-bytes (* SIZE 2) 0)] + [DEFAULT "$$default"] + [len (GetPrivateProfileStringW section entry DEFAULT + dest SIZE + (file->ini file))]) + (let ([s (cast dest _pointer _string/utf-16)]) + (and (not (equal? s DEFAULT)) + (let ([r (to-rtype s)]) + (if value + (begin + (set-box! value r) + #t) + r)))))] + [else #f])) (define (write-resource section entry value [file #f] #:type [type 'string] @@ -181,38 +228,44 @@ (unless (memq type '(string bytes dword)) (raise-type-error 'write-resource "'string, 'bytes, or 'dword" type)) + (define (to-string value) + (cond + [(exact-integer? value) (number->string value)] + [(string? value) value] + [else (bytes->string/utf-8 value #\?)])) + (define-values (sub-hkey sub-entry) (extract-sub-hkey file hkey entry KEY_SET_VALUE create-key?)) - (and sub-hkey - (begin0 - (let ([v (case type - [(string) - (to-utf-16 - (cond - [(exact-integer? value) (number->string value)] - [(string? value) value] - [else (bytes->string/utf-8 value #\?)]))] - [(bytes) - (cond - [(exact-integer? value) - (string->bytes/utf-8 (number->string value))] - [(string? value) (string->bytes/utf-8 value)] - [else value])] - [(dword) - (to-dword-ptr - (cond - [(exact-integer? value) value] - [(string? value) (string->number value)] - [(bytes? value) - (string->number (bytes->string/utf-8 value #\?))]))])] - [ty (case type - [(string) REG_SZ] - [(bytes) REG_BINARY] - [(dword) REG_DWORD])]) - (RegSetValueExW sub-hkey sub-entry ty v (bytes-length v))) - (unless (eq? hkey sub-hkey) - (RegCloseKey sub-hkey))))) + (cond + [sub-hkey + (begin0 + (let ([v (case type + [(string) + (to-utf-16 (to-string value))] + [(bytes) + (cond + [(exact-integer? value) + (string->bytes/utf-8 (number->string value))] + [(string? value) (string->bytes/utf-8 value)] + [else value])] + [(dword) + (to-dword-ptr + (cond + [(exact-integer? value) value] + [(string? value) (string->number value)] + [(bytes? value) + (string->number (bytes->string/utf-8 value #\?))]))])] + [ty (case type + [(string) REG_SZ] + [(bytes) REG_BINARY] + [(dword) REG_DWORD])]) + (RegSetValueExW sub-hkey sub-entry ty v (bytes-length v))) + (unless (eq? hkey sub-hkey) + (RegCloseKey sub-hkey)))] + [(eq? 'windows (system-type)) + (WritePrivateProfileStringW section entry (to-string value) (file->ini file))] + [else #f])) (define (to-utf-16 s) (let ([v (malloc _gcpointer)]) diff --git a/collects/file/scribblings/resource.scrbl b/collects/file/scribblings/resource.scrbl index ff290dce1ba..e0c1b3e5ae3 100644 --- a/collects/file/scribblings/resource.scrbl +++ b/collects/file/scribblings/resource.scrbl @@ -2,14 +2,19 @@ @(require "common.ss" (for-label file/resource)) -@(define-syntax-rule (compat section indexed-racket) +@(define-syntax-rule (compat file section indexed-racket what) @elem{For backward compatibilty, the - result is @racket[#f] for platforms other than Windows, when - @racket[file] is not @racket[#f], or when @racket[section] is not + result is @racket[#f] for platforms other than Windows. The registry + is @|what| when + @racket[file] is @racket[#f] and when @racket[section] is @indexed-racket["HKEY_CLASSES_ROOT"], @indexed-racket["HKEY_CURRENT_CONFIG"], @indexed-racket["HKEY_CURRENT_USER"], - @indexed-racket["HKEY_LOCAL_MACHINE"], or @indexed-racket["HKEY_USERS"].}) + @indexed-racket["HKEY_LOCAL_MACHINE"], or @indexed-racket["HKEY_USERS"]. + When @racket[file] is @racket[#f] and @racket[section] is not one of + the special registry strings, then + @racket[(build-path (find-system-path 'home-dir) "mred.ini")] + is @|what|.}) @title[#:tag "resource"]{Windows Registry} @@ -22,7 +27,8 @@ [#:type type (or/c 'string 'bytes 'integer) _derived-from-value-box]) (or/c #f string? bytes? exact-integer? #t)]{ -Gets a value from the Windows registry. @compat[section indexed-racket] +Gets a value from the Windows registry or an @filepath{.ini} + file. @compat[file section indexed-racket "read"] The resource value is keyed on the combination of @racket[section] and @racket[entry]. The result is @racket[#f] if no value is found for @@ -31,7 +37,7 @@ The resource value is keyed on the combination of @racket[section] and box is filled with the value; when @racket[value-box] is @racket[#f], the result is the found value. -The @racket[type] argument determines how a value in the registry is +The @racket[type] argument determines how a value in the resource is converted to a Racket value. If @racket[value-box] is a box, then the default @racket[type] is derived from the initial box content, otherwise the default @racket[type] is @racket['string]. @@ -40,11 +46,12 @@ Registry values of any format can be extracted. Values using the registry format @tt{REG_SZ} are treated as strings, and values with the format @tt{REG_DWORD} are treated as 32-bit signed integers. All other formats are treated as raw bytes. Data from the registry is - converted to the requested type @racket[type]: + converted to the requested @racket[type] as follows: @itemlist[ - @item{A @tt{REG_SZ} registry value is converted to an integer using + @item{A @tt{REG_SZ} registry value + is converted to an integer using @racket[string->number] (using @racket[0] if the result is not an exact integer), and it is converted to bytes using @racket[string->bytes/utf-8].} @@ -59,9 +66,12 @@ Registry values of any format can be extracted. Values using the ] -To get the ``default'' value for an entry, use a trailing backslash. For -example, the following expression gets a command line for starting a -browser: +Resources from @filepath{.ini} files are always strings, and are +converted like @tt{REG_SZ} registry values. + +To get the ``default'' value for a registry entry, use a trailing +backslash. For example, the following expression gets a command line +for starting a browser: @racketblock[ (get-resource "HKEY_CLASSES_ROOT" @@ -76,17 +86,22 @@ browser: [#:create-key? create-key? any/c #f]) boolean?]{ -Write a value to the Windows registry. @compat[section racket] +Write a value to the Windows registry or an @filepath{.ini} + file. @compat[file section racket "written"] The resource value is keyed on the combination of @racket[section] and - @racket[entry]. If @racket[create-key?] is false, the resource entry - must already exist, otherwise the write fails. The result is - @racket[#f] if the write fails or @racket[#t] if it succeeds. + @racket[entry]. If @racket[create-key?] is false when writing to the + registry, the resource entry must already exist, otherwise the write + fails. The result is @racket[#f] if the write fails or @racket[#t] if + it succeeds. -The @racket[type] argument determines the format of the value in the +The @racket[type] argument determines the format of the value written to the registry: @racket['string] writes using the @tt{REG_SZ} format, @racket['bytes] writes using the @tt{REG_BINARY} format, and @racket['dword] writes using the @tt{REG_DWORD} format. Any kind of @racket[value] can be converted for any kind of @racket[type] using - the inverse of the conversions for @racket[get-resource].} + the inverse of the conversions for @racket[get-resource]. + +When writing to an @filepath{.ini} file, the format is always a + string, independent of @racket[type].} diff --git a/collects/tests/racket/resource.rktl b/collects/tests/racket/resource.rktl index 7f6a77da8ec..cbbe765bd82 100644 --- a/collects/tests/racket/resource.rktl +++ b/collects/tests/racket/resource.rktl @@ -6,7 +6,8 @@ (Section 'resource) -(require file/resource) +(require file/resource + racket/file) (let () (define key "HKEY_CURRENT_USER") @@ -52,8 +53,18 @@ (rtest #"i\377mage" get-resource key (entry "Data") #:type 'bytes) (rtest 0 get-resource key (entry "Data") #:type 'integer) + ;; .ini file: + (let ([tmp-ini (make-temporary-file "temp~a.ini")]) + (rtest #f get-resource "Temporary" "Stuff" #f tmp-ini) + (rtest #t write-resource "Temporary" "Stuff" "howdy" tmp-ini) + (rtest "howdy" get-resource "Temporary" "Stuff" #f tmp-ini) + (rtest #f get-resource "Temporary" "more" #f tmp-ini) + (rtest #t write-resource "Temporary" "more" 10 tmp-ini) + (rtest 10 get-resource "Temporary" "more" #f tmp-ini #:type 'integer) + (when (eq? 'windows (system-type)) + (test "[Temporary]\r\nStuff=howdy\r\nmore=10\r\n" file->string tmp-ini) + (delete-file tmp-ini))) + (void)) (report-errs) - - From 745e5018fd10c82a60a335aa12cf648b7c2888c3 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sat, 5 Feb 2011 08:32:33 -0700 Subject: [PATCH 128/441] fix coverage of `file/resource' tests (cherry picked from commit 3c4807f032ca63b4804f6dc4a4aa498085b6291d) --- collects/tests/racket/resource.rktl | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/collects/tests/racket/resource.rktl b/collects/tests/racket/resource.rktl index cbbe765bd82..a055ccd9752 100644 --- a/collects/tests/racket/resource.rktl +++ b/collects/tests/racket/resource.rktl @@ -38,10 +38,18 @@ (let ([b (box 10)]) (rtest #t get-resource key (entry "Stuff") b) (xtest 0 10 unbox b)) - + (rtest #t write-resource key (entry "Stuff") 88) + (rtest "88" get-resource key (entry "Stuff")) + (rtest #t write-resource key (entry "Stuff") #"!") + (rtest "!" get-resource key (entry "Stuff")) + ;; An integer-valued resource (rtest #t write-resource key (entry "Count") 17 #:type 'dword) (rtest "17" get-resource key (entry "Count")) + (rtest #t write-resource key (entry "Count") "17" #:type 'dword) + (rtest "17" get-resource key (entry "Count")) + (rtest #t write-resource key (entry "Count") #"17" #:type 'dword) + (rtest "17" get-resource key (entry "Count")) (rtest #"17" get-resource key (entry "Count") #:type 'bytes) (rtest 17 get-resource key (entry "Count") #:type 'integer) (rtest #t write-resource key (entry "Count") -17 #:type 'dword) @@ -52,17 +60,24 @@ (rtest "i?mage" get-resource key (entry "Data")) (rtest #"i\377mage" get-resource key (entry "Data") #:type 'bytes) (rtest 0 get-resource key (entry "Data") #:type 'integer) + (rtest #t write-resource key (entry "Data") 17 #:type 'bytes) + (rtest "17" get-resource key (entry "Data")) + (rtest #t write-resource key (entry "Data") "17" #:type 'bytes) + (rtest "17" get-resource key (entry "Data")) ;; .ini file: (let ([tmp-ini (make-temporary-file "temp~a.ini")]) (rtest #f get-resource "Temporary" "Stuff" #f tmp-ini) (rtest #t write-resource "Temporary" "Stuff" "howdy" tmp-ini) (rtest "howdy" get-resource "Temporary" "Stuff" #f tmp-ini) + (let ([b (box "")]) + (rtest #t get-resource "Temporary" "Stuff" b tmp-ini) + (xtest "howdy" "" unbox b)) (rtest #f get-resource "Temporary" "more" #f tmp-ini) (rtest #t write-resource "Temporary" "more" 10 tmp-ini) (rtest 10 get-resource "Temporary" "more" #f tmp-ini #:type 'integer) (when (eq? 'windows (system-type)) - (test "[Temporary]\r\nStuff=howdy\r\nmore=10\r\n" file->string tmp-ini) + (rtest "[Temporary]\r\nStuff=howdy\r\nmore=10\r\n" file->string tmp-ini) (delete-file tmp-ini))) (void)) From ca1e603f7f0a8e8d4a758e29727268073bc433b1 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Fri, 4 Feb 2011 13:33:37 -0700 Subject: [PATCH 129/441] adjust `racket/gui/base' to re-export `file/resource' Merge to 5.1 along with b4ce4bb, 3375005, 18eb7c8, 3c4807f (cherry picked from commit 5eeec97878e2491688514f03fe3898f6ea4dd933) --- collects/mred/mred-sig.rkt | 2 ++ collects/mred/private/mred.rkt | 4 +++- collects/scribblings/gui/gui.scrbl | 3 ++- doc/release-notes/racket/Draw_and_GUI_5_1.txt | 15 ++++++++++++--- 4 files changed, 19 insertions(+), 5 deletions(-) diff --git a/collects/mred/mred-sig.rkt b/collects/mred/mred-sig.rkt index fc8dec478b9..ffee140991d 100644 --- a/collects/mred/mred-sig.rkt +++ b/collects/mred/mred-sig.rkt @@ -91,6 +91,7 @@ get-panel-background get-ps-setup-from-user get-highlight-background-color get-highlight-text-color +get-resource get-text-from-user get-the-editor-data-class-list get-the-snip-class-list @@ -210,4 +211,5 @@ window<%> write-editor-global-footer write-editor-global-header write-editor-version +write-resource yield diff --git a/collects/mred/private/mred.rkt b/collects/mred/private/mred.rkt index 72594f600cc..889008b6d43 100644 --- a/collects/mred/private/mred.rkt +++ b/collects/mred/private/mred.rkt @@ -5,6 +5,7 @@ make-base-empty-namespace) scheme/class racket/draw racket/snip + file/resource mzlib/etc (prefix wx: "kernel.ss") (prefix wx: "wxme/editor.ss") @@ -169,7 +170,8 @@ [else #f]))) (provide (all-from racket/draw) - (all-from racket/snip)) + (all-from racket/snip) + (all-from file/resource)) (provide button% canvas% diff --git a/collects/scribblings/gui/gui.scrbl b/collects/scribblings/gui/gui.scrbl index 4321754b77f..177cb15986d 100644 --- a/collects/scribblings/gui/gui.scrbl +++ b/collects/scribblings/gui/gui.scrbl @@ -10,7 +10,8 @@ @defmodule*/no-declare[(racket/gui/base)]{The @racketmodname[racket/gui/base] library provides all of the class, interface, and procedure bindings defined in this manual, in addition -to the bindings of @racketmodname[racket/draw].} +to the bindings of @racketmodname[racket/draw] and +@racketmodname[file/resource].} @defmodulelang*/no-declare[(racket/gui)]{The @racketmodname[racket/gui] language combines all bindings of the diff --git a/doc/release-notes/racket/Draw_and_GUI_5_1.txt b/doc/release-notes/racket/Draw_and_GUI_5_1.txt index d44cc4d9abc..fec9eab2b65 100644 --- a/doc/release-notes/racket/Draw_and_GUI_5_1.txt +++ b/doc/release-notes/racket/Draw_and_GUI_5_1.txt @@ -156,12 +156,21 @@ jump-defeating `dynamic-wind' that formerly guarded callbacks has been removed. +Registry Functions +----------------- + +The `get-resource' and `write-resource' functions have moved to a +`file/resource' library that is re-exported by `racket/gui/base'. +These function now work only for reading and writing the Windows +registry; they report failure for other platforms and modes. + + Removed Functions ----------------- -The `write-resource, `get-reource', and `send-event' functions have -been removed from `racket/gui/base'. If there is any demand for the -removed functionality, it will be implemented in a new library. +The `send-event' function has been removed from `racket/gui/base'. If +there is any demand for the removed functionality, it will be +implemented in a new library. The `current-ps-afm-file-paths' and `current-ps-cmap-file-paths' functions have been removed, because they no longer apply. PostScript From 4c20048bff3533b89a2011eb5c90940c9e1e32c9 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sat, 5 Feb 2011 14:11:30 -0700 Subject: [PATCH 130/441] minor correction to release notes Merge to 5.1 (cherry picked from commit ead1c366d19eefb7b2489a062e18e8c410242ef0) --- doc/release-notes/racket/Draw_and_GUI_5_1.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/release-notes/racket/Draw_and_GUI_5_1.txt b/doc/release-notes/racket/Draw_and_GUI_5_1.txt index fec9eab2b65..63c19627ee1 100644 --- a/doc/release-notes/racket/Draw_and_GUI_5_1.txt +++ b/doc/release-notes/racket/Draw_and_GUI_5_1.txt @@ -162,7 +162,7 @@ Registry Functions The `get-resource' and `write-resource' functions have moved to a `file/resource' library that is re-exported by `racket/gui/base'. These function now work only for reading and writing the Windows -registry; they report failure for other platforms and modes. +registry or ".ini" files; they report failure for other platforms. Removed Functions From 17157945bb417652840e94deba5bea4a2f1b3cb0 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sat, 5 Feb 2011 16:33:02 -0700 Subject: [PATCH 131/441] fix scheduler's support for `ffi/unsafe/try-atomic' where problems with abort-without-dynamic-wind mode caused a spurious trigger of nack evts Merge to 5.1 (cherry picked from commit 3e38071dae88590befcb46ef953e123447af5e3f) --- src/racket/include/scheme.h | 5 ++++- src/racket/src/sema.c | 3 ++- src/racket/src/thread.c | 11 +++++++++++ 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/racket/include/scheme.h b/src/racket/include/scheme.h index 58e50d815db..60d500d28c0 100644 --- a/src/racket/include/scheme.h +++ b/src/racket/include/scheme.h @@ -1155,7 +1155,10 @@ typedef void (*Scheme_Kill_Action_Func)(void *); thread = NULL; \ if (scheme_setjmp(newbuf)) { \ scheme_pop_kill_action(); \ - func(data); \ + thread = scheme_get_current_thread(); \ + if (!thread->cjs.skip_dws) { \ + func(data); \ + } \ scheme_longjmp(*savebuf, 1); \ } else { # define END_ESCAPEABLE() \ diff --git a/src/racket/src/sema.c b/src/racket/src/sema.c index 37cab3e5196..0953a3117ee 100644 --- a/src/racket/src/sema.c +++ b/src/racket/src/sema.c @@ -654,7 +654,8 @@ int scheme_wait_semas_chs(int n, Scheme_Object **o, int just_try, Syncing *synci } else if (semas[i]->so.type == scheme_never_evt_type) { /* Never ready. */ } else if (semas[i]->so.type == scheme_channel_syncer_type) { - /* Probably no need to poll */ + if (((Scheme_Channel_Syncer *)semas[i])->picked) + break; } else if (try_channel(semas[i], syncing, i, NULL)) break; } diff --git a/src/racket/src/thread.c b/src/racket/src/thread.c index 85697facc92..988507af574 100644 --- a/src/racket/src/thread.c +++ b/src/racket/src/thread.c @@ -4051,6 +4051,9 @@ static void call_on_atomic_timeout(int must) Scheme_Object *blocker; Scheme_Ready_Fun block_check; Scheme_Needs_Wakeup_Fun block_needs_wakeup; + Scheme_Kill_Action_Func private_on_kill; + void *private_kill_data; + void **private_kill_next; /* Save any state that has to do with the thread blocking or sleeping, in case scheme_on_atomic_timeout() runs Racket code. */ @@ -4062,6 +4065,10 @@ static void call_on_atomic_timeout(int must) block_check = p->block_check; block_needs_wakeup = p->block_needs_wakeup; + private_on_kill = p->private_on_kill; + private_kill_data = p->private_kill_data; + private_kill_next = p->private_kill_next; + p->running = MZTHREAD_RUNNING; p->sleep_end = 0.0; p->block_descriptor = 0; @@ -4077,6 +4084,10 @@ static void call_on_atomic_timeout(int must) p->blocker = blocker; p->block_check = block_check; p->block_needs_wakeup = block_needs_wakeup; + + p->private_on_kill = private_on_kill; + p->private_kill_data = private_kill_data; + p->private_kill_next = private_kill_next; } static void find_next_thread(Scheme_Thread **return_arg) { From abb10d86c0f71d5294e35fb106d35549ca5a2faa Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sat, 5 Feb 2011 16:36:05 -0700 Subject: [PATCH 132/441] Adjust FrTime mailbox implementation to use `thread-{receive,send}' instead of async channels. This change allows Fred to work. The change is needed due to implementation weaknesses at multiple levels, but mostly because `on-subwindow-event' has to complete atomically --- or else events are pessimistically discarded, and async-channel communication never completes atomically. In contrast, messages can be posted to the built-in message queue for a thread (because it's built in). Probably the async-channel library should switch to using the built-in thread queue support. Merge to 5.1 (cherry picked from commit 3c6652b83c278321f7e9c5f881977bb9f0906f11) --- collects/frtime/core/mailbox.rkt | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/collects/frtime/core/mailbox.rkt b/collects/frtime/core/mailbox.rkt index 24bafaa7507..14026afe222 100644 --- a/collects/frtime/core/mailbox.rkt +++ b/collects/frtime/core/mailbox.rkt @@ -7,10 +7,12 @@ (define (snoc x l) (append l (list x))) ; Define mailboxes -(define-struct mailbox (manager control msgs)) +(define-struct mailbox (manager control)) (define (new-mailbox) (define control-ch (make-channel)) - (define msgs-ch (make-async-channel)) + (define (thread-recv-evt) + (handle-evt (thread-receive-evt) + (lambda (e) (thread-receive)))) ; Try to match one message (define (try-to-match req msg) (match req @@ -32,7 +34,7 @@ (list* msg (try-to-match* req msgs)))])) ; Accept new messages until we need to match one (define (not-on-receive msgs) - (sync (handle-evt msgs-ch + (sync (handle-evt (thread-recv-evt) (lambda (new-msg) (not-on-receive (snoc new-msg msgs)))) (handle-evt control-ch @@ -51,7 +53,7 @@ [(not timeout) false] [(> elapsed timeout) 0] [else (/ (- timeout elapsed) 1000.0)])) - (define new-msg (sync/timeout wait-time msgs-ch)) + (define new-msg (sync/timeout wait-time (thread-recv-evt))) (if new-msg (if (try-to-match req new-msg) (not-on-receive msgs) @@ -63,17 +65,17 @@ (thread (lambda () (not-on-receive empty)))) - (make-mailbox manager control-ch msgs-ch)) + (make-mailbox manager control-ch)) (define-struct receive (reply-ch timeout timeout-thunk matcher)) (define (mailbox-send! mb msg) (match mb - [(struct mailbox (thd _ msgs)) + [(struct mailbox (thd _)) (thread-resume thd) - (async-channel-put msgs msg)])) + (thread-send thd msg)])) (define (mailbox-receive mb timeout timeout-thunk matcher) (match mb - [(struct mailbox (thd control _)) + [(struct mailbox (thd control)) (define reply-ch (make-channel)) (thread-resume thd) (channel-put control (make-receive reply-ch timeout timeout-thunk matcher)) From 74b9465b4e1170ca8f63bfeedc6fa9d360ed9728 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sat, 5 Feb 2011 16:48:04 -0700 Subject: [PATCH 133/441] document limitations of `on-subwindow-event' and `on-subwindow-char' Merge to 5.1 (cherry picked from commit e2a0fd02ef89da7d8efbfe26739ca82d8a42c7ad) --- collects/scribblings/gui/window-intf.scrbl | 18 +++++++++++++++--- doc/release-notes/racket/Draw_and_GUI_5_1.txt | 5 +++++ 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/collects/scribblings/gui/window-intf.scrbl b/collects/scribblings/gui/window-intf.scrbl index 3c3645b89ff..17318469afd 100644 --- a/collects/scribblings/gui/window-intf.scrbl +++ b/collects/scribblings/gui/window-intf.scrbl @@ -374,6 +374,14 @@ Called when this window or a child window receives a keyboard event. @method[window<%> on-subwindow-char] method returns @scheme[#f], the event is passed on to the receiver's normal key-handling mechanism. +The @scheme[event] argument is the event that was generated for the + @scheme[receiver] window. + +The atomicity limitation @method[window<%> on-subwindow-event] applies + to @method[window<%> on-subwindow-char] as well. That is, an insufficiently cooperative + @method[window<%> on-subwindow-char] method can effectively disable + a control's handling of key events, even when it returns @racket[#f] + BEWARE: The default @xmethod[frame% on-subwindow-char] and @xmethod[dialog% on-subwindow-char] methods consume certain keyboard events (e.g., arrow keys, Enter) used @@ -382,9 +390,6 @@ BEWARE: The default reach the ``receiver'' child unless the default frame or dialog method is overridden. -The @scheme[event] argument is the event that was generated for the - @scheme[receiver] window. - } @methimpl{ @@ -409,6 +414,13 @@ Called when this window or a child window receives a mouse event. The @scheme[event] argument is the event that was generated for the @scheme[receiver] window. +If the @method[window<%> on-subwindow-event] method chain does not complete + atomically (i.e., without requiring other threads to run) or does not complete + fast enough, then the corresponding event may not be delivered to a target + control, such as a button. In other words, an insufficiently cooperative + @method[window<%> on-subwindow-event] method can effectively disable a + control's handling of mouse events, even when it returns @racket[#f]. + } @methimpl{ diff --git a/doc/release-notes/racket/Draw_and_GUI_5_1.txt b/doc/release-notes/racket/Draw_and_GUI_5_1.txt index 63c19627ee1..128f037bd40 100644 --- a/doc/release-notes/racket/Draw_and_GUI_5_1.txt +++ b/doc/release-notes/racket/Draw_and_GUI_5_1.txt @@ -155,6 +155,11 @@ callbacks or outside of an even callback. The continuation barrier and jump-defeating `dynamic-wind' that formerly guarded callbacks has been removed. +The `on-subwindow-char' and `on-subwindow-event' methods for controls +are somewhat more restructed in the actions they can take without +disabling the control's handling of key and mouse events. See the +documentation for more information. + Registry Functions ----------------- From 98313114922b2d4d7848bfed5292e86c08db75a7 Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Sun, 6 Feb 2011 07:24:19 -0600 Subject: [PATCH 134/441] 2htdp/image: place-image/align doesn't really need to check that the second image argument has a pinhole (cherry picked from commit eb45a6f15b5ab6d013bed62041ecd7240d561fb3) --- collects/2htdp/private/image-more.rkt | 5 ++--- collects/2htdp/tests/test-image.rkt | 24 ++++++++++++------------ 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/collects/2htdp/private/image-more.rkt b/collects/2htdp/private/image-more.rkt index 0473b17dd1c..f6b16c5c18d 100644 --- a/collects/2htdp/private/image-more.rkt +++ b/collects/2htdp/private/image-more.rkt @@ -382,9 +382,8 @@ (define/chk (place-image/align image1 x1 y1 x-place y-place image2) (when (or (eq? x-place 'pinhole) (eq? y-place 'pinhole)) (check-dependencies 'place-image/align - (and (send image1 get-pinhole) - (send image2 get-pinhole)) - "when x-place or y-place is ~e or ~e, then both of the image arguments must have pinholes" + (send image1 get-pinhole) + "when x-place or y-place is ~e or ~e, the the first image argument must have a pinhole" 'pinhole "pinhole")) (place-image/internal image1 x1 y1 image2 x-place y-place)) diff --git a/collects/2htdp/tests/test-image.rkt b/collects/2htdp/tests/test-image.rkt index 1973616d669..7a63fedd59a 100644 --- a/collects/2htdp/tests/test-image.rkt +++ b/collects/2htdp/tests/test-image.rkt @@ -1891,6 +1891,17 @@ 0 0 "center" "center" (rectangle 10 100 'solid 'blue))) +(test (clear-pinhole + (place-image/align + (center-pinhole (rectangle 100 10 'solid 'red)) + 0 0 "pinhole" "pinhole" + (rectangle 10 100 'solid 'blue))) + => + (place-image/align + (rectangle 100 10 'solid 'red) + 0 0 "center" "center" + (rectangle 10 100 'solid 'blue))) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; test errors. @@ -2030,18 +2041,7 @@ => #rx"^underlay/align") -(test/exn (place-image/align - (center-pinhole (rectangle 10 100 'solid 'blue)) - 0 0 "pinhole" "center" - (rectangle 100 10 'solid 'red)) - => - #rx"^place-image/align") -(test/exn (place-image/align - (center-pinhole (rectangle 10 100 'solid 'blue)) - 0 0 "center" "pinhole" - (rectangle 100 10 'solid 'red)) - => - #rx"^place-image/align") + (test/exn (place-image/align (rectangle 100 10 'solid 'red) 0 0 "pinhole" "center" From f7f0faf83fe0f4b1d89c916d39bd1df3fb029efc Mon Sep 17 00:00:00 2001 From: Matthias Felleisen Date: Tue, 8 Feb 2011 13:07:35 -0500 Subject: [PATCH 135/441] update history (cherry picked from commit e71ccdac3899c22bba3a49fcec0f0344a5ab4db3) --- doc/release-notes/teachpack/HISTORY.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/release-notes/teachpack/HISTORY.txt b/doc/release-notes/teachpack/HISTORY.txt index 3c864c20f3c..8eaff4b18f3 100644 --- a/doc/release-notes/teachpack/HISTORY.txt +++ b/doc/release-notes/teachpack/HISTORY.txt @@ -1,3 +1,9 @@ +------------------------------------------------------------------------ +Version 5.1 [Tue Feb 8 13:05:17 EST 2011] + +* to-draw (old name: on-draw) is now required for big-bang expressions +* bug fixes in world, image, etc + ------------------------------------------------------------------------ Version 5.0.2. [Wed Oct 27 18:30:26 EDT 2010] From 79760264e7d11e852f898088926b6ff04f5fa2c1 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Wed, 9 Feb 2011 07:41:19 -0700 Subject: [PATCH 136/441] gtk: fix X selection for older Gtk versions Merge to 5.1 (cherry picked from commit f21f0bdba2af7282b747e858d81379135a5189a9) --- collects/mred/private/wx/gtk/clipboard.rkt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collects/mred/private/wx/gtk/clipboard.rkt b/collects/mred/private/wx/gtk/clipboard.rkt index 22264bdf3b1..c049a012b17 100644 --- a/collects/mred/private/wx/gtk/clipboard.rkt +++ b/collects/mred/private/wx/gtk/clipboard.rkt @@ -25,7 +25,6 @@ (define _GtkClipboard (_cpointer 'GtkClipboard)) (define _GtkDisplay _pointer) -(define _GtkSelectionData (_cpointer 'GtkSelectionData)) ;; Recent versions of Gtk provide function calls to ;; access data, but use structure when the functions are @@ -38,6 +37,7 @@ [length _int] [display _GtkDisplay])) +(define _GtkSelectionData _GtkSelectionDataT-pointer) (define-gdk gdk_atom_intern (_fun _string _gboolean -> _GdkAtom)) From 98dd05c6d32f4599b0908d393baa974f69792df5 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Wed, 9 Feb 2011 09:01:22 -0700 Subject: [PATCH 137/441] fix `set-icon' in frame% to make mask argument optional Merge to 5.1 (cherry picked from commit f4a881f0e37f291c604ae40ab52d2e36ca411609) --- collects/mred/private/wx/cocoa/frame.rkt | 2 +- collects/mred/private/wx/gtk/frame.rkt | 2 +- collects/mred/private/wx/win32/frame.rkt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/collects/mred/private/wx/cocoa/frame.rkt b/collects/mred/private/wx/cocoa/frame.rkt index c70d89d2772..c6d31f78f99 100644 --- a/collects/mred/private/wx/cocoa/frame.rkt +++ b/collects/mred/private/wx/cocoa/frame.rkt @@ -549,7 +549,7 @@ (define/public (on-activate on?) (void)) - (define/public (set-icon bm1 bm2 [mode 'both]) (void)) ;; FIXME + (define/public (set-icon bm1 [bm2 #f] [mode 'both]) (void)) ;; FIXME (define/override (call-pre-on-event w e) (pre-on-event w e)) diff --git a/collects/mred/private/wx/gtk/frame.rkt b/collects/mred/private/wx/gtk/frame.rkt index 8c43cf8e9e6..d91223e21ed 100644 --- a/collects/mred/private/wx/gtk/frame.rkt +++ b/collects/mred/private/wx/gtk/frame.rkt @@ -334,7 +334,7 @@ (define big-icon #f) (define small-icon #f) - (define/public (set-icon bm mask [mode 'both]) + (define/public (set-icon bm [mask #f] [mode 'both]) (let ([bm (if mask (let* ([nbm (make-object bitmap% (send bm get-width) diff --git a/collects/mred/private/wx/win32/frame.rkt b/collects/mred/private/wx/win32/frame.rkt index 712f5ffd4a0..8a32696d8ff 100644 --- a/collects/mred/private/wx/win32/frame.rkt +++ b/collects/mred/private/wx/win32/frame.rkt @@ -527,7 +527,7 @@ (define small-hicon #f) (define big-hicon #f) - (define/public (set-icon bm mask [mode 'both]) + (define/public (set-icon bm [mask #f] [mode 'both]) (let* ([bg-hbitmap (let* ([bm (make-object bitmap% (send bm get-width) (send bm get-height))] [dc (make-object bitmap-dc% bm)]) From 0707a3f95468125686756628e388dfdae2d51ef8 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Wed, 9 Feb 2011 12:23:14 -0700 Subject: [PATCH 138/441] win32: fix parent HWND of canvas% Merge to 5.1 (cherry picked from commit 6b1112a9adad14b4bb4fd49431697a493b781622) --- collects/mred/private/wx/win32/canvas.rkt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collects/mred/private/wx/win32/canvas.rkt b/collects/mred/private/wx/win32/canvas.rkt index 0c5ddba9e99..a6723720ab8 100644 --- a/collects/mred/private/wx/win32/canvas.rkt +++ b/collects/mred/private/wx/win32/canvas.rkt @@ -116,7 +116,7 @@ (if hscroll? WS_HSCROLL 0) (if vscroll? WS_VSCROLL 0)) 0 0 w h - (or panel-hwnd (send parent get-hwnd)) + (or panel-hwnd (send parent get-client-hwnd)) #f hInstance #f)) From aeedcef3a3a97c21622b5bb0f1f30cfb457c685d Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Wed, 9 Feb 2011 12:42:36 -0700 Subject: [PATCH 139/441] fix s:home keybinding Merge to 5.1 (cherry picked from commit 33db7b1229e4be54c3ef0cf06eef86761c70a623) --- collects/framework/private/keymap.rkt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collects/framework/private/keymap.rkt b/collects/framework/private/keymap.rkt index ab94d1bdfac..54fca114a7b 100644 --- a/collects/framework/private/keymap.rkt +++ b/collects/framework/private/keymap.rkt @@ -1127,7 +1127,7 @@ (add "make-read-only" make-read-only) (add "beginning-of-line" beginning-of-line) - (add "selec-to-beginning-of-line" select-to-beginning-of-line) + (add "select-to-beginning-of-line" select-to-beginning-of-line) ; Map keys to functions From 672ac1970a0c890b822179ccb074d0a72c79b5b7 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Tue, 8 Feb 2011 11:48:37 -0500 Subject: [PATCH 140/441] Improve the apache rewrite instructions. Specifically, mention the `NE' flag and point at the apache "current" version of the page. (cherry picked from commit 42eb0a9e88a668c29aab75712c90003c2868518c) --- .../web-server/scribblings/server-faq.scrbl | 39 ++++++++++++------- 1 file changed, 25 insertions(+), 14 deletions(-) diff --git a/collects/web-server/scribblings/server-faq.scrbl b/collects/web-server/scribblings/server-faq.scrbl index 153e5b8cd52..0b71be07fa0 100644 --- a/collects/web-server/scribblings/server-faq.scrbl +++ b/collects/web-server/scribblings/server-faq.scrbl @@ -6,37 +6,48 @@ @section{How do I use Apache with the Racket Web Server?} -You may want to put Apache in front of your Racket Web Server application. -Apache can rewrite and proxy requests for a private (or public) Racket Web Server: +You may want to put Apache in front of your Racket Web Server +application. Apache can rewrite and proxy requests for a private (or +public) Racket Web Server: @verbatim{ -RewriteRule ^(.*)$ http://localhost:8080/$1 [P] + RewriteEngine on + RewriteRule ^(.*)$ http://localhost:8080/$1 [P,NE] } -The first argument to @exec{RewriteRule} is a match pattern. The second is how to rewrite the URL. -The @exec{[P]} flag instructs Apache to proxy the request. If you do not include this, Apache will -return an HTTP Redirect response and the client should make a second request. +The first argument to @exec{RewriteRule} is a match pattern. The second +is how to rewrite the URL. The bracketed part contains flags that +specify the type of rewrite, in this case the @litchar{P} flag instructs +Apache to proxy the request. (If you do not include this, Apache will +return an HTTP Redirect response and the client will make a second +request to @litchar{localhost:8080} which will not work on a different +machine.) In addition, the @litchar{NE} flag is needed to avoid +escaping parts of the URL --- without it, a @litchar{;} is escaped as +@litchar{%3B} which will break the proxied request. -See Apache's documentation for more details on @link["http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html#rewriterule"]{RewriteRule}. +See Apache's documentation for more details on +@link["http://httpd.apache.org/docs/current/mod/mod_rewrite.html#rewriterule"]{RewriteRule}. @section{Can the server create a PID file?} -The server has no option for this, but you can add it very easily. There's two techniques. +The server has no option for this, but you can add it very +easily. There's two techniques. First, if you use a UNIX platform, in your shell startup script you can use @verbatim{ -echo $$ > PID -exec run-web-server + echo $$ > PID + exec run-web-server } -Using @exec{exec} will reuse the same process, and therefore, the PID file will be accurate. +Using @exec{exec} will reuse the same process, and therefore, the PID +file will be accurate. Second, if you want to make your own Racket start-up script, you can write: @(require (for-label mzlib/os)) @racketblock[ -(require mzlib/os) -(with-output-to-file _your-pid-file (lambda () (write (getpid)))) -(_start-server) + (require mzlib/os) + (with-output-to-file _your-pid-file (lambda () (write (getpid)))) + (_start-server) ] @section[#:tag "faq:https"]{How do I set up the server to use HTTPS?} From e61034cc0b353a2c6eeddb063bbdad634802b4e8 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Thu, 10 Feb 2011 14:20:15 -0500 Subject: [PATCH 141/441] Don't assume that the user sexpr is a list. Fixes PR 11718 (cherry picked from commit 4b1960e1f07f58a6be12b172c3bbaf994a2d4e0c) --- collects/racket/private/misc.rkt | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/collects/racket/private/misc.rkt b/collects/racket/private/misc.rkt index 916c07620d4..26aba931c1b 100644 --- a/collects/racket/private/misc.rkt +++ b/collects/racket/private/misc.rkt @@ -22,10 +22,17 @@ (lambda (user-stx) (syntax-case** dr #t user-stx () free-identifier=? [(_ . pattern) (syntax/loc user-stx template)] - [_ (let*-values ([(sexpr) (syntax->datum user-stx)] - [(msg) (format - "~.s did not match pattern ~.s" - sexpr (cons (car sexpr) 'pattern))]) + [_ (let*-values + ([(sexpr) (syntax->datum user-stx)] + [(msg) + (if (pair? sexpr) + (format "~.s did not match pattern ~.s" + sexpr (cons (car sexpr) 'pattern)) + (if (symbol? sexpr) + (format "must be used in a pattern ~.s" + (cons sexpr 'pattern)) + (error 'internal-error + "something bad happened")))]) (raise-syntax-error #f msg user-stx))]))))] [(_ (name . ptrn) tmpl) (err "expected an identifier" #'name)] [(_ (name . ptrn)) (err "missing template")] From c88cde60921b07c79837ca9e63333834aaecea66 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Wed, 9 Feb 2011 14:21:33 -0700 Subject: [PATCH 142/441] fix typos Merge to 5.1 (cherry picked from commit 379feaeac2ebd07b17ebc6f54d04c084171410e9) --- doc/release-notes/racket/Draw_and_GUI_5_1.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/release-notes/racket/Draw_and_GUI_5_1.txt b/doc/release-notes/racket/Draw_and_GUI_5_1.txt index 128f037bd40..75d625c27bc 100644 --- a/doc/release-notes/racket/Draw_and_GUI_5_1.txt +++ b/doc/release-notes/racket/Draw_and_GUI_5_1.txt @@ -17,7 +17,7 @@ API: Racket. The GRacket executable still offers some additional GUI-specific - functiontality however. Most notably, GRacket is a GUI application + functionality however. Most notably, GRacket is a GUI application under Windows (as opposed to a console application, which is launched slightly differently by the OS), GRacket is a bundle under Mac OS X (so the dock icon is the Racket logo, for example), and @@ -91,8 +91,8 @@ The old translation and scaling transformations apply after the initial matrix. The new rotation transformation applies after the other transformations. This layering is redundant, since all transformations can be expressed in a single matrix, but it is -backward-compatibile. Methods like `get-translation', -`set-translation', `scale', etc. help hide the reundancy. +backward-compatible. Methods like `get-translation', +`set-translation', `scale', etc. help hide the redundancy. PostScript, PDF, and SVG Drawing Contexts @@ -150,13 +150,13 @@ into the control. Event callbacks are delimited by a continuation prompt using the default continuation prompt tag. As a result, continuations can be -usufully captured during one event callback and applied during other +usefully captured during one event callback and applied during other callbacks or outside of an even callback. The continuation barrier and jump-defeating `dynamic-wind' that formerly guarded callbacks has been removed. The `on-subwindow-char' and `on-subwindow-event' methods for controls -are somewhat more restructed in the actions they can take without +are somewhat more restricted in the actions they can take without disabling the control's handling of key and mouse events. See the documentation for more information. From f3e51f3d805444108821d28e464baff3730902aa Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Fri, 11 Feb 2011 10:09:15 -0500 Subject: [PATCH 143/441] Update version number for the v5.1 release --- src/racket/src/schvers.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/racket/src/schvers.h b/src/racket/src/schvers.h index 0d548af42c9..454818538ec 100644 --- a/src/racket/src/schvers.h +++ b/src/racket/src/schvers.h @@ -13,12 +13,12 @@ consistently.) */ -#define MZSCHEME_VERSION "5.0.99.900" +#define MZSCHEME_VERSION "5.1" #define MZSCHEME_VERSION_X 5 -#define MZSCHEME_VERSION_Y 0 -#define MZSCHEME_VERSION_Z 99 -#define MZSCHEME_VERSION_W 900 +#define MZSCHEME_VERSION_Y 1 +#define MZSCHEME_VERSION_Z 0 +#define MZSCHEME_VERSION_W 0 #define MZSCHEME_VERSION_MAJOR ((MZSCHEME_VERSION_X * 100) + MZSCHEME_VERSION_Y) #define MZSCHEME_VERSION_MINOR ((MZSCHEME_VERSION_Z * 1000) + MZSCHEME_VERSION_W) From 30209c96917891513167238c8b2afbb23bedb26e Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Fri, 11 Feb 2011 10:17:29 -0500 Subject: [PATCH 144/441] New Racket version 5.1. --- src/worksp/gracket/gracket.manifest | 2 +- src/worksp/gracket/gracket.rc | 8 ++++---- src/worksp/mzcom/mzcom.rc | 12 ++++++------ src/worksp/mzcom/mzobj.rgs | 6 +++--- src/worksp/racket/racket.manifest | 2 +- src/worksp/racket/racket.rc | 8 ++++---- src/worksp/starters/start.rc | 8 ++++---- 7 files changed, 23 insertions(+), 23 deletions(-) diff --git a/src/worksp/gracket/gracket.manifest b/src/worksp/gracket/gracket.manifest index 941b5f5e49b..a4f6b16489c 100644 --- a/src/worksp/gracket/gracket.manifest +++ b/src/worksp/gracket/gracket.manifest @@ -1,6 +1,6 @@ - diff --git a/src/worksp/gracket/gracket.rc b/src/worksp/gracket/gracket.rc index 8f0813a5e4f..c56056a585b 100644 --- a/src/worksp/gracket/gracket.rc +++ b/src/worksp/gracket/gracket.rc @@ -17,8 +17,8 @@ APPLICATION ICON DISCARDABLE "gracket.ico" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 5,0,99,900 - PRODUCTVERSION 5,0,99,900 + FILEVERSION 5,1,0,0 + PRODUCTVERSION 5,1,0,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -36,11 +36,11 @@ BEGIN VALUE "CompanyName", "PLT Scheme Inc.\0" VALUE "FileDescription", "Racket GUI application\0" VALUE "InternalName", "GRacket\0" - VALUE "FileVersion", "5, 0, 99, 900\0" + VALUE "FileVersion", "5, 1, 0, 0\0" VALUE "LegalCopyright", "Copyright © 1995-2011\0" VALUE "OriginalFilename", "GRacket.exe\0" VALUE "ProductName", "Racket\0" - VALUE "ProductVersion", "5, 0, 99, 900\0" + VALUE "ProductVersion", "5, 1, 0, 0\0" END END BLOCK "VarFileInfo" diff --git a/src/worksp/mzcom/mzcom.rc b/src/worksp/mzcom/mzcom.rc index 0438cdff0ae..83a30602a39 100644 --- a/src/worksp/mzcom/mzcom.rc +++ b/src/worksp/mzcom/mzcom.rc @@ -53,8 +53,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 5,0,99,900 - PRODUCTVERSION 5,0,99,900 + FILEVERSION 5,1,0,0 + PRODUCTVERSION 5,1,0,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -70,12 +70,12 @@ BEGIN BLOCK "040904b0" BEGIN VALUE "FileDescription", "MzCOM Module" - VALUE "FileVersion", "5, 0, 99, 900" + VALUE "FileVersion", "5, 1, 0, 0" VALUE "InternalName", "MzCOM" VALUE "LegalCopyright", "Copyright 2000-2011 PLT (Paul Steckler)" VALUE "OriginalFilename", "MzCOM.EXE" VALUE "ProductName", "MzCOM Module" - VALUE "ProductVersion", "5, 0, 99, 900" + VALUE "ProductVersion", "5, 1, 0, 0" END END BLOCK "VarFileInfo" @@ -105,10 +105,10 @@ CAPTION "MzCOM" FONT 8, "MS Sans Serif", 0, 0, 0x0 BEGIN DEFPUSHBUTTON "OK",IDOK,76,69,50,14,BS_CENTER - CTEXT "MzCOM v. 5.0",IDC_STATIC,71,8,61,8 + CTEXT "MzCOM v. 5.1",IDC_STATIC,71,8,61,8 CTEXT "Copyright (c) 2000-2011 PLT (Paul Steckler)",IDC_STATIC, 41,20,146,9 - CTEXT "Racket v. 5.0",IDC_STATIC,64,35,75,8 + CTEXT "Racket v. 5.1",IDC_STATIC,64,35,75,8 CTEXT "Copyright (c) 1995-2011 PLT Inc.",IDC_STATIC, 30,47,143,8 ICON MZICON,IDC_STATIC,11,16,20,20 diff --git a/src/worksp/mzcom/mzobj.rgs b/src/worksp/mzcom/mzobj.rgs index c9060e92d7e..12a940f4401 100644 --- a/src/worksp/mzcom/mzobj.rgs +++ b/src/worksp/mzcom/mzobj.rgs @@ -1,19 +1,19 @@ HKCR { - MzCOM.MzObj.5.0.99.900 = s 'MzObj Class' + MzCOM.MzObj.5.1.0.0 = s 'MzObj Class' { CLSID = s '{A3B0AF9E-2AB0-11D4-B6D2-0060089002FE}' } MzCOM.MzObj = s 'MzObj Class' { CLSID = s '{A3B0AF9E-2AB0-11D4-B6D2-0060089002FE}' - CurVer = s 'MzCOM.MzObj.5.0.99.900' + CurVer = s 'MzCOM.MzObj.5.1.0.0' } NoRemove CLSID { ForceRemove {A3B0AF9E-2AB0-11D4-B6D2-0060089002FE} = s 'MzObj Class' { - ProgID = s 'MzCOM.MzObj.5.0.99.900' + ProgID = s 'MzCOM.MzObj.5.1.0.0' VersionIndependentProgID = s 'MzCOM.MzObj' ForceRemove 'Programmable' LocalServer32 = s '%MODULE%' diff --git a/src/worksp/racket/racket.manifest b/src/worksp/racket/racket.manifest index a07b1295c68..1c115cefdbb 100644 --- a/src/worksp/racket/racket.manifest +++ b/src/worksp/racket/racket.manifest @@ -1,6 +1,6 @@ - diff --git a/src/worksp/racket/racket.rc b/src/worksp/racket/racket.rc index 5f0abe42b22..06dc6565ee4 100644 --- a/src/worksp/racket/racket.rc +++ b/src/worksp/racket/racket.rc @@ -29,8 +29,8 @@ APPLICATION ICON DISCARDABLE "racket.ico" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 5,0,99,900 - PRODUCTVERSION 5,0,99,900 + FILEVERSION 5,1,0,0 + PRODUCTVERSION 5,1,0,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -48,11 +48,11 @@ BEGIN VALUE "CompanyName", "PLT Scheme Inc.\0" VALUE "FileDescription", "Racket application\0" VALUE "InternalName", "Racket\0" - VALUE "FileVersion", "5, 0, 99, 900\0" + VALUE "FileVersion", "5, 1, 0, 0\0" VALUE "LegalCopyright", "Copyright © 1995-2011\0" VALUE "OriginalFilename", "racket.exe\0" VALUE "ProductName", "Racket\0" - VALUE "ProductVersion", "5, 0, 99, 900\0" + VALUE "ProductVersion", "5, 1, 0, 0\0" END END BLOCK "VarFileInfo" diff --git a/src/worksp/starters/start.rc b/src/worksp/starters/start.rc index 3774e48ce96..f5000c226d4 100644 --- a/src/worksp/starters/start.rc +++ b/src/worksp/starters/start.rc @@ -22,8 +22,8 @@ APPLICATION ICON DISCARDABLE "mzstart.ico" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 5,0,99,900 - PRODUCTVERSION 5,0,99,900 + FILEVERSION 5,1,0,0 + PRODUCTVERSION 5,1,0,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -45,7 +45,7 @@ BEGIN #ifdef MZSTART VALUE "FileDescription", "Racket Launcher\0" #endif - VALUE "FileVersion", "5, 0, 99, 900\0" + VALUE "FileVersion", "5, 1, 0, 0\0" #ifdef MRSTART VALUE "InternalName", "mrstart\0" #endif @@ -60,7 +60,7 @@ BEGIN VALUE "OriginalFilename", "MzStart.exe\0" #endif VALUE "ProductName", "Racket\0" - VALUE "ProductVersion", "5, 0, 99, 900\0" + VALUE "ProductVersion", "5, 1, 0, 0\0" END END BLOCK "VarFileInfo" From e20f66ef121e06b0c85c1887de6c12390ee22eea Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Mon, 14 Feb 2011 05:48:33 -0700 Subject: [PATCH 145/441] fix A4 paper description Closes PR 11734 (cherry picked from commit 6320d3207a2760f41a2e47a8feecffd6f78aa6b0) --- collects/racket/draw/private/ps-setup.rkt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collects/racket/draw/private/ps-setup.rkt b/collects/racket/draw/private/ps-setup.rkt index d07ecd53dab..6a1ba170b2b 100644 --- a/collects/racket/draw/private/ps-setup.rkt +++ b/collects/racket/draw/private/ps-setup.rkt @@ -17,7 +17,7 @@ get-all-numerics) (define paper-sizes - '(("A4 210 x 297\n mm" 595 842) + '(("A4 210 x 297 mm" 595 842) ("A3 297 x 420 mm" 842 1191) ("Letter 8 1/2 x 11 in" 612 791) ("Legal 8 1/2 x 14 in" 612 1009))) From 982ee1e512ea7fa4c34a56851c2a0ea6040bd203 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Mon, 14 Feb 2011 07:11:45 -0700 Subject: [PATCH 146/441] doc repair for PR 11734 follow-up (cherry picked from commit da3fd90256761bc9392ad4cf5a978100624a194f) --- collects/scribblings/draw/ps-setup-class.scrbl | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/collects/scribblings/draw/ps-setup-class.scrbl b/collects/scribblings/draw/ps-setup-class.scrbl index 6f98a776579..11691458ea2 100644 --- a/collects/scribblings/draw/ps-setup-class.scrbl +++ b/collects/scribblings/draw/ps-setup-class.scrbl @@ -108,10 +108,9 @@ Landscaped orientation affects the size of the drawing area as @defmethod[(get-paper-name) string?]{ -Returns the name of the current paper type: @scheme["A4 210 x 297 - mm"], @scheme["A3 297 x 420 mm"], @scheme["Letter 8 1/2 x 11 in"], or - @scheme["Legal 8 1/2 x 14 in"]. The default is @scheme["Letter 8 1/2 - x 11 in"]. +Returns the name of the current paper type: @scheme["A4 210 x 297 mm"], + @scheme["A3 297 x 420 mm"], @scheme["Letter 8 1/2 x 11 in"], or + @scheme["Legal 8 1/2 x 14 in"]. The default is @scheme["Letter 8 1/2 x 11 in"]. The paper name determines the size of the drawing area as reported by @method[dc<%> get-size] (along with landscape transformations from From 0d0f67260b49467f239832b04d64177947ca76cc Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Mon, 14 Feb 2011 10:22:21 -0600 Subject: [PATCH 147/441] This is a change to paper over a bug elsewhere in the system that threatens the release. Specifically, when there is an error in the namespace require (say if one of the teachpack files gets corrupted (because you use a script that monkeys around in the installation, say, and things go wrong)) then the first-opened method does not return normally, but raises an exception. This, so far, is not a problem, but it appears that there is a bug in the implementation of the drracket repl io ports that causes them to deadlock when flushing the error port under certain conditions (I'm not sure what is really going on with this bug, but I am observing a call to flush that fails to return) and the error-display-handler for the teaching languages flushes the output port. This change just avoids printing the error and so the error display handler is not called in the fragile state. This change goes back to exactly what was happening in 5.0.2, at least as far as the teaching language's first-opened method is concerned. So, if this seems okay, I'd like to suggest it be included in the release. (cherry picked from commit 25adab8cbb90902480f1c1657829006803e6843e) --- collects/lang/htdp-langs.rkt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/collects/lang/htdp-langs.rkt b/collects/lang/htdp-langs.rkt index 719712085f8..5dfa39c10cc 100644 --- a/collects/lang/htdp-langs.rkt +++ b/collects/lang/htdp-langs.rkt @@ -439,7 +439,8 @@ (define/override (first-opened settings) (for ([tp (in-list (htdp-lang-settings-teachpacks settings))]) - (namespace-require/constant tp))) + (with-handlers ((exn:fail? void)) + (namespace-require/constant tp)))) (inherit get-module get-transformer-module get-init-code use-namespace-require/copy?) From bee619f06079372860382b211278c4d721d359fe Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Mon, 14 Feb 2011 22:04:44 -0500 Subject: [PATCH 148/441] v5.1 stuff (cherry picked from commit 2880edcb8cd131768559007e5a08261446ad3832) --- collects/meta/web/download/data.rkt | 3 ++- collects/meta/web/download/installers.txt | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/collects/meta/web/download/data.rkt b/collects/meta/web/download/data.rkt index d53ebbab9b5..90f3b40a5b5 100644 --- a/collects/meta/web/download/data.rkt +++ b/collects/meta/web/download/data.rkt @@ -1,7 +1,8 @@ #lang racket/base (define -versions+dates- - '(["5.0.2" "November 2010"] + '(["5.1" "February 2011"] + ["5.0.2" "November 2010"] ["5.0.1" "August 2010"] ["5.0" "June 2010"] ["4.2.5" "April 2010"] diff --git a/collects/meta/web/download/installers.txt b/collects/meta/web/download/installers.txt index 51e29f1d75b..9079a6ade64 100644 --- a/collects/meta/web/download/installers.txt +++ b/collects/meta/web/download/installers.txt @@ -64,3 +64,23 @@ 16M 5.0/racket/racket-5.0-src-mac.dmg 16M 5.0/racket/racket-5.0-src-unix.tgz 20M 5.0/racket/racket-5.0-src-win.zip +11M 5.1/racket-textual/racket-textual-5.1-bin-i386-linux-f12.sh +11M 5.1/racket-textual/racket-textual-5.1-bin-i386-linux-ubuntu-jaunty.sh +11M 5.1/racket-textual/racket-textual-5.1-bin-i386-osx-mac.dmg +7.6M 5.1/racket-textual/racket-textual-5.1-bin-i386-win32.exe +11M 5.1/racket-textual/racket-textual-5.1-bin-ppc-darwin.sh +11M 5.1/racket-textual/racket-textual-5.1-bin-ppc-osx-mac.dmg +11M 5.1/racket-textual/racket-textual-5.1-bin-x86_64-linux-f14.sh +5.8M 5.1/racket-textual/racket-textual-5.1-src-mac.dmg +5.7M 5.1/racket-textual/racket-textual-5.1-src-unix.tgz +5.8M 5.1/racket-textual/racket-textual-5.1-src-win.zip +50M 5.1/racket/racket-5.1-bin-i386-linux-f12.sh +50M 5.1/racket/racket-5.1-bin-i386-linux-ubuntu-jaunty.sh +51M 5.1/racket/racket-5.1-bin-i386-osx-mac.dmg +32M 5.1/racket/racket-5.1-bin-i386-win32.exe +49M 5.1/racket/racket-5.1-bin-ppc-darwin.sh +52M 5.1/racket/racket-5.1-bin-ppc-osx-mac.dmg +50M 5.1/racket/racket-5.1-bin-x86_64-linux-f14.sh +16M 5.1/racket/racket-5.1-src-mac.dmg +16M 5.1/racket/racket-5.1-src-unix.tgz +18M 5.1/racket/racket-5.1-src-win.zip From d82bc3f4557d676d2686f0b1834af75265143c55 Mon Sep 17 00:00:00 2001 From: Ryan Culpepper Date: Sat, 16 Apr 2011 08:19:19 -0600 Subject: [PATCH 149/441] Alpha version number for the v5.1.1 release --- src/racket/src/schvers.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/racket/src/schvers.h b/src/racket/src/schvers.h index c123e613cc6..a40dc65a659 100644 --- a/src/racket/src/schvers.h +++ b/src/racket/src/schvers.h @@ -13,12 +13,12 @@ consistently.) */ -#define MZSCHEME_VERSION "5.1.0.6" +#define MZSCHEME_VERSION "5.1.0.900" #define MZSCHEME_VERSION_X 5 #define MZSCHEME_VERSION_Y 1 #define MZSCHEME_VERSION_Z 0 -#define MZSCHEME_VERSION_W 6 +#define MZSCHEME_VERSION_W 900 #define MZSCHEME_VERSION_MAJOR ((MZSCHEME_VERSION_X * 100) + MZSCHEME_VERSION_Y) #define MZSCHEME_VERSION_MINOR ((MZSCHEME_VERSION_Z * 1000) + MZSCHEME_VERSION_W) From 34678b6f724672edef80aae35b7aeebfda041746 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sat, 16 Apr 2011 09:14:23 -0600 Subject: [PATCH 150/441] fix gl canvas created after parent is shown Merge to 5.1.1 (cherry picked from commit 546faf8b347e822919773796ae5a8b86a9b39d92) --- collects/mred/private/wx/gtk/canvas.rkt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/collects/mred/private/wx/gtk/canvas.rkt b/collects/mred/private/wx/gtk/canvas.rkt index 988b58dd959..5f73c3153b7 100644 --- a/collects/mred/private/wx/gtk/canvas.rkt +++ b/collects/mred/private/wx/gtk/canvas.rkt @@ -345,6 +345,10 @@ (let ([client-gtk (as-gtk-allocation (gtk_drawing_area_new))]) (values client-gtk client-gtk client-gtk #f #f #f #f #f #f 0))]))) + (define for-gl? (memq 'gl style)) + (when for-gl? + (prepare-widget-gl-context client-gtk gl-config)) + (super-new [parent parent] [gtk gtk] [client-gtk client-gtk] @@ -369,10 +373,6 @@ (define dc (new dc% [canvas this] [transparent? (memq 'transparent style)])) - (define for-gl? (memq 'gl style)) - (when for-gl? - (prepare-widget-gl-context client-gtk gl-config)) - (gtk_widget_realize gtk) (gtk_widget_realize client-gtk) From 0923d07acb1e0b5217e91702b25d0383cdf2e40e Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Sat, 16 Apr 2011 21:09:29 -0500 Subject: [PATCH 151/441] adjust the close callback so that it knows what state the bug report window is in closes PR 11773 merge to the release, please (cherry picked from commit 95b6f149fa37dd46f75193ad6104f4972ee98ebf) --- collects/help/bug-report.rkt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/collects/help/bug-report.rkt b/collects/help/bug-report.rkt index 575466d278b..4c32ad1f56a 100644 --- a/collects/help/bug-report.rkt +++ b/collects/help/bug-report.rkt @@ -59,6 +59,8 @@ (cond [close-box-clicked? (cond + [(eq? (send single active-child) finished-panel) + #t] [(empty-bug-report?) (no-more-saving) (unsave-bug-report bug-id) From a3ce6c184e79b5121f3a4a8c3ceef7eb5d1742eb Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Sun, 17 Apr 2011 22:00:19 -0400 Subject: [PATCH 152/441] New Racket version 5.1.0.900. --- src/worksp/gracket/gracket.manifest | 2 +- src/worksp/gracket/gracket.rc | 8 ++++---- src/worksp/mzcom/mzcom.rc | 8 ++++---- src/worksp/mzcom/mzobj.rgs | 6 +++--- src/worksp/racket/racket.manifest | 2 +- src/worksp/racket/racket.rc | 8 ++++---- src/worksp/starters/start.rc | 8 ++++---- 7 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/worksp/gracket/gracket.manifest b/src/worksp/gracket/gracket.manifest index 04f1ca609f7..c5773976433 100644 --- a/src/worksp/gracket/gracket.manifest +++ b/src/worksp/gracket/gracket.manifest @@ -1,6 +1,6 @@ - diff --git a/src/worksp/gracket/gracket.rc b/src/worksp/gracket/gracket.rc index 6bd7a565df9..89e40d049da 100644 --- a/src/worksp/gracket/gracket.rc +++ b/src/worksp/gracket/gracket.rc @@ -17,8 +17,8 @@ APPLICATION ICON DISCARDABLE "gracket.ico" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 5,1,0,6 - PRODUCTVERSION 5,1,0,6 + FILEVERSION 5,1,0,900 + PRODUCTVERSION 5,1,0,900 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -36,11 +36,11 @@ BEGIN VALUE "CompanyName", "PLT Scheme Inc.\0" VALUE "FileDescription", "Racket GUI application\0" VALUE "InternalName", "GRacket\0" - VALUE "FileVersion", "5, 1, 0, 6\0" + VALUE "FileVersion", "5, 1, 0, 900\0" VALUE "LegalCopyright", "Copyright © 1995-2011\0" VALUE "OriginalFilename", "GRacket.exe\0" VALUE "ProductName", "Racket\0" - VALUE "ProductVersion", "5, 1, 0, 6\0" + VALUE "ProductVersion", "5, 1, 0, 900\0" END END BLOCK "VarFileInfo" diff --git a/src/worksp/mzcom/mzcom.rc b/src/worksp/mzcom/mzcom.rc index eaaf311f5a6..b9919e7ccb3 100644 --- a/src/worksp/mzcom/mzcom.rc +++ b/src/worksp/mzcom/mzcom.rc @@ -53,8 +53,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 5,1,0,6 - PRODUCTVERSION 5,1,0,6 + FILEVERSION 5,1,0,900 + PRODUCTVERSION 5,1,0,900 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -70,12 +70,12 @@ BEGIN BLOCK "040904b0" BEGIN VALUE "FileDescription", "MzCOM Module" - VALUE "FileVersion", "5, 1, 0, 6" + VALUE "FileVersion", "5, 1, 0, 900" VALUE "InternalName", "MzCOM" VALUE "LegalCopyright", "Copyright 2000-2011 PLT (Paul Steckler)" VALUE "OriginalFilename", "MzCOM.EXE" VALUE "ProductName", "MzCOM Module" - VALUE "ProductVersion", "5, 1, 0, 6" + VALUE "ProductVersion", "5, 1, 0, 900" END END BLOCK "VarFileInfo" diff --git a/src/worksp/mzcom/mzobj.rgs b/src/worksp/mzcom/mzobj.rgs index 76ef4f1bf9c..3fddbb5fe72 100644 --- a/src/worksp/mzcom/mzobj.rgs +++ b/src/worksp/mzcom/mzobj.rgs @@ -1,19 +1,19 @@ HKCR { - MzCOM.MzObj.5.1.0.6 = s 'MzObj Class' + MzCOM.MzObj.5.1.0.900 = s 'MzObj Class' { CLSID = s '{A3B0AF9E-2AB0-11D4-B6D2-0060089002FE}' } MzCOM.MzObj = s 'MzObj Class' { CLSID = s '{A3B0AF9E-2AB0-11D4-B6D2-0060089002FE}' - CurVer = s 'MzCOM.MzObj.5.1.0.6' + CurVer = s 'MzCOM.MzObj.5.1.0.900' } NoRemove CLSID { ForceRemove {A3B0AF9E-2AB0-11D4-B6D2-0060089002FE} = s 'MzObj Class' { - ProgID = s 'MzCOM.MzObj.5.1.0.6' + ProgID = s 'MzCOM.MzObj.5.1.0.900' VersionIndependentProgID = s 'MzCOM.MzObj' ForceRemove 'Programmable' LocalServer32 = s '%MODULE%' diff --git a/src/worksp/racket/racket.manifest b/src/worksp/racket/racket.manifest index 1dfeb4ad4dd..d3da5830973 100644 --- a/src/worksp/racket/racket.manifest +++ b/src/worksp/racket/racket.manifest @@ -1,6 +1,6 @@ - diff --git a/src/worksp/racket/racket.rc b/src/worksp/racket/racket.rc index a16ec153ddb..d370cc39f11 100644 --- a/src/worksp/racket/racket.rc +++ b/src/worksp/racket/racket.rc @@ -29,8 +29,8 @@ APPLICATION ICON DISCARDABLE "racket.ico" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 5,1,0,6 - PRODUCTVERSION 5,1,0,6 + FILEVERSION 5,1,0,900 + PRODUCTVERSION 5,1,0,900 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -48,11 +48,11 @@ BEGIN VALUE "CompanyName", "PLT Scheme Inc.\0" VALUE "FileDescription", "Racket application\0" VALUE "InternalName", "Racket\0" - VALUE "FileVersion", "5, 1, 0, 6\0" + VALUE "FileVersion", "5, 1, 0, 900\0" VALUE "LegalCopyright", "Copyright © 1995-2011\0" VALUE "OriginalFilename", "racket.exe\0" VALUE "ProductName", "Racket\0" - VALUE "ProductVersion", "5, 1, 0, 6\0" + VALUE "ProductVersion", "5, 1, 0, 900\0" END END BLOCK "VarFileInfo" diff --git a/src/worksp/starters/start.rc b/src/worksp/starters/start.rc index b93f7befd65..85f353687cf 100644 --- a/src/worksp/starters/start.rc +++ b/src/worksp/starters/start.rc @@ -22,8 +22,8 @@ APPLICATION ICON DISCARDABLE "mzstart.ico" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 5,1,0,6 - PRODUCTVERSION 5,1,0,6 + FILEVERSION 5,1,0,900 + PRODUCTVERSION 5,1,0,900 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -45,7 +45,7 @@ BEGIN #ifdef MZSTART VALUE "FileDescription", "Racket Launcher\0" #endif - VALUE "FileVersion", "5, 1, 0, 6\0" + VALUE "FileVersion", "5, 1, 0, 900\0" #ifdef MRSTART VALUE "InternalName", "mrstart\0" #endif @@ -60,7 +60,7 @@ BEGIN VALUE "OriginalFilename", "MzStart.exe\0" #endif VALUE "ProductName", "Racket\0" - VALUE "ProductVersion", "5, 1, 0, 6\0" + VALUE "ProductVersion", "5, 1, 0, 900\0" END END BLOCK "VarFileInfo" From 34ae8d15bf7399817f85b6de750ff20809d7e02b Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Mon, 18 Apr 2011 10:31:19 -0500 Subject: [PATCH 153/441] make the close icon clicky thingy not grab the focus closes PR 10380 (cherry picked from commit 100b4d31f12d9e90e0fcec73abb68e2cd89b8920) --- collects/mrlib/close-icon.rkt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collects/mrlib/close-icon.rkt b/collects/mrlib/close-icon.rkt index cde9e95fbcc..039bd253b84 100644 --- a/collects/mrlib/close-icon.rkt +++ b/collects/mrlib/close-icon.rkt @@ -113,7 +113,7 @@ [else mask1]))))) - (super-new [style '(transparent)]) + (super-new [style '(transparent no-focus)]) (min-width (+ horizontal-pad horizontal-pad (send icon get-width))) (min-height (+ vertical-pad vertical-pad (send icon get-height))) (stretchable-width #f) From 2db96988354805fdcfee5986d4513c7506872a24 Mon Sep 17 00:00:00 2001 From: Vincent St-Amour Date: Mon, 18 Apr 2011 13:25:28 -0400 Subject: [PATCH 154/441] Optimize filter operations. (cherry picked from commit bce90e2a712dccdf0c7283abaa5be49f65d96b59) --- collects/typed-scheme/types/filter-ops.rkt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/collects/typed-scheme/types/filter-ops.rkt b/collects/typed-scheme/types/filter-ops.rkt index 954fb5e98a0..bcbde39564a 100644 --- a/collects/typed-scheme/types/filter-ops.rkt +++ b/collects/typed-scheme/types/filter-ops.rkt @@ -129,7 +129,9 @@ (cond [(for/or ([f (in-list (append (cdr fs) result))]) (opposite? f t)) -top] - [(for/or ([f (in-list result)]) (or (filter-equal? f t) (implied-atomic? f t))) + [(let ([t-seq (Rep-seq t)]) + (for/or ([f (in-list result)]) + (or (= (Rep-seq f) t-seq) (implied-atomic? f t)))) (loop (cdr fs) result)] [else (loop (cdr fs) (cons t result))])])))) @@ -139,7 +141,7 @@ (case-lambda [() -top] [(f) f] [fs (make-AndFilter fs)])) - (let loop ([fs (remove-duplicates args filter-equal?)] [result null]) + (let loop ([fs (remove-duplicates args equal? #:key Rep-seq)] [result null]) (if (null? fs) (match result [(list) -top] @@ -158,7 +160,9 @@ [t (cond [(for/or ([f (in-list (append (cdr fs) result))]) (opposite? f t)) -bot] - [(for/or ([f (in-list result)]) (or (filter-equal? f t) (implied-atomic? t f))) + [(let ([t-seq (Rep-seq t)]) + (for/or ([f (in-list result)]) + (or (= (Rep-seq f) t-seq) (implied-atomic? t f)))) (loop (cdr fs) result)] [else (loop (cdr fs) (cons t result))])])))) From d863ee466ba3b185245680db957ad3958d28c02e Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Mon, 18 Apr 2011 13:04:23 -0600 Subject: [PATCH 155/441] fix bug in `thread'-based implementation of `place' which is used when parallel places are unavailable (cherry picked from commit 2fa35a2a5c79cfc49663320e34af38b9590aba72) --- collects/racket/place.rkt | 32 +++++++++++++++++--------------- src/racket/src/startup.rktl | 6 +++--- 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/collects/racket/place.rkt b/collects/racket/place.rkt index 693d72dc046..595bde5cd2a 100644 --- a/collects/racket/place.rkt +++ b/collects/racket/place.rkt @@ -21,7 +21,8 @@ processor-count (rename-out [pl-place-enabled? place-enabled?])) -(define-struct TH-place (th ch) #:property prop:evt (lambda (x) (TH-place-channel-out (TH-place-ch x)))) +(define-struct TH-place (th ch cust) + #:property prop:evt (lambda (x) (TH-place-channel-in (TH-place-ch x)))) (define (place-channel-send/receive ch msg) (place-channel-send ch msg) @@ -33,8 +34,9 @@ (thread (lambda () (let loop () - (channel-put ch (thread-receive)) - (loop)))) + (let ([v (thread-receive)]) + (channel-put ch v) + (loop))))) ch)) (define (th-place mod funcname) @@ -43,18 +45,20 @@ (unless (symbol? funcname) (raise-type-error 'place "symbol?" 1 mod funcname)) (define-values (pch cch) (th-place-channel)) - (define th (thread (lambda () - (with-continuation-mark - parameterization-key - orig-paramz - (parameterize ([current-namespace (make-base-namespace)] - [current-custodian (make-custodian-from-main)]) - ((dynamic-require mod funcname) cch)))))) - (TH-place th pch)) + (define cust (make-custodian-from-main)) + (define th (thread + (lambda () + (with-continuation-mark + parameterization-key + orig-paramz + (parameterize ([current-namespace (make-base-namespace)] + [current-custodian cust]) + ((dynamic-require mod funcname) cch)))))) + (TH-place th pch cust)) (define (th-place-sleep n) (sleep n)) (define (th-place-wait pl) (thread-wait (TH-place-th pl)) 0) -(define (th-place-kill pl) (kill-thread (TH-place-th pl))) +(define (th-place-kill pl) (custodian-shutdown-all (TH-place-cust pl))) (define (th-place-channel) (define-values (as ar) (make-th-async-channel)) (define-values (bs br) (make-th-async-channel)) @@ -94,9 +98,7 @@ [(TH-place? pl) (TH-place-channel-out (TH-place-ch pl))] [(TH-place-channel? pl) (TH-place-channel-out pl)] [else (raise-type-error 'place-channel-send "expect a place? or place-channel?" pl)])) - (sync (thread-resume-evt th)) - (thread-send th - (deep-copy msg))) + (void (thread-send th (deep-copy msg) #f))) (define (th-place-channel-receive pl) (channel-get diff --git a/src/racket/src/startup.rktl b/src/racket/src/startup.rktl index 8bc0feeb0eb..bbdbd4958a1 100644 --- a/src/racket/src/startup.rktl +++ b/src/racket/src/startup.rktl @@ -495,9 +495,9 @@ ;; ---------------------------------------- -;; A module that collects all the built-in modules, -;; so that it's easier to keep them attached in new -;; namespaces. +;; When places are implemented by plain old threads, +;; place channels need to be shared across namespaces, +;; so `#%place-struct' is included in builtins (module #%place-struct '#%kernel From 14ba5fb38a9ae8a3fafcb7bc512ea63cb6352818 Mon Sep 17 00:00:00 2001 From: Hari Prashanth Date: Mon, 4 Oct 2010 23:27:13 -0400 Subject: [PATCH 156/441] Added some examples to to the TR reference docs. Signed-off-by: Sam Tobin-Hochstadt (cherry picked from commit 7934ac3461830df81836dfd8113e1b2e7a915a1a) --- .../scribblings/ts-reference.scrbl | 131 ++++++++++++++++-- 1 file changed, 116 insertions(+), 15 deletions(-) diff --git a/collects/typed-scheme/scribblings/ts-reference.scrbl b/collects/typed-scheme/scribblings/ts-reference.scrbl index d70af32bdf9..196e9ebef85 100644 --- a/collects/typed-scheme/scribblings/ts-reference.scrbl +++ b/collects/typed-scheme/scribblings/ts-reference.scrbl @@ -217,15 +217,25 @@ by @racket[read].} @defform[(U t ...)]{is the union of the types @racket[t ...]. @ex[(λ: ([x : Real])(if (> 0 x) "yes" 'no))]} @defform[(case-lambda fun-ty ...)]{is a function that behaves like all of - the @racket[fun-ty]s, considered in order from first to last. - The @racket[fun-ty]s must all be function - types constructed with @racket[->].} + the @racket[fun-ty]s, considered in order from first to last. The @racket[fun-ty]s must all be function + types constructed with @racket[->]. + @ex[(: add-map : (case-lambda + [(Listof Integer) -> (Listof Integer)] + [(Listof Integer) (Listof Integer) -> (Listof Integer)]))] + For the definition of @racket[add-map] look into @racket[case-lambda:].} + @defform/none[(t t1 t2 ...)]{is the instantiation of the parametric type @racket[t] at types @racket[t1 t2 ...]} @defform[(All (v ...) t)]{is a parameterization of type @racket[t], with type variables @racket[v ...]. If @racket[t] is a function type constructed with @racket[->], the outer pair of parentheses - around the function type may be omitted.} + around the function type may be omitted. + @ex[(: list-lenght : (All (A) (Listof A) -> Natural)) + (define (list-lenght lst) + (if (null? lst) + 0 + (add1 (list-lenght (cdr lst)))))]} + @defform[(values t ...)]{is the type of a sequence of multiple values, with types @racket[t ...]. This can only appear as the return type of a function. @@ -235,12 +245,15 @@ function. @defform/none[i]{where @racket[i] is an identifier can be a reference to a type name or a type variable} @defform[(Rec n t)]{is a recursive type where @racket[n] is bound to the -recursive type in the body @racket[t]} +recursive type in the body @racket[t] +@ex[(define-type IntList (Rec List (Pair Integer (U List Null)))) + + (define-type (List A) (Rec List (Pair A (U List Null))))]} @subsection{Other Types} -@defform[(Option t)]{Either @racket[t] of @racket[#f]} +@defform[(Option t)]{Either @racket[t] or @racket[#f]} @section[#:tag "special-forms"]{Special Form Reference} @@ -259,8 +272,31 @@ creating new types, and annotating expressions. Local bindings, like @racket[let], each with associated types. In the second form, @racket[_t0] is the type of the result of @racket[_loop] (and thus the result of the entire -expression as well as the final expression in @racket[body]). -Type annotations are optional.} + expression as well as the final + expression in @racket[body]). + Type annotations are optional. +@ex[(: filter-even : (Listof Natural) (Listof Natural) -> (Listof Natural)) + (define (filter-even lst accum) + (if (null? lst) + accum + (let: ([first : Natural (car lst)] + [rest : (Listof Natural) (cdr lst)]) + (if (even? first) + (filter-even rest (cons first accum)) + (filter-even rest accum))))) + (filter-even (list 1 2 3 4 5 6) null)] + +@ex[(: filter-even-loop : (Listof Natural) -> (Listof Natural)) + (define (filter-even-loop lst) + (let: loop : (Listof Natural) + ([accum : (Listof Natural) null] + [lst : (Listof Natural) lst]) + (cond + [(null? lst) accum] + [(even? (car lst)) (loop (cons (car lst) accum) (cdr lst))] + [else (loop accum (cdr lst))]))) + (filter-even-loop (list 1 2 3 4))]} + @deftogether[[ @defform[(letrec: ([v : t e] ...) . body)] @defform[(let*: ([v : t e] ...) . body)] @@ -294,7 +330,16 @@ A polymorphic function, abstracted over the type variables of the formal, and in any type expressions in the @racket[body].} @defform[(case-lambda: [formals body] ...)]{ A function of multiple arities. Note that each @racket[formals] must have a -different arity.} +different arity. +@ex[(define add-map + (case-lambda: + [([lst : (Listof Integer)]) + (map add1 lst)] + [([lst1 : (Listof Integer)] + [lst2 : (Listof Integer)]) + (map + lst1 lst2)]))] +For the type declaration of @racket[add-map] look at @racket[case-lambda].} + @defform[(pcase-lambda: (a ...) [formals body] ...)]{ A polymorphic function of multiple arities.} @defform/subs[(opt-lambda: formals . body) @@ -383,7 +428,18 @@ annotations are optional. These forms define variables, with annotated types. The first form defines @racket[v] with type @racket[t] and value @racket[e]. The second and third forms defines a function @racket[f] with appropriate -types. In most cases, use of @racket[:] is preferred to use of @racket[define:].} +types. In most cases, use of @racket[:] is preferred to use of @racket[define:]. + +@ex[(define: foo : Integer 10) + + (define: (add [first : Integer] + [rest : Integer]) : Integer + (+ first rest)) + + (define: (A) (poly-app [func : (A A -> A)] + [first : A] + [rest : A]) : A + (func first rest))]} @@ -423,7 +479,10 @@ The first form defines @racket[name] as type, with the same meaning as @racket[t]. The second form is equivalent to @racket[(define-type name (All (v ...) t))]. Type names may refer to other types defined in the same module, but -cycles among them are prohibited.} +cycles among them are prohibited. + +@ex[(define-type IntStr (U Integer String)) + (define-type (ListofPairs A) (Listof (Pair A A)))]} @subsection{Generating Predicates Automatically} @defform[(define-predicate name t)]{ @@ -436,7 +495,9 @@ Defines @racket[name] as a predicate for the type @racket[t]. @defform[(: v t)]{This declares that @racket[v] has type @racket[t]. The definition of @racket[v] must appear after this declaration. This -can be used anywhere a definition form may be used.} +can be used anywhere a definition form may be used. +@ex[(: var1 Integer) + (: var2 String)]} @defform[(provide: [v t] ...)]{This declares that the @racket[v]s have the types @racket[t], and also provides all of the @racket[v]s.} @@ -453,7 +514,14 @@ This is legal only in expression contexts.} @defform[(inst e t ...)]{Instantiate the type of @racket[e] with types @racket[t ...]. @racket[e] must have a polymorphic type with the appropriate number of type variables. This is legal only in expression -contexts.} +contexts. +@ex[(foldl (inst cons Integer Integer) null (list 1 2 3 4))] + +@ex[(: fold-list : (All (A) (Listof A) -> (Listof A))) + (define (fold-list lst) + (foldl (inst cons A A) null lst)) + + (fold-list (list "1" "2" "3" "4"))]} @litchar|{#{e @ t ...}}| This is identical to @racket[(inst e t ...)]. @@ -482,6 +550,23 @@ structure predicate has the appropriate Typed Racket filter type so that it may be used as a predicate in @racket[if] expressions in Typed Racket. + +@ex[(module UNTYPED racket/base + (define n 100) + + (define-struct IntTree + (elem left right)) + + (provide n (struct-out IntTree))) + + (module TYPED typed/racket + (require/typed 'UNTYPED + [n Natural] + [struct IntTree + ([elem : Integer] + [left : IntTree] + [right : IntTree])]))] + @index["opaque"]{The fourth case} defines a new type @racket[t]. @racket[pred], imported from module @racket[m], is a predicate for this type. The type is defined as precisely those values to which @racket[pred] produces @@ -494,8 +579,24 @@ enforce the specified types. If this contract fails, the module Some types, notably polymorphic types constructed with @racket[All], cannot be converted to contracts and raise a static error when used in -a @racket[require/typed] form.} - +a @racket[require/typed] form. Here is an example of using +@racket[case-lambda] in @racket[require/typed]. + +@(racketblock + (require/typed racket/base + [file-or-directory-modify-seconds + (case-lambda + [String -> Exact-Nonnegative-Integer] + [String (Option Exact-Nonnegative-Integer) + -> + (U Exact-Nonnegative-Integer Void)] + [String (Option Exact-Nonnegative-Integer) (-> Any) + -> + Any])])) + +@racket[file-or-directory-modify-seconds] has some arguments which are optional. +So we need to use @racket[case-lambda].} + @section{Libraries Provided With Typed Racket} The @racketmodname[typed/racket] language corresponds to the From d61e0e4c5c926d986f84f273a7218a341a38e8bc Mon Sep 17 00:00:00 2001 From: Sam Tobin-Hochstadt Date: Mon, 18 Apr 2011 15:40:20 -0400 Subject: [PATCH 157/441] Remove unused code. (cherry picked from commit 187dc634933a5652746d5dcb6a263732a9a46b7a) --- collects/typed-scheme/private/colon.rkt | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/collects/typed-scheme/private/colon.rkt b/collects/typed-scheme/private/colon.rkt index 58152646f64..efa4214fcff 100644 --- a/collects/typed-scheme/private/colon.rkt +++ b/collects/typed-scheme/private/colon.rkt @@ -9,18 +9,6 @@ (provide :) (define-syntax (: stx) - (define-syntax-class arr - (pattern x:id - #:fail-unless (eq? (syntax-e #'x) '->) #f - #:fail-unless (printf "id: ~a ~a\n" - (identifier-binding #'All-kw) - (identifier-transformer-binding #'All-kw)) - #f - #:fail-unless (printf "kw: ~a ~a\n" - (identifier-binding #'t:All) - (identifier-transformer-binding #'t:All)) - #f - #:fail-when #t #f)) (define stx* ;; make it possible to add another colon after the id for clarity ;; and in that case, a `->' on the RHS does not need to be From cb4ab1869e537164e26f157d41780f547717ff6b Mon Sep 17 00:00:00 2001 From: Sam Tobin-Hochstadt Date: Mon, 18 Apr 2011 15:40:31 -0400 Subject: [PATCH 158/441] Copy properties when optimizing bodies of lambda/define-values. Closes PR 11860. (cherry picked from commit 981616d504c1c0c6f91effedc6166a324de328e3) --- collects/typed-scheme/optimizer/optimizer.rkt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/collects/typed-scheme/optimizer/optimizer.rkt b/collects/typed-scheme/optimizer/optimizer.rkt index 04bc1c790ef..f9bc2017926 100644 --- a/collects/typed-scheme/optimizer/optimizer.rkt +++ b/collects/typed-scheme/optimizer/optimizer.rkt @@ -37,7 +37,9 @@ ;; boring cases, just recur down (pattern ((~and op (~or (~literal #%plain-lambda) (~literal define-values))) formals e:expr ...) - #:with opt #`(op formals #,@(syntax-map (optimize) #'(e ...)))) + #:with opt (syntax-track-origin (quasisyntax/loc this-syntax (op formals #,@(syntax-map (optimize) #'(e ...)))) + this-syntax + #'op)) (pattern (case-lambda [formals e:expr ...] ...) ;; optimize all the bodies #:with (opt-parts ...) From d827278dd8a629c65de6e18142a975f66339328d Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Mon, 18 Apr 2011 16:50:35 -0400 Subject: [PATCH 159/441] Indentation in example (cherry picked from commit 49e1b47bb26a86dd4b87a44d75264a89bd00f092) --- collects/meta/web/www/index.rkt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collects/meta/web/www/index.rkt b/collects/meta/web/www/index.rkt index 7adf82dc0ea..82f8917aeea 100644 --- a/collects/meta/web/www/index.rkt +++ b/collects/meta/web/www/index.rkt @@ -56,7 +56,7 @@ @code{#lang web-server/insta ;; A "hello world" web server (define (start request) - (response/xexpr) + (response/xexpr) '(html (body "Hello World")))} @desc{This example implements a web server using the From 67b490adb162fe9c471a46963630a0767efba7d2 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Mon, 18 Apr 2011 14:44:05 -0600 Subject: [PATCH 160/441] adjust Racket release notes for 5.1.1 Merge to v5.1.1 (cherry picked from commit 4e576a8ac90b0e84e60d3c553a449ef9b086327a) --- doc/release-notes/racket/HISTORY.txt | 34 ++++++++++++---------------- 1 file changed, 14 insertions(+), 20 deletions(-) diff --git a/doc/release-notes/racket/HISTORY.txt b/doc/release-notes/racket/HISTORY.txt index 6c74f379906..19dbae47b5a 100644 --- a/doc/release-notes/racket/HISTORY.txt +++ b/doc/release-notes/racket/HISTORY.txt @@ -1,7 +1,19 @@ -Version 5.1.0.6 +Version 5.1.1, May 2011 +Enabled single-precision floats by default +Added single-flonum? +Changed eqv? so that inexacts are equivalent only when they + have the same precision +Changed file-or-directory-permission to add 'bits mode + and permission-setting mode +Added special treatment of void as an 'inferred-name property Removed the "MrEd" compatability executable under Windows and Mac OS X, but the "mred" compatibility script remains -Removed the following (undocumented) exports from racket/contract: +racket/gui: added multi-column support to list-box% +racket/gui: added scrollbar support to panel%, vertical-panel%, + and horizontal-panel% +racket/gui: added 'wheel-left and 'wheel-right events +racket/file: add user-read-bit, etc. +racket/contract: removed the following (undocumented) exports: build-flat-contract chaperone-contract-struct? contract-struct-first-order @@ -37,24 +49,6 @@ Removed the following (undocumented) exports from racket/contract: synthesized-value unknown? -Version 5.1.0.5 -racket/gui: added 'wheel-left and 'wheel-right events - -Version 5.1.0.4 -Change file-or-directory-permission to add 'bits mode - and permission-setting mode -racket/file: add user-read-bit, etc. -Added special treatment of void as an 'inferred-name property - -Version 5.1.0.2 -Enabled single-precision floats by default -Added single-flonum? -Changed eqv? so that inexacts are equivalent only when they - have the same precision -racket/gui: added multi-column support to list-box% -racket/gui: added scrollbar support to panel%, vertical-panel%, - and horizontal-panel% - Version 5.1, February 2011 Renamed "proxy" to "impersonator" Added current-get-interaction-input-port, which enables From 6586ab120170fbf636baa3e7448426fcd26247ba Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Mon, 18 Apr 2011 15:47:52 -0600 Subject: [PATCH 161/441] fix typo Closes PR 11862 Merge to 5.1.1 (cherry picked from commit 963a8214b89a1968df11c63697bc07bb63c832e6) --- collects/scribblings/reference/module-reflect.scrbl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collects/scribblings/reference/module-reflect.scrbl b/collects/scribblings/reference/module-reflect.scrbl index 89a8d72ae1c..bf4489b037d 100644 --- a/collects/scribblings/reference/module-reflect.scrbl +++ b/collects/scribblings/reference/module-reflect.scrbl @@ -355,7 +355,7 @@ above the @tech{base phase}. When @racket[provided] is a symbol, the value of the module's export with the given name is returned, and still the module is not @tech{visit}ed or made @tech{available} in higher phases. If the -module exports @racket[provide] as syntax, then a use of the binding +module exports @racket[provided] as syntax, then a use of the binding is expanded and evaluated in a fresh namespace to which the module is attached, which means that the module is @tech{visit}ed in the fresh namespace. If the module has no such exported variable or syntax, then From 8f368d8df64e0f1a426b64af0df29bfd1c322d98 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Tue, 19 Apr 2011 07:13:31 -0600 Subject: [PATCH 162/441] fix typo Closes PR 11864 Merge to 5.1.1 (cherry picked from commit 6664e20815c48e410ff7b98ad02f7559e28487ab) --- collects/scribblings/reference/stx-patterns.scrbl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/collects/scribblings/reference/stx-patterns.scrbl b/collects/scribblings/reference/stx-patterns.scrbl index 62b29fdb909..7119199086b 100644 --- a/collects/scribblings/reference/stx-patterns.scrbl +++ b/collects/scribblings/reference/stx-patterns.scrbl @@ -271,8 +271,8 @@ the individual @scheme[stx-expr]. const] [ellipsis #,lit-ellipsis])]{ -Constructs a syntax object based on a @scheme[template],which can -inlude @tech{pattern variables} bound by @scheme[syntax-case] or +Constructs a syntax object based on a @scheme[template], which can +include @tech{pattern variables} bound by @scheme[syntax-case] or @scheme[with-syntax]. Template forms produce a syntax object as follows: From 2d375a7d29d3acc42bd83adff5bee828ad7b2519 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Tue, 19 Apr 2011 07:16:10 -0600 Subject: [PATCH 163/441] doc corrections Closes PR 11865 Merge to 5.1.1 (cherry picked from commit 18e3f54fa5ce2695234aced0db675c5018afbb2e) --- collects/scribblings/guide/control.scrbl | 6 +++--- collects/scribblings/reference/cont.scrbl | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/collects/scribblings/guide/control.scrbl b/collects/scribblings/guide/control.scrbl index 32d1b85bcc1..ebaad462f7a 100644 --- a/collects/scribblings/guide/control.scrbl +++ b/collects/scribblings/guide/control.scrbl @@ -245,12 +245,12 @@ the continuation in @racket[saved-k] becomes @racket[(lambda (x) (+ 5 (saved-k 10) ] -A more traditional continuation operator in Racket is -@racket[call-with-current-continuation], which is often abbreviated +A more traditional continuation operator in Racket (or Scheme) is +@racket[call-with-current-continuation], which is usually abbreviated @racket[call/cc]. It is like @racket[call-with-composable-continuation], but applying the captured continuation first @tech{aborts} (to the current @tech{prompt}) before -restoring the saved continuation. In addition, Racket systems +restoring the saved continuation. In addition, Scheme systems traditionally support a single prompt at the program start, instead of allowing new prompts via @racket[call-with-continuation-prompt]. Continuations as in Racket diff --git a/collects/scribblings/reference/cont.scrbl b/collects/scribblings/reference/cont.scrbl index cdbcddc0ed4..231bf290118 100644 --- a/collects/scribblings/reference/cont.scrbl +++ b/collects/scribblings/reference/cont.scrbl @@ -36,8 +36,7 @@ evaluation context protected by the barrier: ] In addition, extensions of Racket may install barriers in -additional contexts. In particular, GRacket installs a continuation -barrier around most every callback. Finally, +additional contexts. Finally, @racket[call-with-continuation-barrier] applies a thunk barrier between the application and the current continuation. From 4321a1e13c03eca104cf01486b729996653a953d Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Mon, 18 Apr 2011 15:48:14 -0600 Subject: [PATCH 164/441] fix `namespace-attach-module' at phases above 0 Closes PR 11863 Merge to 5.1.1 (cherry picked from commit 586478a241dc0edfd76a16aaecb76a97c8888372) --- src/racket/src/module.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/racket/src/module.c b/src/racket/src/module.c index c67ec47819b..b00eda3fdd9 100644 --- a/src/racket/src/module.c +++ b/src/racket/src/module.c @@ -1421,7 +1421,7 @@ static Scheme_Object *namespace_attach_module(int argc, Scheme_Object *argv[]) while (!SCHEME_NULLP(todo)) { if (phase > max_phase) max_phase = phase; - if (phase < 0) { + if (phase < orig_phase) { /* As soon as we start traversing negative phases, stop transferring instances (i.e., transfer declarations only). This transfer-only mode should stick even even if we go back into positive phases. */ @@ -1466,7 +1466,7 @@ static Scheme_Object *namespace_attach_module(int argc, Scheme_Object *argv[]) deeper in phases (for-syntax levels) than the target namespace has ever gone, so there's definitely no conflict at this level in that case. */ - if ((phase >= 0) && SCHEME_TRUEP(to_modchain)) { + if ((phase >= orig_phase) && SCHEME_TRUEP(to_modchain)) { menv2 = (Scheme_Env *)scheme_hash_get(MODCHAIN_TABLE(to_modchain), name); if (menv2) { if (!SAME_OBJ(menv->toplevel, menv2->toplevel)) @@ -1642,7 +1642,7 @@ static Scheme_Object *namespace_attach_module(int argc, Scheme_Object *argv[]) } from_modchain = SCHEME_VEC_ELS(from_modchain)[2]; - if (phase > 0) { + if (phase > orig_phase) { to_modchain = SCHEME_CAR(past_to_modchains); past_to_modchains = SCHEME_CDR(past_to_modchains); } @@ -1669,7 +1669,7 @@ static Scheme_Object *namespace_attach_module(int argc, Scheme_Object *argv[]) } from_modchain = SCHEME_VEC_ELS(from_modchain)[1]; - if (phase >= 0) { + if (phase >= orig_phase) { past_to_modchains = cons(to_modchain, past_to_modchains); if (SCHEME_TRUEP(to_modchain)) to_modchain = SCHEME_VEC_ELS(to_modchain)[1]; @@ -1821,7 +1821,7 @@ static Scheme_Object *namespace_attach_module(int argc, Scheme_Object *argv[]) LOG_ATTACH(printf("Copying %d (%p)\n", phase, checked)); - if (phase >= 0) + if (phase >= orig_phase) check_modchain_consistency(MODCHAIN_TABLE(to_modchain), phase); for (i = checked->size; i--; ) { @@ -1837,7 +1837,7 @@ static Scheme_Object *namespace_attach_module(int argc, Scheme_Object *argv[]) menv2 = (Scheme_Env *)scheme_hash_get(MODCHAIN_TABLE(to_modchain), name); if (!menv2) { /* Clone/copy menv for the new namespace: */ - if ((phase >= 0) && !just_declare) { + if ((phase >= orig_phase) && !just_declare) { menv2 = scheme_copy_module_env(menv, to_env, to_modchain, orig_phase); if (menv->attached) menv2->attached = 1; @@ -1858,7 +1858,7 @@ static Scheme_Object *namespace_attach_module(int argc, Scheme_Object *argv[]) past_checkeds = SCHEME_CDR(past_checkeds); from_modchain = SCHEME_VEC_ELS(from_modchain)[2]; - if (phase > 0) + if (phase > orig_phase) to_modchain = SCHEME_VEC_ELS(to_modchain)[2]; --phase; } From 05260c16c248137486ba58e49f79ba5132916db7 Mon Sep 17 00:00:00 2001 From: Sam Tobin-Hochstadt Date: Mon, 18 Apr 2011 17:43:11 -0400 Subject: [PATCH 165/441] Remove useless propositional clauses. Thanks to dyoo for test case. (cherry picked from commit 0f5dfd68710bbfadb499e2ab7ff294bcd377053a) --- collects/typed-scheme/types/filter-ops.rkt | 25 ++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/collects/typed-scheme/types/filter-ops.rkt b/collects/typed-scheme/types/filter-ops.rkt index bcbde39564a..7476a88f18c 100644 --- a/collects/typed-scheme/types/filter-ops.rkt +++ b/collects/typed-scheme/types/filter-ops.rkt @@ -13,8 +13,9 @@ (provide (all-defined-out)) -(define (atomic-filter? e) - (or (TypeFilter? e) (NotTypeFilter? e))) +(define (atomic-filter? p) + (or (TypeFilter? p) (NotTypeFilter? p) + (Top? p) (Bot? p))) (define (opposite? f1 f2) (match* (f1 f2) @@ -40,6 +41,8 @@ (if (filter-equal? f1 f2) #t (match* (f1 f2) + [((OrFilter: fs) f2) + (memf (lambda (f) (filter-equal? f f2)) fs)] [((TypeFilter: t1 p1 i1) (TypeFilter: t2 p1 i2)) (and (name-ref=? i1 i2) @@ -60,6 +63,8 @@ ((listof Filter/c) boolean? . --> . (listof Filter/c)) (define tf-map (make-hash)) (define ntf-map (make-hash)) + ;; props: the propositions we're processing + ;; others: props that are neither TF or NTF (let loop ([props props] [others null]) (if (null? props) (append others @@ -152,7 +157,18 @@ (if (filter-equal? f1 f2) f1 (apply mk (compact (list f1 f2) #f))))] - [_ (apply mk (compact result #f))]) + [_ + ;; first, remove anything implied by the atomic propositions + ;; We commonly see: (And (Or P Q) (Or P R) (Or P S) ... P), which this fixes + (let-values ([(atomic not-atomic) (partition atomic-filter? result)]) + (define not-atomic* + (for/list ([p (in-list not-atomic)] + #:when + (not (for/or ([a (in-list atomic)]) + (implied-atomic? p a)))) + p)) + ;; `compact' takes care of implications between atomic props + (apply mk (compact (append not-atomic* atomic) #f)))]) (match (car fs) [(and t (Bot:)) t] [(AndFilter: fs*) (loop (cdr fs) (append fs* result))] @@ -162,7 +178,8 @@ -bot] [(let ([t-seq (Rep-seq t)]) (for/or ([f (in-list result)]) - (or (= (Rep-seq f) t-seq) (implied-atomic? t f)))) + (or (= (Rep-seq f) t-seq) + (implied-atomic? t f)))) (loop (cdr fs) result)] [else (loop (cdr fs) (cons t result))])])))) From 35491070d0bbfcf0cecf82365e6ba382ecde9464 Mon Sep 17 00:00:00 2001 From: Jon Rafkind Date: Mon, 18 Apr 2011 17:00:42 -0600 Subject: [PATCH 166/441] better error message when pre: or post: is used incorrectly (cherry picked from commit 3f572809c903bff453f36a48eb57994eeb1c36e0) --- collects/ffi/unsafe.rkt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/collects/ffi/unsafe.rkt b/collects/ffi/unsafe.rkt index 4cef8d26747..e3bbe8959d9 100644 --- a/collects/ffi/unsafe.rkt +++ b/collects/ffi/unsafe.rkt @@ -344,7 +344,7 @@ (let loop ([t orig]) (define (next rest . args) (apply setkey! args) (loop rest)) (syntax-case* t - (type: expr: bind: 1st-arg: prev-arg: pre: post: keywords:) + (type: expr: bind: 1st-arg: prev-arg: pre: post: keywords: =>) id=? [(type: t x ...) (next #'(x ...) 'type #'t)] [(expr: e x ...) (next #'(x ...) 'expr #'e)] @@ -352,7 +352,11 @@ [(1st-arg: id x ...) (next #'(x ...) '1st (cert-id #'id) #t)] [(prev-arg: id x ...) (next #'(x ...) 'prev (cert-id #'id) #t)] ;; in the following two cases pass along orig for recertifying + ;; first explicitly check if the `(id => expr)' form left off + ;; the parentheses + [(pre: p => expr x ...) (err "bad form for `pre:'. Expected either `pre: (id => expression)' or `pre: expression'" #'(pre: p => expr))] [(pre: p x ...) (next #'(x ...) 'pre (with-arg #'p))] + [(post: p => expr x ...) (err "bad form for `post:' Expected either `post: (id => expression)' or `post: expression'" #'(post: p => expr))] [(post: p x ...) (next #'(x ...) 'post (with-arg #'p))] [(keywords: x ...) (let kloop ([ks '()] [xs #'(x ...)]) From 86b781e5bf1e0a6307b31cae4467c547a8b4b61b Mon Sep 17 00:00:00 2001 From: Jon Rafkind Date: Mon, 18 Apr 2011 17:27:07 -0600 Subject: [PATCH 167/441] show an example of define-fun-syntax and using the keywords (cherry picked from commit cdb63b9c77f0a96b4b479f309e9fa6808cbae367) --- collects/scribblings/foreign/types.scrbl | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/collects/scribblings/foreign/types.scrbl b/collects/scribblings/foreign/types.scrbl index 485963cb2b9..12167720244 100644 --- a/collects/scribblings/foreign/types.scrbl +++ b/collects/scribblings/foreign/types.scrbl @@ -659,8 +659,17 @@ with a function call. Binds @scheme[id] as a @tech{custom function type}. The type is expanded by applying the procedure produced by @scheme[transformer-expr] to a use of the @tech{custom function -type}.} +type}. +For instance, the following defines a new type that automatically coerces +the input number to an inexact form which is compatible with the _float type. + +@racketblock[ +(define-fun-syntax _float* + (syntax-id-rules (_float*) + [(_float*) (type: _float pre: (x => (+ 0.0 x)))])) + +(_fun _float* -> _bool)]} @defidform[_?]{ From 8ba24327c1dab6a1e9a385e9db8afc388db54d7e Mon Sep 17 00:00:00 2001 From: Stephen Chang Date: Tue, 19 Apr 2011 01:21:19 -0400 Subject: [PATCH 168/441] fix struct constructor application in lazy racket (cherry picked from commit 718b9709bc7dc1acdc138c2f67288001b328d80b) --- collects/lazy/lazy.rkt | 4 +++- collects/stepper/private/macro-unwind.rkt | 15 ++++++++------- collects/tests/lazy/lang.rkt | 15 ++++++++++++++- 3 files changed, 25 insertions(+), 9 deletions(-) diff --git a/collects/lazy/lazy.rkt b/collects/lazy/lazy.rkt index 6807d2189df..d955723559e 100644 --- a/collects/lazy/lazy.rkt +++ b/collects/lazy/lazy.rkt @@ -254,6 +254,8 @@ ;; `!apply': provided as `apply' (no need to provide `~!apply', since all ;; function calls are delayed by `#%app') + (define (extract-if-lazy-proc f) + (or (procedure-extract-target f) f)) (define-syntax (!*app stx) (syntax-case stx () [(_ f x ...) @@ -271,7 +273,7 @@ skipto/first)))]) (with-syntax ([(y ...) (generate-temporaries #'(x ...))]) ;; use syntax/loc for better errors etc - (with-syntax ([lazy (syntax/loc stx ((procedure-extract-target p) y ...))] + (with-syntax ([lazy (syntax/loc stx ((extract-if-lazy-proc p) y ...))] [strict (syntax/loc stx (p (hidden-! y) ...))]) (quasisyntax/loc stx ((lambda (p y ...) diff --git a/collects/stepper/private/macro-unwind.rkt b/collects/stepper/private/macro-unwind.rkt index 1a61e925c68..78bede05f71 100644 --- a/collects/stepper/private/macro-unwind.rkt +++ b/collects/stepper/private/macro-unwind.rkt @@ -59,14 +59,15 @@ [(define-values dc ...) (unwind-define stx settings)] ; STC: app special cases from lazy racket - ; procedure-extract-target - can't hide this in lazy.rkt bc it's needed + ; extract-if-lazy-proc - can't hide this in lazy.rkt bc it's needed ; to distinguish the general lazy application [(#%plain-app proc-extract p) - (or (eq? (syntax->datum #'proc-extract) 'procedure-extract-target) - (eq? (with-handlers ; for print output-style - ([(λ (e) #t) (λ (e) #f)]) - (syntax-e (second (syntax-e #'proc-extract)))) - procedure-extract-target)) + (or (eq? (syntax->datum #'proc-extract) 'extract-if-lazy-proc) + (eq? (object-name + (with-handlers ; for print output-style + ([(λ (e) #t) (λ (e) #f)]) + (syntax-e (second (syntax-e #'proc-extract))))) + 'extract-if-lazy-proc)) (unwind #'p settings)] ; lazy #%app special case: force and delay [(#%plain-app f arg) @@ -80,7 +81,7 @@ [(#%plain-app (#%plain-lambda args1 (#%plain-app (#%plain-app proc p) . args2)) . args3) - (and (eq? (syntax->datum #'proc) 'procedure-extract-target) + (and (eq? (syntax->datum #'proc) 'extract-if-lazy-proc) (equal? (syntax->datum (cdr (syntax-e #'args1))) (syntax->datum #'args2))) (recur-on-pieces #'args3 settings)] diff --git a/collects/tests/lazy/lang.rkt b/collects/tests/lazy/lang.rkt index 535745cb3b7..6d579363d45 100644 --- a/collects/tests/lazy/lang.rkt +++ b/collects/tests/lazy/lang.rkt @@ -68,8 +68,21 @@ (!! (take 1 (cons 0 (error "poof")))) => '(0) )) +(define (misc-tests) + (define-struct a (b c)) + (define-struct d (e f)) + (test + (! (a-b (make-a 1 2))) => 1 + (! (a-c (make-a 1 2))) => 2 + (! (a-b (a 1 2))) => 1 + (! (a-c (a 1 2))) => 2 + (! (a? (a 1 2))) => true + (! (a? (d 1 2))) => false + )) + (provide lang-tests) (define (lang-tests) (! (begin (basic-tests) (list-tests) - (take-tests)))) + (take-tests) + (misc-tests)))) From 5030041385e1014ee41a6c94f3fc98d44ff376a9 Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Tue, 19 Apr 2011 10:13:32 -0500 Subject: [PATCH 169/441] fix check syntax's stdout so that it can handle specials related to PR 11854 merge to release, please (cherry picked from commit 57b9bcfe38f1e360dde9a82205be30248c561653) --- collects/drracket/private/syncheck/gui.rkt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/collects/drracket/private/syncheck/gui.rkt b/collects/drracket/private/syncheck/gui.rkt index 2a82e6540f6..0539652b6ac 100644 --- a/collects/drracket/private/syncheck/gui.rkt +++ b/collects/drracket/private/syncheck/gui.rkt @@ -1277,11 +1277,13 @@ If the namespace does not, they are colored the unbound color. (cleanup) (custodian-shutdown-all user-custodian)))))] [error-port (send (send the-tab get-error-report-text) get-err-port)] + [output-port (send (send the-tab get-error-report-text) get-out-port)] [init-proc (λ () ; =user= (send the-tab set-breakables (current-thread) (current-custodian)) (set-directory definitions-text) (current-error-port error-port) + (current-output-port output-port) (error-display-handler (λ (msg exn) ;; =user= (parameterize ([current-eventspace drs-eventspace]) From 8c26521524a0e9fff25c1153d4b5481c229f9fdf Mon Sep 17 00:00:00 2001 From: Stephen Chang Date: Tue, 19 Apr 2011 14:32:17 -0400 Subject: [PATCH 170/441] fix typo in guide sec 17.3.3 (cherry picked from commit 3e08a611902960c099dab8915a3632f219dac21f) --- collects/scribblings/guide/hash-languages.scrbl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collects/scribblings/guide/hash-languages.scrbl b/collects/scribblings/guide/hash-languages.scrbl index 4eb2ddcdc55..7d89a196481 100644 --- a/collects/scribblings/guide/hash-languages.scrbl +++ b/collects/scribblings/guide/hash-languages.scrbl @@ -177,7 +177,7 @@ implements and exports the @racket[identity] function, since The @racketmodname[syntax/module-reader] language accepts many optional specifications to adjust other features of the language. For example, an alternate @racketidfont{read} and @racketidfont{read-syntax} for -parsing the language can be spcified with @racket[#:read] and +parsing the language can be specified with @racket[#:read] and @racket[#:read-syntax], respectively. The following @filepath{dollar-racket.rkt} language uses @filepath{dollar.rkt} (see @secref["readtable"]) to build a language that is like From d938e0c9b0cb8eacb6d8ae993432ff30b1f43c6a Mon Sep 17 00:00:00 2001 From: Sam Tobin-Hochstadt Date: Mon, 18 Apr 2011 20:50:15 -0400 Subject: [PATCH 171/441] Refactor to avoid duplicated code. (cherry picked from commit 05d9e1a871de7d68d5ae878b7dc1b3bdd7be28fb) --- collects/typed-scheme/typed-scheme.rkt | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/collects/typed-scheme/typed-scheme.rkt b/collects/typed-scheme/typed-scheme.rkt index 2425f6d66bc..5de02dd7419 100644 --- a/collects/typed-scheme/typed-scheme.rkt +++ b/collects/typed-scheme/typed-scheme.rkt @@ -3,8 +3,8 @@ (require (for-syntax racket/base ;; these requires are needed since their code ;; appears in the residual program - "typecheck/renamer.rkt" "types/type-table.rkt") - "private/base-special-env.rkt") + "typecheck/renamer.rkt" "types/type-table.rkt" profile) + "private/base-special-env.rkt" ) (provide (rename-out [module-begin #%module-begin] [top-interaction #%top-interaction] @@ -21,14 +21,11 @@ ((dynamic-require 'typed-scheme/private/base-env 'init)) ((dynamic-require 'typed-scheme/private/base-env-numeric 'init))) -(define-syntax (module-begin stx) - (do-standard-inits) - ((dynamic-require 'typed-scheme/core 'mb-core) stx)) +(define-syntax-rule (drivers [name sym] ...) + (begin + (define-syntax (name stx) + (do-standard-inits) + ((dynamic-require 'typed-scheme/core 'sym) stx)) + ...)) -(define-syntax (top-interaction stx) - (do-standard-inits) - ((dynamic-require 'typed-scheme/core 'ti-core) stx)) - -(define-syntax (with-type stx) - (do-standard-inits) - ((dynamic-require 'typed-scheme/core 'wt-core) stx)) +(drivers [module-begin mb-core] [top-interaction ti-core] [with-type wt-core]) From 0d898db859d2379be15978b3383d17c7c5727ba4 Mon Sep 17 00:00:00 2001 From: Sam Tobin-Hochstadt Date: Mon, 18 Apr 2011 20:51:24 -0400 Subject: [PATCH 172/441] Remove unused macro. Convert function to macro for inlining. (cherry picked from commit e7beef3f4fd407c7ba7f8d6c46e4f9f37fced091) --- collects/typed-scheme/env/lexical-env.rkt | 27 ++++++++--------------- 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/collects/typed-scheme/env/lexical-env.rkt b/collects/typed-scheme/env/lexical-env.rkt index 1445435d900..6f339ee89d0 100644 --- a/collects/typed-scheme/env/lexical-env.rkt +++ b/collects/typed-scheme/env/lexical-env.rkt @@ -16,7 +16,7 @@ (typecheck tc-metafunctions) (except-in (types utils convenience) -> ->*)) -(provide lexical-env with-lexical-env with-lexical-env/extend with-update-type/lexical +(provide lexical-env with-lexical-env with-lexical-env/extend with-lexical-env/extend/props) (p/c [lookup-type/lexical ((identifier?) (prop-env? #:fail (or/c #f (-> any/c #f))) . ->* . (or/c Type/c #f))] @@ -44,26 +44,17 @@ ;; refine the type of i in the lexical env ;; (identifier type -> type) identifier -> environment -(define (update-type/lexical f i [env (lexical-env)]) - ;; do the updating on the given env - ;; (identifier type -> type) identifier environment -> environment - (define (update f k env) - (parameterize - ([current-orig-stx k]) - (let* ([v (lookup-type/lexical k env #:fail (lambda _ Univ))] - [new-v (f k v)] - [new-env (extend env k new-v)]) - new-env))) +;; a macro for inlining :( +(define-syntax-rule (update-type/lexical f i env) ;; check if i is ever the target of a set! (if (is-var-mutated? i) ;; if it is, we do nothing env ;; otherwise, refine the type - (update f i env))) - -;; convenience macro for typechecking in the context of an updated env -(define-syntax with-update-type/lexical - (syntax-rules () - [(_ f i . b) - (with-lexical-env (update-type/lexical f i) . b)])) + (parameterize + ([current-orig-stx i]) + (let* ([v (lookup-type/lexical i env #:fail (lambda _ Univ))] + [new-v (f i v)] + [new-env (extend env i new-v)]) + new-env)))) From 0a8ad31a478c203c86d7940450be71582bcc5357 Mon Sep 17 00:00:00 2001 From: Sam Tobin-Hochstadt Date: Mon, 18 Apr 2011 20:52:33 -0400 Subject: [PATCH 173/441] Fix typo. (cherry picked from commit 7ba2b6e100a9075779bdbdc0a540c8b3044587a5) --- collects/typed-scheme/types/subtype.rkt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collects/typed-scheme/types/subtype.rkt b/collects/typed-scheme/types/subtype.rkt index 4757dfa81c3..c182d8752c6 100644 --- a/collects/typed-scheme/types/subtype.rkt +++ b/collects/typed-scheme/types/subtype.rkt @@ -294,7 +294,7 @@ [(s (Poly: vs b)) (=> unmatch) (if (null? (fv b)) (subtype* A0 s b) (unmatch))] - ;; rec types, applications and names (that aren't the same + ;; rec types, applications and names (that aren't the same) [((? needs-resolving? s) other) (let ([s* (resolve-once s)]) (if (Type? s*) ;; needed in case this was a name that hasn't been resolved yet From 2da100ba8f95916c8ca9c2d021b7e0225c07fc18 Mon Sep 17 00:00:00 2001 From: Sam Tobin-Hochstadt Date: Mon, 18 Apr 2011 20:53:51 -0400 Subject: [PATCH 174/441] Remove useless requires. (cherry picked from commit 51083dbce6bc66305a7d3809097bdaba07c78313) --- collects/typed-scheme/infer/constraints.rkt | 1 - collects/typed-scheme/infer/infer-unit.rkt | 2 +- collects/typed-scheme/private/parse-type.rkt | 2 +- collects/typed-scheme/private/with-types.rkt | 2 +- collects/typed-scheme/rep/type-rep.rkt | 2 +- collects/typed-scheme/typecheck/check-subforms-unit.rkt | 2 +- collects/typed-scheme/typecheck/provide-handling.rkt | 2 +- collects/typed-scheme/typecheck/tc-app.rkt | 2 +- collects/typed-scheme/typecheck/tc-envops.rkt | 2 +- collects/typed-scheme/typecheck/tc-expr-unit.rkt | 2 +- collects/typed-scheme/typecheck/tc-if.rkt | 2 +- collects/typed-scheme/typecheck/tc-lambda-unit.rkt | 2 +- collects/typed-scheme/typecheck/tc-let-unit.rkt | 4 ++-- collects/typed-scheme/typecheck/tc-structs.rkt | 2 +- collects/typed-scheme/typecheck/tc-subst.rkt | 2 +- collects/typed-scheme/typecheck/tc-toplevel.rkt | 2 +- collects/typed-scheme/types/abbrev.rkt | 6 +++--- collects/typed-scheme/types/convenience.rkt | 4 ++-- collects/typed-scheme/types/filter-ops.rkt | 4 ++-- collects/typed-scheme/types/remove-intersect.rkt | 2 +- 20 files changed, 24 insertions(+), 25 deletions(-) diff --git a/collects/typed-scheme/infer/constraints.rkt b/collects/typed-scheme/infer/constraints.rkt index 9b8b5048b12..853dba30e8d 100644 --- a/collects/typed-scheme/infer/constraints.rkt +++ b/collects/typed-scheme/infer/constraints.rkt @@ -6,7 +6,6 @@ (utils tc-utils) unstable/sequence unstable/hash "signatures.rkt" "constraint-structs.rkt" - unstable/debug racket/match racket/list) diff --git a/collects/typed-scheme/infer/infer-unit.rkt b/collects/typed-scheme/infer/infer-unit.rkt index 9ea79cec6a8..73d7703177b 100644 --- a/collects/typed-scheme/infer/infer-unit.rkt +++ b/collects/typed-scheme/infer/infer-unit.rkt @@ -14,7 +14,7 @@ racket/match mzlib/etc racket/trace racket/contract - unstable/sequence unstable/list unstable/debug unstable/hash + unstable/sequence unstable/list unstable/hash racket/list) (import dmap^ constraints^ promote-demote^) diff --git a/collects/typed-scheme/private/parse-type.rkt b/collects/typed-scheme/private/parse-type.rkt index 905c4ece646..d622ef9a576 100644 --- a/collects/typed-scheme/private/parse-type.rkt +++ b/collects/typed-scheme/private/parse-type.rkt @@ -7,7 +7,7 @@ syntax/stx (prefix-in c: scheme/contract) syntax/parse (env type-env-structs tvar-env type-name-env type-alias-env lexical-env index-env) - racket/match unstable/debug + racket/match (for-template scheme/base "colon.ss") ;; needed at this phase for tests (combine-in (prefix-in t: "base-types-extra.ss") "colon.ss") diff --git a/collects/typed-scheme/private/with-types.rkt b/collects/typed-scheme/private/with-types.rkt index 2733010b093..d334893dd6c 100644 --- a/collects/typed-scheme/private/with-types.rkt +++ b/collects/typed-scheme/private/with-types.rkt @@ -7,7 +7,7 @@ (prefix-in c: (combine-in racket/contract/regions racket/contract/base))) "extra-procs.rkt" "prims.rkt" syntax/parse racket/block racket/match - unstable/sequence unstable/debug "base-types-extra.rkt" + unstable/sequence "base-types-extra.rkt" (except-in (path-up "env/type-name-env.rkt" "env/type-alias-env.rkt" "infer/infer-dummy.rkt" diff --git a/collects/typed-scheme/rep/type-rep.rkt b/collects/typed-scheme/rep/type-rep.rkt index 7c542d4e5af..feb057b8e3d 100644 --- a/collects/typed-scheme/rep/type-rep.rkt +++ b/collects/typed-scheme/rep/type-rep.rkt @@ -4,7 +4,7 @@ (require (utils tc-utils) "rep-utils.rkt" "object-rep.rkt" "filter-rep.rkt" "free-variance.rkt" mzlib/trace racket/match mzlib/etc - scheme/contract unstable/debug + scheme/contract (for-syntax scheme/base syntax/parse)) (define name-table (make-weak-hasheq)) diff --git a/collects/typed-scheme/typecheck/check-subforms-unit.rkt b/collects/typed-scheme/typecheck/check-subforms-unit.rkt index 83b342898e7..d05954be312 100644 --- a/collects/typed-scheme/typecheck/check-subforms-unit.rkt +++ b/collects/typed-scheme/typecheck/check-subforms-unit.rkt @@ -3,7 +3,7 @@ (require "../utils/utils.rkt" syntax/kerncase syntax/parse - racket/match unstable/debug + racket/match "signatures.rkt" "tc-metafunctions.rkt" (types utils convenience union subtype) (utils tc-utils) diff --git a/collects/typed-scheme/typecheck/provide-handling.rkt b/collects/typed-scheme/typecheck/provide-handling.rkt index 980a4ac8fbb..3fc563fd152 100644 --- a/collects/typed-scheme/typecheck/provide-handling.rkt +++ b/collects/typed-scheme/typecheck/provide-handling.rkt @@ -11,7 +11,7 @@ (utils tc-utils) (for-syntax syntax/parse racket/base) racket/contract/private/provide unstable/list - unstable/debug syntax/id-table racket/dict + syntax/id-table racket/dict racket/syntax scheme/struct-info racket/match "def-binding.rkt" syntax/parse (for-template scheme/base "def-export.rkt" scheme/contract)) diff --git a/collects/typed-scheme/typecheck/tc-app.rkt b/collects/typed-scheme/typecheck/tc-app.rkt index f96c2282834..3f584640213 100644 --- a/collects/typed-scheme/typecheck/tc-app.rkt +++ b/collects/typed-scheme/typecheck/tc-app.rkt @@ -5,7 +5,7 @@ "tc-app-helper.rkt" "find-annotation.rkt" "tc-funapp.rkt" "tc-subst.rkt" (prefix-in c: racket/contract) syntax/parse racket/match racket/trace scheme/list - unstable/sequence unstable/debug unstable/list + unstable/sequence unstable/list ;; fixme - don't need to be bound in this phase - only to make tests work scheme/bool racket/unsafe/ops diff --git a/collects/typed-scheme/typecheck/tc-envops.rkt b/collects/typed-scheme/typecheck/tc-envops.rkt index de799dc420f..b438e3b21ee 100644 --- a/collects/typed-scheme/typecheck/tc-envops.rkt +++ b/collects/typed-scheme/typecheck/tc-envops.rkt @@ -12,7 +12,7 @@ (only-in (env type-env-structs lexical-env) env? update-type/lexical env-map env-props replace-props) scheme/contract racket/match - mzlib/trace unstable/debug unstable/struct + mzlib/trace unstable/struct (typecheck tc-metafunctions) (for-syntax scheme/base)) diff --git a/collects/typed-scheme/typecheck/tc-expr-unit.rkt b/collects/typed-scheme/typecheck/tc-expr-unit.rkt index 2462bec2d97..d42355a8e48 100644 --- a/collects/typed-scheme/typecheck/tc-expr-unit.rkt +++ b/collects/typed-scheme/typecheck/tc-expr-unit.rkt @@ -11,7 +11,7 @@ (only-in (infer infer) restrict) (except-in (utils tc-utils stxclass-util)) (env lexical-env type-env-structs tvar-env index-env) - racket/private/class-internal unstable/debug + racket/private/class-internal (except-in syntax/parse id) unstable/function (only-in srfi/1 split-at)) diff --git a/collects/typed-scheme/typecheck/tc-if.rkt b/collects/typed-scheme/typecheck/tc-if.rkt index f897a9b0a69..3a31c32d76a 100644 --- a/collects/typed-scheme/typecheck/tc-if.rkt +++ b/collects/typed-scheme/typecheck/tc-if.rkt @@ -10,7 +10,7 @@ (typecheck tc-envops tc-metafunctions) (types type-table) syntax/kerncase - racket/trace unstable/debug + racket/trace racket/match) ;; if typechecking diff --git a/collects/typed-scheme/typecheck/tc-lambda-unit.rkt b/collects/typed-scheme/typecheck/tc-lambda-unit.rkt index b7a45de271f..17772aa7244 100644 --- a/collects/typed-scheme/typecheck/tc-lambda-unit.rkt +++ b/collects/typed-scheme/typecheck/tc-lambda-unit.rkt @@ -15,7 +15,7 @@ (types abbrev utils) (env type-env-structs lexical-env tvar-env index-env) (utils tc-utils) - unstable/debug + racket/match) (require (for-template scheme/base "internal-forms.rkt")) diff --git a/collects/typed-scheme/typecheck/tc-let-unit.rkt b/collects/typed-scheme/typecheck/tc-let-unit.rkt index b9da5f9ab8d..4a92aca9753 100644 --- a/collects/typed-scheme/typecheck/tc-let-unit.rkt +++ b/collects/typed-scheme/typecheck/tc-let-unit.rkt @@ -8,11 +8,11 @@ (env lexical-env type-alias-env global-env type-env-structs) (rep type-rep) syntax/free-vars - ;racket/trace unstable/debug + ;racket/trace racket/match (prefix-in c: racket/contract) (except-in racket/contract -> ->* one-of/c) syntax/kerncase syntax/parse unstable/syntax - unstable/debug + (for-template racket/base "internal-forms.rkt")) diff --git a/collects/typed-scheme/typecheck/tc-structs.rkt b/collects/typed-scheme/typecheck/tc-structs.rkt index 7aa506ef5ae..6edcf4eca34 100644 --- a/collects/typed-scheme/typecheck/tc-structs.rkt +++ b/collects/typed-scheme/typecheck/tc-structs.rkt @@ -10,7 +10,7 @@ syntax/kerncase syntax/struct mzlib/trace - unstable/debug + racket/function racket/match (only-in racket/contract diff --git a/collects/typed-scheme/typecheck/tc-subst.rkt b/collects/typed-scheme/typecheck/tc-subst.rkt index f784ba05dcb..bb5582d2598 100644 --- a/collects/typed-scheme/typecheck/tc-subst.rkt +++ b/collects/typed-scheme/typecheck/tc-subst.rkt @@ -6,7 +6,7 @@ [->* -->*] [one-of/c -one-of/c]) (rep type-rep filter-rep rep-utils) scheme/list - scheme/contract racket/match unstable/match unstable/debug + scheme/contract racket/match unstable/match (for-syntax scheme/base) "tc-metafunctions.rkt") diff --git a/collects/typed-scheme/typecheck/tc-toplevel.rkt b/collects/typed-scheme/typecheck/tc-toplevel.rkt index 1e9cc7623e9..ae4a0a6efc8 100644 --- a/collects/typed-scheme/typecheck/tc-toplevel.rkt +++ b/collects/typed-scheme/typecheck/tc-toplevel.rkt @@ -2,7 +2,7 @@ (require (rename-in "../utils/utils.rkt" [infer r:infer]) syntax/kerncase - unstable/list racket/syntax syntax/parse unstable/debug + unstable/list racket/syntax syntax/parse mzlib/etc racket/match "signatures.rkt" diff --git a/collects/typed-scheme/types/abbrev.rkt b/collects/typed-scheme/types/abbrev.rkt index d5194b7bfa0..7e41e0db3fc 100644 --- a/collects/typed-scheme/types/abbrev.rkt +++ b/collects/typed-scheme/types/abbrev.rkt @@ -8,10 +8,10 @@ racket/list racket/match unstable/function - (except-in racket/contract ->* ->) - (prefix-in c: racket/contract) + (except-in racket/contract/base ->* ->) + (prefix-in c: racket/contract/base) (for-syntax racket/base syntax/parse) - (for-template racket/base racket/contract racket/promise racket/tcp racket/flonum) + (for-template racket/base racket/contract/base racket/promise racket/tcp racket/flonum) ;; for base type predicates racket/promise racket/tcp racket/flonum) diff --git a/collects/typed-scheme/types/convenience.rkt b/collects/typed-scheme/types/convenience.rkt index 3c76f116df5..7ff5ee56f9c 100644 --- a/collects/typed-scheme/types/convenience.rkt +++ b/collects/typed-scheme/types/convenience.rkt @@ -4,9 +4,9 @@ (utils tc-utils) "abbrev.rkt" "numeric-tower.rkt" (only-in scheme/contract current-blame-format) (types comparison printer union subtype utils substitute) - scheme/list racket/match scheme/promise + scheme/list racket/match (for-syntax syntax/parse scheme/base) - unstable/debug syntax/id-table scheme/dict + syntax/id-table scheme/dict racket/trace (for-template scheme/base)) diff --git a/collects/typed-scheme/types/filter-ops.rkt b/collects/typed-scheme/types/filter-ops.rkt index 7476a88f18c..3f7832bf0e4 100644 --- a/collects/typed-scheme/types/filter-ops.rkt +++ b/collects/typed-scheme/types/filter-ops.rkt @@ -5,9 +5,9 @@ (utils tc-utils) (only-in (infer infer) restrict) "abbrev.rkt" (only-in scheme/contract current-blame-format [-> -->] listof) (types comparison printer union subtype utils remove-intersect) - scheme/list racket/match scheme/promise + scheme/list racket/match (for-syntax syntax/parse scheme/base) - unstable/debug syntax/id-table scheme/dict + syntax/id-table scheme/dict racket/trace (for-template scheme/base)) diff --git a/collects/typed-scheme/types/remove-intersect.rkt b/collects/typed-scheme/types/remove-intersect.rkt index 554a89b9f50..f65229821f2 100644 --- a/collects/typed-scheme/types/remove-intersect.rkt +++ b/collects/typed-scheme/types/remove-intersect.rkt @@ -3,7 +3,7 @@ (require "../utils/utils.rkt" (rep type-rep rep-utils) (types union subtype resolve convenience utils) - racket/match mzlib/trace unstable/debug) + racket/match mzlib/trace) (provide (rename-out [*remove remove]) overlap) From 4380e6d01ccc7388ecd8e1b78e1bfb5acf59dac3 Mon Sep 17 00:00:00 2001 From: Sam Tobin-Hochstadt Date: Mon, 18 Apr 2011 20:54:17 -0400 Subject: [PATCH 175/441] Use eq? on sequence numbers. (cherry picked from commit 0f30f5d8de67bb80f4873a25228afbd7069d2ad1) --- collects/typed-scheme/types/filter-ops.rkt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collects/typed-scheme/types/filter-ops.rkt b/collects/typed-scheme/types/filter-ops.rkt index 3f7832bf0e4..7621c2a7b18 100644 --- a/collects/typed-scheme/types/filter-ops.rkt +++ b/collects/typed-scheme/types/filter-ops.rkt @@ -146,7 +146,7 @@ (case-lambda [() -top] [(f) f] [fs (make-AndFilter fs)])) - (let loop ([fs (remove-duplicates args equal? #:key Rep-seq)] [result null]) + (let loop ([fs (remove-duplicates args eq? #:key Rep-seq)] [result null]) (if (null? fs) (match result [(list) -top] From 5255446653ce4e46aa946e78154768c38ef929a7 Mon Sep 17 00:00:00 2001 From: Sam Tobin-Hochstadt Date: Mon, 18 Apr 2011 20:54:45 -0400 Subject: [PATCH 176/441] Add cache for `resolve-once'. Substantial speedups on "new-metrics.rkt" test. (cherry picked from commit 79061150efbc304ac6b9c3f74ba0ac0df342857e) --- collects/typed-scheme/types/resolve.rkt | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/collects/typed-scheme/types/resolve.rkt b/collects/typed-scheme/types/resolve.rkt index 73767a04aec..8ece6d6bc9a 100644 --- a/collects/typed-scheme/types/resolve.rkt +++ b/collects/typed-scheme/types/resolve.rkt @@ -1,7 +1,7 @@ #lang scheme/base (require "../utils/utils.rkt") -(require (rep type-rep) +(require (rep type-rep rep-utils) (env type-name-env) (utils tc-utils) (types utils) @@ -46,12 +46,20 @@ (define (needs-resolving? t) (or (Mu? t) (App? t) (Name? t))) +(define resolver-cache (make-hasheq)) + (define (resolve-once t) - (match t - [(Mu: _ _) (unfold t)] - [(App: r r* s) - (resolve-app r r* s)] - [(Name: _) (resolve-name t)])) + (define seq (Rep-seq t)) + (define r (hash-ref resolver-cache seq #f)) + (or r + (let ([r* (match t + [(Mu: _ _) (unfold t)] + [(App: r r* s) + (resolve-app r r* s)] + [(Name: _) (resolve-name t)])]) + (when r* + (hash-set! resolver-cache seq r*)) + r*))) (define (resolve t) (if (needs-resolving? t) (resolve-once t) t)) From 6a906b01b0a010d6ca6682564384b03310e68db2 Mon Sep 17 00:00:00 2001 From: Sam Tobin-Hochstadt Date: Tue, 19 Apr 2011 15:46:19 -0400 Subject: [PATCH 177/441] Add debugging parameter, and wrappers for unstable/debug. (cherry picked from commit eaa63f2d1ef6c0fdec45b504aa6f2f7bcd07b2b5) --- collects/typed-scheme/tc-setup.rkt | 3 ++- collects/typed-scheme/utils/utils.rkt | 8 ++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/collects/typed-scheme/tc-setup.rkt b/collects/typed-scheme/tc-setup.rkt index 04f05fdb096..0fc8b3013d8 100644 --- a/collects/typed-scheme/tc-setup.rkt +++ b/collects/typed-scheme/tc-setup.rkt @@ -57,7 +57,8 @@ (do-time "Local Expand Done") (parameterize ([mutated-vars (find-mutated-vars fully-expanded-stx)] [orig-module-stx (or (orig-module-stx) orig-stx)] - [expanded-module-stx fully-expanded-stx]) + [expanded-module-stx fully-expanded-stx] + [debugging? #f]) (let ([result (checker fully-expanded-stx)]) (do-time "Typechecking Done") . body))))))) diff --git a/collects/typed-scheme/utils/utils.rkt b/collects/typed-scheme/utils/utils.rkt index 47712145bf9..2ac08d1f8f7 100644 --- a/collects/typed-scheme/utils/utils.rkt +++ b/collects/typed-scheme/utils/utils.rkt @@ -7,11 +7,11 @@ at least theoretically. (require (for-syntax racket/base syntax/parse racket/string) racket/contract racket/require-syntax - racket/provide-syntax racket/unit + racket/provide-syntax racket/unit (prefix-in d: unstable/debug) racket/pretty mzlib/pconvert syntax/parse) ;; to move to unstable -(provide reverse-begin list-update list-set) +(provide reverse-begin list-update list-set debugf debugging? dprintf) (provide ;; optimization @@ -226,3 +226,7 @@ at least theoretically. (if (zero? k) (cons v (cdr l)) (cons (car l) (list-set (cdr l) (sub1 k) v)))) + +(define debugging? (make-parameter #f)) +(define-syntax-rule (debugf f . args) (if (debugging?) (d:debugf f . args) (f . args))) +(define (dprintf . args) (when (debugging?) (apply d:dprintf args))) From a191a15bca1528315fc631650f4704dedf580191 Mon Sep 17 00:00:00 2001 From: Sam Tobin-Hochstadt Date: Tue, 19 Apr 2011 18:30:19 -0400 Subject: [PATCH 178/441] Add clever comments. (cherry picked from commit 6c17b01f99473deecea91ffe3435fd6b11819f37) --- collects/typed-scheme/types/abbrev.rkt | 1 + collects/typed-scheme/types/union.rkt | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/collects/typed-scheme/types/abbrev.rkt b/collects/typed-scheme/types/abbrev.rkt index 7e41e0db3fc..397f56c4714 100644 --- a/collects/typed-scheme/types/abbrev.rkt +++ b/collects/typed-scheme/types/abbrev.rkt @@ -62,6 +62,7 @@ (foldr -pair b l)) (define (untuple t) + ;; FIXME - do we really need resolution here? (match (resolve t) [(Value: '()) null] [(Pair: a b) (cond [(untuple b) => (lambda (l) (cons a l))] diff --git a/collects/typed-scheme/types/union.rkt b/collects/typed-scheme/types/union.rkt index 35a81a51b21..4b2590111e7 100644 --- a/collects/typed-scheme/types/union.rkt +++ b/collects/typed-scheme/types/union.rkt @@ -39,7 +39,8 @@ (let ([types (remove-dups (sort (apply append (map flat args)) type Date: Tue, 19 Apr 2011 18:30:42 -0400 Subject: [PATCH 179/441] Add type keys for Struct and StructTop. (cherry picked from commit fe60793b4de78f80e0f12605e9853b6ab6638a6d) --- collects/typed-scheme/rep/type-rep.rkt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/collects/typed-scheme/rep/type-rep.rkt b/collects/typed-scheme/rep/type-rep.rkt index feb057b8e3d..37feedd2755 100644 --- a/collects/typed-scheme/rep/type-rep.rkt +++ b/collects/typed-scheme/rep/type-rep.rkt @@ -292,7 +292,7 @@ pred-id cert maker-id)] - [#:key #f]) + [#:key 'struct]) ;; A structure type descriptor ;; s : struct @@ -304,7 +304,7 @@ (dt VectorTop () [#:fold-rhs #:base] [#:key 'vector]) (dt HashtableTop () [#:fold-rhs #:base] [#:key 'hash]) (dt MPairTop () [#:fold-rhs #:base] [#:key 'mpair]) -(dt StructTop ([name Struct?]) [#:key #f]) +(dt StructTop ([name Struct?]) [#:key 'struct]) ;; v : Scheme Value (dt Value (v) [#:frees #f] [#:fold-rhs #:base] [#:key (cond [(number? v) 'number] From cf5516849630f6d28b59619e32e43bb2ff9c751c Mon Sep 17 00:00:00 2001 From: Sam Tobin-Hochstadt Date: Tue, 19 Apr 2011 18:33:28 -0400 Subject: [PATCH 180/441] Use `in-hash' explicitly. (cherry picked from commit d459ad47b897fed0c106f78f357744c2558f7819) --- collects/typed-scheme/types/substitute.rkt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collects/typed-scheme/types/substitute.rkt b/collects/typed-scheme/types/substitute.rkt index e5fcc5abfc3..3cedb1f2f9e 100644 --- a/collects/typed-scheme/types/substitute.rkt +++ b/collects/typed-scheme/types/substitute.rkt @@ -142,7 +142,7 @@ ;; subst-all : substitution Type -> Type (d/c (subst-all s t) (substitution/c Type? . -> . Type?) - (for/fold ([t t]) ([(v r) s]) + (for/fold ([t t]) ([(v r) (in-hash s)]) (match r [(t-subst img) (substitute img v t)] From f858496f14854df9600806884d468c0bfe7bd37f Mon Sep 17 00:00:00 2001 From: Sam Tobin-Hochstadt Date: Tue, 19 Apr 2011 18:35:55 -0400 Subject: [PATCH 181/441] Avoid resolving types when checking subtyping on structs. This fixes problems with caching, because sometimes we were giving the wrong answer for nested calls to `subtype'. (cherry picked from commit 82e6e9d19eb277be03ffd7b91d4549a61bcd723a) --- collects/typed-scheme/types/subtype.rkt | 43 +++++++++++++++++++++++-- 1 file changed, 41 insertions(+), 2 deletions(-) diff --git a/collects/typed-scheme/types/subtype.rkt b/collects/typed-scheme/types/subtype.rkt index c182d8752c6..e76654ceec8 100644 --- a/collects/typed-scheme/types/subtype.rkt +++ b/collects/typed-scheme/types/subtype.rkt @@ -195,6 +195,13 @@ [else (make-arr (apply map (lambda args (make-Union (sort args type List[(cons Number Number)] ;; potentially raises exn:subtype, when the algorithm fails @@ -236,6 +263,18 @@ [((Value: v) (Base: _ _ pred _)) (if (pred v) A0 (fail! s t))] ;; tvars are equal if they are the same variable [((F: t) (F: t*)) (if (eq? t t*) A0 (fail! s t))] + ;; Avoid needing to resolve things that refer to different structs. + ;; Saves us from non-termination + ;; Must happen *before* the sequence cases, which sometimes call `resolve' in match expanders + [((or (? Struct? s1) (NameStruct: s1)) (or (? Struct? s2) (NameStruct: s2))) + (=> unmatch) + (cond [(unrelated-structs s1 s2) + (dprintf "found unrelated structs: ~a ~a\n" s1 s2) + (fail! s t)] + [else (unmatch)])] + ;; just checking if s/t is a struct misses recursive/union/etc cases + [((? (lambda (_) (eq? ks 'struct))) (Base: _ _ _ _)) (fail! s t)] + [((Base: _ _ _ _) (? (lambda (_) (eq? kt 'struct)))) (fail! s t)] ;; sequences are covariant [((Sequence: ts) (Sequence: ts*)) (subtypes* A0 ts ts*)] @@ -328,7 +367,7 @@ [((Hashtable: _ _) (HashtableTop:)) A0] ;; subtyping on structs follows the declared hierarchy [((Struct: nm (? Type? parent) flds proc _ _ _ _) other) - ;(printf "subtype - hierarchy : ~a ~a ~a\n" nm parent other) + ;(dprintf "subtype - hierarchy : ~a ~a ~a\n" nm parent other) (subtype* A0 parent other)] ;; Promises are covariant [((Struct: (== promise-sym) _ (list t) _ _ _ _ _) (Struct: (== promise-sym) _ (list t*) _ _ _ _ _)) (subtype* A0 t t*)] @@ -354,7 +393,7 @@ (cond [(assq n s) => (lambda (spec) (subtype* A (cadr spec) m))] [else (fail! s t)]))] ;; otherwise, not a subtype - [(_ _) (fail! s t) #;(printf "failed")])))])))) + [(_ _) (fail! s t) #;(dprintf "failed")])))])))) (define (type-compare? a b) (and (subtype a b) (subtype b a))) From 5957da6bd9bc604a7420bfd3d2c7ffd2e0d3e75b Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Wed, 20 Apr 2011 14:25:53 -0600 Subject: [PATCH 182/441] fix typos (cherry picked from commit 499800d96e353b81a87059326fa1a1de5ea303f0) --- collects/scribblings/reference/class.scrbl | 17 +++++++++-------- .../scribblings/reference/serialization.scrbl | 2 +- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/collects/scribblings/reference/class.scrbl b/collects/scribblings/reference/class.scrbl index d7e04ac10da..f00e97203cf 100644 --- a/collects/scribblings/reference/class.scrbl +++ b/collects/scribblings/reference/class.scrbl @@ -1,8 +1,9 @@ #lang scribble/doc @(require "mz.ss" racket/class - (for-syntax racket/base) - (for-label racket/trait)) + (for-syntax racket/base + racket/serialize + racket/trait)) @(begin @@ -369,7 +370,7 @@ calling subclass augmentations of methods (see @defform[(class superclass-expr class-clause ...)]{ -Like @scheme[class*], but omits the @scheme[interface-expr]s, for the case that none are needed. +Like @scheme[class*], but omits the @scheme[_interface-expr]s, for the case that none are needed. @defexamples[ #:eval class-eval @@ -639,20 +640,20 @@ Each @scheme[public], @scheme[override], @scheme[augment], @scheme[public-final], @scheme[override-final], @scheme[augment-final], and @scheme[private] clause in a class declares one or more method names. Each method name must have a -corresponding @scheme[method-definition]. The order of +corresponding @scheme[_method-definition]. The order of @scheme[public], @|etc|, clauses and their corresponding definitions (among themselves, and with respect to other clauses in the class) does not matter. As shown in the grammar for @scheme[class*], a method definition is syntactically restricted to certain procedure forms, as defined by the -grammar for @scheme[method-procedure]; in the last two forms of -@scheme[method-procedure], the body @scheme[id] must be one of the +grammar for @scheme[_method-procedure]; in the last two forms of +@scheme[_method-procedure], the body @scheme[id] must be one of the @scheme[id]s bound by @scheme[let-values] or @scheme[letrec-values]. A -@scheme[method-procedure] expression is not evaluated +@scheme[_method-procedure] expression is not evaluated directly. Instead, for each method, a class-specific method procedure is created; it takes an initial object argument, in addition to the -arguments the procedure would accept if the @scheme[method-procedure] +arguments the procedure would accept if the @scheme[_method-procedure] expression were evaluated directly. The body of the procedure is transformed to access methods and fields through the object argument. diff --git a/collects/scribblings/reference/serialization.scrbl b/collects/scribblings/reference/serialization.scrbl index 3a7ffa4d64c..09344bc7b82 100644 --- a/collects/scribblings/reference/serialization.scrbl +++ b/collects/scribblings/reference/serialization.scrbl @@ -110,7 +110,7 @@ elements: @tech{unreadable symbol}. These two are used with either @scheme[namespace-variable-binding] or @scheme[dynamic-require] to obtain deserialization information. See - @scheme[make-deserialization-info] for more information on the + @scheme[make-deserialize-info] for more information on the binding's value. See also @scheme[deserialize-module-guard].} @item{A non-negative exact integer, @scheme[_g-count] that represents the From 1601f8b73edf8acedf87e9f4b2cb99f6971e2827 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Wed, 20 Apr 2011 14:25:58 -0600 Subject: [PATCH 183/441] fix gc of ps/pdf/svg cairo-surface stream (cherry picked from commit aed7bdf0c9cd2080911bdf732c4f2e52d2603004) --- collects/racket/draw/unsafe/cairo.rkt | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/collects/racket/draw/unsafe/cairo.rkt b/collects/racket/draw/unsafe/cairo.rkt index dfa1d93e5d4..876596ccdb6 100644 --- a/collects/racket/draw/unsafe/cairo.rkt +++ b/collects/racket/draw/unsafe/cairo.rkt @@ -279,9 +279,11 @@ (lambda (proc w h) (let* ([new-proc (lambda (null bytes len) (proc bytes len))] + [free-cell-box (box #f)] [s (p new-proc #f w h)] - [b (malloc-immobile-cell new-proc)]) - (cairo_surface_set_user_data s cell-key b free-immobile-cell) + [b (malloc-immobile-cell (cons new-proc free-cell-box))]) + (parameterize ([current-sud-box free-cell-box]) + (cairo_surface_set_user_data s cell-key b free-immobile-cell)) s))))) (define-cairo cairo_ps_surface_create_for_stream _stream-surface-proc @@ -293,8 +295,11 @@ _stream-surface-proc #:wrap stream-surface-allocator) +(define current-sud-box (make-parameter #f)) (define-cairo cairo_surface_set_user_data - (_fun _cairo_surface_t _pointer _pointer (_fun #:atomic? #t _pointer -> _void) + (_fun _cairo_surface_t _pointer _pointer + (_fun #:atomic? #t #:keep (lambda (v) (set-box! (current-sud-box) v)) + _pointer -> _void) -> _int)) (define-cairo cairo_ps_surface_set_eps (_fun _cairo_surface_t _bool -> _void) From 45d06c58a65fc201a6f165f0d870c27992d6b0ce Mon Sep 17 00:00:00 2001 From: Sam Tobin-Hochstadt Date: Thu, 21 Apr 2011 00:20:37 -0400 Subject: [PATCH 184/441] Fix undocumented binding. (cherry picked from commit 295cb191cffbfdf0cc4bfd3840994d45cef9747c) --- collects/typed-scheme/scribblings/ts-reference.scrbl | 1 + 1 file changed, 1 insertion(+) diff --git a/collects/typed-scheme/scribblings/ts-reference.scrbl b/collects/typed-scheme/scribblings/ts-reference.scrbl index 196e9ebef85..af6677c8264 100644 --- a/collects/typed-scheme/scribblings/ts-reference.scrbl +++ b/collects/typed-scheme/scribblings/ts-reference.scrbl @@ -84,6 +84,7 @@ default in Racket. @defidform[PRegexp] @defidform[Bytes] @defidform[Namespace] +@defidform[Null] @defidform[EOF] @defidform[Continuation-Mark-Set] @defidform[Char] From 4895b6fe267a63c3d4c91d8e2bfea05eaab68576 Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Thu, 21 Apr 2011 19:37:08 -0500 Subject: [PATCH 185/441] added in recent changes (cherry picked from commit 8655c4a55e50b79b914e04c2c0b4f95c3a56d756) --- doc/release-notes/drracket/HISTORY.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/release-notes/drracket/HISTORY.txt b/doc/release-notes/drracket/HISTORY.txt index 92e3e0e8547..f698f2a0b4a 100644 --- a/doc/release-notes/drracket/HISTORY.txt +++ b/doc/release-notes/drracket/HISTORY.txt @@ -4,6 +4,12 @@ . Removed the "DrScheme" compatability program. + . Improved the speed of the module browser drawing + + . Added search to the standalone module browser window + + . Minor bug fixes + ------------------------------ Version 5.1 ------------------------------ From 548866996ff72179539567a699da918a14bb530f Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Thu, 21 Apr 2011 19:38:30 -0500 Subject: [PATCH 186/441] removed drscheme man page merge to release branch (cherry picked from commit 22e08dde07c78c3315e6217876c8f4e0298b9e89) --- man/man1/drscheme.1 | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100644 man/man1/drscheme.1 diff --git a/man/man1/drscheme.1 b/man/man1/drscheme.1 deleted file mode 100644 index 371e88ba883..00000000000 --- a/man/man1/drscheme.1 +++ /dev/null @@ -1,24 +0,0 @@ -.\" dummy line -.TH DRSCHEME 1 "May 2010" -.UC 4 -.SH NAME -drscheme \- the Racket programming environment -.SH SYNOPSIS -.B drscheme -[ -.I Xoption ... -] -[ -.I file ... -] -.SH DESCRIPTION -DrScheme is the old name for the Racket programming environment. - -.PP -Running -.B drscheme -is the same as running -.BR drracket . - -.SH SEE ALSO -.BR drracket(1) From 61f3f31b0a2376b917ee31a95f5f593d292310b5 Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Thu, 21 Apr 2011 21:37:35 -0500 Subject: [PATCH 187/441] fixed a bug in the way PR 11775 was fixed related to PR 11775 pls. merge to release branch (cherry picked from commit 7f9bd528573ddbe5c3b4607e0b9d842e93662427) --- collects/test-engine/test-engine.rkt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/collects/test-engine/test-engine.rkt b/collects/test-engine/test-engine.rkt index 6e9dbb983a5..0f7c388594e 100644 --- a/collects/test-engine/test-engine.rkt +++ b/collects/test-engine/test-engine.rkt @@ -143,6 +143,7 @@ (define display-event-space #f) (define silent-mode #t) (define test-run-since-last-display? #f) + (define first-test-since-run? #t) (super-instantiate ()) @@ -153,6 +154,7 @@ (define/public (add-analysis a) (send test-info add-analysis a)) (define/public (setup-info style) + (set! first-test-since-run? #t) (set! test-info (make-object (info-class) style))) (define/pubment (setup-display cur-rep event-space) (set! test-display (make-object display-class cur-rep)) @@ -173,7 +175,8 @@ (define/public (summarize-results port) (cond - ((not test-run-since-last-display?)) + ((and (not test-run-since-last-display?) + (not first-test-since-run?))) ((test-execute) (unless test-display (setup-display #f #f)) (send test-display install-info test-info) @@ -191,6 +194,7 @@ (display-results display-rep display-event-space)])))) (else (display-disabled port))) + (set! first-test-since-run? #f) (set! test-run-since-last-display? #f)) (define/private (display-success port event-space count) From fef878523ee42a769cbc50ff5cdd0a4ba14c22fb Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Thu, 21 Apr 2011 23:33:07 -0400 Subject: [PATCH 188/441] Fix typo (cherry picked from commit 3f94c3dcfc609de6eadf41e2495a0cb77a2b0b09) --- collects/meta/web/www/index.rkt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/collects/meta/web/www/index.rkt b/collects/meta/web/www/index.rkt index 82f8917aeea..ea9d7f7ddde 100644 --- a/collects/meta/web/www/index.rkt +++ b/collects/meta/web/www/index.rkt @@ -56,9 +56,9 @@ @code{#lang web-server/insta ;; A "hello world" web server (define (start request) - (response/xexpr) - '(html - (body "Hello World")))} + (response/xexpr + '(html + (body "Hello World"))))} @desc{This example implements a web server using the @elemcode{web-server/insta} language. Each time a connection is made to the server, the @elemcode{start} function is called to get the HTML to From 72aae5241afc3d7e78e4ee2f04b76d19a602b475 Mon Sep 17 00:00:00 2001 From: John Clements Date: Fri, 22 Apr 2011 14:27:56 -0700 Subject: [PATCH 189/441] updates to history merge to 5.1.1 release (cherry picked from commit b228316a8ad6c7f4676dc71dc95e8eb2523732bd) --- collects/tests/stepper/manual-tests.txt | 2 -- doc/release-notes/stepper/HISTORY.txt | 5 +++++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/collects/tests/stepper/manual-tests.txt b/collects/tests/stepper/manual-tests.txt index b72d6949d7c..4b92518e407 100644 --- a/collects/tests/stepper/manual-tests.txt +++ b/collects/tests/stepper/manual-tests.txt @@ -10,8 +10,6 @@ warning when the program window disappears. Try stepping backward and forward through programs with correct and erroneous (syntax errors, runtime errors) executions. -Test programs with syntax errors - Try programs which print snips (print-convert-test.ss) try programs that contain test cases; make sure that the popups behave sensibly. diff --git a/doc/release-notes/stepper/HISTORY.txt b/doc/release-notes/stepper/HISTORY.txt index c47a687563f..640c6e0320d 100644 --- a/doc/release-notes/stepper/HISTORY.txt +++ b/doc/release-notes/stepper/HISTORY.txt @@ -1,5 +1,10 @@ Stepper ------- + +Changes for v5.1.1: + +None. + Changes for v5.1: Quite a bit of rackety, retabbing, refactoring. There's no longer a closure From baca1d620baa58d8b440957e552858b449527258 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Sat, 23 Apr 2011 08:12:56 -0400 Subject: [PATCH 190/441] Fix the bgcolor on the mailman pages. IE misparses a three-digit specification, so use 6 digits there. (cherry picked from commit 7f57fcec7e850e5516b65f515add19b1704c6f63) --- collects/meta/web/stubs/mailman.rkt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collects/meta/web/stubs/mailman.rkt b/collects/meta/web/stubs/mailman.rkt index 705c71fe241..ec5af6a810b 100644 --- a/collects/meta/web/stubs/mailman.rkt +++ b/collects/meta/web/stubs/mailman.rkt @@ -28,7 +28,7 @@ }}) (define (subp . body) (apply div class: 'subp body)) -(define (graytd . body) (apply td bgcolor: "#ddd" body)) +(define (graytd . body) (apply td bgcolor: "#dddddd" body)) (define listinfo @page[#:title @list{Mailing lists: @MM{List-Name}} From aba5580b80e535f74f3f213dbf0b0cd3abe0fe13 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Sat, 23 Apr 2011 08:41:15 -0400 Subject: [PATCH 191/441] Add `-j 1' to builds, and `--disable-libffi' to configure. (cherry picked from commit 22603f3f15e761f3c26b74ec52dc5430f952f8fb) --- collects/meta/build/build | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/collects/meta/build/build b/collects/meta/build/build index 4573527f551..bc2353c8711 100755 --- a/collects/meta/build/build +++ b/collects/meta/build/build @@ -1121,7 +1121,7 @@ DO_BUILD() { # inputs -- releasing if [[ "$renice" != "" ]]; then dont_exit _run renice "$renice" "$$"; fi export PLTHOME="$workdir/$installdir" PATH="$PLTHOME/bin:$PATH" - export SETUP_ARGS="-N raco -l- raco setup -U" + export SETUP_ARGS="-N raco -l- raco setup -j 1 -U" # make sure we don't use any planet caches (PLTPLANETDIR is set globally) _rm "$PLTPLANETDIR" @@ -1156,7 +1156,9 @@ DO_BUILD() { # inputs -- releasing else _mcd "$PLTHOME/src/build" machineget LDFLAGS; export LDFLAGS - build_step "configure" ../configure ${configure_args} + # use --disable-libffi so we get the internal copy to build and link + # since not all distros have libffi + build_step "configure" ../configure --disable-libffi ${configure_args} build_step "make both" make both build_step "make install" make plain-install-both build_step "raco setup" "$PLTHOME/bin/racket" $SETUP_ARGS From 498b5d5bf5e292853f77bf32bfb0c86b024f4709 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Sat, 23 Apr 2011 08:51:05 -0400 Subject: [PATCH 192/441] Disable xdg-open, since it seems like it suffers from the same problem gnome-open does. Relevant (but not really a solution) to PR 11869. (cherry picked from commit 020946cb2af57a4948ea40f25657c876beeafaab) --- collects/net/sendurl.rkt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collects/net/sendurl.rkt b/collects/net/sendurl.rkt index 6728deca50d..70c60a04716 100644 --- a/collects/net/sendurl.rkt +++ b/collects/net/sendurl.rkt @@ -18,7 +18,7 @@ ;; order matters: the default will be the first of these that is found (define all-unix-browsers '(;; common browsers - xdg-open + ;; xdg-open firefox google-chrome galeon opera mozilla konqueror seamonkey epiphany ;; known browsers camino skipstone From 4f1faf5617d048eced52c9b6eb386f255db70ca8 Mon Sep 17 00:00:00 2001 From: Casey Klein Date: Fri, 22 Apr 2011 04:42:24 -0500 Subject: [PATCH 193/441] Updates Redex history for v5.1.1 release (cherry picked from commit 0414b5e6de771ca05b9a3acba267052ba3168205) --- doc/release-notes/redex/HISTORY.txt | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/doc/release-notes/redex/HISTORY.txt b/doc/release-notes/redex/HISTORY.txt index 5e477c17d9f..1ff0e43d84d 100644 --- a/doc/release-notes/redex/HISTORY.txt +++ b/doc/release-notes/redex/HISTORY.txt @@ -1,3 +1,31 @@ +v5.1.1 + + * changed pattern language to disallow unquote + + * fixed matching of ..._x and ..._!_x within ellipses + + * fixed bugs in stepper's diff highlighting + + * improved rendering of arrows in typesetting + + * added support for unioned metafunction codomains + + * fixed typesetting of the pattern (hole p_0 p_1 ...) + + * added arrow->pict, which shows how reduction relation are rendered + in typesetting + + * added a parameter that provides the default for redex-check's + #:attempts argument + + * changed the random term generator to produce shorter sequences + + * added a Redex model of the system in Jay McCarthy's ICFP '09 paper + "Automatically RESTful Web Applications Or, Marking Modular + Serializable Continuations" to the examples directory + + * resolved PRs 10665, 11174, 11579, 11041, 10837, and 11853 + v5.1 * adds an optional #:pred keyword argument to `test-->>' form From 07269cd0b61e90b3c29cc314ad4583375500653f Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sun, 24 Apr 2011 16:35:12 -0600 Subject: [PATCH 194/441] x86 JIT: keep call & ret paired even for a non-tail call from native code to native code; this change provides huge performance improvements for some microbenchmarks Merge to 5.1.1 (cherry picked from commit ac5d4cd40106dbd9e540494b5270354050a00181) --- src/racket/src/jitcall.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/racket/src/jitcall.c b/src/racket/src/jitcall.c index fbe44aa48de..42ddcf7117f 100644 --- a/src/racket/src/jitcall.c +++ b/src/racket/src/jitcall.c @@ -614,15 +614,26 @@ int scheme_generate_non_tail_call(mz_jit_state *jitter, int num_rands, int direc /* Fast inlined-native jump ok (proc will check argc, if necessary) */ { GC_CAN_IGNORE jit_insn *refr; +#ifdef MZ_USE_JIT_I386 + GC_CAN_IGNORE jit_insn *refxr; +#endif if (num_rands < 0) { /* We need to save argc to manually pop the runstack. So move V1 to R2 and move R0 to V1: */ jit_movr_p(JIT_R2, JIT_V1); jit_movr_p(JIT_V1, JIT_R0); } - refr = jit_patchable_movi_p(JIT_R1, jit_forward()); jit_shuffle_saved_regs(); /* maybe copies V registers to be restored */ +#ifdef MZ_USE_JIT_I386 + /* keep call & ret paired by jumping to where we really + want to return,then back here: */ + refr = jit_jmpi(jit_forward()); + refxr = _jit.x.pc; + jit_base_prolog(); +#else + refr = jit_patchable_movi_p(JIT_R1, jit_forward()); _jit_prolog_again(jitter, 3, JIT_R1); /* saves V registers (or copied V registers) */ +#endif if (num_rands >= 0) { if (nontail_self) { jit_movr_p(JIT_R1, JIT_R0); } jit_movr_p(JIT_R0, JIT_V1); /* closure */ @@ -661,7 +672,12 @@ int scheme_generate_non_tail_call(mz_jit_state *jitter, int num_rands, int direc /* self-call function pointer is in R1 */ jit_jmpr(JIT_R1); } +#ifdef MZ_USE_JIT_I386 + mz_patch_ucbranch(refr); + (void)jit_calli(refxr); +#else jit_patch_movi(refr, (_jit.x.pc)); +#endif jit_unshuffle_saved_regs(); /* maybe uncopies V registers */ /* If num_rands < 0, then V1 has argc */ } From 8061414c1a1519076e98019b7e6b65601c20cf43 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sun, 24 Apr 2011 19:05:07 -0600 Subject: [PATCH 195/441] fix configure error that can cause CFLAGS to be ignored Merge to 5.1.1 (cherry picked from commit 4aabaeb7af40006c882eb71ffb830ab6ba7ac157) --- src/configure | 2 +- src/racket/configure.ac | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/configure b/src/configure index ed1af281db1..84f8cddb4fc 100755 --- a/src/configure +++ b/src/configure @@ -5201,7 +5201,7 @@ echo "${ECHO_T}$have_libffi" >&6; } else CFLAGS="${OLD_CFLAGS}" PREFLAGS="${PREFLAGS} ${libffi_config_preflags}" - CFLAGS="${COMPFLAGS} ${libffi_config_cflags}" + COMPFLAGS="${COMPFLAGS} ${libffi_config_cflags}" echo "Using installed libffi" OWN_LIBFFI="OFF" fi diff --git a/src/racket/configure.ac b/src/racket/configure.ac index 270737f6ce2..6fe1caf674b 100644 --- a/src/racket/configure.ac +++ b/src/racket/configure.ac @@ -896,7 +896,7 @@ if test "${enable_libffi}" = "yes" ; then else CFLAGS="${OLD_CFLAGS}" PREFLAGS="${PREFLAGS} ${libffi_config_preflags}" - CFLAGS="${COMPFLAGS} ${libffi_config_cflags}" + COMPFLAGS="${COMPFLAGS} ${libffi_config_cflags}" echo "Using installed libffi" OWN_LIBFFI="OFF" fi From 8e723f1721559b5eb37ede50d0b6dacc5292176a Mon Sep 17 00:00:00 2001 From: Matthias Felleisen Date: Fri, 18 Feb 2011 13:32:28 -0500 Subject: [PATCH 196/441] open output files in text mode (cherry picked from commit 88e0631c7184e5873a1407c7f1cb4289b1588b4c) --- collects/2htdp/batch-io.rkt | 1 + 1 file changed, 1 insertion(+) diff --git a/collects/2htdp/batch-io.rkt b/collects/2htdp/batch-io.rkt index 663d0873886..b4af5603681 100644 --- a/collects/2htdp/batch-io.rkt +++ b/collects/2htdp/batch-io.rkt @@ -124,6 +124,7 @@ (let ([result (not (file-exists? f))]) (with-output-to-file f (lambda () (printf "~a" str)) + #:mode 'text #:exists 'replace) f)) From bd94b49c0dcc1a0ccbce4eafe9c88154f4a9fa48 Mon Sep 17 00:00:00 2001 From: Matthias Felleisen Date: Mon, 25 Apr 2011 11:05:18 -0400 Subject: [PATCH 197/441] critical bug fix in registration process; please propagate (cherry picked from commit f2a475eb43a894d27aa8c230e8e47cbc154e4b85) --- collects/2htdp/private/check-aux.rkt | 3 ++- collects/2htdp/private/universe.rkt | 6 +++--- collects/2htdp/uchat/server.rkt | 10 +++++----- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/collects/2htdp/private/check-aux.rkt b/collects/2htdp/private/check-aux.rkt index 35a0408e35e..896ae61614f 100644 --- a/collects/2htdp/private/check-aux.rkt +++ b/collects/2htdp/private/check-aux.rkt @@ -136,7 +136,8 @@ ;; InPort OutPort (U #f String) -> Void ;; register with the server (define (tcp-register in out name) - (tcp-send out `(REGISTER ((name ,(if name name (symbol->string (gensym 'world))))))) + (define msg `(REGISTER ((name ,(if name name (symbol->string (gensym 'world))))))) + (tcp-send out msg) (define ackn (tcp-receive in)) (unless (equal? ackn '(OKAY)) (raise tcp-eof))) diff --git a/collects/2htdp/private/universe.rkt b/collects/2htdp/private/universe.rkt index 5e77845d5c0..f4eca8f3783 100644 --- a/collects/2htdp/private/universe.rkt +++ b/collects/2htdp/private/universe.rkt @@ -234,9 +234,9 @@ ;; IPort OPort Sexp -> IWorld (define (create-iworld i o info) - (if (and (pair? info) (string? (car info))) - (make-iworld i o (car info) (cdr info)) - (make-iworld i o (symbol->string (gensym 'iworld)) info))) + (if (string? info) + (make-iworld i o info "info field not available") + (make-iworld i o (symbol->string (gensym 'iworld)) "info field not available"))) ;; Player S-exp -> Void (define (iworld-send p sexp) diff --git a/collects/2htdp/uchat/server.rkt b/collects/2htdp/uchat/server.rkt index 0049cc31cf1..0fe94178a8f 100644 --- a/collects/2htdp/uchat/server.rkt +++ b/collects/2htdp/uchat/server.rkt @@ -1,6 +1,6 @@ -;; The first three lines of this file were inserted by DrScheme. They record metadata +;; The first three lines of this file were inserted by DrRacket. They record metadata ;; about the language level of this file in a form that our tools can easily process. -#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname server) (read-case-sensitive #f) (teachpacks ()) (htdp-settings #(#f constructor repeating-decimal #f #t none #f ()))) +#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname server) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ()))) (require 2htdp/universe) ;; UniState = [Listof IWorld] @@ -91,10 +91,10 @@ ;; Any -> Universe ;; run the chat server -(define (run _) +(define (run debug) (universe '() - (state true) + (state debug) (on-new new-chatter) (on-msg forward))) -(run 0) +(run #true) From 947b39d09b4679ca630ef45db53546fd89f9bcc9 Mon Sep 17 00:00:00 2001 From: Matthias Felleisen Date: Mon, 25 Apr 2011 11:07:47 -0400 Subject: [PATCH 198/441] history updated (cherry picked from commit 6b7e8442545fbfb068cc7f36e804b26642e11eb3) --- doc/release-notes/teachpack/HISTORY.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/release-notes/teachpack/HISTORY.txt b/doc/release-notes/teachpack/HISTORY.txt index 8eaff4b18f3..237bd8cf909 100644 --- a/doc/release-notes/teachpack/HISTORY.txt +++ b/doc/release-notes/teachpack/HISTORY.txt @@ -1,3 +1,8 @@ +------------------------------------------------------------------------ +Version 5.2 [Mon Apr 25 11:07:14 EDT 2011] + +* tiny bug fix in registration process for universe + ------------------------------------------------------------------------ Version 5.1 [Tue Feb 8 13:05:17 EST 2011] From 659cb91c2d43adcb7966ae3a4ef46034e674738d Mon Sep 17 00:00:00 2001 From: Vincent St-Amour Date: Mon, 25 Apr 2011 09:30:05 -0400 Subject: [PATCH 199/441] Remove file that was accidentally committed. (cherry picked from commit 7e491392e13a75cd59c476cdcec33e8e1292c3de) --- collects/tests/typed-scheme/dump | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 collects/tests/typed-scheme/dump diff --git a/collects/tests/typed-scheme/dump b/collects/tests/typed-scheme/dump deleted file mode 100644 index 9b6354c7169..00000000000 --- a/collects/tests/typed-scheme/dump +++ /dev/null @@ -1,3 +0,0 @@ -676 success(es) 0 failure(s) 0 error(s) 676 test(s) run -fixnum-bounded-expr.rkt failed: optimization log mismatch - From 7b604f37c22bd02d60f388f47b98f7b01b3a065c Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Mon, 25 Apr 2011 15:49:00 -0600 Subject: [PATCH 200/441] fix CGC ephemeron bug Merge to 5.1.1 (cherry picked from commit 5ae4b0016820e33195066a0d3956102f51991f3f) --- src/racket/src/list.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/racket/src/list.c b/src/racket/src/list.c index b4c3cb045d2..186b510e721 100644 --- a/src/racket/src/list.c +++ b/src/racket/src/list.c @@ -3259,7 +3259,7 @@ Scheme_Object *scheme_make_ephemeron(Scheme_Object *key, Scheme_Object *val) Scheme_Ephemeron *e; int can_gc = 1; - if (SCHEME_INTP(val) || !GC_base(val)) + if (SCHEME_INTP(key) || !GC_base(key)) can_gc = 0; if (can_gc) { @@ -3268,12 +3268,12 @@ Scheme_Object *scheme_make_ephemeron(Scheme_Object *key, Scheme_Object *val) e = (Scheme_Ephemeron *)scheme_malloc(sizeof(Scheme_Ephemeron)); } e->so.type = scheme_ephemeron_type; + e->key = key; + e->val = val; if (can_gc) { e->next = ephemerons; ephemerons = e; } - e->key = key; - e->val = val; return (Scheme_Object *)e; #endif From 197eef5b91681f287e7304175639c61f658f2581 Mon Sep 17 00:00:00 2001 From: Matthias Felleisen Date: Tue, 26 Apr 2011 20:59:04 -0400 Subject: [PATCH 201/441] protocol damage noted (cherry picked from commit 19937716525af815cb562de08527b9fd8ff42efd) --- doc/release-notes/teachpack/HISTORY.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/release-notes/teachpack/HISTORY.txt b/doc/release-notes/teachpack/HISTORY.txt index 237bd8cf909..d883e3aa674 100644 --- a/doc/release-notes/teachpack/HISTORY.txt +++ b/doc/release-notes/teachpack/HISTORY.txt @@ -2,6 +2,8 @@ Version 5.2 [Mon Apr 25 11:07:14 EDT 2011] * tiny bug fix in registration process for universe + implies incompatibility of protocols between 5.1 programs and + predecessors ------------------------------------------------------------------------ Version 5.1 [Tue Feb 8 13:05:17 EST 2011] From d61b573eb38bb5ec3fd91f66344b57d8cf4cf6c9 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Wed, 27 Apr 2011 06:09:30 -0600 Subject: [PATCH 202/441] remove `define-wish' from BSL for now Merge to 5.1.1 (cherry picked from commit 4cd0ba277eceb76dc93b34f2defabcd0d9fadde6) --- collects/lang/htdp-beginner.rkt | 2 +- collects/scribblings/htdp-langs/beginner.scrbl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/collects/lang/htdp-beginner.rkt b/collects/lang/htdp-beginner.rkt index 0ea60daa6cc..350e0bbf089 100644 --- a/collects/lang/htdp-beginner.rkt +++ b/collects/lang/htdp-beginner.rkt @@ -40,7 +40,7 @@ check-error check-member-of check-range - define-wish + ;; define-wish #%datum #%top-interaction empty true false diff --git a/collects/scribblings/htdp-langs/beginner.scrbl b/collects/scribblings/htdp-langs/beginner.scrbl index 4c91595190e..814d7f927e9 100644 --- a/collects/scribblings/htdp-langs/beginner.scrbl +++ b/collects/scribblings/htdp-langs/beginner.scrbl @@ -111,7 +111,7 @@ extraction, and type-like queries: The created names must not be the same as a primitive or another defined name.} @; ---------------------------------------------------------------------- - +@;{ ------- COMMENTED OUT FOR NOW --------- @section{@scheme[define-wish]} @defform[(define-wish id)]{ @@ -127,7 +127,7 @@ Wished-for functions are reported in the test report for the current program.} Similar to the above form, defines a wished-for function named @racket[id]. If the wished-for function is called with one value, the result of @scheme[expr] is returned as the default value. } - +} @; ---------------------------------------------------------------------- @section[#:tag "beginner-call"]{Function Calls} From da5e39bb39b11ed89312aba38fb76a632b985195 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Fri, 29 Apr 2011 23:46:57 -0400 Subject: [PATCH 203/441] Update version number for the v5.1.1 release --- src/racket/src/schvers.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/racket/src/schvers.h b/src/racket/src/schvers.h index a40dc65a659..c4dd78f63b5 100644 --- a/src/racket/src/schvers.h +++ b/src/racket/src/schvers.h @@ -13,12 +13,12 @@ consistently.) */ -#define MZSCHEME_VERSION "5.1.0.900" +#define MZSCHEME_VERSION "5.1.1" #define MZSCHEME_VERSION_X 5 #define MZSCHEME_VERSION_Y 1 -#define MZSCHEME_VERSION_Z 0 -#define MZSCHEME_VERSION_W 900 +#define MZSCHEME_VERSION_Z 1 +#define MZSCHEME_VERSION_W 0 #define MZSCHEME_VERSION_MAJOR ((MZSCHEME_VERSION_X * 100) + MZSCHEME_VERSION_Y) #define MZSCHEME_VERSION_MINOR ((MZSCHEME_VERSION_Z * 1000) + MZSCHEME_VERSION_W) From e5bfc20771e48908c3d6bd3ea98d59d540e2a678 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Fri, 29 Apr 2011 23:47:00 -0400 Subject: [PATCH 204/441] New Racket version 5.1.1. --- src/worksp/gracket/gracket.manifest | 2 +- src/worksp/gracket/gracket.rc | 8 ++++---- src/worksp/mzcom/mzcom.rc | 8 ++++---- src/worksp/mzcom/mzobj.rgs | 6 +++--- src/worksp/racket/racket.manifest | 2 +- src/worksp/racket/racket.rc | 8 ++++---- src/worksp/starters/start.rc | 8 ++++---- 7 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/worksp/gracket/gracket.manifest b/src/worksp/gracket/gracket.manifest index c5773976433..81f8553de1b 100644 --- a/src/worksp/gracket/gracket.manifest +++ b/src/worksp/gracket/gracket.manifest @@ -1,6 +1,6 @@ - diff --git a/src/worksp/gracket/gracket.rc b/src/worksp/gracket/gracket.rc index 89e40d049da..3e9084d09bc 100644 --- a/src/worksp/gracket/gracket.rc +++ b/src/worksp/gracket/gracket.rc @@ -17,8 +17,8 @@ APPLICATION ICON DISCARDABLE "gracket.ico" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 5,1,0,900 - PRODUCTVERSION 5,1,0,900 + FILEVERSION 5,1,1,0 + PRODUCTVERSION 5,1,1,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -36,11 +36,11 @@ BEGIN VALUE "CompanyName", "PLT Scheme Inc.\0" VALUE "FileDescription", "Racket GUI application\0" VALUE "InternalName", "GRacket\0" - VALUE "FileVersion", "5, 1, 0, 900\0" + VALUE "FileVersion", "5, 1, 1, 0\0" VALUE "LegalCopyright", "Copyright © 1995-2011\0" VALUE "OriginalFilename", "GRacket.exe\0" VALUE "ProductName", "Racket\0" - VALUE "ProductVersion", "5, 1, 0, 900\0" + VALUE "ProductVersion", "5, 1, 1, 0\0" END END BLOCK "VarFileInfo" diff --git a/src/worksp/mzcom/mzcom.rc b/src/worksp/mzcom/mzcom.rc index b9919e7ccb3..97988a213ea 100644 --- a/src/worksp/mzcom/mzcom.rc +++ b/src/worksp/mzcom/mzcom.rc @@ -53,8 +53,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 5,1,0,900 - PRODUCTVERSION 5,1,0,900 + FILEVERSION 5,1,1,0 + PRODUCTVERSION 5,1,1,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -70,12 +70,12 @@ BEGIN BLOCK "040904b0" BEGIN VALUE "FileDescription", "MzCOM Module" - VALUE "FileVersion", "5, 1, 0, 900" + VALUE "FileVersion", "5, 1, 1, 0" VALUE "InternalName", "MzCOM" VALUE "LegalCopyright", "Copyright 2000-2011 PLT (Paul Steckler)" VALUE "OriginalFilename", "MzCOM.EXE" VALUE "ProductName", "MzCOM Module" - VALUE "ProductVersion", "5, 1, 0, 900" + VALUE "ProductVersion", "5, 1, 1, 0" END END BLOCK "VarFileInfo" diff --git a/src/worksp/mzcom/mzobj.rgs b/src/worksp/mzcom/mzobj.rgs index 3fddbb5fe72..96ab979e2fe 100644 --- a/src/worksp/mzcom/mzobj.rgs +++ b/src/worksp/mzcom/mzobj.rgs @@ -1,19 +1,19 @@ HKCR { - MzCOM.MzObj.5.1.0.900 = s 'MzObj Class' + MzCOM.MzObj.5.1.1.0 = s 'MzObj Class' { CLSID = s '{A3B0AF9E-2AB0-11D4-B6D2-0060089002FE}' } MzCOM.MzObj = s 'MzObj Class' { CLSID = s '{A3B0AF9E-2AB0-11D4-B6D2-0060089002FE}' - CurVer = s 'MzCOM.MzObj.5.1.0.900' + CurVer = s 'MzCOM.MzObj.5.1.1.0' } NoRemove CLSID { ForceRemove {A3B0AF9E-2AB0-11D4-B6D2-0060089002FE} = s 'MzObj Class' { - ProgID = s 'MzCOM.MzObj.5.1.0.900' + ProgID = s 'MzCOM.MzObj.5.1.1.0' VersionIndependentProgID = s 'MzCOM.MzObj' ForceRemove 'Programmable' LocalServer32 = s '%MODULE%' diff --git a/src/worksp/racket/racket.manifest b/src/worksp/racket/racket.manifest index d3da5830973..4ed96b9150d 100644 --- a/src/worksp/racket/racket.manifest +++ b/src/worksp/racket/racket.manifest @@ -1,6 +1,6 @@ - diff --git a/src/worksp/racket/racket.rc b/src/worksp/racket/racket.rc index d370cc39f11..4bb7d570d73 100644 --- a/src/worksp/racket/racket.rc +++ b/src/worksp/racket/racket.rc @@ -29,8 +29,8 @@ APPLICATION ICON DISCARDABLE "racket.ico" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 5,1,0,900 - PRODUCTVERSION 5,1,0,900 + FILEVERSION 5,1,1,0 + PRODUCTVERSION 5,1,1,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -48,11 +48,11 @@ BEGIN VALUE "CompanyName", "PLT Scheme Inc.\0" VALUE "FileDescription", "Racket application\0" VALUE "InternalName", "Racket\0" - VALUE "FileVersion", "5, 1, 0, 900\0" + VALUE "FileVersion", "5, 1, 1, 0\0" VALUE "LegalCopyright", "Copyright © 1995-2011\0" VALUE "OriginalFilename", "racket.exe\0" VALUE "ProductName", "Racket\0" - VALUE "ProductVersion", "5, 1, 0, 900\0" + VALUE "ProductVersion", "5, 1, 1, 0\0" END END BLOCK "VarFileInfo" diff --git a/src/worksp/starters/start.rc b/src/worksp/starters/start.rc index 85f353687cf..f5a81f8f50f 100644 --- a/src/worksp/starters/start.rc +++ b/src/worksp/starters/start.rc @@ -22,8 +22,8 @@ APPLICATION ICON DISCARDABLE "mzstart.ico" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 5,1,0,900 - PRODUCTVERSION 5,1,0,900 + FILEVERSION 5,1,1,0 + PRODUCTVERSION 5,1,1,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -45,7 +45,7 @@ BEGIN #ifdef MZSTART VALUE "FileDescription", "Racket Launcher\0" #endif - VALUE "FileVersion", "5, 1, 0, 900\0" + VALUE "FileVersion", "5, 1, 1, 0\0" #ifdef MRSTART VALUE "InternalName", "mrstart\0" #endif @@ -60,7 +60,7 @@ BEGIN VALUE "OriginalFilename", "MzStart.exe\0" #endif VALUE "ProductName", "Racket\0" - VALUE "ProductVersion", "5, 1, 0, 900\0" + VALUE "ProductVersion", "5, 1, 1, 0\0" END END BLOCK "VarFileInfo" From 6f8817d06345d21231c5a3263fb3cfb435add7a5 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Sat, 30 Apr 2011 02:57:12 -0400 Subject: [PATCH 205/441] v5.1.1 stuff (cherry picked from commit 1f7ac35d8e4207f30afaee22cd83575b44f99cde) --- collects/meta/web/download/data.rkt | 3 ++- collects/meta/web/download/installers.txt | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/collects/meta/web/download/data.rkt b/collects/meta/web/download/data.rkt index 90f3b40a5b5..33439f7faac 100644 --- a/collects/meta/web/download/data.rkt +++ b/collects/meta/web/download/data.rkt @@ -1,7 +1,8 @@ #lang racket/base (define -versions+dates- - '(["5.1" "February 2011"] + '(["5.1.1" "April 2011"] + ["5.1" "February 2011"] ["5.0.2" "November 2010"] ["5.0.1" "August 2010"] ["5.0" "June 2010"] diff --git a/collects/meta/web/download/installers.txt b/collects/meta/web/download/installers.txt index 9079a6ade64..5090d8cddf8 100644 --- a/collects/meta/web/download/installers.txt +++ b/collects/meta/web/download/installers.txt @@ -64,6 +64,26 @@ 16M 5.0/racket/racket-5.0-src-mac.dmg 16M 5.0/racket/racket-5.0-src-unix.tgz 20M 5.0/racket/racket-5.0-src-win.zip +11M 5.1.1/racket-textual/racket-textual-5.1.1-bin-i386-linux-f12.sh +11M 5.1.1/racket-textual/racket-textual-5.1.1-bin-i386-linux-ubuntu-jaunty.sh +11M 5.1.1/racket-textual/racket-textual-5.1.1-bin-i386-osx-mac.dmg +7.6M 5.1.1/racket-textual/racket-textual-5.1.1-bin-i386-win32.exe +11M 5.1.1/racket-textual/racket-textual-5.1.1-bin-ppc-darwin.sh +11M 5.1.1/racket-textual/racket-textual-5.1.1-bin-ppc-osx-mac.dmg +11M 5.1.1/racket-textual/racket-textual-5.1.1-bin-x86_64-linux-f14.sh +5.9M 5.1.1/racket-textual/racket-textual-5.1.1-src-mac.dmg +5.7M 5.1.1/racket-textual/racket-textual-5.1.1-src-unix.tgz +6.8M 5.1.1/racket-textual/racket-textual-5.1.1-src-win.zip +50M 5.1.1/racket/racket-5.1.1-bin-i386-linux-f12.sh +50M 5.1.1/racket/racket-5.1.1-bin-i386-linux-ubuntu-jaunty.sh +51M 5.1.1/racket/racket-5.1.1-bin-i386-osx-mac.dmg +32M 5.1.1/racket/racket-5.1.1-bin-i386-win32.exe +49M 5.1.1/racket/racket-5.1.1-bin-ppc-darwin.sh +52M 5.1.1/racket/racket-5.1.1-bin-ppc-osx-mac.dmg +50M 5.1.1/racket/racket-5.1.1-bin-x86_64-linux-f14.sh +16M 5.1.1/racket/racket-5.1.1-src-mac.dmg +16M 5.1.1/racket/racket-5.1.1-src-unix.tgz +19M 5.1.1/racket/racket-5.1.1-src-win.zip 11M 5.1/racket-textual/racket-textual-5.1-bin-i386-linux-f12.sh 11M 5.1/racket-textual/racket-textual-5.1-bin-i386-linux-ubuntu-jaunty.sh 11M 5.1/racket-textual/racket-textual-5.1-bin-i386-osx-mac.dmg From 5ed722e14478e2adeed14f1d85686951a61972a9 Mon Sep 17 00:00:00 2001 From: Ryan Culpepper Date: Thu, 7 Jul 2011 23:37:24 -0600 Subject: [PATCH 206/441] Alpha version number for the v5.1.2 release --- src/racket/src/schvers.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/racket/src/schvers.h b/src/racket/src/schvers.h index 287f1dfd9ab..55caba25639 100644 --- a/src/racket/src/schvers.h +++ b/src/racket/src/schvers.h @@ -13,12 +13,12 @@ consistently.) */ -#define MZSCHEME_VERSION "5.1.1.9" +#define MZSCHEME_VERSION "5.1.1.900" #define MZSCHEME_VERSION_X 5 #define MZSCHEME_VERSION_Y 1 #define MZSCHEME_VERSION_Z 1 -#define MZSCHEME_VERSION_W 9 +#define MZSCHEME_VERSION_W 900 #define MZSCHEME_VERSION_MAJOR ((MZSCHEME_VERSION_X * 100) + MZSCHEME_VERSION_Y) #define MZSCHEME_VERSION_MINOR ((MZSCHEME_VERSION_Z * 1000) + MZSCHEME_VERSION_W) From 06f42651f5462ab627856abeaf06cd804c77209a Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Thu, 7 Jul 2011 15:30:45 -0600 Subject: [PATCH 207/441] optimizer repair; `unsafe-c{a,d}r' can be dropped (cherry picked from commit 848bba80a3c9f92052e09bf1737a213233161bb2) --- src/racket/src/list.c | 8 +++++--- src/racket/src/optimize.c | 6 ++++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/racket/src/list.c b/src/racket/src/list.c index 4030f86e87a..70951b03fb7 100644 --- a/src/racket/src/list.c +++ b/src/racket/src/list.c @@ -724,11 +724,13 @@ scheme_init_unsafe_list (Scheme_Env *env) scheme_null->type = scheme_null_type; p = scheme_make_folding_prim(unsafe_car, "unsafe-car", 1, 1, 1); - SCHEME_PRIM_PROC_FLAGS(p) |= SCHEME_PRIM_IS_UNARY_INLINED; + SCHEME_PRIM_PROC_FLAGS(p) |= (SCHEME_PRIM_IS_UNARY_INLINED + | SCHEME_PRIM_IS_UNSAFE_FUNCTIONAL); scheme_add_global_constant ("unsafe-car", p, env); p = scheme_make_folding_prim(unsafe_cdr, "unsafe-cdr", 1, 1, 1); - SCHEME_PRIM_PROC_FLAGS(p) |= SCHEME_PRIM_IS_UNARY_INLINED; + SCHEME_PRIM_PROC_FLAGS(p) |= (SCHEME_PRIM_IS_UNARY_INLINED + | SCHEME_PRIM_IS_UNSAFE_FUNCTIONAL); scheme_add_global_constant ("unsafe-cdr", p, env); p = scheme_make_immed_prim(unsafe_mcar, "unsafe-mcar", 1, 1); @@ -748,7 +750,7 @@ scheme_init_unsafe_list (Scheme_Env *env) scheme_add_global_constant ("unsafe-set-mcdr!", p, env); p = scheme_make_immed_prim(unsafe_unbox, "unsafe-unbox", 1, 1); - SCHEME_PRIM_PROC_FLAGS(p) |= SCHEME_PRIM_IS_UNARY_INLINED; + SCHEME_PRIM_PROC_FLAGS(p) |= SCHEME_PRIM_IS_UNARY_INLINED; scheme_add_global_constant("unsafe-unbox", p, env); p = scheme_make_immed_prim(unsafe_unbox_star, "unsafe-unbox*", 1, 1); diff --git a/src/racket/src/optimize.c b/src/racket/src/optimize.c index 9f5a287c498..cf52296c68f 100644 --- a/src/racket/src/optimize.c +++ b/src/racket/src/optimize.c @@ -390,6 +390,12 @@ int scheme_omittable_expr(Scheme_Object *o, int vals, int fuel, int resolved, note_match(1, vals, warn_info); if ((vals == 1) || (vals < 0)) { /* can omit an unsafe op */ + int i; + for (i = app->num_args; i--; ) { + if (!scheme_omittable_expr(app->args[i + 1], 1, fuel - 1, resolved, warn_info, + deeper_than + (resolved ? app->num_args : 0))) + return 0; + } return 1; } } From 7fc99aa0b3b4b7513c6628674abbc1c457c0a475 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Fri, 8 Jul 2011 06:28:43 -0600 Subject: [PATCH 208/441] make weak taint table actually weak (cherry picked from commit 4392ab7636100493e521cab8def320a574935a0c) --- src/racket/src/syntax.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/racket/src/syntax.c b/src/racket/src/syntax.c index 887af427fec..c37049d23cf 100644 --- a/src/racket/src/syntax.c +++ b/src/racket/src/syntax.c @@ -2432,10 +2432,9 @@ static Scheme_Object *taint_intern(Scheme_Object *v) Scheme_Bucket *b; b = scheme_bucket_from_table(taint_intern_table, (const char *)v); - if (b->val) - v = b->val; - else - b->val = v; + if (!b->val) + b->val = scheme_true; + v = (Scheme_Object *)HT_EXTRACT_WEAK(b->key); return v; } From 7d32a27700b722cb5e17eb5db9ec46472712442c Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Fri, 8 Jul 2011 13:52:08 -0600 Subject: [PATCH 209/441] update Racket release notes for v5.1.2 Merge to v5.1.2 (cherry picked from commit fb5c62d9d7c8705959a8ceef95adce78277560c1) --- doc/release-notes/racket/HISTORY.txt | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/doc/release-notes/racket/HISTORY.txt b/doc/release-notes/racket/HISTORY.txt index cb0009f39ae..23885360dd8 100644 --- a/doc/release-notes/racket/HISTORY.txt +++ b/doc/release-notes/racket/HISTORY.txt @@ -1,8 +1,4 @@ -Version 5.1.1.8 -slideshow/pict: added rotate function, and added sxy anf syx - fields to a child structure - -Version 5.1.1.7 +Version 5.1.2, July 2011 Replaced syntax certificates with syntax taints: Added syntax-tainted?, syntax-arm, syntax-disarm, syntax-rearm, syntax-taint, and syntax-protect @@ -12,15 +8,8 @@ Replaced syntax certificates with syntax taints: syntax-protect implicitly Changed the way inspectors are associated to syntax objects and variable references in compiled code -compiler/zo-struct: removed certificate structures; changed - wrapper to have a tamper-status field instead of certs - -Version 5.1.1.5 -racket/function: added identity, thunk, compose1 - -Version 5.1.1.2 Changed "sequence" to include exact nonnegative integers -mzlib/contract: removed following (undocumented) exports: +mzlib/contract: removed (undocumented) exports: chaperone-contract-struct? contract-struct-first-order contract-struct-name @@ -34,7 +23,12 @@ mzlib/contract: removed following (undocumented) exports: opt-contract/info-id synthesized-value unknown? -compiler/zo-struct: added toplevel-map field to lam +racket/function: added identity, thunk, compose1 +slideshow/pict: added rotate function, and added sxy anf syx + fields to a child structure +compiler/zo-struct: removed certificate structures; changed + wrapper to have a tamper-status field instead of certs; + added toplevel-map field to lam Version 5.1.1, May 2011 Enabled single-precision floats by default From fe3ee8cbc5649c3520de0a043ad13282d0c505b4 Mon Sep 17 00:00:00 2001 From: Ryan Culpepper Date: Fri, 8 Jul 2011 02:21:38 -0600 Subject: [PATCH 210/441] removed merge conflict artifact Merge to release branch (cherry picked from commit 73230537baf50466956b79289729b8e69c4ace9e) --- collects/scribblings/reference/contracts.scrbl | 5 ----- 1 file changed, 5 deletions(-) diff --git a/collects/scribblings/reference/contracts.scrbl b/collects/scribblings/reference/contracts.scrbl index 06c3183706b..c71b9c3cc22 100644 --- a/collects/scribblings/reference/contracts.scrbl +++ b/collects/scribblings/reference/contracts.scrbl @@ -2013,8 +2013,3 @@ makes a binary search tree contract, but one that is struct and returns a projection function that checks the contract. } -<<<<<<< HEAD - -======= - ->>>>>>> 0b337dc... rejiggered things to make sure all mzlib/contract exports are documented From 4fbf087e171f23c24ebbe2f30ba78fa0973675d0 Mon Sep 17 00:00:00 2001 From: Ryan Culpepper Date: Fri, 8 Jul 2011 03:38:33 -0600 Subject: [PATCH 211/441] syntax/parse: add expr/c to main module Merge to release branch (cherry picked from commit 0aecbf97ffc50f4879f5d75d5acc6e2aa15b6aa7) --- collects/syntax/parse.rkt | 6 +- .../syntax/parse/experimental/contract.rkt | 2 +- .../syntax/scribblings/parse/ex-exprc.scrbl | 5 +- .../scribblings/parse/experimental.scrbl | 19 +---- collects/syntax/scribblings/parse/lib.scrbl | 71 +++++++++++++++++++ collects/unstable/scribblings/wrapc.scrbl | 49 +------------ 6 files changed, 81 insertions(+), 71 deletions(-) diff --git a/collects/syntax/parse.rkt b/collects/syntax/parse.rkt index cd71a6b25bf..337481d76f6 100644 --- a/collects/syntax/parse.rkt +++ b/collects/syntax/parse.rkt @@ -3,11 +3,13 @@ "parse/private/sc.rkt" "parse/private/litconv.rkt" "parse/private/lib.rkt" - "parse/experimental/provide.rkt") + "parse/experimental/provide.rkt" + "parse/experimental/contract.rkt") (provide (except-out (all-from-out "parse/private/sc.rkt") syntax-parser/template parser/rhs) (all-from-out "parse/private/litconv.rkt") (except-out (all-from-out "parse/private/lib.rkt") - static)) + static) + expr/c) (provide-syntax-class/contract [static (syntax-class/c [(-> any/c any/c) (or/c string? symbol? #f)])]) diff --git a/collects/syntax/parse/experimental/contract.rkt b/collects/syntax/parse/experimental/contract.rkt index 4e8e847718e..d0d7064e342 100644 --- a/collects/syntax/parse/experimental/contract.rkt +++ b/collects/syntax/parse/experimental/contract.rkt @@ -29,7 +29,7 @@ (#:positive (or/c syntax? string? module-path-index? 'from-macro 'use-site 'unknown) #:negative (or/c syntax? string? module-path-index? - 'from-macro 'same-as-use-site 'unknown) + 'from-macro 'use-site 'unknown) #:name (or/c identifier? string? symbol? #f) #:macro (or/c identifier? string? symbol? #f) #:context (or/c syntax? #f)))]) diff --git a/collects/syntax/scribblings/parse/ex-exprc.scrbl b/collects/syntax/scribblings/parse/ex-exprc.scrbl index d7b7d50dbf0..3db0d746ade 100644 --- a/collects/syntax/scribblings/parse/ex-exprc.scrbl +++ b/collects/syntax/scribblings/parse/ex-exprc.scrbl @@ -6,10 +6,7 @@ "parse-common.rkt" (for-label racket/class)) -@title[#:tag "exprc"]{Experimental: Contracts on macro sub-expressions} - -@emph{This section involves facilities that are experimental and -subject to change.} +@title[#:tag "exprc"]{Contracts on macro sub-expressions} Just as procedures often expect certain kinds of values as arguments, macros often have expectations about the expressions they are diff --git a/collects/syntax/scribblings/parse/experimental.scrbl b/collects/syntax/scribblings/parse/experimental.scrbl index e545185f6d2..20f079436e2 100644 --- a/collects/syntax/scribblings/parse/experimental.scrbl +++ b/collects/syntax/scribblings/parse/experimental.scrbl @@ -13,23 +13,8 @@ The following facilities are experimental. @defmodule[syntax/parse/experimental/contract] -Macros can apply contracts to their sub-expressions using the -@racket[expr/c] syntax class. - -@defproc[(expr/c [contract-expr syntax?] - [#:positive pos-blame 'use-site] - [#:negative neg-blame 'from-macro] - [#:name expr-name #f] - [#:macro macro-name #f] - [#:context ctx #f]) - (attributes c)]{ - -Accepts an expression (@racket[expr]) and computes an attribute -@racket[c] that represents the expression wrapped with the contract -represented by @racket[contract-expr]. - -See @secref{exprc} for an example. -} +This module is deprecated; it reprovides @racket[expr/c] for backward +compatibility. @section{Contracts for syntax classes} diff --git a/collects/syntax/scribblings/parse/lib.scrbl b/collects/syntax/scribblings/parse/lib.scrbl index e9f20d530ac..1114c1b930c 100644 --- a/collects/syntax/scribblings/parse/lib.scrbl +++ b/collects/syntax/scribblings/parse/lib.scrbl @@ -58,6 +58,77 @@ When used outside of the dynamic extent of a macro transformer (see The attribute @var[value] contains the value the name is bound to. } +@defproc[(expr/c [contract-expr syntax?] + [#:positive pos-blame + (or/c syntax? string? module-path-index? 'from-macro 'use-site 'unknown) + 'use-site] + [#:negative neg-blame + (or/c syntax? string? module-path-index? 'from-macro 'use-site 'unknown) + 'from-macro] + [#:name expr-name (or/c identifier? string? symbol?) #f] + [#:macro macro-name (or/c identifier? string? symbol?) #f] + [#:context ctx (or/c syntax? #f) #, @elem{determined automatically}]) + (attributes c)]{ + +Accepts an expression (@racket[expr]) and computes an attribute +@racket[c] that represents the expression wrapped with the contract +represented by @racket[contract-expr]. + +The contract's positive blame represents the obligations of the +expression being wrapped. The negative blame represents the +obligations of the macro imposing the contract---the ultimate user +of @racket[expr/c]. By default, the positive blame is taken as +the module currently being expanded, and the negative blame is +inferred from the definition site of the macro (itself inferred from +the @racket[context] argument), but both blame locations can be +overridden. + +The @racket[pos-blame] and @racket[neg-blame] arguments are turned +into blame locations as follows: +@itemize[ +@item{If the argument is a string, it is used directly as the blame + label.} +@item{If the argument is syntax, its source location is used + to produce the blame label.} +@item{If the argument is a module path index, its resolved module path + is used.} +@item{If the argument is @racket['from-macro], the macro is inferred + from either the @racket[macro-name] argument (if @racket[macro-name] + is an identifier) or the @racket[context] argument, and the module + where it is @emph{defined} is used as the blame location. If + neither an identifier @racket[macro-name] nor a @racket[context] + argument is given, the location is @racket["unknown"].} +@item{If the argument is @racket['use-site], the module being + expanded is used.} +@item{If the argument is @racket['unknown], the blame label is + @racket["unknown"].} +] + +The @racket[macro-name] argument is used to determine the macro's +binding, if it is an identifier. If @racket[expr-name] is given, +@racket[macro-name] is also included in the contract error message. If +@racket[macro-name] is omitted or @racket[#f], but @racket[context] is +a syntax object, then @racket[macro-name] is determined from +@racket[context]. + +If @racket[expr-name] is not @racket[#f], it is used in the contract's +error message to describe the expression the contract is applied to. + +The @racket[context] argument is used, when necessary, to infer the +macro name for the negative blame party and the contract error +message. The @racket[context] should be either an identifier or a +syntax pair with an identifer in operator position; in either case, +that identifier is taken as the macro ultimately requesting the +contract wrapping. + +See @secref{exprc} for an example. + +@bold{Important:} Make sure when using @racket[expr/c] to use the +@racket[c] attribute. The @racket[expr/c] syntax class does not change how +pattern variables are bound; it only computes an attribute that +represents the checked expression. +} + @section{Literal sets} diff --git a/collects/unstable/scribblings/wrapc.scrbl b/collects/unstable/scribblings/wrapc.scrbl index 9c05bb10de5..99cdcd72008 100644 --- a/collects/unstable/scribblings/wrapc.scrbl +++ b/collects/unstable/scribblings/wrapc.scrbl @@ -1,6 +1,6 @@ #lang scribble/manual @(require scribble/struct scribble/decode scribble/eval "utils.rkt" - (for-label racket/base racket/contract unstable/wrapc racket/syntax)) + (for-label racket/base racket/contract unstable/wrapc racket/syntax syntax/parse)) @(define the-eval (make-base-eval)) @(the-eval '(require racket/contract (for-syntax racket/base unstable/wrapc))) @@ -35,52 +35,7 @@ Returns a syntax object representing an expression that applies the contract represented by @racket[contract-expr] to the value produced by @racket[expr]. -The contract's positive blame represents the obligations of the -expression being wrapped. The negative blame represents the -obligations of the macro imposing the contract---the ultimate caller -of @racket[wrap-expr/c]. By default, the positive blame is taken as -the module currently being expanded, and the negative blame is -inferred from the definition site of the macro (itself inferred from -the @racket[context] argument). But both blame locations can be -overridden. - -Positive and negative blame locations are determined from -@racket[pos-blame] and @racket[neg-blame], respectively, as follows: -@itemize[ -@item{If the argument is a string, it is used directly as the blame -label.} -@item{If the argument is syntax, its source location is used -to produce the blame label.} -@item{If the argument is a module path index, its resolved module path -is used.} -@item{If the argument is @racket['from-macro], the macro is inferred -from either the @racket[macro-name] argument (if @racket[macro-name] -is an identifier) or the @racket[context] argument, and the module -where it is @emph{defined} is used as the negative blame location. If -neither an identifier @racket[macro-name] nor a @racket[context] -argument is given, the location is @racket["unknown"].} -@item{If the argument is @racket['use-site], the module being -expanded is used.} -@item{If the argument is @racket['unknown], the blame label is -@racket["unknown"].} -] - -The @racket[macro-name] argument is used to determine the macro's -binding, if it is an identifier. If @racket[expr-name] is given, -@racket[macro-name] is also included in the contract error message. If -@racket[macro-name] is omitted or @racket[#f], but @racket[context] is -a syntax object, then @racket[macro-name] is determined from -@racket[context]. - -If @racket[expr-name] is not @racket[#f], it is used in the contract's -error message to describe the expression the contract is applied to. - -The @racket[context] argument is used, when necessary, to infer the -macro name for the negative blame party and the contract error -message. The @racket[context] should be either an identifier or a -syntax pair with an identifer in operator position; in either case, -that identifier is taken as the macro ultimately requesting the -contract wrapping. +The other arguments have the same meaning as for @racket[expr/c]. @examples[#:eval the-eval (define-syntax (myparameterize1 stx) From f468769a75a9c8043ff4881b1b1e8e881490f0ce Mon Sep 17 00:00:00 2001 From: Guillaume Marceau Date: Thu, 7 Jul 2011 00:39:30 -0400 Subject: [PATCH 212/441] Catches another way images prints. (cherry picked from commit ff1ab35a12d9a3360cbbffd21bf62bc26aa8a59e) --- collects/lang/private/rewrite-error-message.rkt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/collects/lang/private/rewrite-error-message.rkt b/collects/lang/private/rewrite-error-message.rkt index 514ac3ebe57..8ac58a73408 100755 --- a/collects/lang/private/rewrite-error-message.rkt +++ b/collects/lang/private/rewrite-error-message.rkt @@ -78,6 +78,8 @@ (lambda (all one) "expects a ")) (list #rx"list or cyclic list" (lambda (all) "list")) + (list (regexp-quote "#(struct:object:image% ...)") + (lambda (all) "an image")) (list (regexp-quote "#(struct:object:image-snip% ...)") (lambda (all) "an image")) (list (regexp-quote "#(struct:object:cache-image-snip% ...)") From ae6cf4da07b7b92432eaedafd115eea72d0c0adb Mon Sep 17 00:00:00 2001 From: Guillaume Marceau Date: Thu, 7 Jul 2011 00:41:11 -0400 Subject: [PATCH 213/441] Little tweaks to the *SL documentation (cherry picked from commit 91d5c924158250e39a3a555a5416c3ab591c40c3) --- collects/scribblings/htdp-langs/advanced.scrbl | 5 ++++- collects/scribblings/htdp-langs/beginner-abbr.scrbl | 7 +++++-- collects/scribblings/htdp-langs/beginner.scrbl | 2 +- collects/scribblings/htdp-langs/htdp-langs.scrbl | 2 +- collects/scribblings/htdp-langs/intermediate-lambda.scrbl | 5 ++++- collects/scribblings/htdp-langs/intermediate.scrbl | 5 ++++- collects/teachpack/error-composition.scrbl | 5 +++-- 7 files changed, 22 insertions(+), 9 deletions(-) diff --git a/collects/scribblings/htdp-langs/advanced.scrbl b/collects/scribblings/htdp-langs/advanced.scrbl index bfff957080f..1edfd1eafc2 100644 --- a/collects/scribblings/htdp-langs/advanced.scrbl +++ b/collects/scribblings/htdp-langs/advanced.scrbl @@ -2,7 +2,7 @@ @(require "common.rkt" "std-grammar.rkt" "prim-ops.rkt" (for-label lang/htdp-advanced)) -@title[#:style 'toc #:tag "advanced"]{Advanced Student} +@title[#:tag "advanced"]{Advanced Student} @declare-exporting[lang/htdp-advanced] @@ -266,6 +266,9 @@ Like @racket[when], but the @racket[body-expression] is evaluated when the @section[#:tag "advanced-common-syntax"]{Common Syntax} +The following syntaxes behave the same in the @emph{Advanced} +level as they did in the @secref["intermediate-lam"] level. + @(intermediate-forms lambda quote diff --git a/collects/scribblings/htdp-langs/beginner-abbr.scrbl b/collects/scribblings/htdp-langs/beginner-abbr.scrbl index 300ebdc800d..9fa8c600e3b 100644 --- a/collects/scribblings/htdp-langs/beginner-abbr.scrbl +++ b/collects/scribblings/htdp-langs/beginner-abbr.scrbl @@ -4,7 +4,7 @@ -@title[#:style 'toc #:tag "beginner-abbr"]{Beginning Student with List Abbreviations} +@title[#:tag "beginner-abbr"]{Beginning Student with List Abbreviations} @declare-exporting[lang/htdp-beginner-abbr] @@ -108,7 +108,10 @@ also be written with @racket[unquote-splicing].} @; ---------------------------------------------------------------------- -@section[#:tag "beginner-abbr-common-syntax"]{Common Syntax} +@section[#:tag "beginner-abbr-common-syntax"]{Common Syntaxes} + +The following syntaxes behave the same in the @emph{Beginner with List +Abbreviations} level as they did in the @secref["beginner"] level. @(define-forms/normal define) @(define-form/explicit-lambda define lambda) diff --git a/collects/scribblings/htdp-langs/beginner.scrbl b/collects/scribblings/htdp-langs/beginner.scrbl index e989a85f040..00d23b408e6 100644 --- a/collects/scribblings/htdp-langs/beginner.scrbl +++ b/collects/scribblings/htdp-langs/beginner.scrbl @@ -3,7 +3,7 @@ (for-label lang/htdp-beginner)) -@title[#:style 'toc #:tag "beginner"]{Beginning Student} +@title[#:tag "beginner"]{Beginning Student} @declare-exporting[lang/htdp-beginner #:use-sources (lang/htdp-beginner lang/private/teachprims)] diff --git a/collects/scribblings/htdp-langs/htdp-langs.scrbl b/collects/scribblings/htdp-langs/htdp-langs.scrbl index 2e3131b1636..345de96d32b 100644 --- a/collects/scribblings/htdp-langs/htdp-langs.scrbl +++ b/collects/scribblings/htdp-langs/htdp-langs.scrbl @@ -1,7 +1,7 @@ #lang scribble/doc @(require "common.rkt" (for-label lang/htdp-beginner)) -@title[#:tag "top"]{@italic{How to Design Programs} Languages} +@title[#:style 'toc #:tag "top"]{@italic{How to Design Programs} Languages} The languages documented in this manual are provided by DrRacket to be used with the @italic{@link["http://www.htdp.org/"]{How to Design diff --git a/collects/scribblings/htdp-langs/intermediate-lambda.scrbl b/collects/scribblings/htdp-langs/intermediate-lambda.scrbl index 979ba4ad2cc..c4946f79dff 100644 --- a/collects/scribblings/htdp-langs/intermediate-lambda.scrbl +++ b/collects/scribblings/htdp-langs/intermediate-lambda.scrbl @@ -2,7 +2,7 @@ @(require "common.rkt" "std-grammar.rkt" "prim-ops.rkt" (for-label lang/htdp-intermediate-lambda)) -@title[#:style 'toc #:tag "intermediate-lam"]{Intermediate Student with Lambda} +@title[#:tag "intermediate-lam"]{Intermediate Student with Lambda} @declare-exporting[lang/htdp-intermediate-lambda] @@ -92,6 +92,9 @@ the function.} @section[#:tag "intm-w-lambda-common-syntax"]{Common Syntax} +The following syntaxes behave the same in the @emph{Intermediate with Lambda} +level as they did in the @secref["intermediate"] level. + @(define-forms/normal define) @(prim-forms ("intermediate-lam") diff --git a/collects/scribblings/htdp-langs/intermediate.scrbl b/collects/scribblings/htdp-langs/intermediate.scrbl index f6d006c6622..f3321fde379 100644 --- a/collects/scribblings/htdp-langs/intermediate.scrbl +++ b/collects/scribblings/htdp-langs/intermediate.scrbl @@ -3,7 +3,7 @@ (for-label lang/htdp-intermediate)) -@title[#:style 'toc #:tag "intermediate"]{Intermediate Student} +@title[#:tag "intermediate"]{Intermediate Student} @declare-exporting[lang/htdp-intermediate] @@ -65,6 +65,9 @@ @section[#:tag "intermediate-common-syntax"]{Common Syntax} +The following syntaxes behave the same in the @emph{Intermediate} level as they +did in the @secref["beginner-abbr"] level. + @(define-forms/normal define) @(define-form/explicit-lambda define lambda) diff --git a/collects/teachpack/error-composition.scrbl b/collects/teachpack/error-composition.scrbl index aea7e1e251b..7e901ac1145 100755 --- a/collects/teachpack/error-composition.scrbl +++ b/collects/teachpack/error-composition.scrbl @@ -101,9 +101,10 @@ not appreciate anyway). @list[@para{function header} @para{@samp{after define}, @samp{after the name}, @samp{after the first argument}, ...}] - @list[@para{keyword} + @list[@para{keyword, form, syntax} @para{mention the construct directly by name, such as - @samp{expected a variable but found a cond}}] + @samp{expected a variable but found a cond}. Use @samp{syntax} + only when talking about many constructs in aggregate.}] @list[@para{built-in} @para{Nothing --- avoid this term}] @list[@para{macro} @para{Nothing --- avoid this term}]]] From cd153042db136a685ee4470e6fb1507541e7c289 Mon Sep 17 00:00:00 2001 From: Guillaume Marceau Date: Fri, 8 Jul 2011 16:55:21 -0400 Subject: [PATCH 214/441] Merged htdp-lib.scblr and teachpacks/error-composition.scrbl into htdp/htdp.scrbl, to form a single manual titled "Implementing HtDP Teachpacks, Libraries, and Customized Teaching Languages" (cherry picked from commit 2c075978fdc4e28be8689300a5d6f8421f3c3447) --- collects/htdp/htdp.scrbl | 94 ++++------ collects/lang/htdp-lib.scrbl | 174 ------------------- collects/lang/info.rkt | 1 - collects/meta/dist-specs.rkt | 1 - collects/meta/web/www/old-techreports.rkt | 1 - collects/teachpack/error-composition.scrbl | 190 --------------------- collects/teachpack/teachpack.scrbl | 2 - 7 files changed, 33 insertions(+), 430 deletions(-) delete mode 100644 collects/lang/htdp-lib.scrbl delete mode 100755 collects/teachpack/error-composition.scrbl diff --git a/collects/htdp/htdp.scrbl b/collects/htdp/htdp.scrbl index c2f02b2441b..3b74e166189 100644 --- a/collects/htdp/htdp.scrbl +++ b/collects/htdp/htdp.scrbl @@ -1,75 +1,47 @@ #lang scribble/doc -@(require scribble/manual (for-label scheme)) +@(require scribble/manual + (for-label [except-in racket require] + [only-in lang/htdp-beginner require])) -@title[#:style '(toc) #:tag "htdp"]{How to Design HtDP TeachPacks} +@title[#:style 'toc #:tag "htdp"]{Implementing HtDP Teachpacks, Libraries, and Customized Teaching Languages} -@section{What are TeachPacks} +DrRacket has two different mechanisms for making available additional functions +and functionality to students using the teaching languages. -TeachPacks for "How to Design Programs" provide functionality that extends - the teaching languages for specific exercises. The extensions fit smoothly - to the teaching languages so that students don't get nonsensical error - messages or undocumented language features through the backdoor. -@; ----------------------------------------------------------------------------- -@section{Errors} +@itemize[ +@item{HTdP Teachpacks are added to a student's program by clicking on the +``Language'' menu and selecting ``add Teachpack''. Students can then install a +new Teachpack by clicking ``Add Teachpack to List'' and choosing the Teachpack +file from the filesystem.} -@defmodule[htdp/error] +@item{HTdP Libraries are brought into the student's program using a +@racket[require] statement.}] -To provide uniform error messages from the TeachPacks, this module -provides several functions: +Under the hood, HTdP Teachpacks and HTdP Libraries are implemented the same way, +using normal Racket @secref[#:doc '(lib "scribblings/guide/module.scrbl") "modules"]. -@defproc[(check-arg) void?]{ - } +When implementing an extension intended for students, pay a special attention to +the error messages. The error messages of DrRacket's teaching languages go to +great length to ensure that students are never confronted with messages that +uses vocabulary or phrases the students has not learned yet. The teaching languages +also ensure that students cannot stumble by accident onto challenging or +confusing features intended for professional or for higher-level students. -@defproc[(check-arity) void?]{ - } +This manual describes library support for authors of HTdP Teachpacks, libraries, +and customized teaching languages. Use the HTdP +@seclink["error-reporting"]{error reporting functions} to create error messages +that integrate smoothly with those of the teaching languages. Before composing +new error messages, we recommend you read the @seclink["error-guidelines"]{error +message composition guidelines} that informed the design of the error messages +of DrRacket's teaching languages. -@defproc[(check-proc) void?]{ - } +@local-table-of-contents[#:style 'immediate-only] -@defproc[(check-result) void?]{ - } -@defproc[(check-list-list) void?]{ - } +@include-section["error-composition.scrbl"] -@defproc[(check-color) void?]{ - } - -@defproc[(check-fun-res) void?]{ - } - -@defproc[(check-dependencies) void?]{ - } - -@defproc[(natural?) void?]{ - } - -@defproc[(find-non) void?]{ - } - -@defproc[(tp-exn?) void?]{ - } - -@defproc[(number->ord) void?]{ - } - -@section{Testing} - -@; ----------------------------------------------------------------------------- -@defmodule[htdp/testing #:use-sources (test-engine/scheme-tests)] - -The library re-exports the following identifiers from test-engine/scheme-tests: - - @racket[build-test-engine] - @racket[builder] - @racket[display-results] - @racket[error-handler] - @racket[exn:fail:wish] - @racket[generate-report] - @racket[get-test-engine] - @racket[reset-tests] - @racket[run-tests] - @racket[scheme-test-data] - @racket[signature-test-info%] +@include-section["error-reporting.scrbl"] +@include-section["testing.scrbl"] +@include-section["htdp-lib.scrbl"] diff --git a/collects/lang/htdp-lib.scrbl b/collects/lang/htdp-lib.scrbl deleted file mode 100644 index 611a2d2b606..00000000000 --- a/collects/lang/htdp-lib.scrbl +++ /dev/null @@ -1,174 +0,0 @@ -#lang scribble/doc -@(require scribble/manual - scribble/eval - (for-label scheme/base - scheme/contract - scheme/class - scheme/gui/base - lang/posn - lang/imageeq - lang/prim)) - -@(define htdp @italic{How to Design Programs}) -@(define (htdp-ref s) @secref[#:doc '(lib "scribblings/htdp-langs/htdp-langs.scrbl") s]) - -@title{HtDP Languages as Libraries} - -@; ------------------------------------------------------------ -@section{@italic{HtDP} Beginning Student} - -@defmodule[lang/htdp-beginner] - -The @racketmodname[lang/htdp-beginner] module provides the Beginning -Student language for @|htdp|; see @htdp-ref["beginner"]. - -@; ------------------------------------------------------------ -@section{@italic{HtDP} Beginning Student with Abbreviations} - -@defmodule[lang/htdp-beginner-abbr] - -The @racketmodname[lang/htdp-beginner-abbr] module provides the -Beginning Student with Abbreviations language for @|htdp|; see -@htdp-ref["beginner-abbr"]. - -@; ------------------------------------------------------------ -@section{@italic{HtDP} Intermediate Student} - -@defmodule[lang/htdp-intermediate] - -The @racketmodname[lang/htdp-intermediate] module provides the -Intermediate Student language for @|htdp|; see -@htdp-ref["intermediate"]. - -@; ------------------------------------------------------------ -@section{@italic{HtDP} Intermediate Student with Lambda} - -@defmodule[lang/htdp-intermediate-lambda] - -The @racketmodname[lang/htdp-intermediate-lambda] module provides the -Intermediate Student with Lambda language for @|htdp|; see -@htdp-ref["intermediate-lam"]. - -@; ------------------------------------------------------------ -@section{@italic{HtDP} Advanced Student} - -@defmodule[lang/htdp-advanced] - -The @racketmodname[lang/htdp-advanced] module provides the Advanced -Student language for @|htdp|; see @htdp-ref["advanced"]. - -@; ------------------------------------------------------------ -@section{Pretty Big Text (Legacy Language)} - -@defmodule[lang/plt-pretty-big-text] - -The @racketmodname[lang/plt-pretty-big-text] module is similar to the -@italic{HtDP} Advanced Student language, but with more of Racket's -libraries in legacy form. It provides the bindings of -@racketmodname[mzscheme], -@racketmodname[mzlib/etc], @racketmodname[mzlib/file], -@racketmodname[mzlib/list], @racketmodname[mzlib/class], -@racketmodname[mzlib/unit], @racketmodname[mzlib/include], -@racketmodname[mzlib/defmacro], @racketmodname[mzlib/pretty], -@racketmodname[mzlib/string], @racketmodname[mzlib/thread], -@racketmodname[mzlib/math], @racketmodname[mzlib/match], -@racketmodname[mzlib/shared], and @racketmodname[lang/posn]. - -@; ------------------------------------------------------------ - -@section{Pretty Big (Legacy Language)} - -@defmodule[lang/plt-pretty-big] - -The @racketmodname[lang/plt-pretty-big] module extends -@racket[lang/plt-pretty-big-text] with @racketmodname[scheme/gui/base] -and @racketmodname[lang/imageeq]. This language corresponds to the -@onscreen{Pretty Big} legacy language in DrRacket. - -@; ---------------------------------------------------------------------- - -@section{@racket[posn]s in @italic{HtDP} Languages} - -@defmodule[lang/posn] - -@defstruct[posn ([x any/c] [y any/c])]{ - -The @racket[posn] structure type that is also provided by -@racket[lang/htdp-beginner].} - - -@; ---------------------------------------------------------------------- - -@section{Image Equality in @italic{HtDP} Languages} - -@defmodule[lang/imageeq] - -@defproc[(image=? [i1 (is-a?/c image-snip%)] - [i2 (is-a?/c image-snip%)]) - boolean?]{ - -The image-comparison operator that is also provided by -@racket[lang/htdp-beginner].} - -@; ---------------------------------------------------------------------- - -@section{Primitives in @italic{HtDP} Beginner} - -@defmodule[lang/prim] - -The @racketmodname[lang/prim] module several syntactic forms for -use by the implementors of teachpacks, when the teachpack is to be -used with the @|htdp| Beginner Student -languages. In Beginner Student, primitive names (for built-in -procedures) are distinguished from other types of expressions, so that -they can be syntactically restricted to application positions. - -@defform[(define-primitive id proc-id)]{ - - Defines @racket[id] to be a primitive operator whose implementation - is @racket[proc-id], and that takes no procedures as - arguments. Normally, @racket[id] is exported from the teachpack and - @racket[proc-id] is not.} - -@defform[(provide-primitive id)]{ - - Like @racket[define-primitive], but the existing function @racket[id] is - exported as the primitive operator named @racket[id]. An alternative - to @racket[define-primitive].} - -@defform[(provide-primitives id ...)]{ - - Multiple-identifier version of @racket[provide-primitive].} - -@defform[(define-higher-order-primitive id proc-id (arg ...))]{ - - Defines @racket[id] to be a primitive operator whose implementation is - @racket[proc-id]. Normally, @racket[id] is exported from the teachpack and - @racket[proc-id] is not. - - For each non-procedure argument, the corresponding @racket[arg] should be - an underscore. For each procedure argument, the corresponding @racket[arg] - should be the usual name of the procedure. - - @as-examples[ - @racketblock[ - (define-higher-order-primitive convert-gui convert-gui/proc (f2c)) - ]] -} - -@defform[(provide-higher-order-primitive id (arg ...))]{ - - Like @racket[define-higher-order-primitive], but the existing function - @racket[id] is exported as the primitive operator named - @racket[id]. An alternative to @racket[define-higher-order-primitive].} - -@defform[(first-order->higher-order expr)]{ - -If @racket[expr] is an identifier for a first-order function (either a -primitive or a function defined within Beginner Student), produces the -function as a value; otherwise, the form is equivalent to -@racket[expr]. - -This form is mainly useful for implementing syntactic forms that, like -the application of a higher-order primitive, allow first-order bindings -to be used in an expression position.} diff --git a/collects/lang/info.rkt b/collects/lang/info.rkt index 58ca64b5153..57d5102af0e 100644 --- a/collects/lang/info.rkt +++ b/collects/lang/info.rkt @@ -18,4 +18,3 @@ (string-constant how-to-design-programs) (string-constant beginning-student)))) -(define scribblings '(("htdp-lib.scrbl"))) diff --git a/collects/meta/dist-specs.rkt b/collects/meta/dist-specs.rkt index 08d6f992473..13fa0f72f9b 100644 --- a/collects/meta/dist-specs.rkt +++ b/collects/meta/dist-specs.rkt @@ -564,7 +564,6 @@ plt-extras :+= (package: "lang/" #:docs "htdp-langs/") ;; -------------------- htdp, tests, teachpacks plt-extras :+= (package: "htdp/") - (doc: "htdp-lib") (- (package: "teachpack/") (collects: "teachpack/deinprogramm/")) (- (package: "2htdp/") "uchat/") ; Matthias doesn't want this in now diff --git a/collects/meta/web/www/old-techreports.rkt b/collects/meta/web/www/old-techreports.rkt index b062e71658c..5129478488d 100644 --- a/collects/meta/web/www/old-techreports.rkt +++ b/collects/meta/web/www/old-techreports.rkt @@ -176,7 +176,6 @@ (mysterx "*...!" steck "MysterX: Using Windows COM Objects in Scheme") (mzcom "*...!" steck "MzCOM: Scheme as a Windows COM Object") (srfi "*...!" plt "SRFIs: Libraries") - (htdp-lib "*...!" plt "HtDP: Languages as Libraries") (swindle "*...!" plt "Swindle") (syntax "*...!" plt "Syntax: Meta-Programming Helpers") (typed-scheme "*...!" samth "Typed Scheme: Scheme with Static Types") diff --git a/collects/teachpack/error-composition.scrbl b/collects/teachpack/error-composition.scrbl deleted file mode 100755 index 7e901ac1145..00000000000 --- a/collects/teachpack/error-composition.scrbl +++ /dev/null @@ -1,190 +0,0 @@ -#lang scribble/doc -@(require scribble/manual scribble/decode (for-label racket/base)) - -@title[#:tag "error-guidelines"]{ - Error Message Composition Guidelines for Student Languages} - -This section lists some guidelines for writing good error messages for -novices, as informed by @seclink["research"]{our research}. Please -follow these guidelines when you write code that is intended for -beginners, including libraries and teachpacks. It ensures that error -messages from your code fits messages from the student languages and -from other teachpacks. - -@(define (samp . text) @splice[@list{@emph{``@splice[text]''}}]) -@(define (word . text) @splice[@list{‘@splice[text]’}]) - -@section{General Guidelines} - -@itemize[ - @item{Frustrated students will peer at the error message for clues on - how to proceed. Avoid offering hints, and avoid proposing any - specific modification. Students will follow well-meaning-but-wrong - advice uncritically, if only because they have no reason to doubt - the authoritative voice of the tool.} - - @item{Be concise and clear. Students give up reading error messages - if the text is too long, uses obscure words, or employs difficult - grammar.}] - -@section{Message Structure and Form} - -@itemize[ - @item{Start the message with the name of the construct whose - constraint is being violated, followed by a colon.} - - @item{State the constraint that was violated (@samp{expected a...}), - then contrast with what was found. For example, @samp{this function - expects two arguments, but found only one}. If needed, explain how - what was found fails to satisfy the constraint. Write somewhat - anthropomorphically with an objective voice that is neither friendly - nor antagonistic.} - - @item{If an expression contains multiple errors, report the leftmost - error first. E.g., the error in @racket{(define 1 2 3)} is - @samp{expected the variable name, but found a number}, not - @samp{expected 2 parts after define, but found 3}. Before raising - an error about a sub-part of a macro, call - @racket[syntax-local-expand-expression] on sub-expressions to its - left, so that such errors are shown first.} - - @item{State the number of parts instead of saying @samp{found too many - parts}. Write the code necessary to make plurals agree.}] - -@section{Vocabulary} - -@subsection{Permitted Words} - -Use only the following vocabulary words to describe code: - -@nested{@word{function}, @word{variable}, @word{argument}, - @word{function body}, @word{expression}, @word{part}, @word{clause}, - @word{top level}, @word{structure name}, @word{type name}, @word{field - name}, @word{binding}.} - -@itemize[ - @item{Use @word{binding} for the square-braced pair in a @racket{let} - and similar binding forms.} - - @item{Use @word{argument} for actual arguments and @word{variable} for - formal arguments in the body of a definition.} - - @item{Use @word{part} when speaking about an s-expression that is not - an expression, either because it is malformed, because it occurs in - a non-expression position, or because it is a valid piece of syntax - for a macro invocation. A well-formed and well-placed call to a - function, primitive, or macro is not a @word{part}, it is an - @word{expression}.}] - -@subsection{Prohibited Words} - -These guidelines use few terms intentionally, emphasizing commonality -among concepts rather than technical precision (which most students do -not appreciate anyway). - -@tabular[ -@list[ - @list[@para{@bold{Instead of}} - @para{@bold{Use}}] - @list[@para{procedure, primitive name, primitive operator, predicate, - selector, constructor} - @para{@samp{function}''}] - @list[@para{s-expression} - @para{@samp{expression}}] - @list[@para{identifier} - @para{@samp{argument} or @samp{variable}, depending on the use - in the program}] - @list[@para{defined name} - @para{@samp{function} or @samp{variable}}] - @list[@para{sequence} - @para{@samp{at least one (in parentheses)}}] - @list[@para{function header} - @para{@samp{after define}, @samp{after the name}, - @samp{after the first argument}, ...}] - @list[@para{keyword, form, syntax} - @para{mention the construct directly by name, such as - @samp{expected a variable but found a cond}. Use @samp{syntax} - only when talking about many constructs in aggregate.}] - @list[@para{built-in} @para{Nothing --- avoid this term}] - @list[@para{macro} @para{Nothing --- avoid this term}]]] - -@subsection{General Vocabulary Guidelines} - -@itemize[ - @item{Avoid modifiers that are not necessary to disambiguate. Write - @word{variable} instead of @word{local variable}, @word{defined - variable}, or @word{input variable}. Write @word{clause} instead of - @word{question-answer clause}. If they appear necessary for - disambiguation, try to find some other way to achieve this (and drop - the modifier).} - - @item{When introducing macros with sub-parts, reuse existing - vocabulary words, such as @word{clause} or @word{binding} (if - appropriate), or just @word{part}, instead of defining new terms.} - - @item{Use @word{name} only when describing the syntax of a definition - form. For example, the define form in BSL should say @samp{expected - at least one variable after the function name}. Outside of the - definition form, simply use the word @word{function} rather than - distinguish between (1) a function, (2) the variable that binds the - function, and (3) the name of that variable. - - [Rationale: Students learn this distinction when they learn about - lambda. The first is the lambda implicit in the definition, the - second is the variable introduced by the definition that can appear - as the first argument to @racket{set!}, the third is the particular - sequence of letters. But BSL should avoid this complexity, and - ASL’s error messages should maintain consistency with BSL.]} - - @item{Avoid introducing technical vocabulary, even if well-known to a - mathematician.}] - -@section{Punctuation} - -@itemize[ - @item{Do not use any punctuation beyond those of the normal English - language. Do not write @litchar{<>} around type names, and do not - write quotes around keywords.}] - -@section{Runtime Behavior} - -@itemize[ - @item{When specifying a function's behavior, say @samp{the function - takes ... and returns ...}} - - @item{When describing a contract violation, say @samp{the function - expects ... but received ...}} - - @item{As much as possible, identify expressions by the value they - evaluate to, e.g. @samp{the value of @racket{(f x)} is 5}. If it is - necessary to explicate evaluation times, the context discusses - mutable state or order of evaluation, then say that the expressions - @samp{evaluate to} a value. Function calls are a special case of - expression. Prefer @samp{the function call returns}, instead of - @samp{it evaluates to}, except when trying to draw attention to the - evaluation of the arguments.}] - -@section[#:tag "research"]{Supporting Research} - -These guidelines arose from a collections of research studies held at -the Worcester Polytechnic Institute, Brown University, and Northeastern -University. Further experiment details and results are described in: -@itemize[ - @item{@hyperlink["http://www.cs.brown.edu/~sk/Publications/Papers/Published/mfk-mind-lang-novice-inter-error-msg/"]{ - Mind Your Language: On Novices' Interactions with Error - Messages} - - This paper reports on a series of studies that explore beginning - students' interactions with the vocabulary and source-expression - highlighting in DrRacket. Our findings demonstrate that the error - message DrRacket's old error messages significantly failed to convey - information accurately to students.} - - @item{@hyperlink["http://www.cs.brown.edu/~sk/Publications/Papers/Published/mfk-measur-effect-error-msg-novice-sigcse/"]{ - Measuring the Effectiveness of Error Messages Designed for - Novice Programmers} - - This paper presents a fine-grained grading rubric for evaluating the - performance of individual error messages. We applied the rubric to - a course worth of student work, which allowed us to characterize - some ways error messages fail.}] diff --git a/collects/teachpack/teachpack.scrbl b/collects/teachpack/teachpack.scrbl index 43c3f5926e6..b7efae7404a 100644 --- a/collects/teachpack/teachpack.scrbl +++ b/collects/teachpack/teachpack.scrbl @@ -27,5 +27,3 @@ This chapter covers the teachpacks for @italic{How to Design Programs}. @; removed: @include-section["htdc/scribblings/htdc.scrbl"] @include-section["2htdp/scribblings/2htdp.scrbl"] - -@include-section["error-composition.scrbl"] \ No newline at end of file From ec185e60720d43687fe7c673c5fa13765af4f00d Mon Sep 17 00:00:00 2001 From: Guillaume Marceau Date: Fri, 8 Jul 2011 18:36:24 -0400 Subject: [PATCH 215/441] Adding files missing in the previous commit. (cherry picked from commit 9d465ed2987c4fa70aa2be96ff82a09467b5bc3f) --- collects/htdp/error-composition.scrbl | 199 ++++++++++++++++++++++++++ collects/htdp/error-reporting.scrbl | 47 ++++++ collects/htdp/htdp-lib.scrbl | 165 +++++++++++++++++++++ collects/htdp/testing.scrbl | 34 +++++ 4 files changed, 445 insertions(+) create mode 100755 collects/htdp/error-composition.scrbl create mode 100755 collects/htdp/error-reporting.scrbl create mode 100755 collects/htdp/htdp-lib.scrbl create mode 100755 collects/htdp/testing.scrbl diff --git a/collects/htdp/error-composition.scrbl b/collects/htdp/error-composition.scrbl new file mode 100755 index 00000000000..1d3107a898e --- /dev/null +++ b/collects/htdp/error-composition.scrbl @@ -0,0 +1,199 @@ +#lang scribble/doc + +@(require scribble/manual + (for-label [only-in lang/htdp-advanced set!] + [only-in lang/htdp-intermediate let] + [only-in lang/htdp-beginner define] + [only-in racket/base syntax-local-expand-expression] + )) + +@(require scribble/decode) + +@(require [only-in scribble/core table style]) + + +@title[#:tag "error-guidelines"]{Error Message Composition Guidelines} + +This section lists some guidelines for writing good error messages for +novices, as informed by @seclink["research"]{our research}. Please +follow these guidelines when you write code that is intended for +beginners, including libraries and teachpacks. It ensures that error +messages from your code fits messages from the student languages and +from other teachpacks. + +@(define (samp . text) @splice[@list{@emph{``@splice[text]''}}]) +@(define (word . text) @splice[@list{‘@splice[text]’}]) + +@section{General Guidelines} + +@itemize[ + @item{Frustrated students will peer at the error message for clues on + how to proceed. Avoid offering hints, and avoid proposing any + specific modification. Students will follow well-meaning-but-wrong + advice uncritically, if only because they have no reason to doubt + the authoritative voice of the tool.} + + @item{Be concise and clear. Students give up reading error messages + if the text is too long, uses obscure words, or employs difficult + grammar.}] + +@section{Message Structure and Form} + +@itemize[ + @item{Start the message with the name of the construct whose + constraint is being violated, followed by a colon.} + + @item{State the constraint that was violated (@samp{expected a...}), + then contrast with what was found. For example, @samp{this function + expects two arguments, but found only one}. If needed, explain how + what was found fails to satisfy the constraint. Write somewhat + anthropomorphically with an objective voice that is neither friendly + nor antagonistic.} + + @item{If an expression contains multiple errors, report the leftmost + error first. E.g., the error in @racket{(define 1 2 3)} is + @samp{expected the variable name, but found a number}, not + @samp{expected 2 parts after define, but found 3}. Before raising + an error about a sub-part of a macro, call + @racket[syntax-local-expand-expression] on sub-expressions to its + left, so that such errors are shown first.} + + @item{State the number of parts instead of saying @samp{found too many + parts}. Write the code necessary to make plurals agree.}] + +@section{Words For Describing Code} + +Use only the following vocabulary words to describe code: + +@table[(style 'boxed '()) +@list[@list[@para{function} @para{variable} @para{argument} @para{function body}] + @list[@para{expression} @para{part} @para{clause} @para{top level}] + @list[@para{structure name} @para{type name} @para{field name} @para{binding}]]] + +@itemize[ + @item{Use binding for the square-braced pair in a @racket{let} + and similar binding forms.} + + @item{Use @word{argument} for actual arguments and @word{variable} for + formal arguments in the header and body of a definition.} + + @item{Use @word{part} when speaking about an s-expression that is not + an expression, either because it is malformed, because it occurs in + a non-expression position, or because it is a valid piece of syntax + for a macro invocation. A well-formed and well-placed call to a + function, primitive, or macro is not a @word{part}, it is an + @word{expression}.}] + +@section{Words For Describing Runtime Behavior} + +@itemize[ + @item{When specifying a function's behavior, say @samp{the function + takes ... and returns ...}} + + @item{When describing a contract violation, say @samp{the function + expects ... but received ...}} + + @item{As much as possible, identify expressions and the value they evaluate + to, e.g. @samp{the value of @racket{(f x)} is 5}. If it is necessary to + mention evaluation order, such as when the context discusses mutable state, + say that the expression @samp{evaluates to} a value. Function calls + are a special case of expression. Prefer @samp{the function call returns ...} + to @samp{the function call evaluates to ...}, except when trying to draw attention to + the evaluation of the arguments.}] + + +@section{Prohibited Words} + +These guidelines use few terms intentionally, emphasizing commonality +among concepts rather than technical precision (which most students do +not appreciate anyway). + +@table[(style 'boxed '()) +@list[ + @list[@para{@bold{Instead of}} + @para{@bold{Use}}] + @list[@para{procedure, primitive name, primitive operator, predicate, + selector, constructor} + @para{@samp{function}''}] + @list[@para{s-expression} + @para{@samp{expression}}] + @list[@para{identifier} + @para{@samp{argument} or @samp{variable}, depending on the use + in the program}] + @list[@para{defined name} + @para{@samp{function} or @samp{variable}}] + @list[@para{sequence} + @para{@samp{at least one (in parentheses)}}] + @list[@para{function header} + @para{@samp{after define}, @samp{after the name}, + @samp{after the first argument}, ...}] + @list[@para{keyword} + @para{mention the construct directly by name, such as + @samp{expected a variable but found a cond}}] + @list[@para{built-in} @para{Nothing --- avoid this term}] + @list[@para{macro} @para{Nothing --- avoid this term}]]] + +@section{General Vocabulary Guidelines} + +@itemize[ + @item{Avoid modifiers that are not necessary to disambiguate. Write + @word{variable} instead of @word{local variable}, @word{defined + variable}, or @word{input variable}. Write @word{clause} instead of + @word{question-answer clause}. If they appear necessary for + disambiguation, try to find some other way to achieve this (and drop + the modifier).} + + @item{When introducing macros with sub-parts, reuse existing + vocabulary words, such as @word{clause} or @word{binding} (if + appropriate), or just @word{part}, instead of defining new terms.} + + @item{Use @word{name} only when describing the syntax of a definition + form. For example, the define form in BSL should say @samp{expected + at least one variable after the function name}. Outside of the + definition form, simply use the word @word{function} rather than + distinguish between (1) a function, (2) the variable that binds the + function, and (3) the name of that variable. + + [Rationale: Students learn this distinction when they learn about + lambda. The first is the lambda implicit in the definition, the + second is the variable introduced by the definition that can appear + as the first argument to @racket{set!}, the third is the particular + sequence of letters. But BSL should avoid this complexity, and + ASL’s error messages should maintain consistency with BSL.]} + + @item{Avoid introducing technical vocabulary, even if well-known to a + mathematician.}] + +@section{Punctuation} + +@itemize[ + @item{Do not use any punctuation beyond those of the normal English + language. Do not write @litchar{<>} around type names, and do not + write quotes around keywords.}] + +@section[#:tag "research"]{Supporting Research} + +These guidelines arose from a collections of research studies held at +the Worcester Polytechnic Institute, Brown University, and Northeastern +University. Further experiment details and results are described in: +@itemize[ + @item{@hyperlink["http://www.cs.brown.edu/~sk/Publications/Papers/Published/mfk-mind-lang-novice-inter-error-msg/"]{ + Mind Your Language: On Novices' Interactions with Error + Messages} + + This paper reports on a series of studies that explore beginning + students' interactions with the vocabulary and source-expression + highlighting in DrRacket. Our findings demonstrate that the error + message DrRacket's old error messages significantly failed to convey + information accurately to students.} + + @item{@hyperlink["http://www.cs.brown.edu/~sk/Publications/Papers/Published/mfk-measur-effect-error-msg-novice-sigcse/"]{ + Measuring the Effectiveness of Error Messages Designed for + Novice Programmers} + + This paper presents a fine-grained grading rubric for evaluating the + performance of individual error messages. We applied the rubric to + a course worth of student work, which allowed us to characterize + some ways error messages fail.}] + +@; ----------------------------------------------------------------------------- diff --git a/collects/htdp/error-reporting.scrbl b/collects/htdp/error-reporting.scrbl new file mode 100755 index 00000000000..4d46e46f473 --- /dev/null +++ b/collects/htdp/error-reporting.scrbl @@ -0,0 +1,47 @@ +#lang scribble/doc + +@(require scribble/manual) + +@title[#:tag "error-reporting"]{Error Reporting Functions} + +@defmodule[htdp/error] + +To provide uniform error messages from the TeachPacks, this module +provides several functions: + +@defproc[(check-arg) void?]{ + } + +@defproc[(check-arity) void?]{ + } + +@defproc[(check-proc) void?]{ + } + +@defproc[(check-result) void?]{ + } + +@defproc[(check-list-list) void?]{ + } + +@defproc[(check-color) void?]{ + } + +@defproc[(check-fun-res) void?]{ + } + +@defproc[(check-dependencies) void?]{ + } + +@defproc[(natural?) void?]{ + } + +@defproc[(find-non) void?]{ + } + +@defproc[(tp-exn?) void?]{ + } + +@defproc[(number->ord) void?]{ + } + diff --git a/collects/htdp/htdp-lib.scrbl b/collects/htdp/htdp-lib.scrbl new file mode 100755 index 00000000000..7d84f4abf4e --- /dev/null +++ b/collects/htdp/htdp-lib.scrbl @@ -0,0 +1,165 @@ +#lang scribble/doc + +@(require scribble/manual scribble/eval) +@(define (htdp-ref s) @secref[#:doc '(lib "scribblings/htdp-langs/htdp-langs.scrbl") s]) + +@title{HtDP Languages as Libraries} + +@; ------------------------------------------------------------ +@section{@italic{HtDP} Beginning Student} + +@defmodule[lang/htdp-beginner] + +The @racketmodname[lang/htdp-beginner] module provides the Beginning +Student Language; see @htdp-ref["beginner"]. + +@; ------------------------------------------------------------ +@section{@italic{HtDP} Beginning Student with Abbreviations} + +@defmodule[lang/htdp-beginner-abbr] + +The @racketmodname[lang/htdp-beginner-abbr] module provides the +Beginning Student with Abbreviations language; see +@htdp-ref["beginner-abbr"]. + +@; ------------------------------------------------------------ +@section{@italic{HtDP} Intermediate Student} + +@defmodule[lang/htdp-intermediate] + +The @racketmodname[lang/htdp-intermediate] module provides the +Intermediate Student language; see +@htdp-ref["intermediate"]. + +@; ------------------------------------------------------------ +@section{@italic{HtDP} Intermediate Student with Lambda} + +@defmodule[lang/htdp-intermediate-lambda] + +The @racketmodname[lang/htdp-intermediate-lambda] module provides the +Intermediate Student with Lambda language; see +@htdp-ref["intermediate-lam"]. + +@; ------------------------------------------------------------ +@section{@italic{HtDP} Advanced Student} + +@defmodule[lang/htdp-advanced] + +The @racketmodname[lang/htdp-advanced] module provides the Advanced +Student language; see @htdp-ref["advanced"]. + +@; ------------------------------------------------------------ +@section{Pretty Big Text (Legacy Language)} + +@defmodule[lang/plt-pretty-big-text] + +The @racketmodname[lang/plt-pretty-big-text] module is similar to the +@italic{HtDP} Advanced Student language, but with more of Racket's +libraries in legacy form. It provides the bindings of +@racketmodname[mzscheme], +@racketmodname[mzlib/etc], @racketmodname[mzlib/file], +@racketmodname[mzlib/list], @racketmodname[mzlib/class], +@racketmodname[mzlib/unit], @racketmodname[mzlib/include], +@racketmodname[mzlib/defmacro], @racketmodname[mzlib/pretty], +@racketmodname[mzlib/string], @racketmodname[mzlib/thread], +@racketmodname[mzlib/math], @racketmodname[mzlib/match], +@racketmodname[mzlib/shared], and @racketmodname[lang/posn]. + +@; ------------------------------------------------------------ + +@section{Pretty Big (Legacy Language)} + +@defmodule[lang/plt-pretty-big] + +The @racketmodname[lang/plt-pretty-big] module extends +@racket[lang/plt-pretty-big-text] with @racketmodname[scheme/gui/base] +and @racketmodname[lang/imageeq]. This language corresponds to the +@onscreen{Pretty Big} legacy language in DrRacket. + +@; ---------------------------------------------------------------------- + +@section{@racket[posn]s in @italic{HtDP} Languages} + +@defmodule[lang/posn] + +@defstruct[posn ([x any/c] [y any/c])]{ + +The @racket[posn] structure type that is also provided by +@racket[lang/htdp-beginner].} + + +@; ---------------------------------------------------------------------- + +@section{Image Equality in @italic{HtDP} Languages} + +@defmodule[lang/imageeq] + +@defproc[(image=? [i1 (is-a?/c image-snip%)] + [i2 (is-a?/c image-snip%)]) + boolean?]{ + +The image-comparison operator that is also provided by +@racket[lang/htdp-beginner].} + +@; ---------------------------------------------------------------------- + +@section{Primitives in @italic{HtDP} Beginner} + +@defmodule[lang/prim] + +The @racketmodname[lang/prim] module several syntactic forms for +use by the implementors of teachpacks, when the teachpack is to be +used with the Beginner Student +Language. In Beginner Student, primitive names (for built-in +procedures) are distinguished from other types of expressions, so that +they can be syntactically restricted to application positions. + +@defform[(define-primitive id proc-id)]{ + + Defines @racket[id] to be a primitive operator whose implementation + is @racket[proc-id], and that takes no procedures as + arguments. Normally, @racket[id] is exported from the teachpack and + @racket[proc-id] is not.} + +@defform[(provide-primitive id)]{ + + Like @racket[define-primitive], but the existing function @racket[id] is + exported as the primitive operator named @racket[id]. An alternative + to @racket[define-primitive].} + +@defform[(provide-primitives id ...)]{ + + Multiple-identifier version of @racket[provide-primitive].} + +@defform[(define-higher-order-primitive id proc-id (arg ...))]{ + + Defines @racket[id] to be a primitive operator whose implementation is + @racket[proc-id]. Normally, @racket[id] is exported from the teachpack and + @racket[proc-id] is not. + + For each non-procedure argument, the corresponding @racket[arg] should be + an underscore. For each procedure argument, the corresponding @racket[arg] + should be the usual name of the procedure. + + @as-examples[ + @racketblock[ + (define-higher-order-primitive convert-gui convert-gui/proc (f2c)) + ]] +} + +@defform[(provide-higher-order-primitive id (arg ...))]{ + + Like @racket[define-higher-order-primitive], but the existing function + @racket[id] is exported as the primitive operator named + @racket[id]. An alternative to @racket[define-higher-order-primitive].} + +@defform[(first-order->higher-order expr)]{ + +If @racket[expr] is an identifier for a first-order function (either a +primitive or a function defined within Beginner Student), produces the +function as a value; otherwise, the form is equivalent to +@racket[expr]. + +This form is mainly useful for implementing syntactic forms that, like +the application of a higher-order primitive, allow first-order bindings +to be used in an expression position.} diff --git a/collects/htdp/testing.scrbl b/collects/htdp/testing.scrbl new file mode 100755 index 00000000000..43caa5f74d2 --- /dev/null +++ b/collects/htdp/testing.scrbl @@ -0,0 +1,34 @@ +#lang scribble/doc + +@(require scribble/manual) + +@title{Testing} + +@; ----------------------------------------------------------------------------- +@defmodule[htdp/testing #:use-sources (test-engine/scheme-tests)] + +The library re-exports the following identifiers from test-engine/scheme-tests: + + @racket[build-test-engine] + @racket[builder] + @racket[display-results] + @racket[error-handler] + @racket[exn:fail:wish] + @racket[generate-report] + @racket[get-test-engine] + @racket[reset-tests] + @racket[run-tests] + @racket[scheme-test-data] + @racket[signature-test-info%] + + +@(require scribble/eval + (for-label racket/contract + racket/class + racket/gui/base + lang/posn + lang/imageeq + lang/prim)) + +@(define (htdp-ref s) @secref[#:doc '(lib "scribblings/htdp-langs/htdp-langs.scrbl") s]) + From ec279b706efc2c73e222d01b122d7f51b0622306 Mon Sep 17 00:00:00 2001 From: Guillaume Marceau Date: Fri, 8 Jul 2011 23:34:29 -0400 Subject: [PATCH 216/441] Fixed documentations bugs in scribblings/htdp-langs (cherry picked from commit 9053f8f99b79545cfac54fb77fbcdc555bdb7f7c) --- .../scribblings/htdp-langs/advanced.scrbl | 24 +- .../htdp-langs/beginner-abbr.scrbl | 66 +---- .../scribblings/htdp-langs/beginner.scrbl | 10 +- .../htdp-langs/intermediate-lambda.scrbl | 13 +- .../scribblings/htdp-langs/intermediate.scrbl | 16 +- collects/scribblings/htdp-langs/prim-ops.rkt | 249 ++++++++++-------- 6 files changed, 174 insertions(+), 204 deletions(-) diff --git a/collects/scribblings/htdp-langs/advanced.scrbl b/collects/scribblings/htdp-langs/advanced.scrbl index 1edfd1eafc2..2402c36abcc 100644 --- a/collects/scribblings/htdp-langs/advanced.scrbl +++ b/collects/scribblings/htdp-langs/advanced.scrbl @@ -91,8 +91,9 @@ @; ---------------------------------------------------------------------- @section[#:tag "advanced-syntax"]{Syntax for Advanced} -In Advanced, @racket[define] and @racket[lambda] can define functions of zero -arguments, and (naturally) function calls can invoke functions of zero arguments. +In Advanced, @racket[set!] can be used to change variables. @racket[define] and +@racket[lambda] can define functions of zero arguments, and function calls can +invoke functions of zero arguments. @defform[(lambda (variable ...) expression)]{ @@ -155,8 +156,8 @@ the @racket[begin] expression is the value of the first @racket[expression].} @defform[(set! variable expression)]{ Evaluates @racket[expression], and then changes the definition @racket[variable] -to have @racket[expression]'s value. The @racket[variable] must be defined or -bound by @racket[define], @racket[letrec], @racket[let*], or @racket[let].} +to have @racket[expression]'s value. The @racket[variable] must be defined +by @racket[define], @racket[letrec], @racket[let*], or @racket[let].} @defform[(delay expression)]{ @@ -243,7 +244,7 @@ and its value is matched against the pattern in each clause, where the clauses a considered in order. The first clause that contains a matching pattern provides an answer @racket[expression] whose value is the result of the whole @racket[match] expression. This @racket[expression] may reference identifiers -bound in the matching pattern. If none of the clauses contains a matching +defined in the matching pattern. If none of the clauses contains a matching pattern, it is an error.} @; ---------------------------------------------------------------------- @@ -264,22 +265,20 @@ Like @racket[when], but the @racket[body-expression] is evaluated when the @racket[test-expression] produces @racket[false] instead of @racket[true].} -@section[#:tag "advanced-common-syntax"]{Common Syntax} +@section[#:tag "advanced-common-syntax"]{Common Syntaxes} The following syntaxes behave the same in the @emph{Advanced} level as they did in the @secref["intermediate-lam"] level. @(intermediate-forms lambda - quote - quasiquote - unquote - unquote-splicing local letrec let* let - time) + time + define + define-struct) @(define-forms/normal define) @@ -305,7 +304,8 @@ level as they did in the @secref["intermediate-lam"] level. check-member-of check-range require - true false) + true false + #:with-beginner-function-call #f) @; ---------------------------------------- diff --git a/collects/scribblings/htdp-langs/beginner-abbr.scrbl b/collects/scribblings/htdp-langs/beginner-abbr.scrbl index 9fa8c600e3b..8c44194bf64 100644 --- a/collects/scribblings/htdp-langs/beginner-abbr.scrbl +++ b/collects/scribblings/htdp-langs/beginner-abbr.scrbl @@ -42,69 +42,10 @@ @; ---------------------------------------- -@section[#:tag "beginner-abbr-syntax"]{Syntax for Abbreviations} +@section[#:tag "beginner-abbr-syntax"]{Syntaxes for Beginning Student with List Abbreviations} +@(beginner-abbr-forms quote quasiquote unquote unquote-splicing) -@deftogether[( -@defform/none[(unsyntax @elem{@racketvalfont{'}@racket[name]})] -@defform/none[(unsyntax @elem{@racketvalfont{'}@racket[part]})] -@defform[(quote name)] -@defform/none[(quote part)] -)]{ - -A quoted name is a symbol. A quote part is an abbreviation for a nested lists. - -Normally, this quotation is written with a @litchar{'}, like -@racket['(apple banana)], but it can also be written with @racket[quote], like -@racket[(@#,racket[quote] (apple banana))].} - - -@deftogether[( -@defform/none[(unsyntax @elem{@racketvalfont{`}@racket[name]})] -@defform/none[(unsyntax @elem{@racketvalfont{`}@racket[part]})] -@defform[(quasiquote name)] -@defform/none[(quasiquote part)] -)]{ - -Like @racket[quote], but also allows escaping to expression ``unquotes.'' - -Normally, quasi-quotations are written with a backquote, @litchar{`}, like -@racket[`(apple ,(+ 1 2))], but they can also be written with -@racket[quasiquote], like -@racket[(@#,racket[quasiquote] (apple ,(+ 1 2)))].} - - -@deftogether[( -@defform/none[(unsyntax @elem{@racketvalfont{,}@racket[expression]})] -@defform[(unquote expression)] -)]{ - -Under a single quasiquote, @racketfont{,}@racket[expression] escapes from -the quote to include an evaluated expression whose value is inserted -into the abbreviated list. - -Under multiple quasiquotes, @racketfont{,}@racket[expression] is really -the literal @racketfont{,}@racket[expression], decrementing the quasiquote count -by one for @racket[expression]. - -Normally, an unquote is written with @litchar{,}, but it can also be -written with @racket[unquote].} - - -@deftogether[( -@defform/none[(unsyntax @elem{@racketvalfont[",@"]@racket[expression]})] -@defform[(unquote-splicing expression)] -)]{ - -Under a single quasiquote, @racketfont[",@"]@racket[expression] escapes from -the quote to include an evaluated expression whose result is a list to -splice into the abbreviated list. - -Under multiple quasiquotes, a splicing unquote is like an unquote; -that is, it decrements the quasiquote count by one. - -Normally, a splicing unquote is written with @litchar{,}, but it can -also be written with @racket[unquote-splicing].} @; ---------------------------------------------------------------------- @@ -133,7 +74,8 @@ Abbreviations} level as they did in the @secref["beginner"] level. check-member-of check-range require - true false] + true false + #:with-beginner-function-call #t] @; ---------------------------------------- diff --git a/collects/scribblings/htdp-langs/beginner.scrbl b/collects/scribblings/htdp-langs/beginner.scrbl index 00d23b408e6..b14dbbdc495 100644 --- a/collects/scribblings/htdp-langs/beginner.scrbl +++ b/collects/scribblings/htdp-langs/beginner.scrbl @@ -41,6 +41,9 @@ @section[#:tag "beginner-syntax"]{Syntax} +@(define-forms/normal define) +@(define-form/explicit-lambda define lambda) + @deftogether[( @defform/none[(unsyntax @elem{@racketvalfont{'}@racket[name]})] @defform[(quote name)] @@ -49,9 +52,6 @@ A quoted @racket[name] is a symbol. A symbol is a value, just like @racket[0] or @racket[empty].} -@(define-forms/normal define) -@(define-form/explicit-lambda define lambda) - @(prim-forms ("beginner") define lambda @@ -68,7 +68,9 @@ A quoted @racket[name] is a symbol. A symbol is a value, just like check-member-of check-range require - true false) + true false + #:with-beginner-function-call #t + ) @; -------------------------------------------------- diff --git a/collects/scribblings/htdp-langs/intermediate-lambda.scrbl b/collects/scribblings/htdp-langs/intermediate-lambda.scrbl index c4946f79dff..8ebd883d1a3 100644 --- a/collects/scribblings/htdp-langs/intermediate-lambda.scrbl +++ b/collects/scribblings/htdp-langs/intermediate-lambda.scrbl @@ -76,21 +76,19 @@ the function.} @(intermediate-forms lambda - quote - quasiquote - unquote - unquote-splicing local letrec let* let - time) + time + define + define-struct) @; ---------------------------------------------------------------------- -@section[#:tag "intm-w-lambda-common-syntax"]{Common Syntax} +@section[#:tag "intm-w-lambda-common-syntax"]{Common Syntaxes} The following syntaxes behave the same in the @emph{Intermediate with Lambda} level as they did in the @secref["intermediate"] level. @@ -113,7 +111,8 @@ level as they did in the @secref["intermediate"] level. check-member-of check-range require - true false) + true false + #:with-beginner-function-call #f) @section[#:tag "intm-w-lambda-pre-defined"]{Pre-defined Functions} diff --git a/collects/scribblings/htdp-langs/intermediate.scrbl b/collects/scribblings/htdp-langs/intermediate.scrbl index f3321fde379..c53c14c8c5e 100644 --- a/collects/scribblings/htdp-langs/intermediate.scrbl +++ b/collects/scribblings/htdp-langs/intermediate.scrbl @@ -50,24 +50,25 @@ @section[#:tag "intermediate-syntax"]{Syntax for Intermediate} + @(intermediate-forms lambda - quote - quasiquote - unquote - unquote-splicing local letrec let* let - time) + time + define + define-struct) @; ---------------------------------------------------------------------- -@section[#:tag "intermediate-common-syntax"]{Common Syntax} +@section[#:tag "intermediate-common-syntax"]{Common Syntaxes} The following syntaxes behave the same in the @emph{Intermediate} level as they did in the @secref["beginner-abbr"] level. +@(beginner-abbr-forms quote quasiquote unquote unquote-splicing) + @(define-forms/normal define) @(define-form/explicit-lambda define lambda) @@ -88,7 +89,8 @@ did in the @secref["beginner-abbr"] level. check-member-of check-range require - true false) + true false + #:with-beginner-function-call #t) diff --git a/collects/scribblings/htdp-langs/prim-ops.rkt b/collects/scribblings/htdp-langs/prim-ops.rkt index d65998efd5d..1c7b46d5ea4 100644 --- a/collects/scribblings/htdp-langs/prim-ops.rkt +++ b/collects/scribblings/htdp-langs/prim-ops.rkt @@ -14,6 +14,7 @@ prim-forms define-forms/normal define-form/explicit-lambda + beginner-abbr-forms intermediate-forms prim-ops prim-op-defns) @@ -135,7 +136,8 @@ check-range require true - false) + false + #:with-beginner-function-call with-beginner-function-call) (gen-prim-forms #'define-struct @racket[define-struct] (list ds-extra ...) #'cond @racket[cond] #'else @racket[else] @@ -148,7 +150,8 @@ #'check-member-of @racket[check-member-of] #'check-range @racket[check-range] #'require @racket[require] - @racket[true] @racket[false])) + @racket[true] @racket[false] + with-beginner-function-call)) (define (gen-prim-forms define-struct-id define-struct-elem ds-extras cond-id cond-elem @@ -162,28 +165,29 @@ check-member-of-id check-member-of-elem check-range-id check-range-elem require-id require-elem - true-elem false-elem) + true-elem false-elem + with-beginner-function-call) (list @; ---------------------------------------------------------------------- @defform*[#:id [define-struct define-struct-id] [(define-struct structure-name (field-name ...))]]{ - Defines a new structure called @racket[field-name]. The structure's fields are + Defines a new structure called @racket[structure-name]. The structure's fields are named by the @racket[field-name]s. After the @define-struct-elem, the following new functions are available: @itemize[ - @item{@racketidfont{make-}@racket[structure-name] : takes in a number of + @item{@racketidfont{make-}@racket[structure-name] : takes a number of arguments equal to the number of fields in the structure, and creates a new instance of that structure.} - @item{@racket[structure-name]@racketidfont{-}@racket[field-name] : takes in an + @item{@racket[structure-name]@racketidfont{-}@racket[field-name] : takes an instance of the structure and returns the value in the field named by @racket[field-name].} - @item{@racket[structure-name]@racketidfont{?} : takes in any value, and returns + @item{@racket[structure-name]@racketidfont{?} : takes any value, and returns @true-elem if the value is an instance of the structure.} ] @@ -212,16 +216,17 @@ @; ---------------------------------------------------------------------- - @defform/none[(name expression expression ...)]{ - - Calls the function named @racket[name]. The value of the call is the - value of @racket[name]'s body when every one of the function's - variables are replaced by the values of the corresponding - @racket[expression]s. - - The function named @racket[name] must defined before it can be called. The - number of argument @racket[expression]s must be the same as the number of arguments - expected by the function.} + @(if with-beginner-function-call + @defform/none[(name expression expression ...)]{ + Calls the function named @racket[name]. The value of the call is the + value of @racket[name]'s body when every one of the function's + variables are replaced by the values of the corresponding + @racket[expression]s. + + The function named @racket[name] must defined before it can be called. The + number of argument @racket[expression]s must be the same as the number of arguments + expected by the function.} + @elem[]) @; ---------------------------------------------------------------------- @@ -232,7 +237,7 @@ ... [#,else-elem answer-expression])]]{ - Chooses a clause base on a condition by finding the first + Chooses a clause based on some condition. @racket[cond] finds the first @racket[question-expression] that evaluates to @true-elem, then evaluates the corresponding @racket[answer-expression]. @@ -241,8 +246,8 @@ @else-elem clause. If there is no @else-elem, @cond-elem reports an error. If the result of a @racket[question-expression] is neither @true-elem nor @false-elem, @cond-elem also reports an error. - - An @defidform/inline[#,else-id] cannot be used outside of @|cond-elem|.} + + @defidform/inline[#,else-id] cannot be used outside of @|cond-elem|.} @; ---------------------------------------------------------------------- @@ -262,7 +267,7 @@ [(and expression expression expression ...)]]{ Evaluates to @true-elem if all the @racket[expression]s are - @|true-elem|. If any @racket[expression] is false, the @and-elem + @|true-elem|. If any @racket[expression] is @|false-elem|, the @and-elem expression immediately evaluates to @false-elem (and the expressions to the right of that expression are not evaluated.) @@ -277,14 +282,15 @@ Evaluates to @true-elem as soon as one of the @racket[expression]s is @true-elem (and the expressions to the right of that - expression are not evaluated.) If all of the @racket[expression]s are false, - the @or-elem expression evaluates to @racket[false]. + expression are not evaluated.) If all of the @racket[expression]s are @|false-elem|, + the @or-elem expression evaluates to @|false-elem|. If any of the expressions evaluate to a value other than @true-elem or @false-elem, @or-elem reports an error.} @; ---------------------------------------------------------------------- + @defform*[#:id [check-expect check-expect-id] [(check-expect expression expected-expression)]]{ @@ -302,12 +308,12 @@ @defform*[#:id [check-error check-error-id] - [(check-error expression expression) + [(check-error expression match-expression) (#,check-error-elem expression)]]{ - Checks that the first @racket[expression] reports an error, - where the error messages matches the string produced by the second - @racket[expression], if it is present.} + Checks that the @racket[expression] reports an error, + where the error messages matches the string produced by the + @racket[matchexpression], if it is present.} @defform*[#:id [check-member-of check-member-of-id] @@ -318,11 +324,11 @@ @defform*[#:id [check-range check-range-id] - [(check-range expression expression expression)]]{ + [(check-range expression low-expression high-expression)]]{ Checks that the first @racket[expression] produces a number in - between the numbers produced by the second and third - @racket[expression]s, inclusive.} + between the numbers produced by @racket[low-expression] and + @racket[high-expression], inclusive.} @; ---------------------------------------------------------------------- @@ -369,111 +375,122 @@ ;; ---------------------------------------- +(define-syntax-rule + (beginner-abbr-forms quote quasiquote unquote unquote-splicing) + (gen-beginner-abbr-forms #'quote @racket[quote] + #'quasiquote @racket[quasiquote] + #'unquote @racket[unquote] + #'unquote-splicing @racket[unquote-splicing])) + +(define (gen-beginner-abbr-forms quote-id quote-elem + quasiquote-id quasiquote-elem + unquote-id unquote-elem + unquote-splicing-id unquote-splicing-elem) + + (list + @deftogether[( + @defform/none[(unsyntax @elem{@racketvalfont{'}@racket[name]})] + @defform/none[(unsyntax @elem{@racketvalfont{'}@racket[part]})] + @defform[#:id [quote quote-id] (quote name)] + @defform/none[(#,quote-elem part)] + )]{ + + A quoted name is a symbol. A quoted part is an abbreviation for a nested lists. + + Normally, this quotation is written with a @litchar{'}, like + @racket['(apple banana)], but it can also be written with + @quote-elem, like @racket[(@#,quote-elem (apple banana))].} + + + @deftogether[( + @defform/none[(unsyntax @elem{@racketvalfont{`}@racket[name]})] + @defform/none[(unsyntax @elem{@racketvalfont{`}@racket[part]})] + @defform[#:id [quasiquote quasiquote-id] + (quasiquote name)] + @defform/none[(#,quasiquote-elem part)] + )]{ + + Like @quote-elem, but also allows escaping to expression + ``unquotes.'' + + Normally, quasi-quotations are written with a backquote, + @litchar{`}, like @racket[`(apple ,(+ 1 2))], but they can also be + written with @quasiquote-elem, like + @racket[(@quasiquote-elem (apple ,(+ 1 2)))].} + + + @deftogether[( + @defform/none[(unsyntax @elem{@racketvalfont{,}@racket[expression]})] + @defform[#:id [unquote unquote-id] + (unquote expression)] + )]{ + + Under a single quasiquote, @racketfont{,}@racket[expression] + escapes from the quote to include an evaluated expression whose + result is inserted into the abbreviated list. + + Under multiple quasiquotes, @racketfont{,}@racket[expression] is + really the literal @racketfont{,}@racket[expression], decrementing + the quasiquote count by one for @racket[expression]. + + Normally, an unquote is written with @litchar{,}, but it can also be + written with @|unquote-elem|.} + + + @deftogether[( + @defform/none[(unsyntax @elem{@racketvalfont[",@"]@racket[expression]})] + @defform[#:id [unquote-splicing unquote-splicing-id] + (unquote-splicing expression)] + )]{ + + Under a single quasiquote, @racketfont[",@"]@racket[expression] + escapes from the quote to include an evaluated expression whose + result is a list to splice into the abbreviated list. + + Under multiple quasiquotes, a splicing unquote is like an unquote; + that is, it decrements the quasiquote count by one. + + Normally, a splicing unquote is written with @litchar{,}, but it + can also be written with @|unquote-splicing-elem|.} + + )) + + (define-syntax-rule (intermediate-forms lambda - quote - quasiquote - unquote - unquote-splicing local letrec let* let - time) + time + define + define-struct) (gen-intermediate-forms #'lambda @racket[lambda] - #'quote @racket[quote] - #'quasiquote @racket[quasiquote] - #'unquote @racket[unquote] - #'unquote-splicing @racket[unquote-splicing] #'local @racket[local] #'letrec @racket[letrec] #'let* @racket[let*] #'let @racket[let] - #'time @racket[time])) + #'time @racket[time] + @racket[define] + @racket[define-struct])) (define (gen-intermediate-forms lambda-id lambda-elem - quote-id quote-elem - quasiquote-id quasiquote-elem - unquote-id unquote-elem - unquote-splicing-id unquote-splicing-elem local-id local-elem letrec-id letrec-elem let*-id let*-elem let-id let-elem - time-id time-elem) + time-id time-elem + define-elem + define-struct-elem + ) (list - @deftogether[( - @defform/none[(unsyntax @elem{@racketvalfont{'}@racket[name]})] - @defform/none[(unsyntax @elem{@racketvalfont{'}@racket[part]})] - @defform[#:id [quote quote-id] (quote name)] - @defform/none[(#,quote-elem part)] - )]{ - - A quoted name is a symbol. A quote part is an abbreviation for a nested lists. - - Normally, this quotation is written with a @litchar{'}, like - @racket['(apple banana)], but it can also be written with - @quote-elem, like @racket[(@#,quote-elem (apple banana))].} - - - @deftogether[( - @defform/none[(unsyntax @elem{@racketvalfont{`}@racket[name]})] - @defform/none[(unsyntax @elem{@racketvalfont{`}@racket[part]})] - @defform[#:id [quasiquote quasiquote-id] - (quasiquote name)] - @defform/none[(#,quasiquote-elem part)] - )]{ - - Like @quote-elem, but also allows escaping to expression - ``unquotes.'' - - Normally, quasi-quotations are written with a backquote, - @litchar{`}, like @racket[`(apple ,(+ 1 2))], but they can also be - written with @quasiquote-elem, like - @racket[(@quasiquote-elem (apple ,(+ 1 2)))].} - - - @deftogether[( - @defform/none[(unsyntax @elem{@racketvalfont{,}@racket[expression]})] - @defform[#:id [unquote unquote-id] - (unquote expression)] - )]{ - - Under a single quasiquote, @racketfont{,}@racket[expression] - escapes from the quote to include an evaluated expression whose - result is inserted into the abbreviated list. - - Under multiple quasiquotes, @racketfont{,}@racket[expression] is - really the literal @racketfont{,}@racket[expression], decrementing - the quasiquote count by one for @racket[expression]. - - Normally, an unquote is written with @litchar{,}, but it can also be - written with @|unquote-elem|.} - - - @deftogether[( - @defform/none[(unsyntax @elem{@racketvalfont[",@"]@racket[expression]})] - @defform[#:id [unquote-splicing unquote-splicing-id] - (unquote-splicing expression)] - )]{ - - Under a single quasiquote, @racketfont[",@"]@racket[expression] - escapes from the quote to include an evaluated expression whose - result is a list to splice into the abbreviated list. - - Under multiple quasiquotes, a splicing unquote is like an unquote; - that is, it decrements the quasiquote count by one. - - Normally, a splicing unquote is written with @litchar{,}, but it - can also be written with @|unquote-splicing-elem|.} - @defform[#:id [local local-id] (local [definition ...] expression)]{ Groups related definitions for use in @racket[expression]. Each - @racket[definition] can be either a variable definition, a function - definition, or a structure definition, using the usual syntax. + @racket[definition] can be either a @define-elem or a + @|define-struct-elem|. When evaluating @local-elem, each @racket[definition] is evaluated in order, and finally the body @racket[expression] is @@ -585,6 +602,14 @@ defined with " (racket define) " or " (racket define-struct) ", or any one of:") (namespace-syntax-introduce (datum->syntax #f (car func)))))) not-in-ns)) (let ([desc-strs (cddr func)]) + (printf "prim-ops:605 ~v~n" (list id (cadr func) + (typeset-type + (cadr + func)) + (to-paragraph + (typeset-type + (cadr + func))))) (defthing/proc id (to-paragraph (typeset-type (cadr func))) From 020469a7169bf890f6ce1c07ad98e6fbafe368f7 Mon Sep 17 00:00:00 2001 From: Guillaume Marceau Date: Sat, 9 Jul 2011 01:37:32 -0400 Subject: [PATCH 217/441] Remove spurious printf left in 9053f8f9 (cherry picked from commit 3815862a818f35832ff979a04731037050037fc1) --- collects/scribblings/htdp-langs/prim-ops.rkt | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/collects/scribblings/htdp-langs/prim-ops.rkt b/collects/scribblings/htdp-langs/prim-ops.rkt index 1c7b46d5ea4..3d78579f8c5 100644 --- a/collects/scribblings/htdp-langs/prim-ops.rkt +++ b/collects/scribblings/htdp-langs/prim-ops.rkt @@ -602,15 +602,7 @@ defined with " (racket define) " or " (racket define-struct) ", or any one of:") (namespace-syntax-introduce (datum->syntax #f (car func)))))) not-in-ns)) (let ([desc-strs (cddr func)]) - (printf "prim-ops:605 ~v~n" (list id (cadr func) - (typeset-type - (cadr - func)) - (to-paragraph - (typeset-type - (cadr - func))))) - (defthing/proc +3 (defthing/proc id (to-paragraph (typeset-type (cadr func))) desc-strs))))) From 2b05b96b507eccabbc73c0fb5aab7137ff6605da Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Fri, 8 Jul 2011 20:00:02 -0600 Subject: [PATCH 218/441] fix dependency (cherry picked from commit 50bd06af9a13b51160389efe9a2674a820978a66) --- src/racket/src/Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/racket/src/Makefile.in b/src/racket/src/Makefile.in index be94275bd15..29d6bbf8a91 100644 --- a/src/racket/src/Makefile.in +++ b/src/racket/src/Makefile.in @@ -409,5 +409,5 @@ type.@LTO@: $(COMMON_HEADERS) \ $(srcdir)/../src/stypes.h $(srcdir)/mzmark_type.inc vector.@LTO@: $(COMMON_HEADERS) \ $(srcdir)/../src/stypes.h -vadliate.@LTO@: $(COMMON_HEADERS) \ +validate.@LTO@: $(COMMON_HEADERS) \ $(srcdir)/../src/stypes.h $(srcdir)/mzmark_validate.inc From 6bbfbad6a79e3306341e6ad52a8b537fc507b73a Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sat, 9 Jul 2011 08:47:21 -0600 Subject: [PATCH 219/441] export `step-count?' Merge to 5.1.2 (cherry picked from commit 8271f7b1820060783916ed62cac5d426af09b6ca) --- collects/2htdp/private/img-err.rkt | 1 + 1 file changed, 1 insertion(+) diff --git a/collects/2htdp/private/img-err.rkt b/collects/2htdp/private/img-err.rkt index 06aa4360465..62f13518dc2 100644 --- a/collects/2htdp/private/img-err.rkt +++ b/collects/2htdp/private/img-err.rkt @@ -11,6 +11,7 @@ pen-cap? pen-join? real-valued-posn? + step-count? check-mode/color-combination) (require htdp/error From bc607e96e98941f3fcc78f8b05062124fe13e29b Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Mon, 11 Jul 2011 15:03:05 -0400 Subject: [PATCH 220/441] New Racket version 5.1.1.900. --- src/worksp/gracket/gracket.manifest | 2 +- src/worksp/gracket/gracket.rc | 8 ++++---- src/worksp/mzcom/mzcom.rc | 8 ++++---- src/worksp/mzcom/mzobj.rgs | 6 +++--- src/worksp/racket/racket.manifest | 2 +- src/worksp/racket/racket.rc | 8 ++++---- src/worksp/starters/start.rc | 8 ++++---- 7 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/worksp/gracket/gracket.manifest b/src/worksp/gracket/gracket.manifest index acfda735ec5..f385cd85e23 100644 --- a/src/worksp/gracket/gracket.manifest +++ b/src/worksp/gracket/gracket.manifest @@ -1,6 +1,6 @@ - diff --git a/src/worksp/gracket/gracket.rc b/src/worksp/gracket/gracket.rc index b9c87bf2b2f..fefc4dffc3f 100644 --- a/src/worksp/gracket/gracket.rc +++ b/src/worksp/gracket/gracket.rc @@ -17,8 +17,8 @@ APPLICATION ICON DISCARDABLE "gracket.ico" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 5,1,1,9 - PRODUCTVERSION 5,1,1,9 + FILEVERSION 5,1,1,900 + PRODUCTVERSION 5,1,1,900 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -36,11 +36,11 @@ BEGIN VALUE "CompanyName", "PLT Scheme Inc.\0" VALUE "FileDescription", "Racket GUI application\0" VALUE "InternalName", "GRacket\0" - VALUE "FileVersion", "5, 1, 1, 9\0" + VALUE "FileVersion", "5, 1, 1, 900\0" VALUE "LegalCopyright", "Copyright © 1995-2011\0" VALUE "OriginalFilename", "GRacket.exe\0" VALUE "ProductName", "Racket\0" - VALUE "ProductVersion", "5, 1, 1, 9\0" + VALUE "ProductVersion", "5, 1, 1, 900\0" END END BLOCK "VarFileInfo" diff --git a/src/worksp/mzcom/mzcom.rc b/src/worksp/mzcom/mzcom.rc index 8d7e6e5d3b5..a4d5c58f1db 100644 --- a/src/worksp/mzcom/mzcom.rc +++ b/src/worksp/mzcom/mzcom.rc @@ -53,8 +53,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 5,1,1,9 - PRODUCTVERSION 5,1,1,9 + FILEVERSION 5,1,1,900 + PRODUCTVERSION 5,1,1,900 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -70,12 +70,12 @@ BEGIN BLOCK "040904b0" BEGIN VALUE "FileDescription", "MzCOM Module" - VALUE "FileVersion", "5, 1, 1, 9" + VALUE "FileVersion", "5, 1, 1, 900" VALUE "InternalName", "MzCOM" VALUE "LegalCopyright", "Copyright 2000-2011 PLT (Paul Steckler)" VALUE "OriginalFilename", "MzCOM.EXE" VALUE "ProductName", "MzCOM Module" - VALUE "ProductVersion", "5, 1, 1, 9" + VALUE "ProductVersion", "5, 1, 1, 900" END END BLOCK "VarFileInfo" diff --git a/src/worksp/mzcom/mzobj.rgs b/src/worksp/mzcom/mzobj.rgs index 64c2f981fec..57221f610c0 100644 --- a/src/worksp/mzcom/mzobj.rgs +++ b/src/worksp/mzcom/mzobj.rgs @@ -1,19 +1,19 @@ HKCR { - MzCOM.MzObj.5.1.1.9 = s 'MzObj Class' + MzCOM.MzObj.5.1.1.900 = s 'MzObj Class' { CLSID = s '{A3B0AF9E-2AB0-11D4-B6D2-0060089002FE}' } MzCOM.MzObj = s 'MzObj Class' { CLSID = s '{A3B0AF9E-2AB0-11D4-B6D2-0060089002FE}' - CurVer = s 'MzCOM.MzObj.5.1.1.9' + CurVer = s 'MzCOM.MzObj.5.1.1.900' } NoRemove CLSID { ForceRemove {A3B0AF9E-2AB0-11D4-B6D2-0060089002FE} = s 'MzObj Class' { - ProgID = s 'MzCOM.MzObj.5.1.1.9' + ProgID = s 'MzCOM.MzObj.5.1.1.900' VersionIndependentProgID = s 'MzCOM.MzObj' ForceRemove 'Programmable' LocalServer32 = s '%MODULE%' diff --git a/src/worksp/racket/racket.manifest b/src/worksp/racket/racket.manifest index db7b8f46cf9..38a36b1736b 100644 --- a/src/worksp/racket/racket.manifest +++ b/src/worksp/racket/racket.manifest @@ -1,6 +1,6 @@ - diff --git a/src/worksp/racket/racket.rc b/src/worksp/racket/racket.rc index 4ef0a91c8a2..d70780fd27c 100644 --- a/src/worksp/racket/racket.rc +++ b/src/worksp/racket/racket.rc @@ -29,8 +29,8 @@ APPLICATION ICON DISCARDABLE "racket.ico" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 5,1,1,9 - PRODUCTVERSION 5,1,1,9 + FILEVERSION 5,1,1,900 + PRODUCTVERSION 5,1,1,900 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -48,11 +48,11 @@ BEGIN VALUE "CompanyName", "PLT Scheme Inc.\0" VALUE "FileDescription", "Racket application\0" VALUE "InternalName", "Racket\0" - VALUE "FileVersion", "5, 1, 1, 9\0" + VALUE "FileVersion", "5, 1, 1, 900\0" VALUE "LegalCopyright", "Copyright © 1995-2011\0" VALUE "OriginalFilename", "racket.exe\0" VALUE "ProductName", "Racket\0" - VALUE "ProductVersion", "5, 1, 1, 9\0" + VALUE "ProductVersion", "5, 1, 1, 900\0" END END BLOCK "VarFileInfo" diff --git a/src/worksp/starters/start.rc b/src/worksp/starters/start.rc index 6c204f47136..8fa54b7f8eb 100644 --- a/src/worksp/starters/start.rc +++ b/src/worksp/starters/start.rc @@ -22,8 +22,8 @@ APPLICATION ICON DISCARDABLE "mzstart.ico" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 5,1,1,9 - PRODUCTVERSION 5,1,1,9 + FILEVERSION 5,1,1,900 + PRODUCTVERSION 5,1,1,900 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -45,7 +45,7 @@ BEGIN #ifdef MZSTART VALUE "FileDescription", "Racket Launcher\0" #endif - VALUE "FileVersion", "5, 1, 1, 9\0" + VALUE "FileVersion", "5, 1, 1, 900\0" #ifdef MRSTART VALUE "InternalName", "mrstart\0" #endif @@ -60,7 +60,7 @@ BEGIN VALUE "OriginalFilename", "MzStart.exe\0" #endif VALUE "ProductName", "Racket\0" - VALUE "ProductVersion", "5, 1, 1, 9\0" + VALUE "ProductVersion", "5, 1, 1, 900\0" END END BLOCK "VarFileInfo" From 09113654030aea4772fd86f1ecc7fa225a086110 Mon Sep 17 00:00:00 2001 From: Carl Eastlund Date: Sat, 9 Jul 2011 14:46:58 -0400 Subject: [PATCH 221/441] Corrected documentation of quote-module-name to indicate that it does not produce collection and planet-relative paths on its own. Deprecated quote-module-path, and replaced existing uses of it with quote-module-name. (cherry picked from commit 2e6a608539f5ef39a9ff821d95163ea4660da952) --- collects/mzlib/unit.rkt | 2 +- collects/racket/contract/private/arr-i.rkt | 2 +- collects/racket/contract/private/base.rkt | 2 +- collects/racket/contract/private/provide.rkt | 4 +- .../syntax/parse/experimental/provide.rkt | 2 +- collects/syntax/scribblings/srcloc.scrbl | 57 +++++++++++++------ .../typed-scheme/typecheck/tc-toplevel.rkt | 2 +- collects/unstable/wrapc.rkt | 4 +- 8 files changed, 48 insertions(+), 27 deletions(-) diff --git a/collects/mzlib/unit.rkt b/collects/mzlib/unit.rkt index cd342989c55..8f18c8fa1cc 100644 --- a/collects/mzlib/unit.rkt +++ b/collects/mzlib/unit.rkt @@ -1684,7 +1684,7 @@ (((wrap-code ...) ...) (map (λ (os ov tbs) (define rename-bindings - (get-member-bindings def-table os #'(quote-module-path))) + (get-member-bindings def-table os #'(quote-module-name))) (map (λ (tb i v c) (if c (with-syntax ([ctc-stx diff --git a/collects/racket/contract/private/arr-i.rkt b/collects/racket/contract/private/arr-i.rkt index 7e40dda29b9..32c0b546b4c 100644 --- a/collects/racket/contract/private/arr-i.rkt +++ b/collects/racket/contract/private/arr-i.rkt @@ -786,7 +786,7 @@ keywordlist #'(scname ...)))] [stxclass (in-list (attribute scname.value))] [rec (in-list (attribute c.rec))]) diff --git a/collects/syntax/scribblings/srcloc.scrbl b/collects/syntax/scribblings/srcloc.scrbl index 61e7bddb5de..803c0accf9b 100644 --- a/collects/syntax/scribblings/srcloc.scrbl +++ b/collects/syntax/scribblings/srcloc.scrbl @@ -2,7 +2,8 @@ @(require scribble/eval (for-label racket/base syntax/srcloc - syntax/location)) + syntax/location + setup/path-to-relative)) @(define unsyntax #f) @@ -290,43 +291,63 @@ the whole macro application if no @racket[form] is given. } -@deftogether[( -@defform[(quote-module-name)] -@defform[(quote-module-path)] -)]{ +@defform[(quote-module-name)]{ -Quote the name of the module in which the form is compiled. The -@racket[quote-module-name] form produces a string or a symbol, while -@racket[quote-module-path] produces a @tech[#:doc reference-path]{module path}. - -These forms use relative names for modules found in the collections or PLaneT -cache; their results are suitable for printing, but not for accessing libraries -programmatically, such as via @racket[dynamic-require]. +Quotes the name of the module in which the form is compiled as a path or symbol, +or @racket['top-level] when used outside of a module. To produce a name +suitable for use in printed messages, apply +@racket[path->relative-string/library] when the result is a path. @defexamples[#:eval (new-evaluator) (module A racket (require syntax/location) (define-syntax-rule (name) (quote-module-name)) - (define-syntax-rule (path) (quote-module-path)) (define a-name (name)) - (define a-path (path)) (provide (all-defined-out))) (require 'A) a-name -a-path (module B racket (require syntax/location) (require 'A) (define b-name (name)) - (define b-path (path)) (provide (all-defined-out))) (require 'B) b-name -b-path (quote-module-name) -(quote-module-path) [current-namespace (module->namespace (quote 'A))] (quote-module-name) +] + +} + +@defform[(quote-module-path)]{ + +@emph{This form is deprecated, as it does not produce module paths that reliably +indicate collections or PLaneT packages. Please use @racket[quote-module-name] +and @racket[path->relative-string/library] to produce human-readable module +names in printed messages.} + +Quotes the name of the module in which the form is compiled as a +@tech[#:doc reference-path]{module path} using @racket[quote] or @racket[file], +or produces @racket['top-level] when used outside of a module. + +@defexamples[#:eval (new-evaluator) +(module A racket + (require syntax/location) + (define-syntax-rule (path) (quote-module-path)) + (define a-path (path)) + (provide (all-defined-out))) +(require 'A) +a-path +(module B racket + (require syntax/location) + (require 'A) + (define b-path (path)) + (provide (all-defined-out))) +(require 'B) +b-path +(quote-module-path) +[current-pathspace (module->pathspace (quote 'A))] (quote-module-path) ] diff --git a/collects/typed-scheme/typecheck/tc-toplevel.rkt b/collects/typed-scheme/typecheck/tc-toplevel.rkt index 5bbb4a6e0fd..e143bcb9e60 100644 --- a/collects/typed-scheme/typecheck/tc-toplevel.rkt +++ b/collects/typed-scheme/typecheck/tc-toplevel.rkt @@ -310,7 +310,7 @@ #`(begin #,(if (null? (syntax-e #'(new-provs ...))) #'(begin) - #'(define the-variable-reference (quote-module-path))) + #'(define the-variable-reference (quote-module-name))) #,(env-init-code syntax-provide? provide-tbl def-tbl) #,(tname-env-init-code) #,(talias-env-init-code) diff --git a/collects/unstable/wrapc.rkt b/collects/unstable/wrapc.rkt index e80c88f2359..4407da72f82 100644 --- a/collects/unstable/wrapc.rkt +++ b/collects/unstable/wrapc.rkt @@ -40,7 +40,7 @@ [_ #f])] [else #f])]) (base-wrap-expr/c expr ctc-expr - #:positive #'(quote-module-path) + #:positive #'(quote-module-name) #:negative neg-source-expr #:expr-name (cond [(and expr-name macro-name) (format "~a of ~a" expr-name macro-name)] @@ -64,7 +64,7 @@ (define (get-source-expr source ctx) (cond [(eq? source 'use-site) - #'(quote-module-path)] + #'(quote-module-name)] [(eq? source 'unknown) #'(quote "unknown")] [(eq? source 'from-macro) From 18e9e79aa038e6c2d733e710eb1339d6f185f27d Mon Sep 17 00:00:00 2001 From: Carl Eastlund Date: Fri, 8 Jul 2011 22:44:57 -0400 Subject: [PATCH 222/441] Changed default blame formatter to report blame parties relative to collection and planet directories where appropriate. Added a test for this behavior. (cherry picked from commit b3136095ea146c0aa831c2de7054da0cb896aaa0) --- collects/racket/contract/private/blame.rkt | 13 +++++++++---- collects/tests/racket/contract-test.rktl | 12 ++++++++++-- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/collects/racket/contract/private/blame.rkt b/collects/racket/contract/private/blame.rkt index cc45546817c..d05f5e59eb1 100644 --- a/collects/racket/contract/private/blame.rkt +++ b/collects/racket/contract/private/blame.rkt @@ -1,6 +1,6 @@ #lang racket/base -(require syntax/srcloc racket/pretty) +(require syntax/srcloc racket/pretty setup/path-to-relative) (provide blame? make-blame @@ -63,8 +63,8 @@ b))) (define (default-blame-format b x custom-message) - (let* ([source-message (regexp-replace #rx": *$" (source-location->prefix (blame-source b)) "")] - [positive-message (show/display (blame-positive b))] + (let* ([source-message (source-location->string (blame-source b))] + [positive-message (show/display (convert-blame-party (blame-positive b)))] [contract-message (format " contract: ~a" (show/write (blame-contract b)))] [contract-message+at (if (regexp-match #rx"\n$" contract-message) @@ -98,7 +98,7 @@ "\n")) contract-message+at)] [else - (define negative-message (show/display (blame-negative b))) + (define negative-message (show/display (convert-blame-party (blame-negative b)))) (define start-of-message (if (blame-value b) (format "~a: contract violation," (blame-value b)) @@ -141,6 +141,11 @@ (pretty-write v port) (get-output-string port))) +(define (convert-blame-party x) + (cond + [(path? x) (path->relative-string/library x)] + [else x])) + (define show/display (show pretty-format/display)) (define show/write (show pretty-format/write)) diff --git a/collects/tests/racket/contract-test.rktl b/collects/tests/racket/contract-test.rktl index 6a3689c306d..cad3bd360f0 100644 --- a/collects/tests/racket/contract-test.rktl +++ b/collects/tests/racket/contract-test.rktl @@ -2933,6 +2933,14 @@ (λ (x) (and (exn? x) (regexp-match (regexp-quote "|x y|: 123456789") (exn-message x))))) + + ;; test to make sure the collects directories are appropriately prefixed + (contract-error-test + #'(contract symbol? "not a symbol" 'pos 'neg 'not-a-symbol #'here) + (lambda (x) + (and (exn? x) + (regexp-match? #px"" + (exn-message x))))) (test/neg-blame '->i-protect-shared-state @@ -11447,7 +11455,7 @@ so that propagation occurs. (eval '(g 12))) (λ (x) (and (exn? x) - (regexp-match #rx"^g.*contract from 'pce9-bug" (exn-message x))))) + (regexp-match #rx"^g.*contract from pce9-bug" (exn-message x))))) (contract-error-test #'(begin @@ -11460,7 +11468,7 @@ so that propagation occurs. (eval '(g 'a))) (λ (x) (and (exn? x) - (regexp-match #rx"^g.*contract from 'pce10-bug" (exn-message x))))) + (regexp-match #rx"^g.*contract from pce10-bug" (exn-message x))))) (contract-eval `(,test From 6d79e54a4d5d93e7522e784ab8f03df7d108c644 Mon Sep 17 00:00:00 2001 From: Carl Eastlund Date: Fri, 8 Jul 2011 01:22:26 -0400 Subject: [PATCH 223/441] Changed source-location->string and ->prefix to use path->relative-string/library to produce collection and planet-relative source names. (cherry picked from commit 00a6442712759ebabe56fc57b58bcf3c93d1e914) --- collects/syntax/srcloc.rkt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/collects/syntax/srcloc.rkt b/collects/syntax/srcloc.rkt index c81c099b778..efd1da1ae13 100644 --- a/collects/syntax/srcloc.rkt +++ b/collects/syntax/srcloc.rkt @@ -37,6 +37,9 @@ ) +(require + setup/path-to-relative) + (define (source-location? x) (process-source-location x good? bad? 'source-location?)) @@ -163,7 +166,9 @@ (define ((good-string default) x src line col pos span) (format "~a~a" - (or src default) + (cond + [(path-string? src) (path->relative-string/library src)] + [else (or src default)]) (if line (if col (format ":~a.~a" line col) From d7fcd2f14951bf4ca78a238a4bb6bebbfb1fdd3c Mon Sep 17 00:00:00 2001 From: Carl Eastlund Date: Sat, 9 Jul 2011 17:28:04 -0400 Subject: [PATCH 224/441] Updated unit contract tests to not rely on a specific format for names of blamed modules in contract error messages. (cherry picked from commit d5b852c386ab05a829c07465710ca520c2dbefae) --- collects/tests/units/test-unit-contracts.rktl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/collects/tests/units/test-unit-contracts.rktl b/collects/tests/units/test-unit-contracts.rktl index 3411f14978f..6d89cc7f3fd 100644 --- a/collects/tests/units/test-unit-contracts.rktl +++ b/collects/tests/units/test-unit-contracts.rktl @@ -626,8 +626,8 @@ (require (prefix-in m2: 'm2)) (m2:z) -(test-contract-error "'m2" "U@" "not a symbol" (m2:w)) -(test-contract-error "'m1" "U@" "not a string" (m2:v)) +(test-contract-error "m2" "U@" "not a symbol" (m2:w)) +(test-contract-error "m1" "U@" "not a string" (m2:v)) (test-syntax-error "no y in sig1" (unit/c (import (sig1 [y number?])) @@ -700,7 +700,7 @@ (require (prefix-in m4: 'm4)) -(test-contract-error "'m4" "f" "not an x" +(test-contract-error "m4" "f" "not an x" (m4:f 3)) (require (prefix-in m3: 'm3)) From 94770d3a085a74d873b7713b7c292050843db536 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sat, 9 Jul 2011 20:09:41 -0600 Subject: [PATCH 225/441] fix `hash-ref' bugs on immutable `eq?'-based tables There were two: * new: after finding a hash code, the key wasn't always checked to be `eq?' to the desired key * old: the hash code wan't downshifted by 2, so changes in the low two bits (like when a pair is determined to start a list) could break lookup Merge to 5.1.2 (cherry picked from commit e765231dadb428688ce12e9ca66b48835dba07e4) --- collects/tests/racket/basic.rktl | 21 ++++++++++++++++++--- src/racket/src/hash.c | 4 +++- src/racket/src/thread.c | 8 +------- 3 files changed, 22 insertions(+), 11 deletions(-) diff --git a/collects/tests/racket/basic.rktl b/collects/tests/racket/basic.rktl index 4ad40799383..b9f75d62545 100644 --- a/collects/tests/racket/basic.rktl +++ b/collects/tests/racket/basic.rktl @@ -2388,9 +2388,11 @@ (check-all-bad hash-iterate-key) (check-all-bad hash-iterate-value)) -(test (list 1 2 3) hash-keys #hasheq((1 . a)(2 . b)(3 . c))) -(test (list 'a 'b 'c) hash-values #hasheq((1 . a)(2 . b)(3 . c))) -(test (list (cons 1 'a) (cons 2 'b) (cons 3 'c)) hash->list #hasheq((1 . a)(2 . b)(3 . c))) +(test (list 1 2 3) sort (hash-keys #hasheq((1 . a) (2 . b) (3 . c))) <) +(test (list 'a 'b 'c) + sort (hash-values #hasheq((1 . a) (2 . b) (3 . c))) stringstring) +(test (list (cons 1 'a) (cons 2 'b) (cons 3 'c)) + sort (hash->list #hasheq((1 . a) (2 . b) (3 . c))) < #:key car) (err/rt-test (hash-set*! im-t 1 2) exn:fail?) (err/rt-test (hash-set* (make-hasheq null) 1 2) exn:fail?) @@ -2495,6 +2497,19 @@ (test (equal-hash-code ht) values (equal-hash-code ht2)) (test (equal-secondary-hash-code ht) values (equal-secondary-hash-code ht2)))) +;; Check that immutable hash trees aren't confused by an +;; "is a list" bit set in a key: +(let () + (define p (list 1 2 3 4)) + (define ht (hasheq p 1 'a 7 'b 10 'c 13)) + (test 1 hash-ref ht p #f) + (list? p) + (list? p) + (list? (list* 1 2 p)) + (list? (list* 1 2 p)) + (list? (list* 1 2 p)) + (test 1 hash-ref ht p #f)) + ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Misc diff --git a/src/racket/src/hash.c b/src/racket/src/hash.c index b4d3174aeca..cd2a8623bdd 100644 --- a/src/racket/src/hash.c +++ b/src/racket/src/hash.c @@ -2276,6 +2276,7 @@ Scheme_Hash_Tree *scheme_hash_tree_set(Scheme_Hash_Tree *tree, Scheme_Object *ke } } else { h = PTR_TO_LONG((Scheme_Object *)key); + h = h >> 2; } if (!val) { @@ -2417,6 +2418,7 @@ Scheme_Object *scheme_eq_hash_tree_get(Scheme_Hash_Tree *tree, Scheme_Object *ke RBNode *rb; h = PTR_TO_LONG((Scheme_Object *)key); + h = h >> 2; rb = rb_find(h, tree->root); if (rb) { @@ -2429,7 +2431,7 @@ Scheme_Object *scheme_eq_hash_tree_get(Scheme_Hash_Tree *tree, Scheme_Object *ke return SCHEME_CDR(a); prs = SCHEME_CDR(prs); } - } else + } else if (SAME_OBJ(rb->key, key)) return rb->val; } diff --git a/src/racket/src/thread.c b/src/racket/src/thread.c index c198bc4b348..a8ee52fabe9 100644 --- a/src/racket/src/thread.c +++ b/src/racket/src/thread.c @@ -258,12 +258,6 @@ typedef struct Thread_Cell { Scheme_Object so; char inherited, assigned; Scheme_Object *def_val; - /* A thread's thread_cell table maps cells to keys weakly. - This table maps keys to values weakly. The two weak - levels ensure that thread cells are properly GCed - when the value of a thread cell references the thread - cell. */ - Scheme_Bucket_Table *vals; } Thread_Cell; #ifdef MZ_PRECISE_GC @@ -6436,7 +6430,7 @@ static Scheme_Object *do_param(void *_data, int argc, Scheme_Object *argv[]) pos[0] = data->key; pos[1] = data->defcell; - + return scheme_param_config("parameter-procedure", (Scheme_Object *)(void *)pos, argc, argv2, From 64cac3e13cceddcfe1581e89ab5eb7bab6166344 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sat, 9 Jul 2011 20:28:46 -0600 Subject: [PATCH 226/441] fix cross reference Merge to 5.1.2 (cherry picked from commit b5bb703b48c2b353659867d191fb434da96cf63a) --- collects/htdp/htdp.scrbl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collects/htdp/htdp.scrbl b/collects/htdp/htdp.scrbl index 3b74e166189..26f98f7cbb6 100644 --- a/collects/htdp/htdp.scrbl +++ b/collects/htdp/htdp.scrbl @@ -20,7 +20,7 @@ file from the filesystem.} @racket[require] statement.}] Under the hood, HTdP Teachpacks and HTdP Libraries are implemented the same way, -using normal Racket @secref[#:doc '(lib "scribblings/guide/module.scrbl") "modules"]. +using normal Racket @secref[#:doc '(lib "scribblings/guide/guide.scrbl") "modules"]. When implementing an extension intended for students, pay a special attention to the error messages. The error messages of DrRacket's teaching languages go to From 177fff49e600494f927b2fa7c19f1662f6d0bf08 Mon Sep 17 00:00:00 2001 From: Sam Tobin-Hochstadt Date: Sat, 9 Jul 2011 22:49:14 -0400 Subject: [PATCH 227/441] Fix capitalization of HtDP. Merge to 5.1.2. (cherry picked from commit 64d42fa0d3e9bf7bc2237b127edf71029181a7a5) --- collects/htdp/htdp.scrbl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/collects/htdp/htdp.scrbl b/collects/htdp/htdp.scrbl index 26f98f7cbb6..fa1149e6a9a 100644 --- a/collects/htdp/htdp.scrbl +++ b/collects/htdp/htdp.scrbl @@ -11,15 +11,15 @@ and functionality to students using the teaching languages. @itemize[ -@item{HTdP Teachpacks are added to a student's program by clicking on the +@item{HtDP Teachpacks are added to a student's program by clicking on the ``Language'' menu and selecting ``add Teachpack''. Students can then install a new Teachpack by clicking ``Add Teachpack to List'' and choosing the Teachpack file from the filesystem.} -@item{HTdP Libraries are brought into the student's program using a +@item{HtDP Libraries are brought into the student's program using a @racket[require] statement.}] -Under the hood, HTdP Teachpacks and HTdP Libraries are implemented the same way, +Under the hood, HtDP Teachpacks and HtDP Libraries are implemented the same way, using normal Racket @secref[#:doc '(lib "scribblings/guide/guide.scrbl") "modules"]. When implementing an extension intended for students, pay a special attention to @@ -29,8 +29,8 @@ uses vocabulary or phrases the students has not learned yet. The teaching langu also ensure that students cannot stumble by accident onto challenging or confusing features intended for professional or for higher-level students. -This manual describes library support for authors of HTdP Teachpacks, libraries, -and customized teaching languages. Use the HTdP +This manual describes library support for authors of HtDP Teachpacks, libraries, +and customized teaching languages. Use the HtDP @seclink["error-reporting"]{error reporting functions} to create error messages that integrate smoothly with those of the teaching languages. Before composing new error messages, we recommend you read the @seclink["error-guidelines"]{error From 2490b0711c27eecedc38105b5d60f8a59ad143f9 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Sun, 10 Jul 2011 06:51:57 -0400 Subject: [PATCH 228/441] Fix the path relative functions to return a string for a path input, clarify the documentation, add a few tests. Fixes pr 12032 Fixes pr 12034 (cherry picked from commit ebe9453e7371fba259146a5b6cc3b7a52eeb11ee) --- collects/scribblings/raco/setup.scrbl | 43 ++++++++++++++++++------- collects/setup/path-to-relative.rkt | 3 +- collects/tests/racket/scheme-tests.rktl | 1 + collects/tests/racket/setup.rktl | 24 ++++++++++++++ 4 files changed, 59 insertions(+), 12 deletions(-) create mode 100644 collects/tests/racket/setup.rktl diff --git a/collects/scribblings/raco/setup.scrbl b/collects/scribblings/raco/setup.scrbl index 93675cdadac..c91b9f53fd5 100644 --- a/collects/scribblings/raco/setup.scrbl +++ b/collects/scribblings/raco/setup.scrbl @@ -1189,31 +1189,52 @@ than specified in the contract above, it is returned as-is.} @defmodule[setup/path-to-relative] -@defproc[(path->relative-string/library [path path-string?] - [default any/c (lambda (x) x)]) - any]{ +@defproc[(path->relative-string/library + [path path-string?] + [default (or/c (-> path-string? any/c) any/c) + (lambda (x) (if (path? x) (path->string x) x))]) + any/c]{ Produces a string suitable for display in error messages. If the path is an absolute one that is inside the @filepath{collects} tree, the result will be a string that begins with @racket["/"]. Similarly, a path in the user-specific collects results in a prefix of @racket["/"], and a @PLaneT path results in - @racket["/"]. If the path is not absolute, or if it is not in - any of these, the @racket[default] determines the result: if it is a - procedure, it is applied onto the path to get the result, otherwise it - is returned. + @racket["/"]. + + If the path is not absolute, or if it is not in any of these, it is + returned as-is (converted to a string if needed). If @racket[default] + is given, it specifies the return value instead: it can be a procedure + which is applied onto the path to get the result, or the result + itself. + + Note that this function can be a non-string only if @racket[default] + is given, and it does not return a string. } -@defproc[(path->relative-string/setup [path path-string?] - [default any/c (lambda (x) x)]) +@defproc[(path->relative-string/setup + [path path-string?] + [default (or/c (-> path-string? any/c) any/c) + (lambda (x) (if (path? x) (path->string x) x))]) any]{ Similar to @racket[path->relative-string/library], but more suited for output during compilation: @filepath{collects} paths are shown with no prefix, and in the user-specific collects with just a @racket[""] prefix. + + If the path is not absolute, or if it is not in any of these, it is + returned as-is (converted to a string if needed). If @racket[default] + is given, it specifies the return value instead: it can be a procedure + which is applied onto the path to get the result, or the result + itself. + + Note that this function can be a non-string only if @racket[default] + is given, and it does not return a string. } -@defproc[(make-path->relative-string [dirs (listof (cons (-> path?) string?))] - [default any/c (lambda (x) x)]) +@defproc[(make-path->relative-string + [dirs (listof (cons (-> path?) string?))] + [default (or/c (-> path-string? any/c) any/c) + (lambda (x) (if (path? x) (path->string x) x))]) (path-string? any/c . -> . any)]{ This function produces functions like @racket[path->relative-string/library] and diff --git a/collects/setup/path-to-relative.rkt b/collects/setup/path-to-relative.rkt index 44584ac5500..bc97f876018 100644 --- a/collects/setup/path-to-relative.rkt +++ b/collects/setup/path-to-relative.rkt @@ -10,7 +10,8 @@ path->relative-string/setup path->relative-string/library) -(define (make-path->relative-string dirs [default (lambda (x) x)]) +(define (make-path->relative-string + dirs [default (lambda (x) (if (path? x) (path->string x) x))]) (unless (and (list? dirs) (andmap (lambda (x) (and (pair? x) diff --git a/collects/tests/racket/scheme-tests.rktl b/collects/tests/racket/scheme-tests.rktl index 8b7aef79ded..a1d162f36db 100644 --- a/collects/tests/racket/scheme-tests.rktl +++ b/collects/tests/racket/scheme-tests.rktl @@ -1,6 +1,7 @@ (load-relative "loadtest.rktl") +(load-in-sandbox "setup.rktl") (load-in-sandbox "for.rktl") (load-in-sandbox "list.rktl") (load-in-sandbox "math.rktl") diff --git a/collects/tests/racket/setup.rktl b/collects/tests/racket/setup.rktl new file mode 100644 index 00000000000..6fbf83ba9cc --- /dev/null +++ b/collects/tests/racket/setup.rktl @@ -0,0 +1,24 @@ +(load-relative "loadtest.rktl") + +(Section 'setup) + +(require setup/path-to-relative) + +(let ([missing "/some/inexistent/path"] + [collects (build-path (collection-path "racket") "foo.rkt")] + [relative "some/path"]) + (define (test-both path/str expected-str [lib-expected expected-str]) + (define str (if (string? path/str) path/str (path->string path/str))) + (define path (string->path str)) + (test expected-str path->relative-string/setup str) + (test expected-str path->relative-string/setup path) + (test lib-expected path->relative-string/library str) + (test lib-expected path->relative-string/library path)) + (test-both missing missing) + (test-both relative relative) + (test-both collects "racket/foo.rkt" "/racket/foo.rkt") + (err/rt-test (path->relative-string/setup #f)) + (err/rt-test (path->relative-string/setup #"bleh")) + (err/rt-test (path->relative-string/setup 'bleh))) + +(report-errs) From ede736ff84993c4508744306b9e825e999719e91 Mon Sep 17 00:00:00 2001 From: Stephen Bloch Date: Sun, 10 Jul 2011 08:42:49 -0400 Subject: [PATCH 229/441] Improved error messages to specify actual argument as well as expected type. Still produces one check-error failure because of bug in make-color. (cherry picked from commit d3df33b0234c953e8eb812a37efc3fe3cd849eed) --- .../picturing-programs/private/map-image.rkt | 49 +++++++++++++------ .../tests/map-image-bsl-tests.rkt | 27 +++++----- 2 files changed, 47 insertions(+), 29 deletions(-) diff --git a/collects/picturing-programs/private/map-image.rkt b/collects/picturing-programs/private/map-image.rkt index 5136053ea34..1a420107c13 100644 --- a/collects/picturing-programs/private/map-image.rkt +++ b/collects/picturing-programs/private/map-image.rkt @@ -85,7 +85,8 @@ ; name->color : string-or-symbol -> maybe-color (define (name->color name) (unless (or (string? name) (symbol? name)) - (error 'name->color "argument must be a string or symbol")) + (error 'name->color + (format "expected a string or symbol, but found ~v" name))) (let [[result (send the-color-database find-color (if (string? name) name @@ -100,7 +101,7 @@ (cond [(color? thing) thing] [(eqv? thing #f) transparent] [(image-color? thing) (name->color thing)] - [else (error 'colorize (format "~v is not a color" thing))])) + [else (error 'colorize (format "expected a color, but found ~v" thing))])) ; colorize-func : (... -> broad-color) -> (... -> color) (define (colorize-func f) @@ -116,8 +117,12 @@ (define (color=? c1 c2) (let [[rc1 (colorize c1)] [rc2 (colorize c2)]] - (unless (and (color? rc1) (color? rc2)) - (error 'color=? "Expected two colors or color names as arguments")) + (unless (color? rc1) + (error 'color=? + (format "Expected a color or color name as first argument, but found ~v" c1))) + (unless (color? rc2) + (error 'color=? + (format "Expected a color or color name as second argument, but found ~v" c2))) (and (= (color-alpha rc1) (color-alpha rc2)) ; Both alphas MUST be equal. (or (= (color-alpha rc1) 0) ; If both are transparent, ignore rgb. (and (= (color-red rc1) (color-red rc2)) @@ -208,9 +213,11 @@ ; build-image : natural(width) natural(height) (nat nat -> broad-color) -> image (define (build-image w h f) (unless (natural? w) - (error 'build-image "Expected natural number as first argument")) + (error 'build-image + (format "Expected natural number as first argument, but found ~v" w))) (unless (natural? h) - (error 'build-image "Expected natural number as second argument")) + (error 'build-image + (format "Expected natural number as second argument, but found ~v" h))) (check-procedure-arity f 2 'build-image "Expected function with contract num(x) num(y) -> color as third argument") (build-image-internal w h (colorize-func f))) @@ -219,9 +226,11 @@ ; For students who don't yet know function closures. (define (build-image/extra w h f extra) (unless (natural? w) - (error 'build-image/extra "Expected natural number as first argument")) + (error 'build-image/extra + (format "Expected natural number as first argument, but found ~v" w))) (unless (natural? h) - (error 'build-image/extra "Expected natural number as second argument")) + (error 'build-image/extra + (format "Expected natural number as second argument, but found ~v" h))) (check-procedure-arity f 3 'build-image/extra "Expected function with contract num(x) num(y) any -> color as third argument") (build-image-internal w h (colorize-func (lambda (x y) (f x y extra))))) @@ -230,9 +239,11 @@ ; where each of rfunc, gfunc, bfunc is (nat(x) nat(y) -> nat) (define (build3-image w h rfunc gfunc bfunc) (unless (natural? w) - (error 'build3-image "Expected natural number as first argument")) + (error 'build3-image + (format "Expected natural number as first argument, but found ~v" w))) (unless (natural? h) - (error 'build3-image "Expected natural number as second argument")) + (error 'build3-image + (format "Expected natural number as second argument, but found ~v" h))) (check-procedure-arity rfunc 2 'build3-image "Expected function with contract num(x) num(y) -> color as third argument") (check-procedure-arity gfunc 2 'build3-image "Expected function with contract num(x) num(y) -> color as fourth argument") (check-procedure-arity bfunc 2 'build3-image "Expected function with contract num(x) num(y) -> color as fifth argument") @@ -244,9 +255,11 @@ ; where each of rfunc, gfunc, bfunc, afunc is (nat(x) nat(y) -> nat) (define (build4-image w h rfunc gfunc bfunc afunc) (unless (natural? w) - (error 'build-image "Expected natural number as first argument")) + (error 'build-image + (format "Expected natural number as first argument, but found ~v" w))) (unless (natural? h) - (error 'build-image "Expected natural number as second argument")) + (error 'build-image + (format "Expected natural number as second argument, but found ~v" h))) (check-procedure-arity rfunc 2 'build-image "Expected function with contract num(x) num(y) -> color as third argument") (check-procedure-arity gfunc 2 'build-image "Expected function with contract num(x) num(y) -> color as fourth argument") (check-procedure-arity bfunc 2 'build-image "Expected function with contract num(x) num(y) -> color as fifth argument") @@ -277,7 +290,8 @@ (define (map-image f img) (check-procedure-arity f 3 'map-image "Expected function with contract num(x) num(y) color -> color as first argument") (unless (image? img) - (error 'map-image "Expected image as second argument")) + (error 'map-image + (format "Expected image as second argument, but found ~v" img))) (map-image-internal (colorize-func f) img)) ; map-image/extra : (nat nat color X -> broad-color) image X -> image @@ -286,7 +300,8 @@ (define (map-image/extra f img extra) (check-procedure-arity f 4 'map-image/extra "Expected function with contract num(x) num(y) color other -> color as first argument") (unless (image? img) - (error 'map-image/extra "Expected image as second argument")) + (error 'map-image/extra + (format "Expected image as second argument, but found ~v" img))) (map-image-internal (colorize-func (lambda (x y c) (f x y c extra))) img)) @@ -304,7 +319,8 @@ (check-procedure-arity gfunc 5 'map3-image "Expected function with contract num(x) num(y) num(r) num(g) num(b) -> num(g) as second argument") (check-procedure-arity bfunc 5 'map3-image "Expected function with contract num(x) num(y) num(r) num(g) num(b) -> num(b) as third argument") (unless (image? pic) - (error 'map3-image "Expected image as fourth argument")) + (error 'map3-image + (format "Expected image as fourth argument, but found ~v" pic))) (map-image-internal (lambda (x y c) (make-color (rfunc x y (color-red c) (color-green c) (color-blue c)) @@ -325,7 +341,8 @@ (check-procedure-arity bfunc 6 'map4-image "Expected function with contract num(x) num(y) num(r) num(g) num(b) num(alpha) -> num(b) as third argument") (check-procedure-arity afunc 6 'map4-image "Expected function with contract num(x) num(y) num(r) num(g) num(b) num(alpha) -> num(alpha) as fourth argument") (unless (image? pic) - (error 'map4-image "Expected image as fifth argument")) + (error 'map4-image + "Expected image as fifth argument, but found ~v" pic)) (map-image-internal (lambda (x y c) (make-color (rfunc x y (color-red c) (color-green c) (color-blue c) (color-alpha c)) diff --git a/collects/picturing-programs/tests/map-image-bsl-tests.rkt b/collects/picturing-programs/tests/map-image-bsl-tests.rkt index b031156fe30..07d3721c8cc 100644 --- a/collects/picturing-programs/tests/map-image-bsl-tests.rkt +++ b/collects/picturing-programs/tests/map-image-bsl-tests.rkt @@ -1,6 +1,6 @@ ;; The first three lines of this file were inserted by DrRacket. They record metadata ;; about the language level of this file in a form that our tools can easily process. -#reader(lib "htdp-beginner-reader.ss" "lang")((modname new.map-image-bsl-tests) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ()))) +#reader(lib "htdp-beginner-reader.ss" "lang")((modname map-image-bsl-tests) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ()))) (require picturing-programs) ; Test cases for primitives: @@ -24,7 +24,7 @@ (check-expect (name->color "black") (make-color 0 0 0)) (check-expect (name->color "blue") (make-color 0 0 255)) (check-expect (name->color "plaid") false) -(check-error (name->color 7) "name->color: argument must be a string or symbol") +(check-error (name->color 7) "name->color: expected a string or symbol, but found 7") (check-expect (color=? (make-color 5 10 15) (make-color 5 10 15)) true) (check-expect (color=? (make-color 5 10 15) (make-color 5 15 10)) false) @@ -36,8 +36,9 @@ (check-expect (color=? (make-color 5 10 15 255) (make-color 5 10 15)) true) (check-expect (color=? (make-color 5 10 15 0) false) true) (check-expect (color=? (make-color 5 10 15 20) false) false) -(check-error (color=? "white" 3) "colorize: 3 is not a color") -(check-error (color=? "white" "plaid") "color=?: Expected two colors or color names as arguments") +(check-error (color=? "white" 3) "colorize: expected a color, but found 3") +(check-error (color=? "plaid" "white") "color=?: Expected a color or color name as first argument, but found \"plaid\"") +(check-error (color=? "white" "plaid") "color=?: Expected a color or color name as second argument, but found \"plaid\"") ; Test cases for map3-image: ;(check-error (map3-image 5 + + pic:bloch) @@ -54,7 +55,7 @@ (check-error (map3-image + + sqrt pic:bloch) "map3-image: Expected function with contract num(x) num(y) num(r) num(g) num(b) -> num(b) as third argument") (check-error (map3-image + + + 5) - "map3-image: Expected image as fourth argument") + "map3-image: Expected image as fourth argument, but found 5") ; red-id : x y r g b -> num (define (red-id x y r g b) r) @@ -113,7 +114,7 @@ (check-error (map4-image + + + sqrt pic:bloch) "map4-image: Expected function with contract num(x) num(y) num(r) num(g) num(b) num(alpha) -> num(alpha) as fourth argument") (check-error (map4-image + + + + 5) - "map4-image: Expected image as fifth argument") + "map4-image: Expected image as fifth argument, but found 5") ; red-id6 : x y r g b a -> num (define (red-id6 x y r g b a) r) ; green-id6 : x y r g b a -> num @@ -153,7 +154,7 @@ (check-error (map-image sqrt pic:bloch) "map-image: Expected function with contract num(x) num(y) color -> color as first argument") (check-error (map-image + 5) - "map-image: Expected image as second argument") + "map-image: Expected image as second argument, but found 5") ; color-id : x y color -> color (define (color-id x y c) @@ -186,7 +187,7 @@ (define ex6 (map-image kill-red bloch)) ex6 (define (return-5 x y c) 5) -(check-error (map-image return-5 bloch) "colorize: 5 is not a color") +(check-error (map-image return-5 bloch) "colorize: expected a color, but found 5") "Test cases for build3-image:" (define (x-gradient-2 x y) (min 255 (* 4 x))) @@ -195,9 +196,9 @@ "(build3-image 60 40 zero-2-args x-gradient-2 y-gradient-2) should be a 60x40 rectangle with no red, green increasing from left to right, and blue increasing from top to bottom:" (build3-image 60 40 zero-2-args x-gradient-2 y-gradient-2) (check-error (build3-image "hello" true sqrt sqrt sqrt) - "build3-image: Expected natural number as first argument") + "build3-image: Expected natural number as first argument, but found \"hello\"") (check-error (build3-image 17 true sqrt sqrt sqrt) - "build3-image: Expected natural number as second argument") + "build3-image: Expected natural number as second argument, but found true") (check-error (build3-image 17 24 sqrt sqrt sqrt) "build3-image: Expected function with contract num(x) num(y) -> color as third argument") (check-error (build3-image 17 24 x-gradient-2 sqrt sqrt) @@ -207,7 +208,7 @@ (define (return-minus-5 x y) -5) (check-error (build3-image 17 24 x-gradient-2 y-gradient-2 return-minus-5) - "make-color: expected as third argument, given: -5") + "make-color: expected an integer between 0 and 255 as third argument, given: -5") "Test cases for build4-image:" "(build4-image 50 50 x-gradient-2 x-gradient-2 zero-2-args y-gradient-2) should be a square, increasingly yellow from left to right and increasingly alpha from top to bottom. On a blue background." @@ -224,8 +225,8 @@ "(build-image 100 100 (lambda (x y) (make-color (* x 2.5) (* y 2.5) 0))):" (build-image 100 100 a-gradient) "should be a 100x100 square with a color gradient increasing in red from left to right, and in green from top to bottom" -(check-error (build-image 3.2 100 a-gradient) "build-image: Expected natural number as first argument") -(check-error (build-image 100 -2 a-gradient) "build-image: Expected natural number as second argument") +(check-error (build-image 3.2 100 a-gradient) "build-image: Expected natural number as first argument, but found 3.2") +(check-error (build-image 100 -2 a-gradient) "build-image: Expected natural number as second argument, but found -2") (check-error (build-image 100 100 sqrt) "build-image: Expected function with contract num(x) num(y) -> color as third argument") From 097df98b3dcafd225205e3c69e6dbb8545a1832b Mon Sep 17 00:00:00 2001 From: Stephen Bloch Date: Sun, 10 Jul 2011 08:56:43 -0400 Subject: [PATCH 230/441] Fixed some more error messages. (cherry picked from commit 904ef63ce20def1ed5ca140f5caad0a6ab453703) --- .../picturing-programs/private/map-image.rkt | 64 +++++++++---------- .../tests/map-image-bsl-tests.rkt | 62 +++++++++--------- 2 files changed, 63 insertions(+), 63 deletions(-) diff --git a/collects/picturing-programs/private/map-image.rkt b/collects/picturing-programs/private/map-image.rkt index 1a420107c13..c9dc2cae03d 100644 --- a/collects/picturing-programs/private/map-image.rkt +++ b/collects/picturing-programs/private/map-image.rkt @@ -86,7 +86,7 @@ (define (name->color name) (unless (or (string? name) (symbol? name)) (error 'name->color - (format "expected a string or symbol, but found ~v" name))) + (format "Expected a string or symbol, but found ~v" name))) (let [[result (send the-color-database find-color (if (string? name) name @@ -101,7 +101,7 @@ (cond [(color? thing) thing] [(eqv? thing #f) transparent] [(image-color? thing) (name->color thing)] - [else (error 'colorize (format "expected a color, but found ~v" thing))])) + [else (error 'colorize (format "Expected a color, but found ~v" thing))])) ; colorize-func : (... -> broad-color) -> (... -> color) (define (colorize-func f) @@ -214,11 +214,11 @@ (define (build-image w h f) (unless (natural? w) (error 'build-image - (format "Expected natural number as first argument, but found ~v" w))) + (format "Expected a natural number as first argument, but found ~v" w))) (unless (natural? h) (error 'build-image - (format "Expected natural number as second argument, but found ~v" h))) - (check-procedure-arity f 2 'build-image "Expected function with contract num(x) num(y) -> color as third argument") + (format "Expected a natural number as second argument, but found ~v" h))) + (check-procedure-arity f 2 'build-image "Expected a function with contract num(x) num(y) -> color as third argument") (build-image-internal w h (colorize-func f))) ; build-image/extra : natural(width) natural(height) (nat nat any -> broad-color) any -> image @@ -227,11 +227,11 @@ (define (build-image/extra w h f extra) (unless (natural? w) (error 'build-image/extra - (format "Expected natural number as first argument, but found ~v" w))) + (format "Expected a natural number as first argument, but found ~v" w))) (unless (natural? h) (error 'build-image/extra - (format "Expected natural number as second argument, but found ~v" h))) - (check-procedure-arity f 3 'build-image/extra "Expected function with contract num(x) num(y) any -> color as third argument") + (format "Expected a natural number as second argument, but found ~v" h))) + (check-procedure-arity f 3 'build-image/extra "Expected a function with contract num(x) num(y) any -> color as third argument") (build-image-internal w h (colorize-func (lambda (x y) (f x y extra))))) @@ -240,13 +240,13 @@ (define (build3-image w h rfunc gfunc bfunc) (unless (natural? w) (error 'build3-image - (format "Expected natural number as first argument, but found ~v" w))) + (format "Expected a natural number as first argument, but found ~v" w))) (unless (natural? h) (error 'build3-image - (format "Expected natural number as second argument, but found ~v" h))) - (check-procedure-arity rfunc 2 'build3-image "Expected function with contract num(x) num(y) -> color as third argument") - (check-procedure-arity gfunc 2 'build3-image "Expected function with contract num(x) num(y) -> color as fourth argument") - (check-procedure-arity bfunc 2 'build3-image "Expected function with contract num(x) num(y) -> color as fifth argument") + (format "Expected a natural number as second argument, but found ~v" h))) + (check-procedure-arity rfunc 2 'build3-image "Expected a function with contract num(x) num(y) -> color as third argument") + (check-procedure-arity gfunc 2 'build3-image "Expected a function with contract num(x) num(y) -> color as fourth argument") + (check-procedure-arity bfunc 2 'build3-image "Expected a function with contract num(x) num(y) -> color as fifth argument") (build-image-internal w h (lambda (x y) (make-color (rfunc x y) (gfunc x y) (bfunc x y))))) @@ -256,14 +256,14 @@ (define (build4-image w h rfunc gfunc bfunc afunc) (unless (natural? w) (error 'build-image - (format "Expected natural number as first argument, but found ~v" w))) + (format "Expected a natural number as first argument, but found ~v" w))) (unless (natural? h) (error 'build-image - (format "Expected natural number as second argument, but found ~v" h))) - (check-procedure-arity rfunc 2 'build-image "Expected function with contract num(x) num(y) -> color as third argument") - (check-procedure-arity gfunc 2 'build-image "Expected function with contract num(x) num(y) -> color as fourth argument") - (check-procedure-arity bfunc 2 'build-image "Expected function with contract num(x) num(y) -> color as fifth argument") - (check-procedure-arity afunc 2 'build-image "Expected function with contract num(x) num(y) -> color as sixth argument") + (format "Expected a natural number as second argument, but found ~v" h))) + (check-procedure-arity rfunc 2 'build-image "Expected a function with contract num(x) num(y) -> color as third argument") + (check-procedure-arity gfunc 2 'build-image "Expected a function with contract num(x) num(y) -> color as fourth argument") + (check-procedure-arity bfunc 2 'build-image "Expected a function with contract num(x) num(y) -> color as fifth argument") + (check-procedure-arity afunc 2 'build-image "Expected a function with contract num(x) num(y) -> color as sixth argument") (build-image-internal w h (lambda (x y) (make-color (rfunc x y) (gfunc x y) (bfunc x y) (afunc x y))))) @@ -288,20 +288,20 @@ ; map-image : (int int color -> broad-color) image -> image (define (map-image f img) - (check-procedure-arity f 3 'map-image "Expected function with contract num(x) num(y) color -> color as first argument") + (check-procedure-arity f 3 'map-image "Expected a function with contract num(x) num(y) color -> color as first argument") (unless (image? img) (error 'map-image - (format "Expected image as second argument, but found ~v" img))) + (format "Expected an image as second argument, but found ~v" img))) (map-image-internal (colorize-func f) img)) ; map-image/extra : (nat nat color X -> broad-color) image X -> image ; Like map-image, but passes a fixed extra argument to every call of the function. ; For students who don't yet know function closures. (define (map-image/extra f img extra) - (check-procedure-arity f 4 'map-image/extra "Expected function with contract num(x) num(y) color other -> color as first argument") + (check-procedure-arity f 4 'map-image/extra "Expected a function with contract num(x) num(y) color other -> color as first argument") (unless (image? img) (error 'map-image/extra - (format "Expected image as second argument, but found ~v" img))) + (format "Expected an image as second argument, but found ~v" img))) (map-image-internal (colorize-func (lambda (x y c) (f x y c extra))) img)) @@ -315,12 +315,12 @@ ; image -> image ; Note: by default, preserves alpha values from old image. (define (map3-image rfunc gfunc bfunc pic) - (check-procedure-arity rfunc 5 'map3-image "Expected function with contract num(x) num(y) num(r) num(g) num(b) -> num(r) as first argument") - (check-procedure-arity gfunc 5 'map3-image "Expected function with contract num(x) num(y) num(r) num(g) num(b) -> num(g) as second argument") - (check-procedure-arity bfunc 5 'map3-image "Expected function with contract num(x) num(y) num(r) num(g) num(b) -> num(b) as third argument") + (check-procedure-arity rfunc 5 'map3-image "Expected a function with contract num(x) num(y) num(r) num(g) num(b) -> num(r) as first argument") + (check-procedure-arity gfunc 5 'map3-image "Expected a function with contract num(x) num(y) num(r) num(g) num(b) -> num(g) as second argument") + (check-procedure-arity bfunc 5 'map3-image "Expected a function with contract num(x) num(y) num(r) num(g) num(b) -> num(b) as third argument") (unless (image? pic) (error 'map3-image - (format "Expected image as fourth argument, but found ~v" pic))) + (format "Expected an image as fourth argument, but found ~v" pic))) (map-image-internal (lambda (x y c) (make-color (rfunc x y (color-red c) (color-green c) (color-blue c)) @@ -336,13 +336,13 @@ ; (int(x) int(y) int(r) int(g) int(b) int(a) -> int(a)) ; image -> image (define (map4-image rfunc gfunc bfunc afunc pic) - (check-procedure-arity rfunc 6 'map4-image "Expected function with contract num(x) num(y) num(r) num(g) num(b) num(alpha) -> num(r) as first argument") - (check-procedure-arity gfunc 6 'map4-image "Expected function with contract num(x) num(y) num(r) num(g) num(b) num(alpha) -> num(g) as second argument") - (check-procedure-arity bfunc 6 'map4-image "Expected function with contract num(x) num(y) num(r) num(g) num(b) num(alpha) -> num(b) as third argument") - (check-procedure-arity afunc 6 'map4-image "Expected function with contract num(x) num(y) num(r) num(g) num(b) num(alpha) -> num(alpha) as fourth argument") + (check-procedure-arity rfunc 6 'map4-image "Expected a function with contract num(x) num(y) num(r) num(g) num(b) num(alpha) -> num(r) as first argument") + (check-procedure-arity gfunc 6 'map4-image "Expected a function with contract num(x) num(y) num(r) num(g) num(b) num(alpha) -> num(g) as second argument") + (check-procedure-arity bfunc 6 'map4-image "Expected a function with contract num(x) num(y) num(r) num(g) num(b) num(alpha) -> num(b) as third argument") + (check-procedure-arity afunc 6 'map4-image "Expected a function with contract num(x) num(y) num(r) num(g) num(b) num(alpha) -> num(alpha) as fourth argument") (unless (image? pic) (error 'map4-image - "Expected image as fifth argument, but found ~v" pic)) + "Expected an image as fifth argument, but found ~v" pic)) (map-image-internal (lambda (x y c) (make-color (rfunc x y (color-red c) (color-green c) (color-blue c) (color-alpha c)) diff --git a/collects/picturing-programs/tests/map-image-bsl-tests.rkt b/collects/picturing-programs/tests/map-image-bsl-tests.rkt index 07d3721c8cc..ec270cf90c1 100644 --- a/collects/picturing-programs/tests/map-image-bsl-tests.rkt +++ b/collects/picturing-programs/tests/map-image-bsl-tests.rkt @@ -24,7 +24,7 @@ (check-expect (name->color "black") (make-color 0 0 0)) (check-expect (name->color "blue") (make-color 0 0 255)) (check-expect (name->color "plaid") false) -(check-error (name->color 7) "name->color: expected a string or symbol, but found 7") +(check-error (name->color 7) "name->color: Expected a string or symbol, but found 7") (check-expect (color=? (make-color 5 10 15) (make-color 5 10 15)) true) (check-expect (color=? (make-color 5 10 15) (make-color 5 15 10)) false) @@ -36,26 +36,26 @@ (check-expect (color=? (make-color 5 10 15 255) (make-color 5 10 15)) true) (check-expect (color=? (make-color 5 10 15 0) false) true) (check-expect (color=? (make-color 5 10 15 20) false) false) -(check-error (color=? "white" 3) "colorize: expected a color, but found 3") +(check-error (color=? "white" 3) "colorize: Expected a color, but found 3") (check-error (color=? "plaid" "white") "color=?: Expected a color or color name as first argument, but found \"plaid\"") (check-error (color=? "white" "plaid") "color=?: Expected a color or color name as second argument, but found \"plaid\"") ; Test cases for map3-image: ;(check-error (map3-image 5 + + pic:bloch) -; "map3-image: Expected function with contract num(x) num(y) num(r) num(g) num(b) -> num(r) as first argument") +; "map3-image: Expected a function with contract num(x) num(y) num(r) num(g) num(b) -> num(r) as first argument") ; Actually, the above is caught by Check Syntax, before map3-image has a chance to check anything. (check-error (map3-image sqrt + + pic:bloch) - "map3-image: Expected function with contract num(x) num(y) num(r) num(g) num(b) -> num(r) as first argument") + "map3-image: Expected a function with contract num(x) num(y) num(r) num(g) num(b) -> num(r) as first argument") ;(check-error (map3-image + 5 + pic:bloch) -; "map3-image: Expected function with contract num(x) num(y) num(r) num(g) num(b) -> num(g) as second argument") +; "map3-image: Expected a function with contract num(x) num(y) num(r) num(g) num(b) -> num(g) as second argument") (check-error (map3-image + sqrt + pic:bloch) - "map3-image: Expected function with contract num(x) num(y) num(r) num(g) num(b) -> num(g) as second argument") + "map3-image: Expected a function with contract num(x) num(y) num(r) num(g) num(b) -> num(g) as second argument") ;(check-error (map3-image + + 5 pic:bloch) -; "map3-image: Expected function with contract num(x) num(y) num(r) num(g) num(b) -> num(b) as third argument") +; "map3-image: Expected a function with contract num(x) num(y) num(r) num(g) num(b) -> num(b) as third argument") (check-error (map3-image + + sqrt pic:bloch) - "map3-image: Expected function with contract num(x) num(y) num(r) num(g) num(b) -> num(b) as third argument") + "map3-image: Expected a function with contract num(x) num(y) num(r) num(g) num(b) -> num(b) as third argument") (check-error (map3-image + + + 5) - "map3-image: Expected image as fourth argument, but found 5") + "map3-image: Expected an image as fourth argument, but found 5") ; red-id : x y r g b -> num (define (red-id x y r g b) r) @@ -98,23 +98,23 @@ "Test cases for map4-image:" ;(check-error (map4-image 5 + + + pic:bloch) -; "map4-image: Expected function with contract num(x) num(y) num(r) num(g) num(b) -> num(r) as first argument") +; "map4-image: Expected a function with contract num(x) num(y) num(r) num(g) num(b) -> num(r) as first argument") (check-error (map4-image sqrt + + + pic:bloch) - "map4-image: Expected function with contract num(x) num(y) num(r) num(g) num(b) num(alpha) -> num(r) as first argument") + "map4-image: Expected a function with contract num(x) num(y) num(r) num(g) num(b) num(alpha) -> num(r) as first argument") ;(check-error (map4-image + 5 + + pic:bloch) -; "map4-image: Expected function with contract num(x) num(y) num(r) num(g) num(b) num(alpha) -> num(g) as second argument") +; "map4-image: Expected a function with contract num(x) num(y) num(r) num(g) num(b) num(alpha) -> num(g) as second argument") (check-error (map4-image + sqrt + + pic:bloch) - "map4-image: Expected function with contract num(x) num(y) num(r) num(g) num(b) num(alpha) -> num(g) as second argument") + "map4-image: Expected a function with contract num(x) num(y) num(r) num(g) num(b) num(alpha) -> num(g) as second argument") ;(check-error (map4-image + + 5 + pic:bloch) -; "map4-image: Expected function with contract num(x) num(y) num(r) num(g) num(b) num(alpha) -> num(b) as third argument") +; "map4-image: Expected a function with contract num(x) num(y) num(r) num(g) num(b) num(alpha) -> num(b) as third argument") (check-error (map4-image + + sqrt + pic:bloch) - "map4-image: Expected function with contract num(x) num(y) num(r) num(g) num(b) num(alpha) -> num(b) as third argument") + "map4-image: Expected a function with contract num(x) num(y) num(r) num(g) num(b) num(alpha) -> num(b) as third argument") ;(check-error (map4-image + + + 5 pic:bloch) -; "map4-image: Expected function with contract num(x) num(y) num(r) num(g) num(b) num(alpha) -> num(a) as fourth argument") +; "map4-image: Expected a function with contract num(x) num(y) num(r) num(g) num(b) num(alpha) -> num(a) as fourth argument") (check-error (map4-image + + + sqrt pic:bloch) - "map4-image: Expected function with contract num(x) num(y) num(r) num(g) num(b) num(alpha) -> num(alpha) as fourth argument") + "map4-image: Expected a function with contract num(x) num(y) num(r) num(g) num(b) num(alpha) -> num(alpha) as fourth argument") (check-error (map4-image + + + + 5) - "map4-image: Expected image as fifth argument, but found 5") + "map4-image: Expected an image as fifth argument, but found 5") ; red-id6 : x y r g b a -> num (define (red-id6 x y r g b a) r) ; green-id6 : x y r g b a -> num @@ -150,11 +150,11 @@ ; Test cases for map-image: ;(check-error (map-image 5 pic:bloch) -; "map-image: Expected function with contract num(x) num(y) color -> color as first argument") +; "map-image: Expected a function with contract num(x) num(y) color -> color as first argument") (check-error (map-image sqrt pic:bloch) - "map-image: Expected function with contract num(x) num(y) color -> color as first argument") + "map-image: Expected a function with contract num(x) num(y) color -> color as first argument") (check-error (map-image + 5) - "map-image: Expected image as second argument, but found 5") + "map-image: Expected an image as second argument, but found 5") ; color-id : x y color -> color (define (color-id x y c) @@ -187,7 +187,7 @@ (define ex6 (map-image kill-red bloch)) ex6 (define (return-5 x y c) 5) -(check-error (map-image return-5 bloch) "colorize: expected a color, but found 5") +(check-error (map-image return-5 bloch) "colorize: Expected a color, but found 5") "Test cases for build3-image:" (define (x-gradient-2 x y) (min 255 (* 4 x))) @@ -196,19 +196,19 @@ "(build3-image 60 40 zero-2-args x-gradient-2 y-gradient-2) should be a 60x40 rectangle with no red, green increasing from left to right, and blue increasing from top to bottom:" (build3-image 60 40 zero-2-args x-gradient-2 y-gradient-2) (check-error (build3-image "hello" true sqrt sqrt sqrt) - "build3-image: Expected natural number as first argument, but found \"hello\"") + "build3-image: Expected a natural number as first argument, but found \"hello\"") (check-error (build3-image 17 true sqrt sqrt sqrt) - "build3-image: Expected natural number as second argument, but found true") + "build3-image: Expected a natural number as second argument, but found true") (check-error (build3-image 17 24 sqrt sqrt sqrt) - "build3-image: Expected function with contract num(x) num(y) -> color as third argument") + "build3-image: Expected a function with contract num(x) num(y) -> color as third argument") (check-error (build3-image 17 24 x-gradient-2 sqrt sqrt) - "build3-image: Expected function with contract num(x) num(y) -> color as fourth argument") + "build3-image: Expected a function with contract num(x) num(y) -> color as fourth argument") (check-error (build3-image 17 24 x-gradient-2 y-gradient-2 sqrt) - "build3-image: Expected function with contract num(x) num(y) -> color as fifth argument") + "build3-image: Expected a function with contract num(x) num(y) -> color as fifth argument") (define (return-minus-5 x y) -5) (check-error (build3-image 17 24 x-gradient-2 y-gradient-2 return-minus-5) - "make-color: expected an integer between 0 and 255 as third argument, given: -5") + "make-color: Expected an integer between 0 and 255 as third argument, given: -5") "Test cases for build4-image:" "(build4-image 50 50 x-gradient-2 x-gradient-2 zero-2-args y-gradient-2) should be a square, increasingly yellow from left to right and increasingly alpha from top to bottom. On a blue background." @@ -225,9 +225,9 @@ "(build-image 100 100 (lambda (x y) (make-color (* x 2.5) (* y 2.5) 0))):" (build-image 100 100 a-gradient) "should be a 100x100 square with a color gradient increasing in red from left to right, and in green from top to bottom" -(check-error (build-image 3.2 100 a-gradient) "build-image: Expected natural number as first argument, but found 3.2") -(check-error (build-image 100 -2 a-gradient) "build-image: Expected natural number as second argument, but found -2") -(check-error (build-image 100 100 sqrt) "build-image: Expected function with contract num(x) num(y) -> color as third argument") +(check-error (build-image 3.2 100 a-gradient) "build-image: Expected a natural number as first argument, but found 3.2") +(check-error (build-image 100 -2 a-gradient) "build-image: Expected a natural number as second argument, but found -2") +(check-error (build-image 100 100 sqrt) "build-image: Expected a function with contract num(x) num(y) -> color as third argument") From 036f7bec064b585154714621e71a27a25c06fdfa Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Mon, 11 Jul 2011 06:37:57 -0600 Subject: [PATCH 231/441] fix JIT problem that can break futures A recent (weeks-old) JIT change set one of a function's code pointers to NULL to indicate that JIT-compilation of the function is in progress, but that breaks futures. Set the code pointer to a different not-yet-ready function, instead. Merge to 5.1.2 Closes PR 12037 (cherry picked from commit 09eab9c3ebdb88dc4f8a39a38b6b49fc74be35e2) --- src/racket/src/jit.c | 2 +- src/racket/src/jit.h | 2 +- src/racket/src/jitcall.c | 2 +- src/racket/src/jitcommon.c | 6 ++++++ 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/racket/src/jit.c b/src/racket/src/jit.c index 05a3fa89e3d..e3ffa81ca7c 100644 --- a/src/racket/src/jit.c +++ b/src/racket/src/jit.c @@ -3312,7 +3312,7 @@ static void on_demand_generate_lambda(Scheme_Native_Closure *nc, int argc, Schem if (ndata->code != scheme_on_demand_jit_code) return; - ndata->arity_code = NULL; /* => in progress */ + ndata->arity_code = sjc.in_progress_on_demand_jit_arity_code; /* => in progress */ scheme_generate_one(NULL, do_generate_closure, &gdata, 1, data->name, ndata); diff --git a/src/racket/src/jit.h b/src/racket/src/jit.h index 5d0ae881f98..27753a79d27 100644 --- a/src/racket/src/jit.h +++ b/src/racket/src/jit.h @@ -227,7 +227,7 @@ struct scheme_jit_common_record { void *fxvector_ref_code, *fxvector_ref_check_index_code, *fxvector_set_code, *fxvector_set_check_index_code; void *struct_raw_ref_code, *struct_raw_set_code; void *syntax_e_code; - void *on_demand_jit_arity_code; + void *on_demand_jit_arity_code, *in_progress_on_demand_jit_arity_code; void *get_stack_pointer_code; void *stack_cache_pop_code; void *struct_pred_code, *struct_pred_multi_code; diff --git a/src/racket/src/jitcall.c b/src/racket/src/jitcall.c index 23762634c9a..9fee1ee2d95 100644 --- a/src/racket/src/jitcall.c +++ b/src/racket/src/jitcall.c @@ -1454,7 +1454,7 @@ int scheme_generate_app(Scheme_App_Rec *app, Scheme_Object **alt_rands, int num_ Scheme_Native_Closure *nc; nc = (Scheme_Native_Closure *)scheme_jit_closure((Scheme_Object *)data, NULL); if (nc->code->code == scheme_on_demand_jit_code) { - if (nc->code->arity_code) { /* i.e., not in progress */ + if (nc->code->arity_code != sjc.in_progress_on_demand_jit_arity_code) { scheme_on_demand_generate_lambda(nc, 0, NULL); } } diff --git a/src/racket/src/jitcommon.c b/src/racket/src/jitcommon.c index bcd89ad7333..72987b75227 100644 --- a/src/racket/src/jitcommon.c +++ b/src/racket/src/jitcommon.c @@ -729,6 +729,12 @@ static int common2(mz_jit_state *jitter, void *_data) CHECK_LIMIT(); scheme_jit_register_helper_func(jitter, scheme_on_demand_jit_code); + /* Used for the state of a function that is being JITted + (for a kind of cycle detection) without breaking concurrent + future threads that might try to call the function. */ + sjc.in_progress_on_demand_jit_arity_code = jit_get_ip().ptr; + (void)jit_jmpi(sjc.on_demand_jit_arity_code); + /* *** app_values_tail_slow_code *** */ /* RELIES ON jit_prolog(NATIVE_ARG_COUNT) FROM ABOVE */ /* Rator in V1, arguments are in thread's multiple-values cells. */ From cef91e1527c4ab37756149b54822258878c20eec Mon Sep 17 00:00:00 2001 From: Vincent St-Amour Date: Mon, 11 Jul 2011 13:54:06 -0400 Subject: [PATCH 232/441] Revert "Add real->double-flonum to the JIT." This reverts commit 2afff3d2102761815872f67d11dec0688effca48. This commit caused real->double-flonum to have a different behavior when jitted as opposed to interpreted, and caused real->single-flonum to break in some cases. Merge to 5.1.2. (cherry picked from commit 7dfe1f636f94b0eff4bab90db9d9d13d620bae43) --- src/racket/src/jitinline.c | 3 +-- src/racket/src/number.c | 4 ---- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/racket/src/jitinline.c b/src/racket/src/jitinline.c index 58ef3ac8a57..06e7d32dcd1 100644 --- a/src/racket/src/jitinline.c +++ b/src/racket/src/jitinline.c @@ -1108,8 +1108,7 @@ int scheme_generate_inlined_unary(mz_jit_state *jitter, Scheme_App2_Rec *app, in || IS_NAMED_PRIM(rator, "fllog")) { scheme_generate_arith(jitter, rator, app->rand, NULL, 1, ARITH_FLUNOP, 0, 0, NULL, 1, 0, -1, NULL); return 1; - } else if (IS_NAMED_PRIM(rator, "exact->inexact") - || IS_NAMED_PRIM(rator, "real->double-flonum")) { + } else if (IS_NAMED_PRIM(rator, "exact->inexact")) { scheme_generate_arith(jitter, rator, app->rand, NULL, 1, ARITH_EX_INEX, 0, 0, NULL, 1, 0, 0, NULL); return 1; } else if (IS_NAMED_PRIM(rator, "unsafe-fx->fl")) { diff --git a/src/racket/src/number.c b/src/racket/src/number.c index cd0081bda50..02b97512149 100644 --- a/src/racket/src/number.c +++ b/src/racket/src/number.c @@ -374,10 +374,6 @@ scheme_init_number (Scheme_Env *env) scheme_add_global_constant("single-flonum?", p, env); p = scheme_make_folding_prim(real_to_single_flonum, "real->single-flonum", 1, 1, 1); - if (scheme_can_inline_fp_op()) - SCHEME_PRIM_PROC_FLAGS(p) |= SCHEME_PRIM_IS_UNARY_INLINED; - else - SCHEME_PRIM_PROC_FLAGS(p) |= SCHEME_PRIM_SOMETIMES_INLINED; scheme_add_global_constant("real->single-flonum", p, env); p = scheme_make_folding_prim(real_to_double_flonum, "real->double-flonum", 1, 1, 1); From 73fb46b42bba866c99aa69c06f1b006cb1f6c283 Mon Sep 17 00:00:00 2001 From: Vincent St-Amour Date: Mon, 11 Jul 2011 12:24:36 -0400 Subject: [PATCH 233/441] Add tests for jitted real->*-flonum. (cherry picked from commit 427eaca513b06ce24ab527acc7ac783b0b2dc4d3) --- collects/tests/racket/number.rktl | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/collects/tests/racket/number.rktl b/collects/tests/racket/number.rktl index 7c55c1ec938..15a9c0991fc 100644 --- a/collects/tests/racket/number.rktl +++ b/collects/tests/racket/number.rktl @@ -686,6 +686,16 @@ (test 2.25 real->double-flonum 2.25) (test 2.25 real->double-flonum 2.25f0) +;; to make sure they work when jitted +(define (r->s-f x) (real->single-flonum x)) +(define (r->d-f x) (real->double-flonum x)) +(test 2.0f0 r->s-f 2) +(test 2.25f0 r->s-f 2.25) +(test 2.25f0 r->s-f 2.25f0) +(test 2.0 r->d-f 2) +(test 2.25 r->d-f 2.25) +(test 2.25 r->d-f 2.25f0) + (err/rt-test (* 'a 0)) (err/rt-test (+ 'a 0)) (err/rt-test (/ 'a 0)) From 07511110119190bf46e5ed46980a334a67a681ac Mon Sep 17 00:00:00 2001 From: Vincent St-Amour Date: Mon, 11 Jul 2011 12:32:23 -0400 Subject: [PATCH 234/441] Fix jitting of real->double-flonum. Merge to 5.1.2. (cherry picked from commit 09b6616bfa0f7a56e9ea362df6e8517cd76272ae) --- src/racket/src/jitinline.c | 3 ++- src/racket/src/number.c | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/racket/src/jitinline.c b/src/racket/src/jitinline.c index 06e7d32dcd1..58ef3ac8a57 100644 --- a/src/racket/src/jitinline.c +++ b/src/racket/src/jitinline.c @@ -1108,7 +1108,8 @@ int scheme_generate_inlined_unary(mz_jit_state *jitter, Scheme_App2_Rec *app, in || IS_NAMED_PRIM(rator, "fllog")) { scheme_generate_arith(jitter, rator, app->rand, NULL, 1, ARITH_FLUNOP, 0, 0, NULL, 1, 0, -1, NULL); return 1; - } else if (IS_NAMED_PRIM(rator, "exact->inexact")) { + } else if (IS_NAMED_PRIM(rator, "exact->inexact") + || IS_NAMED_PRIM(rator, "real->double-flonum")) { scheme_generate_arith(jitter, rator, app->rand, NULL, 1, ARITH_EX_INEX, 0, 0, NULL, 1, 0, 0, NULL); return 1; } else if (IS_NAMED_PRIM(rator, "unsafe-fx->fl")) { diff --git a/src/racket/src/number.c b/src/racket/src/number.c index 02b97512149..d478e783504 100644 --- a/src/racket/src/number.c +++ b/src/racket/src/number.c @@ -377,6 +377,10 @@ scheme_init_number (Scheme_Env *env) scheme_add_global_constant("real->single-flonum", p, env); p = scheme_make_folding_prim(real_to_double_flonum, "real->double-flonum", 1, 1, 1); + if (scheme_can_inline_fp_op()) + SCHEME_PRIM_PROC_FLAGS(p) |= SCHEME_PRIM_IS_UNARY_INLINED; + else + SCHEME_PRIM_PROC_FLAGS(p) |= SCHEME_PRIM_SOMETIMES_INLINED; scheme_add_global_constant("real->double-flonum", p, env); scheme_add_global_constant("exact?", From 6ca28bc60cbcf2bc3637113bb4c0b98a77ed93cb Mon Sep 17 00:00:00 2001 From: Vincent St-Amour Date: Mon, 11 Jul 2011 15:35:49 -0400 Subject: [PATCH 235/441] Fix test for new contract error message format. (cherry picked from commit 79ef8e889e327cd50df683ff9594b83f5a50cc64) --- collects/tests/typed-scheme/fail/pr10594.rkt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collects/tests/typed-scheme/fail/pr10594.rkt b/collects/tests/typed-scheme/fail/pr10594.rkt index 7d524f3f26d..89f6eb5a6f2 100644 --- a/collects/tests/typed-scheme/fail/pr10594.rkt +++ b/collects/tests/typed-scheme/fail/pr10594.rkt @@ -1,5 +1,5 @@ #; -(exn-pred exn:fail:contract? #rx".*contract violation.*blaming 'U.*") +(exn-pred exn:fail:contract? #rx".*contract violation.*blaming U.*") #lang scheme/load (module T typed-scheme From 289e82b0b7ce1709bbd4443cee6e6e4f6ce72239 Mon Sep 17 00:00:00 2001 From: Ryan Culpepper Date: Mon, 11 Jul 2011 15:35:04 -0600 Subject: [PATCH 236/441] updated docs for struct-type-contract/c (cherry picked from commit 5a10ef75505449b226816fd864fe29f7e8c156cc) --- .../unstable/scribblings/prop-contract.scrbl | 61 +++++++++++++------ 1 file changed, 42 insertions(+), 19 deletions(-) diff --git a/collects/unstable/scribblings/prop-contract.scrbl b/collects/unstable/scribblings/prop-contract.scrbl index a77f8ffcdf4..ca74af499ff 100644 --- a/collects/unstable/scribblings/prop-contract.scrbl +++ b/collects/unstable/scribblings/prop-contract.scrbl @@ -16,34 +16,57 @@ Produces a contract for struct type properties. When the contract is applied to a struct type property, it produces a wrapped struct type -property. When the wrapped struct type property is used to create a -new struct type (via @racket[struct], @racket[make-struct-type], etc), -it applies @racket[value-contract] to the value associated with the -property. +property that applies @racket[value-contract] to the value associated +with the property when used to create a new struct type (via +@racket[struct], @racket[make-struct-type], etc). -The contract has no effect on the struct type property accessor. +The struct type property's accessor function is not affected; it must +be protected separately. @examples[#:eval the-eval -(define-values (prop prop? prop-ref) - (make-struct-type-property 'prop)) +(module propmod racket + (require racket/contract + unstable/prop-contract) + (define-values (prop prop? prop-ref) + (make-struct-type-property 'prop)) + (define (prop-app x v) + (((prop-ref x) x) v)) + (provide/contract + [prop? (-> any/c boolean?)] + [prop (struct-type-property/c + (-> prop? (-> number? boolean?)))] + [prop-app (-> prop? number? boolean?)]) + (provide prop-ref)) -(define/contract wrapped - (struct-type-property/c (-> any/c (-> number? number?))) - prop) +(module structmod racket + (require 'propmod) + (struct s (f) #:property prop (lambda (s) (s-f s))) + (provide (struct-out s))) -(struct s (f) - #:property wrapped (lambda (s) (s-f s))) +(require 'propmod 'structmod) +(define s1 (s even?)) +(prop-app s1 5) +(prop-app s1 'apple) -(define (get-f s) ((prop-ref s) s)) +(define s2 (s "not a fun")) +(prop-app s2 5) -(define s1 (s add1)) -((get-f s1) 5) -((get-f s1) 'apple) +(define s3 (s list)) +(prop-app s3 5) -(define s2 (s (lambda (n) (if (zero? n) 'zero 'nonzero)))) -((get-f s2) 5) -((get-f s2) 'apple) +((prop-ref s3) 'apple) ] +The first contract error above is a simple function contract violation +on @racket[prop-app]. The second and third contract errors above blame +the @racketidfont{structmod} module, because it accepted the struct type +property contract. To avoid blame, @racketidfont{structmod} +should have placed a contract on @racket[s]. The final contract error, +involving @racket[s3], blames @racketidfont{propmod} because the struct +type property contract obliges @racketidfont{propmod} to make sure the +property's value is not misused, but @racketidfont{propmod} allows +direct access to the property value via @racket[prop-ref]. To +avoid blame, @racketidfont{propmod} should remove the export of +@racket[prop-ref] or protect it with a contract. } @close-eval[the-eval] From 4f794fe496339e94872f5075c564053ca6c37f09 Mon Sep 17 00:00:00 2001 From: Stephen Bloch Date: Tue, 12 Jul 2011 07:08:47 -0400 Subject: [PATCH 237/441] Fixed some more error messages. (cherry picked from commit 52527d8a95d3415b0f1808a5903aa00ed69f8a93) --- .../picturing-programs/private/map-image.rkt | 32 +++++++++---------- .../tests/map-image-bsl-tests.rkt | 24 +++++++------- 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/collects/picturing-programs/private/map-image.rkt b/collects/picturing-programs/private/map-image.rkt index c9dc2cae03d..10865a4ea13 100644 --- a/collects/picturing-programs/private/map-image.rkt +++ b/collects/picturing-programs/private/map-image.rkt @@ -86,7 +86,7 @@ (define (name->color name) (unless (or (string? name) (symbol? name)) (error 'name->color - (format "Expected a string or symbol, but found ~v" name))) + (format "Expected a string or symbol, but received ~v" name))) (let [[result (send the-color-database find-color (if (string? name) name @@ -101,7 +101,7 @@ (cond [(color? thing) thing] [(eqv? thing #f) transparent] [(image-color? thing) (name->color thing)] - [else (error 'colorize (format "Expected a color, but found ~v" thing))])) + [else (error 'colorize (format "Expected a color, but received ~v" thing))])) ; colorize-func : (... -> broad-color) -> (... -> color) (define (colorize-func f) @@ -119,10 +119,10 @@ [rc2 (colorize c2)]] (unless (color? rc1) (error 'color=? - (format "Expected a color or color name as first argument, but found ~v" c1))) + (format "Expected a color or color name as first argument, but received ~v" c1))) (unless (color? rc2) (error 'color=? - (format "Expected a color or color name as second argument, but found ~v" c2))) + (format "Expected a color or color name as second argument, but received ~v" c2))) (and (= (color-alpha rc1) (color-alpha rc2)) ; Both alphas MUST be equal. (or (= (color-alpha rc1) 0) ; If both are transparent, ignore rgb. (and (= (color-red rc1) (color-red rc2)) @@ -214,10 +214,10 @@ (define (build-image w h f) (unless (natural? w) (error 'build-image - (format "Expected a natural number as first argument, but found ~v" w))) + (format "Expected a natural number as first argument, but received ~v" w))) (unless (natural? h) (error 'build-image - (format "Expected a natural number as second argument, but found ~v" h))) + (format "Expected a natural number as second argument, but received ~v" h))) (check-procedure-arity f 2 'build-image "Expected a function with contract num(x) num(y) -> color as third argument") (build-image-internal w h (colorize-func f))) @@ -227,10 +227,10 @@ (define (build-image/extra w h f extra) (unless (natural? w) (error 'build-image/extra - (format "Expected a natural number as first argument, but found ~v" w))) + (format "Expected a natural number as first argument, but received ~v" w))) (unless (natural? h) (error 'build-image/extra - (format "Expected a natural number as second argument, but found ~v" h))) + (format "Expected a natural number as second argument, but received ~v" h))) (check-procedure-arity f 3 'build-image/extra "Expected a function with contract num(x) num(y) any -> color as third argument") (build-image-internal w h (colorize-func (lambda (x y) (f x y extra))))) @@ -240,10 +240,10 @@ (define (build3-image w h rfunc gfunc bfunc) (unless (natural? w) (error 'build3-image - (format "Expected a natural number as first argument, but found ~v" w))) + (format "Expected a natural number as first argument, but received ~v" w))) (unless (natural? h) (error 'build3-image - (format "Expected a natural number as second argument, but found ~v" h))) + (format "Expected a natural number as second argument, but received ~v" h))) (check-procedure-arity rfunc 2 'build3-image "Expected a function with contract num(x) num(y) -> color as third argument") (check-procedure-arity gfunc 2 'build3-image "Expected a function with contract num(x) num(y) -> color as fourth argument") (check-procedure-arity bfunc 2 'build3-image "Expected a function with contract num(x) num(y) -> color as fifth argument") @@ -256,10 +256,10 @@ (define (build4-image w h rfunc gfunc bfunc afunc) (unless (natural? w) (error 'build-image - (format "Expected a natural number as first argument, but found ~v" w))) + (format "Expected a natural number as first argument, but received ~v" w))) (unless (natural? h) (error 'build-image - (format "Expected a natural number as second argument, but found ~v" h))) + (format "Expected a natural number as second argument, but received ~v" h))) (check-procedure-arity rfunc 2 'build-image "Expected a function with contract num(x) num(y) -> color as third argument") (check-procedure-arity gfunc 2 'build-image "Expected a function with contract num(x) num(y) -> color as fourth argument") (check-procedure-arity bfunc 2 'build-image "Expected a function with contract num(x) num(y) -> color as fifth argument") @@ -291,7 +291,7 @@ (check-procedure-arity f 3 'map-image "Expected a function with contract num(x) num(y) color -> color as first argument") (unless (image? img) (error 'map-image - (format "Expected an image as second argument, but found ~v" img))) + (format "Expected an image as second argument, but received ~v" img))) (map-image-internal (colorize-func f) img)) ; map-image/extra : (nat nat color X -> broad-color) image X -> image @@ -301,7 +301,7 @@ (check-procedure-arity f 4 'map-image/extra "Expected a function with contract num(x) num(y) color other -> color as first argument") (unless (image? img) (error 'map-image/extra - (format "Expected an image as second argument, but found ~v" img))) + (format "Expected an image as second argument, but received ~v" img))) (map-image-internal (colorize-func (lambda (x y c) (f x y c extra))) img)) @@ -320,7 +320,7 @@ (check-procedure-arity bfunc 5 'map3-image "Expected a function with contract num(x) num(y) num(r) num(g) num(b) -> num(b) as third argument") (unless (image? pic) (error 'map3-image - (format "Expected an image as fourth argument, but found ~v" pic))) + (format "Expected an image as fourth argument, but received ~v" pic))) (map-image-internal (lambda (x y c) (make-color (rfunc x y (color-red c) (color-green c) (color-blue c)) @@ -342,7 +342,7 @@ (check-procedure-arity afunc 6 'map4-image "Expected a function with contract num(x) num(y) num(r) num(g) num(b) num(alpha) -> num(alpha) as fourth argument") (unless (image? pic) (error 'map4-image - "Expected an image as fifth argument, but found ~v" pic)) + "Expected an image as fifth argument, but received ~v" pic)) (map-image-internal (lambda (x y c) (make-color (rfunc x y (color-red c) (color-green c) (color-blue c) (color-alpha c)) diff --git a/collects/picturing-programs/tests/map-image-bsl-tests.rkt b/collects/picturing-programs/tests/map-image-bsl-tests.rkt index ec270cf90c1..673a3615fb2 100644 --- a/collects/picturing-programs/tests/map-image-bsl-tests.rkt +++ b/collects/picturing-programs/tests/map-image-bsl-tests.rkt @@ -24,7 +24,7 @@ (check-expect (name->color "black") (make-color 0 0 0)) (check-expect (name->color "blue") (make-color 0 0 255)) (check-expect (name->color "plaid") false) -(check-error (name->color 7) "name->color: Expected a string or symbol, but found 7") +(check-error (name->color 7) "name->color: Expected a string or symbol, but received 7") (check-expect (color=? (make-color 5 10 15) (make-color 5 10 15)) true) (check-expect (color=? (make-color 5 10 15) (make-color 5 15 10)) false) @@ -36,9 +36,9 @@ (check-expect (color=? (make-color 5 10 15 255) (make-color 5 10 15)) true) (check-expect (color=? (make-color 5 10 15 0) false) true) (check-expect (color=? (make-color 5 10 15 20) false) false) -(check-error (color=? "white" 3) "colorize: Expected a color, but found 3") -(check-error (color=? "plaid" "white") "color=?: Expected a color or color name as first argument, but found \"plaid\"") -(check-error (color=? "white" "plaid") "color=?: Expected a color or color name as second argument, but found \"plaid\"") +(check-error (color=? "white" 3) "colorize: Expected a color, but received 3") +(check-error (color=? "plaid" "white") "color=?: Expected a color or color name as first argument, but received \"plaid\"") +(check-error (color=? "white" "plaid") "color=?: Expected a color or color name as second argument, but received \"plaid\"") ; Test cases for map3-image: ;(check-error (map3-image 5 + + pic:bloch) @@ -55,7 +55,7 @@ (check-error (map3-image + + sqrt pic:bloch) "map3-image: Expected a function with contract num(x) num(y) num(r) num(g) num(b) -> num(b) as third argument") (check-error (map3-image + + + 5) - "map3-image: Expected an image as fourth argument, but found 5") + "map3-image: Expected an image as fourth argument, but received 5") ; red-id : x y r g b -> num (define (red-id x y r g b) r) @@ -114,7 +114,7 @@ (check-error (map4-image + + + sqrt pic:bloch) "map4-image: Expected a function with contract num(x) num(y) num(r) num(g) num(b) num(alpha) -> num(alpha) as fourth argument") (check-error (map4-image + + + + 5) - "map4-image: Expected an image as fifth argument, but found 5") + "map4-image: Expected an image as fifth argument, but received 5") ; red-id6 : x y r g b a -> num (define (red-id6 x y r g b a) r) ; green-id6 : x y r g b a -> num @@ -154,7 +154,7 @@ (check-error (map-image sqrt pic:bloch) "map-image: Expected a function with contract num(x) num(y) color -> color as first argument") (check-error (map-image + 5) - "map-image: Expected an image as second argument, but found 5") + "map-image: Expected an image as second argument, but received 5") ; color-id : x y color -> color (define (color-id x y c) @@ -187,7 +187,7 @@ (define ex6 (map-image kill-red bloch)) ex6 (define (return-5 x y c) 5) -(check-error (map-image return-5 bloch) "colorize: Expected a color, but found 5") +(check-error (map-image return-5 bloch) "colorize: Expected a color, but received 5") "Test cases for build3-image:" (define (x-gradient-2 x y) (min 255 (* 4 x))) @@ -196,9 +196,9 @@ "(build3-image 60 40 zero-2-args x-gradient-2 y-gradient-2) should be a 60x40 rectangle with no red, green increasing from left to right, and blue increasing from top to bottom:" (build3-image 60 40 zero-2-args x-gradient-2 y-gradient-2) (check-error (build3-image "hello" true sqrt sqrt sqrt) - "build3-image: Expected a natural number as first argument, but found \"hello\"") + "build3-image: Expected a natural number as first argument, but received \"hello\"") (check-error (build3-image 17 true sqrt sqrt sqrt) - "build3-image: Expected a natural number as second argument, but found true") + "build3-image: Expected a natural number as second argument, but received true") (check-error (build3-image 17 24 sqrt sqrt sqrt) "build3-image: Expected a function with contract num(x) num(y) -> color as third argument") (check-error (build3-image 17 24 x-gradient-2 sqrt sqrt) @@ -225,8 +225,8 @@ "(build-image 100 100 (lambda (x y) (make-color (* x 2.5) (* y 2.5) 0))):" (build-image 100 100 a-gradient) "should be a 100x100 square with a color gradient increasing in red from left to right, and in green from top to bottom" -(check-error (build-image 3.2 100 a-gradient) "build-image: Expected a natural number as first argument, but found 3.2") -(check-error (build-image 100 -2 a-gradient) "build-image: Expected a natural number as second argument, but found -2") +(check-error (build-image 3.2 100 a-gradient) "build-image: Expected a natural number as first argument, but received 3.2") +(check-error (build-image 100 -2 a-gradient) "build-image: Expected a natural number as second argument, but received -2") (check-error (build-image 100 100 sqrt) "build-image: Expected a function with contract num(x) num(y) -> color as third argument") From 95ed19b91ffbf61217b7026bf450e1d3924e8e6e Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Wed, 13 Jul 2011 06:46:44 -0600 Subject: [PATCH 238/441] fix bad contract (cherry picked from commit 2fb03852b34e326a870f6647ac4b39829e31f53f) --- collects/scribblings/framework/group.scrbl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collects/scribblings/framework/group.scrbl b/collects/scribblings/framework/group.scrbl index f89e289ae14..84cd1d6547b 100644 --- a/collects/scribblings/framework/group.scrbl +++ b/collects/scribblings/framework/group.scrbl @@ -85,7 +85,7 @@ each frame in the group. } - @defmethod*[(((can-close-all?) void?))]{ + @defmethod*[(((can-close-all?) boolean?))]{ Call this method to make sure that closing all of the frames in the frame groups is permitted by the user. The function @method[group:% on-close-all] is expected to be called just after this method is called. From 8d0d481d634c668be7b76a7ed930cd82d115c16b Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Wed, 13 Jul 2011 10:44:30 -0600 Subject: [PATCH 239/441] rebuild Mac x86 libraries to work with 10.4 Merge to 5.1.2 (cherry picked from commit 0860e62bfaa30b229c9bb8a31485fb37109f08da) --- src/get-libs.rkt | 24 ++++++++++++------------ src/mac/README.txt | 10 +++++++--- 2 files changed, 19 insertions(+), 15 deletions(-) diff --git a/src/get-libs.rkt b/src/get-libs.rkt index 31c61f99a85..aaf49935968 100644 --- a/src/get-libs.rkt +++ b/src/get-libs.rkt @@ -6,7 +6,7 @@ ;; without using bytecode. (define url-host "download.racket-lang.org") -(define url-path "/libs/2/") +(define url-path "/libs/3/") (define url-base (string-append "http://" url-host url-path)) (provide all-files+sizes) @@ -28,18 +28,18 @@ ;; GUI Libraries [gui [i386-macosx - ["libcairo.2.dylib" 832656] - ["libintl.8.dylib" 57536] - ["libgio-2.0.0.dylib" 748360] + ["libcairo.2.dylib" 805952] + ["libintl.8.dylib" 57604] + ["libgio-2.0.0.dylib" 747088] ["libjpeg.62.dylib" 412024] - ["libglib-2.0.0.dylib" 1015008] - ["libpango-1.0.0.dylib" 347180] - ["libgmodule-2.0.0.dylib" 19016] - ["libpangocairo-1.0.0.dylib" 84340] - ["libgobject-2.0.0.dylib" 288252] - ["libpixman-1.0.dylib" 526824] - ["libgthread-2.0.0.dylib" 24592] - ["libpng14.14.dylib" 182992] + ["libglib-2.0.0.dylib" 1014032] + ["libpango-1.0.0.dylib" 347300] + ["libgmodule-2.0.0.dylib" 18996] + ["libpangocairo-1.0.0.dylib" 84364] + ["libgobject-2.0.0.dylib" 288244] + ["libpixman-1.0.dylib" 527016] + ["libgthread-2.0.0.dylib" 24556] + ["libpng14.14.dylib" 183016] ["PSMTabBarControl.tgz" 91302 "PSMTabBarControl.framework" 247768]] [x86_64-macosx ["libcairo.2.dylib" 919840] diff --git a/src/mac/README.txt b/src/mac/README.txt index 085dbca57d9..ea83654819d 100644 --- a/src/mac/README.txt +++ b/src/mac/README.txt @@ -43,10 +43,14 @@ Configures (where is some temporary area): pkg-config: --prefix= libpng: --prefix= pixman: --prefix= - Cairo: PATH=/bin --disable-xlib --disable-ft --disable-fc --prefix= + Cairo: PATH=/bin:... --disable-xlib --disable-ft --disable-fc --prefix= gettext: --prefix= - glib: PATH=/bin CFLAGS=-I/include LDFLAGS=-L/lib --prefix= - Pango: PATH=/bin --without-x --with-included-modules=yes --with-dynamic-modules=no + glib: PATH=/bin:... CFLAGS=-I/include LDFLAGS=-L/lib --prefix= + Pango: PATH=/bin:... --without-x --with-included-modules=yes --with-dynamic-modules=no + + To support 10.4, add + CC=gcc-4.0 CPPFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4" + for all packages. Note: PATH above ensures that pkg-config binaries are used to find things in rather than some other area, such as /opt/local. From 60f3e79bb802f958213f916c0961a7ac9bd4326a Mon Sep 17 00:00:00 2001 From: Asumu Takikawa Date: Wed, 13 Jul 2011 15:34:55 -0400 Subject: [PATCH 240/441] Use real contract in bitmap% docs (cherry picked from commit 2fdc56db3af0ed2065d29639b60584fd97580651) --- collects/scribblings/draw/bitmap-class.scrbl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collects/scribblings/draw/bitmap-class.scrbl b/collects/scribblings/draw/bitmap-class.scrbl index a987475ec5b..171fab7f788 100644 --- a/collects/scribblings/draw/bitmap-class.scrbl +++ b/collects/scribblings/draw/bitmap-class.scrbl @@ -62,7 +62,7 @@ When a @racket[bits] byte string is provided: Creates a monochrome [y real?] [width exact-nonnegative-integer?] [height exact-nonnegative-integer?] - [pixels (and/c bytes? mutable?)] + [pixels (and/c bytes? (not/c immutable?))] [just-alpha? any/c #f] [pre-multiplied? any/c #f]) void?]{ From 7f7618dd0735f9bc8ab276a6994da812e8c733a6 Mon Sep 17 00:00:00 2001 From: Matthias Felleisen Date: Wed, 13 Jul 2011 18:00:35 -0400 Subject: [PATCH 241/441] small edit to doc of atan; Closes PR 12039 (cherry picked from commit 03dc212d61babec305209832dd4c9a5c1afd9271) --- collects/lang/private/beginner-funs.rkt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/collects/lang/private/beginner-funs.rkt b/collects/lang/private/beginner-funs.rkt index a7973a1cb43..27dc2860df3 100644 --- a/collects/lang/private/beginner-funs.rkt +++ b/collects/lang/private/beginner-funs.rkt @@ -73,8 +73,8 @@ "Evaluates the arcsine (inverse of sin) of a number.") (acos (number -> number) "Evaluates the arccosine (inverse of cos) of a number.") - (atan (number -> number) - "Evaluates the arctan (inverse of tan) of a number.") + (atan (number [number] -> number) + "Evaluates the arctan of the given number or the ratio of the two given numbers.") (sinh (number -> number) "Evaluates the hyperbolic sine of a number.") From 72a81a7c124670514b5c06dfdba372c61fd48724 Mon Sep 17 00:00:00 2001 From: Guillaume Marceau Date: Wed, 13 Jul 2011 23:51:06 -0400 Subject: [PATCH 242/441] Fixed that 'all contracts for primitives print as lists' bug in scribblings/htdp-langs. (cherry picked from commit 452f3a14fb7b25e6c54d08abdb8770fb20e68752) --- collects/scribblings/htdp-langs/prim-ops.rkt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collects/scribblings/htdp-langs/prim-ops.rkt b/collects/scribblings/htdp-langs/prim-ops.rkt index 3d78579f8c5..6fdd02885c9 100644 --- a/collects/scribblings/htdp-langs/prim-ops.rkt +++ b/collects/scribblings/htdp-langs/prim-ops.rkt @@ -5,7 +5,7 @@ scribble/struct scribble/racket racket/list - racket/pretty + scheme/pretty syntax/docprovide (for-syntax racket/base) ) From fd6d7de5066190e11e41ceb3f8f1428af1ba68f4 Mon Sep 17 00:00:00 2001 From: Guillaume Marceau Date: Thu, 14 Jul 2011 00:12:47 -0400 Subject: [PATCH 243/441] Better fix for the previous bug. (cherry picked from commit 793d7894f1e63f6b183c3e717f9d522133b39afb) --- collects/scribblings/htdp-langs/prim-ops.rkt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/collects/scribblings/htdp-langs/prim-ops.rkt b/collects/scribblings/htdp-langs/prim-ops.rkt index 6fdd02885c9..473e39851bf 100644 --- a/collects/scribblings/htdp-langs/prim-ops.rkt +++ b/collects/scribblings/htdp-langs/prim-ops.rkt @@ -5,7 +5,7 @@ scribble/struct scribble/racket racket/list - scheme/pretty + racket/pretty syntax/docprovide (for-syntax racket/base) ) @@ -33,7 +33,7 @@ (define (typeset-type type) (let-values ([(in out) (make-pipe)]) (parameterize ([pretty-print-columns 50]) - (pretty-print type out)) + (pretty-write type out)) (port-count-lines! in) (read-syntax #f in))) From ef167bb249d1e7b7a79c743534bce6e745c353ba Mon Sep 17 00:00:00 2001 From: Guillaume Marceau Date: Thu, 14 Jul 2011 01:45:51 -0400 Subject: [PATCH 244/441] Fixed some missing links in the documentation. (cherry picked from commit da6e819b6f40ee246f6e6534d411250d70b68782) --- collects/htdp/error-reporting.scrbl | 4 +++- collects/htdp/error.rkt | 2 +- collects/htdp/htdp-lib.scrbl | 5 +++-- collects/htdp/testing.rkt | 4 ++-- collects/htdp/testing.scrbl | 33 +++++++++++++++-------------- 5 files changed, 26 insertions(+), 22 deletions(-) diff --git a/collects/htdp/error-reporting.scrbl b/collects/htdp/error-reporting.scrbl index 4d46e46f473..452e82cbf58 100755 --- a/collects/htdp/error-reporting.scrbl +++ b/collects/htdp/error-reporting.scrbl @@ -1,6 +1,8 @@ #lang scribble/doc -@(require scribble/manual) +@(require scribble/manual + (for-label htdp/error) + ) @title[#:tag "error-reporting"]{Error Reporting Functions} diff --git a/collects/htdp/error.rkt b/collects/htdp/error.rkt index 9708d75dc43..21883517a15 100644 --- a/collects/htdp/error.rkt +++ b/collects/htdp/error.rkt @@ -114,7 +114,7 @@ ;; check-arg : sym bool str (or/c str non-negative-integer) TST -> void (define (check-arg pname condition expected arg-posn given) (unless condition - (tp-error pname "expects a ~a as ~a argument, given: ~e" + (tp-error pname "expects a ~a as ~a argument, given ~e" expected (spell-out arg-posn) given))) diff --git a/collects/htdp/htdp-lib.scrbl b/collects/htdp/htdp-lib.scrbl index 7d84f4abf4e..154150320a8 100755 --- a/collects/htdp/htdp-lib.scrbl +++ b/collects/htdp/htdp-lib.scrbl @@ -1,6 +1,7 @@ #lang scribble/doc -@(require scribble/manual scribble/eval) +@(require scribble/manual scribble/eval + (for-label lang/prim lang/imageeq lang/posn racket/gui/base)) @(define (htdp-ref s) @secref[#:doc '(lib "scribblings/htdp-langs/htdp-langs.scrbl") s]) @title{HtDP Languages as Libraries} @@ -72,7 +73,7 @@ libraries in legacy form. It provides the bindings of @defmodule[lang/plt-pretty-big] The @racketmodname[lang/plt-pretty-big] module extends -@racket[lang/plt-pretty-big-text] with @racketmodname[scheme/gui/base] +@racket[lang/plt-pretty-big-text] with @racketmodname[racket/gui/base] and @racketmodname[lang/imageeq]. This language corresponds to the @onscreen{Pretty Big} legacy language in DrRacket. diff --git a/collects/htdp/testing.rkt b/collects/htdp/testing.rkt index 0be8f0e45d4..614ef154499 100644 --- a/collects/htdp/testing.rkt +++ b/collects/htdp/testing.rkt @@ -1,8 +1,8 @@ #lang scheme/base -(require test-engine/scheme-tests) +(require test-engine/racket-tests) (define (generate-report) (test)#;(void)) -(provide (all-from-out test-engine/scheme-tests) +(provide (all-from-out test-engine/racket-tests) generate-report) diff --git a/collects/htdp/testing.scrbl b/collects/htdp/testing.scrbl index 43caa5f74d2..dbae46f6722 100755 --- a/collects/htdp/testing.scrbl +++ b/collects/htdp/testing.scrbl @@ -1,25 +1,26 @@ #lang scribble/doc -@(require scribble/manual) +@(require scribble/manual + (for-label test-engine/racket-tests)) @title{Testing} @; ----------------------------------------------------------------------------- -@defmodule[htdp/testing #:use-sources (test-engine/scheme-tests)] - -The library re-exports the following identifiers from test-engine/scheme-tests: - - @racket[build-test-engine] - @racket[builder] - @racket[display-results] - @racket[error-handler] - @racket[exn:fail:wish] - @racket[generate-report] - @racket[get-test-engine] - @racket[reset-tests] - @racket[run-tests] - @racket[scheme-test-data] - @racket[signature-test-info%] +@defmodule[htdp/testing #:use-sources (test-engine/racket-tests)] + +The library re-exports the following identifiers from test-engine/racket-tests: + +@defproc[(build-test-engine) void?] +@defproc[(builder) void?] +@defproc[(display-results) void?] +@defproc[(error-handler) void?] +@defproc[(exn:fail:wish) void?] +@defproc[(generate-report) void?] +@defproc[(get-test-engine) void?] +@defproc[(reset-tests) void?] +@defproc[(run-tests) void?] +@defproc[(scheme-test-data) void?] +@defproc[(signature-test-info%) void?] @(require scribble/eval From f5923dd7488b113a3efe6c73f6991188ad7dbb25 Mon Sep 17 00:00:00 2001 From: Matthias Felleisen Date: Thu, 14 Jul 2011 12:02:40 -0400 Subject: [PATCH 245/441] sk requested empty scenes with optional background color (cherry picked from commit 40948ee653f99201dbd85b5633d1fbe0b09cc9b0) --- collects/2htdp/private/image-more.rkt | 4 ++-- collects/teachpack/2htdp/scribblings/image.scrbl | 16 +++++++++++----- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/collects/2htdp/private/image-more.rkt b/collects/2htdp/private/image-more.rkt index 4e7fb866481..78bc2de002e 100644 --- a/collects/2htdp/private/image-more.rkt +++ b/collects/2htdp/private/image-more.rkt @@ -882,10 +882,10 @@ (check-mode/color-combination 'square 3 mode color) (make-a-polygon (rectangle-points side-length side-length) mode color)) -(define/chk (empty-scene width height) +(define/chk (empty-scene width height [color 'white]) (crop 0 0 width height (overlay (rectangle width height 'outline (pen "black" 2 'solid 'round 'round)) - (rectangle width height 'solid 'white)))) + (rectangle width height 'solid color)))) (define/chk (rhombus side-length angle mode color) (check-mode/color-combination 'rhombus 3 mode color) diff --git a/collects/teachpack/2htdp/scribblings/image.scrbl b/collects/teachpack/2htdp/scribblings/image.scrbl index c3b5eaec3e3..eb525bd515a 100644 --- a/collects/teachpack/2htdp/scribblings/image.scrbl +++ b/collects/teachpack/2htdp/scribblings/image.scrbl @@ -936,14 +936,20 @@ the @racket[point-count] argument determines how many points the star has. Placing images into scenes is particularly useful when building worlds and universes using @racket[2htdp/universe]. -@defproc[(empty-scene [width (and/c real? (not/c negative?))] - [height (and/c real? (not/c negative?))]) - image?]{ +@defproc*[([(empty-scene [width (and/c real? (not/c negative?))] + [height (and/c real? (not/c negative?))]) + image?] + [(empty-scene [width (and/c real? (not/c negative?))] + [height (and/c real? (not/c negative?))] + [color image-color?]) + image?])]{ -Creates an empty scene, i.e., a rectangle with a black outline. +Creates an empty scene, i.e., a white rectangle with a black outline. @image-examples[(empty-scene 160 90)] - + +The three-argument version creates a rectangle of the specified color with +a black outline. } @defproc[(place-image [image image?] [x real?] [y real?] [scene image?]) image?]{ From 4b3c7d0aece38e0984661ca37fb9f5baeaf29e5b Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Thu, 14 Jul 2011 12:04:38 -0400 Subject: [PATCH 246/441] Switch tcsh(!) and bash scripts to use /bin/sh. (Satisfy some 3rd-party packaging linters.) (cherry picked from commit 69464bba9194fb38418d59f5f918b961c8c18cdd) --- collects/2htdp/tests/xtest | 69 +++++++++++++-------------------- collects/2htdp/uchat/xrun | 6 +-- collects/meta/drdr/copy.sh | 3 +- collects/meta/drdr/good-init.sh | 7 ++-- 4 files changed, 37 insertions(+), 48 deletions(-) diff --git a/collects/2htdp/tests/xtest b/collects/2htdp/tests/xtest index 1427362f9cd..d2561c46dba 100755 --- a/collects/2htdp/tests/xtest +++ b/collects/2htdp/tests/xtest @@ -1,43 +1,30 @@ -#!/bin/tcsh +#!/bin/sh -gracket bad-draw.rkt -echo "done:--- bad-draw.rkt ---" echo "" -racket batch-io.rkt -echo "done:--- batch-io.rkt ---" echo "" -gracket clause-once.rkt -echo "done:--- clause-once.rkt ---" echo "" -gracket full-scene-visible.rkt -echo "done:--- full-scene-visible.rkt ---" echo "" -gracket image-too-large.rkt -echo "done:--- image-too-large.rkt ---" echo "" -gracket image-equality-performance-htdp.rkt -echo "done:--- image-equality-performance-htdp.rkt ---" echo "" -gracket image-equality-performance.rkt -echo "done:--- image-equality-performance.rkt ---" echo "" -gracket mouse-evt.rkt -echo "done:--- mouse-evt.rkt ---" echo "" -gracket on-tick-defined.rkt -echo "done:--- on-tick-defined.rkt ---" echo "" -gracket perform-robby.rkt -echo "done:--- perform-robby.rkt ---" echo "" -gracket profile-robby.rkt -echo "done:--- profile-robby.rkt ---" echo "" -gracket release.rkt -echo "done:--- release.rkt ---" echo "" -gracket stop.rkt -echo "done:--- stop.rkt ---" echo "" -gracket test-image.rkt -echo "done:--- test-image.rkt ---" echo "" -gracket ufo-rename.rkt -echo "done:--- ufo-rename.rkt ---" echo "" -gracket server-rename.rkt -echo "done:--- server-rename.rkt ---" echo "" -gracket world0-stops.rkt -echo "done:--- world0-stops.rkt ---" echo "" -gracket record.rkt -echo "done:--- record.rkt ---" echo "" -gracket record-stop-when.rkt -echo "done:--- record-stop-when.rkt ---" echo "" +run() { + exe="gracket" + if [ "x$1" = "x-t" ]; then exe="racket"; fi + "$exe" "$1" + echo "done:--- $1 ---" + echo "" +} -gracket stop-when-crash.rkt -echo "done:--- stop-when-crash.rkt ---" echo "" +run bad-draw.rkt +run -t batch-io.rkt +run clause-once.rkt +run full-scene-visible.rkt +run image-too-large.rkt +run image-equality-performance-htdp.rkt +run image-equality-performance.rkt +run mouse-evt.rkt +run on-tick-defined.rkt +run perform-robby.rkt +run profile-robby.rkt +run release.rkt +run stop.rkt +run test-image.rkt +run ufo-rename.rkt +run server-rename.rkt +run world0-stops.rkt +run record.rkt +run record-stop-when.rkt +run stop-when-crash.rkt diff --git a/collects/2htdp/uchat/xrun b/collects/2htdp/uchat/xrun index 27361d78a40..833373fb5e4 100755 --- a/collects/2htdp/uchat/xrun +++ b/collects/2htdp/uchat/xrun @@ -1,4 +1,4 @@ -#!/bin/tcsh +#!/bin/sh -mred server.ss & -mred chatter.ss -e"(run* 'go)" & +gracket server.rkt & +gracket chatter.rkt -e"(run* 'go)" & diff --git a/collects/meta/drdr/copy.sh b/collects/meta/drdr/copy.sh index 71ba9b18588..c529dc4e924 100755 --- a/collects/meta/drdr/copy.sh +++ b/collects/meta/drdr/copy.sh @@ -1,2 +1,3 @@ -#!/bin/bash +#!/bin/sh + rsync -avz . drdr:/opt/svn/drdr/ --exclude=compiled --delete --exclude=data diff --git a/collects/meta/drdr/good-init.sh b/collects/meta/drdr/good-init.sh index 2cbc5c170c6..547ee019fd7 100755 --- a/collects/meta/drdr/good-init.sh +++ b/collects/meta/drdr/good-init.sh @@ -1,4 +1,5 @@ -#!/bin/bash +#!/bin/sh + export PLTSTDERR="info" PLTROOT="/opt/plt/plt" LOGS="/opt/plt/logs" @@ -19,7 +20,7 @@ kill_all() { run_loop () { # while true; do - if [[ "x$2" = "xyes" ]]; then + if [ "x$2" = "xyes" ]; then echo "clearing unattached shm regions" ipcs -ma | awk '0 == $6 {print $2}' | xargs -n 1 ipcrm -m fi @@ -31,7 +32,7 @@ run_loop () { # wait "$!" echo "$1: died" rm "$LOGS/$1.pid" - if [[ "x$2" = "xyes" ]]; then + if [ "x$2" = "xyes" ]; then echo "killing processes" kill_all fi From 533293c666e5be969afa5a4bb06bda1de7534331 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Thu, 14 Jul 2011 12:05:45 -0400 Subject: [PATCH 247/441] Added Guillaume's gmail address to mailmap (cherry picked from commit 6e72bf2dad8a15751dc1c296806fda29e3595a6a) --- .mailmap | 1 + 1 file changed, 1 insertion(+) diff --git a/.mailmap b/.mailmap index 0ff73650616..324d04bec83 100644 --- a/.mailmap +++ b/.mailmap @@ -16,3 +16,4 @@ Robby Findler Jon Rafkind Stephen Chang Asumu Takikawa +Guillaume Marceau From a606c3a988c1840a90b102feec8524d9e8b46d07 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Thu, 14 Jul 2011 12:13:37 -0400 Subject: [PATCH 248/441] Shift typo. (cherry picked from commit 318c4fedfc6a654c37fad4e762c471d5f297cfc2) --- collects/2htdp/tests/xtest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collects/2htdp/tests/xtest b/collects/2htdp/tests/xtest index d2561c46dba..25463109d2a 100755 --- a/collects/2htdp/tests/xtest +++ b/collects/2htdp/tests/xtest @@ -2,7 +2,7 @@ run() { exe="gracket" - if [ "x$1" = "x-t" ]; then exe="racket"; fi + if [ "x$1" = "x-t" ]; then exe="racket"; shift; fi "$exe" "$1" echo "done:--- $1 ---" echo "" From 3a2e4969e994f6085d94456e9700bf841f9eeae1 Mon Sep 17 00:00:00 2001 From: Stephen Bloch Date: Thu, 14 Jul 2011 12:08:36 -0400 Subject: [PATCH 249/441] Corrected an error message that said it wanted a real, but actually expected an integer. (cherry picked from commit 83fd1e968d03a3483d0f6698bd387ff7d7d4a8a4) --- collects/2htdp/private/image-more.rkt | 8 ++++---- collects/2htdp/private/img-err.rkt | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/collects/2htdp/private/image-more.rkt b/collects/2htdp/private/image-more.rkt index 78bc2de002e..a63a62928a3 100644 --- a/collects/2htdp/private/image-more.rkt +++ b/collects/2htdp/private/image-more.rkt @@ -1372,14 +1372,14 @@ (define build-pen/make-pen (let ([orig-make-pen make-pen]) - (define/chk (make-pen color real-0-255 pen-style pen-cap pen-join) - (orig-make-pen color real-0-255 pen-style pen-cap pen-join)) + (define/chk (make-pen color int-0-255 pen-style pen-cap pen-join) + (orig-make-pen color int-0-255 pen-style pen-cap pen-join)) make-pen)) (define build-pen/pen (let ([orig-make-pen make-pen]) - (define/chk (pen color real-0-255 pen-style pen-cap pen-join) - (orig-make-pen color real-0-255 pen-style pen-cap pen-join)) + (define/chk (pen color int-0-255 pen-style pen-cap pen-join) + (orig-make-pen color int-0-255 pen-style pen-cap pen-join)) pen)) (define/chk freeze diff --git a/collects/2htdp/private/img-err.rkt b/collects/2htdp/private/img-err.rkt index 62f13518dc2..e68488f1851 100644 --- a/collects/2htdp/private/img-err.rkt +++ b/collects/2htdp/private/img-err.rkt @@ -253,9 +253,9 @@ (check-arg fn-name (and (integer? arg) (<= 0 arg 255)) 'integer\ between\ 0\ and\ 255 i arg) arg] - [(real-0-255) + [(int-0-255) (check-arg fn-name (and (integer? arg) (<= 0 arg 255)) - 'real\ number\ between\ 0\ and\ 255 i arg) + 'integer\ between\ 0\ and\ 255 i arg) arg] [(pen-style) From 14ed19da09193bb534baff6fa22d35ab7438d5b0 Mon Sep 17 00:00:00 2001 From: Stephen Bloch Date: Thu, 14 Jul 2011 16:39:25 -0400 Subject: [PATCH 250/441] Corrected signature of scene+line to match examples and actual behavior (sixth argument can be a pen or color, not just a color). (cherry picked from commit d510f6aecc9331a1700079703679ec6080e6727d) --- collects/teachpack/2htdp/scribblings/image.scrbl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collects/teachpack/2htdp/scribblings/image.scrbl b/collects/teachpack/2htdp/scribblings/image.scrbl index eb525bd515a..a0372f14db6 100644 --- a/collects/teachpack/2htdp/scribblings/image.scrbl +++ b/collects/teachpack/2htdp/scribblings/image.scrbl @@ -1016,7 +1016,7 @@ a black outline. @defproc[(scene+line [image image?] [x1 real?] [y1 real?] [x2 real?] [y2 real?] - [color image-color?]) + [pen-or-color (or/c pen? image-color?)]) image?]{ Adds a line to the image @racket[scene], starting from the point (@racket[x1],@racket[y1]) From 0b0de351fd5818839506336b5ccf5aaf59db17b9 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Thu, 14 Jul 2011 16:42:04 -0400 Subject: [PATCH 251/441] New `xrepl' collection. (cherry picked from commit c544ebfe6c9d0864047ad712ac6c3c97e023588f) --- collects/meta/dist-specs.rkt | 3 + collects/meta/props | 1 + collects/unstable/time.rkt | 49 ++ collects/xrepl/info.rkt | 3 + collects/xrepl/main.rkt | 13 + collects/xrepl/xrepl.rkt | 1245 ++++++++++++++++++++++++++++++++++ 6 files changed, 1314 insertions(+) create mode 100644 collects/unstable/time.rkt create mode 100644 collects/xrepl/info.rkt create mode 100644 collects/xrepl/main.rkt create mode 100644 collects/xrepl/xrepl.rkt diff --git a/collects/meta/dist-specs.rkt b/collects/meta/dist-specs.rkt index 13fa0f72f9b..99187995f3e 100644 --- a/collects/meta/dist-specs.rkt +++ b/collects/meta/dist-specs.rkt @@ -511,6 +511,9 @@ mz-extras :+= (collects: "rnrs/") ;; -------------------- readline mz-extras :+= (package: "readline/") +;; -------------------- readline +mz-extras :+= (package: "xrepl/") + ;; -------------------- wxme mz-extras :+= (collects: "wxme/") diff --git a/collects/meta/props b/collects/meta/props index e428687d588..914c0e3d851 100755 --- a/collects/meta/props +++ b/collects/meta/props @@ -2069,6 +2069,7 @@ path/s is either such a string or a list of them. "collects/xml/text-box-tool.rkt" drdr:command-line (gracket-text "-t" *) "collects/xml/text-snipclass.rkt" drdr:command-line (gracket-text "-t" *) "collects/xml/xml-snipclass.rkt" drdr:command-line (gracket-text "-t" *) +"collects/xrepl" responsible (eli) "doc/release-notes/COPYING-libscheme.txt" responsible (mflatt) "doc/release-notes/COPYING.txt" responsible (mflatt) "doc/release-notes/drracket" responsible (robby) diff --git a/collects/unstable/time.rkt b/collects/unstable/time.rkt new file mode 100644 index 00000000000..5350346c6fe --- /dev/null +++ b/collects/unstable/time.rkt @@ -0,0 +1,49 @@ +#lang racket/base + +;; An improved `time' variant: better output, and repetitions with averages +(provide time) + +(require racket/list) + +(define (time* thunk times) + (define throw + (if (<= times 0) + (error 'time "bad count: ~e" times) + (floor (* times 2/7)))) + (define results #f) + (define timings '()) + (define (run n) + (when (<= n times) + (when (> times 1) (printf "; run #~a..." n) (flush-output)) + (let ([r (call-with-values (lambda () (time-apply thunk '())) list)]) + (set! results (car r)) + (set! timings (cons (cdr r) timings)) + (when (> times 1) + (printf " ->") + (if (null? results) + (printf " (0 values returned)") + (begin (printf " ~.s" (car results)) + (for ([r (in-list (cdr results))]) (printf ", ~s" r)) + (newline)))) + (run (add1 n))))) + (collect-garbage) + (collect-garbage) + (collect-garbage) + (run 1) + (set! timings (sort timings < #:key car)) ; sort by cpu-time + (set! timings (drop timings throw)) ; throw extreme bests + (set! timings (take timings (- (length timings) throw))) ; and worsts + (set! timings (let ([n (length timings)]) ; average + (map (lambda (x) (round (/ x n))) (apply map + timings)))) + (let-values ([(cpu real gc) (apply values timings)]) + (when (> times 1) + (printf "; ~a runs, ~a best/worst removed, ~a left for average:\n" + times throw (- times throw throw))) + (printf "; cpu time: ~sms = ~sms + ~sms gc; real time: ~sms\n" + cpu (- cpu gc) gc real)) + (apply values results)) + +(define-syntax time + (syntax-rules () + [(_ n expr0 expr ...) (time* (lambda () expr0 expr ...) n)] + [(_ expr0 expr ...) (time* (lambda () expr0 expr ...) 1)])) diff --git a/collects/xrepl/info.rkt b/collects/xrepl/info.rkt new file mode 100644 index 00000000000..dd70b324f1a --- /dev/null +++ b/collects/xrepl/info.rkt @@ -0,0 +1,3 @@ +#lang setup/infotab + +(define name "eXtended REPL") diff --git a/collects/xrepl/main.rkt b/collects/xrepl/main.rkt new file mode 100644 index 00000000000..d4a285c32be --- /dev/null +++ b/collects/xrepl/main.rkt @@ -0,0 +1,13 @@ +#lang racket/base + +;; This file is intended to be loaded from your init file (evaluatue +;; (find-system-path 'init-file) to see where that is on your OS.) + +(require "xrepl.rkt") + +;; may want to disable inlining to allow redefinitions +;; (compile-enforce-module-constants #f) + +;; create the command repl reader, and value-saving evaluator +(current-prompt-read (make-command-reader)) +(current-eval (make-command-evaluator (current-eval))) diff --git a/collects/xrepl/xrepl.rkt b/collects/xrepl/xrepl.rkt new file mode 100644 index 00000000000..a53c13899bb --- /dev/null +++ b/collects/xrepl/xrepl.rkt @@ -0,0 +1,1245 @@ +#lang racket/base + +;; ---------------------------------------------------------------------------- +;; customization + +(define toplevel-prefix (make-parameter "-")) ; when not in a module +(define saved-values-number (make-parameter 5)) +(define saved-values-char (make-parameter #\^)) +(define wrap-column (make-parameter 79)) +;; TODO: when there's a few more of these, make them come from the prefs + +;; ---------------------------------------------------------------------------- + +(require racket/list racket/match) + +;; ---------------------------------------------------------------------------- +;; utilities + +;; autoloads: avoid loading a ton of stuff to minimize startup penalty +(define autoloaded-specs (make-hasheq)) +(define (autoloaded? sym) (hash-ref autoloaded-specs sym #f)) +(define-syntax-rule (defautoload libspec id ...) + (begin (define (id . args) + (set! id (dynamic-require 'libspec 'id)) + (hash-set! autoloaded-specs 'libspec #t) + (hash-set! autoloaded-specs 'id #t) + (apply id args)) + ...)) + +(defautoload racket/system system system*) +(defautoload racket/file file->string) +(defautoload setup/path-to-relative path->relative-string/setup) +(defautoload syntax/modcode get-module-code) +(defautoload racket/path find-relative-path) + +;; similar, but just for identifiers +(define-namespace-anchor anchor) +(define (here-namespace) (namespace-anchor->namespace anchor)) +(define (make-lazy-identifier sym from) + (define id #f) + (λ () (or id (parameterize ([current-namespace (here-namespace)]) + (eval (namespace-syntax-introduce + (datum->syntax #f #`(require #,from)))) + (set! id (namespace-symbol->identifier sym)) + id)))) + +;; makes it easy to use meta-tools without user-namespace contamination +(define (eval-sexpr-for-user form) + (eval (namespace-syntax-introduce (datum->syntax #f form)))) + +(define (modspec->path modspec) ; returns a symbol for 'foo specs + (resolved-module-path-name ((current-module-name-resolver) modspec #f #f))) +(define (mpi->name mpi) + (resolved-module-path-name (module-path-index-resolve mpi))) +(define (->relname x) + (if (path-string? x) (path->relative-string/setup x) x)) + +(define (here-source) ; returns a path, a symbol, or #f (= not in a module) + (let* ([x (datum->syntax #'here '(#%variable-reference))] + [x (eval (namespace-syntax-introduce x))] + [x (variable-reference->module-source x)]) + x)) + +(define (phase->name phase [fmt #f]) + (define s + (case phase + [(0) #f] [(#f) "for-label"] [(1) "for-syntax"] [(-1) "for-template"] + [else (format "for-meta:~a" phase)])) + (cond [(not fmt) s] [s (format fmt s)] [else ""])) + +;; true if (quote sym) is a known module name +(define (module-name? sym) + (and (symbol? sym) + (with-handlers ([exn? (λ (_) #f)]) (module->imports `',sym) #t))) + +;; support visual column-aware output +;; right after an input expression is entered the terminal won't show the +;; newline, so as far as column counting goes it's still after the prompt which +;; leads to bad output in practice. (at least in the common case where IO +;; share the same terminal.) This will be redundant with the already-added +;; `port-set-next-location!'. +(define last-output-port #f) +(define last-output-line #f) +(define last-output-visual-col #f) +(define (maybe-new-output-port) + (unless (eq? last-output-port (current-output-port)) + (set! last-output-port (current-output-port)) + (flush-output last-output-port) + (port-count-lines! last-output-port) + (let-values ([(line col pos) (port-next-location last-output-port)]) + (set! last-output-line line) + (set! last-output-visual-col col)))) +(define (fresh-line) + (maybe-new-output-port) + (flush-output last-output-port) + (let-values ([(line col pos) (port-next-location last-output-port)]) + (unless (eq? col (if (eq? line last-output-line) last-output-visual-col 0)) + (newline)))) +(define (prompt-shown) + (maybe-new-output-port) + ;; if there was a way to change the location of stdout we'd set the column to + ;; 0 here... + (let-values ([(line col pos) (port-next-location last-output-port)]) + (set! last-output-line line) + (set! last-output-visual-col col))) + +;; wrapped `printf' (cheap but effective), aware of the visual col +(define wrap-prefix (make-parameter "")) +(define (wprintf fmt . args) + (let ([o (current-output-port)] + [wcol (wrap-column)] + [pfx (wrap-prefix)] + [strs (regexp-split #rx" +" (apply format fmt args))]) + (write-string (car strs) o) + (for ([str (in-list (cdr strs))]) + (define-values [line col pos] (port-next-location o)) + (define vcol + (if (eq? line last-output-line) (- col last-output-visual-col) col)) + (if ((+ vcol (string-length str)) . >= . wcol) + (begin (newline o) (write-string pfx o)) + (write-string " " o)) + (write-string str o)))) + +;; ---------------------------------------------------------------------------- +;; toplevel "," commands management + +(struct command (names argline blurb desc handler)) +(define commands (make-hasheq)) +(define commands-list '()) ; for help displays, in definition order +(define current-command (make-parameter #f)) +(define (register-command! names blurb argline desc handler) + (let* ([names (if (list? names) names (list names))] + [cmd (command names blurb argline desc handler)]) + (for ([n (in-list names)]) + (if (hash-ref commands n #f) + (error 'defcommand "duplicate command name: ~s" n) + (hash-set! commands n cmd))) + (set! commands-list (cons cmd commands-list)))) +(define-syntax-rule (defcommand cmd+aliases argline blurb [desc ...] + body0 body ...) + (register-command! `cmd+aliases `argline `blurb `(desc ...) + (λ () body0 body ...))) + +(define (cmderror fmt #:default-who [dwho #f] . args) + (let ([cmd (current-command)]) + (raise-user-error (or (and cmd (string->symbol (format ",~a" cmd))) + dwho '???) + (apply format fmt args)))) + +;; returns first peeked non-space/tab char (#\return is considered space too) +(define string->list* + (let ([t (make-weak-hasheq)]) ; good for string literals + (λ (s) (hash-ref! t s (λ () (string->list s)))))) +(define (skip-spaces/peek [skip " \t\r"]) + (let ([skip (string->list* skip)]) + (let loop () + (let ([ch (peek-char)]) + (if (memq ch skip) (begin (read-char) (loop)) ch))))) + +(define (getarg kind [flag 'req]) + (define (argerror fmt . args) + (apply cmderror #:default-who 'getarg fmt args)) + (define (missing) (argerror "missing ~a argument" kind)) + (define (get read) + (let loop ([flag flag]) + (case flag + [(req) (let ([x (if (eq? #\newline (skip-spaces/peek)) eof (read))]) + (if (eof-object? x) (missing) x))] + [(opt) (and (not (eq? #\newline (skip-spaces/peek))) (loop 'req))] + [(list) (let ([x (loop 'opt)]) + (if x (cons x (loop 'list)) '()))] + [(list+) (cons (loop 'req) (loop 'list))] + [else (error 'getarg "unknown flag: ~e" flag)]))) + (define (read-string-arg) + (define ch (skip-spaces/peek " \t\r\n")) + (let* ([i (current-input-port)] + [m (if (eq? ch #\") + (let ([m (regexp-match #px#"((?:\\\\.|[^\"\\\\]+)+)\"" i)]) + (and m (regexp-replace* #rx#"\\\\(.)" (cadr m) #"\\1"))) + (cond [(regexp-match #px#"\\S+" i) => car] [else #f]))]) + (if m (bytes->string/locale m) eof))) + (define (read-line-arg) + (regexp-replace* #px"^\\s+|\\s+$" (read-line) "")) + (define (process-modspec spec) + ;; convenience: symbolic modspecs that name a file turn to a `file' spec, + ;; and those that name a known module turn to a (quote sym) spec + (define dtm (if (syntax? spec) (syntax->datum spec) spec)) + (if (not (symbol? dtm)) + spec + (let* (;; try a file + [f (expand-user-path (symbol->string dtm))] + [f (and (file-exists? f) (path->string f))] + [f (and f (if (absolute-path? f) `(file ,f) f))] + ;; try a quoted one if the above failed + [m (or f (and (module-name? dtm) `',dtm))] + [m (and m (if (syntax? spec) (datum->syntax spec m spec) m))]) + (or m spec)))) + (define (translate arg convert) + (and arg (if (memq flag '(list list+)) (map convert arg) (convert arg)))) + (let loop ([kind kind]) + (case kind + [(line) (get read-line-arg)] + [(string) (get read-string-arg)] + [(path) (translate (loop 'string) expand-user-path)] + [(path*) (if (eq? flag 'list) + (let ([args (getarg 'path 'list)]) + (if (pair? args) + args + (let ([x (here-source)]) (if (path? x) (list x) '())))) + (error 'getarg "'path* must always be used with 'list"))] + [(sexpr) (get read)] + [(syntax) (translate (get read-syntax) namespace-syntax-introduce)] + [(modspec) (translate (loop 'syntax) process-modspec)] + [else (error 'getarg "unknown arg kind: ~e" kind)]))) + +(define (run-command cmd) + (parameterize ([current-command cmd]) + (with-handlers ([void (λ (e) + (if (exn? e) + (eprintf "~a\n" (exn-message e)) + (eprintf "~s\n" e)))]) + ((command-handler (or (hash-ref commands cmd #f) + (error "Unknown command:" cmd))))))) + +(defcommand (help h ?) "[]" + "display available commands" + ["Lists known commands and their help; use with a command name to get" + "additional information for that command."] + (define arg (match (getarg 'sexpr 'opt) [(list 'unquote x) x] [x x])) + (define cmd + (and arg (hash-ref commands arg + (λ () (printf "*** Unknown command: `~s'\n" arg) #f)))) + (define (show-cmd cmd indent) + (define names (command-names cmd)) + (printf "~a~s" indent (car names)) + (when (pair? (cdr names)) (printf " ~s" (cdr names))) + (printf ": ~a\n" (command-blurb cmd))) + (if cmd + (begin (show-cmd cmd "; ") + (printf "; usage: ,~a" arg) + (let ([a (command-argline cmd)]) (when a (printf " ~a" a))) + (printf "\n") + (for ([d (in-list (command-desc cmd))]) + (printf "; ~a\n" d))) + (begin (printf "; Available commands:\n") + (for-each (λ (c) (show-cmd c "; ")) (reverse commands-list))))) + +;; ---------------------------------------------------------------------------- +;; generic commands + +(defcommand (exit quit ex) "[]" + "exit racket" + ["Optional argument specifies exit code."] + (cond [(getarg 'sexpr 'opt) => exit] [else (exit)])) + +(define last-2dirs + (make-parameter (let ([d (current-directory)]) (cons d d)))) +(define (report-directory-change [mode #f]) + (define curdir (current-directory)) + (define (report) ; remove last "/" and say where we are + (define-values [base name dir?] (split-path curdir)) + (printf "; now in ~a\n" (if base (build-path base name) curdir))) + (cond [(not (equal? (car (last-2dirs)) curdir)) + (last-2dirs (cons curdir (car (last-2dirs)))) + (report)] + [else (case mode + [(pwd) (report)] + [(cd) (printf "; still in the same directory\n")])])) + +(defcommand cd "[]" + "change the current directory" + ["Sets `current-directory'; expands user paths. With no arguments, goes" + "to your home directory. An argument of `-' indicates the previous" + "directory."] + (let* ([arg (or (getarg 'path 'opt) (find-system-path 'home-dir))] + [arg (if (equal? arg (string->path "-")) (cdr (last-2dirs)) arg)]) + (if (directory-exists? arg) + (begin (current-directory arg) (report-directory-change 'cd)) + (eprintf "cd: no such directory: ~a\n" arg)))) + +(defcommand pwd #f + "read the current directory" + ["Displays the value of `current-directory'."] + (report-directory-change 'pwd)) + +(defcommand (shell sh ls cp mv rm md rd git svn) "" + "run a shell command" + ["`sh' runs a shell command (via `system'), the aliases run a few useful" + "unix commands. (Note: `ls' has some default arguments set.)"] + (let* ([arg (getarg 'line)] + [arg (if (equal? "" arg) #f arg)] + [cmd (current-command)]) + (case cmd + [(ls) (set! cmd "ls -F")] + [(shell) (set! cmd 'sh)]) + (let ([cmd (cond [(eq? 'sh cmd) #f] + [(symbol? cmd) (symbol->string cmd)] + [else cmd])]) + (unless (system (cond [(and (not cmd) (not arg)) (getenv "SHELL")] + [(not cmd) arg] + [(not arg) cmd] + [else (string-append cmd " " arg)])) + (eprintf "(exit with an error status)\n"))))) + +(defcommand (edit e) " ..." + "edit files in your $EDITOR" + ["Runs your $EDITOR with the specified file/s. If no files are given, and" + "the REPL is currently inside a module, the file for that module is used." + "If $EDITOR is not set, the ,drracket will be used instead."] + (define env (let ([e (getenv "EDITOR")]) (and (not (equal? "" e)) e))) + (define exe (and env (find-executable-path env))) + (cond [(not env) + (printf "~a, using the ,drracket command.\n" + (if env + (string-append "$EDITOR ("env") not found in your path") + "no $EDITOR variable")) + (run-command 'drracket)] + [(not (apply system* exe (getarg 'path* 'list))) + (eprintf "(exit with an error status)\n")] + [else (void)])) + +(define ->running-dr #f) +(define (->dr . xs) (unless ->running-dr (start-dr)) (->running-dr xs)) +(define (start-dr) + (define c (make-custodian)) + (define ns ((dynamic-require 'racket/gui 'make-gui-namespace))) + (parameterize ([current-custodian c] + [current-namespace ns] + [exit-handler (λ (x) + (eprintf "DrRacket shutdown.\n") + (set! ->running-dr #f) + (custodian-shutdown-all c))]) + ;; construct a kind of a fake sandbox to run drracket in + (define es + (eval '(begin (require racket/class racket/gui framework racket/file) + (define es (make-eventspace)) + es))) + (define (E expr) + (parameterize ([current-custodian c] + [current-namespace ns] + [(eval 'current-eventspace ns) es]) + (eval expr ns))) + (E '(begin + (define c (current-custodian)) + (define-syntax-rule (Q expr ...) + (parameterize ([current-eventspace es]) + (queue-callback + (λ () (parameterize ([current-custodian c]) expr ...))))) + ;; problem: right after we read commands, readline will save a new + ;; history in the prefs file which frequently collides with drr; so + ;; make it use a writeback thing, with silent failures. (actually, + ;; this is more likely a result of previously starting drr wrongly, + ;; but keep this anyway.) + (let ([t (make-hasheq)] [dirty '()]) + (preferences:low-level-get-preference + (λ (sym [dflt (λ () #f)]) + (hash-ref t sym + (λ () (let ([r (get-preference sym dflt)]) + (hash-set! t sym r) + r))))) + (preferences:low-level-put-preferences + (λ (prefs vals) + (Q (set! dirty (append prefs dirty)) + (for ([pref (in-list prefs)] [val (in-list vals)]) + (hash-set! t pref val))))) + (define (flush-prefs) + (set! dirty (remove-duplicates dirty)) + (with-handlers ([void void]) + (put-preferences dirty (map (λ (p) (hash-ref t p)) dirty)) + (set! dirty '()))) + (exit:insert-on-callback flush-prefs) + (define (write-loop) + (sleep (random 4)) + (when (pair? dirty) (Q (flush-prefs))) + (write-loop)) + (define th (thread write-loop)) + (exit:insert-on-callback (λ () (Q (kill-thread th))))) + ;; start it + (Q (dynamic-require 'drracket #f)) + ;; hide the first untitled window, so drr runs in "server mode" + (Q (dynamic-require 'drracket/tool-lib #f)) + (define top-window + (let ([ch (make-channel)]) + (Q (let ([r (get-top-level-windows)]) + (channel-put ch (and (pair? r) (car r))))) + (channel-get ch))) + (Q (when top-window (send top-window show #f)) + ;; and avoid trying to open new windows in there + (send (group:get-the-frame-group) clear)) + ;; avoid being able to quit so the server stays running, + ;; also hack: divert quitting into closing all group frames + (define should-exit? #f) + (exit:insert-can?-callback + (λ () (or should-exit? + (let ([g (group:get-the-frame-group)]) + (when (send g can-close-all?) (send g on-close-all)) + #f)))) + (require drracket/tool-lib))) ; used as usual below + (define (new) + (E '(Q (drracket:unit:open-drscheme-window #f)))) + (define open + (case-lambda + [() (E '(Q (handler:open-file)))] + [paths + (let ([paths (map path->string paths)]) + (E `(Q (let ([f (drracket:unit:open-drscheme-window ,(car paths))]) + (send f show #t) + ,@(for/list ([p (in-list (cdr paths))]) + `(begin (send f open-in-new-tab ,p) + (send f show #t)))))))])) + (define (quit) + (E `(Q (set! should-exit? #t) (exit:exit)))) + (define (loop) + (define m (thread-receive)) + (if (pair? m) + (let ([proc (case (car m) [(new) new] [(open) open] [(quit) quit] + [else (cmderror "unknown flag: -~a" (car m))])]) + (if (procedure-arity-includes? proc (length (cdr m))) + (apply proc (cdr m)) + (cmderror "bad number of arguments for the -~a flag" (car m)))) + (error '->dr "internal error")) + (loop)) + (define th (thread loop)) + (set! ->running-dr (λ (xs) (thread-send th xs))))) +(defcommand (drracket dr drr) "[-flag] ..." + "edit files in DrRacket" + ["Runs DrRacket with the specified file/s. If no files are given, and" + "the REPL is currently inside a module, the file for that module is used." + "DrRacket is launched directly, without starting a new subprocess, and it" + "is kept running in a hidden window so further invocations are immediate." + "In addition to file arguments, the arguments can have a flag that" + "specifies one of a few operations for the running DrRacket:" + "* -new: opens a new editing window. This is the default when no files are" + " given and the REPL is not inside a module," + "* -open: opens the specified file/s (or the current module's file). This" + " is the default when files are given or when inside a module." + "* -quit: exits the running instance. Quitting the application as usual" + " will only close the visible window, but it will still run in a hidden" + " window. This command should not be needed under normal circumstances."] + (let ([args (getarg 'path* 'list)]) + (if (null? args) + (->dr 'new) + (let* ([cmd (let ([s (path->string (car args))]) + (and (regexp-match? #rx"^-" s) + (string->symbol (substring s 1))))] + [args (if cmd (cdr args) args)]) + (apply ->dr (or cmd 'open) args))))) + +;; ---------------------------------------------------------------------------- +;; binding related commands + +(defcommand (apropos ap) " ..." + "look for a binding" + ["Additional string arguments restrict matches shown. The search specs can" + "have symbols (which specify what to look for in bound names), and regexps" + "(for more complicated matches)."] + (let* ([look (map (λ (s) (cond [(symbol? s) + (regexp (regexp-quote (symbol->string s)))] + [(regexp? s) s] + [else (cmderror "bad search spec: ~e" s)])) + (getarg 'sexpr 'list))] + [look (and (pair? look) + (λ (str) (andmap (λ (rx) (regexp-match? rx str)) look)))] + [syms (map (λ (sym) (cons sym (symbol->string sym))) + (namespace-mapped-symbols))] + [syms (if look (filter (λ (s) (look (cdr s))) syms) syms)] + [syms (sort syms string] ..." + "describe a (bound) identifier" + ["For a bound identifier, describe where is it coming from; for a known" + "module, describe its imports and exports. You can use this command with" + "several identifiers. An optional numeric argument specifies phase for" + "identifier lookup."] + (define-values [try-mods? level ids/mods] + (let ([xs (getarg 'syntax 'list)]) + (if (and (pair? xs) (number? (syntax-e (car xs)))) + (values #f (syntax-e (car xs)) (cdr xs)) + (values #t 0 xs)))) + (for ([id/mod (in-list ids/mods)]) + (define dtm (syntax->datum id/mod)) + (define mod + (and try-mods? + (match dtm + [(list 'quote (and sym (? module-name?))) sym] + [(? module-name?) dtm] + [_ (let ([x (with-handlers ([exn:fail? (λ (_) #f)]) + (modspec->path dtm))]) + (cond [(or (not x) (path? x)) x] + [(symbol? x) (and (module-name? x) `',x)] + [else (error 'describe "internal error: ~s" x)]))]))) + (define bind + (cond [(identifier? id/mod) (identifier-binding id/mod level)] + [mod #f] + [else (cmderror "not an identifier or a known module: ~s" dtm)])) + (define bind? (or bind (not mod))) + (when bind? (describe-binding dtm bind level)) + (when mod (describe-module dtm mod bind?)))) +(define (describe-binding sym b level) + (define at-phase (phase->name level " (~a)")) + (cond + [(not b) + (printf "; `~s' is a toplevel (or unbound) identifier~a\n" sym at-phase)] + [(eq? b 'lexical) + (printf "; `~s' is a lexical identifier~a\n" sym at-phase)] + [(or (not (list? b)) (not (= 7 (length b)))) + (cmderror "*** internal error, racket changed ***")] + [else + (define-values [src-mod src-id nominal-src-mod nominal-src-id + src-phase import-phase nominal-export-phase] + (apply values b)) + (set! src-mod (->relname (mpi->name src-mod))) + (set! nominal-src-mod (->relname (mpi->name nominal-src-mod))) + (printf "; `~s' is a bound identifier~a,\n" sym at-phase) + (printf "; defined~a in ~a~a\n" (phase->name src-phase "-~a") src-mod + (if (not (eq? sym src-id)) (format " as `~s'" src-id) "")) + (printf "; required~a ~a\n" (phase->name import-phase "-~a") + (if (equal? src-mod nominal-src-mod) + "directly" + (format "through \"~a\"~a" + nominal-src-mod + (if (not (eq? sym nominal-src-id)) + (format " where it is defined as `~s'" nominal-src-id) + "")))) + (printf "~a" (phase->name nominal-export-phase "; (exported-~a)\n"))])) +(define (describe-module sexpr mod-path/sym also?) + (define get + (if (symbol? mod-path/sym) + (let ([spec `',mod-path/sym]) + (λ (imp?) ((if imp? module->imports module->exports) spec))) + (let ([code (get-module-code mod-path/sym)]) + (λ (imp?) + ((if imp? module-compiled-imports module-compiled-exports) code))))) + (define (phase p1 0) (> p2 0)) (< p1 p2)] + [(and (< p1 0) (< p2 0)) (> p1 p2)] + [else (> p1 0)])) + (define (modnamestring x) (symbol->string y))] + [(and (symbol? x) (string? y)) #t] + [(and (string? x) (symbol? y)) #f] + [else (error 'describe-module "internal error: ~s, ~s" x y)])) + (define imports + (filter-map + (λ (x) + (and (pair? (cdr x)) + (cons (car x) (sort (map (λ (m) (->relname (mpi->name m))) (cdr x)) + modnamerelname mod-path/sym)]) + (printf "; ~a~a\n" + (if (symbol? relname) "defined directly as '" "located at ") + relname)) + (if (null? imports) + (printf "; no imports.\n") + (parameterize ([wrap-prefix "; "]) + (for ([imps (in-list imports)]) + (let ([phase (car imps)] [imps (cdr imps)]) + (wprintf "; imports~a: ~a" (phase->name phase "-~a") (car imps)) + (for ([imp (in-list (cdr imps))]) (wprintf ", ~a" imp)) + (wprintf ".\n"))))) + (define (show-exports exports kind) + (parameterize ([wrap-prefix "; "]) + (for ([exps (in-list exports)]) + (let ([phase (car exps)] [exps (cdr exps)]) + (wprintf "; direct ~a exports~a: ~a" + kind (phase->name phase "-~a") (car exps)) + (for ([exp (in-list (cdr exps))]) (wprintf ", ~a" exp)) + (wprintf ".\n"))))) + (if (and (null? val-exports) (null? stx-exports)) + (printf "; no direct exports.\n") + (begin (show-exports val-exports "value") + (show-exports stx-exports "syntax")))) + +(define help-id (make-lazy-identifier 'help 'racket/help)) +(defcommand doc " ..." + "browse the racket documentation" + ["Uses Racket's `help' to browse the documentation. (Note that this can be" + "used even in languages that don't have the `help' binding.)"] + (eval-sexpr-for-user `(,(help-id) ,@(getarg 'syntax 'list)))) + +;; ---------------------------------------------------------------------------- +;; require/load commands + +(defcommand (require req r) " ...+" + "require a module" + ["The arguments are usually passed to `require', unless an argument" + "specifies an existing filename -- in that case, it's like using a" + "\"string\" or a (file \"...\") in `require'. (Note: this does not" + "work in subforms.)"] + (more-inputs #`(require #,@(getarg 'modspec 'list+)))) ; use *our* `require' + +(define rr-modules (make-hash)) ; hash to remember reloadable modules + +(defcommand (require-reloadable reqr rr) " ...+" + "require a module, make it reloadable" + ["Same as ,require but the module is required in a way that makes it" + "possible to reload later. If it was already loaded then it is reloaded." + "Note that this is done by setting `compile-enforce-module-constants' to" + "#f, which prohibits some optimizations."] + (parameterize ([compile-enforce-module-constants + (compile-enforce-module-constants)]) + (compile-enforce-module-constants #f) + (for ([spec (in-list (getarg 'modspec 'list+))]) + (define datum (syntax->datum spec)) + (define resolved ((current-module-name-resolver) datum #f #f #f)) + (define path (resolved-module-path-name resolved)) + (if (hash-ref rr-modules resolved #f) + ;; reload + (begin (printf "; reloading ~a\n" path) + (parameterize ([current-module-declare-name resolved]) + (load/use-compiled path))) + ;; require + (begin (hash-set! rr-modules resolved #t) + (printf "; requiring ~a\n" path) + ;; (namespace-require spec) + (eval #`(require #,spec))))))) + +(define enter!-id (make-lazy-identifier 'enter! 'racket/enter)) + +(defcommand (enter en) "[] [noisy?]" + "require a module and go into its namespace" + ["Uses `enter!' to go into the module's namespace; the module name is" + "optional, without it you go back to the toplevel. A module name can" + "specify an existing file as with the ,require command. (Note that this" + "can be used even in languages that don't have the `enter!' binding.)"] + (eval-sexpr-for-user `(,(enter!-id) ,(getarg 'modspec)))) + +(defcommand (toplevel top) #f + "go back to the toplevel" + ["Go back to the toplevel, same as ,enter with no arguments."] + (eval-sexpr-for-user `(,(enter!-id) #f))) + +(defcommand (load ld) " ..." + "load a file" + ["Uses `load' to load the specified file(s)"] + (more-inputs* (map (λ (name) #`(load #,name)) (getarg 'path 'list)))) + +;; ---------------------------------------------------------------------------- +;; debugging commands + +;; not useful: catches only escape continuations +;; (define last-break-exn (make-parameter #f)) +;; (defcommand (continue cont) #f +;; "continue from a break" +;; ["Continue running from the last break."] +;; (if (last-break-exn) +;; ((exn:break-continuation (last-break-exn))) +;; (cmderror 'continue "no break exception to continue from"))) + +(define time-id + (make-lazy-identifier 'time* '(only-in unstable/time [time time*]))) +(defcommand time "[] ..." + "time an expression" + ["Times execution of an expression, similar to `time' but prints a" + "little easier to read information. You can provide an initial number" + "that specifies how many times to run the expression -- in this case," + "the expression will be executed that many times, extreme results are" + "be removed (top and bottom 2/7ths), and the remaining results will" + "be averaged. Two garbage collections are triggered before each run;" + "the resulting value(s) are from the last run."] + (more-inputs #`(#,(time-id) #,@(getarg 'syntax 'list)))) + +(define trace-id (make-lazy-identifier 'trace 'racket/trace)) +(defcommand (trace tr) " ..." + "trace a function" + ["Traces a function (or functions), using the `racket/trace' library."] + (eval-sexpr-for-user `(,(trace-id) ,@(getarg 'syntax 'list)))) + +(define untrace-id (make-lazy-identifier 'untrace 'racket/trace)) +(defcommand (untrace untr) " ..." + "untrace a function" + ["Untraces functions that were traced with ,trace."] + (eval-sexpr-for-user `(,(untrace-id) ,@(getarg 'syntax 'list)))) + +(defautoload errortrace + profiling-enabled instrumenting-enabled clear-profile-results + output-profile-results execute-counts-enabled annotate-executed-file) + +(defcommand (errortrace errt inst) "[]" + "errortrace instrumentation control" + ["An argument is used to perform a specific operation:" + " + : turn errortrace instrumentation on (effective only for code that is" + " evaluated from now on)" + " - : turn it off (also only for future evaluations)" + " ? : show status without changing it" + "With no arguments, toggles instrumentation."] + (case (getarg 'sexpr 'opt) + [(#f) (if (autoloaded? 'errortrace) + (instrumenting-enabled (not (instrumenting-enabled))) + (instrumenting-enabled #t))] + [(-) (when (autoloaded? 'errortrace) (instrumenting-enabled #f))] + [(+) (instrumenting-enabled #t)] + [(?) (void)] + [else (cmderror "unknown subcommand")]) + (if (autoloaded? 'errortrace) + (printf "; errortrace instrumentation is ~a\n" + (if (instrumenting-enabled) "on" "off")) + (printf "; errortrace not loaded\n"))) + +(define profile-id + (make-lazy-identifier 'profile 'profile)) +(define (statistical-profiler) + (more-inputs #`(#,(profile-id) #,(getarg 'syntax)))) +(define (errortrace-profiler) + (instrumenting-enabled #t) + (define flags (regexp-replace* #rx"[ \t]+" (getarg 'line) "")) + (for ([cmd (in-string (if (equal? "" flags) + (if (profiling-enabled) "*!" "+") + flags))]) + (case cmd + [(#\+) (profiling-enabled #t) (printf "; profiling is on\n")] + [(#\-) (profiling-enabled #f) (printf "; profiling is off\n")] + [(#\*) (output-profile-results #f #t)] + [(#\#) (output-profile-results #f #f)] + [(#\!) (clear-profile-results) (printf "; profiling data cleared\n")] + [else (cmderror "unknown subcommand")]))) +(defcommand (profile prof) "[ | ...]" + "profiler control" + ["Runs either the exact errortrace-based profiler, or the statistical one." + "* If a parenthesized expression is given, run the statistical profiler" + " while running it. This profiler requires no special setup and adds" + " almost no overhead, it samples stack traces as execution goes on." + "* Otherwise the errortrace profiler is used. This profiler produces" + " precise results, but like other errortrace uses, it must be enabled" + " before loading the code and it adds noticeable overhead. In this case," + " an argument is used to determine a specific operation:" + " + : turn the profiler on (effective only for code that is evaluated" + " from now on)" + " - : turn the profiler off (also only for future evaluations)" + " * : show profiling results by time" + " # : show profiling results by counts" + " ! : clear profiling results" + " Multiple commands can be combined, for example \",prof *!-\" will show" + " profiler results, clear them, and turn it off." + "* With no arguments, turns the errortrace profiler on if it's off, and if" + " it's on it shows the collected results and clears them." + "Note: using no arguments or *any* of the flags turns errortrace" + " instrumentation on, even a \",prof -\". Use the ,errortrace command if" + " you want to turn instrumentation off."] + (if (memq (skip-spaces/peek) '(#\( #\[ #\{)) + (statistical-profiler) + (errortrace-profiler))) + +(defcommand execution-counts " ..." + "execution counts" + ["Enable errortrace instrumentation for coverage, require the file(s)," + "display the results, disables coverage, and disables instrumentation if" + "it wasn't previously turned on."] + (let ([files (getarg 'path 'list)] + [inst? (and (autoloaded? 'errortrace) (instrumenting-enabled))]) + (more-inputs + (λ () + (instrumenting-enabled #t) + (execute-counts-enabled #t)) + #`(require #,@(map (λ (file) `(file ,(path->string file))) files)) + (λ () + (for ([file (in-list files)]) + (annotate-executed-file file " 123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"))) + (λ () + (execute-counts-enabled #f) + (unless inst? (instrumenting-enabled #f)))))) + +(defautoload racket/sandbox + make-module-evaluator kill-evaluator call-with-trusted-sandbox-configuration + sandbox-coverage-enabled get-uncovered-expressions) + +(defcommand (coverage cover) "" + "coverage information via a sandbox" + ["Runs the given file in a (trusted) sandbox, and annotates it with" + "uncovered expression information."] + (let ([file (getarg 'path)]) + (sandbox-coverage-enabled) ; autoload it + (parameterize ([sandbox-coverage-enabled #t]) + (define e + (call-with-trusted-sandbox-configuration + (λ () (make-module-evaluator file)))) + (define uncovered + (map (λ (x) (let ([p (sub1 (syntax-position x))]) + (cons p (+ p (syntax-span x))))) + (get-uncovered-expressions e #t))) + (kill-evaluator e) + (call-with-input-file file + (λ (inp) + ;; this is a naive and inefficient solution, could be made efficient + ;; using `mzlib/integer-set' + (let loop () + (let* ([start (file-position inp)] + [line (read-line inp)] + [len (and (string? line) (string-length line))] + [end (and len (+ len start))] + [indent (and len (regexp-match-positions #px"\\S" line))] + [indent (and indent (caar indent))]) + (when len + (displayln line) + (when indent + (string-fill! line #\space) + (for ([u (in-list uncovered)]) + (when (and ((car u) . < . end) + ((cdr u) . > . indent)) + (for ([i (in-range (max (- (car u) start) indent) + (min (- (cdr u) start) len))]) + (string-set! line i #\^)))) + (displayln (regexp-replace #rx" +$" line ""))) + (loop))))))))) + +;; ---------------------------------------------------------------------------- +;; namespace switching + +(define default-namespace-name '*) +(define current-namespace-name (make-parameter default-namespace-name)) +(define namespaces + (let* ([r (namespace-symbol->identifier '#%top-interaction)] + [r (identifier-binding r)] + [r (and r (mpi->name (caddr r)))] + [t (make-hasheq)]) + (hash-set! t (current-namespace-name) (cons (current-namespace) r)) + t)) +(defcommand (switch-namespace switch) "[] [! []]" + "switch to a different repl namespace" + ["Switch to the namespace, creating it if needed. The of a" + "namespace is a symbol or an integer where a `*' indicates the initial one;" + "it is only used to identify namespaces for this command (so don't confuse" + "it with racket bindings). A new namespace is initialized using the name" + "of the namespace (if it's require-able), or using the same initial module" + "that was used for the current namespace. If `! ' is used, it" + "indicates that a new namespace will be created even if it exists, using" + "`' as the initial module, and if just `!' is used, then this happens" + "with the existing namespace's init or with the current one's." + "A few examples:" + " ,switch ! reset the current namespace" + " ,switch ! racket reset it using the `racket' language" + " ,switch r5rs switch to a new `r5rs' namespace" + " ,switch foo switch to `foo', creating it if it doesn't exist" + " ,switch foo ! racket switch to newly made `foo', even if it exists" + " ,switch foo ! same, but using the same as it was created" + " with, or same as the current if it's new" + "(Note that you can use `^' etc to communicate values between namespaces.)"] + (define-values (name force-reset? init) + (match (getarg 'sexpr 'list) + [(list '!) (values #f #t #f )] + [(list '! init) (values #f #t init)] + [(list name) (values name #f #f )] + [(list name '!) (values name #t #f )] + [(list name '! init) (values name #t init)] + [(list) (cmderror "what do you want to do?")] + [_ (cmderror "syntax error, see ,help switch-namespace")])) + (unless (or (not name) (symbol? name) (fixnum? name)) + (cmderror "bad namespace name, must be symbol or fixnum")) + (define old-namespace (current-namespace)) + (define (is-require-able? name) + (with-handlers ([void (λ (_) #f)]) + ;; name is not a string => no need to set the current directory + (file-exists? (modspec->path name)))) + ;; if there's an , then it must be forced + (let* ([name (or name (current-namespace-name))] + [init + (cond [init] + [(or force-reset? (not (hash-ref namespaces name #f))) + (cdr (or (hash-ref namespaces name #f) + (and (is-require-able? name) (cons #f name)) + (hash-ref namespaces (current-namespace-name) #f) + ;; just in case + (hash-ref namespaces default-namespace-name #f)))] + [else #f])]) + (when init + (printf "*** ~a `~s' namespace with ~s ***\n" + (if (hash-ref namespaces name #f) + "Resetting the" "Initializing a new") + name + (->relname init)) + (current-namespace (make-base-empty-namespace)) + (namespace-require init) + (hash-set! namespaces name (cons (current-namespace) init)))) + (when (and name (not (eq? name (current-namespace-name)))) + (printf "*** switching to the `~s' namespace ***\n" name) + (let ([x (hash-ref namespaces (current-namespace-name))]) + (unless (eq? (car x) old-namespace) + (printf "*** (note: saving current namespace for `~s')\n" + (current-namespace-name)) + (hash-set! namespaces (current-namespace-name) + (cons old-namespace (cdr x))))) + (current-namespace-name name) + (current-namespace (car (hash-ref namespaces name))))) + +;; ---------------------------------------------------------------------------- +;; syntax commands + +(define current-syntax (make-parameter #f)) +(defautoload racket/pretty pretty-write) +(defautoload macro-debugger/stepper-text expand/step-text) +(define not-in-base + (λ () (let ([base-stxs #f]) + (unless base-stxs + (set! base-stxs ; all ids that are bound to a syntax in racket/base + (parameterize ([current-namespace (here-namespace)]) + (let-values ([(vals stxs) (module->exports 'racket/base)]) + (map (λ (s) (namespace-symbol->identifier (car s))) + (cdr (assq 0 stxs))))))) + (λ (id) (not (ormap (λ (s) (free-identifier=? id s)) base-stxs)))))) +(defcommand (syntax stx st) "[] [ ...]" + "set syntax object to inspect, and control it" + ["With no arguments, will show the previously set (or expanded) syntax" + "additional arguments serve as an operation to perform:" + "- `^' sets the syntax from the last entered expression" + "- `+' will `expand-once' the syntax and show the result (can be used again" + " for additional `expand-once' steps)" + "- `!' will `expand' the syntax and show the result" + "- `*' will use the syntax stepper to show expansion steps, leaving macros" + " from racket/base intact (does not change the currently set syntax)" + "- `**' similar to `*', but expanding everything"] + (for ([stx (in-list (getarg 'syntax 'list))]) + (define (show/set label stx) + (printf "~a\n" label) + (current-syntax stx) + (pretty-write (syntax->datum stx))) + (define (cur) (or (current-syntax) (cmderror "no syntax set yet"))) + (case (and stx (if (identifier? stx) (syntax-e stx) '--none--)) + [(#f) (show/set "current syntax:" (cur))] + [(^) (if (last-input-syntax) + (show/set "using last expression:" (last-input-syntax)) + (cmderror "no expression entered yet"))] + [(+) (show/set "expand-once ->" (expand-once (cur)))] + [(!) (show/set "expand ->" (expand (cur)))] + [(*) (printf "stepper:\n") (expand/step-text (cur) (not-in-base))] + [(**) (printf "stepper:\n") (expand/step-text (cur))] + [else + (if (syntax? stx) + (begin (printf "syntax set\n") (current-syntax stx)) + (cmderror "internal error: ~s ~s" stx (syntax? stx)))]))) + +;; ---------------------------------------------------------------------------- +;; meta evaluation hook + +;; questionable value, (and need to display the resulting values etc) +#; +(defcommand meta "" + "meta evaluation" + ["Evaluate the given expression where bindings are taken from the xrepl" + "module. This is convenient when you're in a namespace that does not have" + "a specific binding -- for example, you might be using a language that" + "doesn't have `current-namespace', so to get it, you can use" + "`,eval (current-namespace)'. The evaluation happens in the repl namespace" + "as usual, only the bindings are taken from the xrepl module -- so you can" + "use `^' to refer to the result of such an evaluation."] + (eval (datum->syntax #'here `(#%top-interaction . ,(getarg 'sexpr)))) + (void)) + +;; ---------------------------------------------------------------------------- +;; dynamic log output control + +(define current-log-receiver-thread (make-parameter #f)) +(define global-logger (current-logger)) + +(defcommand log "" + "control log output" + ["Starts (or stops) logging events at the given level. The level should be" + "one of the valid racket logging levels, or #f for no logging. For" + "convenience, the level can also be #t (maximum logging) or an integer" + "(with 0 for no logging, and larger numbers for more logging output)."] + (define levels '(#f fatal error warning info debug)) + (define level + (let ([l (getarg 'sexpr)]) + (cond [(memq l levels) l] + [(memq l '(#f none -)) #f] + [(memq l '(#t all +)) (last levels)] + [(not (integer? l)) + (cmderror "bad level, expecting one of: ~s" levels)] + [(<= l 0) #f] + [(< l (length levels)) (list-ref levels l)] + [else (last levels)]))) + (cond [(current-log-receiver-thread) => kill-thread]) + (when level + (let ([r (make-log-receiver global-logger level)]) + (current-log-receiver-thread + (thread + (λ () + (let loop () + (match (sync r) + [(vector l m v) + (display (format "; [~a] ~a~a\n" + l m (if v (format " ~.s" v) ""))) + (flush-output)]) + (loop)))))))) + +;; ---------------------------------------------------------------------------- +;; setup xrepl in the user's racketrc file + +(define init-file (find-system-path 'init-file)) +(defcommand install! #f + "install xrepl in your Racket init file" + ["Installs xrepl in your Racket REPL initialization file. This is done" + "carefully: I will tell you about the change, and ask for permission." + "You can then edit the file if you want to; in your system, you can find it" + ,(format "at \"~a\"." init-file)] + (define comment "The following line loads `xrepl' support") + (define expr "(require xrepl)") + (define dexpr "(dynamic-require 'xrepl #f)") + (define contents (file->string init-file)) + (define (look-for comment-rx expr) + (let ([m (regexp-match-positions + (format "(?<=\r?\n|^) *;+ *~a *\r?\n *~a *(?=\r?\n|$)" + comment-rx (regexp-quote expr)) + contents)]) + (and m (car m)))) + (define existing? (look-for (regexp-quote comment) expr)) + (define existing-readline? + (look-for "load readline support[^\r\n]*" "(require readline/rep)")) + (define (yes?) + (flush-output) + (begin0 (regexp-match? #rx"^[yY]" (getarg 'string)) (prompt-shown))) + (cond + [existing? + (printf "; already installed, nothing to do\n") + (when existing-readline? + (printf "; (better to remove the readline loading, xrepl does that)"))] + [(let ([m (regexp-match + (string-append (regexp-quote expr) "|" (regexp-quote dexpr)) + contents)]) + (and m (begin (printf "; found \"~a\", ~a\n" + (car m) "looks like xrepl is already installed") + (printf "; should I continue anyway? ") + (not (yes?)))))] + [else + (when existing-readline? + (printf "; found a `readline' loading line\n") + (printf "; xrepl will already do that, ok to remove? ") + (if (yes?) + (set! contents (string-append + (substring contents 0 (car existing-readline?)) + (substring contents (cdr existing-readline?)))) + (printf "; it will be kept ~a\n" + "(you can edit the file and removing it later)"))) + (printf "; writing new contents, with an added \"~a\"\n" expr) + (printf "; (if you want to load it conditionally, edit the file and\n") + (printf "; use \"~a\" instead, which is a plain expression)\n" dexpr) + (printf "; OK to continue? ") + (if (yes?) + (begin + (call-with-output-file* init-file #:exists 'truncate + (λ (o) (write-string + (string-append (regexp-replace #rx"(?:\r?\n)+$" contents "") + (format "\n\n;; ~a\n~a\n" comment expr)) + o))) + (printf "; new contents written to ~a\n" init-file)) + (printf "; ~a was not updated\n" init-file))]) + (void)) + +;; ---------------------------------------------------------------------------- +;; eval hook that keep track of recent evaluation results + +;; saved interaction values +(define saved-values (make-parameter '())) +(define (save-values! xs) + (let ([xs (filter (λ (x) (not (void? x))) xs)]) ; don't save void values + (unless (null? xs) + ;; the order is last, 2nd-to-last, ..., same from prev interactions + ;; the idea is that `^', `^^', etc refer to the values as displayed + (saved-values (append (reverse xs) (saved-values))) + (let ([n (saved-values-number)] [l (saved-values)]) + (when (< n (length l)) (saved-values (take l n))))))) + +(define last-saved-names+state (make-parameter '(#f #f #f))) +(define (get-saved-names) + (define last (last-saved-names+state)) + (define last-num (cadr last)) + (define last-char (caddr last)) + (define cur-num (saved-values-number)) + (define cur-char (saved-values-char)) + (if (and (equal? last-num cur-num) (equal? last-char cur-char)) + (car last) + (let ([new (for/list ([i (in-range (saved-values-number))]) + (string->symbol (make-string (add1 i) (saved-values-char))))]) + (last-saved-names+state (list new cur-num cur-char)) + new))) + +;; make saved values available through bindings, but do this in a way that +;; doesn't interfere with users using these binders in some way -- set only ids +;; that were void, and restore them to void afterwards +(define (with-saved-values thunk) + (define saved-names (get-saved-names)) + (define vals (for/list ([id (in-list saved-names)]) + (box (namespace-variable-value id #f void)))) + (define res #f) + (dynamic-wind + (λ () + (for ([id (in-list saved-names)] + [saved (in-list (saved-values))] + [v (in-list vals)]) + ;; set only ids that are void, and remember these values + (if (void? (unbox v)) + (begin (namespace-set-variable-value! id saved) + (set-box! v saved)) + (set-box! v (void))))) + (λ () (call-with-values thunk (λ vs (set! res vs) (apply values vs)))) + (λ () + (for ([id (in-list saved-names)] [v (in-list vals)]) + ;; restore the names to void so we can set them next time + (when (and (not (void? (unbox v))) ; restore if we set this id above + (eq? (unbox v) ; and if it didn't change + (namespace-variable-value id #f void))) + (namespace-set-variable-value! id (void)))) + (when res (save-values! res))))) + +(provide make-command-evaluator) +(define (make-command-evaluator builtin-evaluator) + (λ (expr) + ;; not useful: catches only escape continuations + ;; (with-handlers ([exn:break? (λ (e) (last-break-exn e) (raise e))]) ...) + (if (saved-values) + (with-saved-values (λ () (builtin-evaluator expr))) + (builtin-evaluator expr)))) + +;; ---------------------------------------------------------------------------- +;; capture ",..." and run the commands, use readline/rep when possible + +(define home-dir (expand-user-path "~")) +(define get-prefix ; to show before the "> " prompt + (let () + (define (choose-path x) + ;; choose the shortest from an absolute path, a relative path, and a + ;; "~/..." path. + (if (not (complete-path? x)) ; shouldn't happen + x + (let* ([r (path->string (find-relative-path (current-directory) x))] + [h (path->string (build-path (string->path-element "~") + (find-relative-path home-dir x)))] + [best (if (< (string-length r) (string-length h)) r h)] + [best (if (< (string-length best) (string-length x)) best x)]) + best))) + (define (get-prefix* path) + (define x (path->string path)) + (define y (->relname path)) + (if (equal? x y) + (format "~s" (choose-path x)) + (regexp-replace #rx"[.]rkt$" y ""))) + (define (get-prefix) + (let* ([x (here-source)] + [x (and x (if (symbol? x) (format "'~s" x) (get-prefix* x)))] + [x (or x (toplevel-prefix))]) + (if (eq? (current-namespace-name) default-namespace-name) + x (format "~a::~a" (current-namespace-name) x)))) + (define last-directory #f) + (define last-namespace #f) + (define prefix #f) + (λ () + (define curdir (current-directory)) + (unless (and (equal? (current-namespace) last-namespace) + (equal? curdir last-directory)) + (report-directory-change) + (set! prefix (get-prefix)) + (set! last-namespace (current-namespace)) + (set! last-directory curdir)) + prefix))) + +;; the last non-command expression read +(define last-input-syntax (make-parameter #f)) + +(struct more-inputs (list) + #:constructor-name more-inputs* #:omit-define-syntaxes) +(define (more-inputs . inputs) (more-inputs* inputs)) + +(provide make-command-reader) +(define (make-command-reader) + (define (plain-reader prefix) ; a plain reader, without readline + (display prefix) (display "> ") (flush-output) + (let ([in ((current-get-interaction-input-port))]) + ((current-read-interaction) (object-name in) in))) + (define RL ; no direct dependency on readline + (with-handlers ([exn? (λ (_) #f)]) + (collection-file-path "pread.rkt" "readline"))) + (define (make-readline-reader) + (let ([p (dynamic-require RL 'current-prompt)] + [r (dynamic-require RL 'read-cmdline-syntax)]) + (λ (prefix) ; uses the readline prompt + (parameterize ([p (bytes-append (string->bytes/locale prefix) (p))]) + (r))))) + (define reader + (case (object-name (current-input-port)) + [(stdin) + (if (or (not (terminal-port? (current-input-port))) + (regexp-match? #rx"^dumb" (or (getenv "TERM") "")) + (not RL)) + plain-reader + (with-handlers ([exn? + (λ (e) + (eprintf "Warning: no readline support (~a)\n" + (exn-message e)) + plain-reader)]) + (dynamic-require 'readline/rep-start #f) + ;; requiring readline should have changed the reader + (if (eq? (current-prompt-read) + (dynamic-require RL 'read-cmdline-syntax)) + (make-readline-reader) + (begin (eprintf "Warning: could not initialize readline\n") + plain-reader))))] + [(readline-input) + (eprintf "Note: readline already loaded\n~a\n" + " (better to let xrepl load it for you)") + (make-readline-reader)] + [else plain-reader])) + ;; IO management + (port-count-lines! (current-input-port)) + ;; wrap the reader to get the command functionality + (define more-inputs '()) + (define (reader-loop) + (parameterize ([saved-values #f]) + (define from-queue? (pair? more-inputs)) + (define input + (if from-queue? + (begin0 (car more-inputs) (set! more-inputs (cdr more-inputs))) + (begin (fresh-line) (begin0 (reader (get-prefix)) (prompt-shown))))) + (syntax-case input () + [(uq cmd) (eq? 'unquote (syntax-e #'uq)) + (let ([r (run-command (syntax->datum #'cmd))]) + (cond [(void? r) (reader-loop)] + [(more-inputs? r) + (set! more-inputs (append (more-inputs-list r) more-inputs)) + (reader-loop)] + [else (eprintf "Warning: internal weirdness: ~s\n" r) r]))] + [_ (begin (unless from-queue? (last-input-syntax input)) input)]))) + reader-loop) From 225f563bdaafb4de606d88ca0968fb69583cd586 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Thu, 14 Jul 2011 16:57:45 -0400 Subject: [PATCH 252/441] Add a new `#:dont-re-require-enter' flag for `enter!', to avoid requiring itself into the entered namespace. This makes it useful in some cases where this require leads to a dependency cycle, eg (enter! racket/list). It's obviously not useful for use as-is, since you will not have a bound `enter!' to get out of the namespace (and possibly no `require' to get it) -- but it is useful for meta-tools like xrepl. This is why the flag is verbose. `xrepl' now uses this flag. Also, the check for valid keywords for the form is now done at runtime rather than in the macro. This doesn't matter in this case, since the form is intended for interactive use anyway. Also, separate the two parts of `enter-load/use-compiled' (it was defined curried, but didn't use it). (cherry picked from commit db7f2b4542606037a72f7d86298aa05e5a8f5da8) --- collects/racket/enter.rkt | 106 ++++++++++++--------- collects/scribblings/reference/enter.scrbl | 26 ++--- collects/xrepl/xrepl.rkt | 3 +- 3 files changed, 76 insertions(+), 59 deletions(-) diff --git a/collects/racket/enter.rkt b/collects/racket/enter.rkt index f81b98a214e..79169a5ba0e 100644 --- a/collects/racket/enter.rkt +++ b/collects/racket/enter.rkt @@ -5,73 +5,85 @@ (provide enter!) (define-syntax (enter! stx) - (define (do-enter mod noise) - (unless (or (not (syntax-e mod)) (module-path? (syntax->datum mod))) - (raise-syntax-error #f "not a valid module path, and not #f" stx mod)) - (unless (memq (syntax-e noise) '(#:verbose #:quiet #:verbose-reload)) - (raise-syntax-error #f "not a valid verbosity keyword" stx noise)) - #`(do-enter! '#,mod '#,noise)) (syntax-protect (syntax-case stx () - [(enter! mod) (do-enter #'mod #'#:verbose-reload)] - [(enter! mod noise) (do-enter #'mod #'noise)] + [(enter! mod flag ...) (andmap keyword? (syntax->datum #'(flag ...))) + #'(do-enter! 'mod '(flag ...))] [_ (raise-syntax-error - #f "bad syntax; should be `(enter! [noise-flag])'" + #f "bad syntax; should be `(enter! [flag...])'" stx)]))) (define orig-namespace (current-namespace)) -(define (do-enter! mod noise) - (if mod - (begin (enter-require mod noise) - (let ([ns (module->namespace mod)]) - (current-namespace ns) - (namespace-require 'racket/enter))) - (current-namespace orig-namespace))) +(define (check-flags flags) + ;; check that all flags are known, that at most one of the noise flags is + ;; present, and add #:verbose-reload if none are (could be done at the macro + ;; level, but this is intended for interactive use anyway) + (let loop ([flags (remove-duplicates flags eq?)] [noise #f]) + (cond [(null? flags) + (if noise '() '(#:verbose-reload))] + [(eq? (car flags) '#:dont-re-require-enter) + (cons (car flags) (loop (cdr flags) noise))] + [(not (memq (car flags) '(#:verbose #:quiet #:verbose-reload))) + (error 'enter! "unknown flag: ~e" (car flags))] + [noise (error 'enter! "contradicting noise flags: ~e and ~e" + noise (car flags))] + [else (cons (car flags) (loop (cdr flags) (car flags)))]))) + +(define (do-enter! mod flags) + (let ([flags (check-flags flags)]) + (if mod + (begin (enter-require mod flags) + (let ([ns (module->namespace mod)]) + (current-namespace ns) + (unless (memq '#:dont-re-require-enter flags) + (namespace-require 'racket/enter)))) + (current-namespace orig-namespace)))) (struct mod (name timestamp depends)) (define loaded (make-hash)) -(define (enter-require mod noise) +(define (enter-require mod flags) ;; Collect dependencies while loading: (parameterize ([current-load/use-compiled (enter-load/use-compiled (current-load/use-compiled) - #f noise)]) + #f flags)]) (dynamic-require mod #f)) ;; Reload anything that's not up to date: - (check-latest mod noise)) + (check-latest mod flags)) -(define ((enter-load/use-compiled orig re? noise) path name) +(define (enter-load/use-compiled orig re? flags) (define notify - (if (case noise [(#:verbose-reload) re?] [(#:verbose) #t] [(#:quiet) #f]) + (if (or (memq '#:verbose flags) (and re? (memq '#:verbose-reload flags))) (lambda (path) (fprintf (current-error-port) " [~aloading ~a]\n" (if re? "re-" "") path)) void)) - (if name - ;; Module load: - (let* ([code (get-module-code - path "compiled" - (lambda (e) - (parameterize ([compile-enforce-module-constants #f]) - (compile e))) - (lambda (ext loader?) (load-extension ext) #f) - #:notify notify)] - [dir (or (current-load-relative-directory) (current-directory))] - [path (path->complete-path path dir)] - [path (normal-case-path (simplify-path path))]) - ;; Record module timestamp and dependencies: - (let ([a-mod (mod name - (get-timestamp path) - (if code - (append-map cdr (module-compiled-imports code)) - null))]) - (hash-set! loaded path a-mod)) - ;; Evaluate the module: - (eval code)) - ;; Not a module: - (begin (notify path) (orig path name)))) + (lambda (path name) + (if name + ;; Module load: + (let* ([code (get-module-code + path "compiled" + (lambda (e) + (parameterize ([compile-enforce-module-constants #f]) + (compile e))) + (lambda (ext loader?) (load-extension ext) #f) + #:notify notify)] + [dir (or (current-load-relative-directory) (current-directory))] + [path (path->complete-path path dir)] + [path (normal-case-path (simplify-path path))]) + ;; Record module timestamp and dependencies: + (let ([a-mod (mod name + (get-timestamp path) + (if code + (append-map cdr (module-compiled-imports code)) + null))]) + (hash-set! loaded path a-mod)) + ;; Evaluate the module: + (eval code)) + ;; Not a module: + (begin (notify path) (orig path name))))) (define (get-timestamp path) (file-or-directory-modify-seconds path #f @@ -81,7 +93,7 @@ (path-replace-suffix path #".ss") #f (lambda () -inf.0)) -inf.0)))) -(define (check-latest mod noise) +(define (check-latest mod flags) (define mpi (module-path-index-join mod #f)) (define done (make-hash)) (let loop ([mpi mpi]) @@ -98,7 +110,7 @@ (when (ts . > . (mod-timestamp mod)) (define orig (current-load/use-compiled)) (parameterize ([current-load/use-compiled - (enter-load/use-compiled orig #f noise)] + (enter-load/use-compiled orig #f flags)] [current-module-declare-name rpath]) - ((enter-load/use-compiled orig #t noise) + ((enter-load/use-compiled orig #t flags) npath (mod-name mod))))))))) diff --git a/collects/scribblings/reference/enter.scrbl b/collects/scribblings/reference/enter.scrbl index 3e5f327e711..8a5d915f267 100644 --- a/collects/scribblings/reference/enter.scrbl +++ b/collects/scribblings/reference/enter.scrbl @@ -7,7 +7,7 @@ @defform*[[(enter! module-path) (enter! #f) - (enter! module-path noise-flag)]]{ + (enter! module-path flag ...+)]]{ Intended for use in a @tech{REPL}, such as when @exec{racket} is started in interactive mode. When a @racket[module-path] is provided @@ -26,13 +26,17 @@ module is re-loaded. Re-loading support works only for modules that are first loaded (either directly or indirectly through transitive @racket[require]s) via @racket[enter!]. -After switching namespaces to the designated module, @racket[enter!] -automatically requires @racket[racket/enter] into the namespace, so -that @racket[enter!] can be used to switch namespaces again. - -When @racket[enter!] loads or re-loads a module from a file, it can -print a message to @racket[(current-error-port)], as determined by the -optional @racket[noise-flag]. It can be @racket[#:verbose] to print a -message about such loads and re-loads, @racket[#:verbose-reload] to -print a message only for re-loaded modules, and it can be -@racket[#:quiet] for no printouts.} +Additional @racket[flag]s can customize aspects of @racket[enter!]: +@itemize[ +@item{When @racket[enter!] loads or re-loads a module from a file, it + can print a message to @racket[(current-error-port)]. Use a + @racket[#:verbose] flag to print a message about such loads and + re-loads, @racket[#:verbose-reload] to print a message only for + re-loaded modules, and @racket[#:quiet] for no printouts. The default + reporting corresponds to @racket[#:verbose-reload].} +@item{After switching namespaces to the designated module, + @racket[enter!] automatically requires @racket[racket/enter] into the + namespace, so that @racket[enter!] can be used to switch namespaces + again. In some cases this might not be desirable (e.g., in a tool + that uses @racket[racket/enter])---use a + @racket[#:dont-re-require-enter] to diable this.}] diff --git a/collects/xrepl/xrepl.rkt b/collects/xrepl/xrepl.rkt index a53c13899bb..33f631b6221 100644 --- a/collects/xrepl/xrepl.rkt +++ b/collects/xrepl/xrepl.rkt @@ -647,7 +647,8 @@ "optional, without it you go back to the toplevel. A module name can" "specify an existing file as with the ,require command. (Note that this" "can be used even in languages that don't have the `enter!' binding.)"] - (eval-sexpr-for-user `(,(enter!-id) ,(getarg 'modspec)))) + (eval-sexpr-for-user `(,(enter!-id) ,(getarg 'modspec) + #:dont-re-require-enter))) (defcommand (toplevel top) #f "go back to the toplevel" From 2c70c982286e7b33d6de426d08b7c74a958da80c Mon Sep 17 00:00:00 2001 From: Asumu Takikawa Date: Thu, 14 Jul 2011 17:39:07 -0400 Subject: [PATCH 253/441] Fix a few framework contracts to match code (cherry picked from commit 6c3284a828f58475a9a8cd6cda6665864b156d3b) --- collects/scribblings/framework/color.scrbl | 2 +- collects/scribblings/framework/scheme.scrbl | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/collects/scribblings/framework/color.scrbl b/collects/scribblings/framework/color.scrbl index 067c6bb05be..cfc1ef6e508 100644 --- a/collects/scribblings/framework/color.scrbl +++ b/collects/scribblings/framework/color.scrbl @@ -207,7 +207,7 @@ be inserted, even if it is not the right kind. If @racket[flash?] is true, the matching open parenthesis will be flashed. } - @defmethod*[(((classify-position (position exact-nonnegative-integer?)) symbol?))]{ + @defmethod*[(((classify-position (position exact-nonnegative-integer?)) (or/c symbol? #f)))]{ Return a symbol for the lexer-determined token type for the token that contains the item after @racket[position]. diff --git a/collects/scribblings/framework/scheme.scrbl b/collects/scribblings/framework/scheme.scrbl index 4a822f90097..da1b48cdd8b 100644 --- a/collects/scribblings/framework/scheme.scrbl +++ b/collects/scribblings/framework/scheme.scrbl @@ -67,12 +67,13 @@ } @defmethod*[(((tabify (start-pos exact-integer? - (send this text get-start-position))) + (send this get-start-position))) void?))]{ Tabs the line containing by @racket[start-pos] } - @defmethod*[(((tabify-selection (start exact-integer?) (end exact-integer?)) + @defmethod*[(((tabify-selection (start exact-integer? (send this get-start-position)) + (end exact-integer? (send this get-end-position))) void?))]{ Sets the tabbing for the lines containing positions @racket[start] through @racket[end]. From be3aa544ad39b0202000e42d22617fe6dd7d3328 Mon Sep 17 00:00:00 2001 From: Vincent St-Amour Date: Thu, 14 Jul 2011 18:51:13 -0400 Subject: [PATCH 254/441] Fix unbalanced curly brackets. (cherry picked from commit 937d0ad7223bc9bddf9cda0ecf4d613684d8f1b0) --- collects/scribblings/reference/enter.scrbl | 1 + 1 file changed, 1 insertion(+) diff --git a/collects/scribblings/reference/enter.scrbl b/collects/scribblings/reference/enter.scrbl index 8a5d915f267..cd829dd4621 100644 --- a/collects/scribblings/reference/enter.scrbl +++ b/collects/scribblings/reference/enter.scrbl @@ -40,3 +40,4 @@ Additional @racket[flag]s can customize aspects of @racket[enter!]: again. In some cases this might not be desirable (e.g., in a tool that uses @racket[racket/enter])---use a @racket[#:dont-re-require-enter] to diable this.}] +} From c4ca803955146c8af13e5c85040445ab5abf3dfe Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Thu, 14 Jul 2011 21:13:28 -0600 Subject: [PATCH 255/441] fix typo; eliminate "this" as a noun; otherminor improvements (cherry picked from commit 5e5172baabf9ab34451da2cd027081c8a2c258e6) --- collects/scribblings/reference/enter.scrbl | 25 ++++++++++++++-------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/collects/scribblings/reference/enter.scrbl b/collects/scribblings/reference/enter.scrbl index cd829dd4621..c0550708508 100644 --- a/collects/scribblings/reference/enter.scrbl +++ b/collects/scribblings/reference/enter.scrbl @@ -5,9 +5,13 @@ @note-init-lib[racket/enter] -@defform*[[(enter! module-path) - (enter! #f) - (enter! module-path flag ...+)]]{ +@defform*/subs[[(enter! module-path) + (enter! #f) + (enter! module-path flag ...+)] + ([flag #:quiet + #:verbose-reload + #:verbose + #:dont-re-require-enter])]{ Intended for use in a @tech{REPL}, such as when @exec{racket} is started in interactive mode. When a @racket[module-path] is provided @@ -28,16 +32,19 @@ are first loaded (either directly or indirectly through transitive Additional @racket[flag]s can customize aspects of @racket[enter!]: @itemize[ -@item{When @racket[enter!] loads or re-loads a module from a file, it - can print a message to @racket[(current-error-port)]. Use a + + @item{When @racket[enter!] loads or re-loads a module from a file, it + can print a message to @racket[(current-error-port)]. Use the @racket[#:verbose] flag to print a message about such loads and re-loads, @racket[#:verbose-reload] to print a message only for re-loaded modules, and @racket[#:quiet] for no printouts. The default reporting corresponds to @racket[#:verbose-reload].} -@item{After switching namespaces to the designated module, + + @item{After switching namespaces to the designated module, @racket[enter!] automatically requires @racket[racket/enter] into the namespace, so that @racket[enter!] can be used to switch namespaces - again. In some cases this might not be desirable (e.g., in a tool - that uses @racket[racket/enter])---use a - @racket[#:dont-re-require-enter] to diable this.}] + again. In some cases, requiring @racket[racket/enter] + might not be desirable (e.g., in a tool + that uses @racket[racket/enter]); use the + @racket[#:dont-re-require-enter] flag to disable the require.}] } From e1dbfe67e3e04356c48f7dd27d4bd0b9331b41be Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Thu, 14 Jul 2011 21:13:47 -0600 Subject: [PATCH 256/441] remove obsolete reference to '#%mred-kernel (cherry picked from commit 1c4722eaeea8a62af46a1acd3a6ca15460b14bb2) --- collects/scribblings/reference/startup.scrbl | 3 +-- src/racket/src/module.c | 12 ++---------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/collects/scribblings/reference/startup.scrbl b/collects/scribblings/reference/startup.scrbl index e863e83b29b..228ac08e93a 100644 --- a/collects/scribblings/reference/startup.scrbl +++ b/collects/scribblings/reference/startup.scrbl @@ -44,8 +44,7 @@ On start-up, the top-level environment contains no bindings---not even that start with @racketidfont{#%} are defined, but they are not meant for direct use, and the set of such modules can change. For example, the @indexed-racket['#%kernel] module is eventually used to bootstrap -the implemetation of @racketmodname[racket/base], and -@racket['#%mred-kernel] is used for @racketmodname[racket/gui/base]. +the implemetation of @racketmodname[racket/base]. The first action of Racket or GRacket is to initialize @racket[current-library-collection-paths] to the result of diff --git a/src/racket/src/module.c b/src/racket/src/module.c index 53da09ec521..c3a345e11c4 100644 --- a/src/racket/src/module.c +++ b/src/racket/src/module.c @@ -3403,18 +3403,10 @@ static Scheme_Module *module_load(Scheme_Object *name, Scheme_Env *env, const ch m = (Scheme_Module *)scheme_hash_get(env->module_registry->loaded, name); if (!m) { - char *mred_note; - - if (!strcmp(SCHEME_SYM_VAL(SCHEME_PTR_VAL(name)), "#%mred-kernel") - && !(scheme_strncmp(scheme_banner(), "Welcome to Racket", 17))) - mred_note = "; need to run in gracket instead of racket"; - else - mred_note = ""; - scheme_raise_exn(MZEXN_FAIL_CONTRACT, - "%s: unknown module: %D%s", + "%s: unknown module: %D", who ? who : "require", - name, mred_note); + name); return NULL; } } From f790a77e4004e65c39c504e842de065981218d34 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Thu, 14 Jul 2011 21:20:17 -0600 Subject: [PATCH 257/441] places: fix printing of symbol resolved module paths (cherry picked from commit 62acb298bdc79e1f16df8e6a4a95d952388a82fa) --- src/racket/src/print.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/racket/src/print.c b/src/racket/src/print.c index b71c5b28c56..0cab9a93de1 100644 --- a/src/racket/src/print.c +++ b/src/racket/src/print.c @@ -2429,7 +2429,7 @@ print(Scheme_Object *obj, int notdisplay, int compact, Scheme_Hash_Table *ht, int is_sym; if (notdisplay) print_utf8_string(pp, "# Date: Fri, 15 Jul 2011 03:27:27 -0400 Subject: [PATCH 258/441] Standartize the vocabulary to "the function returns" and "set! mutates" (cherry picked from commit c31d352f2bb9498daed8bc4757655c4396b4ba2e) --- collects/2htdp/batch-io.rkt | 2 +- .../private/clauses-spec-and-process.rkt | 2 +- collects/2htdp/private/launch-many-worlds.rkt | 2 +- collects/2htdp/private/world.rkt | 4 +-- collects/2htdp/tests/test-image.rkt | 2 +- collects/2htdp/universe.rkt | 4 +-- collects/htdp/convert.rkt | 2 +- collects/htdp/error-composition.scrbl | 25 ++++++++++++------- collects/htdp/hangman.rkt | 2 +- collects/htdp/htdp-lib.scrbl | 8 +++--- collects/htdp/tests/convert.rkt | 4 +-- collects/lang/private/advanced-funs.rkt | 6 ++--- collects/lang/private/beginner-funs.rkt | 12 ++++----- collects/lang/private/intermediate-funs.rkt | 2 +- collects/lang/private/teachprims.rkt | 4 +-- .../scribblings/htdp-langs/advanced.scrbl | 13 +++++----- collects/scribblings/htdp-langs/prim-ops.rkt | 12 ++++----- collects/tests/htdp-lang/intm-adv.rktl | 2 +- 18 files changed, 58 insertions(+), 50 deletions(-) diff --git a/collects/2htdp/batch-io.rkt b/collects/2htdp/batch-io.rkt index c44a1ff5ca9..4684b6218cf 100644 --- a/collects/2htdp/batch-io.rkt +++ b/collects/2htdp/batch-io.rkt @@ -41,7 +41,7 @@ write-file ;; String String -> String ;; (write-file filename str) writes str to filename; - ;; produces the file name as a confirmation that the write succeeded + ;; returns the file name as a confirmation that the write succeeded ) ;; ----------------------------------------------------------------------------- diff --git a/collects/2htdp/private/clauses-spec-and-process.rkt b/collects/2htdp/private/clauses-spec-and-process.rkt index 04adcdbbea7..df541abd530 100644 --- a/collects/2htdp/private/clauses-spec-and-process.rkt +++ b/collects/2htdp/private/clauses-spec-and-process.rkt @@ -91,7 +91,7 @@ (if r ((third s) r) (fourth s))) Spec)) -;; check whether rec? occurs, produce list of keyword x clause pairs +;; check whether rec? occurs, returns list of keyword x clause pairs (define (clauses-use-kwd stx:list ->rec? tag kwds) (define kwd-in? (->kwds-in kwds)) (map (lambda (stx) diff --git a/collects/2htdp/private/launch-many-worlds.rkt b/collects/2htdp/private/launch-many-worlds.rkt index 7049734e6de..3aabcce6a67 100644 --- a/collects/2htdp/private/launch-many-worlds.rkt +++ b/collects/2htdp/private/launch-many-worlds.rkt @@ -6,7 +6,7 @@ launch-many-worlds ;; (launch-many-worlds e1 ... e2) ;; run expressions e1 through e2 in parallel, - ;; produce all values + ;; return all values ) (define-syntax-rule diff --git a/collects/2htdp/private/world.rkt b/collects/2htdp/private/world.rkt index bbe007b854b..7099212e7e9 100644 --- a/collects/2htdp/private/world.rkt +++ b/collects/2htdp/private/world.rkt @@ -129,7 +129,7 @@ (height (if (pair? to-draw) (third to-draw) #f))) ;; the visible world - (field [enable-images-button void] ;; used if stop-when call produces #t + (field [enable-images-button void] ;; used if stop-when call returns #t [disable-images-button void] [visible (new pasteboard%)]) @@ -334,7 +334,7 @@ (show (ppdraw))) ;; -> Scene - ;; produce the scene for the this state + ;; return the scene for the this state (define/public (ppdraw) (check-scene-result (name-of draw 'your-draw) (draw (send world get)))) diff --git a/collects/2htdp/tests/test-image.rkt b/collects/2htdp/tests/test-image.rkt index 26bc6402231..c237ccfefaa 100644 --- a/collects/2htdp/tests/test-image.rkt +++ b/collects/2htdp/tests/test-image.rkt @@ -1380,7 +1380,7 @@ => 128) -;; Rotation by 0 should produce an equivalent object +;; Rotation by 0 should return an equivalent object (test (rotate 0 (make-object image-snip% green-blue-20x10-bitmap)) => (to-img (make-object image-snip% green-blue-20x10-bitmap))) diff --git a/collects/2htdp/universe.rkt b/collects/2htdp/universe.rkt index 7d382c7049c..c28e444a8bb 100644 --- a/collects/2htdp/universe.rkt +++ b/collects/2htdp/universe.rkt @@ -35,7 +35,7 @@ (provide launch-many-worlds ;; (launch-many-worlds e1 ... e2) - ;; run expressions e1 through e2 in parallel, produce all values in same order + ;; run expressions e1 through e2 in parallel, return all values in same order ) (provide-primitive @@ -123,7 +123,7 @@ ;; ****************************************************************** DEFAULT #'(lambda (u w) (make-bundle u '() '())) ;; this is the wrong default function - ;; instead of K there should be a function that produces a bundle + ;; instead of K there should be a function that returns a bundle (function-with-arity 2) ;; ****************************************************************** ] diff --git a/collects/htdp/convert.rkt b/collects/htdp/convert.rkt index 57fe05b29fb..9e994bb8311 100644 --- a/collects/htdp/convert.rkt +++ b/collects/htdp/convert.rkt @@ -91,7 +91,7 @@ ;; ------------------------------------------------------------------------ (define OUT-ERROR - "The conversion function must produce a number; result: ~e") + "The conversion function must return a number, but it returned ~e") ;; ============================================================================ ;; MODEL diff --git a/collects/htdp/error-composition.scrbl b/collects/htdp/error-composition.scrbl index 1d3107a898e..67b39533f49 100755 --- a/collects/htdp/error-composition.scrbl +++ b/collects/htdp/error-composition.scrbl @@ -2,10 +2,9 @@ @(require scribble/manual (for-label [only-in lang/htdp-advanced set!] - [only-in lang/htdp-intermediate let] - [only-in lang/htdp-beginner define] - [only-in racket/base syntax-local-expand-expression] - )) + [only-in lang/htdp-intermediate let] + [only-in lang/htdp-beginner define] + [only-in racket/base syntax-local-expand-expression])) @(require scribble/decode) @@ -51,7 +50,7 @@ from other teachpacks. nor antagonistic.} @item{If an expression contains multiple errors, report the leftmost - error first. E.g., the error in @racket{(define 1 2 3)} is + error first. E.g., the error in @racket[(define 1 2 3)] is @samp{expected the variable name, but found a number}, not @samp{expected 2 parts after define, but found 3}. Before raising an error about a sub-part of a macro, call @@ -71,7 +70,7 @@ Use only the following vocabulary words to describe code: @list[@para{structure name} @para{type name} @para{field name} @para{binding}]]] @itemize[ - @item{Use binding for the square-braced pair in a @racket{let} + @item{Use binding for the square-braced pair in a @racket[let] and similar binding forms.} @item{Use @word{argument} for actual arguments and @word{variable} for @@ -86,6 +85,8 @@ Use only the following vocabulary words to describe code: @section{Words For Describing Runtime Behavior} +Use the following vocabulary words to describe how code runs: + @itemize[ @item{When specifying a function's behavior, say @samp{the function takes ... and returns ...}} @@ -94,12 +95,18 @@ Use only the following vocabulary words to describe code: expects ... but received ...}} @item{As much as possible, identify expressions and the value they evaluate - to, e.g. @samp{the value of @racket{(f x)} is 5}. If it is necessary to + to, e.g. @samp{the value of @racket[(f x)] is 5}. If it is necessary to mention evaluation order, such as when the context discusses mutable state, say that the expression @samp{evaluates to} a value. Function calls are a special case of expression. Prefer @samp{the function call returns ...} to @samp{the function call evaluates to ...}, except when trying to draw attention to - the evaluation of the arguments.}] + the evaluation of the arguments.} + + @item{@racket[set!] and + @racketidfont{set-}@racket[_structure-name]@racketidfont{-}@racket[_field-name]@racketidfont{!} + @word{mutate} variables and structure instances, respectively. Avoid using + the verb @word{sets} when discussing mutation, and reserve the verbs + @word{changes} and @word{updates} for functional updates.}] @section{Prohibited Words} @@ -157,7 +164,7 @@ not appreciate anyway). [Rationale: Students learn this distinction when they learn about lambda. The first is the lambda implicit in the definition, the second is the variable introduced by the definition that can appear - as the first argument to @racket{set!}, the third is the particular + as the first argument to @racket[set!], the third is the particular sequence of letters. But BSL should avoid this complexity, and ASL’s error messages should maintain consistency with BSL.]} diff --git a/collects/htdp/hangman.rkt b/collects/htdp/hangman.rkt index ed5501c46b2..9b58179a083 100644 --- a/collects/htdp/hangman.rkt +++ b/collects/htdp/hangman.rkt @@ -114,7 +114,7 @@ (define message-panel #f) ;; setup-gui : str ->* message% panel% -;; to produce a status message and a panel where winning/losing can be announced +;; to return a status message and a panel where winning/losing can be announced ;; effect: set up a new frame, arrange the GUI, and display (blank) status word (define (setup-gui status) (local (#| -------------------------------------------------------------- diff --git a/collects/htdp/htdp-lib.scrbl b/collects/htdp/htdp-lib.scrbl index 154150320a8..90e3eb390c5 100755 --- a/collects/htdp/htdp-lib.scrbl +++ b/collects/htdp/htdp-lib.scrbl @@ -154,12 +154,12 @@ they can be syntactically restricted to application positions. @racket[id] is exported as the primitive operator named @racket[id]. An alternative to @racket[define-higher-order-primitive].} -@defform[(first-order->higher-order expr)]{ +@defform[(first-order->higher-order expression)]{ -If @racket[expr] is an identifier for a first-order function (either a -primitive or a function defined within Beginner Student), produces the +If @racket[expression] is the name of a first-order function (either a +primitive or a function defined within Beginner Student), returns the function as a value; otherwise, the form is equivalent to -@racket[expr]. +@racket[expression]. This form is mainly useful for implementing syntactic forms that, like the application of a higher-order primitive, allow first-order bindings diff --git a/collects/htdp/tests/convert.rkt b/collects/htdp/tests/convert.rkt index 313aa9e3107..9ff964b3367 100644 --- a/collects/htdp/tests/convert.rkt +++ b/collects/htdp/tests/convert.rkt @@ -35,11 +35,11 @@ (convert-file IN f2c OUT) (with-input-from-file OUT check-convert-out) -(check-error (convert-file IN list OUT) "convert: The conversion function must produce a number; result: (212)") +(check-error (convert-file IN list OUT) "convert: The conversion function must return a number; but it returned (212)") (check-error (convert-file IN first OUT) "first: expected argument of type ; given 212") -(check-error (convert-file IN fx OUT) "convert: The conversion function must produce a number; result: xyz") +(check-error (convert-file IN fx OUT) "convert: The conversion function must return a number; but it returned xyz") (check-error (convert-file IN f2c 10) "convert-file: expected as third argument, given: 10") diff --git a/collects/lang/private/advanced-funs.rkt b/collects/lang/private/advanced-funs.rkt index a64e3157c01..42c59cf9c7a 100644 --- a/collects/lang/private/advanced-funs.rkt +++ b/collects/lang/private/advanced-funs.rkt @@ -31,7 +31,7 @@ (with-input-from-string (string (-> any) -> any) "Turns the given string into input for read* operations.") (with-output-to-string (string (-> any) -> any) - "Produces a string from all write/display/print operations.") + "Returns a string from all write/display/print operations.") (print (any -> void) @@ -63,7 +63,7 @@ (assoc (any (listof any) -> (listof any) or false) - "Produces the first element on the list whose first is equal? to v; otherwise it produces false.")) + "Returns the first element on the list whose first is equal? to v; otherwise it returns false.")) ("Misc" (gensym (-> symbol?) @@ -75,7 +75,7 @@ (force (delay -> any) "Finds the delayed value; see also delay.") (promise? (any -> boolean) "Determines if a value is delayed.") - (void (-> void) "Produces a void value.") + (void (-> void) "Returns a void value.") (void? (any -> boolean) "Determines if a value is void.")) ("Posns" diff --git a/collects/lang/private/beginner-funs.rkt b/collects/lang/private/beginner-funs.rkt index 27dc2860df3..67a0c933519 100644 --- a/collects/lang/private/beginner-funs.rkt +++ b/collects/lang/private/beginner-funs.rkt @@ -290,13 +290,13 @@ "Evaluates the number of items on a list.") (memq (any (listof any) -> (union false list)) "Determines whether some value is on some list" - " if so, it produces the suffix of the list that starts with x" - " if not, it produces false." + " if so, it returns the suffix of the list that starts with x" + " if not, it returns false." " (It compares values with the eq? predicate.)") (memv (any (listof any) -> (union false list)) "Determines whether some value is on the list" - " if so, it produces the suffix of the list that starts with x" - " if not, it produces false." + " if so, it returns the suffix of the list that starts with x" + " if not, it returns false." " (It compares values with the eqv? predicate.)") ((beginner-member? member?) (any (listof any) -> boolean) "Determines whether some value is on the list" @@ -405,7 +405,7 @@ (string (char ... -> string) "Builds a string of the given characters.") (make-string (nat char -> string) - "Produces a string of given length" + "Returns a string of given length" " from a single given character.") (string-ref (string nat -> char) "Extracts the i-the character from a string.") @@ -455,7 +455,7 @@ "Converts a string into a symbol.") (string->number (string -> (union number false)) "Converts a string into a number," - " produce false if impossible.") + " return false if impossible.") (string->list (string -> (listof char)) "Converts a string into a list of characters.") (list->string ((listof char) -> string) diff --git a/collects/lang/private/intermediate-funs.rkt b/collects/lang/private/intermediate-funs.rkt index 4018c35f3d3..67e73b3d989 100644 --- a/collects/lang/private/intermediate-funs.rkt +++ b/collects/lang/private/intermediate-funs.rkt @@ -52,7 +52,7 @@ "Finds the (first) element of the list that maximizes the output of the function.") (memf ((X -> any) (listof X) -> (union false (listof X))) - "Determines whether the first argument produces a non-false value for any item in the second argument.") + "Determines whether the function fiven as the first argument returns a non-false value for any item in the second argument.") (apply ((X-1 ... X-N -> Y) X-1 ... X-i (list X-i+1 ... X-N) -> Y) "Applies a function using items from a list as the arguments.") (compose ((Y-1 -> Z) ... (Y-N -> Y-N-1) (X-1 ... X-N -> Y-N) -> (X-1 ... X-N -> Z)) diff --git a/collects/lang/private/teachprims.rkt b/collects/lang/private/teachprims.rkt index c9b191c341d..a3145367f16 100644 --- a/collects/lang/private/teachprims.rkt +++ b/collects/lang/private/teachprims.rkt @@ -352,8 +352,8 @@ namespace. (define r (f i)) (unless (char? r) (hocheck 'build-string - "the second argument must be a function that produces a character, ~ - given ~e, which produced ~e for ~e" f r i)) + "the second argument must be a function that returns a character, ~ + given ~e, which returned ~e when given ~e" f r i)) r)))) diff --git a/collects/scribblings/htdp-langs/advanced.scrbl b/collects/scribblings/htdp-langs/advanced.scrbl index 2402c36abcc..e820ec6a656 100644 --- a/collects/scribblings/htdp-langs/advanced.scrbl +++ b/collects/scribblings/htdp-langs/advanced.scrbl @@ -91,7 +91,8 @@ @; ---------------------------------------------------------------------- @section[#:tag "advanced-syntax"]{Syntax for Advanced} -In Advanced, @racket[set!] can be used to change variables. @racket[define] and +In Advanced, @racket[set!] can be used to mutate variables, and +@racket[define-struct]'s structures are mutatable. @racket[define] and @racket[lambda] can define functions of zero arguments, and function calls can invoke functions of zero arguments. @@ -155,17 +156,17 @@ the @racket[begin] expression is the value of the first @racket[expression].} @defform[(set! variable expression)]{ -Evaluates @racket[expression], and then changes the definition @racket[variable] +Evaluates @racket[expression], and then mutates the @racket[variable] to have @racket[expression]'s value. The @racket[variable] must be defined by @racket[define], @racket[letrec], @racket[let*], or @racket[let].} @defform[(delay expression)]{ -Produces a ``promise'' to evaluate @racket[expression]. The @racket[expression] +Returns a ``promise'' to evaluate @racket[expression]. The @racket[expression] is not evaluated until the promise is forced with @racket[force]; when the promise is forced, the result is recorded, so that any further -@racket[force] of the promise immediately produces the remembered value.} +@racket[force] of the promise immediately returns the remembered value.} @@ -262,7 +263,7 @@ error.} @defform[(unless test-expression body-expression)]{ Like @racket[when], but the @racket[body-expression] is evaluated when the -@racket[test-expression] produces @racket[false] instead of @racket[true].} +@racket[test-expression] evaluates to @racket[false] instead of @racket[true].} @section[#:tag "advanced-common-syntax"]{Common Syntaxes} @@ -291,7 +292,7 @@ level as they did in the @secref["intermediate-lam"] level. @itemize[ @item{@racketidfont{set-}@racket[_structure-name]@racketidfont{-}@racket[_field-name]@racketidfont{!} : takes an instance of the structure and a value, and - changes the instance's field to the given value.}]} + mutates the instance's field to the given value.}]} define-wish cond else diff --git a/collects/scribblings/htdp-langs/prim-ops.rkt b/collects/scribblings/htdp-langs/prim-ops.rkt index 473e39851bf..034e2fcbf78 100644 --- a/collects/scribblings/htdp-langs/prim-ops.rkt +++ b/collects/scribblings/htdp-langs/prim-ops.rkt @@ -312,22 +312,22 @@ (#,check-error-elem expression)]]{ Checks that the @racket[expression] reports an error, - where the error messages matches the string produced by the - @racket[matchexpression], if it is present.} + where the error messages matches the + value of @racket[matchexpression], if it is present.} @defform*[#:id [check-member-of check-member-of-id] [(check-member-of expression expression expression ...)]]{ - Checks that the first @racket[expression] produces the same value - as one of the following @racket[expression]s.} + Checks that the value of the first @racket[expression] as that of + one of the following @racket[expression]s.} @defform*[#:id [check-range check-range-id] [(check-range expression low-expression high-expression)]]{ - Checks that the first @racket[expression] produces a number in - between the numbers produced by @racket[low-expression] and + Checks that the value of the first @racket[expression] is a number in + between the value of the @racket[low-expression] and the @racket[high-expression], inclusive.} @; ---------------------------------------------------------------------- diff --git a/collects/tests/htdp-lang/intm-adv.rktl b/collects/tests/htdp-lang/intm-adv.rktl index ff76b0b5f87..841d5818b76 100644 --- a/collects/tests/htdp-lang/intm-adv.rktl +++ b/collects/tests/htdp-lang/intm-adv.rktl @@ -106,7 +106,7 @@ "foldl : first argument must be a function that expects two arguments, given #") (htdp-err/rt-test (build-string 2 add1) - "build-string : the second argument must be a function that produces a character, given #, which produced 1 for 0") + "build-string : the second argument must be a function that returns a character, given #, which returned 1 when given 0") (htdp-test 0 '+ (+)) (htdp-test 1 '+ (+ 1)) From 29e8c44ba9b9d45342bcb8d5dd646c575809078e Mon Sep 17 00:00:00 2001 From: Guillaume Marceau Date: Fri, 15 Jul 2011 03:34:59 -0400 Subject: [PATCH 259/441] Roll back the "expr -> expression" change in the grammar documentation of the teaching languages. The extra width was breaking some browsers. (cherry picked from commit 7134d679216ccfcdd4e5bccbee8cac2ce582ab48) --- .../scribblings/htdp-langs/advanced.scrbl | 60 +++++++++---------- .../htdp-langs/beginner-abbr.scrbl | 22 +++---- .../scribblings/htdp-langs/beginner.scrbl | 20 +++---- .../htdp-langs/intermediate-lambda.scrbl | 32 +++++----- .../scribblings/htdp-langs/intermediate.scrbl | 34 +++++------ .../scribblings/htdp-langs/std-grammar.rkt | 16 ++--- 6 files changed, 92 insertions(+), 92 deletions(-) diff --git a/collects/scribblings/htdp-langs/advanced.scrbl b/collects/scribblings/htdp-langs/advanced.scrbl index e820ec6a656..3ae6901d293 100644 --- a/collects/scribblings/htdp-langs/advanced.scrbl +++ b/collects/scribblings/htdp-langs/advanced.scrbl @@ -15,40 +15,40 @@ (check-expect check-within check-error check-member-of check-range require) [program (code:line def-or-expr ...)] [def-or-expr definition - expression + expr test-case library-require] -[definition (define (name variable ...) expression) - (define name expression) +[definition (define (name variable ...) expr) + (define name expr) (define-struct name (name ...)) (define-datatype name (name name ...) ...)] -[expression (begin expression expression ...) - (begin0 expression expression ...) - (set! variable expression) - (delay expression) - (lambda (variable ...) expression) - (λ (variable ...) expression) - (local [definition ...] expression) - (letrec ([name expression] ...) expression) - (shared ([name expression] ...) expression) - (let ([name expression] ...) expression) - (let name ([name expression] ...) expression) - (let* ([name expression] ...) expression) - (recur name ([name expression] ...) expression) - (code:line (expression expression ...)) - (cond [expression expression] ... [expression expression]) - (cond [expression expression] ... [else expression]) - (case expression [(choice choice ...) expression] ... - [(choice choice ...) expression]) - (case expression [(choice choice ...) expression] ... - [else expression]) - (match expression [pattern expression] ...) - (if expression expression expression) - (when expression expression) - (unless expression expression) - (and expression expression expression ...) - (or expression expression expression ...) - (time expression) +[expr (begin expr expr ...) + (begin0 expr expr ...) + (set! variable expr) + (delay expr) + (lambda (variable ...) expr) + (λ (variable ...) expr) + (local [definition ...] expr) + (letrec ([name expr] ...) expr) + (shared ([name expr] ...) expr) + (let ([name expr] ...) expr) + (let name ([name expr] ...) expr) + (let* ([name expr] ...) expr) + (recur name ([name expr] ...) expr) + (code:line (expr expr ...)) + (cond [expr expr] ... [expr expr]) + (cond [expr expr] ... [else expr]) + (case expr [(choice choice ...) expr] ... + [(choice choice ...) expr]) + (case expr [(choice choice ...) expr] ... + [else expr]) + (match expr [pattern expr] ...) + (if expr expr expr) + (when expr expr) + (unless expr expr) + (and expr expr expr ...) + (or expr expr expr ...) + (time expr) (code:line name) (code:line @#,elem{@racketvalfont{'}@racket[_quoted]}) (code:line @#,elem{@racketvalfont{`}@racket[_quasiquoted]}) diff --git a/collects/scribblings/htdp-langs/beginner-abbr.scrbl b/collects/scribblings/htdp-langs/beginner-abbr.scrbl index 8c44194bf64..bcae7f7995f 100644 --- a/collects/scribblings/htdp-langs/beginner-abbr.scrbl +++ b/collects/scribblings/htdp-langs/beginner-abbr.scrbl @@ -14,20 +14,20 @@ (check-expect check-within check-member-of check-range check-error require) [program (code:line def-or-expr ...)] [def-or-expr definition - expression + expr test-case library-require] -[definition (define (name variable variable ...) expression) - (define name expression) - (define name (lambda (variable variable ...) expression)) +[definition (define (name variable variable ...) expr) + (define name expr) + (define name (lambda (variable variable ...) expr)) (define-struct name (name ...))] -[expression (code:line (name expression expression ...)) - (code:line (prim-op expression ...)) - (cond [expression expression] ... [expression expression]) - (cond [expression expression] ... [else expression]) - (if expression expression expression) - (and expression expression expression ...) - (or expression expression expression ...) +[expr (code:line (name expr expr ...)) + (code:line (prim-op expr ...)) + (cond [expr expr] ... [expr expr]) + (cond [expr expr] ... [else expr]) + (if expr expr expr) + (and expr expr expr ...) + (or expr expr expr ...) name (code:line @#,elem{@racketvalfont{'}@racket[_quoted]}) (code:line @#,elem{@racketvalfont{`}@racket[_quasiquoted]}) diff --git a/collects/scribblings/htdp-langs/beginner.scrbl b/collects/scribblings/htdp-langs/beginner.scrbl index b14dbbdc495..8867fdb2dcf 100644 --- a/collects/scribblings/htdp-langs/beginner.scrbl +++ b/collects/scribblings/htdp-langs/beginner.scrbl @@ -13,19 +13,19 @@ (check-expect check-within check-member-of check-range check-error require) [program (code:line def-or-expr ...)] [def-or-expr definition - expression + expr test-case library-require] -[definition (define (name variable variable ...) expression) - (define name expression) - (define name (lambda (variable variable ...) expression)) +[definition (define (name variable variable ...) expr) + (define name expr) + (define name (lambda (variable variable ...) expr)) (define-struct name (name ...))] -[expression (code:line (name expression expression ...)) - (cond [expression expression] ... [expression expression]) - (cond [expression expression] ... [else expression]) - (if expression expression expression) - (and expression expression expression ...) - (or expression expression expression ...) +[expr (code:line (name expr expr ...)) + (cond [expr expr] ... [expr expr]) + (cond [expr expr] ... [else expr]) + (if expr expr expr) + (and expr expr expr ...) + (or expr expr expr ...) name (code:line @#,elem{@racketvalfont{'}@racket[name]}) number diff --git a/collects/scribblings/htdp-langs/intermediate-lambda.scrbl b/collects/scribblings/htdp-langs/intermediate-lambda.scrbl index 8ebd883d1a3..57a76e73161 100644 --- a/collects/scribblings/htdp-langs/intermediate-lambda.scrbl +++ b/collects/scribblings/htdp-langs/intermediate-lambda.scrbl @@ -12,25 +12,25 @@ (check-expect check-within check-member-of check-range check-error require) [program (code:line def-or-expr ...)] [def-or-expr definition - expression + expr test-case library-require] -[definition (define (name variable variable ...) expression) - (define name expression) +[definition (define (name variable variable ...) expr) + (define name expr) (define-struct name (name ...))] -[expression (lambda (variable variable ...) expression) - (λ (variable variable ...) expression) - (local [definition ...] expression) - (letrec ([name expression] ...) expression) - (let ([name expression] ...) expression) - (let* ([name expression] ...) expression) - (code:line (expression expression expression ...)) - (cond [expression expression] ... [expression expression]) - (cond [expression expression] ... [else expression]) - (if expression expression expression) - (and expression expression expression ...) - (or expression expression expression ...) - (time expression) +[expr (lambda (variable variable ...) expr) + (λ (variable variable ...) expr) + (local [definition ...] expr) + (letrec ([name expr] ...) expr) + (let ([name expr] ...) expr) + (let* ([name expr] ...) expr) + (code:line (expr expr expr ...)) + (cond [expr expr] ... [expr expr]) + (cond [expr expr] ... [else expr]) + (if expr expr expr) + (and expr expr expr ...) + (or expr expr expr ...) + (time expr) (code:line name) (code:line prim-op) (code:line @#,elem{@racketvalfont{'}@racket[_quoted]}) diff --git a/collects/scribblings/htdp-langs/intermediate.scrbl b/collects/scribblings/htdp-langs/intermediate.scrbl index c53c14c8c5e..0e5f56601aa 100644 --- a/collects/scribblings/htdp-langs/intermediate.scrbl +++ b/collects/scribblings/htdp-langs/intermediate.scrbl @@ -13,32 +13,32 @@ (check-expect check-within check-member-of check-range check-error require) [program (code:line def-or-expr ...)] [def-or-expr definition - expression + expr test-case library-require] -[definition (define (name variable variable ...) expression) - (define name expression) - (define name (lambda (variable variable ...) expression)) +[definition (define (name variable variable ...) expr) + (define name expr) + (define name (lambda (variable variable ...) expr)) (define-struct name (name ...))] -[expression (local [definition ...] expression) - (letrec ([name expr-for-let] ...) expression) - (let ([name expr-for-let] ...) expression) - (let* ([name expr-for-let] ...) expression) - (code:line (name expression expression ...) ) - (cond [expression expression] ... [expression expression]) - (cond [expression expression] ... [else expression]) - (if expression expression expression) - (and expression expression expression ...) - (or expression expression expression ...) - (time expression) +[expr (local [definition ...] expr) + (letrec ([name expr-for-let] ...) expr) + (let ([name expr-for-let] ...) expr) + (let* ([name expr-for-let] ...) expr) + (code:line (name expr expr ...) ) + (cond [expr expr] ... [expr expr]) + (cond [expr expr] ... [else expr]) + (if expr expr expr) + (and expr expr expr ...) + (or expr expr expr ...) + (time expr) (code:line name) (code:line @#,elem{@racketvalfont{'}@racket[_quoted]}) (code:line @#,elem{@racketvalfont{`}@racket[_quasiquoted]}) number string character] -[expr-for-let (lambda (variable variable ...) expression) - expression] +[expr-for-let (lambda (variable variable ...) expr) + expr] ] @prim-nonterms[("intermediate") define define-struct] diff --git a/collects/scribblings/htdp-langs/std-grammar.rkt b/collects/scribblings/htdp-langs/std-grammar.rkt index 4295d1fb231..1c891c8b7e3 100644 --- a/collects/scribblings/htdp-langs/std-grammar.rkt +++ b/collects/scribblings/htdp-langs/std-grammar.rkt @@ -16,12 +16,12 @@ (racketgrammar* #:literals lits form ... - [test-case @#,racket[(check-expect expression expression)] - @#,racket[(check-within expression expression expression)] - @#,racket[(check-member-of expression expression (... ...))] - @#,racket[(check-range expression expression expression)] - @#,racket[(check-error expression expression)] - @#,racket[(check-error expression)]] + [test-case @#,racket[(check-expect expr expr)] + @#,racket[(check-within expr expr expr)] + @#,racket[(check-member-of expr expr (... ...))] + @#,racket[(check-range expr expr expr)] + @#,racket[(check-error expr expr)] + @#,racket[(check-error expr)]] (... [library-require @#,racket[(require string)] @#,racket[(require (lib string string ...))] @@ -55,8 +55,8 @@ @#,racket[(quasiquoted ...)] @#,elem{@racketvalfont{'}@racket[quasiquoted]} @#,elem{@racketvalfont{`}@racket[quasiquoted]} - @#,elem{@racketfont{,}@racket[expression]} - @#,elem{@racketfont[",@"]@racket[expression]}]))) + @#,elem{@racketfont{,}@racket[expr]} + @#,elem{@racketfont[",@"]@racket[expr]}]))) (define-syntax-rule (prim-nonterms (section-prefix) define define-struct) From 14cd4ae26c662e642b5ce14c7ea300746b9b2b31 Mon Sep 17 00:00:00 2001 From: Matthias Felleisen Date: Fri, 15 Jul 2011 11:47:42 -0400 Subject: [PATCH 260/441] fixed bug in exception handling for drawing; Closes PR 12044 (cherry picked from commit 562252f5892420ca27dccf2e1c6f853629d3668d) --- collects/2htdp/private/world.rkt | 8 ++++++-- collects/2htdp/tests/bad-draw.rkt | 9 ++++----- collects/2htdp/tests/error-in-draw.rkt | 16 ++++++++++++++++ collects/2htdp/tests/error-in-tick.rkt | 17 +++++++++++++++++ collects/2htdp/tests/xtest | 2 ++ 5 files changed, 45 insertions(+), 7 deletions(-) create mode 100644 collects/2htdp/tests/error-in-draw.rkt create mode 100644 collects/2htdp/tests/error-in-tick.rkt diff --git a/collects/2htdp/private/world.rkt b/collects/2htdp/private/world.rkt index 7099212e7e9..c3114308961 100644 --- a/collects/2htdp/private/world.rkt +++ b/collects/2htdp/private/world.rkt @@ -258,10 +258,14 @@ (pdraw)) (queue-callback (lambda () - (with-handlers ([exn? (handler #t)]) + (define H (handler #t)) + (with-handlers ([exn? H]) ; (define tag (object-name transform)) (define nw (transform (send world get) arg ...)) - (define (d) (pdraw) (set-draw#!)) + (define (d) + (with-handlers ((exn? H)) + (pdraw)) + (set-draw#!)) ;; --- ;; [Listof (Box [d | void])] (define w '()) diff --git a/collects/2htdp/tests/bad-draw.rkt b/collects/2htdp/tests/bad-draw.rkt index 793cbdab913..2846f66f36e 100644 --- a/collects/2htdp/tests/bad-draw.rkt +++ b/collects/2htdp/tests/bad-draw.rkt @@ -2,11 +2,10 @@ (require 2htdp/universe) -(define s "") -(define x 0) +(define txt "expected to return a scene but this is a string") -(with-handlers ((exn? (lambda _ "success!"))) +(with-handlers ((exn? (lambda (e) (unless (string=? (exn-message e) txt) (raise e))))) (big-bang 0 - (on-tick (lambda (w) (begin (set! x (+ x 1)) w))) - (to-draw (lambda (w) (set! s (number->string w)))))) + (on-tick add1) + (to-draw (lambda (w) (error txt))))) diff --git a/collects/2htdp/tests/error-in-draw.rkt b/collects/2htdp/tests/error-in-draw.rkt new file mode 100644 index 00000000000..c37782036e5 --- /dev/null +++ b/collects/2htdp/tests/error-in-draw.rkt @@ -0,0 +1,16 @@ +#lang racket + +(require 2htdp/universe) +(require 2htdp/image) + +(define (f x) + (cond + [(= x 0) (circle 10 'solid 'red)] + [(= x 1) (circle 20 'solid 'red)] + [else (error txt)])) + +(define txt "all questions were #f") + +(with-handlers ([exn? (lambda (e) (unless (string=? (exn-message e) txt) (raise e)))]) + (big-bang 0 (on-tick add1) (to-draw f)) + (error 'error-in-draw "test failed")) diff --git a/collects/2htdp/tests/error-in-tick.rkt b/collects/2htdp/tests/error-in-tick.rkt new file mode 100644 index 00000000000..3156ac3a6ef --- /dev/null +++ b/collects/2htdp/tests/error-in-tick.rkt @@ -0,0 +1,17 @@ +#lang racket + +(require 2htdp/universe) +(require 2htdp/image) + +(define (f x) (circle 10 'solid 'red)) + +(define (g x) + (cond + [(= x 0) 1] + [else (error txt)])) + +(define txt "all questions were #f") + +(with-handlers ([exn? (lambda (e) (unless (string=? (exn-message e) txt) (raise e)))]) + (big-bang 0 (on-tick g) (to-draw f)) + (error 'error-in-tick "test failed")) diff --git a/collects/2htdp/tests/xtest b/collects/2htdp/tests/xtest index 25463109d2a..90f598586c5 100755 --- a/collects/2htdp/tests/xtest +++ b/collects/2htdp/tests/xtest @@ -9,6 +9,8 @@ run() { } run bad-draw.rkt +run error-in-tick.rkt +run error-in-draw.rkt run -t batch-io.rkt run clause-once.rkt run full-scene-visible.rkt From 0372e02294ccef805e9bb71f9dcadbf2fc82c8d1 Mon Sep 17 00:00:00 2001 From: Matthias Felleisen Date: Fri, 15 Jul 2011 12:20:11 -0400 Subject: [PATCH 261/441] documented error reporting functions (Cherry picked from 9193203, and slightly edited for conflicts due to code shuffling.) --- collects/htdp/error-reporting.scrbl | 132 +++++++++++++---- collects/htdp/error.rkt | 211 +++++++++++++++------------- collects/htdp/htdp.scrbl | 27 +++- 3 files changed, 237 insertions(+), 133 deletions(-) diff --git a/collects/htdp/error-reporting.scrbl b/collects/htdp/error-reporting.scrbl index 452e82cbf58..d553cc4bf32 100755 --- a/collects/htdp/error-reporting.scrbl +++ b/collects/htdp/error-reporting.scrbl @@ -1,49 +1,121 @@ #lang scribble/doc -@(require scribble/manual - (for-label htdp/error) - ) +@(require scribble/manual (for-label htdp/error 2htdp/image racket)) @title[#:tag "error-reporting"]{Error Reporting Functions} @defmodule[htdp/error] -To provide uniform error messages from the TeachPacks, this module -provides several functions: - -@defproc[(check-arg) void?]{ - } - -@defproc[(check-arity) void?]{ - } - -@defproc[(check-proc) void?]{ - } - -@defproc[(check-result) void?]{ +To provide uniform error messages from teachpacks, this module provides several functions: + +@defproc[(check-arg [name (or/c symbol? string?)] + [chk boolean?] + [expected any/c] + [position (or/c (and/c positive? integer?) string?)] + [given any/c]) + void?]{ + Checks an flat-valued argument to function @scheme[name]. + Reports an error for function @scheme[name] + telling students what kind of data is @scheme[expected] at the @scheme[position]-th argument + and displaying what value was actually @scheme[given], + unless @scheme[chk] is @scheme[true].} + +@defproc[(check-arity [name (or/c symbol? string?)] + [arg# (or/c (and/c positive? integer?) string?)?] + [args list?]) + void?]{ + Checks the arity of a procedure-valued argument to function @scheme[name]. + Reports an error for function @scheme[name] + telling students that @scheme[(length args)] arguments were provided but + @scheme[arg#] were expected, unless @scheme[(= (length args) arg#)] + produces @scheme[true].} + +@defproc[(check-proc [name (or/c symbol? string?)] + [proc any/c] + [expected natural?] + [arg# (or/c (and/c positive? integer?) string?)] + [arg-err string?]) + void?]{ + Checks [the properties of] a procedure-valued argument to function @scheme[name]. + Reports an error for function @scheme[name] + telling students that a procedure was expected at position @scheme[arg#] + and that this procedure should be of arity @scheme[expected], + unless the @scheme[proc] is a function and has the @scheme[expected] arity. + The string @scheme[arg-err] is used to describe the higher-order argument.} + +@defproc[(check-result [name (or/c symbol? string?)] + [pred? (-> any/c boolean?)] + [kind (or/c symbol? string?)] + [returned any/c] ...+) + void?]{ + Checks the expected result of a procedure-valued argument. + If the result satisfies @scheme[pred?], it is returned. + Otherwise, the function reports an error for function @scheme[name] + telling students what @scheme[kind] of value is expected and what the + @scheme[returned] value is. NOTE: if there is more than one + @scheme[returned] value, the function uses the second value. (MF: I forgot + why.)} + + +@defproc[(check-list-list [name (or/c symbol? string?)] + [chk (or/c string? false/c)] + [pred? any/c] + [given any/c]) + void?]{ + Checks a list-of-lists-valued argument to function @scheme[name]. + Reports an error for function @scheme[name] if a list-of-lists contains + a value of the wrong kind---signaled via a string-valued @scheme[chk]. + The @scheme[given] value is the element that went wrong. Rarely used.} + +@defproc[(check-color [name (or/c symbol? string?)] + [arg# natural?] + [given any/c]) + void?]{ + Checks a color-valued argument to function @scheme[name]. + Deprecated. Use @scheme[image-color?] instead. } -@defproc[(check-list-list) void?]{ +@defproc[(check-fun-res [f procedure?] + [pred? (-> any/c boolean?)] + [type (or/c symbol? string?)]) + void?]{ + Creates a callback from @scheme[f] and uses @scheme[check-result] to make + sure the result is a piece of data that satisfies @scheme[pred?], + described as @scheme[type]. } -@defproc[(check-color) void?]{ - } +@defproc[(natural? [o any/c]) boolean?]{ + Determines whether the given value is a natural number.} -@defproc[(check-fun-res) void?]{ +@defproc[(find-non [pred? (-> any/c boolean?)] [l list?]) (or/c any/c false/c)]{ + Find an element of @scheme[l] for which @scheme[(pred? l)] produces + @scheme[true]; otherwise return @scheme[false].} + +@defproc[(check-dependencies [name (or/c symbol? string?)] + [chk boolean?] + [fmt format-string?] + [arg any/c] ...) + void?]{ + Unless @scheme[chk] is @scheme[true], it raises an error called + @scheme[name] whose message is composed from @scheme[fmt] and the + @scheme[arg]s. } -@defproc[(check-dependencies) void?]{ - } +@defproc[(tp-error [name (or/c symbol? string?)] + [fmt format-string?] + [arg any/c] ...) + void?]{ + Signals an @racket[exn:fail:contract] from @scheme[fmt] and @scheme[arg] + for a function called @scheme[name].} -@defproc[(natural?) void?]{ +@defproc[(tp-exn? [o any/c]) boolean?]{ + Determine whether the given object is a teachpack exception + MF: Guillaume seems to have deprecated these structures. } -@defproc[(find-non) void?]{ - } - -@defproc[(tp-exn?) void?]{ - } +@defproc[(number->ord [n natural?]) string?]{ + Convert a position number into a string, e.g., 1 into ``first'' and so + on.} -@defproc[(number->ord) void?]{ - } +MF: These library and its uses needs to be cleaned up. diff --git a/collects/htdp/error.rkt b/collects/htdp/error.rkt index 21883517a15..3e589b01ede 100644 --- a/collects/htdp/error.rkt +++ b/collects/htdp/error.rkt @@ -1,82 +1,59 @@ -#lang scheme/base -(require scheme/class - lang/private/rewrite-error-message) - -;; -------------------------------------------------------------------------- -(provide check-arg check-arity check-proc check-result - check-list-list check-color - check-fun-res check-dependencies +#lang racket/base + +(require lang/private/rewrite-error-message) + +;; ----------------------------------------------------------------------------- +;; this module provides one-point functionality to report errors in teachpacks + +;; ----------------------------------------------------------------------------- +(provide check-arg + check-list-list + check-arity + check-proc + check-result + check-fun-res + check-color + check-dependencies natural? - find-non tp-exn? number->ord + number->ord + find-non + tp-exn? tp-error) -(define (natural? w) - (and (number? w) (integer? w) (>= w 0))) - -;; (_ -> Boolean) (listof X) -> (union X false) -(define (find-non pred? l) - (let ([r (filter (compose not pred?) l)]) - (if (null? r) #f (car r)))) - - -;(: check-fun-res (∀ (Îł) (∀ (ÎČ Î± ...) (α ...α -> ÎČ)) (_ -Îł-> boolean) _ -> Îł)) -(define (check-fun-res f pred? type) - (lambda x - (define r (apply f x)) - (check-result (object-name f) pred? type r) - r)) - -;; check-dependencies : Symbol x Boolean x FormatString x Any* -> Void -(define (check-dependencies pname condition fmt . args) +;; check-arg : sym bool str (or/c str non-negative-integer) TST -> void +(define (check-arg pname condition expected arg-posn given) (unless condition - (tp-error pname (apply format fmt args)))) - -#| Tests ------------------------------------------------------------------ - (not (find-non list? '((1 2 3) (a b c)))) - (symbol? (find-non number? '(1 2 3 a))) - (symbol? (find-non list? '((1 2 3) a (b c)))) - |# - -(define-struct (tp-exn exn) ()) - -(define (tp-error name fmt . args) - (raise - (make-exn:fail:contract #; make-tp-exn - (string-append (format "~a: " name) (apply format fmt args)) - (current-continuation-marks)))) - -(define (number->ord i) - (if (= i 0) - "zeroth" - (case (modulo i 10) - [(0 4 5 6 7 8 9) (format "~ath" i)] - [(1) (format "~ast" i)] - [(2) (format "~and" i)] - [(3) (format "~ard" i)]))) - -;; spell-out : number-or-string -> string -(define (spell-out arg-posn) - (cond - [(string? arg-posn) arg-posn] - [(number? arg-posn) - (case arg-posn - [(1) "first"] - [(2) "second"] - [(3) "third"] - [(4) "fourth"] - [(5) "fifth"] - [(6) "sixth"] - [(7) "seventh"] - [(8) "eighth"] - [(9) "ninth"] - [(10) "tenth"] - [else (number->ord arg-posn)])])) + (tp-error pname "expects ~a as ~a argument, given ~e" + (add-article expected) + (spell-out arg-posn) + given))) ;; Symbol (union true String) String X -> void (define (check-list-list pname condition pred given) (when (string? condition) (tp-error pname (string-append condition (format "\nin ~e" given))))) +;; check-arity : sym num (list-of TST) -> void +(define (check-arity name arg# args) + (unless (= (length args) arg#) + (tp-error name (argcount-error-message arg# (length args))))) + +;; check-proc : sym (... *->* ...) num (union sym str) (union sym str) -> void +(define (check-proc name f exp-arity arg# arg-err) + (unless (procedure? f) + (tp-error name "expected a function as ~a argument; given ~e" arg# f)) + (let ([arity-of-f (procedure-arity f)]) + (unless (procedure-arity-includes? f exp-arity) + (tp-error name "expected function of ~a as ~a argument; given function of ~a " + arg-err arg# + (cond + [(number? arity-of-f) + (if (= arity-of-f 1) + (format "1 argument") + (format "~s arguments" arity-of-f))] + [(arity-at-least? arity-of-f) "variable number of arguments"] + [else (format "multiple arities (~s)" arity-of-f)]))))) + ;; Symbol (_ -> Boolean) String X X *-> X (define (check-result pname pred? expected given . other-given) (if (pred? given) @@ -111,33 +88,75 @@ "expected the name ~e to be a color, but did not recognize it" given)))) -;; check-arg : sym bool str (or/c str non-negative-integer) TST -> void -(define (check-arg pname condition expected arg-posn given) +;; (: check-fun-res (∀ (Îł) (∀ (ÎČ Î± ...) (α ...α -> ÎČ)) (_ -Îł-> boolean) _ -> Îł)) +(define (check-fun-res f pred? type) + (lambda x + (check-result (object-name f) pred? type (apply f x)))) + +;; check-dependencies : Symbol x Boolean x FormatString x Any* -> Void +(define (check-dependencies pname condition fmt . args) (unless condition - (tp-error pname "expects a ~a as ~a argument, given ~e" - expected - (spell-out arg-posn) - given))) + (tp-error pname (apply format fmt args)))) -;; check-arity : sym num (list-of TST) -> void -(define (check-arity name arg# args) - (if (= (length args) arg#) - (void) - (tp-error name (argcount-error-message arg# (length args))))) +(define-struct (tp-exn exn) ()) -;; check-proc : -;; sym (... *->* ...) num (union sym str) (union sym str) -> void -(define (check-proc proc f exp-arity arg# arg-err) - (unless (procedure? f) - (tp-error proc "expected a function as ~a argument; given ~e" arg# f)) - (let ([arity-of-f (procedure-arity f)]) - (unless (procedure-arity-includes? f exp-arity) ; (and (number? arity-of-f) (>= arity-of-f exp-arity)) - (tp-error proc "expected function of ~a as ~a argument; given function of ~a " - arg-err arg# - (cond - [(number? arity-of-f) - (if (= arity-of-f 1) - (format "1 argument") - (format "~s arguments" arity-of-f))] - [(arity-at-least? arity-of-f) "variable number of arguments"] - [else (format "multiple arities (~s)" arity-of-f)]))))) +(define (tp-error name fmt . args) + (raise + (make-exn:fail:contract + (string-append (format "~a: " name) (apply format fmt args)) + (current-continuation-marks)))) + +(define (number->ord i) + (if (= i 0) + "zeroth" + (case (modulo i 10) + [(0 4 5 6 7 8 9) (format "~ath" i)] + [(1) (format "~ast" i)] + [(2) (format "~and" i)] + [(3) (format "~ard" i)]))) + +;; (_ -> Boolean) (listof X) -> (union X false) +;; (not (find-non list? '((1 2 3) (a b c)))) +;; (symbol? (find-non number? '(1 2 3 a))) +;; (symbol? (find-non list? '((1 2 3) a (b c)))) +(define (find-non pred? l) + (let ([r (filter (compose not pred?) l)]) + (if (null? r) #f (car r)))) + +(define (natural? w) + (and (number? w) (integer? w) (>= w 0))) + +;; add-article : anything -> string +;; (add-article 'color) should be "a color" +;; (add-article 'acronym) should be "an acronym" +(define (add-article thing) + (let ((s (format "~a" thing))) + (string-append + (if (starts-with-vowel? s) + "an " + "a ") + s))) + +;; starts-with-vowel? : string -> boolean +(define (starts-with-vowel? s) + (and + (not (string=? s "")) + (member (string-ref s 0) (list #\a #\e #\i #\o #\u)))) + +;; spell-out : number-or-string -> string +(define (spell-out arg-posn) + (cond + [(string? arg-posn) arg-posn] + [(number? arg-posn) + (case arg-posn + [(1) "first"] + [(2) "second"] + [(3) "third"] + [(4) "fourth"] + [(5) "fifth"] + [(6) "sixth"] + [(7) "seventh"] + [(8) "eighth"] + [(9) "ninth"] + [(10) "tenth"] + [else (number->ord arg-posn)])])) diff --git a/collects/htdp/htdp.scrbl b/collects/htdp/htdp.scrbl index fa1149e6a9a..bc1bdb43e7b 100644 --- a/collects/htdp/htdp.scrbl +++ b/collects/htdp/htdp.scrbl @@ -22,12 +22,26 @@ file from the filesystem.} Under the hood, HtDP Teachpacks and HtDP Libraries are implemented the same way, using normal Racket @secref[#:doc '(lib "scribblings/guide/guide.scrbl") "modules"]. -When implementing an extension intended for students, pay a special attention to -the error messages. The error messages of DrRacket's teaching languages go to -great length to ensure that students are never confronted with messages that -uses vocabulary or phrases the students has not learned yet. The teaching languages -also ensure that students cannot stumble by accident onto challenging or -confusing features intended for professional or for higher-level students. +When implementing such an extension for students, pay a special attention +to two aspects: +@itemlist[#:style 'ordered + +@item{@bold{choice of construct}: The teaching languages limit the +expressive power in comparison to plain Racket. One goal is to teach +``design subject to constraints,'' and the other one is to help restrict +the set of explanations for student errors. With regard to the first, we +consider it imperative that new teachpacks and libraries avoid features +intended for upper-level students or professionals.} + +@item{@bold{error messages}: The error messages from the teaching languages +go to great length to never confront students messages that uses vocabulary +or phrases outside of the scope of the chosen level. While teachpacks and +libraries can be used at all levels, they should ideally restrict the +vocabulary in error message to the lowest level language in which they are +to be used.} + +] + This manual describes library support for authors of HtDP Teachpacks, libraries, and customized teaching languages. Use the HtDP @@ -39,7 +53,6 @@ of DrRacket's teaching languages. @local-table-of-contents[#:style 'immediate-only] - @include-section["error-composition.scrbl"] @include-section["error-reporting.scrbl"] From fecc46f97df65248d4a58361d298152e842b11ee Mon Sep 17 00:00:00 2001 From: Matthias Felleisen Date: Fri, 15 Jul 2011 14:50:34 -0400 Subject: [PATCH 262/441] adjusted expected error messages to accommodate Stephen's change (cherry picked from commit 6c51155fec1f54c7c0b0d01aaa1c6e0ffac86fa8) --- collects/2htdp/tests/test-image.rkt | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/collects/2htdp/tests/test-image.rkt b/collects/2htdp/tests/test-image.rkt index c237ccfefaa..c074c2623b9 100644 --- a/collects/2htdp/tests/test-image.rkt +++ b/collects/2htdp/tests/test-image.rkt @@ -1972,56 +1972,56 @@ (test/exn (rectangle 10 10 "solid" (make-pen "black" 12 "solid" "round" "round")) => - #rx"^rectangle: expects a image-color") + #rx"^rectangle: expects an image-color") (test/exn (rectangle 10 10 'solid (make-pen "black" 12 "solid" "round" "round")) => - #rx"^rectangle: expects a image-color") + #rx"^rectangle: expects an image-color") (test/exn (circle 10 'solid (make-pen "black" 12 "solid" "round" "round")) => - #rx"^circle: expects a image-color") + #rx"^circle: expects an image-color") (test/exn (ellipse 10 10 'solid (make-pen "black" 12 "solid" "round" "round")) => - #rx"^ellipse: expects a image-color") + #rx"^ellipse: expects an image-color") (test/exn (triangle 10 'solid (make-pen "black" 12 "solid" "round" "round")) => - #rx"^triangle: expects a image-color") + #rx"^triangle: expects an image-color") (test/exn (right-triangle 10 12 'solid (make-pen "black" 12 "solid" "round" "round")) => - #rx"^right-triangle: expects a image-color") + #rx"^right-triangle: expects an image-color") (test/exn (isosceles-triangle 10 120 'solid (make-pen "black" 12 "solid" "round" "round")) => - #rx"^isosceles-triangle: expects a image-color") + #rx"^isosceles-triangle: expects an image-color") (test/exn (square 10 'solid (make-pen "black" 12 "solid" "round" "round")) => - #rx"^square: expects a image-color") + #rx"^square: expects an image-color") (test/exn (rhombus 40 45 'solid (make-pen "black" 12 "solid" "round" "round")) => - #rx"^rhombus: expects a image-color") + #rx"^rhombus: expects an image-color") (test/exn (regular-polygon 40 6 'solid (make-pen "black" 12 "solid" "round" "round")) => - #rx"^regular-polygon: expects a image-color") + #rx"^regular-polygon: expects an image-color") (test/exn (star 40 'solid (make-pen "black" 12 "solid" "round" "round")) => - #rx"^star: expects a image-color") + #rx"^star: expects an image-color") (test/exn (star-polygon 40 7 3 'solid (make-pen "black" 12 "solid" "round" "round")) => - #rx"^star-polygon: expects a image-color") + #rx"^star-polygon: expects an image-color") (test/exn (polygon (list (make-posn 0 0) (make-posn 100 0) (make-posn 100 100)) 'solid (make-pen "black" 12 "solid" "round" "round")) => - #rx"^polygon: expects a image-color") + #rx"^polygon: expects an image-color") (test/exn (polygon (list (make-posn 0 0+1i) (make-posn 100 0) (make-posn 100 100)) 'solid (make-pen "black" 12 "solid" "round" "round")) => From a0ccf20b30a88b26a4eea3eb9f37f836a15cd756 Mon Sep 17 00:00:00 2001 From: Ryan Culpepper Date: Fri, 15 Jul 2011 12:54:09 -0600 Subject: [PATCH 263/441] macro-stepper: disable taint display until correct Merge to release branch (cherry picked from commit 91a2e283a672453b462e3c88444cf53691c3ba8e) --- collects/macro-debugger/syntax-browser/properties.rkt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/collects/macro-debugger/syntax-browser/properties.rkt b/collects/macro-debugger/syntax-browser/properties.rkt index fde507ef0c9..65dbcafadd2 100644 --- a/collects/macro-debugger/syntax-browser/properties.rkt +++ b/collects/macro-debugger/syntax-browser/properties.rkt @@ -203,7 +203,8 @@ (display-extra-source-info stx) (display-symbol-property-info stx) (display-marks stx) - (display-taint stx)) + ;; Disable until correct: + (when #f (display-taint stx))) ;; display-source-info : syntax -> void (define/private (display-source-info stx) From 9f5ad021f12b3eb380e64c8b8109a7b42f9b3eca Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Fri, 15 Jul 2011 19:39:50 -0600 Subject: [PATCH 264/441] fix errortrace The `eq?'ness of syntax objects used to reconstruct the result was broken by disarming. The solution is to reconstruct based on the disarmed syntax object instead of the original. Merge to 5.1.2. (cherry picked from commit 0f61d62ea18e27f1a858a9a44ff70cc7fbda25cb) --- collects/errortrace/stacktrace.rkt | 39 +++++++++++++++--------------- collects/tests/errortrace/wrap.rkt | 25 +++++++++++++++++++ 2 files changed, 45 insertions(+), 19 deletions(-) create mode 100644 collects/tests/errortrace/wrap.rkt diff --git a/collects/errortrace/stacktrace.rkt b/collects/errortrace/stacktrace.rkt index 551c043e9b4..3501cb952cc 100644 --- a/collects/errortrace/stacktrace.rkt +++ b/collects/errortrace/stacktrace.rkt @@ -306,8 +306,9 @@ (define (make-annotate top? name) (lambda (expr phase) + (define disarmed-expr (disarm expr)) (test-coverage-point - (kernel-syntax-case/phase (disarm expr) phase + (kernel-syntax-case/phase disarmed-expr phase [_ (identifier? expr) (let ([b (identifier-binding expr phase)]) @@ -354,13 +355,13 @@ (rearm expr (rebuild - expr + disarmed-expr (list (cons #'rhs with-coverage)))))] [(begin . exprs) top? (rearm expr - (annotate-seq expr + (annotate-seq disarmed-expr (syntax exprs) annotate-top phase))] [(define-syntaxes (name ...) rhs) @@ -372,7 +373,7 @@ (add1 phase)))]) (rearm expr - (rebuild expr (list (cons #'rhs marked)))))] + (rebuild disarmed-expr (list (cons #'rhs marked)))))] [(define-values-for-syntax (name ...) rhs) top? @@ -383,7 +384,7 @@ (add1 phase)))]) (rearm expr - (rebuild expr (list (cons #'rhs marked)))))] + (rebuild disarmed-expr (list (cons #'rhs marked)))))] [(module name init-import mb) (syntax-case (disarm #'mb) () @@ -397,7 +398,7 @@ (rearm expr (rebuild - expr + disarmed-expr (list (cons mb (rearm @@ -442,21 +443,21 @@ expr (keep-lambda-properties expr - (rebuild expr (map cons clauses clausel))))))] + (rebuild disarmed-expr (map cons clauses clausel))))))] ;; Wrap RHSs and body [(let-values ([vars rhs] ...) . body) (with-mark expr (rearm expr - (annotate-let expr phase + (annotate-let disarmed-expr phase (syntax (vars ...)) (syntax (rhs ...)) (syntax body))))] [(letrec-values ([vars rhs] ...) . body) (let ([fm (rearm expr - (annotate-let expr phase + (annotate-let disarmed-expr phase (syntax (vars ...)) (syntax (rhs ...)) (syntax body)))]) @@ -478,7 +479,7 @@ (with-mark expr (rearm expr - (rebuild expr (list (cons #'rhs new-rhs))))))] + (rebuild disarmed-expr (list (cons #'rhs new-rhs))))))] ;; Wrap subexpressions only [(begin e) @@ -490,12 +491,12 @@ (with-mark expr (rearm expr - (annotate-seq expr #'body annotate phase)))] + (annotate-seq disarmed-expr #'body annotate phase)))] [(begin0 . body) (with-mark expr (rearm expr - (annotate-seq expr #'body annotate phase)))] + (annotate-seq disarmed-expr #'body annotate phase)))] [(if tst thn els) (let ([w-tst (annotate (syntax tst) phase)] [w-thn (annotate (syntax thn) phase)] @@ -503,22 +504,22 @@ (with-mark expr (rearm expr - (rebuild expr (list (cons #'tst w-tst) - (cons #'thn w-thn) - (cons #'els w-els))))))] + (rebuild disarmed-expr (list (cons #'tst w-tst) + (cons #'thn w-thn) + (cons #'els w-els))))))] [(if tst thn) (let ([w-tst (annotate (syntax tst) phase)] [w-thn (annotate (syntax thn) phase)]) (with-mark expr (rearm expr - (rebuild expr (list (cons #'tst w-tst) - (cons #'thn w-thn))))))] + (rebuild disarmed-expr (list (cons #'tst w-tst) + (cons #'thn w-thn))))))] [(with-continuation-mark . body) (with-mark expr (rearm expr - (annotate-seq expr (syntax body) + (annotate-seq disarmed-expr (syntax body) annotate phase)))] ;; Wrap whole application, plus subexpressions @@ -538,7 +539,7 @@ [else (with-mark expr (rearm expr - (annotate-seq expr (syntax body) + (annotate-seq disarmed-expr (syntax body) annotate phase)))])] [_else diff --git a/collects/tests/errortrace/wrap.rkt b/collects/tests/errortrace/wrap.rkt new file mode 100644 index 00000000000..6bbc5fae7d9 --- /dev/null +++ b/collects/tests/errortrace/wrap.rkt @@ -0,0 +1,25 @@ +#lang racket/base + +(define err-stx #'(error '"bad")) + +(define (try expr) + (define out-str + (parameterize ([current-namespace (make-base-namespace)]) + (parameterize ([current-compile (dynamic-require 'errortrace/errortrace-lib + 'errortrace-compile-handler)] + [error-display-handler (dynamic-require 'errortrace/errortrace-lib + 'errortrace-error-display-handler)]) + (let ([o (open-output-string)]) + (parameterize ([current-error-port o]) + (call-with-continuation-prompt + (lambda () + (eval expr)))) + (get-output-string o))))) + (unless (regexp-match? (regexp-quote (format "~s" (syntax->datum err-stx))) + out-str) + (error 'test "not in context for: ~s" (syntax->datum expr)))) + +(try #`(begin (module m racket/base #,err-stx) (require 'm))) +(try err-stx) +(try #`(syntax-case 'a () + (_ #,err-stx))) From 4e5ac3c261cb48c260d6584e5b572bf0f96e0737 Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Fri, 15 Jul 2011 13:02:40 -0600 Subject: [PATCH 265/441] typo (cherry picked from commit 9e0a86696935d39b9efcd7fb512ce66c43246a89) --- collects/scribblings/raco/exe-api.scrbl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collects/scribblings/raco/exe-api.scrbl b/collects/scribblings/raco/exe-api.scrbl index 4d66b1b7755..4fb80755d5b 100644 --- a/collects/scribblings/raco/exe-api.scrbl +++ b/collects/scribblings/raco/exe-api.scrbl @@ -159,7 +159,7 @@ below. When a module declares run-time paths via path (for use both by immediate execution and for creating a distribution that contains the executable). -If @racket[collects-dest] is a path insteda of @racket[#f], then +If @racket[collects-dest] is a path instead of @racket[#f], then instead of embedding collection-based modules into the executable, the modules (in compiled form, only) are copied into collections in the @racket[collects-dest] directory. From f4bb576511de02c8d3c2878123eae01ff9d8f17d Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sat, 16 Jul 2011 06:27:38 -0600 Subject: [PATCH 266/441] limit build parallelism to 4 on a 32-bit machine Merge to 5.1.2 (cherry picked from commit e57b7b9e54b1081d94c41913735d01a72e281aa0) --- collects/setup/option-unit.rkt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/collects/setup/option-unit.rkt b/collects/setup/option-unit.rkt index 88650880e0d..30c5d6c468f 100644 --- a/collects/setup/option-unit.rkt +++ b/collects/setup/option-unit.rkt @@ -27,7 +27,10 @@ (define setup-program-name (make-parameter "raco setup")) - (define-flag-param parallel-workers (min (processor-count) 8)) + (define-flag-param parallel-workers (min (processor-count) + (if (fixnum? (arithmetic-shift 1 40)) + 8 ; 64-bit machine + 4))) ; 32-bit machine (define-flag-param verbose #f) (define-flag-param make-verbose #f) (define-flag-param compiler-verbose #f) From b560fc83aaffd9088a7df67b1e90a3b43d668862 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sat, 16 Jul 2011 07:51:59 -0600 Subject: [PATCH 267/441] fix taint behavior of some syntax operations `syntax-local-get-shadower' and `syntax-make-delta-introducer' both taint their results when a given syntax object is tainted (cherry picked from commit 4307bcace5070a777b48855caec389133eaffdaf) --- .../scribblings/reference/stx-trans.scrbl | 9 +++++- collects/tests/racket/stx.rktl | 31 +++++++++++++++++++ src/racket/src/env.c | 7 +++++ src/racket/src/syntax.c | 14 +++++++-- 4 files changed, 57 insertions(+), 4 deletions(-) diff --git a/collects/scribblings/reference/stx-trans.scrbl b/collects/scribblings/reference/stx-trans.scrbl index 71204547346..4d0c387ea7a 100644 --- a/collects/scribblings/reference/stx-trans.scrbl +++ b/collects/scribblings/reference/stx-trans.scrbl @@ -623,6 +623,9 @@ Thus, the result is an identifier corresponding to the innermost shadowing of @racket[id-stx] in the current context if it is shadowed, and a module-contextless version of @racket[id-stx] otherwise. +If @racket[id-stx] is @tech{tainted} or @tech{armed}, then the +resulting identifier is @tech{tainted}. + @transform-time[]} @@ -699,7 +702,11 @@ instance of @racket[_orig-id], so that it captures uses with the same lexical context as the use of @racket[_m-id]. More typically, however, @racket[syntax-local-make-delta-introducer] -should be used, since it cooperates with @tech{rename transformers}.} +should be used, since it cooperates with @tech{rename transformers}. + +If @racket[ext-stx] is @tech{tainted} or @tech{armed}, then an +identifier result from the created procedure is @tech{tainted}.} + @defproc[(syntax-local-make-delta-introducer [id identifier?]) (identifier? . -> . identifier?)]{ diff --git a/collects/tests/racket/stx.rktl b/collects/tests/racket/stx.rktl index 70b593f3172..d6d10758de6 100644 --- a/collects/tests/racket/stx.rktl +++ b/collects/tests/racket/stx.rktl @@ -1526,6 +1526,37 @@ (test #t syntax-tainted? (syntax-touch (round-trip (syntax-arm (quote-syntax foo))))) (test #t syntax-tainted? (round-trip (syntax-touch (syntax-arm (quote-syntax foo)))))) +;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Check that attacks are thwarted via `syntax-local-get-shadower' +;; or `make-syntax-delta-introducer': + +(module secret-value-42 racket + (define secret 42) + (define-syntax-rule (m) (even? secret)) + (provide m)) +(require 'secret-value-42) + +(define-syntax (evil-via-shadower stx) + (syntax-case stx () + [(_ e) + (let* ([ee (local-expand #'e 'expression null)] + [id (with-syntax ([(app f x) ee]) #'f)] + [okid (syntax-local-get-shadower id)]) + #`(let ([#,okid values]) + #,ee))])) + +(define-syntax (evil-via-delta-introducer stx) + (syntax-case stx () + [(_ e) + (let* ([ee (local-expand #'e 'expression null)] + [id (with-syntax ([(app f x) ee]) #'f)] + [okid ((make-syntax-delta-introducer id #'e) #'even?)]) + #`(let ([#,okid values]) + #,ee))])) + +(syntax-test #'(evil-via-shadower (m))) +(syntax-test #'(evil-via-delta-introducer (m))) + ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (report-errs) diff --git a/src/racket/src/env.c b/src/racket/src/env.c index 2787e824d6a..0273f4959df 100644 --- a/src/racket/src/env.c +++ b/src/racket/src/env.c @@ -2088,6 +2088,10 @@ local_get_shadower(int argc, Scheme_Object *argv[]) sym = scheme_stx_strip_module_context(sym); /* Add current module context, if any */ sym = local_module_introduce(1, &sym); + + if (!scheme_stx_is_clean(orig_sym)) + sym = scheme_stx_taint(sym); + return sym; } @@ -2102,6 +2106,9 @@ local_get_shadower(int argc, Scheme_Object *argv[]) result = scheme_add_rename(result, rn); + if (!scheme_stx_is_clean(orig_sym)) + result = scheme_stx_taint(result); + return result; } } diff --git a/src/racket/src/syntax.c b/src/racket/src/syntax.c index c37049d23cf..08f673025b0 100644 --- a/src/racket/src/syntax.c +++ b/src/racket/src/syntax.c @@ -7970,7 +7970,7 @@ Scheme_Object *scheme_transfer_srcloc(Scheme_Object *to, Scheme_Object *from) static Scheme_Object *delta_introducer(int argc, struct Scheme_Object *argv[], Scheme_Object *p) { - Scheme_Object *r, *delta; + Scheme_Object *r, *delta, *taint_p; r = argv[0]; @@ -7978,11 +7978,15 @@ static Scheme_Object *delta_introducer(int argc, struct Scheme_Object *argv[], S scheme_wrong_type("delta-introducer", "syntax", 0, argc, argv); delta = SCHEME_PRIM_CLOSURE_ELS(p)[0]; + taint_p = SCHEME_PRIM_CLOSURE_ELS(p)[1]; for(; !SCHEME_NULLP(delta); delta = SCHEME_CDR(delta)) { r = scheme_add_remove_mark(r, SCHEME_CAR(delta)); } + if (SCHEME_TRUEP(taint_p)) + r = scheme_stx_taint(r); + return r; } @@ -8018,7 +8022,7 @@ static Scheme_Object *extract_phase(const char *who, int pos, int argc, Scheme_O Scheme_Object *scheme_syntax_make_transfer_intro(int argc, Scheme_Object **argv) { - Scheme_Object *orig_m1, *m1, *m2, *delta, *a[1]; + Scheme_Object *orig_m1, *m1, *m2, *delta, *a[2]; int l1, l2; Scheme_Object *phase; @@ -8091,8 +8095,12 @@ Scheme_Object *scheme_syntax_make_transfer_intro(int argc, Scheme_Object **argv) } a[0] = delta; + if (scheme_stx_is_clean(argv[0])) + a[1] = scheme_false; + else + a[2] = scheme_true; - return scheme_make_prim_closure_w_arity(delta_introducer, 1, a, "delta-introducer", 1, 1); + return scheme_make_prim_closure_w_arity(delta_introducer, 2, a, "delta-introducer", 1, 1); } static Scheme_Object *bound_eq(int argc, Scheme_Object **argv) From af3db4d9fe021d67b84edc758fd1e8dbed7e7409 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sat, 16 Jul 2011 14:16:49 -0600 Subject: [PATCH 268/441] change GDK_POINTER_MOTION_HINT_MASK back to GDK_POINTER_MOTION_MASK because HINT doesn't works as expected, and the problem it seemed to solve at one time (slow resize in DrRacket) seems to have been fixed some other way. GDK_MOUSE_MOTION_MASK isn't needed, since GDK_POINTER_MOTION_MASK covers it. Merge to 5.1.2 (cherry picked from commit 5edc0c70afc1e2aeada096f0eb50c92c0f9d8b65) --- collects/mred/private/wx/gtk/canvas.rkt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/collects/mred/private/wx/gtk/canvas.rkt b/collects/mred/private/wx/gtk/canvas.rkt index 5f73c3153b7..052725277e6 100644 --- a/collects/mred/private/wx/gtk/canvas.rkt +++ b/collects/mred/private/wx/gtk/canvas.rkt @@ -391,8 +391,7 @@ GDK_KEY_RELEASE_MASK GDK_BUTTON_PRESS_MASK GDK_BUTTON_RELEASE_MASK - GDK_POINTER_MOTION_HINT_MASK - GDK_BUTTON_MOTION_MASK + GDK_POINTER_MOTION_MASK GDK_FOCUS_CHANGE_MASK GDK_ENTER_NOTIFY_MASK GDK_LEAVE_NOTIFY_MASK)) From 34b3045b9bd4110123189320500817fb07f9ce25 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sat, 16 Jul 2011 14:18:08 -0600 Subject: [PATCH 269/441] fix SGC Merge to 5.1.2 (cherry picked from commit 3f0914080bf4a48b241ffe05b70e098dfed3f01c) --- src/racket/sgc/sgc.c | 6 ++++-- src/racket/sgc/sgc.h | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/racket/sgc/sgc.c b/src/racket/sgc/sgc.c index 888f71dd4ba..e29e7166e05 100644 --- a/src/racket/sgc/sgc.c +++ b/src/racket/sgc/sgc.c @@ -2108,9 +2108,11 @@ void GC_dump(void) FPRINTF(STDERR, "End Map\n"); } -intptr_t GC_get_memory_use() +long GC_get_memory_use() { - return mem_real_use; + /* returns a `long' instead of `intptr_t' for compatibility + with the Boehm GC */ + return (long)mem_real_use; } void GC_end_stubborn_change(void *p) diff --git a/src/racket/sgc/sgc.h b/src/racket/sgc/sgc.h index 30e80014085..a68844e80ca 100644 --- a/src/racket/sgc/sgc.h +++ b/src/racket/sgc/sgc.h @@ -34,7 +34,7 @@ SGC_EXTERN void *GC_base(void *); SGC_EXTERN void GC_dump(void); -SGC_EXTERN intptr_t GC_get_memory_use(); +SGC_EXTERN long GC_get_memory_use(); SGC_EXTERN void GC_end_stubborn_change(void *); From 9e3ee9e2f840148bbded9bb51f846ab19a996095 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sat, 16 Jul 2011 19:27:11 -0600 Subject: [PATCH 270/441] fix cm to configure reader when reading .dep files Merge to 5.1.2 (cherry picked from commit 7af5d490ad3acfe0488f7550e533956303591ce4) --- collects/compiler/cm.rkt | 23 ++++++++++++++--------- collects/syntax/modread.rkt | 20 ++------------------ collects/syntax/private/modread.rkt | 20 ++++++++++++++++++++ 3 files changed, 36 insertions(+), 27 deletions(-) create mode 100644 collects/syntax/private/modread.rkt diff --git a/collects/compiler/cm.rkt b/collects/compiler/cm.rkt index d1f6f615a0d..53e44a32fa7 100644 --- a/collects/compiler/cm.rkt +++ b/collects/compiler/cm.rkt @@ -7,7 +7,8 @@ scheme/list scheme/path racket/promise - openssl/sha1) + openssl/sha1 + syntax/private/modread) (provide make-compilation-manager-load/use-compiled-handler managed-compile-zo @@ -465,11 +466,13 @@ -inf.0)) (define (try-file-sha1 path dep-path) - (with-handlers ([exn:fail:filesystem? (lambda (exn) #f)]) - (string-append - (call-with-input-file* path sha1) - (with-handlers ([exn:fail:filesystem? (lambda (exn) "")]) - (call-with-input-file* dep-path (lambda (p) (cdadr (read p)))))))) + (with-module-reading-parameterization + (lambda () + (with-handlers ([exn:fail:filesystem? (lambda (exn) #f)]) + (string-append + (call-with-input-file* path sha1) + (with-handlers ([exn:fail:filesystem? (lambda (exn) "")]) + (call-with-input-file* dep-path (lambda (p) (cdadr (read p)))))))))) (define (get-compiled-sha1 mode path) (define-values (dir name) (get-compilation-dir+name mode path)) @@ -492,9 +495,11 @@ (define orig-path (simple-form-path path0)) (define (read-deps path) (with-handlers ([exn:fail:filesystem? (lambda (ex) (list (version) '#f))]) - (call-with-input-file - (path-add-suffix (get-compilation-path mode path) #".dep") - read))) + (with-module-reading-parameterization + (lambda () + (call-with-input-file + (path-add-suffix (get-compilation-path mode path) #".dep") + read))))) (define (do-check) (let* ([main-path orig-path] [alt-path (rkt->ss orig-path)] diff --git a/collects/syntax/modread.rkt b/collects/syntax/modread.rkt index 2a29d7bf902..9c95c6a9a75 100644 --- a/collects/syntax/modread.rkt +++ b/collects/syntax/modread.rkt @@ -1,27 +1,11 @@ (module modread mzscheme - (require racket/contract) + (require racket/contract + "private/modread.rkt") (provide with-module-reading-parameterization) (provide/contract [check-module-form ((or/c syntax? eof-object?) symbol? (or/c string? path? false/c) . -> . any)]) - (define (with-module-reading-parameterization thunk) - (parameterize ([read-case-sensitive #t] - [read-square-bracket-as-paren #t] - [read-curly-brace-as-paren #t] - [read-accept-box #t] - [read-accept-compiled #t] - [read-accept-bar-quote #t] - [read-accept-graph #t] - [read-decimal-as-inexact #t] - [read-accept-dot #t] - [read-accept-infix-dot #t] - [read-accept-quasiquote #t] - [read-accept-reader #t] - [read-accept-lang #t] - [current-readtable #f]) - (thunk))) - (define (raise-wrong-module-name filename expected-name name) (error 'load-handler "expected a `module' declaration for `~a' in ~s, found: ~a" diff --git a/collects/syntax/private/modread.rkt b/collects/syntax/private/modread.rkt new file mode 100644 index 00000000000..749c1d3f662 --- /dev/null +++ b/collects/syntax/private/modread.rkt @@ -0,0 +1,20 @@ +#lang racket/base + +(provide with-module-reading-parameterization) + +(define (with-module-reading-parameterization thunk) + (parameterize ([read-case-sensitive #t] + [read-square-bracket-as-paren #t] + [read-curly-brace-as-paren #t] + [read-accept-box #t] + [read-accept-compiled #t] + [read-accept-bar-quote #t] + [read-accept-graph #t] + [read-decimal-as-inexact #t] + [read-accept-dot #t] + [read-accept-infix-dot #t] + [read-accept-quasiquote #t] + [read-accept-reader #t] + [read-accept-lang #t] + [current-readtable #f]) + (thunk))) From ed4185cae9c35914b0d8304a2938a4b7035ef315 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sat, 16 Jul 2011 19:28:30 -0600 Subject: [PATCH 271/441] don't compile test file with image constant (cherry picked from commit bd10ccc1b7e3ea56d0fb80268b52e26638f575f8) --- collects/tests/drracket/info.rkt | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 collects/tests/drracket/info.rkt diff --git a/collects/tests/drracket/info.rkt b/collects/tests/drracket/info.rkt new file mode 100644 index 00000000000..7317c84abd4 --- /dev/null +++ b/collects/tests/drracket/info.rkt @@ -0,0 +1,5 @@ +#lang setup/infotab + +(define compile-omit-paths + '("image-and-comment-box.rkt")) + From bc46623ecae1d05bc77c612d252ac67bfe68a81f Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sat, 16 Jul 2011 20:15:15 -0600 Subject: [PATCH 272/441] restore deinprogramm reader module suffix (cherry picked from commit fc914dfac8a3768653816e03ae767d509797ffb4) --- collects/deinprogramm/deinprogramm-langs.rkt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/collects/deinprogramm/deinprogramm-langs.rkt b/collects/deinprogramm/deinprogramm-langs.rkt index 20f243d2eee..08935ec5cbe 100644 --- a/collects/deinprogramm/deinprogramm-langs.rkt +++ b/collects/deinprogramm/deinprogramm-langs.rkt @@ -1379,7 +1379,7 @@ (sharing-printing #f) (abbreviate-cons-as-list #t) (allow-sharing? #f) - (reader-module '(lib "DMdA-beginner-reader.rkt" "deinprogramm")) + (reader-module '(lib "DMdA-beginner-reader.ss" "deinprogramm")) (stepper:supported #t))) (add-deinprogramm-language @@ -1394,7 +1394,7 @@ (sharing-printing #f) (abbreviate-cons-as-list #t) (allow-sharing? #f) - (reader-module '(lib "DMdA-vanilla-reader.rkt" "deinprogramm")) + (reader-module '(lib "DMdA-vanilla-reader.ss" "deinprogramm")) (stepper:supported #t))) (add-deinprogramm-language @@ -1409,7 +1409,7 @@ (sharing-printing #t) (abbreviate-cons-as-list #t) (allow-sharing? #t) - (reader-module '(lib "DMdA-assignments-reader.rkt" "deinprogramm")) + (reader-module '(lib "DMdA-assignments-reader.ss" "deinprogramm")) (stepper:supported #f) (debugger:supported #t))) @@ -1425,6 +1425,6 @@ (sharing-printing #t) (abbreviate-cons-as-list #t) (allow-sharing? #t) - (reader-module '(lib "DMdA-advanced-reader.rkt" "deinprogramm")) + (reader-module '(lib "DMdA-advanced-reader.ss" "deinprogramm")) (stepper:supported #f) (debugger:supported #t)))))) From 5a5430f91e166a011259e36aa39ec3adddc94abf Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sat, 16 Jul 2011 21:01:45 -0600 Subject: [PATCH 273/441] revert unnecessary refactoring --- intended to avoid creating a dependency that already exists Merge 5.1.2 (cherry picked from commit ab0e78122c7c80992da73a60ae89ea4512b02494) --- collects/compiler/cm.rkt | 4 ++-- collects/syntax/modread.rkt | 20 ++++++++++++++++++-- collects/syntax/private/modread.rkt | 20 -------------------- 3 files changed, 20 insertions(+), 24 deletions(-) delete mode 100644 collects/syntax/private/modread.rkt diff --git a/collects/compiler/cm.rkt b/collects/compiler/cm.rkt index 53e44a32fa7..c507351762b 100644 --- a/collects/compiler/cm.rkt +++ b/collects/compiler/cm.rkt @@ -1,14 +1,14 @@ #lang scheme/base (require syntax/modcode syntax/modresolve + syntax/modread setup/main-collects unstable/file scheme/file scheme/list scheme/path racket/promise - openssl/sha1 - syntax/private/modread) + openssl/sha1) (provide make-compilation-manager-load/use-compiled-handler managed-compile-zo diff --git a/collects/syntax/modread.rkt b/collects/syntax/modread.rkt index 9c95c6a9a75..2a29d7bf902 100644 --- a/collects/syntax/modread.rkt +++ b/collects/syntax/modread.rkt @@ -1,11 +1,27 @@ (module modread mzscheme - (require racket/contract - "private/modread.rkt") + (require racket/contract) (provide with-module-reading-parameterization) (provide/contract [check-module-form ((or/c syntax? eof-object?) symbol? (or/c string? path? false/c) . -> . any)]) + (define (with-module-reading-parameterization thunk) + (parameterize ([read-case-sensitive #t] + [read-square-bracket-as-paren #t] + [read-curly-brace-as-paren #t] + [read-accept-box #t] + [read-accept-compiled #t] + [read-accept-bar-quote #t] + [read-accept-graph #t] + [read-decimal-as-inexact #t] + [read-accept-dot #t] + [read-accept-infix-dot #t] + [read-accept-quasiquote #t] + [read-accept-reader #t] + [read-accept-lang #t] + [current-readtable #f]) + (thunk))) + (define (raise-wrong-module-name filename expected-name name) (error 'load-handler "expected a `module' declaration for `~a' in ~s, found: ~a" diff --git a/collects/syntax/private/modread.rkt b/collects/syntax/private/modread.rkt deleted file mode 100644 index 749c1d3f662..00000000000 --- a/collects/syntax/private/modread.rkt +++ /dev/null @@ -1,20 +0,0 @@ -#lang racket/base - -(provide with-module-reading-parameterization) - -(define (with-module-reading-parameterization thunk) - (parameterize ([read-case-sensitive #t] - [read-square-bracket-as-paren #t] - [read-curly-brace-as-paren #t] - [read-accept-box #t] - [read-accept-compiled #t] - [read-accept-bar-quote #t] - [read-accept-graph #t] - [read-decimal-as-inexact #t] - [read-accept-dot #t] - [read-accept-infix-dot #t] - [read-accept-quasiquote #t] - [read-accept-reader #t] - [read-accept-lang #t] - [current-readtable #f]) - (thunk))) From 4af675677d4246107d5c518cffe14f86859568db Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sat, 16 Jul 2011 21:12:22 -0600 Subject: [PATCH 274/441] fix printing of namespace with places enabled This commit goes with 62acb298bdc79e. (cherry picked from commit 701c9666d6091aa55aac0587b0d4240d13044569) --- collects/tests/racket/module.rktl | 17 +++++++++++++++++ src/racket/src/print.c | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/collects/tests/racket/module.rktl b/collects/tests/racket/module.rktl index bc9602488a2..feb9b2f2b44 100644 --- a/collects/tests/racket/module.rktl +++ b/collects/tests/racket/module.rktl @@ -501,6 +501,23 @@ (let ([n-ns (eval '(module->namespace ''n) ns)]) (test 5 eval '(lambda (x) x) n-ns))))) +;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Check printing of resolved module paths + +(let ([s (open-output-string)]) + (print (make-resolved-module-path (build-path (current-directory) "a.rkt")) s) + (test #t regexp-match? #rx"namespace 'scheme/base) s) + (test #t regexp-match? #rx"namespace ''n) s) + (test #t regexp-match? #rx"module->modname; - is_sym = SCHEME_SYMBOLP(SCHEME_PTR_VAL(modname)); + is_sym = !SCHEME_PATHP(SCHEME_PTR_VAL(modname)); print_utf8_string(pp, (is_sym ? "'" : "\""), 0, 1); print(SCHEME_PTR_VAL(modname), 0, 0, ht, mt, pp); PRINTADDRESS(pp, modname); From 253ba1376bb85e3ebcd0725f711aa7a91325c76f Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sat, 16 Jul 2011 21:25:56 -0600 Subject: [PATCH 275/441] belated test case for cm ".dep"-read fix Merge to 5.1.2 (cherry picked from commit 67272f114b3ff33277397dc790197568b5abf416) --- collects/tests/racket/cm.rktl | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/collects/tests/racket/cm.rktl b/collects/tests/racket/cm.rktl index 5d118799e35..036c985649b 100644 --- a/collects/tests/racket/cm.rktl +++ b/collects/tests/racket/cm.rktl @@ -138,6 +138,14 @@ (delete-directory/files dir) +;; ---------------------------------------- +;; Check that cm sets reader for .dep files: + +(parameterize ([current-readtable (make-readtable #f #\( 'terminating-macro void)]) + (parameterize ([current-namespace (make-base-namespace)]) + (parameterize ([current-load/use-compiled (make-compilation-manager-load/use-compiled-handler)]) + (test (void) dynamic-require 'compiler/cm #f)))) + ;; ---------------------------------------- (report-errs) From 70fdc4ef90662217a3c34c1b83585ab545ae1dd9 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sat, 16 Jul 2011 21:40:14 -0600 Subject: [PATCH 276/441] fix source name of built-in modules Closes PR 12051 Merge to 5.1.2 (cherry picked from commit 92671ab3ea7803e1f0c906e86272c960bdf52ddd) --- collects/tests/racket/module.rktl | 8 ++++++++ src/racket/src/module.c | 2 ++ 2 files changed, 10 insertions(+) diff --git a/collects/tests/racket/module.rktl b/collects/tests/racket/module.rktl index feb9b2f2b44..f17c36a7bde 100644 --- a/collects/tests/racket/module.rktl +++ b/collects/tests/racket/module.rktl @@ -518,6 +518,14 @@ (print (module->namespace ''n) s) (test #t regexp-match? #rx"namespace ''#%network)]) + (test '#%network + variable-reference->module-source + (eval (datum->syntax #'here '(#%variable-reference))))) + ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (report-errs) diff --git a/src/racket/src/module.c b/src/racket/src/module.c index c3a345e11c4..a47702b8f25 100644 --- a/src/racket/src/module.c +++ b/src/racket/src/module.c @@ -4766,6 +4766,8 @@ Scheme_Env *scheme_primitive_module(Scheme_Object *name, Scheme_Env *for_env) src = prefix; else src = scheme_intern_resolved_module_path(src); + if (SCHEME_FALSEP(src)) + src = name; insp = scheme_get_param(config, MZCONFIG_CODE_INSPECTOR); } else { From f8c4f23b5cf13809c59a39a8c9c8eb41177c2ea7 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Tue, 19 Jul 2011 11:27:51 -0400 Subject: [PATCH 277/441] Manually constructed patch from Robby: fixes the executable problem. --- collects/lang/htdp-langs.rkt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/collects/lang/htdp-langs.rkt b/collects/lang/htdp-langs.rkt index 8bf2d11c0aa..44ee9bdac26 100644 --- a/collects/lang/htdp-langs.rkt +++ b/collects/lang/htdp-langs.rkt @@ -475,16 +475,18 @@ ;; Extract snip-related modules: (let-values ([(snip-class-names data-class-names) (extract-used-classes port)]) + (define names (append snip-class-names data-class-names)) (list* '(lib "wxme/read.ss") '(lib "mred/mred.ss") reader-module (filter values - (map (λ (x) (string->lib-path x #t)) - (append - snip-class-names - data-class-names))))) + (append + (map (λ (x) (string->lib-path x #t)) + names) + (map (λ (x) (string->lib-path x #f)) + names))))) ;; Extract reader-related modules: (begin (file-position port 0) From 34530173f951083583b2909638f7dec0607f53bc Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sun, 17 Jul 2011 07:51:12 -0600 Subject: [PATCH 278/441] fix `enter!' to set module source name Merge to 5.1.2 (cherry picked from commit 67936b7a66f088f9d49aff3e7e1052b1b7bc99de) --- collects/racket/enter.rkt | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/collects/racket/enter.rkt b/collects/racket/enter.rkt index 79169a5ba0e..5efcb187f25 100644 --- a/collects/racket/enter.rkt +++ b/collects/racket/enter.rkt @@ -74,24 +74,30 @@ [path (path->complete-path path dir)] [path (normal-case-path (simplify-path path))]) ;; Record module timestamp and dependencies: + (define-values (ts actual-path) (get-timestamp path)) (let ([a-mod (mod name - (get-timestamp path) + ts (if code (append-map cdr (module-compiled-imports code)) null))]) (hash-set! loaded path a-mod)) ;; Evaluate the module: - (eval code)) + (parameterize ([current-module-declare-source actual-path]) + (eval code))) ;; Not a module: (begin (notify path) (orig path name))))) (define (get-timestamp path) - (file-or-directory-modify-seconds path #f - (lambda () - (if (regexp-match? #rx#"[.]rkt$" (path->bytes path)) - (file-or-directory-modify-seconds - (path-replace-suffix path #".ss") #f (lambda () -inf.0)) - -inf.0)))) + (let ([ts (file-or-directory-modify-seconds path #f (lambda () #f))]) + (if ts + (values ts path) + (if (regexp-match? #rx#"[.]rkt$" (path->bytes path)) + (let* ([alt-path (path-replace-suffix path #".ss")] + [ts (file-or-directory-modify-seconds alt-path #f (lambda () #f))]) + (if ts + (values ts alt-path) + (values -inf.0 path))) + (values -inf.0 path))))) (define (check-latest mod flags) (define mpi (module-path-index-join mod #f)) @@ -106,11 +112,12 @@ (define mod (hash-ref loaded npath #f)) (when mod (for-each loop (mod-depends mod)) - (define ts (get-timestamp npath)) + (define-values (ts actual-path) (get-timestamp npath)) (when (ts . > . (mod-timestamp mod)) (define orig (current-load/use-compiled)) (parameterize ([current-load/use-compiled (enter-load/use-compiled orig #f flags)] - [current-module-declare-name rpath]) + [current-module-declare-name rpath] + [current-module-declare-source actual-path]) ((enter-load/use-compiled orig #t flags) npath (mod-name mod))))))))) From df42ae7cb7e3d7ff019197ee0be87b5df8d44891 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sun, 17 Jul 2011 08:05:34 -0600 Subject: [PATCH 279/441] fix `get-module-path' and associated exception Closes PR 12029 (cherry picked from commit d8d762517f0a6f283527c15499be5ac08be080cf) --- collects/syntax/modcode.rkt | 6 ++---- collects/syntax/scribblings/modcode.scrbl | 6 +++--- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/collects/syntax/modcode.rkt b/collects/syntax/modcode.rkt index cae33f1117c..a722bceaeef 100644 --- a/collects/syntax/modcode.rkt +++ b/collects/syntax/modcode.rkt @@ -10,7 +10,7 @@ make-exn:get-module-code) (provide/contract - [get-module-code (->* ((or/c path? module-path?)) + [get-module-code (->* (path?) (#:sub-path (and/c path-string? relative-path?) (and/c path-string? relative-path?) @@ -74,7 +74,7 @@ v)))) (lambda () (close-input-port p))))) - (define-struct (exn:get-module-code exn) (path)) + (define-struct (exn:get-module-code exn:fail) (path)) (define (get-module-code path #:sub-path [sub-path0 "compiled"] @@ -85,8 +85,6 @@ #:notify [notify void] #:source-reader [read-src-syntax read-syntax] #:rkt-try-ss? [rkt-try-ss? #t]) - (unless (path-string? path) - (raise-type-error 'get-module-code "path or string (sans nul)" path)) (let*-values ([(orig-path) (resolve path)] [(base orig-file dir?) (split-path path)] [(main-file alt-file) diff --git a/collects/syntax/scribblings/modcode.scrbl b/collects/syntax/scribblings/modcode.scrbl index 55e8a50c1f5..68692e4fb72 100644 --- a/collects/syntax/scribblings/modcode.scrbl +++ b/collects/syntax/scribblings/modcode.scrbl @@ -5,7 +5,7 @@ @defmodule[syntax/modcode] -@defproc[(get-module-code [module-path-v module-path?] +@defproc[(get-module-code [path path?] [#:sub-path compiled-subdir0 (and/c path-string? relative-path?) "compiled"] [compiled-subdir (and/c path-string? relative-path?) compiled-subdir0] [#:compile compile-proc0 (any/c . -> . any) compile] @@ -24,7 +24,7 @@ any]{ Returns a compiled expression for the declaration of the module -specified by @racket[module-path-v]. +specified by @racket[path]. The @racket[compiled-subdir] argument defaults to @racket["compiled"]; it specifies the sub-directory to search for a compiled version of the @@ -74,7 +74,7 @@ A parameter whose value is used like @racket[open-input-file] to read a module source or @filepath{.zo} file.} -@defstruct[(exn:get-module-code exn) ([path path?])]{ +@defstruct[(exn:get-module-code exn:fail) ([path path?])]{ An exception structure type for exceptions raised by @racket[get-module-code].} From d8c7bd138ff07d6a2f6d07095cd7f0908a403135 Mon Sep 17 00:00:00 2001 From: Guillaume Marceau Date: Sun, 17 Jul 2011 16:48:12 -0400 Subject: [PATCH 280/441] Undoes the 'produces -> return' part of commit c31d352f, keeping the 'changes -> mutates' change and the assorted bug fixes it contained. (cherry picked from commit adf965e92ab90b6480f3fadef62d954d790a02cf) --- collects/2htdp/batch-io.rkt | 2 +- collects/2htdp/private/clauses-spec-and-process.rkt | 2 +- collects/2htdp/private/launch-many-worlds.rkt | 2 +- collects/2htdp/private/world.rkt | 4 ++-- collects/2htdp/tests/test-image.rkt | 2 +- collects/2htdp/universe.rkt | 4 ++-- collects/htdp/convert.rkt | 2 +- collects/htdp/error-composition.scrbl | 4 ++-- collects/htdp/hangman.rkt | 2 +- collects/htdp/htdp-lib.scrbl | 2 +- collects/htdp/tests/convert.rkt | 6 +++--- collects/lang/private/advanced-funs.rkt | 6 +++--- collects/lang/private/beginner-funs.rkt | 12 ++++++------ collects/lang/private/intermediate-funs.rkt | 4 ++-- collects/lang/private/teachprims.rkt | 4 ++-- collects/scribblings/htdp-langs/advanced.scrbl | 6 +++--- collects/tests/htdp-lang/intm-adv.rktl | 2 +- 17 files changed, 33 insertions(+), 33 deletions(-) diff --git a/collects/2htdp/batch-io.rkt b/collects/2htdp/batch-io.rkt index 4684b6218cf..c44a1ff5ca9 100644 --- a/collects/2htdp/batch-io.rkt +++ b/collects/2htdp/batch-io.rkt @@ -41,7 +41,7 @@ write-file ;; String String -> String ;; (write-file filename str) writes str to filename; - ;; returns the file name as a confirmation that the write succeeded + ;; produces the file name as a confirmation that the write succeeded ) ;; ----------------------------------------------------------------------------- diff --git a/collects/2htdp/private/clauses-spec-and-process.rkt b/collects/2htdp/private/clauses-spec-and-process.rkt index df541abd530..569ed216d3a 100644 --- a/collects/2htdp/private/clauses-spec-and-process.rkt +++ b/collects/2htdp/private/clauses-spec-and-process.rkt @@ -91,7 +91,7 @@ (if r ((third s) r) (fourth s))) Spec)) -;; check whether rec? occurs, returns list of keyword x clause pairs +;; check whether rec? occurs, produces list of keyword x clause pairs (define (clauses-use-kwd stx:list ->rec? tag kwds) (define kwd-in? (->kwds-in kwds)) (map (lambda (stx) diff --git a/collects/2htdp/private/launch-many-worlds.rkt b/collects/2htdp/private/launch-many-worlds.rkt index 3aabcce6a67..7049734e6de 100644 --- a/collects/2htdp/private/launch-many-worlds.rkt +++ b/collects/2htdp/private/launch-many-worlds.rkt @@ -6,7 +6,7 @@ launch-many-worlds ;; (launch-many-worlds e1 ... e2) ;; run expressions e1 through e2 in parallel, - ;; return all values + ;; produce all values ) (define-syntax-rule diff --git a/collects/2htdp/private/world.rkt b/collects/2htdp/private/world.rkt index c3114308961..a84b9f27c49 100644 --- a/collects/2htdp/private/world.rkt +++ b/collects/2htdp/private/world.rkt @@ -129,7 +129,7 @@ (height (if (pair? to-draw) (third to-draw) #f))) ;; the visible world - (field [enable-images-button void] ;; used if stop-when call returns #t + (field [enable-images-button void] ;; used if stop-when call produces #t [disable-images-button void] [visible (new pasteboard%)]) @@ -338,7 +338,7 @@ (show (ppdraw))) ;; -> Scene - ;; return the scene for the this state + ;; produce the scene for the this state (define/public (ppdraw) (check-scene-result (name-of draw 'your-draw) (draw (send world get)))) diff --git a/collects/2htdp/tests/test-image.rkt b/collects/2htdp/tests/test-image.rkt index c074c2623b9..083dd16fe26 100644 --- a/collects/2htdp/tests/test-image.rkt +++ b/collects/2htdp/tests/test-image.rkt @@ -1380,7 +1380,7 @@ => 128) -;; Rotation by 0 should return an equivalent object +;; Rotation by 0 should produce an equivalent object (test (rotate 0 (make-object image-snip% green-blue-20x10-bitmap)) => (to-img (make-object image-snip% green-blue-20x10-bitmap))) diff --git a/collects/2htdp/universe.rkt b/collects/2htdp/universe.rkt index c28e444a8bb..7d382c7049c 100644 --- a/collects/2htdp/universe.rkt +++ b/collects/2htdp/universe.rkt @@ -35,7 +35,7 @@ (provide launch-many-worlds ;; (launch-many-worlds e1 ... e2) - ;; run expressions e1 through e2 in parallel, return all values in same order + ;; run expressions e1 through e2 in parallel, produce all values in same order ) (provide-primitive @@ -123,7 +123,7 @@ ;; ****************************************************************** DEFAULT #'(lambda (u w) (make-bundle u '() '())) ;; this is the wrong default function - ;; instead of K there should be a function that returns a bundle + ;; instead of K there should be a function that produces a bundle (function-with-arity 2) ;; ****************************************************************** ] diff --git a/collects/htdp/convert.rkt b/collects/htdp/convert.rkt index 9e994bb8311..89319d6462b 100644 --- a/collects/htdp/convert.rkt +++ b/collects/htdp/convert.rkt @@ -91,7 +91,7 @@ ;; ------------------------------------------------------------------------ (define OUT-ERROR - "The conversion function must return a number, but it returned ~e") + "The conversion function must produce a number; but it produced ~e") ;; ============================================================================ ;; MODEL diff --git a/collects/htdp/error-composition.scrbl b/collects/htdp/error-composition.scrbl index 67b39533f49..ec9c3ac272c 100755 --- a/collects/htdp/error-composition.scrbl +++ b/collects/htdp/error-composition.scrbl @@ -89,7 +89,7 @@ Use the following vocabulary words to describe how code runs: @itemize[ @item{When specifying a function's behavior, say @samp{the function - takes ... and returns ...}} + takes ... and produces ...}} @item{When describing a contract violation, say @samp{the function expects ... but received ...}} @@ -98,7 +98,7 @@ Use the following vocabulary words to describe how code runs: to, e.g. @samp{the value of @racket[(f x)] is 5}. If it is necessary to mention evaluation order, such as when the context discusses mutable state, say that the expression @samp{evaluates to} a value. Function calls - are a special case of expression. Prefer @samp{the function call returns ...} + are a special case of expression. Prefer @samp{the function call produces ...} to @samp{the function call evaluates to ...}, except when trying to draw attention to the evaluation of the arguments.} diff --git a/collects/htdp/hangman.rkt b/collects/htdp/hangman.rkt index 9b58179a083..ed5501c46b2 100644 --- a/collects/htdp/hangman.rkt +++ b/collects/htdp/hangman.rkt @@ -114,7 +114,7 @@ (define message-panel #f) ;; setup-gui : str ->* message% panel% -;; to return a status message and a panel where winning/losing can be announced +;; to produce a status message and a panel where winning/losing can be announced ;; effect: set up a new frame, arrange the GUI, and display (blank) status word (define (setup-gui status) (local (#| -------------------------------------------------------------- diff --git a/collects/htdp/htdp-lib.scrbl b/collects/htdp/htdp-lib.scrbl index 90e3eb390c5..5e0ba89eb3a 100755 --- a/collects/htdp/htdp-lib.scrbl +++ b/collects/htdp/htdp-lib.scrbl @@ -157,7 +157,7 @@ they can be syntactically restricted to application positions. @defform[(first-order->higher-order expression)]{ If @racket[expression] is the name of a first-order function (either a -primitive or a function defined within Beginner Student), returns the +primitive or a function defined within Beginner Student), produces the function as a value; otherwise, the form is equivalent to @racket[expression]. diff --git a/collects/htdp/tests/convert.rkt b/collects/htdp/tests/convert.rkt index 9ff964b3367..e13cc06c5a9 100644 --- a/collects/htdp/tests/convert.rkt +++ b/collects/htdp/tests/convert.rkt @@ -35,13 +35,13 @@ (convert-file IN f2c OUT) (with-input-from-file OUT check-convert-out) -(check-error (convert-file IN list OUT) "convert: The conversion function must return a number; but it returned (212)") +(check-error (convert-file IN list OUT) "convert: The conversion function must produce a number; but it produced (212)") (check-error (convert-file IN first OUT) "first: expected argument of type ; given 212") -(check-error (convert-file IN fx OUT) "convert: The conversion function must return a number; but it returned xyz") +(check-error (convert-file IN fx OUT) "convert: The conversion function must produce a number; but it produced xyz") -(check-error (convert-file IN f2c 10) "convert-file: expected as third argument, given: 10") +(check-error (convert-file IN f2c 10) "convert-file: expects a string as third argument, given 10") ;; ---------------------------------------------------------------------------- ;; convert by repl: diff --git a/collects/lang/private/advanced-funs.rkt b/collects/lang/private/advanced-funs.rkt index 42c59cf9c7a..a64e3157c01 100644 --- a/collects/lang/private/advanced-funs.rkt +++ b/collects/lang/private/advanced-funs.rkt @@ -31,7 +31,7 @@ (with-input-from-string (string (-> any) -> any) "Turns the given string into input for read* operations.") (with-output-to-string (string (-> any) -> any) - "Returns a string from all write/display/print operations.") + "Produces a string from all write/display/print operations.") (print (any -> void) @@ -63,7 +63,7 @@ (assoc (any (listof any) -> (listof any) or false) - "Returns the first element on the list whose first is equal? to v; otherwise it returns false.")) + "Produces the first element on the list whose first is equal? to v; otherwise it produces false.")) ("Misc" (gensym (-> symbol?) @@ -75,7 +75,7 @@ (force (delay -> any) "Finds the delayed value; see also delay.") (promise? (any -> boolean) "Determines if a value is delayed.") - (void (-> void) "Returns a void value.") + (void (-> void) "Produces a void value.") (void? (any -> boolean) "Determines if a value is void.")) ("Posns" diff --git a/collects/lang/private/beginner-funs.rkt b/collects/lang/private/beginner-funs.rkt index 67a0c933519..27dc2860df3 100644 --- a/collects/lang/private/beginner-funs.rkt +++ b/collects/lang/private/beginner-funs.rkt @@ -290,13 +290,13 @@ "Evaluates the number of items on a list.") (memq (any (listof any) -> (union false list)) "Determines whether some value is on some list" - " if so, it returns the suffix of the list that starts with x" - " if not, it returns false." + " if so, it produces the suffix of the list that starts with x" + " if not, it produces false." " (It compares values with the eq? predicate.)") (memv (any (listof any) -> (union false list)) "Determines whether some value is on the list" - " if so, it returns the suffix of the list that starts with x" - " if not, it returns false." + " if so, it produces the suffix of the list that starts with x" + " if not, it produces false." " (It compares values with the eqv? predicate.)") ((beginner-member? member?) (any (listof any) -> boolean) "Determines whether some value is on the list" @@ -405,7 +405,7 @@ (string (char ... -> string) "Builds a string of the given characters.") (make-string (nat char -> string) - "Returns a string of given length" + "Produces a string of given length" " from a single given character.") (string-ref (string nat -> char) "Extracts the i-the character from a string.") @@ -455,7 +455,7 @@ "Converts a string into a symbol.") (string->number (string -> (union number false)) "Converts a string into a number," - " return false if impossible.") + " produce false if impossible.") (string->list (string -> (listof char)) "Converts a string into a list of characters.") (list->string ((listof char) -> string) diff --git a/collects/lang/private/intermediate-funs.rkt b/collects/lang/private/intermediate-funs.rkt index 67e73b3d989..30edcf6a068 100644 --- a/collects/lang/private/intermediate-funs.rkt +++ b/collects/lang/private/intermediate-funs.rkt @@ -52,10 +52,10 @@ "Finds the (first) element of the list that maximizes the output of the function.") (memf ((X -> any) (listof X) -> (union false (listof X))) - "Determines whether the function fiven as the first argument returns a non-false value for any item in the second argument.") + "Produces true if the function given as the first argument produces a non-false value for any item in the second argument.") (apply ((X-1 ... X-N -> Y) X-1 ... X-i (list X-i+1 ... X-N) -> Y) "Applies a function using items from a list as the arguments.") (compose ((Y-1 -> Z) ... (Y-N -> Y-N-1) (X-1 ... X-N -> Y-N) -> (X-1 ... X-N -> Z)) "Composes a sequence of procedures into a single procedure.") (procedure? (any -> boolean) - "Determines if a value is a procedure.")))) + "Produces true if the value is a procedure.")))) diff --git a/collects/lang/private/teachprims.rkt b/collects/lang/private/teachprims.rkt index a3145367f16..039251ae925 100644 --- a/collects/lang/private/teachprims.rkt +++ b/collects/lang/private/teachprims.rkt @@ -352,8 +352,8 @@ namespace. (define r (f i)) (unless (char? r) (hocheck 'build-string - "the second argument must be a function that returns a character, ~ - given ~e, which returned ~e when given ~e" f r i)) + "the second argument must be a function that produces a character, ~ + given ~e, which produced ~e when given ~e" f r i)) r)))) diff --git a/collects/scribblings/htdp-langs/advanced.scrbl b/collects/scribblings/htdp-langs/advanced.scrbl index 3ae6901d293..9970fbb6625 100644 --- a/collects/scribblings/htdp-langs/advanced.scrbl +++ b/collects/scribblings/htdp-langs/advanced.scrbl @@ -163,10 +163,10 @@ by @racket[define], @racket[letrec], @racket[let*], or @racket[let].} @defform[(delay expression)]{ -Returns a ``promise'' to evaluate @racket[expression]. The @racket[expression] +Produces a ``promise'' to evaluate @racket[expression]. The @racket[expression] is not evaluated until the promise is forced with @racket[force]; when the promise is forced, the result is recorded, so that any further -@racket[force] of the promise immediately returns the remembered value.} +@racket[force] of the promise immediately produces the remembered value.} @@ -263,7 +263,7 @@ error.} @defform[(unless test-expression body-expression)]{ Like @racket[when], but the @racket[body-expression] is evaluated when the -@racket[test-expression] evaluates to @racket[false] instead of @racket[true].} +@racket[test-expression] produces @racket[false] instead of @racket[true].} @section[#:tag "advanced-common-syntax"]{Common Syntaxes} diff --git a/collects/tests/htdp-lang/intm-adv.rktl b/collects/tests/htdp-lang/intm-adv.rktl index 841d5818b76..c032984b980 100644 --- a/collects/tests/htdp-lang/intm-adv.rktl +++ b/collects/tests/htdp-lang/intm-adv.rktl @@ -106,7 +106,7 @@ "foldl : first argument must be a function that expects two arguments, given #") (htdp-err/rt-test (build-string 2 add1) - "build-string : the second argument must be a function that returns a character, given #, which returned 1 when given 0") + "build-string : the second argument must be a function that produces a character, given #, which produced 1 when given 0") (htdp-test 0 '+ (+)) (htdp-test 1 '+ (+ 1)) From 4b13d543968fcf2bdf6f76d7c34bd6aa2dddc739 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sun, 17 Jul 2011 20:07:46 -0600 Subject: [PATCH 281/441] fix "block cache" layer to handle allocation failure (cherry picked from commit 5efe7001d656388a86c498b6a5aa45d0f6de106c) --- src/racket/gc2/block_cache.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/racket/gc2/block_cache.c b/src/racket/gc2/block_cache.c index b36494ce297..de973d7b592 100644 --- a/src/racket/gc2/block_cache.c +++ b/src/racket/gc2/block_cache.c @@ -85,13 +85,22 @@ static ssize_t block_cache_free(BlockCache* bc) { static block_desc *bc_alloc_std_block(block_group *bg) { int this_block_size = bg->block_size; void *r = os_alloc_pages(this_block_size); - void *ps = align_up_ptr(r, APAGE_SIZE); + block_desc *bd; + void *ps; + + if (!r) return NULL; + + ps = align_up_ptr(r, APAGE_SIZE); if (this_block_size < BC_MAX_BLOCK_SIZE) { bg->block_size <<= 1; } - block_desc *bd = (block_desc*) ofm_malloc(sizeof(block_desc)); + bd = (block_desc*) ofm_malloc(sizeof(block_desc)); + if (!bd) { + os_free_pages(r, this_block_size); + return NULL; + } bd->block = r; bd->free = ps; bd->size = this_block_size; @@ -151,8 +160,10 @@ static void *bc_alloc_std_page(BlockCache *bc, int dirty_ok, int expect_mprotect } } else { + block_desc *bd; newbl = 1; - block_desc *bd = bc_alloc_std_block(bg); + bd = bc_alloc_std_block(bg); + if (!bd) return NULL; gclist_add(free_head, &(bd->gclist)); (*size_diff) += bd->size; /* printf("ALLOC BLOCK %i %p %p-%p size %li %p\n", expect_mprotect, bg, bd->block, bd->block + bd->size, bd->size, bd->free); */ From d5045184c91f74067ad370b39250f2785f565da3 Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Sun, 17 Jul 2011 19:32:43 -0500 Subject: [PATCH 282/441] fix missing argument to format please merge to release branch (cherry picked from commit 2b99c863211b9093ef0307c590268e61ff380826) --- collects/racket/private/class-internal.rkt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collects/racket/private/class-internal.rkt b/collects/racket/private/class-internal.rkt index 239d11374c4..d466b4ce0ac 100644 --- a/collects/racket/private/class-internal.rkt +++ b/collects/racket/private/class-internal.rkt @@ -2576,7 +2576,7 @@ (fail "no public method ~a" m))) (for ([m (class/c-absents ctc)]) (when (hash-ref method-ht m #f) - (fail "class already contains public method ~a"))) + (fail "class already contains public method ~a" m))) (for ([m (class/c-inherits ctc)]) (unless (hash-ref method-ht m #f) (fail "no public method ~a" m))) From 71ea3183ba5cb39df3a87f13378cf1400e4bc094 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Fri, 15 Jul 2011 18:21:33 -0400 Subject: [PATCH 283/441] Rename `prompt-shown' -> `zero-column!', and use it only in the non-readline reader. Use line reading for ,install!. (Cherry-picked from 3f8bb7a, and edited conflucts because `port-set-next-location!' is not added to the release.) --- collects/xrepl/xrepl.rkt | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/collects/xrepl/xrepl.rkt b/collects/xrepl/xrepl.rkt index 33f631b6221..4e619ed757d 100644 --- a/collects/xrepl/xrepl.rkt +++ b/collects/xrepl/xrepl.rkt @@ -96,7 +96,11 @@ (let-values ([(line col pos) (port-next-location last-output-port)]) (unless (eq? col (if (eq? line last-output-line) last-output-visual-col 0)) (newline)))) -(define (prompt-shown) +(define (zero-column!) + ;; there's a problem whenever there's some printout followed by a read: the + ;; cursor will at column zero, but the port counting will think that it's + ;; still right after the printout; call this function in such cases to adjust + ;; the column to 0. (maybe-new-output-port) ;; if there was a way to change the location of stdout we'd set the column to ;; 0 here... @@ -1021,6 +1025,7 @@ (define expr "(require xrepl)") (define dexpr "(dynamic-require 'xrepl #f)") (define contents (file->string init-file)) + (read-line) ; discard the newline for further input (define (look-for comment-rx expr) (let ([m (regexp-match-positions (format "(?<=\r?\n|^) *;+ *~a *\r?\n *~a *(?=\r?\n|$)" @@ -1030,9 +1035,7 @@ (define existing? (look-for (regexp-quote comment) expr)) (define existing-readline? (look-for "load readline support[^\r\n]*" "(require readline/rep)")) - (define (yes?) - (flush-output) - (begin0 (regexp-match? #rx"^[yY]" (getarg 'string)) (prompt-shown))) + (define (yes?) (flush-output) (regexp-match? #rx"^[yY]" (getarg 'line))) (cond [existing? (printf "; already installed, nothing to do\n") @@ -1187,7 +1190,7 @@ (provide make-command-reader) (define (make-command-reader) (define (plain-reader prefix) ; a plain reader, without readline - (display prefix) (display "> ") (flush-output) + (display prefix) (display "> ") (flush-output) (zero-column!) (let ([in ((current-get-interaction-input-port))]) ((current-read-interaction) (object-name in) in))) (define RL ; no direct dependency on readline @@ -1233,7 +1236,7 @@ (define input (if from-queue? (begin0 (car more-inputs) (set! more-inputs (cdr more-inputs))) - (begin (fresh-line) (begin0 (reader (get-prefix)) (prompt-shown))))) + (begin (fresh-line) (reader (get-prefix))))) (syntax-case input () [(uq cmd) (eq? 'unquote (syntax-e #'uq)) (let ([r (run-command (syntax->datum #'cmd))]) From c1a82bf23e8d6657e962af74ae313fb7a8bb217e Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Sat, 16 Jul 2011 01:22:19 -0400 Subject: [PATCH 284/441] Use (banner) instead of a fixed "Welcome to Racket" in the More tutorial and in the guide. Also, add a tag to the readline "License Issues" to be able to link to it from the xrepl docs. (cherry picked from commit 45394bb7b6b35af7151a691631b3984a386a531f) --- collects/readline/readline.scrbl | 2 +- collects/scribblings/guide/running.scrbl | 2 +- collects/scribblings/more/more.scrbl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/collects/readline/readline.scrbl b/collects/readline/readline.scrbl index f61731bc898..ba836d00f69 100644 --- a/collects/readline/readline.scrbl +++ b/collects/readline/readline.scrbl @@ -241,7 +241,7 @@ from @racketmodname[ffi/unsafe], determines the type of value supplied to the @racket[proc].} -@section{License Issues} +@section[#:tag "readline-license"]{License Issues} GNU's @|readline| library is covered by the GPL, and that applies to code that links with it. Racket is licensed with the LGPL, so the diff --git a/collects/scribblings/guide/running.scrbl b/collects/scribblings/guide/running.scrbl index e2b8985c576..081e8b446a4 100644 --- a/collects/scribblings/guide/running.scrbl +++ b/collects/scribblings/guide/running.scrbl @@ -34,7 +34,7 @@ confguration options, like @Flag{j}), then it starts a @tech{REPL} with a @litchar{> } prompt: @verbatim[#:indent 2]{ - Welcome to Racket + @(regexp-replace #rx"\n+$" (banner) "") > } diff --git a/collects/scribblings/more/more.scrbl b/collects/scribblings/more/more.scrbl index 52ed6fccec7..ce9df39e193 100644 --- a/collects/scribblings/more/more.scrbl +++ b/collects/scribblings/more/more.scrbl @@ -75,7 +75,7 @@ start @exec{racket} with no command-line arguments: @verbatim[#:indent 2]{ $ racket - Welcome to Racket + @(regexp-replace #rx"\n+$" (banner) "") > } From e0a96d3e7e6794efbb469eca11019ff62b467b3e Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Mon, 18 Jul 2011 12:30:11 -0400 Subject: [PATCH 285/441] Typo in the `errortrace' language description. (cherry picked from commit 50b74c453ff4b78c8d84d0d6912d6b3ca2ec6848) --- collects/errortrace/scribblings/errortrace.scrbl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collects/errortrace/scribblings/errortrace.scrbl b/collects/errortrace/scribblings/errortrace.scrbl index 3b3d9d590c9..a09da34c808 100644 --- a/collects/errortrace/scribblings/errortrace.scrbl +++ b/collects/errortrace/scribblings/errortrace.scrbl @@ -100,7 +100,7 @@ top-level. The functions also can be accessed by importing handlers. As a language name, @racketmodname[errortrace] chains to another -language that is specified immediately after @racketmodname[at-exp], +language that is specified immediately after @racketmodname[errortrace], but instruments the module for debugging in the same way as if @racketmodname[errortrace] is required before loading the module from source. Using the @racketmodname[errortrace] meta-language is one way From 8d0db4cd35a86a0b629a37736a0571704c2752f2 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Mon, 18 Jul 2011 13:33:09 -0400 Subject: [PATCH 286/441] Lots of improvements: * Rename `make-command-{reader,evaluator}' -> `make-xrepl-{reader,evaluator}' * Move the commented-out ,meta block to a better place * Protect the prompt computation against errors, to avoid infinite exception output if an exception is raised. * Add ",switch ?" to query namespaces, and ",switch - " to remove one. Forbid resetting the default initial `*' namespace. * Clarify that multiple arguments can be sent to ,stx and fix it to display the current syntax when there are no arguments. * Various minor typos and improvements. * Restore the use-last-arguments-by-default functionality of ,rr * Re-do argument reading to make it easier to have a default argument (as in ,enter and ,edit). (cherry picked from commit c57ab7b4fcb8952114b2991d732a087ca6412a64) --- collects/xrepl/main.rkt | 4 +- collects/xrepl/xrepl.rkt | 288 ++++++++++++++++++++++++--------------- 2 files changed, 177 insertions(+), 115 deletions(-) diff --git a/collects/xrepl/main.rkt b/collects/xrepl/main.rkt index d4a285c32be..3a70c4f70f9 100644 --- a/collects/xrepl/main.rkt +++ b/collects/xrepl/main.rkt @@ -9,5 +9,5 @@ ;; (compile-enforce-module-constants #f) ;; create the command repl reader, and value-saving evaluator -(current-prompt-read (make-command-reader)) -(current-eval (make-command-evaluator (current-eval))) +(current-prompt-read (make-xrepl-reader)) +(current-eval (make-xrepl-evaluator (current-eval))) diff --git a/collects/xrepl/xrepl.rkt b/collects/xrepl/xrepl.rkt index 4e619ed757d..935a0eabe79 100644 --- a/collects/xrepl/xrepl.rkt +++ b/collects/xrepl/xrepl.rkt @@ -16,6 +16,8 @@ ;; ---------------------------------------------------------------------------- ;; utilities +(define home-dir (find-system-path 'home-dir)) + ;; autoloads: avoid loading a ton of stuff to minimize startup penalty (define autoloaded-specs (make-hasheq)) (define (autoloaded? sym) (hash-ref autoloaded-specs sym #f)) @@ -161,20 +163,35 @@ (let ([ch (peek-char)]) (if (memq ch skip) (begin (read-char) (loop)) ch))))) -(define (getarg kind [flag 'req]) +(define (here-path) + (let ([x (here-source)]) (if (path? x) x eof))) +(define (here-mod-or-eof) + (let ([x (here-source)]) + (if (not x) + eof + (datum->syntax #f + (cond [(symbol? x) (and (module-name? x) `',x)] + [(path? x) (let ([s (path->string x)]) + (if (absolute-path? x) `(file ,s) s))] + [else (error 'here-mod-or-eof "internal error: ~s" x)]))))) + +(define (getarg kind [flag 'req] #:default [dflt #f]) (define (argerror fmt . args) (apply cmderror #:default-who 'getarg fmt args)) (define (missing) (argerror "missing ~a argument" kind)) (define (get read) - (let loop ([flag flag]) - (case flag - [(req) (let ([x (if (eq? #\newline (skip-spaces/peek)) eof (read))]) - (if (eof-object? x) (missing) x))] - [(opt) (and (not (eq? #\newline (skip-spaces/peek))) (loop 'req))] - [(list) (let ([x (loop 'opt)]) - (if x (cons x (loop 'list)) '()))] - [(list+) (cons (loop 'req) (loop 'list))] - [else (error 'getarg "unknown flag: ~e" flag)]))) + (define 1st (if (eq? #\newline (skip-spaces/peek)) eof (read))) + (define 1st? (not (eof-object? 1st))) + (define (dflt*) (let ([r (dflt)]) (if (eof-object? r) (missing) r))) + (case flag + [(req opt) (cond [1st? 1st] [dflt (dflt*)] + [(eq? 'opt flag) #f] [else (missing)])] + [(list list+) + (define (more) + (if (eq? #\newline (skip-spaces/peek)) '() (cons (read) (more)))) + (cond [1st? (cons 1st (more))] [dflt (list (dflt*))] + [(eq? 'list flag) '()] [else (missing)])] + [else (error 'getarg "unknown flag: ~e" flag)])) (define (read-string-arg) (define ch (skip-spaces/peek " \t\r\n")) (let* ([i (current-input-port)] @@ -203,18 +220,12 @@ (and arg (if (memq flag '(list list+)) (map convert arg) (convert arg)))) (let loop ([kind kind]) (case kind - [(line) (get read-line-arg)] - [(string) (get read-string-arg)] - [(path) (translate (loop 'string) expand-user-path)] - [(path*) (if (eq? flag 'list) - (let ([args (getarg 'path 'list)]) - (if (pair? args) - args - (let ([x (here-source)]) (if (path? x) (list x) '())))) - (error 'getarg "'path* must always be used with 'list"))] - [(sexpr) (get read)] - [(syntax) (translate (get read-syntax) namespace-syntax-introduce)] - [(modspec) (translate (loop 'syntax) process-modspec)] + [(line) (get read-line-arg)] + [(string) (get read-string-arg)] + [(path) (translate (loop 'string) expand-user-path)] + [(sexpr) (get read)] + [(syntax) (translate (get read-syntax) namespace-syntax-introduce)] + [(modspec) (translate (loop 'syntax) process-modspec)] [else (error 'getarg "unknown arg kind: ~e" kind)]))) (define (run-command cmd) @@ -276,14 +287,14 @@ ["Sets `current-directory'; expands user paths. With no arguments, goes" "to your home directory. An argument of `-' indicates the previous" "directory."] - (let* ([arg (or (getarg 'path 'opt) (find-system-path 'home-dir))] + (let* ([arg (or (getarg 'path 'opt) home-dir)] [arg (if (equal? arg (string->path "-")) (cdr (last-2dirs)) arg)]) (if (directory-exists? arg) (begin (current-directory arg) (report-directory-change 'cd)) (eprintf "cd: no such directory: ~a\n" arg)))) (defcommand pwd #f - "read the current directory" + "display the current directory" ["Displays the value of `current-directory'."] (report-directory-change 'pwd)) @@ -319,13 +330,14 @@ (string-append "$EDITOR ("env") not found in your path") "no $EDITOR variable")) (run-command 'drracket)] - [(not (apply system* exe (getarg 'path* 'list))) + [(not (apply system* exe (getarg 'path 'list #:default here-path))) (eprintf "(exit with an error status)\n")] [else (void)])) (define ->running-dr #f) (define (->dr . xs) (unless ->running-dr (start-dr)) (->running-dr xs)) (define (start-dr) + (printf "; starting DrRacket...\n") (define c (make-custodian)) (define ns ((dynamic-require 'racket/gui 'make-gui-namespace))) (parameterize ([current-custodian c] @@ -441,7 +453,7 @@ "* -quit: exits the running instance. Quitting the application as usual" " will only close the visible window, but it will still run in a hidden" " window. This command should not be needed under normal circumstances."] - (let ([args (getarg 'path* 'list)]) + (let ([args (getarg 'path 'list #:default here-path)]) (if (null? args) (->dr 'new) (let* ([cmd (let ([s (path->string (car args))]) @@ -455,7 +467,7 @@ (defcommand (apropos ap) " ..." "look for a binding" - ["Additional string arguments restrict matches shown. The search specs can" + ["Additional arguments restrict the shown matches. The search specs can" "have symbols (which specify what to look for in bound names), and regexps" "(for more complicated matches)."] (let* ([look (map (λ (s) (cond [(symbol? s) @@ -619,16 +631,20 @@ (define rr-modules (make-hash)) ; hash to remember reloadable modules -(defcommand (require-reloadable reqr rr) " ...+" +(define last-rr-specs '()) + +(defcommand (require-reloadable reqr rr) " ..." "require a module, make it reloadable" ["Same as ,require but the module is required in a way that makes it" "possible to reload later. If it was already loaded then it is reloaded." "Note that this is done by setting `compile-enforce-module-constants' to" "#f, which prohibits some optimizations."] + (let ([s (getarg 'modspec 'list)]) (when (pair? s) (set! last-rr-specs s))) + (when (null? last-rr-specs) (cmderror "missing modspec arguments")) (parameterize ([compile-enforce-module-constants (compile-enforce-module-constants)]) (compile-enforce-module-constants #f) - (for ([spec (in-list (getarg 'modspec 'list+))]) + (for ([spec (in-list last-rr-specs)]) (define datum (syntax->datum spec)) (define resolved ((current-module-name-resolver) datum #f #f #f)) (define path (resolved-module-path-name resolved)) @@ -645,14 +661,17 @@ (define enter!-id (make-lazy-identifier 'enter! 'racket/enter)) -(defcommand (enter en) "[] [noisy?]" +(defcommand (enter en) "[] [noisy?]" "require a module and go into its namespace" - ["Uses `enter!' to go into the module's namespace; the module name is" - "optional, without it you go back to the toplevel. A module name can" - "specify an existing file as with the ,require command. (Note that this" + ["Uses `enter!' to go into the module's namespace. A module name can" + "specify an existing file as with the ,require command. If no module is" + "given, and the REPL is already in some module's namespace, then `enter!'" + "is used with that module, causing it to reload if needed. (Note that this" "can be used even in languages that don't have the `enter!' binding.)"] - (eval-sexpr-for-user `(,(enter!-id) ,(getarg 'modspec) - #:dont-re-require-enter))) + (eval-sexpr-for-user `(,(enter!-id) + ,(getarg 'modspec #:default here-mod-or-eof) + ,@(getarg 'syntax 'list) + #:dont-re-require-enter))) (defcommand (toplevel top) #f "go back to the toplevel" @@ -661,7 +680,7 @@ (defcommand (load ld) " ..." "load a file" - ["Uses `load' to load the specified file(s)"] + ["Uses `load' to load the specified file(s)."] (more-inputs* (map (λ (name) #`(load #,name)) (getarg 'path 'list)))) ;; ---------------------------------------------------------------------------- @@ -684,9 +703,9 @@ "little easier to read information. You can provide an initial number" "that specifies how many times to run the expression -- in this case," "the expression will be executed that many times, extreme results are" - "be removed (top and bottom 2/7ths), and the remaining results will" - "be averaged. Two garbage collections are triggered before each run;" - "the resulting value(s) are from the last run."] + "removed (top and bottom 2/7ths), and the remaining results will be" + "averaged. Two garbage collections are triggered before each run; the" + "resulting value(s) are from the last run."] (more-inputs #`(#,(time-id) #,@(getarg 'syntax 'list)))) (define trace-id (make-lazy-identifier 'trace 'racket/trace)) @@ -759,7 +778,7 @@ " * : show profiling results by time" " # : show profiling results by counts" " ! : clear profiling results" - " Multiple commands can be combined, for example \",prof *!-\" will show" + " Multiple flags can be combined, for example \",prof *!-\" will show" " profiler results, clear them, and turn it off." "* With no arguments, turns the errortrace profiler on if it's off, and if" " it's on it shows the collected results and clears them." @@ -844,7 +863,7 @@ [t (make-hasheq)]) (hash-set! t (current-namespace-name) (cons (current-namespace) r)) t)) -(defcommand (switch-namespace switch) "[] [! []]" +(defcommand (switch-namespace switch) "[] [? | - | ! []]" "switch to a different repl namespace" ["Switch to the namespace, creating it if needed. The of a" "namespace is a symbol or an integer where a `*' indicates the initial one;" @@ -854,7 +873,9 @@ "that was used for the current namespace. If `! ' is used, it" "indicates that a new namespace will be created even if it exists, using" "`' as the initial module, and if just `!' is used, then this happens" - "with the existing namespace's init or with the current one's." + "with the existing namespace's init or with the current one's. You can" + "also use `-' and a name to drop the corresponding namespace (allowing it" + "to be garbage-collected), and `?' to list all known namespaces." "A few examples:" " ,switch ! reset the current namespace" " ,switch ! racket reset it using the `racket' language" @@ -863,53 +884,85 @@ " ,switch foo ! racket switch to newly made `foo', even if it exists" " ,switch foo ! same, but using the same as it was created" " with, or same as the current if it's new" + " ,switch ? list known namespaces, showing the above two" + " ,switch - r5rs drop the `r5rs' namespace" "(Note that you can use `^' etc to communicate values between namespaces.)"] - (define-values (name force-reset? init) - (match (getarg 'sexpr 'list) - [(list '!) (values #f #t #f )] - [(list '! init) (values #f #t init)] - [(list name) (values name #f #f )] - [(list name '!) (values name #t #f )] - [(list name '! init) (values name #t init)] - [(list) (cmderror "what do you want to do?")] - [_ (cmderror "syntax error, see ,help switch-namespace")])) - (unless (or (not name) (symbol? name) (fixnum? name)) - (cmderror "bad namespace name, must be symbol or fixnum")) - (define old-namespace (current-namespace)) - (define (is-require-able? name) - (with-handlers ([void (λ (_) #f)]) - ;; name is not a string => no need to set the current directory - (file-exists? (modspec->path name)))) - ;; if there's an , then it must be forced - (let* ([name (or name (current-namespace-name))] - [init - (cond [init] - [(or force-reset? (not (hash-ref namespaces name #f))) - (cdr (or (hash-ref namespaces name #f) - (and (is-require-able? name) (cons #f name)) - (hash-ref namespaces (current-namespace-name) #f) - ;; just in case - (hash-ref namespaces default-namespace-name #f)))] - [else #f])]) - (when init - (printf "*** ~a `~s' namespace with ~s ***\n" - (if (hash-ref namespaces name #f) - "Resetting the" "Initializing a new") - name - (->relname init)) - (current-namespace (make-base-empty-namespace)) - (namespace-require init) - (hash-set! namespaces name (cons (current-namespace) init)))) - (when (and name (not (eq? name (current-namespace-name)))) - (printf "*** switching to the `~s' namespace ***\n" name) - (let ([x (hash-ref namespaces (current-namespace-name))]) - (unless (eq? (car x) old-namespace) - (printf "*** (note: saving current namespace for `~s')\n" - (current-namespace-name)) - (hash-set! namespaces (current-namespace-name) - (cons old-namespace (cdr x))))) - (current-namespace-name name) - (current-namespace (car (hash-ref namespaces name))))) + (define (list-namespaces) + (printf "; namespaces and their languages:\n") + (define nss (sort (map (λ (x) (cons (format "~s" (car x)) (cddr x))) + (hash-map namespaces cons)) + string no need to set the current directory + (file-exists? (modspec->path name)))) + ;; if there's an , then it must be forced + (let* ([name (or name (current-namespace-name))] + [init + (cond [init] + [(or force-reset? (not (hash-ref namespaces name #f))) + (when (eq? name default-namespace-name) + ;; no deep reason for this, but might be usful to keep it + ;; possible to ,en xrepl/xrepl to change options etc + (cmderror "cannot reset the default namespace")) + (cdr (or (hash-ref namespaces name #f) + (and (is-require-able? name) (cons #f name)) + (hash-ref namespaces (current-namespace-name) #f) + ;; just in case + (hash-ref namespaces default-namespace-name #f)))] + [else #f])]) + (when init + (printf "; *** ~a `~s' namespace with ~s ***\n" + (if (hash-ref namespaces name #f) + "Resetting the" "Initializing a new") + name + (->relname init)) + (current-namespace (make-base-empty-namespace)) + (namespace-require init) + (hash-set! namespaces name (cons (current-namespace) init)))) + (when (and name (not (eq? name (current-namespace-name)))) + (printf "; *** switching to the `~s' namespace ***\n" name) + (let ([x (hash-ref namespaces (current-namespace-name))]) + (unless (eq? (car x) old-namespace) + (printf "; (note: saving current namespace for `~s')\n" + (current-namespace-name)) + (hash-set! namespaces (current-namespace-name) + (cons old-namespace (cdr x))))) + (current-namespace-name name) + (current-namespace (car (hash-ref namespaces name))))) + (define (syntax-error) + (cmderror "syntax error, see ,help switch-namespace")) + (match (getarg 'sexpr 'list) + [(list) (cmderror "what do you want to do?")] + [(list '?) (list-namespaces)] + [(list '? _ ...) (syntax-error)] + [(list '- name) (delete name)] + [(list '- _ ...) (syntax-error)] + [(list '!) (switch #f #t #f )] + [(list '! init) (switch #f #t init)] + [(list name) (switch name #f #f )] + [(list name '!) (switch name #t #f )] + [(list name '! init) (switch name #t init)] + [_ (syntax-error)])) ;; ---------------------------------------------------------------------------- ;; syntax commands @@ -931,13 +984,17 @@ ["With no arguments, will show the previously set (or expanded) syntax" "additional arguments serve as an operation to perform:" "- `^' sets the syntax from the last entered expression" + "- other sexprs set the current syntax explicitly" "- `+' will `expand-once' the syntax and show the result (can be used again" " for additional `expand-once' steps)" "- `!' will `expand' the syntax and show the result" "- `*' will use the syntax stepper to show expansion steps, leaving macros" " from racket/base intact (does not change the currently set syntax)" - "- `**' similar to `*', but expanding everything"] - (for ([stx (in-list (getarg 'syntax 'list))]) + "- `**' similar to `*', but expanding everything" + "Note that you can specify several syntaxes and operations in a single" + "invocation."] + (define args (getarg 'syntax 'list)) + (for ([stx (in-list (if (null? args) '(#f) args))]) (define (show/set label stx) (printf "~a\n" label) (current-syntax stx) @@ -957,23 +1014,6 @@ (begin (printf "syntax set\n") (current-syntax stx)) (cmderror "internal error: ~s ~s" stx (syntax? stx)))]))) -;; ---------------------------------------------------------------------------- -;; meta evaluation hook - -;; questionable value, (and need to display the resulting values etc) -#; -(defcommand meta "" - "meta evaluation" - ["Evaluate the given expression where bindings are taken from the xrepl" - "module. This is convenient when you're in a namespace that does not have" - "a specific binding -- for example, you might be using a language that" - "doesn't have `current-namespace', so to get it, you can use" - "`,eval (current-namespace)'. The evaluation happens in the repl namespace" - "as usual, only the bindings are taken from the xrepl module -- so you can" - "use `^' to refer to the result of such an evaluation."] - (eval (datum->syntax #'here `(#%top-interaction . ,(getarg 'sexpr)))) - (void)) - ;; ---------------------------------------------------------------------------- ;; dynamic log output control @@ -1011,6 +1051,23 @@ (flush-output)]) (loop)))))))) +;; ---------------------------------------------------------------------------- +;; meta evaluation hook + +;; questionable value, (and need to display the resulting values etc) +#; +(defcommand meta "" + "meta evaluation" + ["Evaluate the given expression where bindings are taken from the xrepl" + "module. This is convenient when you're in a namespace that does not have" + "a specific binding -- for example, you might be using a language that" + "doesn't have `current-namespace', so to get it, you can use" + "`,eval (current-namespace)'. The evaluation happens in the repl namespace" + "as usual, only the bindings are taken from the xrepl module -- so you can" + "use `^' to refer to the result of such an evaluation."] + (eval (datum->syntax #'here `(#%top-interaction . ,(getarg 'sexpr)))) + (void)) + ;; ---------------------------------------------------------------------------- ;; setup xrepl in the user's racketrc file @@ -1129,8 +1186,8 @@ (namespace-set-variable-value! id (void)))) (when res (save-values! res))))) -(provide make-command-evaluator) -(define (make-command-evaluator builtin-evaluator) +(provide make-xrepl-evaluator) +(define (make-xrepl-evaluator builtin-evaluator) (λ (expr) ;; not useful: catches only escape continuations ;; (with-handlers ([exn:break? (λ (e) (last-break-exn e) (raise e))]) ...) @@ -1141,7 +1198,6 @@ ;; ---------------------------------------------------------------------------- ;; capture ",..." and run the commands, use readline/rep when possible -(define home-dir (expand-user-path "~")) (define get-prefix ; to show before the "> " prompt (let () (define (choose-path x) @@ -1175,7 +1231,13 @@ (unless (and (equal? (current-namespace) last-namespace) (equal? curdir last-directory)) (report-directory-change) - (set! prefix (get-prefix)) + (set! prefix + (with-handlers + ([exn? (λ (e) + (eprintf "error during prompt calculation: ~a\n" + (exn-message e)) + "[internal-error]")]) + (get-prefix))) (set! last-namespace (current-namespace)) (set! last-directory curdir)) prefix))) @@ -1187,8 +1249,8 @@ #:constructor-name more-inputs* #:omit-define-syntaxes) (define (more-inputs . inputs) (more-inputs* inputs)) -(provide make-command-reader) -(define (make-command-reader) +(provide make-xrepl-reader) +(define (make-xrepl-reader) (define (plain-reader prefix) ; a plain reader, without readline (display prefix) (display "> ") (flush-output) (zero-column!) (let ([in ((current-get-interaction-input-port))]) From f8974781fef1cecfb3173491c3074ca60b4a1d3b Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Mon, 18 Jul 2011 13:43:31 -0400 Subject: [PATCH 287/441] XREPL documentation. (cherry picked from commit d7c14cbd3fd3efa675a29955fdfd912ba16c23ea) --- collects/xrepl/doc-utils.rkt | 80 ++++++ collects/xrepl/info.rkt | 2 + collects/xrepl/xrepl.scrbl | 484 +++++++++++++++++++++++++++++++++++ 3 files changed, 566 insertions(+) create mode 100644 collects/xrepl/doc-utils.rkt create mode 100644 collects/xrepl/xrepl.scrbl diff --git a/collects/xrepl/doc-utils.rkt b/collects/xrepl/doc-utils.rkt new file mode 100644 index 00000000000..fe15ecd3354 --- /dev/null +++ b/collects/xrepl/doc-utils.rkt @@ -0,0 +1,80 @@ +#lang racket/base + +(require scribble/manual scribble/core scribble/decode + racket/list racket/sandbox) + +(provide (all-from-out scribble/manual) + RL GUIDE cmd defcmd check-all-documented) + +(define RL '(lib "readline/readline.scrbl")) +(define GUIDE '(lib "scribblings/guide/guide.scrbl")) + +(define commands + (let ([c #f]) + (λ () + (unless c + (define e (call-with-trusted-sandbox-configuration + (λ () (make-evaluator 'racket/base)))) + (e '(require xrepl/xrepl)) + (e '(current-namespace (module->namespace 'xrepl/xrepl))) + (set! c (e '(for/list ([c (in-list commands-list)]) + (list (car (command-names c)) + (cdr (command-names c)) + (command-argline c) + (command-blurb c))))) + (kill-evaluator e)) + c))) +(define documented '()) + +(define (cmd* name0 . more) + (define name (if (symbol? name0) name0 (string->symbol name0))) + (define full-name + (or (and (assq name (commands)) name) + (for/or ([c (in-list (commands))]) (and (memq name (cadr c)) (car c))) + (error 'cmd "unknown command: ~s" name))) + (define content + (litchar (let ([s (format ",~a" name)]) + (if (pair? more) (apply string-append s " " more) s)))) + (link-element "plainlink" content `(xrepl ,(format "~a" full-name)))) + +(define-syntax-rule (cmd name more ...) (cmd* 'name more ...)) + +(define (cmd-index name) + (define namestr (format ",~a" name)) + (define tag `(xrepl ,(format "~a" name))) + (define content (cmd* name)) + (define ielem + (index-element #f content tag (list namestr) (list content) + 'xrepl-command)) + (toc-target-element #f (list ielem) tag)) + +(define (defcmd* name . text) + (set! documented (cons name documented)) + (define-values [other-names argline blurb] + (apply values (cond [(assq name (commands)) => cdr] + [else (error 'defcmd "unknown command: ~s" name)]))) + (define header + (list (cmd-index name) (litchar (string-append " " (or argline ""))))) + (define desc + (list (hspace 2) (make-element 'italic blurb))) + (define synonyms + (and (pair? other-names) + (list (hspace 2) + "[Synonyms: " + (add-between (map (λ (n) (litchar (format ",~a" n))) + other-names) + " ") + "]"))) + (splice + (list* (tabular #:style 'boxed `((,header) (,desc) + ,@(if synonyms `((,synonyms)) `()))) + "\n" "\n" text))) + +(define-syntax-rule (defcmd name text ...) (defcmd* 'name text ...)) + +(define (check-all-documented) + (unless (= (length documented) (length (remove-duplicates documented))) + (error 'xrepl-docs "some commands were documented multiple times")) + (let ([missing (remove* documented (map car (commands)))]) + (when (pair? missing) + (error 'xrepl-docs "missing command documentation: ~s" missing)))) diff --git a/collects/xrepl/info.rkt b/collects/xrepl/info.rkt index dd70b324f1a..96e8ea9a851 100644 --- a/collects/xrepl/info.rkt +++ b/collects/xrepl/info.rkt @@ -1,3 +1,5 @@ #lang setup/infotab (define name "eXtended REPL") + +(define scribblings '(("xrepl.scrbl" () (tool-library)))) diff --git a/collects/xrepl/xrepl.scrbl b/collects/xrepl/xrepl.scrbl new file mode 100644 index 00000000000..f934492caf4 --- /dev/null +++ b/collects/xrepl/xrepl.scrbl @@ -0,0 +1,484 @@ +#lang scribble/doc +@(require scribble/manual "doc-utils.rkt" + scribble/decode (only-in scribble/core) + (for-label racket readline racket/help racket/enter + racket/trace profile)) + +@title{XREPL: eXtended REPL} +@author+email["Eli Barzilay" "eli@barzilay.org"] + +@defmodule[xrepl]{ + The @filepath{xrepl} collection extends the @exec{racket} @tech[#:doc + GUIDE]{REPL} significantly, turning it into a more useful tool for + interactive exploration and development. This includes ``meta + commands'', using readline, keeping past evaluation results, and + more.} + +@; --------------------------------------------------------------------- +@section{Installing XREPL} + +To use XREPL, start @exec{racket} and enter @racket[(require xrepl)]. +You will know that it works when the prompt changes to a @litchar{->}, +and, if you're working on a capable terminal, you will now have readline +editing. You can also start @exec{racket} and ask for XREPL to be +loaded using command-line arguments: +@commandline{racket -il xrepl} + +If you want to enable XREPL automatically, add this expression to your +Racket initialization file. +@margin-note*{To load XREPL conditionally (e.g., not in older Racket + versions), you can use @racket[(dynamic-require 'xrepl #f)]. This + is a plain expression that can be placed inside @racket[when] and + elsewhere.} +An easy way to do the necessary editing is to enter @cmd[install!], +which will inspect and edit your initialization file (it will describe +the change and ask for your permission). Alternatively, you can edit +the file directly: on Unix, it is @filepath{~/.racketrc}, and for +other platforms evaluate @racket[(find-system-path 'init-file)] to see +where it is. + +XREPL will set up a readline-based reader, so you do not need to load +that yourself. If your initialization file was previously set to load +readline via @racket[install-readline!], the @cmd[install!] command +will (notify you and) remove it. If you added it yourself, consider +removing it. (This is not strictly needed, but XREPL is slightly +better at detecting when to use readline.) + +@; --------------------------------------------------------------------- +@section{Meta REPL Commands} + +Most of the XREPL extensions are implemented as meta commands. These +commands are entered at the REPL, prefixed by a @litchar{,} and followed +by the command name. Note that several commands correspond directly to +Racket functions (e.g., @cmd[exit]) --- but since they work outside of +your REPL, they can be used even if the matching bindings are not +available. + +@; --------------------------------- +@subsection{Generic Commands} + +@defcmd[help]{ + Without an argument, displays a list of all known commands. Specify a + command to get help specific to that command. +} + +@defcmd[exit]{ + Exits Racket, optionally with an error code (see @racket[exit]). +} + +@defcmd[cd]{ + Sets the @racket[current-directory] to the given path. If no path is + specified, use your home directory. Path arguments are passed through + @racket[expand-user-path] so you can use @litchar{~}. An argument of + @litchar{-} means ``the previous path''. +} + +@defcmd[pwd]{ + Reports the value of @racket[current-directory]. +} + +@defcmd[shell]{ + Use @cmd[shell] (or @cmd[sh]) to run a generic shell command (via + @racket[system]). For convenience, a few synonyms are provided --- + they run the specified executables (still using @racket[system]). +} + +@defcmd[edit]{ + Runs an editor, as specified by your @envvar{EDITOR} environment + variable, with the given file/s arguments. If no files are specified + and the REPL is currently inside a module's namespace, then the file + for that module is used. If the @envvar{EDITOR} environment variable + is not set, use the @cmd[drracket] command instead. +} + +@defcmd[drracket]{ + Runs DrRacket with the specified file/s. If no files are given, and + the REPL is currently inside a module, the file for that module is + used. + + DrRacket is launched directly, without starting a new subprocess, and + it is then kept running in a hidden window so further invocations are + immediate. (When this command is used for the first time, you will + see DrRacket start as usual, and then its window will disappear --- + that window is keeping DrRacket ready for quick editing.) + + In addition to file arguments, arguments can specify one of a few + flags for additional operations: + @itemize[ + @item{@litchar{-new}: opens a new editing window. This is the default + when no files are given and the REPL is not inside a module,} + @item{@litchar{-open}: opens the specified file/s (or the current + module's file). This is the default when files are given or when + inside a module.} + @item{@litchar{-quit}: exits the running DrRacket instance. Quitting + DrRacket is usually not necessary. Therefore, if you try to quit it + from the DrRacket window, it will instead just close the window but + DrRacket will still be running in the background. Use this command + in case there is some exceptional problem that requires actually + quitting the IDE. (Once you do so, future uses of this command will + start a fresh instance.)}] +} + +@; --------------------------------- +@subsection{Binding Information} + +@defcmd[apropos]{ + Searches for known bindings in the current namespace. The arguments + specify which binding to look for: use a symbol (without a + @litchar{'}) to look for bindings that contain that name, and use a + regexp (e.g., @racket[#rx"..."]) to use a regexp for the search. + Multiple arguments are and-ed together. + + If no arguments are given, @emph{all} bindings are listed. +} + +@defcmd[describe]{ + For each of the specified names, describe where where it is coming + from and how it was defined if it names a known binding. In addition, + desribe the module (list its imports and exports) that is named by + arguments that are known module names. + + By default, bindings are searched for at the runtime level (phase 0). + You can add a different phase level for identifier lookups as a first + argument. In this case, only a binding can be described, even if the + same name is a known module. +} + +@defcmd[doc]{ + Uses Racket's @racket[help] to browse the documentation, look for a + binding, etc. Note that this can be used even in languages that don't + have the @racket[help] binding. +} + +@; --------------------------------- +@subsection{Requiring and Loading Files} + +@defcmd[require]{ + Most arguments are passed to @racket[require] as is. As a + convenience, if an argument specifies an existing file name, then use + its string form to specify the require, or use a @racket[file] in case + of an absolute path. In addition, an argument that names a known + symbolic module name (e.g., one that was defined on the REPL, or a + builtin module like @racket[#%network]), then its quoted form is used. + (Note that these shorthands do not work inside require subforms like + @racket[only-in].) +} + +@defcmd[require-reloadable]{ + Same as @cmd[require], but arranges to load the code in a way that + makes it possible to reload it later, or if a module was already + loaded (using this command) then reload it. Note that the arguments + should be simple specifications, without any require macros. If no + arguments are given, use arguments from the last use of this command + (if any). + + Module reloading is enabled by turnning off the + @racket[compile-enforce-module-constants] parameter --- note that this + prohibits some opimizations, since the compiler assumes that all + bindings may change. +} + +@defcmd[enter]{ + Uses @racket[enter!] to have the REPL go `inside' a given module's + namespace. A module name can specify an existing file as with the + @cmd[require-reloadable] command. If no module is given, and the REPL + is already in some module's namespace, then `enter!' is used with that + module, causing it to reload if needed. Using @racket[#f] makes it go + back to the toplevel namespace. + + Note that this can be used even in languages that don't have the + @racket[enter!] binding. In addition, @racket[enter!] is used in a + way that does not make it require itself into the target namespace. +} + +@defcmd[toplevel]{ + Makes the REPL go back to the toplevel namespace. Same as using the + @cmd[enter] command with a @racket[#f] argument. +} + +@defcmd[load]{ + Uses @racket[load] to load the specified file(s). +} + +@; --------------------------------- +@subsection{Debugging} + +@defcmd[time]{ + Times execution of an expression (or expressions). This is similar to + @racket{time} but the information that is displayed is a bit easier to + read. + + In addition, you can provide an initial number to specify repeating + the evaluation a number of times. In this case, each iteration is + preceded by two garbage collections, and when the iteration is done + its timing information and evaluation result(s) are displayed. When + the requested number of repetitions is done, some extreme results are + removed (top and bottom 2/7ths), and the remaining results are be + averaged. Finally, the resulting value(s) are from the last run are + returned (and can be accessed via the bindings for the last few + results, see @secref["past-vals"]). +} + +@defcmd[trace]{ + Traces the named function (or functions), using @racket[trace]. +} + +@defcmd[untrace]{ + Untraces the named function (or functions), using @racket[untrace]. +} + +@defcmd[errortrace]{ + @racketmodname[errortrace] is a useful Racket library which can + provide a number of useful services like precise profiling, test + coverage, and accurate error information. However, using it can be a + little tricky. @cmd[errortrace] and a few related commands fill this + gap, making @racketmodname[errortrace] easier to use. + + @cmd[errortrace] controls global use of @racketmodname[errortrace]. + With a flag argument of @litchar{+} errortrace instrumentation is + turned on, with @litchar{-} it is turned off, and with no arguments it + is toggled. In addition, a @litchar{?} flag displays instrumentation + state. + + Remember that @racketmodname[errortrace] instrumentation hooks into + the Racket compiler, and applies only to source code that gets loaded + from source and therefore compiled. Therefore, you should use it + @emph{before} loading the code that you want to instrument. +} + +@defcmd[profile]{ + This command can perform profiling of code in one of two very + different ways: either statistical profiling via the + @racketmodname[profile] library, or using the exact profiler feature + of @racketmodname[errortrace]. + + When given a parenthesized expression, @cmd[profile] will run it via + the statistical profiler, as with the @racket[profile] form, reporting + results as usual. This profiler adds almost no overhead, and it + requires no special setup. In particular, it does not require + pre-compiling code in a special way. However, there are some + imprecise elements to this profiling: the profiler samples stack + snapshots periodically which can miss certain calls, and it is also + sensitive to some compiler optimizations like inlining procedures and + thereby not showing them in the displayed analysis. See + @other-doc['(lib "profile/scribblings/profile.scrbl")] for more + information. + + In the second mode of operation, @cmd[profile] uses the precise + @racketmodname[errortrace] profiler. This profiler produces precise + results, but like other uses of the @racketmodname[errortrace], it + must be enabled before loading the code that is to be profiled. It + can add noticeable overhead (potentially affecting the reported + runtimes), but the results are accurate in the sense that no procedure + is skipped. (For additional details, see + @other-doc['(lib "errortrace/scribblings/errortrace.scrbl")].) + + In this mode, the arguments are flags that control the profiler. A + @litchar{+} flag turns the profiler on --- and as usual with + @racketmodname[errortrace] functionality, this applies to code that is + compiled from now on. A @litchar{-} flag turns this instrumentation + off, and without any flags it is toggled. Once the profiler is + enabled, you can run some code and then use this command to report + profiling results: use @litchar{*} to show profiling results by time, + and @litchar{#} for the results by counts. Once you've seen the + results, you can evaluate additional code to collect more profiling + information, or you can reset the results with a @litchar{!} flag. + You can also combine several flags to perform the associated + operations, for example, @cmd[prof]{*!-} will show the accumulated + results, clear them, and turn profiler instrumentation off. + + Note that using @emph{any} of these flags turns errortrace + instrumentation on, even @cmd[prof]{-} (or no flags). Use the + @cmd[errortrace] command to turn off instrumentation completely. +} + +@defcmd[execution-counts]{ + This command makes it easy to use the execution counts functionality + of @racketmodname[errortrace]. Given a file name (or names), + @cmd[execution-counts] will enable errortrace instrumentation for + coverage, require the file(s), display the results, disables coverage, + and disables instrumentation (if it wasn't previously turned on). + This is useful as an indication of how well the test coverage is for + some file. +} + +@defcmd[coverage]{ + Runs a given file and displays coverage information for the run. This + is somewhat similar to the @cmd[execution-counts] command, but instead + of using @racketmodname[errortrace] directly, it runs the file in a + (trusted) sandbox, using the @racketmodname[racket/sandbox] library + and its ability to provide coverage information. +} + +@; --------------------------------- +@subsection{Miscellaneous Commands} + +@defcmd[switch-namespace]{ + This powerful command controls the REPL's namespace. While + @cmd[enter] can be used to make the REPL go into the namespace of a + specific module, the @cmd[switch-namespace] command can switch between + @emph{toplevel namespaces}, allowing you to get multiple separate + ``workspaces''. + + Namespaces are given names that are symbols or integers, where + @litchar{*} is the name for the first initial namespace, serving as + the default one. These names are not bindings --- they are only used + to label the known namespaces. + + The most basic usage for this command is to simply specify a new name. + A namespace that corresponds to that name will be created and the REPL + will switch to that namespace. The prompt will now indicate this + namespace's name. The name is usually insignificant, except when it + is a @racket[require]-able module: in this case, the new namespace is + initialized to use that module's bindings. For example, + @cmd[switch]{racket/base} creates a new namespace that is called + @litchar{racket/base} and initializes it with + @racketmodname[racket/base]. For all other names, the new namespace + is initialized the same as the current one. + + Additional @cmd[switch] uses: + @itemize[ + @item{@cmd[switch]{!} --- reset the current namespace, recreating it + using the same initial library. Note that it is forbidden to reset + the default initial namespace, the one named @litchar{*} --- this + namespace corresponds to the one that Racket was started with, and + where XREPL was initialized. There is no technical reason for + forbidding this, but doing so is not useful as no resources will + actually be freed.} + @item{@cmd[switch]{! } --- resets the current namespace with + the explicitly given simple module spec.} + @item{@cmd[switch]{ !} --- switch to a newly made namespace. If + a namespace by that name already existed, it is rest.} + @item{@cmd[switch]{ ! } --- same, but reset to the given + module instead of what it previously used.} + @item{@cmd[switch]{- } --- drop the specified namespace, making + it possible to garbage-collect away any associated resources. You + cannot drop the current namespace or the default one (@litchar{*}).} + @item{@cmd[switch]{?} --- list all known namespaces.}] + + Do not confuse namespaces with sandboxes or custodians. The + @cmd{switch} command changes @emph{only} the + @racket[current-namespace] --- it does not install a new custodian or + restricts evaluation in any way. Note that it is possible to pass + around values from one namespace to another via past result reference; + see @secref["past-vals"]. +} + +@defcmd[syntax]{ + Manipulate syntaxes and inspect their expansion. + + Useful operations revolve around a ``currently set syntax''. With no + arguments, the currently set syntax is displayed; an argument of + @litchar{^} sets the current syntax from the last input to the REPL; + and an argument that holds any other s-expression will set it as the + current syntax. + + Syntax operations are specified via flags: + @itemize[ + @item{@litchar{+} uses @racket[expand-once] on the current syntax and + prints the resulting syntax. In addition, the result becomes the + new ``current'' syntax, so you can use this as a poor-man's syntax + stepper. (Note that in some rare cases expansion via a sequence of + @racket[expand-once] might differ from the actual expansion.)} + @item{@litchar{!} uses @racket[expand] to completely expand the + current syntax.} + @item{@litchar{*} uses the macro debugger's textual output to show + expansion steps for the current syntax, leaving macros from + @racketmodname[racket/base] intact. Does not change the current + syntax. + See @other-doc['(lib "macro-debugger/macro-debugger.scrbl")] for + details.} + @item{@litchar{**} uses the macro debugger similarly to @litchar{*}, + but expands @racketmodname[racket/base] macros too, showing the + resulting full expansion process.}] + Several input flags and/or syntaxes can be spacified in succession as + arguments to @cmd{syntax}. For example, @cmd[stx]{(when 1 2) ** !}. +} + +@defcmd[log]{ + Starts (or stops) logging events at a specific level. The level can + be: + @itemize[ + @item{a known level name (currently one of @litchar{fatal}, + @litchar{error}, @litchar{warning}, @litchar{info}, + @litchar{debug}),} + @item{@racket[#f] for no logging,} + @item{@racket[#t] for maximum logging,} + @item{an integer level specification, with @racket[0] for no logging + and bigger ones for additional verbosity.}] +} + +@defcmd[install!]{ + Convenient utility command to install XREPL in your Racket + initialization file. This is done carefully, you will be notified of + potential issues, and asked to authorize changes. +} + +@; --------------------------------------------------------------------- +@section[#:tag "past-vals"]{Past Evaluation Results} + +XREPL makes the last few interaction results available for evaluation +via special toplevel variables: @racketidfont{^}, @racketidfont{^^}, +..., @racketidfont{^^^^^}. The first, @racketidfont{^}, refers to the +last result, @racketidfont{^^} to the previous one and so on. + +As with the usual REPL printouts, @void-const results are not kept. In +case of multiple results, they are spliced in reverse, so +@racketidfont{^} refers to the last result of the last evaluation. For +example: +@verbatim[#:indent 4]{ + -> 1 + 1 + -> (values 2 3) + 2 + 3 + -> (values 4) + 4 + -> (list ^ ^^ ^^^ ^^^^) + '(4 3 2 1)} +The rationale for this is that @racketidfont{^} always refers to the +last @emph{printed} result, @racketidfont{^^} to the one before that, +etc. + +These bindings are made available only if they are not already defined, +and if they are not modified. This means that if you have code that +uses these names, it will continue to work as usual. + +@; --------------------------------------------------------------------- +@section{Hacking XREPL} + +XREPL is mainly a convenience tool, and as such you might want to hack +it to better suite your needs. Currently, there is no convenient way to +customize and extend it, but this will be added in the future. + +Meanwhile, if you're interested in tweaking XREPL, the @cmd[enter] +command can be used as usual to go into its implementation. For +example: +@verbatim[#:indent 4]{ + -> ,en xrepl/xrepl + xrepl/xrepl> ,e + xrepl/xrepl> (saved-values-char #\~) + xrepl/xrepl> ,top + -> 123 + 123 + -> ~ + 123} +While this is not intended as @emph{the} way to extend and customize +XREPL, it is a useful debugging tool should you want to do so. + +If you have any useful tweaks and extensions, please mail the author or +the Racket developer's +@hyperlink["http://racket-lang.org/community.html"]{mailing list}. + +@; --------------------------------------------------------------------- +@section{License Issues} + +Under most circumstances XREPL uses the @racketmodname[readline] +library, and therefore a similar license caveat applies: XREPL cannot be +enabled by default because of the @seclink["readline-license" #:doc +RL]{readline licensing}, you have to explicitly do so yourself to use +it. (Note that XREPL is intended to be used only for enhanced +interaction, not as a library; so there are no additional issues.) + +@; --------------------------------------------------------------------- +@(check-all-documented) From 3223a656a6c01d0dab905872611a701798cd3765 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Mon, 18 Jul 2011 13:44:01 -0400 Subject: [PATCH 288/441] Hook XREPL into a few places where `readline' and `enter!' are mentioned. (cherry picked from commit 5fb83906097b444cb967485f76d616aba98f2fc4) --- collects/scribblings/guide/running.scrbl | 5 +- collects/scribblings/guide/welcome.scrbl | 4 + collects/scribblings/more/more.scrbl | 96 ++++++++++++++++-------- 3 files changed, 72 insertions(+), 33 deletions(-) diff --git a/collects/scribblings/guide/running.scrbl b/collects/scribblings/guide/running.scrbl index 081e8b446a4..fa1622313ec 100644 --- a/collects/scribblings/guide/running.scrbl +++ b/collects/scribblings/guide/running.scrbl @@ -38,8 +38,9 @@ with a @litchar{> } prompt: > } -@margin-note{For information on GNU Readline support, see -@racketmodname[readline].} +@margin-note{For enhancing your @tech{REPL} experience, see + @racketmodname[xrepl]; for information on GNU Readline support, see + @racketmodname[readline].} To initialize the @tech{REPL}'s environment, @exec{racket} first requires the @racketmodname[racket/init] module, which provides all of diff --git a/collects/scribblings/guide/welcome.scrbl b/collects/scribblings/guide/welcome.scrbl index f56f8ff12f8..badb0548f63 100644 --- a/collects/scribblings/guide/welcome.scrbl +++ b/collects/scribblings/guide/welcome.scrbl @@ -1,5 +1,6 @@ #lang scribble/doc @(require scribble/manual scribble/eval scribble/bnf "guide-utils.rkt" + (only-in scribble/core link-element) (for-label racket/enter)) @(define piece-eval (make-base-eval)) @@ -134,6 +135,9 @@ the above text in a file using your favorite editor. If you save it as @filepath{extract.rkt}, then after starting @exec{racket} in the same directory, you'd evaluate the following sequence: +@margin-note{If you use @racketmodname[xrepl], you can use + @(link-element "plainlink" (litchar ",enter extract.rkt") `(xrepl "enter")).} + @interaction[ #:eval piece-eval (eval:alts (enter! "extract.rkt") (void)) diff --git a/collects/scribblings/more/more.scrbl b/collects/scribblings/more/more.scrbl index ce9df39e193..5b198a456e4 100644 --- a/collects/scribblings/more/more.scrbl +++ b/collects/scribblings/more/more.scrbl @@ -2,43 +2,58 @@ @(require scribble/manual scribble/urls scribble/eval + (only-in scribble/core link-element) "../quick/keep.rkt" (for-label scheme racket/enter + xrepl readline net/url xml racket/control)) -@(define quick @other-manual['(lib "quick.scrbl" "scribblings/quick")]) -@(define guide @other-manual['(lib "guide.scrbl" "scribblings/guide")]) - -@(define more-eval (make-base-eval)) -@(interaction-eval #:eval more-eval - (define (show-load re?) - (fprintf (current-error-port) " [~aloading serve.rkt]\n" (if re? "re-" "")))) -@(interaction-eval #:eval more-eval - (define (serve n) void)) -@(interaction-eval #:eval more-eval - (define (show-break) - (fprintf (current-error-port) "^Cuser break"))) -@(interaction-eval #:eval more-eval - (define (show-fail n) - (error 'tcp-listen - "listen on ~a failed (address already in use)" - n))) -@(interaction-eval #:eval more-eval (require xml net/url)) - -@(define (whole-prog which [last? #f]) +@(begin + +(define quick @other-manual['(lib "quick.scrbl" "scribblings/quick")]) +(define guide @other-manual['(lib "guide.scrbl" "scribblings/guide")]) + +(define more-eval (make-base-eval)) +(interaction-eval #:eval more-eval + (define (show-load re?) + (fprintf (current-error-port) + " [~aloading serve.rkt]\n" (if re? "re-" "")))) +(interaction-eval #:eval more-eval + (define (serve n) void)) +(interaction-eval #:eval more-eval + (define (show-break) + (fprintf (current-error-port) "^Cuser break"))) +(interaction-eval #:eval more-eval + (define (show-fail n) + (error 'tcp-listen + "listen on ~a failed (address already in use)" + n))) +(interaction-eval #:eval more-eval (require xml net/url)) + +(define (whole-prog which [last? #f]) (let ([file (format "step~a.txt" which)]) (margin-note (keep-file file) "Here's the " - (if last? + (if last? "final program" "whole program so far") " in plain text: " (link file "step " which) "."))) +(define-syntax-rule (REQ m) @racket[(require @#,racketmodname[m])]) + +(define (xreplcmd name . args) + (define namestr (format ",~a" name)) + (define content + (litchar (if (null? args) namestr (apply string-append namestr " " args)))) + (link-element "plainlink" content `(xrepl ,(format "~a" name)))) + +) + @title{More: Systems Programming with Racket} @author["Matthew Flatt"] @@ -79,20 +94,36 @@ start @exec{racket} with no command-line arguments: > } -If you're using a plain terminal, if you have GNU Readline installed -on your system, and if you'd like Readline support in @exec{racket}, -then evaluate @racket[(require readline)]. If you also evaluate -@racket[(install-readline!)], then your @filepath{~/.racketrc} is -updated to load Readline whenever you start @exec{racket} for -interactive evaluation. Readline is not needed if you're running a -shell inside Emacs or if you're on Windows and use a @exec{cmd} -window. +To get a richer read-eval-print-loop, evaluate @REQ[xrepl]. You will +get Readline-based input if you have GNU Readline installed on your +system, and a useful set of meta-commands to support exploration and +development. + +@interaction[ +(eval:alts @#,REQ[xrepl] (void)) +] + +To get this as a default, use the @xreplcmd{install!} command---your +@filepath{~/.racketrc} will be updated to load @racketmodname[xrepl] +whenever you start @exec{racket} for interactive evaluation. @margin-note{Unfortunately, for legal reasons related to GPL vs. LGPL, - @exec{racket} cannot provide Readline automatically.} + @exec{racket} cannot provide @racketmodname[xrepl] or Readline + automatically.} + +@; FIXME: probably needs revisions, and questionable whether readline +@; should be mentioned by itself. One thing to consider is that with +@; readline it's possible to pretend that the whole thing is one +@; session, whereas xrepl changes the prompt. + +If you want @emph{just} readline support in @exec{racket}, evaluate +@REQ[readline]. To install this in your @filepath{~/.racketrc}, +evaluate @racket[(install-readline!)]. Readline is not needed if you're +using @racketmodname[xrepl], if you're running a shell inside Emacs, or +if you're on Windows and use a @exec{cmd} window. @interaction[ -(eval:alts (require readline) (void)) +(eval:alts @#,REQ[readline] (void)) (eval:alts (install-readline!) (void)) ] @@ -116,6 +147,9 @@ racket Back in @exec{racket}, try loading the file and running @racket[go]: +@margin-note{If you use @racketmodname[xrepl], you can use + @xreplcmd["enter"]{serve.rkt}.} + @interaction[ #:eval more-eval (eval:alts (enter! "serve.rkt") (show-load #f)) From e8d3223ce571973186fff563c0b447a241bb0124 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Mon, 18 Jul 2011 15:23:09 -0400 Subject: [PATCH 289/441] Add an example for extending xrepl, the very stupid way. For the record, a way to do this permanently is to add something like this to your ~/.racketrc: (eval '(begin (saved-values-char #\~) (defcommand eli "stuff" "eli says" ["Make eli say stuff"] (printf "Eli says: ~a\n" (getarg 'line))) (defcommand er #f "alias for errortrace" ["Runs errortrace"] (run-command 'errortrace))) (module->namespace 'xrepl/xrepl)) But this is too stupid even for a section that has "Hacking" in its title. There should definitely be an organized way to do this. This will require several things: * A decent API for doing these things for user code. (So the above `eval' turns to a `require' for your file which uses this API.) This goes beyond just documenting what's in there -- there are issues to resolve like some argument reading protocol (separating the declaration of argument types from the command implementation code), so a new command can call another with arguments that it reads. * There should also be some ,set command for customization options (reading and changing) and code to use the preference file for doing that. I almost started to do this, but currently there are only three values that this could apply to (`saved-values-char', `-number', and `wrap-column' (which might be better to dump and use `pretty-print-columns' instead)). * Also, it might be nice to have some command to do the same for simple aliases. (But this might get into shady parsing issues if it's more than just "I want `foo' to be an alias for an existing `bar' command".) (cherry picked from commit 3c1e624916440747144ce17474f668f32a8a8a6b) --- collects/xrepl/xrepl.scrbl | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/collects/xrepl/xrepl.scrbl b/collects/xrepl/xrepl.scrbl index f934492caf4..5aed7f00fba 100644 --- a/collects/xrepl/xrepl.scrbl +++ b/collects/xrepl/xrepl.scrbl @@ -453,7 +453,7 @@ customize and extend it, but this will be added in the future. Meanwhile, if you're interested in tweaking XREPL, the @cmd[enter] command can be used as usual to go into its implementation. For -example: +example --- change an XREPL parameter: @verbatim[#:indent 4]{ -> ,en xrepl/xrepl xrepl/xrepl> ,e @@ -463,6 +463,14 @@ example: 123 -> ~ 123} +or add a command: +@verbatim[#:indent 4]{ + -> ,en xrepl/xrepl + xrepl/xrepl> (defcommand eli "stuff" "eli says" ["Make eli say stuff"] + (printf "Eli says: ~a\n" (getarg 'line))) + xrepl/xrepl> ,top + -> ,eli moo + Eli says: moo} While this is not intended as @emph{the} way to extend and customize XREPL, it is a useful debugging tool should you want to do so. From 4c8a6aefe744da97f3c093c040d62500362e1bde Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Mon, 18 Jul 2011 15:34:31 -0400 Subject: [PATCH 290/441] Add $F for ,sh commands. (cherry picked from commit 261288c394bfd1c8d5079f9dc41f1bbc29700bbd) --- collects/xrepl/xrepl.rkt | 15 ++++++++++----- collects/xrepl/xrepl.scrbl | 4 ++++ 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/collects/xrepl/xrepl.rkt b/collects/xrepl/xrepl.rkt index 935a0eabe79..06ac6c4f664 100644 --- a/collects/xrepl/xrepl.rkt +++ b/collects/xrepl/xrepl.rkt @@ -163,8 +163,8 @@ (let ([ch (peek-char)]) (if (memq ch skip) (begin (read-char) (loop)) ch))))) -(define (here-path) - (let ([x (here-source)]) (if (path? x) x eof))) +(define (here-path [no-path eof]) + (let ([x (here-source)]) (if (path? x) x no-path))) (define (here-mod-or-eof) (let ([x (here-source)]) (if (not x) @@ -301,7 +301,9 @@ (defcommand (shell sh ls cp mv rm md rd git svn) "" "run a shell command" ["`sh' runs a shell command (via `system'), the aliases run a few useful" - "unix commands. (Note: `ls' has some default arguments set.)"] + "unix commands. (Note: `ls' has some default arguments set.)" + "If the REPL is inside some module's namespace, the command can use $F" + "which is set to the full path to this module's source file."] (let* ([arg (getarg 'line)] [arg (if (equal? "" arg) #f arg)] [cmd (current-command)]) @@ -310,12 +312,15 @@ [(shell) (set! cmd 'sh)]) (let ([cmd (cond [(eq? 'sh cmd) #f] [(symbol? cmd) (symbol->string cmd)] - [else cmd])]) + [else cmd])] + [here (here-path #f)]) + (putenv "F" (if here (path->string here) "")) (unless (system (cond [(and (not cmd) (not arg)) (getenv "SHELL")] [(not cmd) arg] [(not arg) cmd] [else (string-append cmd " " arg)])) - (eprintf "(exit with an error status)\n"))))) + (eprintf "(exit with an error status)\n")) + (when here (putenv "F" ""))))) (defcommand (edit e) " ..." "edit files in your $EDITOR" diff --git a/collects/xrepl/xrepl.scrbl b/collects/xrepl/xrepl.scrbl index 5aed7f00fba..b6654962a72 100644 --- a/collects/xrepl/xrepl.scrbl +++ b/collects/xrepl/xrepl.scrbl @@ -81,6 +81,10 @@ available. Use @cmd[shell] (or @cmd[sh]) to run a generic shell command (via @racket[system]). For convenience, a few synonyms are provided --- they run the specified executables (still using @racket[system]). + + When the REPL is in the context of a module with a known source file, + the shell command can use the @envvar{F} environment variable as the + path to the file. Otherwise, @envvar{F} is set to an empty string. } @defcmd[edit]{ From 1f7e9658a31587dcc8470a64bd31b99107f02cd6 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Mon, 18 Jul 2011 15:39:18 -0400 Subject: [PATCH 291/441] Fix reading a 'line argument: always succeeds and returns the line as-is. (cherry picked from commit 09c8880ea041678fbb50f04dae048d5c87be123b) --- collects/xrepl/xrepl.rkt | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/collects/xrepl/xrepl.rkt b/collects/xrepl/xrepl.rkt index 06ac6c4f664..f0027fb0677 100644 --- a/collects/xrepl/xrepl.rkt +++ b/collects/xrepl/xrepl.rkt @@ -180,17 +180,21 @@ (apply cmderror #:default-who 'getarg fmt args)) (define (missing) (argerror "missing ~a argument" kind)) (define (get read) - (define 1st (if (eq? #\newline (skip-spaces/peek)) eof (read))) + (define (get-one) + (cond [(eq? read read-line-arg) (read)] + [(eq? #\newline (skip-spaces/peek)) eof] + [else (read)])) + (define (get-list) + (let ([x (get-one)]) (if (eof-object? x) '() (cons x (get-list))))) + (define 1st (get-one)) (define 1st? (not (eof-object? 1st))) (define (dflt*) (let ([r (dflt)]) (if (eof-object? r) (missing) r))) (case flag [(req opt) (cond [1st? 1st] [dflt (dflt*)] [(eq? 'opt flag) #f] [else (missing)])] [(list list+) - (define (more) - (if (eq? #\newline (skip-spaces/peek)) '() (cons (read) (more)))) - (cond [1st? (cons 1st (more))] [dflt (list (dflt*))] - [(eq? 'list flag) '()] [else (missing)])] + (cond [1st? (cons 1st (get-list))] [dflt (list (dflt*))] + [(eq? 'list flag) '()] [else (missing)])] [else (error 'getarg "unknown flag: ~e" flag)])) (define (read-string-arg) (define ch (skip-spaces/peek " \t\r\n")) From a03b11befc60b09206ef89530ec0946f737c68b7 Mon Sep 17 00:00:00 2001 From: Carl Eastlund Date: Fri, 17 Jun 2011 13:09:45 -0400 Subject: [PATCH 292/441] Fixed a macro stepper bug: can't use zero? on syntax span, as it can be #f. Please include in the upcoming release. (cherry picked from commit 302cbb5275f2511cd0b72a2625e69afa8b7c894b) --- collects/macro-debugger/syntax-browser/properties.rkt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/collects/macro-debugger/syntax-browser/properties.rkt b/collects/macro-debugger/syntax-browser/properties.rkt index 65dbcafadd2..77695d1f3ac 100644 --- a/collects/macro-debugger/syntax-browser/properties.rkt +++ b/collects/macro-debugger/syntax-browser/properties.rkt @@ -212,16 +212,16 @@ (define s-line (syntax-line stx)) (define s-column (syntax-column stx)) (define s-position (syntax-position stx)) - (define s-span0 (syntax-span stx)) - (define s-span (if (zero? s-span0) #f s-span0)) + (define s-span (syntax-span stx)) + (define s-span-known? (not (memv s-span '(0 #f)))) (display "Source location\n" key-sd) - (if (or s-source s-line s-column s-position s-span) + (if (or s-source s-line s-column s-position s-span-known?) (begin (display-subkv "source" (prettify-source s-source)) (display-subkv "line" s-line) (display-subkv "column" s-column) (display-subkv "position" s-position) - (display-subkv "span" s-span0)) + (display-subkv "span" s-span)) (display "No source location available\n" n/a-sd)) (display "\n" #f)) From 0083418b53fe936d94282f53a50cfcf1924a1c2f Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Tue, 19 Jul 2011 08:11:51 -0600 Subject: [PATCH 293/441] cocoa: fix image paste Closes PR 12028 Merge to 5.1.2 (cherry picked from commit c8b37633599a3db93099daec94ce28d399c1b696) --- collects/mred/private/wx/cocoa/image.rkt | 1 + 1 file changed, 1 insertion(+) diff --git a/collects/mred/private/wx/cocoa/image.rkt b/collects/mred/private/wx/cocoa/image.rkt index ac05763af80..e6b86f4bb0c 100644 --- a/collects/mred/private/wx/cocoa/image.rkt +++ b/collects/mred/private/wx/cocoa/image.rkt @@ -134,4 +134,5 @@ operation: #:type _int NSCompositeCopy fraction: #:type _CGFloat 1.0)) (tellv NSGraphicsContext restoreGraphicsState) (CGContextRestoreGState cg) + (cairo_surface_mark_dirty surface) bm)) From 18b8751ee2aa41e6ae60fcf66fc02db70adccbe4 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Tue, 19 Jul 2011 08:54:38 -0600 Subject: [PATCH 294/441] win32: fix `is-maximized' in `frame%' Merge to 5.1.2 (cherry picked from commit 255549c8c8fb751a2128478179cb078a70218f3b) --- collects/mred/private/wx/win32/frame.rkt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/collects/mred/private/wx/win32/frame.rkt b/collects/mred/private/wx/win32/frame.rkt index 356983603de..9edcdd5e490 100644 --- a/collects/mred/private/wx/win32/frame.rkt +++ b/collects/mred/private/wx/win32/frame.rkt @@ -442,8 +442,8 @@ (define/public (is-maximized?) (if (is-shown?) - hidden-zoomed? - (IsZoomed hwnd))) + (IsZoomed hwnd) + hidden-zoomed?)) (define/public (maximize on?) (if (is-shown?) From d1b79946f97826442d182a6572062543c53f9d2e Mon Sep 17 00:00:00 2001 From: Guillaume Marceau Date: Tue, 19 Jul 2011 12:59:46 -0400 Subject: [PATCH 295/441] Fixes the (cons an image empty) error message (cherry picked from commit 2ae0376476855082121008b59633a25d7d5851ee) --- collects/lang/private/rewrite-error-message.rkt | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/collects/lang/private/rewrite-error-message.rkt b/collects/lang/private/rewrite-error-message.rkt index 8ac58a73408..1083fdcd7f8 100755 --- a/collects/lang/private/rewrite-error-message.rkt +++ b/collects/lang/private/rewrite-error-message.rkt @@ -78,12 +78,18 @@ (lambda (all one) "expects a ")) (list #rx"list or cyclic list" (lambda (all) "list")) + (list (regexp-quote "given #(struct:object:image% ...)") + (lambda (all) "given an image")) + (list (regexp-quote "given #(struct:object:image-snip% ...)") + (lambda (all) "given an image")) + (list (regexp-quote "given #(struct:object:cache-image-snip% ...)") + (lambda (all) "given an image")) (list (regexp-quote "#(struct:object:image% ...)") - (lambda (all) "an image")) + (lambda (all) "(image)")) (list (regexp-quote "#(struct:object:image-snip% ...)") - (lambda (all) "an image")) + (lambda (all) "(image)")) (list (regexp-quote "#(struct:object:cache-image-snip% ...)") - (lambda (all) "an image")))) + (lambda (all) "(image)")))) (for/fold ([msg msg]) ([repl. replacements]) (regexp-replace* (first repl.) msg (second repl.)))) From 36a0fea0cc61c9d5368f27de85fd8abccc6374b5 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Tue, 19 Jul 2011 00:19:27 -0400 Subject: [PATCH 296/441] XREPL tests. Not too much, but already tests large parts of sensitive code. Caught a bug where ,top would use (enter! #f) but enter grabbed the wrong namespace since it was instantiated in the wrong namespace. (cherry picked from commit f5e53de4d994097f0c7c0495cf2f70efcaf76eeb) --- collects/meta/props | 1 + collects/tests/xrepl/main.rkt | 94 +++++++++++++++++++++++++++++++++++ collects/xrepl/xrepl.rkt | 34 +++++++++---- 3 files changed, 118 insertions(+), 11 deletions(-) create mode 100644 collects/tests/xrepl/main.rkt diff --git a/collects/meta/props b/collects/meta/props index 914c0e3d851..4f3df0511a4 100755 --- a/collects/meta/props +++ b/collects/meta/props @@ -1979,6 +1979,7 @@ path/s is either such a string or a list of them. "collects/tests/xml" responsible (jay) "collects/tests/xml/test-clark.rkt" drdr:command-line #f drdr:timeout 300 "collects/tests/xml/xml-snip-bug.rkt" drdr:command-line (gracket "-t" *) +"collects/tests/xrepl" responsible (eli) "collects/tests/zo-size.rkt" responsible (jay) "collects/tex2page" responsible (jay) "collects/texpict" responsible (mflatt robby) diff --git a/collects/tests/xrepl/main.rkt b/collects/tests/xrepl/main.rkt new file mode 100644 index 00000000000..e73c7b34080 --- /dev/null +++ b/collects/tests/xrepl/main.rkt @@ -0,0 +1,94 @@ +#lang at-exp racket/base + +(define verbose? (make-parameter #t)) + +(define global-ns (current-namespace)) + +(define stderr (current-error-port)) + +(define (test-xrepl . args) + (define show-all? (verbose?)) + (define-values [Ii Io] (make-pipe)) + (define-values [Oi Oo] (make-pipe)) + (define repl-thread + (parameterize ([current-input-port Ii] + [current-output-port Oo] + [current-error-port Oo] + [current-namespace (make-empty-namespace)] + [error-print-context-length 0] ; easier output + [exit-handler (λ (_) (kill-thread repl-thread))]) + (thread (λ () + (namespace-attach-module global-ns 'racket/base) + (namespace-require 'racket) + (dynamic-require 'xrepl #f) + (read-eval-print-loop))))) + (define (repl-> expected) + (define output (read-string (string-length expected) Oi)) + (if (equal? output expected) + (when show-all? (display output)) + (error 'xrepl "test failure, expected ~s, got ~s" expected output))) + (let loop ([strs args] [input? #f]) + (cond + [(and (pair? strs) (equal? "" (car strs))) + (loop (cdr strs) input?)] + [(and (thread-dead? repl-thread) (null? strs)) + (printf "All tests passed.\n")] + [(thread-dead? repl-thread) + (error 'xrepl "test failure, repl thread died unexpectedly")] + [(null? strs) + (if (sync/timeout 1 repl-thread) + (loop strs input?) + (error 'xrepl "test failure, repl thread is alive at end of tests"))] + [(eq? '« (car strs)) + (when input? (error 'xrepl "bad test: unterminated `«'")) + (loop (cdr strs) #t)] + [(eq? '» (car strs)) + (unless input? (error 'xrepl "bad test: redundant `»'")) + (loop (cdr strs) 'newline)] + [(regexp-match #rx"^(.*?)(?: *⇒[^\n]*)(.*)" (car strs)) + => (λ (m) (loop (list* (cadr m) (caddr m) (cdr strs)) input?))] + [(regexp-match #rx"^(.*?)([«»])(.*)" (car strs)) + => (λ (m) (loop (list* (cadr m) (string->symbol (caddr m)) (cadddr m) + (cdr strs)) + input?))] + [(eq? 'newline input?) + (unless (regexp-match? #rx"^\n" (car strs)) + (error 'xrepl "bad test: `»' followed by a non-newline")) + (newline Io) (flush-output Io) + (when show-all? (newline) (flush-output)) + (loop (cons (substring (car strs) 1) (cdr strs)) #f)] + [input? + (display (car strs) Io) + (when show-all? (display (car strs)) (flush-output)) + (loop (cdr strs) #t)] + [else + (repl-> (car strs)) + (loop (cdr strs) #f)]))) + +@test-xrepl|={ + -> «(- 2 1)» + 1 + -> «(values 2 3)» + 2 + 3 + -> «(values 4)» + 4 + -> «(list ^ ^^ ^^^ ^^^^)» + '(4 3 2 1) + -> «(module foo racket (define x 123))» + -> «,en foo» + 'foo> «x» + 123 + 'foo> «,top» + -> «(define enter! 123)» + -> «(enter! 'foo)» + procedure application: expected procedure, given: 123; arguments were: 'foo + -> «,en foo» ⇒ but this still works + 'foo> «,top» + -> «,switch foo» + ; *** Initializing a new `foo' namespace with "racket/main.rkt" *** + ; *** Switching to the `foo' namespace *** + foo::-> «,switch *» + ; *** Switching to the `*' namespace *** + -> «,ex» + |=@||}=| diff --git a/collects/xrepl/xrepl.rkt b/collects/xrepl/xrepl.rkt index f0027fb0677..3352cca767d 100644 --- a/collects/xrepl/xrepl.rkt +++ b/collects/xrepl/xrepl.rkt @@ -23,7 +23,8 @@ (define (autoloaded? sym) (hash-ref autoloaded-specs sym #f)) (define-syntax-rule (defautoload libspec id ...) (begin (define (id . args) - (set! id (dynamic-require 'libspec 'id)) + (set! id (parameterize ([current-namespace hidden-namespace]) + (dynamic-require 'libspec 'id))) (hash-set! autoloaded-specs 'libspec #t) (hash-set! autoloaded-specs 'id #t) (apply id args)) @@ -38,13 +39,25 @@ ;; similar, but just for identifiers (define-namespace-anchor anchor) (define (here-namespace) (namespace-anchor->namespace anchor)) +(define hidden-namespace (make-base-namespace)) +(define initial-namespace (current-namespace)) +;; when `racket/enter' initializes, it grabs the `current-namespace' to get +;; back to -- which means it should be instantiated in a top level namespace +;; rather than in (here-namespace); but if we use `initial-namespace' we +;; essentially rely on the user to not kill `enter!' (eg, (define enter! 4)). +;; the solution is to make a `hidden-namespace' where we store these bindings, +;; then instantiate needed modules in the initial namespace and immediately +;; attach the modules to the hidden one then use it, so changes to the binding +;; in `initial-namespace' doesn't affect us. (define (make-lazy-identifier sym from) (define id #f) - (λ () (or id (parameterize ([current-namespace (here-namespace)]) - (eval (namespace-syntax-introduce - (datum->syntax #f #`(require #,from)))) - (set! id (namespace-symbol->identifier sym)) - id)))) + (λ () (or id (begin (parameterize ([current-namespace initial-namespace]) + (namespace-require from)) + (parameterize ([current-namespace hidden-namespace]) + (namespace-attach-module initial-namespace from) + (namespace-require from) + (set! id (namespace-symbol->identifier sym)) + id))))) ;; makes it easy to use meta-tools without user-namespace contamination (define (eval-sexpr-for-user form) @@ -58,10 +71,9 @@ (if (path-string? x) (path->relative-string/setup x) x)) (define (here-source) ; returns a path, a symbol, or #f (= not in a module) - (let* ([x (datum->syntax #'here '(#%variable-reference))] - [x (eval (namespace-syntax-introduce x))] - [x (variable-reference->module-source x)]) - x)) + (variable-reference->module-source + (eval (namespace-syntax-introduce + (datum->syntax #f `(,#'#%variable-reference)))))) (define (phase->name phase [fmt #f]) (define s @@ -983,7 +995,7 @@ (λ () (let ([base-stxs #f]) (unless base-stxs (set! base-stxs ; all ids that are bound to a syntax in racket/base - (parameterize ([current-namespace (here-namespace)]) + (parameterize ([current-namespace hidden-namespace]) (let-values ([(vals stxs) (module->exports 'racket/base)]) (map (λ (s) (namespace-symbol->identifier (car s))) (cdr (assq 0 stxs))))))) From c7bf34d38773d5e4c29a45072d57bcc33c98be03 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Tue, 19 Jul 2011 00:36:08 -0400 Subject: [PATCH 297/441] Improve macro stepper output, and some more ,stx outputs. (cherry picked from commit 8109299ec86be6f2ddc89c2862e5a62b5280dcae) --- collects/xrepl/xrepl.rkt | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/collects/xrepl/xrepl.rkt b/collects/xrepl/xrepl.rkt index 3352cca767d..d4b1a4cd338 100644 --- a/collects/xrepl/xrepl.rkt +++ b/collects/xrepl/xrepl.rkt @@ -961,7 +961,7 @@ (namespace-require init) (hash-set! namespaces name (cons (current-namespace) init)))) (when (and name (not (eq? name (current-namespace-name)))) - (printf "; *** switching to the `~s' namespace ***\n" name) + (printf "; *** Switching to the `~s' namespace ***\n" name) (let ([x (hash-ref namespaces (current-namespace-name))]) (unless (eq? (car x) old-namespace) (printf "; (note: saving current namespace for `~s')\n" @@ -1000,6 +1000,19 @@ (map (λ (s) (namespace-symbol->identifier (car s))) (cdr (assq 0 stxs))))))) (λ (id) (not (ormap (λ (s) (free-identifier=? id s)) base-stxs)))))) +(define (macro-stepper . args) + (define-values [i o] (make-pipe)) + (parameterize ([current-output-port o]) + (thread (λ () (apply expand/step-text args) (close-output-port o)))) + (let loop () + (define l (read-line i)) + (unless (eof-object? l) + ;; hack: beautify the stepper's output -- remove empty line, indent code + (unless (equal? "" l) + (printf (if (regexp-match? #px"^[A-Z][a-z]+\\b" l) + "; ---- ~a ----\n" "; ~a\n") + l)) + (loop)))) (defcommand (syntax stx st) "[] [ ...]" "set syntax object to inspect, and control it" ["With no arguments, will show the previously set (or expanded) syntax" @@ -1017,22 +1030,22 @@ (define args (getarg 'syntax 'list)) (for ([stx (in-list (if (null? args) '(#f) args))]) (define (show/set label stx) - (printf "~a\n" label) + (printf "; ~a\n" label) (current-syntax stx) - (pretty-write (syntax->datum stx))) + (display "; ") (pretty-write (syntax->datum stx))) (define (cur) (or (current-syntax) (cmderror "no syntax set yet"))) (case (and stx (if (identifier? stx) (syntax-e stx) '--none--)) - [(#f) (show/set "current syntax:" (cur))] + [(#f) (show/set "Current syntax:" (cur))] [(^) (if (last-input-syntax) - (show/set "using last expression:" (last-input-syntax)) + (show/set "Using last expression:" (last-input-syntax)) (cmderror "no expression entered yet"))] [(+) (show/set "expand-once ->" (expand-once (cur)))] [(!) (show/set "expand ->" (expand (cur)))] - [(*) (printf "stepper:\n") (expand/step-text (cur) (not-in-base))] - [(**) (printf "stepper:\n") (expand/step-text (cur))] + [(*) (printf "; Stepper:\n") (macro-stepper (cur) (not-in-base))] + [(**) (printf "; Stepper:\n") (macro-stepper (cur))] [else (if (syntax? stx) - (begin (printf "syntax set\n") (current-syntax stx)) + (begin (printf "; Syntax set\n") (current-syntax stx)) (cmderror "internal error: ~s ~s" stx (syntax? stx)))]))) ;; ---------------------------------------------------------------------------- From ccd9ab07a73e0f0ba6a4fb6d1db513fa3881a23a Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Tue, 19 Jul 2011 17:01:27 -0400 Subject: [PATCH 298/441] Revert "Hook XREPL into a few places where `readline' and `enter!' are mentioned." This reverts commit 3223a656a6c01d0dab905872611a701798cd3765. --- collects/scribblings/guide/running.scrbl | 5 +- collects/scribblings/guide/welcome.scrbl | 4 - collects/scribblings/more/more.scrbl | 96 ++++++++---------------- 3 files changed, 33 insertions(+), 72 deletions(-) diff --git a/collects/scribblings/guide/running.scrbl b/collects/scribblings/guide/running.scrbl index fa1622313ec..081e8b446a4 100644 --- a/collects/scribblings/guide/running.scrbl +++ b/collects/scribblings/guide/running.scrbl @@ -38,9 +38,8 @@ with a @litchar{> } prompt: > } -@margin-note{For enhancing your @tech{REPL} experience, see - @racketmodname[xrepl]; for information on GNU Readline support, see - @racketmodname[readline].} +@margin-note{For information on GNU Readline support, see +@racketmodname[readline].} To initialize the @tech{REPL}'s environment, @exec{racket} first requires the @racketmodname[racket/init] module, which provides all of diff --git a/collects/scribblings/guide/welcome.scrbl b/collects/scribblings/guide/welcome.scrbl index badb0548f63..f56f8ff12f8 100644 --- a/collects/scribblings/guide/welcome.scrbl +++ b/collects/scribblings/guide/welcome.scrbl @@ -1,6 +1,5 @@ #lang scribble/doc @(require scribble/manual scribble/eval scribble/bnf "guide-utils.rkt" - (only-in scribble/core link-element) (for-label racket/enter)) @(define piece-eval (make-base-eval)) @@ -135,9 +134,6 @@ the above text in a file using your favorite editor. If you save it as @filepath{extract.rkt}, then after starting @exec{racket} in the same directory, you'd evaluate the following sequence: -@margin-note{If you use @racketmodname[xrepl], you can use - @(link-element "plainlink" (litchar ",enter extract.rkt") `(xrepl "enter")).} - @interaction[ #:eval piece-eval (eval:alts (enter! "extract.rkt") (void)) diff --git a/collects/scribblings/more/more.scrbl b/collects/scribblings/more/more.scrbl index 5b198a456e4..ce9df39e193 100644 --- a/collects/scribblings/more/more.scrbl +++ b/collects/scribblings/more/more.scrbl @@ -2,58 +2,43 @@ @(require scribble/manual scribble/urls scribble/eval - (only-in scribble/core link-element) "../quick/keep.rkt" (for-label scheme racket/enter - xrepl readline net/url xml racket/control)) -@(begin - -(define quick @other-manual['(lib "quick.scrbl" "scribblings/quick")]) -(define guide @other-manual['(lib "guide.scrbl" "scribblings/guide")]) - -(define more-eval (make-base-eval)) -(interaction-eval #:eval more-eval - (define (show-load re?) - (fprintf (current-error-port) - " [~aloading serve.rkt]\n" (if re? "re-" "")))) -(interaction-eval #:eval more-eval - (define (serve n) void)) -(interaction-eval #:eval more-eval - (define (show-break) - (fprintf (current-error-port) "^Cuser break"))) -(interaction-eval #:eval more-eval - (define (show-fail n) - (error 'tcp-listen - "listen on ~a failed (address already in use)" - n))) -(interaction-eval #:eval more-eval (require xml net/url)) - -(define (whole-prog which [last? #f]) +@(define quick @other-manual['(lib "quick.scrbl" "scribblings/quick")]) +@(define guide @other-manual['(lib "guide.scrbl" "scribblings/guide")]) + +@(define more-eval (make-base-eval)) +@(interaction-eval #:eval more-eval + (define (show-load re?) + (fprintf (current-error-port) " [~aloading serve.rkt]\n" (if re? "re-" "")))) +@(interaction-eval #:eval more-eval + (define (serve n) void)) +@(interaction-eval #:eval more-eval + (define (show-break) + (fprintf (current-error-port) "^Cuser break"))) +@(interaction-eval #:eval more-eval + (define (show-fail n) + (error 'tcp-listen + "listen on ~a failed (address already in use)" + n))) +@(interaction-eval #:eval more-eval (require xml net/url)) + +@(define (whole-prog which [last? #f]) (let ([file (format "step~a.txt" which)]) (margin-note (keep-file file) "Here's the " - (if last? + (if last? "final program" "whole program so far") " in plain text: " (link file "step " which) "."))) -(define-syntax-rule (REQ m) @racket[(require @#,racketmodname[m])]) - -(define (xreplcmd name . args) - (define namestr (format ",~a" name)) - (define content - (litchar (if (null? args) namestr (apply string-append namestr " " args)))) - (link-element "plainlink" content `(xrepl ,(format "~a" name)))) - -) - @title{More: Systems Programming with Racket} @author["Matthew Flatt"] @@ -94,36 +79,20 @@ start @exec{racket} with no command-line arguments: > } -To get a richer read-eval-print-loop, evaluate @REQ[xrepl]. You will -get Readline-based input if you have GNU Readline installed on your -system, and a useful set of meta-commands to support exploration and -development. - -@interaction[ -(eval:alts @#,REQ[xrepl] (void)) -] - -To get this as a default, use the @xreplcmd{install!} command---your -@filepath{~/.racketrc} will be updated to load @racketmodname[xrepl] -whenever you start @exec{racket} for interactive evaluation. +If you're using a plain terminal, if you have GNU Readline installed +on your system, and if you'd like Readline support in @exec{racket}, +then evaluate @racket[(require readline)]. If you also evaluate +@racket[(install-readline!)], then your @filepath{~/.racketrc} is +updated to load Readline whenever you start @exec{racket} for +interactive evaluation. Readline is not needed if you're running a +shell inside Emacs or if you're on Windows and use a @exec{cmd} +window. @margin-note{Unfortunately, for legal reasons related to GPL vs. LGPL, - @exec{racket} cannot provide @racketmodname[xrepl] or Readline - automatically.} - -@; FIXME: probably needs revisions, and questionable whether readline -@; should be mentioned by itself. One thing to consider is that with -@; readline it's possible to pretend that the whole thing is one -@; session, whereas xrepl changes the prompt. - -If you want @emph{just} readline support in @exec{racket}, evaluate -@REQ[readline]. To install this in your @filepath{~/.racketrc}, -evaluate @racket[(install-readline!)]. Readline is not needed if you're -using @racketmodname[xrepl], if you're running a shell inside Emacs, or -if you're on Windows and use a @exec{cmd} window. + @exec{racket} cannot provide Readline automatically.} @interaction[ -(eval:alts @#,REQ[readline] (void)) +(eval:alts (require readline) (void)) (eval:alts (install-readline!) (void)) ] @@ -147,9 +116,6 @@ racket Back in @exec{racket}, try loading the file and running @racket[go]: -@margin-note{If you use @racketmodname[xrepl], you can use - @xreplcmd["enter"]{serve.rkt}.} - @interaction[ #:eval more-eval (eval:alts (enter! "serve.rkt") (show-load #f)) From 32b53e65496675b4dfa64abef1962b2a47e41781 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Tue, 19 Jul 2011 17:03:17 -0400 Subject: [PATCH 299/441] Remove xrepl from the release branch. --- collects/meta/dist-specs.rkt | 3 - collects/meta/props | 2 - collects/tests/xrepl/main.rkt | 94 --- collects/xrepl/doc-utils.rkt | 80 -- collects/xrepl/info.rkt | 5 - collects/xrepl/main.rkt | 13 - collects/xrepl/xrepl.rkt | 1345 --------------------------------- collects/xrepl/xrepl.scrbl | 496 ------------ 8 files changed, 2038 deletions(-) delete mode 100644 collects/tests/xrepl/main.rkt delete mode 100644 collects/xrepl/doc-utils.rkt delete mode 100644 collects/xrepl/info.rkt delete mode 100644 collects/xrepl/main.rkt delete mode 100644 collects/xrepl/xrepl.rkt delete mode 100644 collects/xrepl/xrepl.scrbl diff --git a/collects/meta/dist-specs.rkt b/collects/meta/dist-specs.rkt index 99187995f3e..13fa0f72f9b 100644 --- a/collects/meta/dist-specs.rkt +++ b/collects/meta/dist-specs.rkt @@ -511,9 +511,6 @@ mz-extras :+= (collects: "rnrs/") ;; -------------------- readline mz-extras :+= (package: "readline/") -;; -------------------- readline -mz-extras :+= (package: "xrepl/") - ;; -------------------- wxme mz-extras :+= (collects: "wxme/") diff --git a/collects/meta/props b/collects/meta/props index 4f3df0511a4..e428687d588 100755 --- a/collects/meta/props +++ b/collects/meta/props @@ -1979,7 +1979,6 @@ path/s is either such a string or a list of them. "collects/tests/xml" responsible (jay) "collects/tests/xml/test-clark.rkt" drdr:command-line #f drdr:timeout 300 "collects/tests/xml/xml-snip-bug.rkt" drdr:command-line (gracket "-t" *) -"collects/tests/xrepl" responsible (eli) "collects/tests/zo-size.rkt" responsible (jay) "collects/tex2page" responsible (jay) "collects/texpict" responsible (mflatt robby) @@ -2070,7 +2069,6 @@ path/s is either such a string or a list of them. "collects/xml/text-box-tool.rkt" drdr:command-line (gracket-text "-t" *) "collects/xml/text-snipclass.rkt" drdr:command-line (gracket-text "-t" *) "collects/xml/xml-snipclass.rkt" drdr:command-line (gracket-text "-t" *) -"collects/xrepl" responsible (eli) "doc/release-notes/COPYING-libscheme.txt" responsible (mflatt) "doc/release-notes/COPYING.txt" responsible (mflatt) "doc/release-notes/drracket" responsible (robby) diff --git a/collects/tests/xrepl/main.rkt b/collects/tests/xrepl/main.rkt deleted file mode 100644 index e73c7b34080..00000000000 --- a/collects/tests/xrepl/main.rkt +++ /dev/null @@ -1,94 +0,0 @@ -#lang at-exp racket/base - -(define verbose? (make-parameter #t)) - -(define global-ns (current-namespace)) - -(define stderr (current-error-port)) - -(define (test-xrepl . args) - (define show-all? (verbose?)) - (define-values [Ii Io] (make-pipe)) - (define-values [Oi Oo] (make-pipe)) - (define repl-thread - (parameterize ([current-input-port Ii] - [current-output-port Oo] - [current-error-port Oo] - [current-namespace (make-empty-namespace)] - [error-print-context-length 0] ; easier output - [exit-handler (λ (_) (kill-thread repl-thread))]) - (thread (λ () - (namespace-attach-module global-ns 'racket/base) - (namespace-require 'racket) - (dynamic-require 'xrepl #f) - (read-eval-print-loop))))) - (define (repl-> expected) - (define output (read-string (string-length expected) Oi)) - (if (equal? output expected) - (when show-all? (display output)) - (error 'xrepl "test failure, expected ~s, got ~s" expected output))) - (let loop ([strs args] [input? #f]) - (cond - [(and (pair? strs) (equal? "" (car strs))) - (loop (cdr strs) input?)] - [(and (thread-dead? repl-thread) (null? strs)) - (printf "All tests passed.\n")] - [(thread-dead? repl-thread) - (error 'xrepl "test failure, repl thread died unexpectedly")] - [(null? strs) - (if (sync/timeout 1 repl-thread) - (loop strs input?) - (error 'xrepl "test failure, repl thread is alive at end of tests"))] - [(eq? '« (car strs)) - (when input? (error 'xrepl "bad test: unterminated `«'")) - (loop (cdr strs) #t)] - [(eq? '» (car strs)) - (unless input? (error 'xrepl "bad test: redundant `»'")) - (loop (cdr strs) 'newline)] - [(regexp-match #rx"^(.*?)(?: *⇒[^\n]*)(.*)" (car strs)) - => (λ (m) (loop (list* (cadr m) (caddr m) (cdr strs)) input?))] - [(regexp-match #rx"^(.*?)([«»])(.*)" (car strs)) - => (λ (m) (loop (list* (cadr m) (string->symbol (caddr m)) (cadddr m) - (cdr strs)) - input?))] - [(eq? 'newline input?) - (unless (regexp-match? #rx"^\n" (car strs)) - (error 'xrepl "bad test: `»' followed by a non-newline")) - (newline Io) (flush-output Io) - (when show-all? (newline) (flush-output)) - (loop (cons (substring (car strs) 1) (cdr strs)) #f)] - [input? - (display (car strs) Io) - (when show-all? (display (car strs)) (flush-output)) - (loop (cdr strs) #t)] - [else - (repl-> (car strs)) - (loop (cdr strs) #f)]))) - -@test-xrepl|={ - -> «(- 2 1)» - 1 - -> «(values 2 3)» - 2 - 3 - -> «(values 4)» - 4 - -> «(list ^ ^^ ^^^ ^^^^)» - '(4 3 2 1) - -> «(module foo racket (define x 123))» - -> «,en foo» - 'foo> «x» - 123 - 'foo> «,top» - -> «(define enter! 123)» - -> «(enter! 'foo)» - procedure application: expected procedure, given: 123; arguments were: 'foo - -> «,en foo» ⇒ but this still works - 'foo> «,top» - -> «,switch foo» - ; *** Initializing a new `foo' namespace with "racket/main.rkt" *** - ; *** Switching to the `foo' namespace *** - foo::-> «,switch *» - ; *** Switching to the `*' namespace *** - -> «,ex» - |=@||}=| diff --git a/collects/xrepl/doc-utils.rkt b/collects/xrepl/doc-utils.rkt deleted file mode 100644 index fe15ecd3354..00000000000 --- a/collects/xrepl/doc-utils.rkt +++ /dev/null @@ -1,80 +0,0 @@ -#lang racket/base - -(require scribble/manual scribble/core scribble/decode - racket/list racket/sandbox) - -(provide (all-from-out scribble/manual) - RL GUIDE cmd defcmd check-all-documented) - -(define RL '(lib "readline/readline.scrbl")) -(define GUIDE '(lib "scribblings/guide/guide.scrbl")) - -(define commands - (let ([c #f]) - (λ () - (unless c - (define e (call-with-trusted-sandbox-configuration - (λ () (make-evaluator 'racket/base)))) - (e '(require xrepl/xrepl)) - (e '(current-namespace (module->namespace 'xrepl/xrepl))) - (set! c (e '(for/list ([c (in-list commands-list)]) - (list (car (command-names c)) - (cdr (command-names c)) - (command-argline c) - (command-blurb c))))) - (kill-evaluator e)) - c))) -(define documented '()) - -(define (cmd* name0 . more) - (define name (if (symbol? name0) name0 (string->symbol name0))) - (define full-name - (or (and (assq name (commands)) name) - (for/or ([c (in-list (commands))]) (and (memq name (cadr c)) (car c))) - (error 'cmd "unknown command: ~s" name))) - (define content - (litchar (let ([s (format ",~a" name)]) - (if (pair? more) (apply string-append s " " more) s)))) - (link-element "plainlink" content `(xrepl ,(format "~a" full-name)))) - -(define-syntax-rule (cmd name more ...) (cmd* 'name more ...)) - -(define (cmd-index name) - (define namestr (format ",~a" name)) - (define tag `(xrepl ,(format "~a" name))) - (define content (cmd* name)) - (define ielem - (index-element #f content tag (list namestr) (list content) - 'xrepl-command)) - (toc-target-element #f (list ielem) tag)) - -(define (defcmd* name . text) - (set! documented (cons name documented)) - (define-values [other-names argline blurb] - (apply values (cond [(assq name (commands)) => cdr] - [else (error 'defcmd "unknown command: ~s" name)]))) - (define header - (list (cmd-index name) (litchar (string-append " " (or argline ""))))) - (define desc - (list (hspace 2) (make-element 'italic blurb))) - (define synonyms - (and (pair? other-names) - (list (hspace 2) - "[Synonyms: " - (add-between (map (λ (n) (litchar (format ",~a" n))) - other-names) - " ") - "]"))) - (splice - (list* (tabular #:style 'boxed `((,header) (,desc) - ,@(if synonyms `((,synonyms)) `()))) - "\n" "\n" text))) - -(define-syntax-rule (defcmd name text ...) (defcmd* 'name text ...)) - -(define (check-all-documented) - (unless (= (length documented) (length (remove-duplicates documented))) - (error 'xrepl-docs "some commands were documented multiple times")) - (let ([missing (remove* documented (map car (commands)))]) - (when (pair? missing) - (error 'xrepl-docs "missing command documentation: ~s" missing)))) diff --git a/collects/xrepl/info.rkt b/collects/xrepl/info.rkt deleted file mode 100644 index 96e8ea9a851..00000000000 --- a/collects/xrepl/info.rkt +++ /dev/null @@ -1,5 +0,0 @@ -#lang setup/infotab - -(define name "eXtended REPL") - -(define scribblings '(("xrepl.scrbl" () (tool-library)))) diff --git a/collects/xrepl/main.rkt b/collects/xrepl/main.rkt deleted file mode 100644 index 3a70c4f70f9..00000000000 --- a/collects/xrepl/main.rkt +++ /dev/null @@ -1,13 +0,0 @@ -#lang racket/base - -;; This file is intended to be loaded from your init file (evaluatue -;; (find-system-path 'init-file) to see where that is on your OS.) - -(require "xrepl.rkt") - -;; may want to disable inlining to allow redefinitions -;; (compile-enforce-module-constants #f) - -;; create the command repl reader, and value-saving evaluator -(current-prompt-read (make-xrepl-reader)) -(current-eval (make-xrepl-evaluator (current-eval))) diff --git a/collects/xrepl/xrepl.rkt b/collects/xrepl/xrepl.rkt deleted file mode 100644 index d4b1a4cd338..00000000000 --- a/collects/xrepl/xrepl.rkt +++ /dev/null @@ -1,1345 +0,0 @@ -#lang racket/base - -;; ---------------------------------------------------------------------------- -;; customization - -(define toplevel-prefix (make-parameter "-")) ; when not in a module -(define saved-values-number (make-parameter 5)) -(define saved-values-char (make-parameter #\^)) -(define wrap-column (make-parameter 79)) -;; TODO: when there's a few more of these, make them come from the prefs - -;; ---------------------------------------------------------------------------- - -(require racket/list racket/match) - -;; ---------------------------------------------------------------------------- -;; utilities - -(define home-dir (find-system-path 'home-dir)) - -;; autoloads: avoid loading a ton of stuff to minimize startup penalty -(define autoloaded-specs (make-hasheq)) -(define (autoloaded? sym) (hash-ref autoloaded-specs sym #f)) -(define-syntax-rule (defautoload libspec id ...) - (begin (define (id . args) - (set! id (parameterize ([current-namespace hidden-namespace]) - (dynamic-require 'libspec 'id))) - (hash-set! autoloaded-specs 'libspec #t) - (hash-set! autoloaded-specs 'id #t) - (apply id args)) - ...)) - -(defautoload racket/system system system*) -(defautoload racket/file file->string) -(defautoload setup/path-to-relative path->relative-string/setup) -(defautoload syntax/modcode get-module-code) -(defautoload racket/path find-relative-path) - -;; similar, but just for identifiers -(define-namespace-anchor anchor) -(define (here-namespace) (namespace-anchor->namespace anchor)) -(define hidden-namespace (make-base-namespace)) -(define initial-namespace (current-namespace)) -;; when `racket/enter' initializes, it grabs the `current-namespace' to get -;; back to -- which means it should be instantiated in a top level namespace -;; rather than in (here-namespace); but if we use `initial-namespace' we -;; essentially rely on the user to not kill `enter!' (eg, (define enter! 4)). -;; the solution is to make a `hidden-namespace' where we store these bindings, -;; then instantiate needed modules in the initial namespace and immediately -;; attach the modules to the hidden one then use it, so changes to the binding -;; in `initial-namespace' doesn't affect us. -(define (make-lazy-identifier sym from) - (define id #f) - (λ () (or id (begin (parameterize ([current-namespace initial-namespace]) - (namespace-require from)) - (parameterize ([current-namespace hidden-namespace]) - (namespace-attach-module initial-namespace from) - (namespace-require from) - (set! id (namespace-symbol->identifier sym)) - id))))) - -;; makes it easy to use meta-tools without user-namespace contamination -(define (eval-sexpr-for-user form) - (eval (namespace-syntax-introduce (datum->syntax #f form)))) - -(define (modspec->path modspec) ; returns a symbol for 'foo specs - (resolved-module-path-name ((current-module-name-resolver) modspec #f #f))) -(define (mpi->name mpi) - (resolved-module-path-name (module-path-index-resolve mpi))) -(define (->relname x) - (if (path-string? x) (path->relative-string/setup x) x)) - -(define (here-source) ; returns a path, a symbol, or #f (= not in a module) - (variable-reference->module-source - (eval (namespace-syntax-introduce - (datum->syntax #f `(,#'#%variable-reference)))))) - -(define (phase->name phase [fmt #f]) - (define s - (case phase - [(0) #f] [(#f) "for-label"] [(1) "for-syntax"] [(-1) "for-template"] - [else (format "for-meta:~a" phase)])) - (cond [(not fmt) s] [s (format fmt s)] [else ""])) - -;; true if (quote sym) is a known module name -(define (module-name? sym) - (and (symbol? sym) - (with-handlers ([exn? (λ (_) #f)]) (module->imports `',sym) #t))) - -;; support visual column-aware output -;; right after an input expression is entered the terminal won't show the -;; newline, so as far as column counting goes it's still after the prompt which -;; leads to bad output in practice. (at least in the common case where IO -;; share the same terminal.) This will be redundant with the already-added -;; `port-set-next-location!'. -(define last-output-port #f) -(define last-output-line #f) -(define last-output-visual-col #f) -(define (maybe-new-output-port) - (unless (eq? last-output-port (current-output-port)) - (set! last-output-port (current-output-port)) - (flush-output last-output-port) - (port-count-lines! last-output-port) - (let-values ([(line col pos) (port-next-location last-output-port)]) - (set! last-output-line line) - (set! last-output-visual-col col)))) -(define (fresh-line) - (maybe-new-output-port) - (flush-output last-output-port) - (let-values ([(line col pos) (port-next-location last-output-port)]) - (unless (eq? col (if (eq? line last-output-line) last-output-visual-col 0)) - (newline)))) -(define (zero-column!) - ;; there's a problem whenever there's some printout followed by a read: the - ;; cursor will at column zero, but the port counting will think that it's - ;; still right after the printout; call this function in such cases to adjust - ;; the column to 0. - (maybe-new-output-port) - ;; if there was a way to change the location of stdout we'd set the column to - ;; 0 here... - (let-values ([(line col pos) (port-next-location last-output-port)]) - (set! last-output-line line) - (set! last-output-visual-col col))) - -;; wrapped `printf' (cheap but effective), aware of the visual col -(define wrap-prefix (make-parameter "")) -(define (wprintf fmt . args) - (let ([o (current-output-port)] - [wcol (wrap-column)] - [pfx (wrap-prefix)] - [strs (regexp-split #rx" +" (apply format fmt args))]) - (write-string (car strs) o) - (for ([str (in-list (cdr strs))]) - (define-values [line col pos] (port-next-location o)) - (define vcol - (if (eq? line last-output-line) (- col last-output-visual-col) col)) - (if ((+ vcol (string-length str)) . >= . wcol) - (begin (newline o) (write-string pfx o)) - (write-string " " o)) - (write-string str o)))) - -;; ---------------------------------------------------------------------------- -;; toplevel "," commands management - -(struct command (names argline blurb desc handler)) -(define commands (make-hasheq)) -(define commands-list '()) ; for help displays, in definition order -(define current-command (make-parameter #f)) -(define (register-command! names blurb argline desc handler) - (let* ([names (if (list? names) names (list names))] - [cmd (command names blurb argline desc handler)]) - (for ([n (in-list names)]) - (if (hash-ref commands n #f) - (error 'defcommand "duplicate command name: ~s" n) - (hash-set! commands n cmd))) - (set! commands-list (cons cmd commands-list)))) -(define-syntax-rule (defcommand cmd+aliases argline blurb [desc ...] - body0 body ...) - (register-command! `cmd+aliases `argline `blurb `(desc ...) - (λ () body0 body ...))) - -(define (cmderror fmt #:default-who [dwho #f] . args) - (let ([cmd (current-command)]) - (raise-user-error (or (and cmd (string->symbol (format ",~a" cmd))) - dwho '???) - (apply format fmt args)))) - -;; returns first peeked non-space/tab char (#\return is considered space too) -(define string->list* - (let ([t (make-weak-hasheq)]) ; good for string literals - (λ (s) (hash-ref! t s (λ () (string->list s)))))) -(define (skip-spaces/peek [skip " \t\r"]) - (let ([skip (string->list* skip)]) - (let loop () - (let ([ch (peek-char)]) - (if (memq ch skip) (begin (read-char) (loop)) ch))))) - -(define (here-path [no-path eof]) - (let ([x (here-source)]) (if (path? x) x no-path))) -(define (here-mod-or-eof) - (let ([x (here-source)]) - (if (not x) - eof - (datum->syntax #f - (cond [(symbol? x) (and (module-name? x) `',x)] - [(path? x) (let ([s (path->string x)]) - (if (absolute-path? x) `(file ,s) s))] - [else (error 'here-mod-or-eof "internal error: ~s" x)]))))) - -(define (getarg kind [flag 'req] #:default [dflt #f]) - (define (argerror fmt . args) - (apply cmderror #:default-who 'getarg fmt args)) - (define (missing) (argerror "missing ~a argument" kind)) - (define (get read) - (define (get-one) - (cond [(eq? read read-line-arg) (read)] - [(eq? #\newline (skip-spaces/peek)) eof] - [else (read)])) - (define (get-list) - (let ([x (get-one)]) (if (eof-object? x) '() (cons x (get-list))))) - (define 1st (get-one)) - (define 1st? (not (eof-object? 1st))) - (define (dflt*) (let ([r (dflt)]) (if (eof-object? r) (missing) r))) - (case flag - [(req opt) (cond [1st? 1st] [dflt (dflt*)] - [(eq? 'opt flag) #f] [else (missing)])] - [(list list+) - (cond [1st? (cons 1st (get-list))] [dflt (list (dflt*))] - [(eq? 'list flag) '()] [else (missing)])] - [else (error 'getarg "unknown flag: ~e" flag)])) - (define (read-string-arg) - (define ch (skip-spaces/peek " \t\r\n")) - (let* ([i (current-input-port)] - [m (if (eq? ch #\") - (let ([m (regexp-match #px#"((?:\\\\.|[^\"\\\\]+)+)\"" i)]) - (and m (regexp-replace* #rx#"\\\\(.)" (cadr m) #"\\1"))) - (cond [(regexp-match #px#"\\S+" i) => car] [else #f]))]) - (if m (bytes->string/locale m) eof))) - (define (read-line-arg) - (regexp-replace* #px"^\\s+|\\s+$" (read-line) "")) - (define (process-modspec spec) - ;; convenience: symbolic modspecs that name a file turn to a `file' spec, - ;; and those that name a known module turn to a (quote sym) spec - (define dtm (if (syntax? spec) (syntax->datum spec) spec)) - (if (not (symbol? dtm)) - spec - (let* (;; try a file - [f (expand-user-path (symbol->string dtm))] - [f (and (file-exists? f) (path->string f))] - [f (and f (if (absolute-path? f) `(file ,f) f))] - ;; try a quoted one if the above failed - [m (or f (and (module-name? dtm) `',dtm))] - [m (and m (if (syntax? spec) (datum->syntax spec m spec) m))]) - (or m spec)))) - (define (translate arg convert) - (and arg (if (memq flag '(list list+)) (map convert arg) (convert arg)))) - (let loop ([kind kind]) - (case kind - [(line) (get read-line-arg)] - [(string) (get read-string-arg)] - [(path) (translate (loop 'string) expand-user-path)] - [(sexpr) (get read)] - [(syntax) (translate (get read-syntax) namespace-syntax-introduce)] - [(modspec) (translate (loop 'syntax) process-modspec)] - [else (error 'getarg "unknown arg kind: ~e" kind)]))) - -(define (run-command cmd) - (parameterize ([current-command cmd]) - (with-handlers ([void (λ (e) - (if (exn? e) - (eprintf "~a\n" (exn-message e)) - (eprintf "~s\n" e)))]) - ((command-handler (or (hash-ref commands cmd #f) - (error "Unknown command:" cmd))))))) - -(defcommand (help h ?) "[]" - "display available commands" - ["Lists known commands and their help; use with a command name to get" - "additional information for that command."] - (define arg (match (getarg 'sexpr 'opt) [(list 'unquote x) x] [x x])) - (define cmd - (and arg (hash-ref commands arg - (λ () (printf "*** Unknown command: `~s'\n" arg) #f)))) - (define (show-cmd cmd indent) - (define names (command-names cmd)) - (printf "~a~s" indent (car names)) - (when (pair? (cdr names)) (printf " ~s" (cdr names))) - (printf ": ~a\n" (command-blurb cmd))) - (if cmd - (begin (show-cmd cmd "; ") - (printf "; usage: ,~a" arg) - (let ([a (command-argline cmd)]) (when a (printf " ~a" a))) - (printf "\n") - (for ([d (in-list (command-desc cmd))]) - (printf "; ~a\n" d))) - (begin (printf "; Available commands:\n") - (for-each (λ (c) (show-cmd c "; ")) (reverse commands-list))))) - -;; ---------------------------------------------------------------------------- -;; generic commands - -(defcommand (exit quit ex) "[]" - "exit racket" - ["Optional argument specifies exit code."] - (cond [(getarg 'sexpr 'opt) => exit] [else (exit)])) - -(define last-2dirs - (make-parameter (let ([d (current-directory)]) (cons d d)))) -(define (report-directory-change [mode #f]) - (define curdir (current-directory)) - (define (report) ; remove last "/" and say where we are - (define-values [base name dir?] (split-path curdir)) - (printf "; now in ~a\n" (if base (build-path base name) curdir))) - (cond [(not (equal? (car (last-2dirs)) curdir)) - (last-2dirs (cons curdir (car (last-2dirs)))) - (report)] - [else (case mode - [(pwd) (report)] - [(cd) (printf "; still in the same directory\n")])])) - -(defcommand cd "[]" - "change the current directory" - ["Sets `current-directory'; expands user paths. With no arguments, goes" - "to your home directory. An argument of `-' indicates the previous" - "directory."] - (let* ([arg (or (getarg 'path 'opt) home-dir)] - [arg (if (equal? arg (string->path "-")) (cdr (last-2dirs)) arg)]) - (if (directory-exists? arg) - (begin (current-directory arg) (report-directory-change 'cd)) - (eprintf "cd: no such directory: ~a\n" arg)))) - -(defcommand pwd #f - "display the current directory" - ["Displays the value of `current-directory'."] - (report-directory-change 'pwd)) - -(defcommand (shell sh ls cp mv rm md rd git svn) "" - "run a shell command" - ["`sh' runs a shell command (via `system'), the aliases run a few useful" - "unix commands. (Note: `ls' has some default arguments set.)" - "If the REPL is inside some module's namespace, the command can use $F" - "which is set to the full path to this module's source file."] - (let* ([arg (getarg 'line)] - [arg (if (equal? "" arg) #f arg)] - [cmd (current-command)]) - (case cmd - [(ls) (set! cmd "ls -F")] - [(shell) (set! cmd 'sh)]) - (let ([cmd (cond [(eq? 'sh cmd) #f] - [(symbol? cmd) (symbol->string cmd)] - [else cmd])] - [here (here-path #f)]) - (putenv "F" (if here (path->string here) "")) - (unless (system (cond [(and (not cmd) (not arg)) (getenv "SHELL")] - [(not cmd) arg] - [(not arg) cmd] - [else (string-append cmd " " arg)])) - (eprintf "(exit with an error status)\n")) - (when here (putenv "F" ""))))) - -(defcommand (edit e) " ..." - "edit files in your $EDITOR" - ["Runs your $EDITOR with the specified file/s. If no files are given, and" - "the REPL is currently inside a module, the file for that module is used." - "If $EDITOR is not set, the ,drracket will be used instead."] - (define env (let ([e (getenv "EDITOR")]) (and (not (equal? "" e)) e))) - (define exe (and env (find-executable-path env))) - (cond [(not env) - (printf "~a, using the ,drracket command.\n" - (if env - (string-append "$EDITOR ("env") not found in your path") - "no $EDITOR variable")) - (run-command 'drracket)] - [(not (apply system* exe (getarg 'path 'list #:default here-path))) - (eprintf "(exit with an error status)\n")] - [else (void)])) - -(define ->running-dr #f) -(define (->dr . xs) (unless ->running-dr (start-dr)) (->running-dr xs)) -(define (start-dr) - (printf "; starting DrRacket...\n") - (define c (make-custodian)) - (define ns ((dynamic-require 'racket/gui 'make-gui-namespace))) - (parameterize ([current-custodian c] - [current-namespace ns] - [exit-handler (λ (x) - (eprintf "DrRacket shutdown.\n") - (set! ->running-dr #f) - (custodian-shutdown-all c))]) - ;; construct a kind of a fake sandbox to run drracket in - (define es - (eval '(begin (require racket/class racket/gui framework racket/file) - (define es (make-eventspace)) - es))) - (define (E expr) - (parameterize ([current-custodian c] - [current-namespace ns] - [(eval 'current-eventspace ns) es]) - (eval expr ns))) - (E '(begin - (define c (current-custodian)) - (define-syntax-rule (Q expr ...) - (parameterize ([current-eventspace es]) - (queue-callback - (λ () (parameterize ([current-custodian c]) expr ...))))) - ;; problem: right after we read commands, readline will save a new - ;; history in the prefs file which frequently collides with drr; so - ;; make it use a writeback thing, with silent failures. (actually, - ;; this is more likely a result of previously starting drr wrongly, - ;; but keep this anyway.) - (let ([t (make-hasheq)] [dirty '()]) - (preferences:low-level-get-preference - (λ (sym [dflt (λ () #f)]) - (hash-ref t sym - (λ () (let ([r (get-preference sym dflt)]) - (hash-set! t sym r) - r))))) - (preferences:low-level-put-preferences - (λ (prefs vals) - (Q (set! dirty (append prefs dirty)) - (for ([pref (in-list prefs)] [val (in-list vals)]) - (hash-set! t pref val))))) - (define (flush-prefs) - (set! dirty (remove-duplicates dirty)) - (with-handlers ([void void]) - (put-preferences dirty (map (λ (p) (hash-ref t p)) dirty)) - (set! dirty '()))) - (exit:insert-on-callback flush-prefs) - (define (write-loop) - (sleep (random 4)) - (when (pair? dirty) (Q (flush-prefs))) - (write-loop)) - (define th (thread write-loop)) - (exit:insert-on-callback (λ () (Q (kill-thread th))))) - ;; start it - (Q (dynamic-require 'drracket #f)) - ;; hide the first untitled window, so drr runs in "server mode" - (Q (dynamic-require 'drracket/tool-lib #f)) - (define top-window - (let ([ch (make-channel)]) - (Q (let ([r (get-top-level-windows)]) - (channel-put ch (and (pair? r) (car r))))) - (channel-get ch))) - (Q (when top-window (send top-window show #f)) - ;; and avoid trying to open new windows in there - (send (group:get-the-frame-group) clear)) - ;; avoid being able to quit so the server stays running, - ;; also hack: divert quitting into closing all group frames - (define should-exit? #f) - (exit:insert-can?-callback - (λ () (or should-exit? - (let ([g (group:get-the-frame-group)]) - (when (send g can-close-all?) (send g on-close-all)) - #f)))) - (require drracket/tool-lib))) ; used as usual below - (define (new) - (E '(Q (drracket:unit:open-drscheme-window #f)))) - (define open - (case-lambda - [() (E '(Q (handler:open-file)))] - [paths - (let ([paths (map path->string paths)]) - (E `(Q (let ([f (drracket:unit:open-drscheme-window ,(car paths))]) - (send f show #t) - ,@(for/list ([p (in-list (cdr paths))]) - `(begin (send f open-in-new-tab ,p) - (send f show #t)))))))])) - (define (quit) - (E `(Q (set! should-exit? #t) (exit:exit)))) - (define (loop) - (define m (thread-receive)) - (if (pair? m) - (let ([proc (case (car m) [(new) new] [(open) open] [(quit) quit] - [else (cmderror "unknown flag: -~a" (car m))])]) - (if (procedure-arity-includes? proc (length (cdr m))) - (apply proc (cdr m)) - (cmderror "bad number of arguments for the -~a flag" (car m)))) - (error '->dr "internal error")) - (loop)) - (define th (thread loop)) - (set! ->running-dr (λ (xs) (thread-send th xs))))) -(defcommand (drracket dr drr) "[-flag] ..." - "edit files in DrRacket" - ["Runs DrRacket with the specified file/s. If no files are given, and" - "the REPL is currently inside a module, the file for that module is used." - "DrRacket is launched directly, without starting a new subprocess, and it" - "is kept running in a hidden window so further invocations are immediate." - "In addition to file arguments, the arguments can have a flag that" - "specifies one of a few operations for the running DrRacket:" - "* -new: opens a new editing window. This is the default when no files are" - " given and the REPL is not inside a module," - "* -open: opens the specified file/s (or the current module's file). This" - " is the default when files are given or when inside a module." - "* -quit: exits the running instance. Quitting the application as usual" - " will only close the visible window, but it will still run in a hidden" - " window. This command should not be needed under normal circumstances."] - (let ([args (getarg 'path 'list #:default here-path)]) - (if (null? args) - (->dr 'new) - (let* ([cmd (let ([s (path->string (car args))]) - (and (regexp-match? #rx"^-" s) - (string->symbol (substring s 1))))] - [args (if cmd (cdr args) args)]) - (apply ->dr (or cmd 'open) args))))) - -;; ---------------------------------------------------------------------------- -;; binding related commands - -(defcommand (apropos ap) " ..." - "look for a binding" - ["Additional arguments restrict the shown matches. The search specs can" - "have symbols (which specify what to look for in bound names), and regexps" - "(for more complicated matches)."] - (let* ([look (map (λ (s) (cond [(symbol? s) - (regexp (regexp-quote (symbol->string s)))] - [(regexp? s) s] - [else (cmderror "bad search spec: ~e" s)])) - (getarg 'sexpr 'list))] - [look (and (pair? look) - (λ (str) (andmap (λ (rx) (regexp-match? rx str)) look)))] - [syms (map (λ (sym) (cons sym (symbol->string sym))) - (namespace-mapped-symbols))] - [syms (if look (filter (λ (s) (look (cdr s))) syms) syms)] - [syms (sort syms string] ..." - "describe a (bound) identifier" - ["For a bound identifier, describe where is it coming from; for a known" - "module, describe its imports and exports. You can use this command with" - "several identifiers. An optional numeric argument specifies phase for" - "identifier lookup."] - (define-values [try-mods? level ids/mods] - (let ([xs (getarg 'syntax 'list)]) - (if (and (pair? xs) (number? (syntax-e (car xs)))) - (values #f (syntax-e (car xs)) (cdr xs)) - (values #t 0 xs)))) - (for ([id/mod (in-list ids/mods)]) - (define dtm (syntax->datum id/mod)) - (define mod - (and try-mods? - (match dtm - [(list 'quote (and sym (? module-name?))) sym] - [(? module-name?) dtm] - [_ (let ([x (with-handlers ([exn:fail? (λ (_) #f)]) - (modspec->path dtm))]) - (cond [(or (not x) (path? x)) x] - [(symbol? x) (and (module-name? x) `',x)] - [else (error 'describe "internal error: ~s" x)]))]))) - (define bind - (cond [(identifier? id/mod) (identifier-binding id/mod level)] - [mod #f] - [else (cmderror "not an identifier or a known module: ~s" dtm)])) - (define bind? (or bind (not mod))) - (when bind? (describe-binding dtm bind level)) - (when mod (describe-module dtm mod bind?)))) -(define (describe-binding sym b level) - (define at-phase (phase->name level " (~a)")) - (cond - [(not b) - (printf "; `~s' is a toplevel (or unbound) identifier~a\n" sym at-phase)] - [(eq? b 'lexical) - (printf "; `~s' is a lexical identifier~a\n" sym at-phase)] - [(or (not (list? b)) (not (= 7 (length b)))) - (cmderror "*** internal error, racket changed ***")] - [else - (define-values [src-mod src-id nominal-src-mod nominal-src-id - src-phase import-phase nominal-export-phase] - (apply values b)) - (set! src-mod (->relname (mpi->name src-mod))) - (set! nominal-src-mod (->relname (mpi->name nominal-src-mod))) - (printf "; `~s' is a bound identifier~a,\n" sym at-phase) - (printf "; defined~a in ~a~a\n" (phase->name src-phase "-~a") src-mod - (if (not (eq? sym src-id)) (format " as `~s'" src-id) "")) - (printf "; required~a ~a\n" (phase->name import-phase "-~a") - (if (equal? src-mod nominal-src-mod) - "directly" - (format "through \"~a\"~a" - nominal-src-mod - (if (not (eq? sym nominal-src-id)) - (format " where it is defined as `~s'" nominal-src-id) - "")))) - (printf "~a" (phase->name nominal-export-phase "; (exported-~a)\n"))])) -(define (describe-module sexpr mod-path/sym also?) - (define get - (if (symbol? mod-path/sym) - (let ([spec `',mod-path/sym]) - (λ (imp?) ((if imp? module->imports module->exports) spec))) - (let ([code (get-module-code mod-path/sym)]) - (λ (imp?) - ((if imp? module-compiled-imports module-compiled-exports) code))))) - (define (phase p1 0) (> p2 0)) (< p1 p2)] - [(and (< p1 0) (< p2 0)) (> p1 p2)] - [else (> p1 0)])) - (define (modnamestring x) (symbol->string y))] - [(and (symbol? x) (string? y)) #t] - [(and (string? x) (symbol? y)) #f] - [else (error 'describe-module "internal error: ~s, ~s" x y)])) - (define imports - (filter-map - (λ (x) - (and (pair? (cdr x)) - (cons (car x) (sort (map (λ (m) (->relname (mpi->name m))) (cdr x)) - modnamerelname mod-path/sym)]) - (printf "; ~a~a\n" - (if (symbol? relname) "defined directly as '" "located at ") - relname)) - (if (null? imports) - (printf "; no imports.\n") - (parameterize ([wrap-prefix "; "]) - (for ([imps (in-list imports)]) - (let ([phase (car imps)] [imps (cdr imps)]) - (wprintf "; imports~a: ~a" (phase->name phase "-~a") (car imps)) - (for ([imp (in-list (cdr imps))]) (wprintf ", ~a" imp)) - (wprintf ".\n"))))) - (define (show-exports exports kind) - (parameterize ([wrap-prefix "; "]) - (for ([exps (in-list exports)]) - (let ([phase (car exps)] [exps (cdr exps)]) - (wprintf "; direct ~a exports~a: ~a" - kind (phase->name phase "-~a") (car exps)) - (for ([exp (in-list (cdr exps))]) (wprintf ", ~a" exp)) - (wprintf ".\n"))))) - (if (and (null? val-exports) (null? stx-exports)) - (printf "; no direct exports.\n") - (begin (show-exports val-exports "value") - (show-exports stx-exports "syntax")))) - -(define help-id (make-lazy-identifier 'help 'racket/help)) -(defcommand doc " ..." - "browse the racket documentation" - ["Uses Racket's `help' to browse the documentation. (Note that this can be" - "used even in languages that don't have the `help' binding.)"] - (eval-sexpr-for-user `(,(help-id) ,@(getarg 'syntax 'list)))) - -;; ---------------------------------------------------------------------------- -;; require/load commands - -(defcommand (require req r) " ...+" - "require a module" - ["The arguments are usually passed to `require', unless an argument" - "specifies an existing filename -- in that case, it's like using a" - "\"string\" or a (file \"...\") in `require'. (Note: this does not" - "work in subforms.)"] - (more-inputs #`(require #,@(getarg 'modspec 'list+)))) ; use *our* `require' - -(define rr-modules (make-hash)) ; hash to remember reloadable modules - -(define last-rr-specs '()) - -(defcommand (require-reloadable reqr rr) " ..." - "require a module, make it reloadable" - ["Same as ,require but the module is required in a way that makes it" - "possible to reload later. If it was already loaded then it is reloaded." - "Note that this is done by setting `compile-enforce-module-constants' to" - "#f, which prohibits some optimizations."] - (let ([s (getarg 'modspec 'list)]) (when (pair? s) (set! last-rr-specs s))) - (when (null? last-rr-specs) (cmderror "missing modspec arguments")) - (parameterize ([compile-enforce-module-constants - (compile-enforce-module-constants)]) - (compile-enforce-module-constants #f) - (for ([spec (in-list last-rr-specs)]) - (define datum (syntax->datum spec)) - (define resolved ((current-module-name-resolver) datum #f #f #f)) - (define path (resolved-module-path-name resolved)) - (if (hash-ref rr-modules resolved #f) - ;; reload - (begin (printf "; reloading ~a\n" path) - (parameterize ([current-module-declare-name resolved]) - (load/use-compiled path))) - ;; require - (begin (hash-set! rr-modules resolved #t) - (printf "; requiring ~a\n" path) - ;; (namespace-require spec) - (eval #`(require #,spec))))))) - -(define enter!-id (make-lazy-identifier 'enter! 'racket/enter)) - -(defcommand (enter en) "[] [noisy?]" - "require a module and go into its namespace" - ["Uses `enter!' to go into the module's namespace. A module name can" - "specify an existing file as with the ,require command. If no module is" - "given, and the REPL is already in some module's namespace, then `enter!'" - "is used with that module, causing it to reload if needed. (Note that this" - "can be used even in languages that don't have the `enter!' binding.)"] - (eval-sexpr-for-user `(,(enter!-id) - ,(getarg 'modspec #:default here-mod-or-eof) - ,@(getarg 'syntax 'list) - #:dont-re-require-enter))) - -(defcommand (toplevel top) #f - "go back to the toplevel" - ["Go back to the toplevel, same as ,enter with no arguments."] - (eval-sexpr-for-user `(,(enter!-id) #f))) - -(defcommand (load ld) " ..." - "load a file" - ["Uses `load' to load the specified file(s)."] - (more-inputs* (map (λ (name) #`(load #,name)) (getarg 'path 'list)))) - -;; ---------------------------------------------------------------------------- -;; debugging commands - -;; not useful: catches only escape continuations -;; (define last-break-exn (make-parameter #f)) -;; (defcommand (continue cont) #f -;; "continue from a break" -;; ["Continue running from the last break."] -;; (if (last-break-exn) -;; ((exn:break-continuation (last-break-exn))) -;; (cmderror 'continue "no break exception to continue from"))) - -(define time-id - (make-lazy-identifier 'time* '(only-in unstable/time [time time*]))) -(defcommand time "[] ..." - "time an expression" - ["Times execution of an expression, similar to `time' but prints a" - "little easier to read information. You can provide an initial number" - "that specifies how many times to run the expression -- in this case," - "the expression will be executed that many times, extreme results are" - "removed (top and bottom 2/7ths), and the remaining results will be" - "averaged. Two garbage collections are triggered before each run; the" - "resulting value(s) are from the last run."] - (more-inputs #`(#,(time-id) #,@(getarg 'syntax 'list)))) - -(define trace-id (make-lazy-identifier 'trace 'racket/trace)) -(defcommand (trace tr) " ..." - "trace a function" - ["Traces a function (or functions), using the `racket/trace' library."] - (eval-sexpr-for-user `(,(trace-id) ,@(getarg 'syntax 'list)))) - -(define untrace-id (make-lazy-identifier 'untrace 'racket/trace)) -(defcommand (untrace untr) " ..." - "untrace a function" - ["Untraces functions that were traced with ,trace."] - (eval-sexpr-for-user `(,(untrace-id) ,@(getarg 'syntax 'list)))) - -(defautoload errortrace - profiling-enabled instrumenting-enabled clear-profile-results - output-profile-results execute-counts-enabled annotate-executed-file) - -(defcommand (errortrace errt inst) "[]" - "errortrace instrumentation control" - ["An argument is used to perform a specific operation:" - " + : turn errortrace instrumentation on (effective only for code that is" - " evaluated from now on)" - " - : turn it off (also only for future evaluations)" - " ? : show status without changing it" - "With no arguments, toggles instrumentation."] - (case (getarg 'sexpr 'opt) - [(#f) (if (autoloaded? 'errortrace) - (instrumenting-enabled (not (instrumenting-enabled))) - (instrumenting-enabled #t))] - [(-) (when (autoloaded? 'errortrace) (instrumenting-enabled #f))] - [(+) (instrumenting-enabled #t)] - [(?) (void)] - [else (cmderror "unknown subcommand")]) - (if (autoloaded? 'errortrace) - (printf "; errortrace instrumentation is ~a\n" - (if (instrumenting-enabled) "on" "off")) - (printf "; errortrace not loaded\n"))) - -(define profile-id - (make-lazy-identifier 'profile 'profile)) -(define (statistical-profiler) - (more-inputs #`(#,(profile-id) #,(getarg 'syntax)))) -(define (errortrace-profiler) - (instrumenting-enabled #t) - (define flags (regexp-replace* #rx"[ \t]+" (getarg 'line) "")) - (for ([cmd (in-string (if (equal? "" flags) - (if (profiling-enabled) "*!" "+") - flags))]) - (case cmd - [(#\+) (profiling-enabled #t) (printf "; profiling is on\n")] - [(#\-) (profiling-enabled #f) (printf "; profiling is off\n")] - [(#\*) (output-profile-results #f #t)] - [(#\#) (output-profile-results #f #f)] - [(#\!) (clear-profile-results) (printf "; profiling data cleared\n")] - [else (cmderror "unknown subcommand")]))) -(defcommand (profile prof) "[ | ...]" - "profiler control" - ["Runs either the exact errortrace-based profiler, or the statistical one." - "* If a parenthesized expression is given, run the statistical profiler" - " while running it. This profiler requires no special setup and adds" - " almost no overhead, it samples stack traces as execution goes on." - "* Otherwise the errortrace profiler is used. This profiler produces" - " precise results, but like other errortrace uses, it must be enabled" - " before loading the code and it adds noticeable overhead. In this case," - " an argument is used to determine a specific operation:" - " + : turn the profiler on (effective only for code that is evaluated" - " from now on)" - " - : turn the profiler off (also only for future evaluations)" - " * : show profiling results by time" - " # : show profiling results by counts" - " ! : clear profiling results" - " Multiple flags can be combined, for example \",prof *!-\" will show" - " profiler results, clear them, and turn it off." - "* With no arguments, turns the errortrace profiler on if it's off, and if" - " it's on it shows the collected results and clears them." - "Note: using no arguments or *any* of the flags turns errortrace" - " instrumentation on, even a \",prof -\". Use the ,errortrace command if" - " you want to turn instrumentation off."] - (if (memq (skip-spaces/peek) '(#\( #\[ #\{)) - (statistical-profiler) - (errortrace-profiler))) - -(defcommand execution-counts " ..." - "execution counts" - ["Enable errortrace instrumentation for coverage, require the file(s)," - "display the results, disables coverage, and disables instrumentation if" - "it wasn't previously turned on."] - (let ([files (getarg 'path 'list)] - [inst? (and (autoloaded? 'errortrace) (instrumenting-enabled))]) - (more-inputs - (λ () - (instrumenting-enabled #t) - (execute-counts-enabled #t)) - #`(require #,@(map (λ (file) `(file ,(path->string file))) files)) - (λ () - (for ([file (in-list files)]) - (annotate-executed-file file " 123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"))) - (λ () - (execute-counts-enabled #f) - (unless inst? (instrumenting-enabled #f)))))) - -(defautoload racket/sandbox - make-module-evaluator kill-evaluator call-with-trusted-sandbox-configuration - sandbox-coverage-enabled get-uncovered-expressions) - -(defcommand (coverage cover) "" - "coverage information via a sandbox" - ["Runs the given file in a (trusted) sandbox, and annotates it with" - "uncovered expression information."] - (let ([file (getarg 'path)]) - (sandbox-coverage-enabled) ; autoload it - (parameterize ([sandbox-coverage-enabled #t]) - (define e - (call-with-trusted-sandbox-configuration - (λ () (make-module-evaluator file)))) - (define uncovered - (map (λ (x) (let ([p (sub1 (syntax-position x))]) - (cons p (+ p (syntax-span x))))) - (get-uncovered-expressions e #t))) - (kill-evaluator e) - (call-with-input-file file - (λ (inp) - ;; this is a naive and inefficient solution, could be made efficient - ;; using `mzlib/integer-set' - (let loop () - (let* ([start (file-position inp)] - [line (read-line inp)] - [len (and (string? line) (string-length line))] - [end (and len (+ len start))] - [indent (and len (regexp-match-positions #px"\\S" line))] - [indent (and indent (caar indent))]) - (when len - (displayln line) - (when indent - (string-fill! line #\space) - (for ([u (in-list uncovered)]) - (when (and ((car u) . < . end) - ((cdr u) . > . indent)) - (for ([i (in-range (max (- (car u) start) indent) - (min (- (cdr u) start) len))]) - (string-set! line i #\^)))) - (displayln (regexp-replace #rx" +$" line ""))) - (loop))))))))) - -;; ---------------------------------------------------------------------------- -;; namespace switching - -(define default-namespace-name '*) -(define current-namespace-name (make-parameter default-namespace-name)) -(define namespaces - (let* ([r (namespace-symbol->identifier '#%top-interaction)] - [r (identifier-binding r)] - [r (and r (mpi->name (caddr r)))] - [t (make-hasheq)]) - (hash-set! t (current-namespace-name) (cons (current-namespace) r)) - t)) -(defcommand (switch-namespace switch) "[] [? | - | ! []]" - "switch to a different repl namespace" - ["Switch to the namespace, creating it if needed. The of a" - "namespace is a symbol or an integer where a `*' indicates the initial one;" - "it is only used to identify namespaces for this command (so don't confuse" - "it with racket bindings). A new namespace is initialized using the name" - "of the namespace (if it's require-able), or using the same initial module" - "that was used for the current namespace. If `! ' is used, it" - "indicates that a new namespace will be created even if it exists, using" - "`' as the initial module, and if just `!' is used, then this happens" - "with the existing namespace's init or with the current one's. You can" - "also use `-' and a name to drop the corresponding namespace (allowing it" - "to be garbage-collected), and `?' to list all known namespaces." - "A few examples:" - " ,switch ! reset the current namespace" - " ,switch ! racket reset it using the `racket' language" - " ,switch r5rs switch to a new `r5rs' namespace" - " ,switch foo switch to `foo', creating it if it doesn't exist" - " ,switch foo ! racket switch to newly made `foo', even if it exists" - " ,switch foo ! same, but using the same as it was created" - " with, or same as the current if it's new" - " ,switch ? list known namespaces, showing the above two" - " ,switch - r5rs drop the `r5rs' namespace" - "(Note that you can use `^' etc to communicate values between namespaces.)"] - (define (list-namespaces) - (printf "; namespaces and their languages:\n") - (define nss (sort (map (λ (x) (cons (format "~s" (car x)) (cddr x))) - (hash-map namespaces cons)) - string no need to set the current directory - (file-exists? (modspec->path name)))) - ;; if there's an , then it must be forced - (let* ([name (or name (current-namespace-name))] - [init - (cond [init] - [(or force-reset? (not (hash-ref namespaces name #f))) - (when (eq? name default-namespace-name) - ;; no deep reason for this, but might be usful to keep it - ;; possible to ,en xrepl/xrepl to change options etc - (cmderror "cannot reset the default namespace")) - (cdr (or (hash-ref namespaces name #f) - (and (is-require-able? name) (cons #f name)) - (hash-ref namespaces (current-namespace-name) #f) - ;; just in case - (hash-ref namespaces default-namespace-name #f)))] - [else #f])]) - (when init - (printf "; *** ~a `~s' namespace with ~s ***\n" - (if (hash-ref namespaces name #f) - "Resetting the" "Initializing a new") - name - (->relname init)) - (current-namespace (make-base-empty-namespace)) - (namespace-require init) - (hash-set! namespaces name (cons (current-namespace) init)))) - (when (and name (not (eq? name (current-namespace-name)))) - (printf "; *** Switching to the `~s' namespace ***\n" name) - (let ([x (hash-ref namespaces (current-namespace-name))]) - (unless (eq? (car x) old-namespace) - (printf "; (note: saving current namespace for `~s')\n" - (current-namespace-name)) - (hash-set! namespaces (current-namespace-name) - (cons old-namespace (cdr x))))) - (current-namespace-name name) - (current-namespace (car (hash-ref namespaces name))))) - (define (syntax-error) - (cmderror "syntax error, see ,help switch-namespace")) - (match (getarg 'sexpr 'list) - [(list) (cmderror "what do you want to do?")] - [(list '?) (list-namespaces)] - [(list '? _ ...) (syntax-error)] - [(list '- name) (delete name)] - [(list '- _ ...) (syntax-error)] - [(list '!) (switch #f #t #f )] - [(list '! init) (switch #f #t init)] - [(list name) (switch name #f #f )] - [(list name '!) (switch name #t #f )] - [(list name '! init) (switch name #t init)] - [_ (syntax-error)])) - -;; ---------------------------------------------------------------------------- -;; syntax commands - -(define current-syntax (make-parameter #f)) -(defautoload racket/pretty pretty-write) -(defautoload macro-debugger/stepper-text expand/step-text) -(define not-in-base - (λ () (let ([base-stxs #f]) - (unless base-stxs - (set! base-stxs ; all ids that are bound to a syntax in racket/base - (parameterize ([current-namespace hidden-namespace]) - (let-values ([(vals stxs) (module->exports 'racket/base)]) - (map (λ (s) (namespace-symbol->identifier (car s))) - (cdr (assq 0 stxs))))))) - (λ (id) (not (ormap (λ (s) (free-identifier=? id s)) base-stxs)))))) -(define (macro-stepper . args) - (define-values [i o] (make-pipe)) - (parameterize ([current-output-port o]) - (thread (λ () (apply expand/step-text args) (close-output-port o)))) - (let loop () - (define l (read-line i)) - (unless (eof-object? l) - ;; hack: beautify the stepper's output -- remove empty line, indent code - (unless (equal? "" l) - (printf (if (regexp-match? #px"^[A-Z][a-z]+\\b" l) - "; ---- ~a ----\n" "; ~a\n") - l)) - (loop)))) -(defcommand (syntax stx st) "[] [ ...]" - "set syntax object to inspect, and control it" - ["With no arguments, will show the previously set (or expanded) syntax" - "additional arguments serve as an operation to perform:" - "- `^' sets the syntax from the last entered expression" - "- other sexprs set the current syntax explicitly" - "- `+' will `expand-once' the syntax and show the result (can be used again" - " for additional `expand-once' steps)" - "- `!' will `expand' the syntax and show the result" - "- `*' will use the syntax stepper to show expansion steps, leaving macros" - " from racket/base intact (does not change the currently set syntax)" - "- `**' similar to `*', but expanding everything" - "Note that you can specify several syntaxes and operations in a single" - "invocation."] - (define args (getarg 'syntax 'list)) - (for ([stx (in-list (if (null? args) '(#f) args))]) - (define (show/set label stx) - (printf "; ~a\n" label) - (current-syntax stx) - (display "; ") (pretty-write (syntax->datum stx))) - (define (cur) (or (current-syntax) (cmderror "no syntax set yet"))) - (case (and stx (if (identifier? stx) (syntax-e stx) '--none--)) - [(#f) (show/set "Current syntax:" (cur))] - [(^) (if (last-input-syntax) - (show/set "Using last expression:" (last-input-syntax)) - (cmderror "no expression entered yet"))] - [(+) (show/set "expand-once ->" (expand-once (cur)))] - [(!) (show/set "expand ->" (expand (cur)))] - [(*) (printf "; Stepper:\n") (macro-stepper (cur) (not-in-base))] - [(**) (printf "; Stepper:\n") (macro-stepper (cur))] - [else - (if (syntax? stx) - (begin (printf "; Syntax set\n") (current-syntax stx)) - (cmderror "internal error: ~s ~s" stx (syntax? stx)))]))) - -;; ---------------------------------------------------------------------------- -;; dynamic log output control - -(define current-log-receiver-thread (make-parameter #f)) -(define global-logger (current-logger)) - -(defcommand log "" - "control log output" - ["Starts (or stops) logging events at the given level. The level should be" - "one of the valid racket logging levels, or #f for no logging. For" - "convenience, the level can also be #t (maximum logging) or an integer" - "(with 0 for no logging, and larger numbers for more logging output)."] - (define levels '(#f fatal error warning info debug)) - (define level - (let ([l (getarg 'sexpr)]) - (cond [(memq l levels) l] - [(memq l '(#f none -)) #f] - [(memq l '(#t all +)) (last levels)] - [(not (integer? l)) - (cmderror "bad level, expecting one of: ~s" levels)] - [(<= l 0) #f] - [(< l (length levels)) (list-ref levels l)] - [else (last levels)]))) - (cond [(current-log-receiver-thread) => kill-thread]) - (when level - (let ([r (make-log-receiver global-logger level)]) - (current-log-receiver-thread - (thread - (λ () - (let loop () - (match (sync r) - [(vector l m v) - (display (format "; [~a] ~a~a\n" - l m (if v (format " ~.s" v) ""))) - (flush-output)]) - (loop)))))))) - -;; ---------------------------------------------------------------------------- -;; meta evaluation hook - -;; questionable value, (and need to display the resulting values etc) -#; -(defcommand meta "" - "meta evaluation" - ["Evaluate the given expression where bindings are taken from the xrepl" - "module. This is convenient when you're in a namespace that does not have" - "a specific binding -- for example, you might be using a language that" - "doesn't have `current-namespace', so to get it, you can use" - "`,eval (current-namespace)'. The evaluation happens in the repl namespace" - "as usual, only the bindings are taken from the xrepl module -- so you can" - "use `^' to refer to the result of such an evaluation."] - (eval (datum->syntax #'here `(#%top-interaction . ,(getarg 'sexpr)))) - (void)) - -;; ---------------------------------------------------------------------------- -;; setup xrepl in the user's racketrc file - -(define init-file (find-system-path 'init-file)) -(defcommand install! #f - "install xrepl in your Racket init file" - ["Installs xrepl in your Racket REPL initialization file. This is done" - "carefully: I will tell you about the change, and ask for permission." - "You can then edit the file if you want to; in your system, you can find it" - ,(format "at \"~a\"." init-file)] - (define comment "The following line loads `xrepl' support") - (define expr "(require xrepl)") - (define dexpr "(dynamic-require 'xrepl #f)") - (define contents (file->string init-file)) - (read-line) ; discard the newline for further input - (define (look-for comment-rx expr) - (let ([m (regexp-match-positions - (format "(?<=\r?\n|^) *;+ *~a *\r?\n *~a *(?=\r?\n|$)" - comment-rx (regexp-quote expr)) - contents)]) - (and m (car m)))) - (define existing? (look-for (regexp-quote comment) expr)) - (define existing-readline? - (look-for "load readline support[^\r\n]*" "(require readline/rep)")) - (define (yes?) (flush-output) (regexp-match? #rx"^[yY]" (getarg 'line))) - (cond - [existing? - (printf "; already installed, nothing to do\n") - (when existing-readline? - (printf "; (better to remove the readline loading, xrepl does that)"))] - [(let ([m (regexp-match - (string-append (regexp-quote expr) "|" (regexp-quote dexpr)) - contents)]) - (and m (begin (printf "; found \"~a\", ~a\n" - (car m) "looks like xrepl is already installed") - (printf "; should I continue anyway? ") - (not (yes?)))))] - [else - (when existing-readline? - (printf "; found a `readline' loading line\n") - (printf "; xrepl will already do that, ok to remove? ") - (if (yes?) - (set! contents (string-append - (substring contents 0 (car existing-readline?)) - (substring contents (cdr existing-readline?)))) - (printf "; it will be kept ~a\n" - "(you can edit the file and removing it later)"))) - (printf "; writing new contents, with an added \"~a\"\n" expr) - (printf "; (if you want to load it conditionally, edit the file and\n") - (printf "; use \"~a\" instead, which is a plain expression)\n" dexpr) - (printf "; OK to continue? ") - (if (yes?) - (begin - (call-with-output-file* init-file #:exists 'truncate - (λ (o) (write-string - (string-append (regexp-replace #rx"(?:\r?\n)+$" contents "") - (format "\n\n;; ~a\n~a\n" comment expr)) - o))) - (printf "; new contents written to ~a\n" init-file)) - (printf "; ~a was not updated\n" init-file))]) - (void)) - -;; ---------------------------------------------------------------------------- -;; eval hook that keep track of recent evaluation results - -;; saved interaction values -(define saved-values (make-parameter '())) -(define (save-values! xs) - (let ([xs (filter (λ (x) (not (void? x))) xs)]) ; don't save void values - (unless (null? xs) - ;; the order is last, 2nd-to-last, ..., same from prev interactions - ;; the idea is that `^', `^^', etc refer to the values as displayed - (saved-values (append (reverse xs) (saved-values))) - (let ([n (saved-values-number)] [l (saved-values)]) - (when (< n (length l)) (saved-values (take l n))))))) - -(define last-saved-names+state (make-parameter '(#f #f #f))) -(define (get-saved-names) - (define last (last-saved-names+state)) - (define last-num (cadr last)) - (define last-char (caddr last)) - (define cur-num (saved-values-number)) - (define cur-char (saved-values-char)) - (if (and (equal? last-num cur-num) (equal? last-char cur-char)) - (car last) - (let ([new (for/list ([i (in-range (saved-values-number))]) - (string->symbol (make-string (add1 i) (saved-values-char))))]) - (last-saved-names+state (list new cur-num cur-char)) - new))) - -;; make saved values available through bindings, but do this in a way that -;; doesn't interfere with users using these binders in some way -- set only ids -;; that were void, and restore them to void afterwards -(define (with-saved-values thunk) - (define saved-names (get-saved-names)) - (define vals (for/list ([id (in-list saved-names)]) - (box (namespace-variable-value id #f void)))) - (define res #f) - (dynamic-wind - (λ () - (for ([id (in-list saved-names)] - [saved (in-list (saved-values))] - [v (in-list vals)]) - ;; set only ids that are void, and remember these values - (if (void? (unbox v)) - (begin (namespace-set-variable-value! id saved) - (set-box! v saved)) - (set-box! v (void))))) - (λ () (call-with-values thunk (λ vs (set! res vs) (apply values vs)))) - (λ () - (for ([id (in-list saved-names)] [v (in-list vals)]) - ;; restore the names to void so we can set them next time - (when (and (not (void? (unbox v))) ; restore if we set this id above - (eq? (unbox v) ; and if it didn't change - (namespace-variable-value id #f void))) - (namespace-set-variable-value! id (void)))) - (when res (save-values! res))))) - -(provide make-xrepl-evaluator) -(define (make-xrepl-evaluator builtin-evaluator) - (λ (expr) - ;; not useful: catches only escape continuations - ;; (with-handlers ([exn:break? (λ (e) (last-break-exn e) (raise e))]) ...) - (if (saved-values) - (with-saved-values (λ () (builtin-evaluator expr))) - (builtin-evaluator expr)))) - -;; ---------------------------------------------------------------------------- -;; capture ",..." and run the commands, use readline/rep when possible - -(define get-prefix ; to show before the "> " prompt - (let () - (define (choose-path x) - ;; choose the shortest from an absolute path, a relative path, and a - ;; "~/..." path. - (if (not (complete-path? x)) ; shouldn't happen - x - (let* ([r (path->string (find-relative-path (current-directory) x))] - [h (path->string (build-path (string->path-element "~") - (find-relative-path home-dir x)))] - [best (if (< (string-length r) (string-length h)) r h)] - [best (if (< (string-length best) (string-length x)) best x)]) - best))) - (define (get-prefix* path) - (define x (path->string path)) - (define y (->relname path)) - (if (equal? x y) - (format "~s" (choose-path x)) - (regexp-replace #rx"[.]rkt$" y ""))) - (define (get-prefix) - (let* ([x (here-source)] - [x (and x (if (symbol? x) (format "'~s" x) (get-prefix* x)))] - [x (or x (toplevel-prefix))]) - (if (eq? (current-namespace-name) default-namespace-name) - x (format "~a::~a" (current-namespace-name) x)))) - (define last-directory #f) - (define last-namespace #f) - (define prefix #f) - (λ () - (define curdir (current-directory)) - (unless (and (equal? (current-namespace) last-namespace) - (equal? curdir last-directory)) - (report-directory-change) - (set! prefix - (with-handlers - ([exn? (λ (e) - (eprintf "error during prompt calculation: ~a\n" - (exn-message e)) - "[internal-error]")]) - (get-prefix))) - (set! last-namespace (current-namespace)) - (set! last-directory curdir)) - prefix))) - -;; the last non-command expression read -(define last-input-syntax (make-parameter #f)) - -(struct more-inputs (list) - #:constructor-name more-inputs* #:omit-define-syntaxes) -(define (more-inputs . inputs) (more-inputs* inputs)) - -(provide make-xrepl-reader) -(define (make-xrepl-reader) - (define (plain-reader prefix) ; a plain reader, without readline - (display prefix) (display "> ") (flush-output) (zero-column!) - (let ([in ((current-get-interaction-input-port))]) - ((current-read-interaction) (object-name in) in))) - (define RL ; no direct dependency on readline - (with-handlers ([exn? (λ (_) #f)]) - (collection-file-path "pread.rkt" "readline"))) - (define (make-readline-reader) - (let ([p (dynamic-require RL 'current-prompt)] - [r (dynamic-require RL 'read-cmdline-syntax)]) - (λ (prefix) ; uses the readline prompt - (parameterize ([p (bytes-append (string->bytes/locale prefix) (p))]) - (r))))) - (define reader - (case (object-name (current-input-port)) - [(stdin) - (if (or (not (terminal-port? (current-input-port))) - (regexp-match? #rx"^dumb" (or (getenv "TERM") "")) - (not RL)) - plain-reader - (with-handlers ([exn? - (λ (e) - (eprintf "Warning: no readline support (~a)\n" - (exn-message e)) - plain-reader)]) - (dynamic-require 'readline/rep-start #f) - ;; requiring readline should have changed the reader - (if (eq? (current-prompt-read) - (dynamic-require RL 'read-cmdline-syntax)) - (make-readline-reader) - (begin (eprintf "Warning: could not initialize readline\n") - plain-reader))))] - [(readline-input) - (eprintf "Note: readline already loaded\n~a\n" - " (better to let xrepl load it for you)") - (make-readline-reader)] - [else plain-reader])) - ;; IO management - (port-count-lines! (current-input-port)) - ;; wrap the reader to get the command functionality - (define more-inputs '()) - (define (reader-loop) - (parameterize ([saved-values #f]) - (define from-queue? (pair? more-inputs)) - (define input - (if from-queue? - (begin0 (car more-inputs) (set! more-inputs (cdr more-inputs))) - (begin (fresh-line) (reader (get-prefix))))) - (syntax-case input () - [(uq cmd) (eq? 'unquote (syntax-e #'uq)) - (let ([r (run-command (syntax->datum #'cmd))]) - (cond [(void? r) (reader-loop)] - [(more-inputs? r) - (set! more-inputs (append (more-inputs-list r) more-inputs)) - (reader-loop)] - [else (eprintf "Warning: internal weirdness: ~s\n" r) r]))] - [_ (begin (unless from-queue? (last-input-syntax input)) input)]))) - reader-loop) diff --git a/collects/xrepl/xrepl.scrbl b/collects/xrepl/xrepl.scrbl deleted file mode 100644 index b6654962a72..00000000000 --- a/collects/xrepl/xrepl.scrbl +++ /dev/null @@ -1,496 +0,0 @@ -#lang scribble/doc -@(require scribble/manual "doc-utils.rkt" - scribble/decode (only-in scribble/core) - (for-label racket readline racket/help racket/enter - racket/trace profile)) - -@title{XREPL: eXtended REPL} -@author+email["Eli Barzilay" "eli@barzilay.org"] - -@defmodule[xrepl]{ - The @filepath{xrepl} collection extends the @exec{racket} @tech[#:doc - GUIDE]{REPL} significantly, turning it into a more useful tool for - interactive exploration and development. This includes ``meta - commands'', using readline, keeping past evaluation results, and - more.} - -@; --------------------------------------------------------------------- -@section{Installing XREPL} - -To use XREPL, start @exec{racket} and enter @racket[(require xrepl)]. -You will know that it works when the prompt changes to a @litchar{->}, -and, if you're working on a capable terminal, you will now have readline -editing. You can also start @exec{racket} and ask for XREPL to be -loaded using command-line arguments: -@commandline{racket -il xrepl} - -If you want to enable XREPL automatically, add this expression to your -Racket initialization file. -@margin-note*{To load XREPL conditionally (e.g., not in older Racket - versions), you can use @racket[(dynamic-require 'xrepl #f)]. This - is a plain expression that can be placed inside @racket[when] and - elsewhere.} -An easy way to do the necessary editing is to enter @cmd[install!], -which will inspect and edit your initialization file (it will describe -the change and ask for your permission). Alternatively, you can edit -the file directly: on Unix, it is @filepath{~/.racketrc}, and for -other platforms evaluate @racket[(find-system-path 'init-file)] to see -where it is. - -XREPL will set up a readline-based reader, so you do not need to load -that yourself. If your initialization file was previously set to load -readline via @racket[install-readline!], the @cmd[install!] command -will (notify you and) remove it. If you added it yourself, consider -removing it. (This is not strictly needed, but XREPL is slightly -better at detecting when to use readline.) - -@; --------------------------------------------------------------------- -@section{Meta REPL Commands} - -Most of the XREPL extensions are implemented as meta commands. These -commands are entered at the REPL, prefixed by a @litchar{,} and followed -by the command name. Note that several commands correspond directly to -Racket functions (e.g., @cmd[exit]) --- but since they work outside of -your REPL, they can be used even if the matching bindings are not -available. - -@; --------------------------------- -@subsection{Generic Commands} - -@defcmd[help]{ - Without an argument, displays a list of all known commands. Specify a - command to get help specific to that command. -} - -@defcmd[exit]{ - Exits Racket, optionally with an error code (see @racket[exit]). -} - -@defcmd[cd]{ - Sets the @racket[current-directory] to the given path. If no path is - specified, use your home directory. Path arguments are passed through - @racket[expand-user-path] so you can use @litchar{~}. An argument of - @litchar{-} means ``the previous path''. -} - -@defcmd[pwd]{ - Reports the value of @racket[current-directory]. -} - -@defcmd[shell]{ - Use @cmd[shell] (or @cmd[sh]) to run a generic shell command (via - @racket[system]). For convenience, a few synonyms are provided --- - they run the specified executables (still using @racket[system]). - - When the REPL is in the context of a module with a known source file, - the shell command can use the @envvar{F} environment variable as the - path to the file. Otherwise, @envvar{F} is set to an empty string. -} - -@defcmd[edit]{ - Runs an editor, as specified by your @envvar{EDITOR} environment - variable, with the given file/s arguments. If no files are specified - and the REPL is currently inside a module's namespace, then the file - for that module is used. If the @envvar{EDITOR} environment variable - is not set, use the @cmd[drracket] command instead. -} - -@defcmd[drracket]{ - Runs DrRacket with the specified file/s. If no files are given, and - the REPL is currently inside a module, the file for that module is - used. - - DrRacket is launched directly, without starting a new subprocess, and - it is then kept running in a hidden window so further invocations are - immediate. (When this command is used for the first time, you will - see DrRacket start as usual, and then its window will disappear --- - that window is keeping DrRacket ready for quick editing.) - - In addition to file arguments, arguments can specify one of a few - flags for additional operations: - @itemize[ - @item{@litchar{-new}: opens a new editing window. This is the default - when no files are given and the REPL is not inside a module,} - @item{@litchar{-open}: opens the specified file/s (or the current - module's file). This is the default when files are given or when - inside a module.} - @item{@litchar{-quit}: exits the running DrRacket instance. Quitting - DrRacket is usually not necessary. Therefore, if you try to quit it - from the DrRacket window, it will instead just close the window but - DrRacket will still be running in the background. Use this command - in case there is some exceptional problem that requires actually - quitting the IDE. (Once you do so, future uses of this command will - start a fresh instance.)}] -} - -@; --------------------------------- -@subsection{Binding Information} - -@defcmd[apropos]{ - Searches for known bindings in the current namespace. The arguments - specify which binding to look for: use a symbol (without a - @litchar{'}) to look for bindings that contain that name, and use a - regexp (e.g., @racket[#rx"..."]) to use a regexp for the search. - Multiple arguments are and-ed together. - - If no arguments are given, @emph{all} bindings are listed. -} - -@defcmd[describe]{ - For each of the specified names, describe where where it is coming - from and how it was defined if it names a known binding. In addition, - desribe the module (list its imports and exports) that is named by - arguments that are known module names. - - By default, bindings are searched for at the runtime level (phase 0). - You can add a different phase level for identifier lookups as a first - argument. In this case, only a binding can be described, even if the - same name is a known module. -} - -@defcmd[doc]{ - Uses Racket's @racket[help] to browse the documentation, look for a - binding, etc. Note that this can be used even in languages that don't - have the @racket[help] binding. -} - -@; --------------------------------- -@subsection{Requiring and Loading Files} - -@defcmd[require]{ - Most arguments are passed to @racket[require] as is. As a - convenience, if an argument specifies an existing file name, then use - its string form to specify the require, or use a @racket[file] in case - of an absolute path. In addition, an argument that names a known - symbolic module name (e.g., one that was defined on the REPL, or a - builtin module like @racket[#%network]), then its quoted form is used. - (Note that these shorthands do not work inside require subforms like - @racket[only-in].) -} - -@defcmd[require-reloadable]{ - Same as @cmd[require], but arranges to load the code in a way that - makes it possible to reload it later, or if a module was already - loaded (using this command) then reload it. Note that the arguments - should be simple specifications, without any require macros. If no - arguments are given, use arguments from the last use of this command - (if any). - - Module reloading is enabled by turnning off the - @racket[compile-enforce-module-constants] parameter --- note that this - prohibits some opimizations, since the compiler assumes that all - bindings may change. -} - -@defcmd[enter]{ - Uses @racket[enter!] to have the REPL go `inside' a given module's - namespace. A module name can specify an existing file as with the - @cmd[require-reloadable] command. If no module is given, and the REPL - is already in some module's namespace, then `enter!' is used with that - module, causing it to reload if needed. Using @racket[#f] makes it go - back to the toplevel namespace. - - Note that this can be used even in languages that don't have the - @racket[enter!] binding. In addition, @racket[enter!] is used in a - way that does not make it require itself into the target namespace. -} - -@defcmd[toplevel]{ - Makes the REPL go back to the toplevel namespace. Same as using the - @cmd[enter] command with a @racket[#f] argument. -} - -@defcmd[load]{ - Uses @racket[load] to load the specified file(s). -} - -@; --------------------------------- -@subsection{Debugging} - -@defcmd[time]{ - Times execution of an expression (or expressions). This is similar to - @racket{time} but the information that is displayed is a bit easier to - read. - - In addition, you can provide an initial number to specify repeating - the evaluation a number of times. In this case, each iteration is - preceded by two garbage collections, and when the iteration is done - its timing information and evaluation result(s) are displayed. When - the requested number of repetitions is done, some extreme results are - removed (top and bottom 2/7ths), and the remaining results are be - averaged. Finally, the resulting value(s) are from the last run are - returned (and can be accessed via the bindings for the last few - results, see @secref["past-vals"]). -} - -@defcmd[trace]{ - Traces the named function (or functions), using @racket[trace]. -} - -@defcmd[untrace]{ - Untraces the named function (or functions), using @racket[untrace]. -} - -@defcmd[errortrace]{ - @racketmodname[errortrace] is a useful Racket library which can - provide a number of useful services like precise profiling, test - coverage, and accurate error information. However, using it can be a - little tricky. @cmd[errortrace] and a few related commands fill this - gap, making @racketmodname[errortrace] easier to use. - - @cmd[errortrace] controls global use of @racketmodname[errortrace]. - With a flag argument of @litchar{+} errortrace instrumentation is - turned on, with @litchar{-} it is turned off, and with no arguments it - is toggled. In addition, a @litchar{?} flag displays instrumentation - state. - - Remember that @racketmodname[errortrace] instrumentation hooks into - the Racket compiler, and applies only to source code that gets loaded - from source and therefore compiled. Therefore, you should use it - @emph{before} loading the code that you want to instrument. -} - -@defcmd[profile]{ - This command can perform profiling of code in one of two very - different ways: either statistical profiling via the - @racketmodname[profile] library, or using the exact profiler feature - of @racketmodname[errortrace]. - - When given a parenthesized expression, @cmd[profile] will run it via - the statistical profiler, as with the @racket[profile] form, reporting - results as usual. This profiler adds almost no overhead, and it - requires no special setup. In particular, it does not require - pre-compiling code in a special way. However, there are some - imprecise elements to this profiling: the profiler samples stack - snapshots periodically which can miss certain calls, and it is also - sensitive to some compiler optimizations like inlining procedures and - thereby not showing them in the displayed analysis. See - @other-doc['(lib "profile/scribblings/profile.scrbl")] for more - information. - - In the second mode of operation, @cmd[profile] uses the precise - @racketmodname[errortrace] profiler. This profiler produces precise - results, but like other uses of the @racketmodname[errortrace], it - must be enabled before loading the code that is to be profiled. It - can add noticeable overhead (potentially affecting the reported - runtimes), but the results are accurate in the sense that no procedure - is skipped. (For additional details, see - @other-doc['(lib "errortrace/scribblings/errortrace.scrbl")].) - - In this mode, the arguments are flags that control the profiler. A - @litchar{+} flag turns the profiler on --- and as usual with - @racketmodname[errortrace] functionality, this applies to code that is - compiled from now on. A @litchar{-} flag turns this instrumentation - off, and without any flags it is toggled. Once the profiler is - enabled, you can run some code and then use this command to report - profiling results: use @litchar{*} to show profiling results by time, - and @litchar{#} for the results by counts. Once you've seen the - results, you can evaluate additional code to collect more profiling - information, or you can reset the results with a @litchar{!} flag. - You can also combine several flags to perform the associated - operations, for example, @cmd[prof]{*!-} will show the accumulated - results, clear them, and turn profiler instrumentation off. - - Note that using @emph{any} of these flags turns errortrace - instrumentation on, even @cmd[prof]{-} (or no flags). Use the - @cmd[errortrace] command to turn off instrumentation completely. -} - -@defcmd[execution-counts]{ - This command makes it easy to use the execution counts functionality - of @racketmodname[errortrace]. Given a file name (or names), - @cmd[execution-counts] will enable errortrace instrumentation for - coverage, require the file(s), display the results, disables coverage, - and disables instrumentation (if it wasn't previously turned on). - This is useful as an indication of how well the test coverage is for - some file. -} - -@defcmd[coverage]{ - Runs a given file and displays coverage information for the run. This - is somewhat similar to the @cmd[execution-counts] command, but instead - of using @racketmodname[errortrace] directly, it runs the file in a - (trusted) sandbox, using the @racketmodname[racket/sandbox] library - and its ability to provide coverage information. -} - -@; --------------------------------- -@subsection{Miscellaneous Commands} - -@defcmd[switch-namespace]{ - This powerful command controls the REPL's namespace. While - @cmd[enter] can be used to make the REPL go into the namespace of a - specific module, the @cmd[switch-namespace] command can switch between - @emph{toplevel namespaces}, allowing you to get multiple separate - ``workspaces''. - - Namespaces are given names that are symbols or integers, where - @litchar{*} is the name for the first initial namespace, serving as - the default one. These names are not bindings --- they are only used - to label the known namespaces. - - The most basic usage for this command is to simply specify a new name. - A namespace that corresponds to that name will be created and the REPL - will switch to that namespace. The prompt will now indicate this - namespace's name. The name is usually insignificant, except when it - is a @racket[require]-able module: in this case, the new namespace is - initialized to use that module's bindings. For example, - @cmd[switch]{racket/base} creates a new namespace that is called - @litchar{racket/base} and initializes it with - @racketmodname[racket/base]. For all other names, the new namespace - is initialized the same as the current one. - - Additional @cmd[switch] uses: - @itemize[ - @item{@cmd[switch]{!} --- reset the current namespace, recreating it - using the same initial library. Note that it is forbidden to reset - the default initial namespace, the one named @litchar{*} --- this - namespace corresponds to the one that Racket was started with, and - where XREPL was initialized. There is no technical reason for - forbidding this, but doing so is not useful as no resources will - actually be freed.} - @item{@cmd[switch]{! } --- resets the current namespace with - the explicitly given simple module spec.} - @item{@cmd[switch]{ !} --- switch to a newly made namespace. If - a namespace by that name already existed, it is rest.} - @item{@cmd[switch]{ ! } --- same, but reset to the given - module instead of what it previously used.} - @item{@cmd[switch]{- } --- drop the specified namespace, making - it possible to garbage-collect away any associated resources. You - cannot drop the current namespace or the default one (@litchar{*}).} - @item{@cmd[switch]{?} --- list all known namespaces.}] - - Do not confuse namespaces with sandboxes or custodians. The - @cmd{switch} command changes @emph{only} the - @racket[current-namespace] --- it does not install a new custodian or - restricts evaluation in any way. Note that it is possible to pass - around values from one namespace to another via past result reference; - see @secref["past-vals"]. -} - -@defcmd[syntax]{ - Manipulate syntaxes and inspect their expansion. - - Useful operations revolve around a ``currently set syntax''. With no - arguments, the currently set syntax is displayed; an argument of - @litchar{^} sets the current syntax from the last input to the REPL; - and an argument that holds any other s-expression will set it as the - current syntax. - - Syntax operations are specified via flags: - @itemize[ - @item{@litchar{+} uses @racket[expand-once] on the current syntax and - prints the resulting syntax. In addition, the result becomes the - new ``current'' syntax, so you can use this as a poor-man's syntax - stepper. (Note that in some rare cases expansion via a sequence of - @racket[expand-once] might differ from the actual expansion.)} - @item{@litchar{!} uses @racket[expand] to completely expand the - current syntax.} - @item{@litchar{*} uses the macro debugger's textual output to show - expansion steps for the current syntax, leaving macros from - @racketmodname[racket/base] intact. Does not change the current - syntax. - See @other-doc['(lib "macro-debugger/macro-debugger.scrbl")] for - details.} - @item{@litchar{**} uses the macro debugger similarly to @litchar{*}, - but expands @racketmodname[racket/base] macros too, showing the - resulting full expansion process.}] - Several input flags and/or syntaxes can be spacified in succession as - arguments to @cmd{syntax}. For example, @cmd[stx]{(when 1 2) ** !}. -} - -@defcmd[log]{ - Starts (or stops) logging events at a specific level. The level can - be: - @itemize[ - @item{a known level name (currently one of @litchar{fatal}, - @litchar{error}, @litchar{warning}, @litchar{info}, - @litchar{debug}),} - @item{@racket[#f] for no logging,} - @item{@racket[#t] for maximum logging,} - @item{an integer level specification, with @racket[0] for no logging - and bigger ones for additional verbosity.}] -} - -@defcmd[install!]{ - Convenient utility command to install XREPL in your Racket - initialization file. This is done carefully, you will be notified of - potential issues, and asked to authorize changes. -} - -@; --------------------------------------------------------------------- -@section[#:tag "past-vals"]{Past Evaluation Results} - -XREPL makes the last few interaction results available for evaluation -via special toplevel variables: @racketidfont{^}, @racketidfont{^^}, -..., @racketidfont{^^^^^}. The first, @racketidfont{^}, refers to the -last result, @racketidfont{^^} to the previous one and so on. - -As with the usual REPL printouts, @void-const results are not kept. In -case of multiple results, they are spliced in reverse, so -@racketidfont{^} refers to the last result of the last evaluation. For -example: -@verbatim[#:indent 4]{ - -> 1 - 1 - -> (values 2 3) - 2 - 3 - -> (values 4) - 4 - -> (list ^ ^^ ^^^ ^^^^) - '(4 3 2 1)} -The rationale for this is that @racketidfont{^} always refers to the -last @emph{printed} result, @racketidfont{^^} to the one before that, -etc. - -These bindings are made available only if they are not already defined, -and if they are not modified. This means that if you have code that -uses these names, it will continue to work as usual. - -@; --------------------------------------------------------------------- -@section{Hacking XREPL} - -XREPL is mainly a convenience tool, and as such you might want to hack -it to better suite your needs. Currently, there is no convenient way to -customize and extend it, but this will be added in the future. - -Meanwhile, if you're interested in tweaking XREPL, the @cmd[enter] -command can be used as usual to go into its implementation. For -example --- change an XREPL parameter: -@verbatim[#:indent 4]{ - -> ,en xrepl/xrepl - xrepl/xrepl> ,e - xrepl/xrepl> (saved-values-char #\~) - xrepl/xrepl> ,top - -> 123 - 123 - -> ~ - 123} -or add a command: -@verbatim[#:indent 4]{ - -> ,en xrepl/xrepl - xrepl/xrepl> (defcommand eli "stuff" "eli says" ["Make eli say stuff"] - (printf "Eli says: ~a\n" (getarg 'line))) - xrepl/xrepl> ,top - -> ,eli moo - Eli says: moo} -While this is not intended as @emph{the} way to extend and customize -XREPL, it is a useful debugging tool should you want to do so. - -If you have any useful tweaks and extensions, please mail the author or -the Racket developer's -@hyperlink["http://racket-lang.org/community.html"]{mailing list}. - -@; --------------------------------------------------------------------- -@section{License Issues} - -Under most circumstances XREPL uses the @racketmodname[readline] -library, and therefore a similar license caveat applies: XREPL cannot be -enabled by default because of the @seclink["readline-license" #:doc -RL]{readline licensing}, you have to explicitly do so yourself to use -it. (Note that XREPL is intended to be used only for enhanced -interaction, not as a library; so there are no additional issues.) - -@; --------------------------------------------------------------------- -@(check-all-documented) From 45d34dda042cfa9553e590ce060fffb2b9be61a4 Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Tue, 19 Jul 2011 11:47:17 -0500 Subject: [PATCH 300/441] change autowrapping preference default please merge to release branch (cherry picked from commit 2a78ea97237e93e980b8a4ef16563882d8f03822) --- collects/framework/private/main.rkt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collects/framework/private/main.rkt b/collects/framework/private/main.rkt index d29864552fa..ba59746ee76 100644 --- a/collects/framework/private/main.rkt +++ b/collects/framework/private/main.rkt @@ -201,7 +201,7 @@ (preferences:set-default 'framework:windows-mdi #f boolean?) (preferences:set-default 'framework:menu-bindings #t boolean?) (preferences:set-default 'framework:verify-change-format #f boolean?) -(preferences:set-default 'framework:auto-set-wrap? #t boolean?) +(preferences:set-default 'framework:auto-set-wrap? #f boolean?) (preferences:set-default 'framework:display-line-numbers #t boolean?) (preferences:set-default 'framework:show-status-line #t boolean?) (preferences:set-default 'framework:col-offsets #f boolean?) From 533b8ed384eebb980cc1aaf9f5d055d607591123 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Tue, 19 Jul 2011 15:06:58 -0600 Subject: [PATCH 301/441] fix optimizer bug related to `case-lambda' at module level The bug triggered a crash on ARM, and probably doesn't affect other platforms, but I'm not competely sure. Merge to 5.1.2 (cherry picked from commit d9ae1d048d7ad4bbe9e516c7f48f001bcb1fdce8) --- src/racket/src/optimize.c | 105 +++++++++++++++++++++----------------- 1 file changed, 57 insertions(+), 48 deletions(-) diff --git a/src/racket/src/optimize.c b/src/racket/src/optimize.c index cf52296c68f..83caa8e41ee 100644 --- a/src/racket/src/optimize.c +++ b/src/racket/src/optimize.c @@ -3159,18 +3159,63 @@ static Scheme_Object *make_clones(Scheme_Compiled_Let_Value *retry_start, return first; } +static int set_one_code_flags(Scheme_Object *value, int flags, + Scheme_Object *first, Scheme_Object *second, + int set_flags, int mask_flags, int just_tentative, + int merge_flonum) +{ + Scheme_Case_Lambda *cl, *cl2, *cl3; + Scheme_Closure_Data *data, *data2, *data3; + int i, count; + + if (SAME_TYPE(scheme_compiled_unclosed_procedure_type, SCHEME_TYPE(value))) { + count = 1; + cl = NULL; + cl2 = NULL; + cl3 = NULL; + } else { + cl = (Scheme_Case_Lambda *)value; + cl2 = (Scheme_Case_Lambda *)first; + cl3 = (Scheme_Case_Lambda *)second; + count = cl->count; + } + + for (i = 0; i < count; i++) { + if (cl) { + data = (Scheme_Closure_Data *)cl->array[i]; + data2 = (Scheme_Closure_Data *)cl2->array[i]; + data3 = (Scheme_Closure_Data *)cl3->array[i]; + } else { + data = (Scheme_Closure_Data *)value; + data2 = (Scheme_Closure_Data *)first; + data3 = (Scheme_Closure_Data *)second; + } + + if (merge_flonum) { + merge_closure_flonum_map(data, data2); + merge_closure_flonum_map(data, data3); + merge_closure_flonum_map(data, data2); + } + + if (!just_tentative || (SCHEME_CLOSURE_DATA_FLAGS(data) & CLOS_RESULT_TENTATIVE)) { + flags = (flags & SCHEME_CLOSURE_DATA_FLAGS(data)); + SCHEME_CLOSURE_DATA_FLAGS(data2) = set_flags | (SCHEME_CLOSURE_DATA_FLAGS(data2) & mask_flags); + SCHEME_CLOSURE_DATA_FLAGS(data3) = set_flags | (SCHEME_CLOSURE_DATA_FLAGS(data3) & mask_flags); + } + } + + return flags; +} + static int set_code_flags(Scheme_Compiled_Let_Value *retry_start, Scheme_Compiled_Let_Value *pre_body, Scheme_Object *clones, int set_flags, int mask_flags, int just_tentative, int merge_flonum) { - Scheme_Case_Lambda *cl, *cl2, *cl3; Scheme_Compiled_Let_Value *clv; Scheme_Object *value, *first; int flags = CLOS_SINGLE_RESULT | CLOS_PRESERVES_MARKS; - Scheme_Closure_Data *data, *data2, *data3; - int i, count; /* The first in a clone pair is the one that is consulted for references. The second one is the clone, and it's the one whose @@ -3183,43 +3228,11 @@ static int set_code_flags(Scheme_Compiled_Let_Value *retry_start, if (IS_COMPILED_PROC(value)) { first = SCHEME_CAR(clones); - if (first) { - if (SAME_TYPE(scheme_compiled_unclosed_procedure_type, SCHEME_TYPE(value))) { - count = 1; - cl = NULL; - cl2 = NULL; - cl3 = NULL; - } else { - cl = (Scheme_Case_Lambda *)value; - cl2 = (Scheme_Case_Lambda *)SCHEME_CAR(first); - cl3 = (Scheme_Case_Lambda *)SCHEME_CDR(first); - count = cl->count; - } - - for (i = 0; i < count; i++) { - if (cl) { - data = (Scheme_Closure_Data *)cl->array[i]; - data2 = (Scheme_Closure_Data *)cl2->array[i]; - data3 = (Scheme_Closure_Data *)cl3->array[i]; - } else { - data = (Scheme_Closure_Data *)value; - data2 = (Scheme_Closure_Data *)SCHEME_CAR(first); - data3 = (Scheme_Closure_Data *)SCHEME_CDR(first); - } - - if (merge_flonum) { - merge_closure_flonum_map(data, data2); - merge_closure_flonum_map(data, data3); - merge_closure_flonum_map(data, data2); - } - - if (!just_tentative || (SCHEME_CLOSURE_DATA_FLAGS(data) & CLOS_RESULT_TENTATIVE)) { - flags = (flags & SCHEME_CLOSURE_DATA_FLAGS(data)); - SCHEME_CLOSURE_DATA_FLAGS(data2) = set_flags | (SCHEME_CLOSURE_DATA_FLAGS(data2) & mask_flags); - SCHEME_CLOSURE_DATA_FLAGS(data3) = set_flags | (SCHEME_CLOSURE_DATA_FLAGS(data3) & mask_flags); - } - } - } + if (first) + flags = set_one_code_flags(value, flags, + SCHEME_CAR(first), SCHEME_CDR(first), + set_flags, mask_flags, just_tentative, + merge_flonum); clones = SCHEME_CDR(clones); } @@ -4352,7 +4365,6 @@ static int set_code_closure_flags(Scheme_Object *clones, int just_tentative) { Scheme_Object *clone, *orig, *first; - Scheme_Closure_Data *data; int flags = CLOS_SINGLE_RESULT | CLOS_PRESERVES_MARKS; /* The first in a clone pair is the one that is consulted for @@ -4365,13 +4377,10 @@ static int set_code_closure_flags(Scheme_Object *clones, clone = SCHEME_CAR(first); orig = SCHEME_CDR(first); - data = (Scheme_Closure_Data *)orig; - if (!just_tentative || (SCHEME_CLOSURE_DATA_FLAGS(data) & CLOS_RESULT_TENTATIVE)) { - flags = (flags & SCHEME_CLOSURE_DATA_FLAGS(data)); - SCHEME_CLOSURE_DATA_FLAGS(data) = set_flags | (SCHEME_CLOSURE_DATA_FLAGS(data) & mask_flags); - data = (Scheme_Closure_Data *)clone; - SCHEME_CLOSURE_DATA_FLAGS(data) = set_flags | (SCHEME_CLOSURE_DATA_FLAGS(data) & mask_flags); - } + flags = set_one_code_flags(orig, flags, + orig, clone, + set_flags, mask_flags, just_tentative, + 0); clones = SCHEME_CDR(clones); } From 35bbe90dcb89edc62998ed0c347e26c93a2aa36b Mon Sep 17 00:00:00 2001 From: Casey Klein Date: Wed, 20 Jul 2011 09:23:54 -0500 Subject: [PATCH 302/441] Updates Redex history for v5.1.2 (cherry picked from commit 7d103bdfd81d8099f35d3d3727308fcba0b18056) --- doc/release-notes/redex/HISTORY.txt | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/doc/release-notes/redex/HISTORY.txt b/doc/release-notes/redex/HISTORY.txt index bf364129792..55e838c3268 100644 --- a/doc/release-notes/redex/HISTORY.txt +++ b/doc/release-notes/redex/HISTORY.txt @@ -1,11 +1,35 @@ +v5.1.2 + * added support for typsetting define-relation relations * made apply-reduction-relation* call remove-duplicates on the result of apply-reduction-relation + * extended render-reduction-relation-rules to accept rule indices + in addition to rule names + + * added the to-lw/stx procedure + + * fixed domain checking for unioned reduction relations + * added the #:cache-all? argument to apply-reduction-relation* and the current-cache-all? parameter + * fixed stepper's handling of symbols that required || quoting + + * removed all undocumented exports + + * added the redex-let form + + * added the #:source argument to generate-term + + * changed redex-match to hide bindings for named ellipses such + as ..._x + + * improve test-->E failure message + + * fixed misc. bugs in examples and typos in documentation + v5.1.1 * changed pattern language to disallow unquote From 925a6ae9f25fafc69fc47c6be50f7ec6587ac1b3 Mon Sep 17 00:00:00 2001 From: Sam Tobin-Hochstadt Date: Wed, 20 Jul 2011 14:50:45 -0400 Subject: [PATCH 303/441] Fix types of kernel struct constructors to include parent fields. Merge to 5.1.2. (cherry picked from commit 7a763a2da89a1432285c06cdf9d112d04b29c762) --- .../unit-tests/typecheck-tests.rkt | 7 ++++--- .../typed-scheme/typecheck/tc-structs.rkt | 20 +++++++++---------- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/collects/tests/typed-scheme/unit-tests/typecheck-tests.rkt b/collects/tests/typed-scheme/unit-tests/typecheck-tests.rkt index 058749ba4a5..e6a2167e50a 100644 --- a/collects/tests/typed-scheme/unit-tests/typecheck-tests.rkt +++ b/collects/tests/typed-scheme/unit-tests/typecheck-tests.rkt @@ -1380,9 +1380,10 @@ exn:break arity-at-least date - srcloc) -Void) - - + srcloc) + -Void) + [tc-e (raise (exn:fail:contract "1" (current-continuation-marks))) (t:Un)] + [tc-err (exn:fail:contract)] ) (test-suite "check-type tests" diff --git a/collects/typed-scheme/typecheck/tc-structs.rkt b/collects/typed-scheme/typecheck/tc-structs.rkt index 5f62b2674e7..39d7aea32c3 100644 --- a/collects/typed-scheme/typecheck/tc-structs.rkt +++ b/collects/typed-scheme/typecheck/tc-structs.rkt @@ -289,16 +289,16 @@ (c-> identifier? (or/c #f identifier?) (listof identifier?) (listof Type/c) (or/c #f identifier?) #;(listof fld?) any/c) - (let* ([parent-name (if parent (make-Name parent) #f)] - [parent-flds (if parent (get-parent-flds parent-name) null)]) - (let ((defs (mk/register-sty nm flds parent-name parent-flds tys - #:mutable #t))) - (if kernel-maker - (let* ((result-type (lookup-type-name nm)) - (ty (->* tys result-type))) - (register-type kernel-maker ty) - (cons (make-def-binding kernel-maker ty) defs)) - defs)))) + (define parent-name (if parent (make-Name parent) #f)) + (define parent-flds (if parent (get-parent-flds parent-name) null)) + (define parent-tys (map fld-t parent-flds)) + (define defs (mk/register-sty nm flds parent-name parent-flds tys #:mutable #t)) + (if kernel-maker + (let* ([result-type (lookup-type-name nm)] + [ty (->* (append parent-tys tys) result-type)]) + (register-type kernel-maker ty) + (cons (make-def-binding kernel-maker ty) defs)) + defs)) ;; syntax for tc/builtin-struct From a6e596ba71ce4c95b08fb965651f19fe7d6eabf0 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Wed, 20 Jul 2011 13:25:52 -0600 Subject: [PATCH 304/441] another try at Mac OS X 10.4 x86 libraries Merge to 5.1.2 (cherry picked from commit 30174b3c81371d36ef8ad065d9399b68942e40e3) --- src/get-libs.rkt | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/get-libs.rkt b/src/get-libs.rkt index aaf49935968..3d772166d8e 100644 --- a/src/get-libs.rkt +++ b/src/get-libs.rkt @@ -28,19 +28,19 @@ ;; GUI Libraries [gui [i386-macosx - ["libcairo.2.dylib" 805952] + ["libcairo.2.dylib" 803196] ["libintl.8.dylib" 57604] - ["libgio-2.0.0.dylib" 747088] + ["libgio-2.0.0.dylib" 736720] ["libjpeg.62.dylib" 412024] - ["libglib-2.0.0.dylib" 1014032] - ["libpango-1.0.0.dylib" 347300] - ["libgmodule-2.0.0.dylib" 18996] - ["libpangocairo-1.0.0.dylib" 84364] - ["libgobject-2.0.0.dylib" 288244] - ["libpixman-1.0.dylib" 527016] - ["libgthread-2.0.0.dylib" 24556] - ["libpng14.14.dylib" 183016] - ["PSMTabBarControl.tgz" 91302 "PSMTabBarControl.framework" 247768]] + ["libglib-2.0.0.dylib" 1009572] + ["libpango-1.0.0.dylib" 345476] + ["libgmodule-2.0.0.dylib" 18836] + ["libpangocairo-1.0.0.dylib" 83612] + ["libgobject-2.0.0.dylib" 284384] + ["libpixman-1.0.dylib" 526564] + ["libgthread-2.0.0.dylib" 24368] + ["libpng14.14.dylib" 182732] + ["PSMTabBarControl.tgz" 94103 "PSMTabBarControl.framework" 251764]] [x86_64-macosx ["libcairo.2.dylib" 919840] ["libintl.8.dylib" 61016] From 196ac13bdd3e20d2a82e9175c6982c56b58ac35f Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Wed, 20 Jul 2011 13:57:52 -0600 Subject: [PATCH 305/441] fix bug in .zo writing The bug showed up in the "racket/embed.rktl" test. Merge to 5.1.2 (cherry picked from commit 5b8a892fbba0afc56deeda1d4e3a24a3ddb048b5) --- src/racket/src/marshal.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/racket/src/marshal.c b/src/racket/src/marshal.c index c8a0a203438..725ab5dfd8c 100644 --- a/src/racket/src/marshal.c +++ b/src/racket/src/marshal.c @@ -923,7 +923,10 @@ static Scheme_Object *write_variable(Scheme_Object *obj) sym = (Scheme_Object *)(SCHEME_VAR_BUCKET(obj))->key; home = scheme_get_bucket_home((Scheme_Bucket *)obj); - m = home->module; + if (home) + m = home->module; + else + m = NULL; /* If we get a writeable variable (instead of a module variable), it must be a reference to a module referenced directly by its From eddf893dc675e3b173a425c2ffc1c603d72ec216 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Wed, 20 Jul 2011 14:08:30 -0600 Subject: [PATCH 306/441] fix validation of top-level define-{syntaxes,values-for-syntax} (Only appears in bytecode for non-module code.) Merge to 5.1.2 (cherry picked from commit 0d2b08f0534efa3151a9c9d5430b410f77589a9a) --- src/racket/src/validate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/racket/src/validate.c b/src/racket/src/validate.c index c1fbbd6374c..94595ebde19 100644 --- a/src/racket/src/validate.c +++ b/src/racket/src/validate.c @@ -429,7 +429,7 @@ static void do_define_syntaxes_validate(Scheme_Object *data, Mz_CPort *port, Scheme_Object *name, *val, *base_stack_depth, *dummy; int sdepth; - if (!SCHEME_VECTORP(data) + if (!SAME_TYPE(SCHEME_TYPE(data), (for_stx ? scheme_define_for_syntax_type : scheme_define_syntaxes_type)) || (SCHEME_VEC_SIZE(data) < 4)) scheme_ill_formed_code(port); From f87c5acdf93078de947385bf23de34c59952d4ad Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Wed, 20 Jul 2011 14:09:27 -0600 Subject: [PATCH 307/441] fix `raco ctool -e' for syntax taints Merge to 5.1.2 (cherry picked from commit 85049968624b0f0f67ab46416281b0ac3d19d0a0) --- collects/compiler/src2src.rkt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collects/compiler/src2src.rkt b/collects/compiler/src2src.rkt index 175ad03a680..f6d635f772d 100644 --- a/collects/compiler/src2src.rkt +++ b/collects/compiler/src2src.rkt @@ -1576,7 +1576,7 @@ norm?)))) (define (parse-let % rec? stx env loop) - (syntax-case stx () + (syntax-case (syntax-disarm stx code-insp) () [(_ ([vars rhs] ...) . body) (let* ([varses (syntax->list (syntax (vars ...)))] [rhses (syntax->list (syntax (rhs ...)))] From 4389a4671d02ffe5521baeb8ba4a29862bbbfdcf Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Wed, 20 Jul 2011 14:24:43 -0600 Subject: [PATCH 308/441] code-inspector fix for top-level code from bytecode Merge to 5.1.2 (cherry picked from commit 530bb1b9ba9db8b3e1bbb604f9f285f6febf3d8b) --- src/racket/src/eval.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/racket/src/eval.c b/src/racket/src/eval.c index 8bb4e7738b9..a421bd8ef0e 100644 --- a/src/racket/src/eval.c +++ b/src/racket/src/eval.c @@ -815,7 +815,10 @@ static Scheme_Object *link_toplevel(Scheme_Object **exprs, int which, Scheme_Env exprs, which); } else { Module_Variable *mv = (Module_Variable *)expr; - + + if ((!insp || SCHEME_FALSEP(insp)) && !mv->insp) + insp = scheme_get_param(scheme_current_config(), MZCONFIG_CODE_INSPECTOR); + return link_module_variable(scheme_modidx_shift(mv->modidx, src_modidx, dest_modidx), From 4db334ee2a649bb565f3dcf3fe60ca866bc93d28 Mon Sep 17 00:00:00 2001 From: Stephen Chang Date: Wed, 13 Jul 2011 18:54:27 -0400 Subject: [PATCH 309/441] add make-lazy-proc to lazy stepper skipped fns list (Edited version of 3f79c37) --- collects/stepper/private/macro-unwind.rkt | 1 + 1 file changed, 1 insertion(+) diff --git a/collects/stepper/private/macro-unwind.rkt b/collects/stepper/private/macro-unwind.rkt index 6c798491bab..ad7f4bac7a1 100644 --- a/collects/stepper/private/macro-unwind.rkt +++ b/collects/stepper/private/macro-unwind.rkt @@ -70,6 +70,7 @@ [(#%plain-app f arg) (let ([fn (syntax->datum #'f)]) (or (eq? fn 'lazy-proc) + (eq? fn 'make-lazy-proc) (eq? fn 'force) (eq? fn '!) (eq? fn '!!) (eq? fn '!list) (eq? fn '!!list) (equal? fn '(#%plain-app parameter-procedure)))) From 631fed5386243ea4da045653ae1e593b946f6546 Mon Sep 17 00:00:00 2001 From: Stephen Chang Date: Mon, 18 Jul 2011 12:34:14 -0400 Subject: [PATCH 310/441] fix lazy stepper test - lazy-cond1 (cherry picked from commit 7eedae8f697f24dfa93799723952bd83aa1454ec) --- collects/tests/stepper/test-cases.rkt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/collects/tests/stepper/test-cases.rkt b/collects/tests/stepper/test-cases.rkt index 99706ae16e9..93f8846b1ed 100644 --- a/collects/tests/stepper/test-cases.rkt +++ b/collects/tests/stepper/test-cases.rkt @@ -1948,6 +1948,25 @@ (else ,clause2))} -> ,def {(cond (else ,clause2))} -> ,def {,clause2} -> ,def {10}) + ) + (let* ([make-test1 (λ (x) `(> 0 ,x))] + [make-test2 (λ (x) `(< 0 ,x))] + [test1 (make-test1 0)] + [test2 (make-test2 0)] + [test12 (make-test1 2)] + [test22 (make-test2 2)] + [make-clause1 (λ (x) `(* ,x 10))] + [make-clause2 (λ (x) `(+ ,x 10))] + [clause1 (make-clause1 0)] + [clause2 (make-clause2 0)] + [clause12 (make-clause1 2)] + [clause22 (make-clause2 2)] + [cnd (λ (x) `(cond (,(make-test1 x) ,err) + (,(make-test2 x) ,(make-clause1 x)) + (else ,(make-clause2 x))))] + [make-def (λ (x) `(define (f x) ,(cnd x)))] + [def (make-def 'x)] + [lam (λ (x) `(lambda (x) ,(cnd x)))]) (t 'lazy-cond2 m:lazy ,def (f 2) :: ,def ({f} 2) -> ,def ({,(lam 'x)} 2) From 8ccff338fd8bc60d60a5a6ba9fad3add6629f9e6 Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Thu, 21 Jul 2011 21:46:36 -0500 Subject: [PATCH 311/441] add version number to release notes please merge to release branch (cherry picked from commit f7f3971d1561487a9c247e5ed6aded332936bf2a) --- doc/release-notes/drracket/HISTORY.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/release-notes/drracket/HISTORY.txt b/doc/release-notes/drracket/HISTORY.txt index 0b5454df531..365603d6570 100644 --- a/doc/release-notes/drracket/HISTORY.txt +++ b/doc/release-notes/drracket/HISTORY.txt @@ -1,3 +1,7 @@ +------------------------------ + Version 5.1.2 +------------------------------ + . The EoPL language is no longer available via the Language dialog in DrRacket; use @@ -5,6 +9,8 @@ and the 'language declared in the source' language in DrRacket. + . Minor bug fixes + ------------------------------ Version 5.1.1 ------------------------------ From ad4377d44bdedb8aba5e96bac8cd85137cd32cf0 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Thu, 21 Jul 2011 17:26:38 -0600 Subject: [PATCH 312/441] work around win64 drawing problem Merge to 5.1.2 (cherry picked from commit 8711aa6c5d819899fce1ff06f5bf60fe01cc10cb) --- collects/mred/private/wx/win32/dc.rkt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/collects/mred/private/wx/win32/dc.rkt b/collects/mred/private/wx/win32/dc.rkt index 649e673d5d4..85caeb7fac5 100644 --- a/collects/mred/private/wx/win32/dc.rkt +++ b/collects/mred/private/wx/win32/dc.rkt @@ -1,5 +1,6 @@ #lang racket/base (require ffi/unsafe + ffi/winapi racket/class "utils.rkt" "types.rkt" @@ -20,6 +21,8 @@ request-flush-delay cancel-flush-delay)) +(define-gdi32 SelectClipRgn (_wfun _pointer _pointer -> _int)) + (define win32-bitmap% (class bitmap% (init w h hwnd [gl-config #f]) @@ -70,6 +73,21 @@ (super-new [transparent? transparent?]) + (inherit internal-get-bitmap) + (define/override (reset-clip cr) + (super reset-clip cr) + ;; Work around a Cairo(?) bug. When a clipping + ;; region is set, we draw text, and then the clipping + ;; region is changed, the change doesn't take + ;; until we draw more text --- but only under Win64, + ;; and only with DDB surfaces. + (when win64? + (let ([bm (internal-get-bitmap)]) + (when (bm . is-a? . win32-bitmap%) + (SelectClipRgn (cairo_win32_surface_get_dc + (send bm get-cairo-surface)) + #f))))) + (define gl #f) (define/override (get-gl-context) (or gl From cbd7e37cfce789cadcf5fefd29752cab80ab9194 Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Fri, 22 Jul 2011 08:09:17 -0500 Subject: [PATCH 313/441] fix the png conversion code for 2htdp/image images closes PR 12061 please merge to the release branch (cherry picked from commit 56b82ba83c5d29afaafbed602c8e14873a14f953) --- collects/2htdp/tests/test-image.rkt | 14 ++++++++++++-- collects/mrlib/image-core.rkt | 4 ++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/collects/2htdp/tests/test-image.rkt b/collects/2htdp/tests/test-image.rkt index 083dd16fe26..4a20cd227b0 100644 --- a/collects/2htdp/tests/test-image.rkt +++ b/collects/2htdp/tests/test-image.rkt @@ -2194,8 +2194,18 @@ (test (convertible? (circle 20 "solid" "red")) => #t) (test (bytes? (convert (circle 20 "solid" "red") 'png-bytes)) => #t) - - +(let () + (define tmpfile (make-temporary-file "2htdpimage-test-~a")) + (define i (circle 15 "solid" "red")) + (call-with-output-file tmpfile + (lambda (p) + (display (convert i 'png-bytes) p)) + #:exists 'truncate) + (define i2 (rotate 0 (read-bitmap tmpfile))) ;; add rotate to be sure we get an image so that equal? works properly + (delete-file tmpfile) + (test (image-width i2) => 30) + (test (image-height i2) => 30) + (test i2 => i)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; diff --git a/collects/mrlib/image-core.rkt b/collects/mrlib/image-core.rkt index c90e3376851..a22a3388055 100644 --- a/collects/mrlib/image-core.rkt +++ b/collects/mrlib/image-core.rkt @@ -231,8 +231,8 @@ has been moved out). (define (to-bitmap img) (let* ([bb (send img get-bb)] [bm (make-bitmap - (add1 (inexact->exact (ceiling (bb-right bb)))) - (add1 (inexact->exact (ceiling (bb-bottom bb)))))] + (inexact->exact (ceiling (bb-right bb))) + (inexact->exact (ceiling (bb-bottom bb))))] [bdc (new bitmap-dc% [bitmap bm])]) (send bdc erase) (render-image img bdc 0 0) From 40637616ad28a55c218f01c6261c875420793329 Mon Sep 17 00:00:00 2001 From: Matthias Felleisen Date: Fri, 22 Jul 2011 10:34:00 -0400 Subject: [PATCH 314/441] fixed a totally misleading error message in big-bang; MUST GO INTO RELEASE (cherry picked from commit ed7f16c872987a6aead663452abc4a7ebbbc059b) --- collects/2htdp/tests/on-tick-defined.rkt | 13 +++++++++++-- collects/2htdp/universe.rkt | 8 ++++---- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/collects/2htdp/tests/on-tick-defined.rkt b/collects/2htdp/tests/on-tick-defined.rkt index bec034fb80b..f210c16be7b 100644 --- a/collects/2htdp/tests/on-tick-defined.rkt +++ b/collects/2htdp/tests/on-tick-defined.rkt @@ -7,8 +7,17 @@ (error-print-source-location #f) (define legal "big-bang: ~a clauses are not allowed when using big-bang") -(define double - "big-bang: the on-tick clause appears twice") +(define double "big-bang: the on-tick clause appears twice") +(define atleast "big-bang: expects a [to-draw handler] clause, missing") + +;; is the mandatort to-draw clause specified +(with-handlers ((exn:fail:syntax? + (lambda (x) + (unless (string=? (exn-message x) atleast) (raise x))))) + (eval '(module a scheme + (require 2htdp/universe) + (local ((define (run) (big-bang 0 (on-tick add1)))) + 10)))) (with-handlers ((exn:fail:syntax? (lambda (x) diff --git a/collects/2htdp/universe.rkt b/collects/2htdp/universe.rkt index 7d382c7049c..bffdf4e22e5 100644 --- a/collects/2htdp/universe.rkt +++ b/collects/2htdp/universe.rkt @@ -218,7 +218,7 @@ "wheel-down")) (define-syntax (big-bang stx) - (define world0 "expects an expression for the initial world and at least one clause, but nothing's there") + (define world0 "expects an expression for the initial world and at least one clause") (syntax-case stx () [(big-bang) (raise-syntax-error #f world0 stx)] [(big-bang w clause ...) @@ -234,7 +234,7 @@ [dom (syntax->list #'(clause ...))]) (cond [(and (not (contains-clause? #'to-draw dom)) (not (contains-clause? #'on-draw dom))) - (raise-syntax-error #f "expects at least one clause after the initial world, but nothing's there" stx)] + (raise-syntax-error #f "expects a [to-draw handler] clause, missing" stx)] [else (stepper-syntax-property #`(run-it ((new-world (if #,rec? aworld% world%)) w #,@args)) @@ -314,8 +314,8 @@ (define-syntax (universe stx) (syntax-case stx () - [(universe) (raise-syntax-error #f "expects an expression for the initial world and at least one clause, but nothing's there" stx)] - [(universe u) (raise-syntax-error #f "expects at least one clause after the initial world, but nothing's there" stx)] + [(universe) (raise-syntax-error #f "expects an expression for the initial world" stx)] + [(universe u) (raise-syntax-error #f "expects at least an on-new and an on-msg clause after the initial world" stx)] [(universe u bind ...) (let* ([args (->args 'universe stx #'u #'(bind ...) UniSpec void)] [dom (syntax->list #'(bind ...))]) From 7ee468a85733e9719781a98acbb323a51c83b56b Mon Sep 17 00:00:00 2001 From: Matthias Felleisen Date: Fri, 22 Jul 2011 15:29:59 -0400 Subject: [PATCH 315/441] revised history, push to release branch (cherry picked from commit b4d091438de4218d087f4906cec5f2f51f9858d4) --- doc/release-notes/teachpack/HISTORY.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/doc/release-notes/teachpack/HISTORY.txt b/doc/release-notes/teachpack/HISTORY.txt index fd9bd64f91d..4954df644d7 100644 --- a/doc/release-notes/teachpack/HISTORY.txt +++ b/doc/release-notes/teachpack/HISTORY.txt @@ -1,3 +1,11 @@ +------------------------------------------------------------------------ +Version 5.1.2 [Fri Jul 22 15:27:37 EDT 2011] + +* The error messages of the image and universe teachpacks have been + revised substantially. They will be improved again next release. + +* 5.1.3: the on-tick clause now takes a max number of ticks + ------------------------------------------------------------------------ Version 5.1.1 [Tue Apr 26 22:38:44 EDT 2011] From fd6e9c28d3a4cc4d696a4b6d35ca4d12b2c3bd80 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Fri, 22 Jul 2011 22:19:19 -0400 Subject: [PATCH 316/441] fix compiler/zo-parse for sequence splice Merge to 5.1.2 (cherry picked from commit 42f41d868a133751722a426467168005d8cfb0ef) --- collects/compiler/zo-parse.rkt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collects/compiler/zo-parse.rkt b/collects/compiler/zo-parse.rkt index 287498ba73f..12ccf16a820 100644 --- a/collects/compiler/zo-parse.rkt +++ b/collects/compiler/zo-parse.rkt @@ -353,7 +353,7 @@ (cons 'require-form-type read-require) (cons 'varref-form-type read-#%variable-ref) (cons 'apply-values-type read-apply-values) - (cons 'sequence-splice-type read-splice)))) + (cons 'splice-sequence-type read-splice)))) (define (get-reader type) (hash-ref type-readers type From 7895045a1c17e09bc51d2cd91598dc3c89c452f4 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sat, 23 Jul 2011 19:52:42 -0600 Subject: [PATCH 317/441] win32: fix `copy-file' handling of file-exists error The specific error reported by CopyFileW doesn't seem to be documented. It's unclear whether Racket's old test for ERROR_EXISTS_ALREADY was the wrong choice (as opposed to ERROR_FILE_EXISTS) or whether some Windows versions use it; we test for both for now. Also, improve error reporting when an errno or GetLastError() value is available. Closes PR 12074 Merge to 5.1.2 (cherry picked from commit c9d4e0fb8cb775288fbcdd0378d7306a38488c06) --- src/racket/src/error.c | 27 ++++++++++++++++++++------- src/racket/src/file.c | 22 ++++++++++++++++++---- 2 files changed, 38 insertions(+), 11 deletions(-) diff --git a/src/racket/src/error.c b/src/racket/src/error.c index dcae959205c..4d2937ee087 100644 --- a/src/racket/src/error.c +++ b/src/racket/src/error.c @@ -202,12 +202,14 @@ Scheme_Config *scheme_init_error_escape_proc(Scheme_Config *config) %- = skip int %L = line number as intptr_t, -1 means no line - %e = error number for strerror() + %e = error number for strerror()/FormatMessage() %E = error number for platform-specific error string %Z = potential platform-specific error number; additional char* is either NULL or a specific error message %N = boolean then error number like %E (if boolean is 0) or error number for scheme_hostname_error() + %m = boolean then error number like %e, which + is used only if the boolean is 1 */ static intptr_t sch_vsprintf(char *s, intptr_t maxlen, const char *msg, va_list args, char **_s) @@ -259,6 +261,7 @@ static intptr_t sch_vsprintf(char *s, intptr_t maxlen, const char *msg, va_list ints[ip++] = mzVA_ARG(args, int); break; case 'N': + case 'm': ints[ip++] = mzVA_ARG(args, int); ints[ip++] = mzVA_ARG(args, int); break; @@ -389,14 +392,19 @@ static intptr_t sch_vsprintf(char *s, intptr_t maxlen, const char *msg, va_list } break; case 'e': + case 'm': case 'E': case 'Z': case 'N': { - int en, he; + int en, he, none = 0; char *es; - - if (type == 'N') { + + if (type == 'm') { + none = !ints[ip++]; + type = 'e'; + he = 0; + } else if (type == 'N') { he = ints[ip++]; type = 'E'; } else @@ -412,7 +420,7 @@ static intptr_t sch_vsprintf(char *s, intptr_t maxlen, const char *msg, va_list if (he) es = (char *)scheme_hostname_error(en); - if (en || es) { + if ((en || es) && !none) { #ifdef NO_STRERROR_AVAILABLE if (!es) es = "Unknown error"; @@ -443,8 +451,13 @@ static intptr_t sch_vsprintf(char *s, intptr_t maxlen, const char *msg, va_list sprintf((char *)t, "%s; errno=%d", es, en); tlen = strlen(t); } else { - t = "errno=?"; - tlen = 7; + if (none) { + t = ""; + tlen = 0; + } else { + t = "errno=?"; + tlen = 7; + } } } diff --git a/src/racket/src/file.c b/src/racket/src/file.c index d62f2d827d6..1924b7b47d7 100644 --- a/src/racket/src/file.c +++ b/src/racket/src/file.c @@ -3834,7 +3834,7 @@ static Scheme_Object *rename_file(int argc, Scheme_Object **argv) static Scheme_Object *copy_file(int argc, Scheme_Object **argv) { char *src, *dest, *reason = NULL; - int pre_exists = 0; + int pre_exists = 0, has_err_val = 0, err_val = 0; Scheme_Object *bss, *bsd; if (!SCHEME_PATH_STRINGP(argv[0])) @@ -3885,12 +3885,16 @@ static Scheme_Object *copy_file(int argc, Scheme_Object **argv) s = fopen(src, "rb"); if (!s) { + err_val = errno; + has_err_val = 1; reason = "cannot open source file"; goto failed; } d = fopen(dest, "wb"); if (!d) { + err_val = errno; + has_err_val = 1; fclose(s); reason = "cannot open destination file"; goto failed; @@ -3916,6 +3920,8 @@ static Scheme_Object *copy_file(int argc, Scheme_Object **argv) else if (errno != EINTR) break; } + err_val = errno; + has_err_val = 0; reason = "cannot set destination's mode"; } else reason = "read or write failed"; @@ -3927,15 +3933,23 @@ static Scheme_Object *copy_file(int argc, Scheme_Object **argv) return scheme_void; reason = "copy failed"; - if (GetLastError() == ERROR_ALREADY_EXISTS) + err_val = GetLastError(); + if ((err_val == ERROR_FILE_EXISTS) + || (err_val == ERROR_ALREADY_EXISTS)) pre_exists = 1; + has_err_val = 1; #endif scheme_raise_exn(pre_exists ? MZEXN_FAIL_FILESYSTEM_EXISTS : MZEXN_FAIL_FILESYSTEM, - "copy-file: %s; cannot copy: %q to: %q", + "copy-file: %s; cannot copy: %q to: %q%s%m%s", reason, filename_for_error(argv[0]), - filename_for_error(argv[1])); + filename_for_error(argv[1]), + has_err_val ? " (" : "", + has_err_val, + err_val, + has_err_val ? ")" : ""); + return NULL; } From 602ddbf48aa559727339ee29ee072c79e0b5ce97 Mon Sep 17 00:00:00 2001 From: Stephen Bloch Date: Sun, 24 Jul 2011 07:20:56 -0400 Subject: [PATCH 318/441] Changed error messages in test case to match corrected error messages in 2htdp. (cherry picked from commit ab01d563ca6a0313e1cb5c07372a2bd2929ae4bc) --- collects/picturing-programs/tests/map-image-bsl-tests.rkt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collects/picturing-programs/tests/map-image-bsl-tests.rkt b/collects/picturing-programs/tests/map-image-bsl-tests.rkt index 673a3615fb2..ccbe94dc2dc 100644 --- a/collects/picturing-programs/tests/map-image-bsl-tests.rkt +++ b/collects/picturing-programs/tests/map-image-bsl-tests.rkt @@ -208,7 +208,7 @@ (define (return-minus-5 x y) -5) (check-error (build3-image 17 24 x-gradient-2 y-gradient-2 return-minus-5) - "make-color: Expected an integer between 0 and 255 as third argument, given: -5") + "make-color: expects an integer between 0 and 255 as third argument, given -5") "Test cases for build4-image:" "(build4-image 50 50 x-gradient-2 x-gradient-2 zero-2-args y-gradient-2) should be a square, increasingly yellow from left to right and increasingly alpha from top to bottom. On a blue background." From 861301537cbe935a5268805600d790ed50bd3939 Mon Sep 17 00:00:00 2001 From: Stephen Bloch Date: Sun, 24 Jul 2011 18:39:40 -0400 Subject: [PATCH 319/441] Fixed an off-by-one bug in "myflip", an example for build-image. Now it passes its tests :-) (cherry picked from commit 9a24e66df0e2f7c3a516ce3d3542aab099afaaa3) --- collects/picturing-programs/tests/map-image-isl-tests.rkt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/collects/picturing-programs/tests/map-image-isl-tests.rkt b/collects/picturing-programs/tests/map-image-isl-tests.rkt index 2f35d137e25..62b62166c6f 100644 --- a/collects/picturing-programs/tests/map-image-isl-tests.rkt +++ b/collects/picturing-programs/tests/map-image-isl-tests.rkt @@ -15,10 +15,13 @@ ; myflip : image -> image ; vertical reflection defined by bitmap operations (define (myflip pic) - (local [(define (other-pixel x y) (get-pixel-color x (- (image-height pic) y) pic))] + (local [(define (other-pixel x y) (get-pixel-color x (- (image-height pic) y 1) pic))] (build-image (image-width pic) (image-height pic) other-pixel))) + +(check-expect (myflip pic:bloch) (flip-vertical pic:bloch)) + (define RADIUS 1) (define (clip-to n low high) From 37eca3412ffa3246bc98ec05ce5e21cd264d08fa Mon Sep 17 00:00:00 2001 From: Stephen Chang Date: Sun, 24 Jul 2011 12:18:09 -0400 Subject: [PATCH 320/441] change recon-val in stepper to use render-to-sexpr for non-lazy lists Picked from 8956364 and edited for conflicts due to indentation changes. --- collects/stepper/private/reconstruct.rkt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/collects/stepper/private/reconstruct.rkt b/collects/stepper/private/reconstruct.rkt index b562a130284..c51b592a179 100644 --- a/collects/stepper/private/reconstruct.rkt +++ b/collects/stepper/private/reconstruct.rkt @@ -173,8 +173,10 @@ (add1 next-unknown-promise)))])] ; STC: handle lists here, instead of deferring to render-to-sexp fn ; because there may be nested promises - [(null? val) #'empty] - [(list? val) + #;[(null? val) #'empty] + [(and (not (null? val)) + (list? val) + (ormap promise? val)) (with-syntax ([(reconed-vals ...) (map @@ -183,7 +185,9 @@ (if (render-settings-constructor-style-printing? render-settings) #'(#%plain-app list reconed-vals ...) #'`(reconed-vals ...)))] - [(pair? val) + [(and (pair? val) + (or (promise? (car val)) + (promise? (cdr val)))) (with-syntax ([reconed-car (recon-value (car val) render-settings From 2c5e9b9e42613ea070dbc5d1375aeebd945977f9 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Wed, 27 Jul 2011 15:25:30 +0100 Subject: [PATCH 321/441] fix problem with initialization of tag name array The bug to lead to a crash from `(dump-memory-stats)' Mrege to 5.1.2 (cherry picked from commit e6b4d547c9c53a682b411f48af3c4393a1a6406f) --- src/racket/src/type.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/src/racket/src/type.c b/src/racket/src/type.c index e11c8893d55..98f1bbb9156 100644 --- a/src/racket/src/type.c +++ b/src/racket/src/type.c @@ -66,9 +66,10 @@ static void init_type_arrays() allocmax = maxtype + 100; type_names = RAW_MALLOC_N(char *, allocmax); + memset(type_names, 0, allocmax * sizeof(char *)); scheme_type_readers = RAW_MALLOC_N(Scheme_Type_Reader, allocmax); n = allocmax * sizeof(Scheme_Type_Reader); - memset((char *)scheme_type_readers, 0, n); + memset(scheme_type_readers, 0, n); #ifdef MEMORY_COUNTING_ON scheme_type_table_count += n; @@ -77,7 +78,7 @@ static void init_type_arrays() scheme_type_writers = RAW_MALLOC_N(Scheme_Type_Writer, allocmax); n = allocmax * sizeof(Scheme_Type_Writer); - memset((char *)scheme_type_writers, 0, n); + memset(scheme_type_writers, 0, n); #ifdef MEMORY_COUNTING_ON scheme_type_table_count += n; @@ -85,15 +86,15 @@ static void init_type_arrays() scheme_type_equals = RAW_MALLOC_N(Scheme_Equal_Proc, allocmax); n = allocmax * sizeof(Scheme_Equal_Proc); - memset((char *)scheme_type_equals, 0, n); + memset(scheme_type_equals, 0, n); scheme_type_hash1s = RAW_MALLOC_N(Scheme_Primary_Hash_Proc, allocmax); n = allocmax * sizeof(Scheme_Primary_Hash_Proc); - memset((char *)scheme_type_hash1s, 0, n); + memset(scheme_type_hash1s, 0, n); scheme_type_hash2s = RAW_MALLOC_N(Scheme_Secondary_Hash_Proc, allocmax); n = allocmax * sizeof(Scheme_Secondary_Hash_Proc); - memset((char *)scheme_type_hash2s, 0, n); + memset(scheme_type_hash2s, 0, n); } void @@ -213,6 +214,7 @@ scheme_init_type () set_name(scheme_regexp_type, ""); set_name(scheme_rename_table_type, ""); set_name(scheme_bucket_type, ""); + set_name(scheme_prefix_type, ""); set_name(scheme_resolve_prefix_type, ""); set_name(scheme_readtable_type, ""); @@ -323,35 +325,36 @@ Scheme_Type scheme_make_type(const char *name) naya = malloc(allocmax * sizeof(char *)); memcpy(naya, type_names, maxtype * sizeof(char *)); + memset(naya, 0, maxtype * sizeof(char *)); free(type_names); type_names = (char **)naya; naya = malloc(n = allocmax * sizeof(Scheme_Type_Reader)); - memset((char *)naya, 0, n); + memset(naya, 0, n); memcpy(naya, scheme_type_readers, maxtype * sizeof(Scheme_Type_Reader)); free(scheme_type_readers); scheme_type_readers = (Scheme_Type_Reader *)naya; naya = malloc(n = allocmax * sizeof(Scheme_Type_Writer)); - memset((char *)naya, 0, n); + memset(naya, 0, n); memcpy(naya, scheme_type_writers, maxtype * sizeof(Scheme_Type_Writer)); free(scheme_type_writers); scheme_type_writers = (Scheme_Type_Writer *)naya; naya = malloc(n = allocmax * sizeof(Scheme_Equal_Proc)); - memset((char *)naya, 0, n); + memset(naya, 0, n); memcpy(naya, scheme_type_equals, maxtype * sizeof(Scheme_Equal_Proc)); free(scheme_type_equals); scheme_type_equals = (Scheme_Equal_Proc *)naya; naya = malloc(n = allocmax * sizeof(Scheme_Primary_Hash_Proc)); - memset((char *)naya, 0, n); + memset(naya, 0, n); memcpy(naya, scheme_type_hash1s, maxtype * sizeof(Scheme_Primary_Hash_Proc)); free(scheme_type_hash1s); scheme_type_hash1s = (Scheme_Primary_Hash_Proc *)naya; naya = malloc(n = allocmax * sizeof(Scheme_Secondary_Hash_Proc)); - memset((char *)naya, 0, n); + memset(naya, 0, n); memcpy(naya, scheme_type_hash2s, maxtype * sizeof(Scheme_Secondary_Hash_Proc)); free(scheme_type_hash2s); scheme_type_hash2s = (Scheme_Secondary_Hash_Proc *)naya; From f4cab3e47bb1dfda878234bd9f1c335782e37d51 Mon Sep 17 00:00:00 2001 From: John Clements Date: Thu, 28 Jul 2011 22:50:11 -0400 Subject: [PATCH 322/441] updated history. Merge to 5.1.2 (cherry picked from commit b346665c5c759b33baf711df35d4b42bcccd3b45) --- doc/release-notes/stepper/HISTORY.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/release-notes/stepper/HISTORY.txt b/doc/release-notes/stepper/HISTORY.txt index 640c6e0320d..381b630f9f8 100644 --- a/doc/release-notes/stepper/HISTORY.txt +++ b/doc/release-notes/stepper/HISTORY.txt @@ -1,6 +1,12 @@ Stepper ------- +Changes for v5.1.2: + +Support for 'require' in stepped programs, fixed a number of +bugs, lots of cleanup & refactoring, some documentation +changes. + Changes for v5.1.1: None. From de605d4fe15e865931e64f8a04ef19d7baf31bca Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Tue, 2 Aug 2011 12:43:12 -0400 Subject: [PATCH 323/441] Updated DrRacket images (cherry picked from commit a748b35f35b46a4760f01044d399fa98ae02bbff) --- collects/scribblings/drracket/debugger1.png | Bin 45690 -> 85380 bytes collects/scribblings/drracket/example.png | Bin 42557 -> 74298 bytes collects/scribblings/drracket/io.png | Bin 33097 -> 59919 bytes 3 files changed, 0 insertions(+), 0 deletions(-) diff --git a/collects/scribblings/drracket/debugger1.png b/collects/scribblings/drracket/debugger1.png index f5e75ba542502606185a46a1d4c5e4a627ae431b..2fdfce6ddcb0cddbe8ec51daef0e1b7a630a46f0 100644 GIT binary patch literal 85380 zcmYhj1z42P8ZB&45)#tg-5?;{odeR{HFT$R35aw{iGXysG>DW)4xQ4{4gcocd(QoR zo_PkxnU6i+-uqqaU2AQlRF!4WkO`5WJ$r^GCo2hg_UuK+vuDo*kr2Quw0JcF;OV(5 zL`M8s#VGL(_zQxmf{Y}127j(4S_8q;D<@eU*Jsbr`N0G0`A>6qYw#kXo1BsqA`IyT z1|_mP&X6p4iNH-t+fBj|3bk->dnVyxVd7?CPVQ;rW=$?5r=+SC^cwHkGxBG0l42TO z^ZV`IZPf4mFCT@AOMQ+y{2QA+FT$iOwBKvOQ+!4W&cK(VP~+$iGyWr)yJ00-0QYv| z(%KJ;ozev5b#OesmZ;eCxuIuVs6Faqx^qP38aQZR-?wLQDa6}oF|d~Z-<2v~?WdOYbh$}c{~8WtE6TdK z%9H+U`=4I|F6~vnE^6?~Pxw!o%DQjSpSl4n`M@uJc7XxQOr=+&lD79pb<-3CX#abA z*p)679n47BlYQ_oXb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Fqmf zV|tMbkSMLo<;~cXGOofx!OAU$O>LRU^0l5R6nt*-w^kaT*&mAU{APc!l;RkTP(DBu z`rg;i10wXpnc`sWBLn)Gr2xTu@f*Mp13#UFonU~Zd`M+w+X>+EfYQ-n`(2PLT7U>A zQZ(wwVi-P*_V|s%1?_d zZ_;_TvW6Shy`HpZsp@fowKxQ)A3&U~!Iz>3>Qs)Sc}~ssfoc1XgN<$!ZkJ1qjcIRM z?L8g;nAe*99>?J`t2JtNy1LhP1TfShPIKDMXoT9c+q@m+M$O3OaFRFJ9RP#4ySrPP zg%jy*mItV1N?BGJy22yXp+42#J~ZG%eAjv~1VD5@lTduGcndo9k6}}gtpK9| OpVx|N3gs_M!~P$nZGhGQ diff --git a/collects/scribblings/drracket/example.png b/collects/scribblings/drracket/example.png index 4ffe4d2c233c44e461c7ae57eab02b29e212165a..1c43cd504b8e4c2d9fae6a8ab6b8f137643b5e20 100644 GIT binary patch literal 74298 zcma&NWl&sQ&^3w#5;O#N3GVI?2=4Cg?(PH#?(XjH?(Xg$+}-`2JbAzGt-5u8T&kvK zn6u|>Ila4AuU1O!f0L_iJ%1k4l!1hno8B=C(XdsPSU25K)S%m-32 zfqex01F0u2EC9R%e^30a-oP7_jfko}2*_6s;Drb}V&G^3eEHcyR8sKs>K8Bscut(> zoHgJp3-XdjV zP(%>W=#qs*Kp=-EBVz!QYXE~VBd_ysFip){_VTWSG96k;keqzE8=+)<*s!;oct~?U zKk%BgGo(oz?Vk+FRCW3U=EIAR@Y_d%8o^GW}; z`0^=HJyApQibQif4917_ZzG>ScC+Z&d(!qAyu0lj?r#P>_H_!0BDQ!;r&D6~$*FOcKIESTl*2)=yk)QCnqZWHNOmJh0j z46Q3bG?pY-!6aPzy@d2%XU{0gaB!ebJQYdwKOXm4+^A@Glrv&8;-T*kMfK4S~l}tamlZOfuzf?{2WPr}sA&kzVjm z=4FXg8U(1pI;|Rd<)VpyOv2b;?l{vtJN(_4xh%fF)^jsHnB_~ym42Z;E;or3cu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WSMm<_0ou%uVy~~e%BL2ne#UHDSb{3daeRKzq1qkgwB-mLA7Yu!A+6x&`iL- zD2Kd;0pL?ZDUiN8xOZ}6ITymbA)R7kvSa9eG*o)M1KF|XQY6vwP1iFjeUuoqjqV_F z@L^+2EZD>)-1QhPl<_Jw{K6RN#yM#qxS92~%|%w-XELf!2P9SfW8e6BLleU((H05+ zIJ8Jxx0q^LwXgYixAk$tyg91R5VSq{c-?qTjCN(fU_6k_!G-lAFST1lMOogv{z0Jk zKNX%=QRX~0ONah;7qgY6eM+onKBu7o7~=A&>A&Y&{ejDoS3P$+)lry?m7on9Ut{(Q zCN@pgv+z9<9|F(_J$G|BL!dqs%6L52ZUxm%P##}+DF8$u+q&(oTV82tg`zTT(ptLf z24aNOvS%cqsOQJ3yCgn6W^rLff&=LyN_W*?fzIoxhQo6EWOQ}CgFG829~zElMoj@6 z@v2Eth0@~6qexS@ss#b4bZ2QS9%ljKLEHr-#h>S diff --git a/collects/scribblings/drracket/io.png b/collects/scribblings/drracket/io.png index 0efc145f13617bfa0114493a454fa97b9eb22baa..59eb2c8e90f23fe59ac34559744ac8e5136d1c99 100644 GIT binary patch literal 59919 zcmafabyOV96DZ)6}ZU@Usiy**a!9qYlAc%Hxkz*vpIXLsX38 z90EUJ^dv+CA>Q8qvf2w{ftD{eqH6XK5J>F62j#=Cfujk~_{l*`O6b$d=Z{}uG0SdA zIDsZi2O(7l0c%T3Ln{Xe0Xsuo2SbA&&ZZ6~KSac&WL10+ze7O$fDjYpQ*>EANe8(r z&aE|NCO6j-B}a*g>U{p7W&rn;6GVk|#2@X8wOT}`{0BXbK-~Qp?z&u7QE~a|TNz`B zZxEbnzPGoyEH7U)tmxuLsGy%wP&LLeOP*dt43YtAu~mn65AIh(qwRNTYLD*!1N?&GYg#rf;`tpMQ~0|)p8T`#kI%j~ z)$KcW!>M*`&cC5#{<|bpN^8+={@U<^=xya?dJeZ{$A=CPDK%{8$>fASKqYc@Ln zfT!j$i~K25UUSS}xf`nq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zifwIK7`{tp*W-K~ZK)aRC85=Y@kzxEFbmIdHdo<*KA(wU&?t#MAYoYOwoxt&cDt%o zr%}$DMRN$A{%1(aU3#jJ3>Z5;KpdXKW7MlJE3JweYI4iQjtv)p(gV<@w3x6O3eSJ) zL(f6zy>3HfeaBI)xHDkgoFE@6FAB#@j3Q{+Shct-^Dp`o=9Tz2cVA~GaAEMub)h(I zX~rXZO$+J6zqry`U;10`^<(1m{%1`xBTFggX8KDWexTLZlvy^1#aIjp1ZbUhS}zgV z#{jImInz>l9PBGP)EDJ=u8EYhnX#thfRT5yQV6Xx8uv_DtxgL;0pxms`0ULC_WY%R z_DN0*SS-JlrP#&H!OQ@kA9qgS@Ly;ycRu)kh!_q+VWi$=k)Y1ls{`K(k``AGD;F^e F`afbAd_4dF From 4806c15bfee3d847a72444fecbf744a72333bcc4 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Mon, 1 Aug 2011 14:54:53 -0400 Subject: [PATCH 324/441] Fix `unstable/time' & xrepl use. (Just the relevant part of 1caa28d) --- collects/unstable/time.rkt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/collects/unstable/time.rkt b/collects/unstable/time.rkt index 5350346c6fe..df54abe409e 100644 --- a/collects/unstable/time.rkt +++ b/collects/unstable/time.rkt @@ -1,11 +1,11 @@ #lang racket/base ;; An improved `time' variant: better output, and repetitions with averages -(provide time) +(provide time*) (require racket/list) -(define (time* thunk times) +(define (time/proc thunk times) (define throw (if (<= times 0) (error 'time "bad count: ~e" times) @@ -43,7 +43,7 @@ cpu (- cpu gc) gc real)) (apply values results)) -(define-syntax time +(define-syntax time* (syntax-rules () - [(_ n expr0 expr ...) (time* (lambda () expr0 expr ...) n)] - [(_ expr0 expr ...) (time* (lambda () expr0 expr ...) 1)])) + [(_ n expr0 expr ...) (time/proc (lambda () expr0 expr ...) n)] + [(_ expr0 expr ...) (time/proc (lambda () expr0 expr ...) 1)])) From 7ddf119c4d163b7da9e177a6497a99a4ecce0051 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Tue, 2 Aug 2011 23:26:02 -0400 Subject: [PATCH 325/441] Update version number for the v5.1.2 release --- src/racket/src/schvers.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/racket/src/schvers.h b/src/racket/src/schvers.h index 55caba25639..7dea218c998 100644 --- a/src/racket/src/schvers.h +++ b/src/racket/src/schvers.h @@ -13,12 +13,12 @@ consistently.) */ -#define MZSCHEME_VERSION "5.1.1.900" +#define MZSCHEME_VERSION "5.1.2" #define MZSCHEME_VERSION_X 5 #define MZSCHEME_VERSION_Y 1 -#define MZSCHEME_VERSION_Z 1 -#define MZSCHEME_VERSION_W 900 +#define MZSCHEME_VERSION_Z 2 +#define MZSCHEME_VERSION_W 0 #define MZSCHEME_VERSION_MAJOR ((MZSCHEME_VERSION_X * 100) + MZSCHEME_VERSION_Y) #define MZSCHEME_VERSION_MINOR ((MZSCHEME_VERSION_Z * 1000) + MZSCHEME_VERSION_W) From e75fc54f64553506f4d5071e0fbc889c1415affb Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Tue, 2 Aug 2011 23:26:08 -0400 Subject: [PATCH 326/441] New Racket version 5.1.2. --- src/worksp/gracket/gracket.manifest | 2 +- src/worksp/gracket/gracket.rc | 8 ++++---- src/worksp/mzcom/mzcom.rc | 8 ++++---- src/worksp/mzcom/mzobj.rgs | 6 +++--- src/worksp/racket/racket.manifest | 2 +- src/worksp/racket/racket.rc | 8 ++++---- src/worksp/starters/start.rc | 8 ++++---- 7 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/worksp/gracket/gracket.manifest b/src/worksp/gracket/gracket.manifest index f385cd85e23..cfc0dcd9f6d 100644 --- a/src/worksp/gracket/gracket.manifest +++ b/src/worksp/gracket/gracket.manifest @@ -1,6 +1,6 @@ - diff --git a/src/worksp/gracket/gracket.rc b/src/worksp/gracket/gracket.rc index fefc4dffc3f..3f62ed67d6e 100644 --- a/src/worksp/gracket/gracket.rc +++ b/src/worksp/gracket/gracket.rc @@ -17,8 +17,8 @@ APPLICATION ICON DISCARDABLE "gracket.ico" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 5,1,1,900 - PRODUCTVERSION 5,1,1,900 + FILEVERSION 5,1,2,0 + PRODUCTVERSION 5,1,2,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -36,11 +36,11 @@ BEGIN VALUE "CompanyName", "PLT Scheme Inc.\0" VALUE "FileDescription", "Racket GUI application\0" VALUE "InternalName", "GRacket\0" - VALUE "FileVersion", "5, 1, 1, 900\0" + VALUE "FileVersion", "5, 1, 2, 0\0" VALUE "LegalCopyright", "Copyright © 1995-2011\0" VALUE "OriginalFilename", "GRacket.exe\0" VALUE "ProductName", "Racket\0" - VALUE "ProductVersion", "5, 1, 1, 900\0" + VALUE "ProductVersion", "5, 1, 2, 0\0" END END BLOCK "VarFileInfo" diff --git a/src/worksp/mzcom/mzcom.rc b/src/worksp/mzcom/mzcom.rc index a4d5c58f1db..8810ba95cda 100644 --- a/src/worksp/mzcom/mzcom.rc +++ b/src/worksp/mzcom/mzcom.rc @@ -53,8 +53,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 5,1,1,900 - PRODUCTVERSION 5,1,1,900 + FILEVERSION 5,1,2,0 + PRODUCTVERSION 5,1,2,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -70,12 +70,12 @@ BEGIN BLOCK "040904b0" BEGIN VALUE "FileDescription", "MzCOM Module" - VALUE "FileVersion", "5, 1, 1, 900" + VALUE "FileVersion", "5, 1, 2, 0" VALUE "InternalName", "MzCOM" VALUE "LegalCopyright", "Copyright 2000-2011 PLT (Paul Steckler)" VALUE "OriginalFilename", "MzCOM.EXE" VALUE "ProductName", "MzCOM Module" - VALUE "ProductVersion", "5, 1, 1, 900" + VALUE "ProductVersion", "5, 1, 2, 0" END END BLOCK "VarFileInfo" diff --git a/src/worksp/mzcom/mzobj.rgs b/src/worksp/mzcom/mzobj.rgs index 57221f610c0..b6f4396c6f8 100644 --- a/src/worksp/mzcom/mzobj.rgs +++ b/src/worksp/mzcom/mzobj.rgs @@ -1,19 +1,19 @@ HKCR { - MzCOM.MzObj.5.1.1.900 = s 'MzObj Class' + MzCOM.MzObj.5.1.2.0 = s 'MzObj Class' { CLSID = s '{A3B0AF9E-2AB0-11D4-B6D2-0060089002FE}' } MzCOM.MzObj = s 'MzObj Class' { CLSID = s '{A3B0AF9E-2AB0-11D4-B6D2-0060089002FE}' - CurVer = s 'MzCOM.MzObj.5.1.1.900' + CurVer = s 'MzCOM.MzObj.5.1.2.0' } NoRemove CLSID { ForceRemove {A3B0AF9E-2AB0-11D4-B6D2-0060089002FE} = s 'MzObj Class' { - ProgID = s 'MzCOM.MzObj.5.1.1.900' + ProgID = s 'MzCOM.MzObj.5.1.2.0' VersionIndependentProgID = s 'MzCOM.MzObj' ForceRemove 'Programmable' LocalServer32 = s '%MODULE%' diff --git a/src/worksp/racket/racket.manifest b/src/worksp/racket/racket.manifest index 38a36b1736b..6ba8306cb7a 100644 --- a/src/worksp/racket/racket.manifest +++ b/src/worksp/racket/racket.manifest @@ -1,6 +1,6 @@ - diff --git a/src/worksp/racket/racket.rc b/src/worksp/racket/racket.rc index d70780fd27c..581a4c356cb 100644 --- a/src/worksp/racket/racket.rc +++ b/src/worksp/racket/racket.rc @@ -29,8 +29,8 @@ APPLICATION ICON DISCARDABLE "racket.ico" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 5,1,1,900 - PRODUCTVERSION 5,1,1,900 + FILEVERSION 5,1,2,0 + PRODUCTVERSION 5,1,2,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -48,11 +48,11 @@ BEGIN VALUE "CompanyName", "PLT Scheme Inc.\0" VALUE "FileDescription", "Racket application\0" VALUE "InternalName", "Racket\0" - VALUE "FileVersion", "5, 1, 1, 900\0" + VALUE "FileVersion", "5, 1, 2, 0\0" VALUE "LegalCopyright", "Copyright © 1995-2011\0" VALUE "OriginalFilename", "racket.exe\0" VALUE "ProductName", "Racket\0" - VALUE "ProductVersion", "5, 1, 1, 900\0" + VALUE "ProductVersion", "5, 1, 2, 0\0" END END BLOCK "VarFileInfo" diff --git a/src/worksp/starters/start.rc b/src/worksp/starters/start.rc index 8fa54b7f8eb..594f9623277 100644 --- a/src/worksp/starters/start.rc +++ b/src/worksp/starters/start.rc @@ -22,8 +22,8 @@ APPLICATION ICON DISCARDABLE "mzstart.ico" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 5,1,1,900 - PRODUCTVERSION 5,1,1,900 + FILEVERSION 5,1,2,0 + PRODUCTVERSION 5,1,2,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -45,7 +45,7 @@ BEGIN #ifdef MZSTART VALUE "FileDescription", "Racket Launcher\0" #endif - VALUE "FileVersion", "5, 1, 1, 900\0" + VALUE "FileVersion", "5, 1, 2, 0\0" #ifdef MRSTART VALUE "InternalName", "mrstart\0" #endif @@ -60,7 +60,7 @@ BEGIN VALUE "OriginalFilename", "MzStart.exe\0" #endif VALUE "ProductName", "Racket\0" - VALUE "ProductVersion", "5, 1, 1, 900\0" + VALUE "ProductVersion", "5, 1, 2, 0\0" END END BLOCK "VarFileInfo" From f49b095c07a296419730e9880d6b63165f4dde8f Mon Sep 17 00:00:00 2001 From: Eric Dobson Date: Wed, 6 Jul 2011 11:48:05 -0400 Subject: [PATCH 327/441] Fix kernel-struct tests in TR. (cherry picked from commit e6030295fff3c50dd66ddcd6d1d39a5b8ea18247) --- collects/tests/typed-scheme/unit-tests/typecheck-tests.rkt | 2 -- collects/typed-scheme/base-env/base-structs.rkt | 4 +++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/collects/tests/typed-scheme/unit-tests/typecheck-tests.rkt b/collects/tests/typed-scheme/unit-tests/typecheck-tests.rkt index e6a2167e50a..f16ae1bad50 100644 --- a/collects/tests/typed-scheme/unit-tests/typecheck-tests.rkt +++ b/collects/tests/typed-scheme/unit-tests/typecheck-tests.rkt @@ -1356,8 +1356,6 @@ |# ;Kernel Structs, check that their hidden identifiers type - ;Currently broken in test-suite because of binding differences - #; (tc-e (void exn exn:fail exn:fail:contract diff --git a/collects/typed-scheme/base-env/base-structs.rkt b/collects/typed-scheme/base-env/base-structs.rkt index 833de9dfe0e..daf97798144 100644 --- a/collects/typed-scheme/base-env/base-structs.rkt +++ b/collects/typed-scheme/base-env/base-structs.rkt @@ -7,7 +7,9 @@ (except-in (rep filter-rep object-rep type-rep) make-arr) (types convenience union) (only-in (types convenience) [make-arr* make-arr]) - (typecheck tc-structs)) + (typecheck tc-structs) + ;;For tests + (prefix-in k: '#%kernel)) (require (for-template racket/base (prefix-in k: '#%kernel))) From 9bd8e67e86b2b66300dae56bfe711055440d793d Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Wed, 3 Aug 2011 15:23:14 -0400 Subject: [PATCH 328/441] v5.1.2 stuff (cherry picked from commit 89dfe3dc50fd07cb9392803593911bf1c96b50e9) --- collects/meta/web/download/installers.txt | 28 +++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/collects/meta/web/download/installers.txt b/collects/meta/web/download/installers.txt index 5090d8cddf8..44fbbf3aae8 100644 --- a/collects/meta/web/download/installers.txt +++ b/collects/meta/web/download/installers.txt @@ -84,6 +84,34 @@ 16M 5.1.1/racket/racket-5.1.1-src-mac.dmg 16M 5.1.1/racket/racket-5.1.1-src-unix.tgz 19M 5.1.1/racket/racket-5.1.1-src-win.zip +9.9M 5.1.2/racket-textual/racket-textual-5.1.2-bin-i386-linux-f12.sh +9.9M 5.1.2/racket-textual/racket-textual-5.1.2-bin-i386-linux-ubuntu-jaunty.sh +11M 5.1.2/racket-textual/racket-textual-5.1.2-bin-i386-osx-mac.dmg +7.4M 5.1.2/racket-textual/racket-textual-5.1.2-bin-i386-win32.exe +9.8M 5.1.2/racket-textual/racket-textual-5.1.2-bin-ppc-darwin.sh +11M 5.1.2/racket-textual/racket-textual-5.1.2-bin-ppc-osx-mac.dmg +10M 5.1.2/racket-textual/racket-textual-5.1.2-bin-x86_64-linux-debian-lenny.sh +10M 5.1.2/racket-textual/racket-textual-5.1.2-bin-x86_64-linux-debian-squeeze.sh +10M 5.1.2/racket-textual/racket-textual-5.1.2-bin-x86_64-linux-f14.sh +11M 5.1.2/racket-textual/racket-textual-5.1.2-bin-x86_64-osx-mac.dmg +7.7M 5.1.2/racket-textual/racket-textual-5.1.2-bin-x86_64-win32.exe +5.7M 5.1.2/racket-textual/racket-textual-5.1.2-src-mac.dmg +5.6M 5.1.2/racket-textual/racket-textual-5.1.2-src-unix.tgz +6.6M 5.1.2/racket-textual/racket-textual-5.1.2-src-win.zip +48M 5.1.2/racket/racket-5.1.2-bin-i386-linux-f12.sh +48M 5.1.2/racket/racket-5.1.2-bin-i386-linux-ubuntu-jaunty.sh +50M 5.1.2/racket/racket-5.1.2-bin-i386-osx-mac.dmg +32M 5.1.2/racket/racket-5.1.2-bin-i386-win32.exe +48M 5.1.2/racket/racket-5.1.2-bin-ppc-darwin.sh +51M 5.1.2/racket/racket-5.1.2-bin-ppc-osx-mac.dmg +49M 5.1.2/racket/racket-5.1.2-bin-x86_64-linux-debian-lenny.sh +49M 5.1.2/racket/racket-5.1.2-bin-x86_64-linux-debian-squeeze.sh +49M 5.1.2/racket/racket-5.1.2-bin-x86_64-linux-f14.sh +50M 5.1.2/racket/racket-5.1.2-bin-x86_64-osx-mac.dmg +32M 5.1.2/racket/racket-5.1.2-bin-x86_64-win32.exe +16M 5.1.2/racket/racket-5.1.2-src-mac.dmg +16M 5.1.2/racket/racket-5.1.2-src-unix.tgz +19M 5.1.2/racket/racket-5.1.2-src-win.zip 11M 5.1/racket-textual/racket-textual-5.1-bin-i386-linux-f12.sh 11M 5.1/racket-textual/racket-textual-5.1-bin-i386-linux-ubuntu-jaunty.sh 11M 5.1/racket-textual/racket-textual-5.1-bin-i386-osx-mac.dmg From 71cf6d1c15fe01878198f9e673fc2834215fd929 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Sun, 14 Aug 2011 08:42:06 -0400 Subject: [PATCH 329/441] Version number for the v5.1.3 bugfix release --- src/racket/src/schvers.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/racket/src/schvers.h b/src/racket/src/schvers.h index 7dea218c998..4a7a117521e 100644 --- a/src/racket/src/schvers.h +++ b/src/racket/src/schvers.h @@ -13,11 +13,11 @@ consistently.) */ -#define MZSCHEME_VERSION "5.1.2" +#define MZSCHEME_VERSION "5.1.3" #define MZSCHEME_VERSION_X 5 #define MZSCHEME_VERSION_Y 1 -#define MZSCHEME_VERSION_Z 2 +#define MZSCHEME_VERSION_Z 3 #define MZSCHEME_VERSION_W 0 #define MZSCHEME_VERSION_MAJOR ((MZSCHEME_VERSION_X * 100) + MZSCHEME_VERSION_Y) From aa27d4f1caf9c7b44586ca2bf751de981f67b823 Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Wed, 3 Aug 2011 09:57:31 -0500 Subject: [PATCH 330/441] get rid of a broken attempt to optimize the 20,000-ft overview refreshing closes PR 12083 (cherry picked from commit 29a843ac379438a6b7540716c68537a09c62ac51) --- collects/framework/private/text.rkt | 1 - 1 file changed, 1 deletion(-) diff --git a/collects/framework/private/text.rkt b/collects/framework/private/text.rkt index bb9609d4148..b8c7c1d8ad5 100644 --- a/collects/framework/private/text.rkt +++ b/collects/framework/private/text.rkt @@ -1531,7 +1531,6 @@ (refresh-delegate)) (define/private (refresh-delegate) - (set! todo '()) (to-delegate (λ () (refresh-delegate/do-work)))) (define/private (refresh-delegate/do-work) From 75ab172281c647ae4c9a97b804d998b9062089ff Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Sun, 7 Aug 2011 18:39:22 -0500 Subject: [PATCH 331/441] manage the state for delegates better (used by the drracket contour window) closes PR 12094 (cherry picked from commit 38596a9b581c06a7bdc8faba26c8e0cfb1b09492) --- collects/framework/private/text.rkt | 34 +++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/collects/framework/private/text.rkt b/collects/framework/private/text.rkt index b8c7c1d8ad5..1535d8d7fe0 100644 --- a/collects/framework/private/text.rkt +++ b/collects/framework/private/text.rkt @@ -1505,15 +1505,22 @@ (send new-snip set-style (send snip get-style)) new-snip)) + ;; todo : (listof (-> void)) + ;; actions that have happened to this editor, but that + ;; have not yet been propogated to the delegate (define todo '()) + (define timer (new timer% [notify-callback (λ () - (send delegate begin-edit-sequence) - (for ([th (in-list (reverse todo))]) - (th)) - (send delegate end-edit-sequence) + ;; it should be the case that todo is always '() when the delegate is #f + (when delegate + (send delegate begin-edit-sequence) + (for ([th (in-list (reverse todo))]) + (th)) + (send delegate end-edit-sequence)) (set! todo '()))])) + (define/private (to-delegate thunk) (when delegate (send timer stop) @@ -1524,6 +1531,25 @@ (inherit get-highlighted-ranges) (define/public-final (get-delegate) delegate) (define/public-final (set-delegate _d) + (set! todo '()) + + (when delegate + ;; the delegate may be in a bad state because we've killed the pending todo + ;; items; to clear out the bad state, end any edit sequences, and unhighlight + ;; any highlighted ranges. The rest of the state is reset if the editor + ;; is ever installed as a delegate again (by refresh-delegate) + (let loop () + (when (send delegate in-edit-sequence?) + (send delegate end-edit-sequence) + (loop))) + (for ([range (in-list (send delegate get-highlighted-ranges))]) + (send delegate unhighlight-range + (range-start range) + (range-end range) + (range-color range) + (range-caret-space? range) + (range-style range)))) + (set! delegate _d) (set! linked-snips (if _d (make-hasheq) From 0816b0542535cb2dbacff1e27d02a23862b49ff7 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Sat, 6 Aug 2011 20:58:45 -0400 Subject: [PATCH 332/441] Make `mzlib/etc' reprovide `identity' from `racket/function'. (cherry picked from commit d952a05ea9cbc974e65dd45b04adbf752bfd3b50) --- collects/mzlib/etc.rkt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/collects/mzlib/etc.rkt b/collects/mzlib/etc.rkt index bb72508e633..376d0a8bb9b 100644 --- a/collects/mzlib/etc.rkt +++ b/collects/mzlib/etc.rkt @@ -2,8 +2,10 @@ (require setup/main-collects racket/local - racket/bool + racket/bool racket/block + (only racket/function + identity) (only scheme/base build-string build-list @@ -51,8 +53,6 @@ begin-lifted) -(define identity (lambda (x) x)) - (define (loop-until start done? next body) (let loop ([i start]) (unless (done? i) From c7562516a2a28b4b16fe5d8b8dd55adf9d331ade Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Sun, 14 Aug 2011 09:57:55 -0400 Subject: [PATCH 333/441] New Racket version 5.1.3. --- src/worksp/gracket/gracket.manifest | 2 +- src/worksp/gracket/gracket.rc | 8 ++++---- src/worksp/mzcom/mzcom.rc | 8 ++++---- src/worksp/mzcom/mzobj.rgs | 6 +++--- src/worksp/racket/racket.manifest | 2 +- src/worksp/racket/racket.rc | 8 ++++---- src/worksp/starters/start.rc | 8 ++++---- 7 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/worksp/gracket/gracket.manifest b/src/worksp/gracket/gracket.manifest index cfc0dcd9f6d..b187660584c 100644 --- a/src/worksp/gracket/gracket.manifest +++ b/src/worksp/gracket/gracket.manifest @@ -1,6 +1,6 @@ - diff --git a/src/worksp/gracket/gracket.rc b/src/worksp/gracket/gracket.rc index 3f62ed67d6e..03a6a42c1fc 100644 --- a/src/worksp/gracket/gracket.rc +++ b/src/worksp/gracket/gracket.rc @@ -17,8 +17,8 @@ APPLICATION ICON DISCARDABLE "gracket.ico" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 5,1,2,0 - PRODUCTVERSION 5,1,2,0 + FILEVERSION 5,1,3,0 + PRODUCTVERSION 5,1,3,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -36,11 +36,11 @@ BEGIN VALUE "CompanyName", "PLT Scheme Inc.\0" VALUE "FileDescription", "Racket GUI application\0" VALUE "InternalName", "GRacket\0" - VALUE "FileVersion", "5, 1, 2, 0\0" + VALUE "FileVersion", "5, 1, 3, 0\0" VALUE "LegalCopyright", "Copyright © 1995-2011\0" VALUE "OriginalFilename", "GRacket.exe\0" VALUE "ProductName", "Racket\0" - VALUE "ProductVersion", "5, 1, 2, 0\0" + VALUE "ProductVersion", "5, 1, 3, 0\0" END END BLOCK "VarFileInfo" diff --git a/src/worksp/mzcom/mzcom.rc b/src/worksp/mzcom/mzcom.rc index 8810ba95cda..24f7a11430a 100644 --- a/src/worksp/mzcom/mzcom.rc +++ b/src/worksp/mzcom/mzcom.rc @@ -53,8 +53,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 5,1,2,0 - PRODUCTVERSION 5,1,2,0 + FILEVERSION 5,1,3,0 + PRODUCTVERSION 5,1,3,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -70,12 +70,12 @@ BEGIN BLOCK "040904b0" BEGIN VALUE "FileDescription", "MzCOM Module" - VALUE "FileVersion", "5, 1, 2, 0" + VALUE "FileVersion", "5, 1, 3, 0" VALUE "InternalName", "MzCOM" VALUE "LegalCopyright", "Copyright 2000-2011 PLT (Paul Steckler)" VALUE "OriginalFilename", "MzCOM.EXE" VALUE "ProductName", "MzCOM Module" - VALUE "ProductVersion", "5, 1, 2, 0" + VALUE "ProductVersion", "5, 1, 3, 0" END END BLOCK "VarFileInfo" diff --git a/src/worksp/mzcom/mzobj.rgs b/src/worksp/mzcom/mzobj.rgs index b6f4396c6f8..1e4604a620f 100644 --- a/src/worksp/mzcom/mzobj.rgs +++ b/src/worksp/mzcom/mzobj.rgs @@ -1,19 +1,19 @@ HKCR { - MzCOM.MzObj.5.1.2.0 = s 'MzObj Class' + MzCOM.MzObj.5.1.3.0 = s 'MzObj Class' { CLSID = s '{A3B0AF9E-2AB0-11D4-B6D2-0060089002FE}' } MzCOM.MzObj = s 'MzObj Class' { CLSID = s '{A3B0AF9E-2AB0-11D4-B6D2-0060089002FE}' - CurVer = s 'MzCOM.MzObj.5.1.2.0' + CurVer = s 'MzCOM.MzObj.5.1.3.0' } NoRemove CLSID { ForceRemove {A3B0AF9E-2AB0-11D4-B6D2-0060089002FE} = s 'MzObj Class' { - ProgID = s 'MzCOM.MzObj.5.1.2.0' + ProgID = s 'MzCOM.MzObj.5.1.3.0' VersionIndependentProgID = s 'MzCOM.MzObj' ForceRemove 'Programmable' LocalServer32 = s '%MODULE%' diff --git a/src/worksp/racket/racket.manifest b/src/worksp/racket/racket.manifest index 6ba8306cb7a..563d1c4cb3a 100644 --- a/src/worksp/racket/racket.manifest +++ b/src/worksp/racket/racket.manifest @@ -1,6 +1,6 @@ - diff --git a/src/worksp/racket/racket.rc b/src/worksp/racket/racket.rc index 581a4c356cb..a0ab3ff6e75 100644 --- a/src/worksp/racket/racket.rc +++ b/src/worksp/racket/racket.rc @@ -29,8 +29,8 @@ APPLICATION ICON DISCARDABLE "racket.ico" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 5,1,2,0 - PRODUCTVERSION 5,1,2,0 + FILEVERSION 5,1,3,0 + PRODUCTVERSION 5,1,3,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -48,11 +48,11 @@ BEGIN VALUE "CompanyName", "PLT Scheme Inc.\0" VALUE "FileDescription", "Racket application\0" VALUE "InternalName", "Racket\0" - VALUE "FileVersion", "5, 1, 2, 0\0" + VALUE "FileVersion", "5, 1, 3, 0\0" VALUE "LegalCopyright", "Copyright © 1995-2011\0" VALUE "OriginalFilename", "racket.exe\0" VALUE "ProductName", "Racket\0" - VALUE "ProductVersion", "5, 1, 2, 0\0" + VALUE "ProductVersion", "5, 1, 3, 0\0" END END BLOCK "VarFileInfo" diff --git a/src/worksp/starters/start.rc b/src/worksp/starters/start.rc index 594f9623277..5974d07637e 100644 --- a/src/worksp/starters/start.rc +++ b/src/worksp/starters/start.rc @@ -22,8 +22,8 @@ APPLICATION ICON DISCARDABLE "mzstart.ico" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 5,1,2,0 - PRODUCTVERSION 5,1,2,0 + FILEVERSION 5,1,3,0 + PRODUCTVERSION 5,1,3,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -45,7 +45,7 @@ BEGIN #ifdef MZSTART VALUE "FileDescription", "Racket Launcher\0" #endif - VALUE "FileVersion", "5, 1, 2, 0\0" + VALUE "FileVersion", "5, 1, 3, 0\0" #ifdef MRSTART VALUE "InternalName", "mrstart\0" #endif @@ -60,7 +60,7 @@ BEGIN VALUE "OriginalFilename", "MzStart.exe\0" #endif VALUE "ProductName", "Racket\0" - VALUE "ProductVersion", "5, 1, 2, 0\0" + VALUE "ProductVersion", "5, 1, 3, 0\0" END END BLOCK "VarFileInfo" From 413a717bccd7c542893ab65d5f9b22e754e2e2bc Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Sun, 14 Aug 2011 17:18:55 -0400 Subject: [PATCH 334/441] Remove badly-licensed file for 5.1.3. (In the head it gets auto-downloaded.) --- collects/scribble/sigplan/sigplanconf.cls | 1251 +-------------------- 1 file changed, 2 insertions(+), 1249 deletions(-) diff --git a/collects/scribble/sigplan/sigplanconf.cls b/collects/scribble/sigplan/sigplanconf.cls index 19a4871f5bc..015b13c2b44 100644 --- a/collects/scribble/sigplan/sigplanconf.cls +++ b/collects/scribble/sigplan/sigplanconf.cls @@ -1,1251 +1,4 @@ -%----------------------------------------------------------------------------- -% -% LaTeX Class/Style File -% -% Name: sigplanconf.cls -% Purpose: A LaTeX 2e class file for SIGPLAN conference proceedings. -% This class file supercedes acm_proc_article-sp, -% sig-alternate, and sigplan-proc. -% -% Author: Paul C. Anagnostopoulos -% Windfall Software -% 978 371-2316 -% sigplan-style [atsign] acm.org -% -% Created: 12 September 2004 -% -% Revisions: See end of file. -% -%----------------------------------------------------------------------------- - - \NeedsTeXFormat{LaTeX2e}[1995/12/01] -\ProvidesClass{sigplanconf}[2010/05/24 v2.4 ACM SIGPLAN Proceedings] - -% The following few pages contain LaTeX programming extensions adapted -% from the ZzTeX macro package. - -% Token Hackery -% ----- ------- - - -\def \@expandaftertwice {\expandafter\expandafter\expandafter} -\def \@expandafterthrice {\expandafter\expandafter\expandafter\expandafter - \expandafter\expandafter\expandafter} - -% This macro discards the next token. - -\def \@discardtok #1{}% token - -% This macro removes the `pt' following a dimension. - -{\catcode `\p = 12 \catcode `\t = 12 - -\gdef \@remover #1pt{#1} - -} % \catcode - -% This macro extracts the contents of a macro and returns it as plain text. -% Usage: \expandafter\@defof \meaning\macro\@mark - -\def \@defof #1:->#2\@mark{#2} - -% Control Sequence Names -% ------- -------- ----- - - -\def \@name #1{% {\tokens} - \csname \expandafter\@discardtok \string#1\endcsname} - -\def \@withname #1#2{% {\command}{\tokens} - \expandafter#1\csname \expandafter\@discardtok \string#2\endcsname} - -% Flags (Booleans) -% ----- ---------- - -% The boolean literals \@true and \@false are appropriate for use with -% the \if command, which tests the codes of the next two characters. - -\def \@true {TT} -\def \@false {FL} - -\def \@setflag #1=#2{\edef #1{#2}}% \flag = boolean - -% IF and Predicates -% -- --- ---------- - -% A "predicate" is a macro that returns \@true or \@false as its value. -% Such values are suitable for use with the \if conditional. For example: -% -% \if \@oddp{\x} \else \fi - -% A predicate can be used with \@setflag as follows: -% -% \@setflag \flag = {} - -% Here are the predicates for TeX's repertoire of conditional -% commands. These might be more appropriately interspersed with -% other definitions in this module, but what the heck. -% Some additional "obvious" predicates are defined. - -\def \@eqlp #1#2{\ifnum #1 = #2\@true \else \@false \fi} -\def \@neqlp #1#2{\ifnum #1 = #2\@false \else \@true \fi} -\def \@lssp #1#2{\ifnum #1 < #2\@true \else \@false \fi} -\def \@gtrp #1#2{\ifnum #1 > #2\@true \else \@false \fi} -\def \@zerop #1{\ifnum #1 = 0\@true \else \@false \fi} -\def \@onep #1{\ifnum #1 = 1\@true \else \@false \fi} -\def \@posp #1{\ifnum #1 > 0\@true \else \@false \fi} -\def \@negp #1{\ifnum #1 < 0\@true \else \@false \fi} -\def \@oddp #1{\ifodd #1\@true \else \@false \fi} -\def \@evenp #1{\ifodd #1\@false \else \@true \fi} -\def \@rangep #1#2#3{\if \@orp{\@lssp{#1}{#2}}{\@gtrp{#1}{#3}}\@false \else - \@true \fi} -\def \@tensp #1{\@rangep{#1}{10}{19}} - -\def \@dimeqlp #1#2{\ifdim #1 = #2\@true \else \@false \fi} -\def \@dimneqlp #1#2{\ifdim #1 = #2\@false \else \@true \fi} -\def \@dimlssp #1#2{\ifdim #1 < #2\@true \else \@false \fi} -\def \@dimgtrp #1#2{\ifdim #1 > #2\@true \else \@false \fi} -\def \@dimzerop #1{\ifdim #1 = 0pt\@true \else \@false \fi} -\def \@dimposp #1{\ifdim #1 > 0pt\@true \else \@false \fi} -\def \@dimnegp #1{\ifdim #1 < 0pt\@true \else \@false \fi} - -\def \@vmodep {\ifvmode \@true \else \@false \fi} -\def \@hmodep {\ifhmode \@true \else \@false \fi} -\def \@mathmodep {\ifmmode \@true \else \@false \fi} -\def \@textmodep {\ifmmode \@false \else \@true \fi} -\def \@innermodep {\ifinner \@true \else \@false \fi} - -\long\def \@codeeqlp #1#2{\if #1#2\@true \else \@false \fi} - -\long\def \@cateqlp #1#2{\ifcat #1#2\@true \else \@false \fi} - -\long\def \@tokeqlp #1#2{\ifx #1#2\@true \else \@false \fi} -\long\def \@xtokeqlp #1#2{\expandafter\ifx #1#2\@true \else \@false \fi} - -\long\def \@definedp #1{% - \expandafter\ifx \csname \expandafter\@discardtok \string#1\endcsname - \relax \@false \else \@true \fi} - -\long\def \@undefinedp #1{% - \expandafter\ifx \csname \expandafter\@discardtok \string#1\endcsname - \relax \@true \else \@false \fi} - -\def \@emptydefp #1{\ifx #1\@empty \@true \else \@false \fi}% {\name} - -\let \@emptylistp = \@emptydefp - -\long\def \@emptyargp #1{% {#n} - \@empargp #1\@empargq\@mark} -\long\def \@empargp #1#2\@mark{% - \ifx #1\@empargq \@true \else \@false \fi} -\def \@empargq {\@empargq} - -\def \@emptytoksp #1{% {\tokenreg} - \expandafter\@emptoksp \the#1\@mark} - -\long\def \@emptoksp #1\@mark{\@emptyargp{#1}} - -\def \@voidboxp #1{\ifvoid #1\@true \else \@false \fi} -\def \@hboxp #1{\ifhbox #1\@true \else \@false \fi} -\def \@vboxp #1{\ifvbox #1\@true \else \@false \fi} - -\def \@eofp #1{\ifeof #1\@true \else \@false \fi} - - -% Flags can also be used as predicates, as in: -% -% \if \flaga \else \fi - - -% Now here we have predicates for the common logical operators. - -\def \@notp #1{\if #1\@false \else \@true \fi} - -\def \@andp #1#2{\if #1% - \if #2\@true \else \@false \fi - \else - \@false - \fi} - -\def \@orp #1#2{\if #1% - \@true - \else - \if #2\@true \else \@false \fi - \fi} - -\def \@xorp #1#2{\if #1% - \if #2\@false \else \@true \fi - \else - \if #2\@true \else \@false \fi - \fi} - -% Arithmetic -% ---------- - -\def \@increment #1{\advance #1 by 1\relax}% {\count} - -\def \@decrement #1{\advance #1 by -1\relax}% {\count} - -% Options -% ------- - - -\@setflag \@authoryear = \@false -\@setflag \@blockstyle = \@false -\@setflag \@copyrightwanted = \@true -\@setflag \@explicitsize = \@false -\@setflag \@mathtime = \@false -\@setflag \@natbib = \@true -\@setflag \@ninepoint = \@true -\newcount{\@numheaddepth} \@numheaddepth = 3 -\@setflag \@onecolumn = \@false -\@setflag \@preprint = \@false -\@setflag \@reprint = \@false -\@setflag \@tenpoint = \@false -\@setflag \@times = \@false - -% Note that all the dangerous article class options are trapped. - -\DeclareOption{9pt}{\@setflag \@ninepoint = \@true - \@setflag \@explicitsize = \@true} - -\DeclareOption{10pt}{\PassOptionsToClass{10pt}{article}% - \@setflag \@ninepoint = \@false - \@setflag \@tenpoint = \@true - \@setflag \@explicitsize = \@true} - -\DeclareOption{11pt}{\PassOptionsToClass{11pt}{article}% - \@setflag \@ninepoint = \@false - \@setflag \@explicitsize = \@true} - -\DeclareOption{12pt}{\@unsupportedoption{12pt}} - -\DeclareOption{a4paper}{\@unsupportedoption{a4paper}} - -\DeclareOption{a5paper}{\@unsupportedoption{a5paper}} - -\DeclareOption{authoryear}{\@setflag \@authoryear = \@true} - -\DeclareOption{b5paper}{\@unsupportedoption{b5paper}} - -\DeclareOption{blockstyle}{\@setflag \@blockstyle = \@true} - -\DeclareOption{cm}{\@setflag \@times = \@false} - -\DeclareOption{computermodern}{\@setflag \@times = \@false} - -\DeclareOption{executivepaper}{\@unsupportedoption{executivepaper}} - -\DeclareOption{indentedstyle}{\@setflag \@blockstyle = \@false} - -\DeclareOption{landscape}{\@unsupportedoption{landscape}} - -\DeclareOption{legalpaper}{\@unsupportedoption{legalpaper}} - -\DeclareOption{letterpaper}{\@unsupportedoption{letterpaper}} - -\DeclareOption{mathtime}{\@setflag \@mathtime = \@true} - -\DeclareOption{natbib}{\@setflag \@natbib = \@true} - -\DeclareOption{nonatbib}{\@setflag \@natbib = \@false} - -\DeclareOption{nocopyrightspace}{\@setflag \@copyrightwanted = \@false} - -\DeclareOption{notitlepage}{\@unsupportedoption{notitlepage}} - -\DeclareOption{numberedpars}{\@numheaddepth = 4} - -\DeclareOption{numbers}{\@setflag \@authoryear = \@false} - -\DeclareOption{onecolumn}{\@setflag \@onecolumn = \@true} - -\DeclareOption{preprint}{\@setflag \@preprint = \@true} - -\DeclareOption{reprint}{\@setflag \@reprint = \@true} - -\DeclareOption{times}{\@setflag \@times = \@true} - -\DeclareOption{titlepage}{\@unsupportedoption{titlepage}} - -\DeclareOption{twocolumn}{\@setflag \@onecolumn = \@false} - -\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}} - -\ExecuteOptions{9pt,indentedstyle,times} -\@setflag \@explicitsize = \@false -\ProcessOptions - -\if \@onecolumn - \if \@notp{\@explicitsize}% - \@setflag \@ninepoint = \@false -% \PassOptionsToClass{11pt}{article}% - \fi - \PassOptionsToClass{twoside,onecolumn}{article} -\else - \PassOptionsToClass{twoside,twocolumn}{article} -\fi -\LoadClass{article} - -\def \@unsupportedoption #1{% - \ClassError{proc}{The standard '#1' option is not supported.}} - -% This can be used with the 'reprint' option to get the final folios. - -\def \setpagenumber #1{% - \setcounter{page}{#1}} - -\AtEndDocument{\label{sigplanconf@finalpage}} - -% Utilities -% --------- - - -\newcommand{\setvspace}[2]{% - #1 = #2 - \advance #1 by -1\parskip} - -% Document Parameters -% -------- ---------- - - -% Page: - -\setlength{\hoffset}{-1in} -\setlength{\voffset}{-1in} - -\setlength{\topmargin}{1in} -\setlength{\headheight}{0pt} -\setlength{\headsep}{0pt} - -\if \@onecolumn - \setlength{\evensidemargin}{.75in} - \setlength{\oddsidemargin}{.75in} -\else - \setlength{\evensidemargin}{.75in} - \setlength{\oddsidemargin}{.75in} -\fi - -% Text area: - -\newdimen{\standardtextwidth} -\setlength{\standardtextwidth}{42pc} - -\if \@onecolumn - \setlength{\textwidth}{20pc} -\else - \setlength{\textwidth}{\standardtextwidth} -\fi - -\setlength{\topskip}{8pt} -\setlength{\columnsep}{2pc} -\setlength{\textheight}{54.5pc} - -% Running foot: - -\setlength{\footskip}{30pt} - -% Paragraphs: - -\if \@blockstyle - \setlength{\parskip}{5pt plus .1pt minus .5pt} - \setlength{\parindent}{0pt} -\else - \setlength{\parskip}{0pt} - \setlength{\parindent}{12pt} -\fi - -\setlength{\lineskip}{.5pt} -\setlength{\lineskiplimit}{\lineskip} - -\frenchspacing -\pretolerance = 400 -\tolerance = \pretolerance -\setlength{\emergencystretch}{5pt} -\clubpenalty = 10000 -\widowpenalty = 10000 -\setlength{\hfuzz}{.5pt} - -% Standard vertical spaces: - -\newskip{\standardvspace} -\setvspace{\standardvspace}{5pt plus 1pt minus .5pt} - -% Margin paragraphs: - -\setlength{\marginparwidth}{36pt} -\setlength{\marginparsep}{2pt} -\setlength{\marginparpush}{8pt} - - -\setlength{\skip\footins}{8pt plus 3pt minus 1pt} -\setlength{\footnotesep}{9pt} - -\renewcommand{\footnoterule}{% - \hrule width .5\columnwidth height .33pt depth 0pt} - -\renewcommand{\@makefntext}[1]{% - \noindent \@makefnmark \hspace{1pt}#1} - -% Floats: - -\setcounter{topnumber}{4} -\setcounter{bottomnumber}{1} -\setcounter{totalnumber}{4} - -\renewcommand{\fps@figure}{tp} -\renewcommand{\fps@table}{tp} -\renewcommand{\topfraction}{0.90} -\renewcommand{\bottomfraction}{0.30} -\renewcommand{\textfraction}{0.10} -\renewcommand{\floatpagefraction}{0.75} - -\setcounter{dbltopnumber}{4} - -\renewcommand{\dbltopfraction}{\topfraction} -\renewcommand{\dblfloatpagefraction}{\floatpagefraction} - -\setlength{\floatsep}{18pt plus 4pt minus 2pt} -\setlength{\textfloatsep}{18pt plus 4pt minus 3pt} -\setlength{\intextsep}{10pt plus 4pt minus 3pt} - -\setlength{\dblfloatsep}{18pt plus 4pt minus 2pt} -\setlength{\dbltextfloatsep}{20pt plus 4pt minus 3pt} - -% Miscellaneous: - -\errorcontextlines = 5 - -% Fonts -% ----- - - -\if \@times - \renewcommand{\rmdefault}{ptm}% - \if \@mathtime - \usepackage[mtbold,noTS1]{mathtime}% - \else -%%% \usepackage{mathptm}% - \fi -\else - \relax -\fi - -\if \@ninepoint - -\renewcommand{\normalsize}{% - \@setfontsize{\normalsize}{9pt}{10pt}% - \setlength{\abovedisplayskip}{5pt plus 1pt minus .5pt}% - \setlength{\belowdisplayskip}{\abovedisplayskip}% - \setlength{\abovedisplayshortskip}{3pt plus 1pt minus 2pt}% - \setlength{\belowdisplayshortskip}{\abovedisplayshortskip}} - -\renewcommand{\tiny}{\@setfontsize{\tiny}{5pt}{6pt}} - -\renewcommand{\scriptsize}{\@setfontsize{\scriptsize}{7pt}{8pt}} - -\renewcommand{\small}{% - \@setfontsize{\small}{8pt}{9pt}% - \setlength{\abovedisplayskip}{4pt plus 1pt minus 1pt}% - \setlength{\belowdisplayskip}{\abovedisplayskip}% - \setlength{\abovedisplayshortskip}{2pt plus 1pt}% - \setlength{\belowdisplayshortskip}{\abovedisplayshortskip}} - -\renewcommand{\footnotesize}{% - \@setfontsize{\footnotesize}{8pt}{9pt}% - \setlength{\abovedisplayskip}{4pt plus 1pt minus .5pt}% - \setlength{\belowdisplayskip}{\abovedisplayskip}% - \setlength{\abovedisplayshortskip}{2pt plus 1pt}% - \setlength{\belowdisplayshortskip}{\abovedisplayshortskip}} - -\renewcommand{\large}{\@setfontsize{\large}{11pt}{13pt}} - -\renewcommand{\Large}{\@setfontsize{\Large}{14pt}{18pt}} - -\renewcommand{\LARGE}{\@setfontsize{\LARGE}{18pt}{20pt}} - -\renewcommand{\huge}{\@setfontsize{\huge}{20pt}{25pt}} - -\renewcommand{\Huge}{\@setfontsize{\Huge}{25pt}{30pt}} - -\else\if \@tenpoint - -\relax - -\else - -\relax - -\fi\fi - -% Abstract -% -------- - - -\renewenvironment{abstract}{% - \section*{Abstract}% - \normalsize}{% - } - -% Bibliography -% ------------ - - -\renewenvironment{thebibliography}[1] - {\section*{\refname - \@mkboth{\MakeUppercase\refname}{\MakeUppercase\refname}}% - \list{\@biblabel{\@arabic\c@enumiv}}% - {\settowidth\labelwidth{\@biblabel{#1}}% - \leftmargin\labelwidth - \advance\leftmargin\labelsep - \@openbib@code - \usecounter{enumiv}% - \let\p@enumiv\@empty - \renewcommand\theenumiv{\@arabic\c@enumiv}}% - \bibfont - \clubpenalty4000 - \@clubpenalty \clubpenalty - \widowpenalty4000% - \sfcode`\.\@m} - {\def\@noitemerr - {\@latex@warning{Empty `thebibliography' environment}}% - \endlist} - -\if \@natbib - -\if \@authoryear - \typeout{Using natbib package with 'authoryear' citation style.} - \usepackage[authoryear,sort,square]{natbib} - \bibpunct{[}{]}{;}{a}{}{,} % Change citation separator to semicolon, - % eliminate comma between author and year. - \let \cite = \citep -\else - \typeout{Using natbib package with 'numbers' citation style.} - \usepackage[numbers,sort&compress,square]{natbib} -\fi -\setlength{\bibsep}{3pt plus .5pt minus .25pt} - -\fi - -\def \bibfont {\small} - -% Categories -% ---------- - - -\@setflag \@firstcategory = \@true - -\newcommand{\category}[3]{% - \if \@firstcategory - \paragraph*{Categories and Subject Descriptors}% - \@setflag \@firstcategory = \@false - \else - \unskip ;\hspace{.75em}% - \fi - \@ifnextchar [{\@category{#1}{#2}{#3}}{\@category{#1}{#2}{#3}[]}} - -\def \@category #1#2#3[#4]{% - {\let \and = \relax - #1 [\textit{#2}]% - \if \@emptyargp{#4}% - \if \@notp{\@emptyargp{#3}}: #3\fi - \else - :\space - \if \@notp{\@emptyargp{#3}}#3---\fi - \textrm{#4}% - \fi}} - -% Copyright Notice -% --------- ------ - - -\def \ftype@copyrightbox {8} -\def \@toappear {} -\def \@permission {} -\def \@reprintprice {} - -\def \@copyrightspace {% - \@float{copyrightbox}[b]% - \vbox to 1in{% - \vfill - \parbox[b]{20pc}{% - \scriptsize - \if \@preprint - [Copyright notice will appear here - once 'preprint' option is removed.]\par - \else - \@toappear - \fi - \if \@reprint - \noindent Reprinted from \@conferencename, - \@proceedings, - \@conferenceinfo, - pp.~\number\thepage--\pageref{sigplanconf@finalpage}.\par - \fi}}% - \end@float} - -\long\def \toappear #1{% - \def \@toappear {#1}} - -\toappear{% - \noindent \@permission \par - \vspace{2pt} - \noindent \textsl{\@conferencename}\quad \@conferenceinfo \par - \noindent Copyright \copyright\ \@copyrightyear\ ACM \@copyrightdata - \dots \@reprintprice\par} - -\newcommand{\permission}[1]{% - \gdef \@permission {#1}} - -\permission{% - Permission to make digital or hard copies of all or - part of this work for personal or classroom use is granted without - fee provided that copies are not made or distributed for profit or - commercial advantage and that copies bear this notice and the full - citation on the first page. To copy otherwise, to republish, to - post on servers or to redistribute to lists, requires prior specific - permission and/or a fee.} - -% Here we have some alternate permission statements and copyright lines: - -\newcommand{\ACMCanadapermission}{% - \permission{% - Copyright \@copyrightyear\ Association for Computing Machinery. - ACM acknowledges that - this contribution was authored or co-authored by an affiliate of the - National Research Council of Canada (NRC). - As such, the Crown in Right of - Canada retains an equal interest in the copyright, however granting - nonexclusive, royalty-free right to publish or reproduce this article, - or to allow others to do so, provided that clear attribution - is also given to the authors and the NRC.}} - -\newcommand{\ACMUSpermission}{% - \permission{% - Copyright \@copyrightyear\ Association for - Computing Machinery. ACM acknowledges that - this contribution was authored or co-authored - by a contractor or affiliate - of the U.S. Government. As such, the Government retains a nonexclusive, - royalty-free right to publish or reproduce this article, - or to allow others to do so, for Government purposes only.}} - -\newcommand{\authorpermission}{% - \permission{% - Copyright is held by the author/owner(s).} - \toappear{% - \noindent \@permission \par - \vspace{2pt} - \noindent \textsl{\@conferencename}\quad \@conferenceinfo \par - ACM \@copyrightdata.}} - -\newcommand{\Sunpermission}{% - \permission{% - Copyright is held by Sun Microsystems, Inc.}% - \toappear{% - \noindent \@permission \par - \vspace{2pt} - \noindent \textsl{\@conferencename}\quad \@conferenceinfo \par - ACM \@copyrightdata.}} - -\newcommand{\USpublicpermission}{% - \permission{% - This paper is authored by an employee(s) of the United States - Government and is in the public domain.}% - \toappear{% - \noindent \@permission \par - \vspace{2pt} - \noindent \textsl{\@conferencename}\quad \@conferenceinfo \par - ACM \@copyrightdata.}} - -\newcommand{\reprintprice}[1]{% - \gdef \@reprintprice {#1}} - -\reprintprice{\$10.00} - -% Enunciations -% ------------ - - -\def \@begintheorem #1#2{% {name}{number} - \trivlist - \item[\hskip \labelsep \textsc{#1 #2.}]% - \itshape\selectfont - \ignorespaces} - -\def \@opargbegintheorem #1#2#3{% {name}{number}{title} - \trivlist - \item[% - \hskip\labelsep \textsc{#1\ #2}% - \if \@notp{\@emptyargp{#3}}\nut (#3).\fi]% - \itshape\selectfont - \ignorespaces} - -% Figures -% ------- - - -\@setflag \@caprule = \@true - -\long\def \@makecaption #1#2{% - \addvspace{4pt} - \if \@caprule - \hrule width \hsize height .33pt - \vspace{4pt} - \fi - \setbox \@tempboxa = \hbox{\@setfigurenumber{#1.}\nut #2}% - \if \@dimgtrp{\wd\@tempboxa}{\hsize}% - \noindent \@setfigurenumber{#1.}\nut #2\par - \else - \centerline{\box\@tempboxa}% - \fi} - -\newcommand{\nocaptionrule}{% - \@setflag \@caprule = \@false} - -\def \@setfigurenumber #1{% - {\rmfamily \bfseries \selectfont #1}} - -% Hierarchy -% --------- - - -\setcounter{secnumdepth}{\@numheaddepth} - -\newskip{\@sectionaboveskip} -\setvspace{\@sectionaboveskip}{10pt plus 3pt minus 2pt} - -\newskip{\@sectionbelowskip} -\if \@blockstyle - \setlength{\@sectionbelowskip}{0.1pt}% -\else - \setlength{\@sectionbelowskip}{4pt}% -\fi - -\renewcommand{\section}{% - \@startsection - {section}% - {1}% - {0pt}% - {-\@sectionaboveskip}% - {\@sectionbelowskip}% - {\large \bfseries \raggedright}} - -\newskip{\@subsectionaboveskip} -\setvspace{\@subsectionaboveskip}{8pt plus 2pt minus 2pt} - -\newskip{\@subsectionbelowskip} -\if \@blockstyle - \setlength{\@subsectionbelowskip}{0.1pt}% -\else - \setlength{\@subsectionbelowskip}{4pt}% -\fi - -\renewcommand{\subsection}{% - \@startsection% - {subsection}% - {2}% - {0pt}% - {-\@subsectionaboveskip}% - {\@subsectionbelowskip}% - {\normalsize \bfseries \raggedright}} - -\renewcommand{\subsubsection}{% - \@startsection% - {subsubsection}% - {3}% - {0pt}% - {-\@subsectionaboveskip} - {\@subsectionbelowskip}% - {\normalsize \bfseries \raggedright}} - -\newskip{\@paragraphaboveskip} -\setvspace{\@paragraphaboveskip}{6pt plus 2pt minus 2pt} - -\renewcommand{\paragraph}{% - \@startsection% - {paragraph}% - {4}% - {0pt}% - {\@paragraphaboveskip} - {-1em}% - {\normalsize \bfseries \if \@times \itshape \fi}} - -\renewcommand{\subparagraph}{% - \@startsection% - {subparagraph}% - {4}% - {0pt}% - {\@paragraphaboveskip} - {-1em}% - {\normalsize \itshape}} - -% Standard headings: - -\newcommand{\acks}{\section*{Acknowledgments}} - -\newcommand{\keywords}{\paragraph*{Keywords}} - -\newcommand{\terms}{\paragraph*{General Terms}} - -% Identification -% -------------- - - -\def \@conferencename {} -\def \@conferenceinfo {} -\def \@copyrightyear {} -\def \@copyrightdata {[to be supplied]} -\def \@proceedings {[Unknown Proceedings]} - - -\newcommand{\conferenceinfo}[2]{% - \gdef \@conferencename {#1}% - \gdef \@conferenceinfo {#2}} - -\newcommand{\copyrightyear}[1]{% - \gdef \@copyrightyear {#1}} - -\let \CopyrightYear = \copyrightyear - -\newcommand{\copyrightdata}[1]{% - \gdef \@copyrightdata {#1}} - -\let \crdata = \copyrightdata - -\newcommand{\proceedings}[1]{% - \gdef \@proceedings {#1}} - -% Lists -% ----- - - -\setlength{\leftmargini}{13pt} -\setlength\leftmarginii{13pt} -\setlength\leftmarginiii{13pt} -\setlength\leftmarginiv{13pt} -\setlength{\labelsep}{3.5pt} - -\setlength{\topsep}{\standardvspace} -\if \@blockstyle - \setlength{\itemsep}{1pt} - \setlength{\parsep}{3pt} -\else - \setlength{\itemsep}{1pt} - \setlength{\parsep}{3pt} -\fi - -\renewcommand{\labelitemi}{{\small \centeroncapheight{\textbullet}}} -\renewcommand{\labelitemii}{\centeroncapheight{\rule{2.5pt}{2.5pt}}} -\renewcommand{\labelitemiii}{$-$} -\renewcommand{\labelitemiv}{{\Large \textperiodcentered}} - -\renewcommand{\@listi}{% - \leftmargin = \leftmargini - \listparindent = 0pt} -%%% \itemsep = 1pt -%%% \parsep = 3pt} -%%% \listparindent = \parindent} - -\let \@listI = \@listi - -\renewcommand{\@listii}{% - \leftmargin = \leftmarginii - \topsep = 1pt - \labelwidth = \leftmarginii - \advance \labelwidth by -\labelsep - \listparindent = \parindent} - -\renewcommand{\@listiii}{% - \leftmargin = \leftmarginiii - \labelwidth = \leftmarginiii - \advance \labelwidth by -\labelsep - \listparindent = \parindent} - -\renewcommand{\@listiv}{% - \leftmargin = \leftmarginiv - \labelwidth = \leftmarginiv - \advance \labelwidth by -\labelsep - \listparindent = \parindent} - -% Mathematics -% ----------- - - -\def \theequation {\arabic{equation}} - -% Miscellaneous -% ------------- - - -\newcommand{\balancecolumns}{% - \vfill\eject - \global\@colht = \textheight - \global\ht\@cclv = \textheight} - -\newcommand{\nut}{\hspace{.5em}} - -\newcommand{\softraggedright}{% - \let \\ = \@centercr - \leftskip = 0pt - \rightskip = 0pt plus 10pt} - -% Program Code -% ------- ---- - - -\newcommand{\mono}[1]{% - {\@tempdima = \fontdimen2\font - \texttt{\spaceskip = 1.1\@tempdima #1}}} - -% Running Heads and Feet -% ------- ----- --- ---- - - -\def \@preprintfooter {} - -\newcommand{\preprintfooter}[1]{% - \gdef \@preprintfooter {#1}} - -\if \@preprint - -\def \ps@plain {% - \let \@mkboth = \@gobbletwo - \let \@evenhead = \@empty - \def \@evenfoot {\scriptsize \textit{\@preprintfooter}\hfil \thepage \hfil - \textit{\@formatyear}}% - \let \@oddhead = \@empty - \let \@oddfoot = \@evenfoot} - -\else\if \@reprint - -\def \ps@plain {% - \let \@mkboth = \@gobbletwo - \let \@evenhead = \@empty - \def \@evenfoot {\scriptsize \hfil \thepage \hfil}% - \let \@oddhead = \@empty - \let \@oddfoot = \@evenfoot} - -\else - -\let \ps@plain = \ps@empty -\let \ps@headings = \ps@empty -\let \ps@myheadings = \ps@empty - -\fi\fi - -\def \@formatyear {% - \number\year/\number\month/\number\day} - -% Special Characters -% ------- ---------- - - -\DeclareRobustCommand{\euro}{% - \protect{\rlap{=}}{\sf \kern .1em C}} - -% Title Page -% ----- ---- - - -\@setflag \@addauthorsdone = \@false - -\def \@titletext {\@latex@error{No title was provided}{}} -\def \@subtitletext {} - -\newcount{\@authorcount} - -\newcount{\@titlenotecount} -\newtoks{\@titlenotetext} - -\def \@titlebanner {} - -\renewcommand{\title}[1]{% - \gdef \@titletext {#1}} - -\newcommand{\subtitle}[1]{% - \gdef \@subtitletext {#1}} - -\newcommand{\authorinfo}[3]{% {names}{affiliation}{email/URL} - \global\@increment \@authorcount - \@withname\gdef {\@authorname\romannumeral\@authorcount}{#1}% - \@withname\gdef {\@authoraffil\romannumeral\@authorcount}{#2}% - \@withname\gdef {\@authoremail\romannumeral\@authorcount}{#3}} - -\renewcommand{\author}[1]{% - \@latex@error{The \string\author\space command is obsolete; - use \string\authorinfo}{}} - -\newcommand{\titlebanner}[1]{% - \gdef \@titlebanner {#1}} - -\renewcommand{\maketitle}{% - \pagestyle{plain}% - \if \@onecolumn - {\hsize = \standardtextwidth - \@maketitle}% - \else - \twocolumn[\@maketitle]% - \fi - \@placetitlenotes - \if \@copyrightwanted \@copyrightspace \fi} - -\def \@maketitle {% - \begin{center} - \@settitlebanner - \let \thanks = \titlenote - {\leftskip = 0pt plus 0.25\linewidth - \rightskip = 0pt plus 0.25 \linewidth - \parfillskip = 0pt - \spaceskip = .7em - \noindent \LARGE \bfseries \@titletext \par} - \vskip 6pt - \noindent \Large \@subtitletext \par - \vskip 12pt - \ifcase \@authorcount - \@latex@error{No authors were specified for this paper}{}\or - \@titleauthors{i}{}{}\or - \@titleauthors{i}{ii}{}\or - \@titleauthors{i}{ii}{iii}\or - \@titleauthors{i}{ii}{iii}\@titleauthors{iv}{}{}\or - \@titleauthors{i}{ii}{iii}\@titleauthors{iv}{v}{}\or - \@titleauthors{i}{ii}{iii}\@titleauthors{iv}{v}{vi}\or - \@titleauthors{i}{ii}{iii}\@titleauthors{iv}{v}{vi}% - \@titleauthors{vii}{}{}\or - \@titleauthors{i}{ii}{iii}\@titleauthors{iv}{v}{vi}% - \@titleauthors{vii}{viii}{}\or - \@titleauthors{i}{ii}{iii}\@titleauthors{iv}{v}{vi}% - \@titleauthors{vii}{viii}{ix}\or - \@titleauthors{i}{ii}{iii}\@titleauthors{iv}{v}{vi}% - \@titleauthors{vii}{viii}{ix}\@titleauthors{x}{}{}\or - \@titleauthors{i}{ii}{iii}\@titleauthors{iv}{v}{vi}% - \@titleauthors{vii}{viii}{ix}\@titleauthors{x}{xi}{}\or - \@titleauthors{i}{ii}{iii}\@titleauthors{iv}{v}{vi}% - \@titleauthors{vii}{viii}{ix}\@titleauthors{x}{xi}{xii}% - \else - \@latex@error{Cannot handle more than 12 authors}{}% - \fi - \vspace{1.75pc} - \end{center}} - -\def \@settitlebanner {% - \if \@andp{\@preprint}{\@notp{\@emptydefp{\@titlebanner}}}% - \vbox to 0pt{% - \vskip -32pt - \noindent \textbf{\@titlebanner}\par - \vss}% - \nointerlineskip - \fi} - -\def \@titleauthors #1#2#3{% - \if \@andp{\@emptyargp{#2}}{\@emptyargp{#3}}% - \noindent \@setauthor{40pc}{#1}{\@false}\par - \else\if \@emptyargp{#3}% - \noindent \@setauthor{17pc}{#1}{\@false}\hspace{3pc}% - \@setauthor{17pc}{#2}{\@false}\par - \else - \noindent \@setauthor{12.5pc}{#1}{\@false}\hspace{2pc}% - \@setauthor{12.5pc}{#2}{\@false}\hspace{2pc}% - \@setauthor{12.5pc}{#3}{\@true}\par - \relax - \fi\fi - \vspace{20pt}} - -\def \@setauthor #1#2#3{% {width}{text}{unused} - \vtop{% - \def \and {% - \hspace{16pt}} - \hsize = #1 - \normalfont - \centering - \large \@name{\@authorname#2}\par - \vspace{5pt} - \normalsize \@name{\@authoraffil#2}\par - \vspace{2pt} - \textsf{\@name{\@authoremail#2}}\par}} - -\def \@maybetitlenote #1{% - \if \@andp{#1}{\@gtrp{\@authorcount}{3}}% - \titlenote{See page~\pageref{@addauthors} for additional authors.}% - \fi} - -\newtoks{\@fnmark} - -\newcommand{\titlenote}[1]{% - \global\@increment \@titlenotecount - \ifcase \@titlenotecount \relax \or - \@fnmark = {\ast}\or - \@fnmark = {\dagger}\or - \@fnmark = {\ddagger}\or - \@fnmark = {\S}\or - \@fnmark = {\P}\or - \@fnmark = {\ast\ast}% - \fi - \,$^{\the\@fnmark}$% - \edef \reserved@a {\noexpand\@appendtotext{% - \noexpand\@titlefootnote{\the\@fnmark}}}% - \reserved@a{#1}} - -\def \@appendtotext #1#2{% - \global\@titlenotetext = \expandafter{\the\@titlenotetext #1{#2}}} - -\newcount{\@authori} - -\iffalse -\def \additionalauthors {% - \if \@gtrp{\@authorcount}{3}% - \section{Additional Authors}% - \label{@addauthors}% - \noindent - \@authori = 4 - {\let \\ = ,% - \loop - \textbf{\@name{\@authorname\romannumeral\@authori}}, - \@name{\@authoraffil\romannumeral\@authori}, - email: \@name{\@authoremail\romannumeral\@authori}.% - \@increment \@authori - \if \@notp{\@gtrp{\@authori}{\@authorcount}} \repeat}% - \par - \fi - \global\@setflag \@addauthorsdone = \@true} -\fi - -\let \addauthorsection = \additionalauthors - -\def \@placetitlenotes { - \the\@titlenotetext} - -% Utilities -% --------- - - -\newcommand{\centeroncapheight}[1]{% - {\setbox\@tempboxa = \hbox{#1}% - \@measurecapheight{\@tempdima}% % Calculate ht(CAP) - ht(text) - \advance \@tempdima by -\ht\@tempboxa % ------------------ - \divide \@tempdima by 2 % 2 - \raise \@tempdima \box\@tempboxa}} - -\newbox{\@measbox} - -\def \@measurecapheight #1{% {\dimen} - \setbox\@measbox = \hbox{ABCDEFGHIJKLMNOPQRSTUVWXYZ}% - #1 = \ht\@measbox} - -\long\def \@titlefootnote #1#2{% - \insert\footins{% - \reset@font\footnotesize - \interlinepenalty\interfootnotelinepenalty - \splittopskip\footnotesep - \splitmaxdepth \dp\strutbox \floatingpenalty \@MM - \hsize\columnwidth \@parboxrestore -%%% \protected@edef\@currentlabel{% -%%% \csname p@footnote\endcsname\@thefnmark}% - \color@begingroup - \def \@makefnmark {$^{#1}$}% - \@makefntext{% - \rule\z@\footnotesep\ignorespaces#2\@finalstrut\strutbox}% - \color@endgroup}} - -% LaTeX Modifications -% ----- ------------- - -\def \@seccntformat #1{% - \@name{\the#1}% - \@expandaftertwice\@seccntformata \csname the#1\endcsname.\@mark - \quad} - -\def \@seccntformata #1.#2\@mark{% - \if \@emptyargp{#2}.\fi} - -% Revision History -% -------- ------- - - -% Date Person Ver. Change -% ---- ------ ---- ------ - -% 2004.09.12 PCA 0.1--5 Preliminary development. - -% 2004.11.18 PCA 0.5 Start beta testing. - -% 2004.11.19 PCA 0.6 Obsolete \author and replace with -% \authorinfo. -% Add 'nocopyrightspace' option. -% Compress article opener spacing. -% Add 'mathtime' option. -% Increase text height by 6 points. - -% 2004.11.28 PCA 0.7 Add 'cm/computermodern' options. -% Change default to Times text. - -% 2004.12.14 PCA 0.8 Remove use of mathptm.sty; it cannot -% coexist with latexsym or amssymb. - -% 2005.01.20 PCA 0.9 Rename class file to sigplanconf.cls. - -% 2005.03.05 PCA 0.91 Change default copyright data. - -% 2005.03.06 PCA 0.92 Add at-signs to some macro names. - -% 2005.03.07 PCA 0.93 The 'onecolumn' option defaults to '11pt', -% and it uses the full type width. - -% 2005.03.15 PCA 0.94 Add at-signs to more macro names. -% Allow margin paragraphs during review. - -% 2005.03.22 PCA 0.95 Implement \euro. -% Remove proof and newdef environments. - -% 2005.05.06 PCA 1.0 Eliminate 'onecolumn' option. -% Change footer to small italic and eliminate -% left portion if no \preprintfooter. -% Eliminate copyright notice if preprint. -% Clean up and shrink copyright box. - -% 2005.05.30 PCA 1.1 Add alternate permission statements. - -% 2005.06.29 PCA 1.1 Publish final first edition of guide. - -% 2005.07.14 PCA 1.2 Add \subparagraph. -% Use block paragraphs in lists, and adjust -% spacing between items and paragraphs. - -% 2006.06.22 PCA 1.3 Add 'reprint' option and associated -% commands. - -% 2006.08.24 PCA 1.4 Fix bug in \maketitle case command. - -% 2007.03.13 PCA 1.5 The title banner only displays with the -% 'preprint' option. - -% 2007.06.06 PCA 1.6 Use \bibfont in \thebibliography. -% Add 'natbib' option to load and configure -% the natbib package. - -% 2007.11.20 PCA 1.7 Balance line lengths in centered article -% title (thanks to Norman Ramsey). - -% 2009.01.26 PCA 1.8 Change natbib \bibpunct values. - -% 2009.03.24 PCA 1.9 Change natbib to use the 'numbers' option. -% Change templates to use 'natbib' option. - -% 2009.09.01 PCA 2.0 Add \reprintprice command (suggested by -% Stephen Chong). - -% 2009.09.08 PCA 2.1 Make 'natbib' the default; add 'nonatbib'. -% SB Add 'authoryear' and 'numbers' (default) to -% control citation style when using natbib. -% Add \bibpunct to change punctuation for -% 'authoryear' style. - -% 2009.09.21 PCA 2.2 Add \softraggedright to the thebibliography -% environment. Also add to template so it will -% happen with natbib. - -% 2009.09.30 PCA 2.3 Remove \softraggedright from thebibliography. -% Just include in the template. +\ProvidesClass{sigplanconf} -% 2010.05.24 PCA 2.4 Obfuscate author's email address. +\@latex@error{This sigplanconf.cls is a stub, please replace it.} From fd9b724abb6483c02339ac61092166d20bbeff38 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Sun, 14 Aug 2011 19:32:54 -0400 Subject: [PATCH 335/441] Remove this one too (should have been in the previous commit) --- collects/scribble/jfp/jfp.cls | 1095 +-------------------------------- 1 file changed, 2 insertions(+), 1093 deletions(-) diff --git a/collects/scribble/jfp/jfp.cls b/collects/scribble/jfp/jfp.cls index 916159314fe..fe8310a0dc6 100644 --- a/collects/scribble/jfp/jfp.cls +++ b/collects/scribble/jfp/jfp.cls @@ -1,1095 +1,4 @@ -%% -%% This is file `jfp.cls' -%% -%% CUP Journal of Functional Programming document class -%% Copyright 2001 Cambridge University Press -%% -%% by Mark A. Reed -%% based on JFP.STY v1.24. -%% -%% Incorporating parts of authordate.sty -%% by David Rhead, Cripps Computing Centre (Feb 1990). -%% -%% Bugs (in the case of unchanged files) should be reported to -%% texline@cambridge.org -%% -%% This software may only be used in the preparation of journal articles -%% or books or parts of books to be published by Cambridge University Press. -%% Any other use constitutes an infringement of copyright. -%% -%% \CharacterTable -%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z -%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z -%% Digits \0\1\2\3\4\5\6\7\8\9 -%% Exclamation \! Double quote \" Hash (number) \# -%% Dollar \$ Percent \% Ampersand \& -%% Acute accent \' Left paren \( Right paren \) -%% Asterisk \* Plus \+ Comma \, -%% Minus \- Point \. Solidus \/ -%% Colon \: Semicolon \; Less than \< -%% Equals \= Greater than \> Question mark \? -%% Commercial at \@ Left bracket \[ Backslash \\ -%% Right bracket \] Circumflex \^ Underscore \_ -%% Grave accent \` Left brace \{ Vertical bar \| -%% Right brace \} Tilde \~} -%% - \NeedsTeXFormat{LaTeX2e}[1997/12/01] -\ProvidesClass{jfp}[2001/09/27 v1.02 Journal of Functional Programming - ^^Jdocument class] - -\newif\ifprodtf - -\DeclareOption{oneside}{\relax} -\DeclareOption{twoside}{\@twosidetrue \@mparswitchtrue} -\DeclareOption{draft}{\setlength\overfullrule{5\p@}} -\DeclareOption{final}{\setlength\overfullrule{\z@}} -\DeclareOption{onecolumn}{\@twocolumnfalse} -\DeclareOption{twocolumn}{\relax} -\DeclareOption{titlepage}{\relax} -\DeclareOption{notitlepage}{\relax} -\DeclareOption{leqno}{\relax} -\DeclareOption{fleqn}{\relax} -\DeclareOption{prodtf}{\prodtftrue} - -\ExecuteOptions{twoside,final,onecolumn} -\ProcessOptions\relax - -\newif\ifCUPmtlplainloaded -\ifprodtf - \CUPmtlplainloadedtrue - \RequirePackage{CUPTimes,jfp2esym} -\fi - -\setlength\lineskip{1\p@} -\setlength\normallineskip{1\p@} -\renewcommand\baselinestretch{} - -\renewcommand\normalsize{% - \@setfontsize\normalsize\@xpt{13}% - \abovedisplayskip 6.5\p@ \@plus 1\p@ \@minus 1\p@ - \belowdisplayskip \abovedisplayskip - \abovedisplayshortskip 3\p@ \@plus 1\p@ - \belowdisplayshortskip \abovedisplayshortskip - \let\@listi\@listI} - -\normalsize - -\newcommand\small{% - \@setfontsize\small\@ixpt{11}% - \abovedisplayskip 6\p@ \@plus 1\p@ \@minus 1\p@ - \belowdisplayskip \abovedisplayskip - \abovedisplayshortskip 3\p@ \@plus 1\p@ - \belowdisplayshortskip \abovedisplayshortskip - \def\@listi{\leftmargin\leftmargini - \topsep 6\p@ \@plus 1\p@ \@minus 1\p@ - \parsep \z@ \itemsep \parsep}% -} - -\newcommand\footnotesize{% - \@setfontsize\footnotesize\@viiipt\@ixpt - \abovedisplayskip 5\p@ \@plus 1\p@ \@minus 1\p@ - \belowdisplayskip \abovedisplayskip - \abovedisplayshortskip \z@ \@plus 1\p@ - \belowdisplayshortskip \abovedisplayshortskip - \def\@listi{\leftmargin\leftmargini - \topsep 4.5\p@ \@plus 1\p@ \@minus 1\p@ - \parsep \z@ \itemsep \parsep}% -} - -\newcommand\scriptsize{\@setfontsize\scriptsize\@viipt\@viiipt} -\newcommand\tiny{\@setfontsize\tiny\@vpt\@vipt} -\newcommand\large{\@setfontsize\large\@xiipt{14}} -\newcommand\Large{\@setfontsize\Large\@xivpt{18}} -\ifprodtf - \newcommand\LARGE{\@setfontsize\LARGE{18}{21}}% -\else - \newcommand\LARGE{\@setfontsize\LARGE\@xviipt{21}}% -\fi -\newcommand\huge{\@setfontsize\huge\@xxpt{25}} -\newcommand\Huge{\@setfontsize\Huge\@xxvpt{30}} - -\newcommand\affilsize{\@setfontsize\affilsize\@viiipt\@xpt} -\let\authorsize\normalsize - -\DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm} -\DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf} -\DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt} -\DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf} -\DeclareOldFontCommand{\it}{\normalfont\itshape}{\mathit} -\DeclareOldFontCommand{\sl}{\normalfont\slshape}{\@nomath\sl} -\DeclareOldFontCommand{\sc}{\normalfont\scshape}{\@nomath\sc} -\DeclareRobustCommand*\cal{\@fontswitch\relax\mathcal} -\DeclareRobustCommand*\mit{\@fontswitch\relax\mathnormal} - -\ifprodtf \else - \setlength\oddsidemargin{3.75pc} - \setlength\evensidemargin{3.75pc} - \setlength\topmargin{3.25pc} -\fi - -\setlength\marginparwidth{2.0cm} -\setlength\marginparsep{10\p@} - -\setlength\headheight{13\p@} -\setlength\headsep{11\p@} -\setlength\topskip{13\p@} -\setlength\footskip{26\p@} - -\setlength\textheight{44\baselineskip} -\addtolength\textheight{\topskip} -\setlength\textwidth{30pc} -\setlength\columnsep{10\p@} -\setlength\columnseprule{\z@} - -\setlength\footnotesep{\z@} -\setlength{\skip\footins}{19.5\p@ \@plus 12\p@ \@minus 1\p@} - -\setlength\floatsep{13\p@ \@plus 6.5\p@ \@minus 1\p@} -\setlength\textfloatsep{15\p@ \@plus 4.5\p@ \@minus 3\p@} -\setlength\intextsep{13\p@ \@plus 6.5\p@ \@minus 2\p@} -\setlength\dblfloatsep{13\p@ \@plus 6.5\p@ \@minus 2\p@} -\setlength\dbltextfloatsep{15\p@ \@plus 4.5\p@ \@minus 3\p@} -\setlength\@fptop{\z@ \@plus 0fil} -\setlength\@fpsep{13\p@ \@plus 0fil} -\setlength\@fpbot{\z@ \@plus 3fil} -\setlength\@dblfptop{\z@ \@plus 0fil} -\setlength\@dblfpsep{13\p@ \@plus 0fil} -\setlength\@dblfpbot{\z@ \@plus 3fil} -\setlength\marginparpush{5\p@} - -\setlength\parskip{\z@ \@plus .3\p@} -\setlength\parindent{1em} -\setlength\partopsep{\z@ \@plus 1\p@} -\@lowpenalty 51 -\@medpenalty 151 -\@highpenalty 301 -\@beginparpenalty -\@lowpenalty -\@endparpenalty -\@lowpenalty -\@itempenalty -\@lowpenalty -\clubpenalty\z@ -\widowpenalty\@M - -\newcommand\partname{Part} -\newcommand\part{\par\addvspace{4ex}\@afterindentfalse \secdef\@part\@spart} - -\def\@part[#1]#2{% - \ifnum \c@secnumdepth >\m@ne - \refstepcounter{part}% - \addcontentsline{toc}{part}{\partname\ \thepart: #1}% - \else - \addcontentsline{toc}{part}{#1}% - \fi - {\parindent \z@ \centering - \ifnum \c@secnumdepth >\m@ne - \normalfont\large\rmfamily \MakeUppercase{\partname}\ % - \ifcase\thepart \or ONE \or TWO \or THREE \or FOUR \or FIVE - \or SIX \or SEVEN \or EIGHT \or NINE \or TEN \else \fi - \par \nobreak - \fi - \normalfont\LARGE\rmfamily #2 \markboth{}{}\par}% - \nobreak \vskip 3ex \@afterheading -} - -\def\@spart#1{% - {\parindent \z@ \centering\normalfont\LARGE\rmfamily #1\par}% - \nobreak \vskip 3ex \@afterheading -} - -\newcommand\section{% - \@startsection {section}{1}{\z@} - {-19.5\p@ \@plus -6.5\p@ \@minus -3.25\p@} - {6.5\p@ \@plus \z@ \@minus 1\p@} - {\normalfont\normalsize\bfseries\centering}% -} - -\newcommand\subsection{% - \@startsection{subsection}{2}{\z@} - {-19.5\p@ \@plus -3.25\p@ \@minus -3.25\p@} - {6.5\p@ \@plus \z@ \@minus 1\p@} - {\normalfont\normalsize\bfseries\itshape\centering}% -} - -\newcommand\subsubsection{% - \@startsection{subsubsection}{3}{\z@} - {-19.5\p@ \@plus -3.25\p@ \@minus -3.25\p@} - {6.5\p@ \@plus \z@ \@minus 1\p@} - {\normalfont\normalsize\itshape\centering}% -} - -\newcommand\paragraph{% - \@startsection{paragraph}{4}{\z@} - {-13\p@ \@plus -1.5\p@ \@minus -1.5\p@} - {-0.5em} - {\normalfont\normalsize\itshape\raggedright}% -} - -\newcommand\subparagraph{% - \@startsection{subparagraph}{4}{\parindent} - {-13\p@ \@plus -3.25\p@ \@minus -3.25\p@} - {-0.5em} - {\normalfont\normalsize\rmfamily\raggedright}% -} - -\def\@seccntformat#1{\csname the#1\endcsname\enskip}% FROM LATEX.LTX - -\newcommand\appendixname{Appendix} - -\newcommand\appendix{\par - \@addtoreset{equation}{section}% - \@addtoreset{figure}{section}% - \@addtoreset{table}{section}% - \setcounter{section}\z@ - \renewcommand\thesection{\@Alph\c@section}% - \renewcommand\theequation{\thesection\,\@arabic\c@equation}% - \renewcommand\thefigure{\thesection\,\@arabic\c@figure}% - \renewcommand\thetable{\thesection\,\@arabic\c@table}% -} - -\setcounter{secnumdepth}{3} - -\newcounter{part} -\newcounter{section} -\newcounter{subsection}[section] -\newcounter{subsubsection}[subsection] -\newcounter{paragraph}[subsubsection] -\newcounter{subparagraph}[paragraph] -\renewcommand\thepart {\@arabic\c@part} -\renewcommand\thesection {\@arabic\c@section} -\renewcommand\thesubsection {\thesection.\@arabic\c@subsection} -\renewcommand\thesubsubsection {\thesubsection.\@arabic\c@subsubsection} -\renewcommand\theparagraph {\thesubsubsection.\@arabic\c@paragraph} -\renewcommand\thesubparagraph {\theparagraph.\@arabic\c@subparagraph} - -\newskip\@leftskip \@leftskip=\z@ - -\setlength\leftmargini {2.5em} -\setlength\leftmarginii {1.5em} -\setlength\leftmarginiii {1.5em} -\setlength\leftmarginiv {1.5em} -\setlength\leftmarginv {1em} -\setlength\leftmarginvi {1em} -\setlength\leftmargin {\leftmargini} -\setlength\labelsep {5\p@} -\setlength\labelwidth {\leftmargini} -\addtolength\labelwidth {-\labelsep} - -\newcommand\makeRLlabel[1]{\rlap{#1}\hss} -\newcommand\makeRRlabel[1]{\hss\llap{#1}} - -\def\@listI{\leftmargin\leftmargini - \parsep \z@ \topsep 6.5\p@ \@plus 3\p@ \@minus 3\p@ - \itemsep \z@ \@plus 1\p@ \@minus 1\p@ - \let\makelabel\makeRLlabel} - -\def\@listii{\leftmargin\leftmarginii - \labelwidth\leftmarginii - \advance\labelwidth-\labelsep - \topsep 3\p@ \@plus 1\p@ \@minus 1\p@ - \parsep \z@ \itemsep \parsep - \let\makelabel\makeRLlabel} - -\def\@listiii{\leftmargin\leftmarginiii - \labelwidth\leftmarginiii - \advance\labelwidth-\labelsep - \topsep 3\p@ \@plus 1\p@ \@minus 1\p@ - \parsep \z@ \partopsep \z@ - \itemsep \topsep - \let\makelabel\makeRLlabel} - -\def\@listiv{\leftmargin\leftmarginiv - \labelwidth\leftmarginiv - \advance\labelwidth-\labelsep - \let\makelabel\makeRLlabel} - -\def\@listv{\leftmargin\leftmarginv - \labelwidth\leftmarginv - \advance\labelwidth-\labelsep - \let\makelabel\makeRLlabel} - -\def\@listvi{\leftmargin\leftmarginvi - \labelwidth\leftmarginvi - \advance\labelwidth-\labelsep - \let\makelabel\makeRLlabel} - -\let\@listi\@listI -\@listi - -\def\itemize{% FROM LATEX.LTX - \ifnum \@itemdepth >\thr@@ \@toodeep\else - \advance\@itemdepth \@ne - \edef\@itemitem{labelitem\romannumeral\the\@itemdepth}% - \expandafter - \list - \csname\@itemitem\endcsname - {\let\makelabel\makeRRlabel}% - \fi -} - -\newcommand\labelitemi{$\m@th\bullet$} -\newcommand\labelitemii{\normalfont\bfseries ---} -\newcommand\labelitemiii{\normalfont\bfseries --} -\newcommand\labelitemiv{$\m@th\cdot$} - -\def\enumerate{% FROM LATEX.LTX - \ifnum \@enumdepth >\thr@@ \@toodeep\else - \advance\@enumdepth \@ne - \edef\@enumctr{enum\romannumeral\the\@enumdepth}% - \fi - \@ifnextchar [{\@enumeratetwo}{\@enumerateone}% -} - -\def\@enumerateone{% - \expandafter - \list - \csname label\@enumctr\endcsname - {\usecounter{\@enumctr}% - \let\makelabel\makeRRlabel}% -} - -\def\@enumeratetwo[#1]{% - \expandafter - \list - \csname label\@enumctr\endcsname - {\usecounter{\@enumctr}% - \settowidth\labelwidth{\normalfont\rmfamily #1}% - \leftmargin\labelwidth \advance\leftmargin\labelsep - \let\makelabel\makeRRlabel}% -} - -\newcommand\labelenumi {{\normalfont\rmfamily\theenumi.}} -\newcommand\labelenumii {{\normalfont\rmfamily(\theenumii)}} -\newcommand\labelenumiii{{\normalfont\rmfamily\theenumiii}} -\newcommand\labelenumiv {{\normalfont\rmfamily\theenumiv}} - -\renewcommand\theenumi{\@arabic\c@enumi} -\renewcommand\theenumii{\@alph\c@enumii} -\renewcommand\theenumiii{\@roman\c@enumiii} -\renewcommand\theenumiv{\@Alph\c@enumiv} - -\renewcommand\p@enumii{\theenumi} -\renewcommand\p@enumiii{\theenumi(\theenumii)} -\renewcommand\p@enumiv{\p@enumiii\theenumiii} - -\newcommand*\descriptionlabel[1]{\hspace\labelsep \normalfont\bfseries #1} - -\newenvironment{description} - {\list{}{\leftmargin 1em \labelwidth\z@ \itemindent-\leftmargin - \let\makelabel\descriptionlabel}} - {\endlist} - -\newenvironment{verse} - {\let\\=\@centercr - \list{}{\itemsep\z@ - \itemindent -2.5em% - \listparindent \itemindent - \rightmargin\leftmargin - \advance\leftmargin 2.5em}\item[]} - {\endlist} - -\newenvironment{quotation} - {\list{}{\listparindent\parindent - \itemindent\listparindent - \leftmargin\z@ \rightmargin\leftmargin - \parsep \z@ \@plus 1\p@}\item[]% - \normalfont\small\rmfamily} - {\endlist} - -\let\quote\quotation -\let\endquote\endquotation - -\newif\ifrembrks -\newcommand\removebrackets{\rembrkstrue} - -\def\@begintheorem#1#2{% FROM LATEX.LTX - \normalfont\rmfamily - \trivlist - \item[\hskip \labelsep{\normalfont\itshape #1\ #2}]% - \item[]% -} - -\def\@opargbegintheorem#1#2#3{% FROM LATEX.LTX - \normalfont\rmfamily - \trivlist - \item[\hskip \labelsep{\normalfont\itshape #1\ #2\ % - \ifrembrks #3\/\global\rembrksfalse\else {\upshape(}#3\/{\upshape)}\fi}]% - \item[]% -} - -\newsavebox{\proofsavebox} - -\ifprodtf - \sbox{\proofsavebox}{$\CUPproofbox$} - \newcommand\proofbox{\hbox{$\CUPproofbox$}} -\else - \sbox{\proofsavebox} - {\unitlength 1pt\begin{picture}(6.5,6.5)% - \put(0,0){\framebox(6.5,6.5){}}\end{picture}} - \newcommand\proofbox{\usebox{\proofsavebox}\relax} -\fi - -\newcommand\mathproofbox{\rlap{\quad\proofbox}} - -\def\@nprf{\normalfont\rmfamily \trivlist - \item[\hskip \labelsep {\normalfont\itshape Proof}]% - \item[]} - -\def\@oprf[#1]{\normalfont\rmfamily \trivlist - \item[\hskip \labelsep {\normalfont\itshape #1\ }]% - \item[]} - -\newenvironment{proof} - {\@ifnextchar[{\@oprf}{\@nprf}} - {\hspace*{1em}\hbox{\proofbox}\endtrivlist} - -\newenvironment{proof*} - {\proof} - {\endtrivlist} - -\renewcommand\theequation{\@arabic\c@equation} - -\setlength\arraycolsep{5\p@} -\setlength\tabcolsep{3\p@} -\setlength\arrayrulewidth{.5\p@} -\setlength\doublerulesep{1.5\p@} -\setlength\tabbingsep{\labelsep} -\setlength{\skip\@mpfootins}{\skip\footins} -\setlength\fboxsep{3\p@} -\setlength\fboxrule{.5\p@} - -\newcommand\maketitle{\@ifnextchar [{\m@ketitleone}{\m@ketitleone[n]}} - -\def\m@ketitleone[#1]{\par - \begingroup - \newpage - \global\@topnum\z@ - \titlefntrue - \def\thefootnote{\@fnsymbol\c@footnote}% - \def\@makefnmark{\hbox{$\@thefnmark$}}% - \@maketitle{#1}% - \thispagestyle{titlepage}\@thanks - \endgroup - \global\let\@maketitle\relax - \global\let\@thanks\@empty - \global\let\@title\@empty - \global\let\@author\@empty - \global\let\maketitle\relax - \global\let\thanks\relax - \setcounter{footnote}\z@ -} - -\def\pe@rl#1{% - \if t#1 {\tpe@rl}\else - \if T#1 {\Tpe@rl}\else - \if f#1 {\fpe@rl}\else - \if F#1 {\Fpe@rl}\else - \if o#1 {\otherpearl}\else - \vspace*{32\p@}% - \fi - \fi - \fi - \fi - \fi -} - -\def\spe@rl{\vspace*{32\p@}\normalfont\LARGE\rmfamily} -\def\epe@rl#1{\par\vspace*{6.5\p@}\gdef\@shorttitle{#1}} - -\def\tpe@rl{\spe@rl T\ls H\ls E\ls O\ls R\ls E\ls T\ls - I\ls C\ls A\ls L\ns P\ls E\ls A\ls R\ls L\ls S% - \epe@rl{Theoretical pearls}% -} - -\def\Tpe@rl{\spe@rl T\ls H\ls E\ls O\ls R\ls E\ls T\ls - I\ls C\ls A\ls L\ns P\ls E\ls A\ls R\ls L% - \epe@rl{Theoretical pearl}% -} - -\def\fpe@rl{\spe@rl F\ls U\ls N\ls C\ls T\ls I\ls O\ls - N\ls A\ls L\ns P\ls E\ls A\ls R\ls L\ls S% - \epe@rl{Functional pearls}% -} - -\def\Fpe@rl{\spe@rl F\ls U\ls N\ls C\ls T\ls I\ls O\ls - N\ls A\ls L\ns P\ls E\ls A\ls R\ls L% - \epe@rl{Functional pearl}% -} - -\def\otherpearl{\spe@rl - \@ifundefined{othrpearl} - {Please define {\normalfont\ttfamily\char92 othrpearl} to obtain\\ the correct title!} - {\othrpearl}% - \epe@rl{Short title--please redefine with {\normalfont\ttfamily\char92 shorttitle}}% -} - -\def\b@at{\begin{author@tabular}[t]{@{}c@{}}} - -\renewcommand\and{and } -\newcommand\@nd{\end{author@tabular}\vskip 6\p@\par\b@at} - -\let\authorbreak\relax -\newcommand\auth@rbreak{\end{author@tabular}\\[0pt]\b@at} - -\def\@maketitle#1{% - \newpage - \vspace*{-15\p@}% - {\centering \sloppy - \pe@rl{#1}% - {\normalfont\LARGE\itshape \@title\par}% - \vskip 16\p@ - {\normalfont\normalsize\rmfamily - \let\authorbreak\auth@rbreak - \let\and\@nd - \b@at - \@author - \end{author@tabular}% - \par}% - }% - \vskip 18\p@ \@plus 2\p@ \@minus 1\p@ -} - -\def\abs@header#1{% - \vbox{\hrule \@width\hsize - \vskip 8\p@ \@plus 3\p@ \@minus 1\p@ - \centerline{\normalfont\normalsize\bfseries #1}}% -} - -\def\abs@body{% - \list{}{\leftmargin\z@ \rightmargin\leftmargin - \listparindent 1em \parsep \z@ \@plus 1\p@ - \topsep 6.5\p@ \@plus 3\p@ \@minus 1\p@}% - \item[]\normalfont\small\rmfamily -} - -\newcommand\abstractname{Abstract} -\newenvironment{abstract} - {\abs@header{\abstractname}\abs@body} - {\endlist\vbox{\hrule \@width \hsize}% - \gdef\abs@header##1{\vskip 2\p@ - \centerline{\normalfont\normalsize\bfseries ##1}}} - -\newcommand\capsulename{Capsule Review} -\newenvironment{capsule} - {\abs@header{\capsulename}\abs@body} - {\endabstract} - -\def\author@tabular{\normalfont\authorsize\rmfamily - \def\@halignto{}\@authortable} -\let\endauthor@tabular\endtabular - -\def\author@tabcrone{{\ifnum0=`}\fi\@xtabularcr\normalfont\affilsize\itshape - \let\\\author@tabcrtwo\ignorespaces} - -\def\author@tabcrtwo{{\ifnum0=`}\fi\@xtabularcr[-3\p@]\normalfont\affilsize\itshape - \let\\\author@tabcrtwo\ignorespaces} - -\def\@authortable{\leavevmode \hbox \bgroup $\let\@acol\@tabacol - \let\@classz\@tabclassz \let\@classiv\@tabclassiv - \let\\\author@tabcrone \ignorespaces \@tabarray} - -\mark{{}{}} -\renewcommand\author{\@ifnextchar [{\@authortwo}{\@authorone}} -\def\@authorone#1{\gdef\@author{#1}\gdef\@shortauthor{#1}} -\def\@authortwo[#1]#2{\gdef\@author{#2}\gdef\@shortauthor{#1}} -\gdef\@author{\mbox{}} - -\newcommand\shortauthor[1]{\gdef\@shortauthor{#1}} -\gdef\@shortauthor{} - -\renewcommand\title{\@ifnextchar [{\@titletwo}{\@titleone}} -\def\@titleone#1{\gdef\@title{#1}\gdef\@shorttitle{#1}} -\def\@titletwo[#1]#2{\gdef\@title{#2}\gdef\@shorttitle{#1}} -\gdef\@title{\mbox{}} - -\newcommand\shorttitle[1]{\gdef\@shorttitle{#1}} -\gdef\@shorttitle{} - -\newcommand\volume[1]{\gdef\@volume{#1}} -\gdef\@volume{{\normalfont\bfseries 1} (1):} - -\newcommand\pagerange[1]{\gdef\@pagerange{#1}} -\gdef\@pagerange{1--000} - -\newcommand\pubyear[1]{\gdef\@year{#1}} -\gdef\@year{19XX} - -\newcommand\jdate[1]{\gdef\@jdate{#1}} -\gdef\@jdate{January \@year} - -\newcommand\doi[1]{\gdef\@doi{10.1017/#1}} -\gdef\@doi{10.1017/S0000000000000000} - -\newcommand\journal[1]{\gdef\@journal{#1}} -\def\@journal{% - \vbox to 5.6\p@{\noindent\parbox[t]{4.8in}{\normalfont\affilsize\rmfamily - {\itshape JFP\/}\ \@volume\ \@pagerange, \@jdate.\quad \copyright\ - \@year\ Cambridge University Press\\[2.5\p@] - DOI: \@doi\quad {Printed in the United Kingdom}}% - \vss}% -} - -\def\@underjournal{% - \vbox to 5.6\p@{\noindent\parbox[t]{4.8in}{\normalfont\affilsize\rmfamily - {\itshape Under consideration for publication in - J.\ Functional Programming\/}\\[2.5\p@] - \ }% - \vss}% -} - -\def\ps@headings{\let\@mkboth\markboth - \def\@oddhead{\hfil{\itshape\@shorttitle}\hfil \llap{\thepage}}% - \def\@evenhead{\rlap{\thepage}\hfil\itshape\@shortauthor\hfil}% - \let\@oddfoot\@empty - \let\@evenfoot\@oddfoot - \def\sectionmark##1{\markboth{##1}{}}% - \def\subsectionmark##1{\markright{##1}}% -} - -\def\ps@myheadings{\let\@mkboth\@gobbletwo - \def\@oddhead{\hfil{\itshape\rightmark}\hfil \llap{\thepage}}% - \def\@evenhead{\rlap{\thepage}\hfil\itshape\leftmark\hfil}% - \let\@oddfoot\@empty - \let\@evenfoot\@oddfoot - \let\sectionmark\@gobble - \let\subsectionmark\@gobble -} - -\ifprodtf - \let\@j@urnal\@journal -\else - \let\@j@urnal\@underjournal -\fi - -\def\ps@titlepage{\leftskip\z@ \let\@mkboth\@gobbletwo - \def\@oddhead{\@j@urnal \hfil\llap{\thepage}}% - \let\@evenhead\@oddhead - \let\@oddfoot\@empty - \let\@evenfoot\@oddfoot - \let\sectionmark\@gobble - \let\subsectionmark\@gobble -} - -\def\@pnumwidth{1.55em} -\def\@tocrmarg {2.55em} -\def\@dotsep{4.5} -\setcounter{tocdepth}{2} - -\def\@dottedtocline#1#2#3#4#5{% FROM LATEX.LTX - \ifnum #1>\c@tocdepth \else - \vskip \z@ \@plus.2\p@ - {\leftskip #2\relax \rightskip \@tocrmarg \parfillskip -\rightskip - \parindent #2\relax\@afterindenttrue - \interlinepenalty\@M - \leavevmode - \@tempdima #3\relax - \advance\leftskip \@tempdima \null\hskip -\leftskip - {#4}\nobreak - \leaders\hbox{$\m@th - \mkern \@dotsep mu\hbox{\phantom{.}}\mkern \@dotsep - mu$}\hfill - \nobreak - \hb@xt@\@pnumwidth{\hfil\normalfont \normalcolor #5}% - \par}% - \fi} - -\newcommand\contentsname{Contents} - -\newcommand\tableofcontents{% - \section*{\contentsname}% - \@starttoc{toc}\par - \vspace{13\p@}% -} - -\newcommand*\l@part[2]{% - \ifnum \c@tocdepth >-2\relax - \addpenalty{-\@highpenalty}% - \addvspace{.5\baselineskip \@plus 1\p@}% - \begingroup - \parindent \z@ \rightskip \@pnumwidth - \parfillskip -\@pnumwidth - {\leavevmode - \normalfont\rmfamily - #1\hfil \hb@xt@\@pnumwidth{\hfil}}\par - \nobreak - \if@compatibility - \global\@nobreaktrue - \everypar{\global\@nobreakfalse\everypar{}}% - \fi - \endgroup - \vskip .25\baselineskip \@plus 1\p@ - \fi -} - -\newcommand*\l@section[2]{% - \ifnum \c@tocdepth >\z@ - \addpenalty\@secpenalty - \setlength\@tempdima{1.5em}% - \begingroup - \parindent \z@ \rightskip \@pnumwidth - \parfillskip -\@pnumwidth - \leavevmode \normalfont\rmfamily - \advance\leftskip\@tempdima - \hskip -\leftskip - {\bfseries #1}\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par - \endgroup - \fi} - -\newcommand*\l@subsection{\@dottedtocline{2}{1.5em}{2.3em}} -\newcommand*\l@subsubsection{\@dottedtocline{3}{3.8em}{3.2em}} -\newcommand*\l@paragraph{\@dottedtocline{4}{7.0em}{4.1em}} -\newcommand*\l@subparagraph{\@dottedtocline{5}{10em}{5em}} - -\newcommand\listfigurename{List of Figures} -\newcommand\listoffigures{% - \section*{\listfigurename}% - \@starttoc{lof}\par - \vskip 13\p@ -} - -\newcommand*\l@figure{\@dottedtocline{1}{1.5em}{2.3em}} - -\newcommand\listtablename{List of Tables} -\newcommand\listoftables{% - \section*{\listtablename}% - \@starttoc{lot}\par - \vskip 13\p@ -} - -\let\l@table\l@figure - -\renewcommand\footnoterule{% - \kern-3\p@ - \hrule \@width .4\columnwidth height \z@ - \kern 3\p@} - -\newif\iftitlefn -\newcommand\@makefntext[1]{% - \@setpar{\@@par\@tempdima \hsize - \advance\@tempdima-1em - \parshape \@ne 1em \@tempdima}\par - \noindent \hb@xt@ \z@{\hss$\iftitlefn\else^\fi{\@thefnmark}$\ }#1} - -\ifprodtf \else \let\highast\ast\fi - -\def\@fnsymbol#1{\ensuremath{% FROM LATEX.LTX - \ifcase#1\or \hbox{$\highast$}\or \dagger\or \ddagger\or - \mathchar "278\or \mathchar "27B\or \|\or \hbox{$\highast\highast$}\or - \dagger\dagger\or \ddagger\ddagger\or \mathchar "278\mathchar "278\or - \mathchar "27B\mathchar "27B\or \|\|\or \else\@ctrerr\fi}% -} - -\renewcommand\@makefnmark{\hbox{$^{\@thefnmark}$}}% FROM LATEX.LTX -\renewcommand\thefootnote{\@arabic\c@footnote}% FROM LATEX.LTX -\renewcommand\thempfootnote{\mathit{\@alph\c@mpfootnote}}% FROM LATEX.LTX - -\setcounter{topnumber}{2} -\renewcommand\topfraction{.9} -\setcounter{bottomnumber}{1} -\renewcommand\bottomfraction{.9} -\setcounter{totalnumber}{3} -\renewcommand\textfraction{.1} -\renewcommand\floatpagefraction{.9} -\setcounter{dbltopnumber}{2} -\renewcommand\dbltopfraction{.9} -\renewcommand\dblfloatpagefraction{.5} - -\newcounter{table} -\renewcommand\thetable{\@arabic\c@table} -\def\fps@table{tbp} -\def\ftype@table{1} -\def\ext@table{lot} -\newcommand\tablename{Table} -\def\fnum@table{\tablename~\thetable} - -\newenvironment{table} - {\@float{table}} - {\end@float} - -\newenvironment{table*} - {\@dblfloat{table}} - {\end@dblfloat} - -\def\fstyle@table{\normalfont\small\rmfamily} -\def\fjust@table{\centering} -\def\fcapjust@table{\centering} -\def\fcapsize@table{\normalfont\normalsize\rmfamily} -\def\fcapstyle@table{\normalfont\normalsize\itshape} - -\newcommand\contname{(cont.)} -\newcommand\continuedfigure{% - \addtocounter{figure}\m@ne - \let\curr@thefigure\thefigure - \def\thefigure{\curr@thefigure\ \contname}% -} - -\newcommand\continuedtable{% - \addtocounter{table}\m@ne - \let\curr@thetable\thetable - \def\thetable{\curr@thetable\ \contname}% -} - -\newif\ifrem@fullpt -\newcommand\removefullpoint{\global\rem@fullpttrue} - -\newif\ifbot@fig -\newenvironment{bottomfigure}{\def\fps@figure{b}% - \setcounter{bottomnumber}{1}% - \global\bot@figtrue - \@float{figure}\fstyle@figure} - {\end@float} - -\newbox\@tempboxb - -\long\def\@makecaption#1#2{% - \ifbot@fig \rule{\textwidth}{.25\p@}\fi - \vskip 6.5\p@ \@plus .4\p@ \@minus .4\p@ - \begingroup - \setbox\@tempboxb\hbox{#2}% - \def\@xtra{\ifdim\wd\@tempboxb>\z@ \ifrem@fullpt\else .\enskip\fi\fi}% - \setbox\@tempboxa\hbox{#1\@xtra #2}% - \ifdim\wd\@tempboxa>\tw@\textwidth - {\let\centering\relax #1\@xtra #2\par}% - \else - #1\@xtra #2\par - \fi - \endgroup - \global\bot@figfalse - \global\rem@fullptfalse -} - -\newcounter{figure} -\renewcommand\thefigure{\@arabic\c@figure} -\def\fps@figure{tbp} -\def\ftype@figure{2} -\def\ext@figure{lof} -\newcommand\figurename{Fig.} -\def\fnum@figure{\figurename~\thefigure} - -\newenvironment{figure} - {\@float{figure}} - {\end@float} - -\newenvironment{figure*} - {\@dblfloat{figure}} - {\end@dblfloat} - -\def\fstyle@figure{\normalfont\small\rmfamily} -\def\fjust@figure{\centering} -\def\fcapjust@figure{\centering} -\def\fcapsize@figure{\normalfont\small\rmfamily} -\def\fcapstyle@figure{\normalfont\small\rmfamily} - -\long\def\@caption#1[#2]#3{% FROM LATEX.LTX - \par - \addcontentsline{\csname ext@#1\endcsname}{#1}% - {\protect\numberline{\csname the#1\endcsname}{\ignorespaces #2}}% - \begingroup - \@parboxrestore - \if@minipage - \@setminipage - \fi - \normalsize - \@makecaption{\csname fcapjust@#1\endcsname - \csname fcapsize@#1\endcsname - \csname fnum@#1\endcsname}% - {\csname fcapstyle@#1\endcsname \ignorespaces #3}\par - \endgroup -} - -\def\@xfloat #1[#2]{% FROM LATEX.LTX - \@nodocument - \def\@captype {#1}% - \def\@fps {#2}% - \@onelevel@sanitize \@fps - \def \reserved@b {!}% - \ifx \reserved@b \@fps - \@fpsadddefault - \else - \ifx \@fps \@empty - \@fpsadddefault - \fi - \fi - \ifhmode - \@bsphack - \@floatpenalty-\@Mii - \else - \@floatpenalty-\@Miii - \fi - \ifinner - \@parmoderr\@floatpenalty\z@ - \else - \@next\@currbox\@freelist - {% - \@tempcnta \sixt@@n - \expandafter \@tfor \expandafter \reserved@a - \expandafter :\expandafter =\@fps - \do - {% - \if \reserved@a h% - \ifodd \@tempcnta - \else - \advance \@tempcnta \@ne - \fi - \fi - \if \reserved@a t% - \@setfpsbit \tw@ - \fi - \if \reserved@a b% - \@setfpsbit 4% - \fi - \if \reserved@a p% - \@setfpsbit 8% - \fi - \if \reserved@a !% - \ifnum \@tempcnta>15 - \advance\@tempcnta -\sixt@@n\relax - \fi - \fi - }% - \@tempcntb \csname ftype@\@captype \endcsname - \multiply \@tempcntb \@xxxii - \advance \@tempcnta \@tempcntb - \global \count\@currbox \@tempcnta - }% - \@fltovf - \fi - \global \setbox\@currbox - \color@vbox - \normalcolor - \vbox \bgroup - \hsize\columnwidth - \@parboxrestore - \@floatboxreset - \csname fstyle@\@captype\endcsname - \csname fjust@\@captype\endcsname -} - -\let\oldtabular\tabular -\let\endoldtabular\endtabular - -\def\tabular{% FROM LATEX.LTX - \def\@halignto{to \textwidth}\tabskip\tabcolsep \@plus 1fil\@ttabular -} - -\def\@ttabular{\leavevmode \hbox \bgroup $\let\@acol\@tabacol - \let\@classz\@tabclassz - \let\@classiv\@tabclassiv \let\\\@tabularcr\@ttabarray} - -\def\@ttabarray{\m@th\@ifnextchar[\@tarray{\@ttarray}} - -\def\@tarray[#1]#2{\t@barray[#1]{@{\tabskip\tw@\tabcolsep \@plus 3\p@}#2}} -\def\@ttarray#1{\t@barray[c]{@{\tabskip\tw@\tabcolsep \@plus 3\p@}#1}} - -\def\t@barray[#1]#2{% - \if #1t\vtop \else \if#1b\vbox \else \vcenter \fi\fi - \bgroup - \setbox\@arstrutbox\hbox{% - \vrule \@height\arraystretch\ht\strutbox - \@depth\arraystretch \dp\strutbox - \@width\z@}% - \@mkpream{#2}% - \edef\@preamble{% - \halign \noexpand\@halignto - \bgroup \tabskip\z@skip \@arstrut \@preamble \tabskip\tabcolsep \@plus 1fil\cr}% - \let\@startpbox\@@startpbox \let\@endpbox\@@endpbox - \let\tabularnewline\\% - \let\par\@empty - \let\@sharp##% - \set@typeset@protect - \lineskip\z@skip\baselineskip\z@skip - \@preamble} - -\newcommand\ls{\kern.15em\relax} -\newcommand\ns{\kern.55em\relax} - -\def\hline{% FROM LATEX.LTX - \noalign{\ifnum0=`}\fi \vskip 6\p@ - \hrule \@height \arrayrulewidth \vskip 6\p@ - \futurelet \reserved@a\@xhline} - -\def\@xhline{% FROM LATEX.LTX - \ifx\reserved@a\hline - \vskip -12\p@ - \vskip\doublerulesep - \fi - \ifnum0=`{\fi}} - -\newcommand\today{} -\edef\today{\number\day\ \ifcase\month\or - January\or February\or March\or April\or May\or June\or - July\or August\or September\or October\or November\or December - \fi \ \number\year} - -\renewcommand\@biblabel[1]{}% FROM LATEX.LTX -\newcommand\newblock{\hskip .11em \@plus .33em \@minus .07em} - -\newcommand\refname{References} -\newenvironment{thebibliography}[1] - {\section*{\refname}% - \normalfont\small\rmfamily - \addcontentsline{toc}{section}{\refname}% - \list{}{\labelwidth\z@ \leftmargin 1em \itemindent -1em}% - \parindent\z@ - \parskip 2\p@ \@plus .1\p@ - \sloppy\clubpenalty\z@ \widowpenalty\@M - \sfcode`\.\@m\relax} - {\def\@noitemerr - {\@latex@warning{Empty `thebibliography' environment}}% - \endlist} - -\def\@citex[#1]#2{% FROM LATEX.LTX - \let\@citea\@empty - \@cite{\@for\@citeb:=#2\do - {\@citea\def\@citea{; }% - \edef\@citeb{\expandafter\@firstofone\@citeb}% - \if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi - \@ifundefined{b@\@citeb}{\mbox{\reset@font\bfseries ?}% - \G@refundefinedtrue - \@latex@warning - {Citation `\@citeb' on page \thepage \space undefined}}% - {\csname b@\@citeb\endcsname}}}{#1}} - -\def\@cite#1#2{{\if@tempswa #2\else (#1)\fi}}% FROM LATEX.LTX - -\let\@internalcite\cite -\def\cite{\def\citename##1{##1}\@internalcite} -\DeclareRobustCommand\shortcite{\def\citename##1{}\@internalcite} - -\newif\iffontfound -\newcommand\checkfont[1]{% - \batchmode - \font\test=#1\relax - \errorstopmode - \fontfoundfalse - \ifx\test\nullfont \else \fontfoundtrue\fi -} - -\newcommand\email[1]{{\normalfont\rmfamily - \itshape\textup{(}e-mail: \textup{\texttt{#1})}}} - -\edef\r@{\ifprodtf mtr\else cmr\fi} - -\let\real@font@warning\@font@warning -\DeclareMathVersion{program} -\let\@font@warning\@gobble -\SetSymbolFont{letters}{program}{OT1}{\r@}{m}{sl} -\let\@font@warning\real@font@warning -\SetMathAlphabet{\mathnormal}{program}{OT1}{\r@}{m}{sl} - -\newcommand{\programmath}{\mathversion{program}} -\newcommand{\unprogrammath}{\mathversion{normal}} -\newcommand{\figrule}{\begin{center}\hrule\end{center}} - -\DeclareRobustCommand\dplus{\mathbin{+\!\!+}} -\DeclareRobustCommand\dequals{\mathbin{==}} -\DeclareRobustCommand\dcolon{\mathbin{::}} -\DeclareRobustCommand\dcolonequals{\mathbin{::=}} - -\pagestyle{headings} -\pagenumbering{arabic} -\frenchspacing -\flushbottom - -\endinput +\ProvidesClass{jfp} -% end of file jfp.cls +\@latex@error{This jfp.cls is a stub, please replace it.} From 76809b92fb7f26c7102dc31522e65a96666f1c76 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Tue, 16 Aug 2011 03:41:22 -0400 Subject: [PATCH 336/441] v5.1.3 stuff (Cherry picked from ae80150) --- collects/meta/web/download/installers.txt | 296 ++++++++++++---------- 1 file changed, 162 insertions(+), 134 deletions(-) diff --git a/collects/meta/web/download/installers.txt b/collects/meta/web/download/installers.txt index 44fbbf3aae8..be8d1c7853c 100644 --- a/collects/meta/web/download/installers.txt +++ b/collects/meta/web/download/installers.txt @@ -1,134 +1,162 @@ -8.9M 5.0.1/racket-textual/racket-textual-5.0.1-bin-i386-linux-debian.sh -8.9M 5.0.1/racket-textual/racket-textual-5.0.1-bin-i386-linux-f12.sh -8.9M 5.0.1/racket-textual/racket-textual-5.0.1-bin-i386-linux-ubuntu-jaunty.sh -9.2M 5.0.1/racket-textual/racket-textual-5.0.1-bin-i386-osx-mac.dmg -6.9M 5.0.1/racket-textual/racket-textual-5.0.1-bin-i386-win32.exe -8.9M 5.0.1/racket-textual/racket-textual-5.0.1-bin-ppc-darwin.sh -9.2M 5.0.1/racket-textual/racket-textual-5.0.1-bin-ppc-osx-mac.dmg -9.0M 5.0.1/racket-textual/racket-textual-5.0.1-bin-x86_64-linux-f7.sh -5.6M 5.0.1/racket-textual/racket-textual-5.0.1-src-mac.dmg -5.5M 5.0.1/racket-textual/racket-textual-5.0.1-src-unix.tgz -6.8M 5.0.1/racket-textual/racket-textual-5.0.1-src-win.zip -47M 5.0.1/racket/racket-5.0.1-bin-i386-linux-debian.sh -47M 5.0.1/racket/racket-5.0.1-bin-i386-linux-f12.sh -47M 5.0.1/racket/racket-5.0.1-bin-i386-linux-ubuntu-jaunty.sh -48M 5.0.1/racket/racket-5.0.1-bin-i386-osx-mac.dmg -29M 5.0.1/racket/racket-5.0.1-bin-i386-win32.exe -46M 5.0.1/racket/racket-5.0.1-bin-ppc-darwin.sh -48M 5.0.1/racket/racket-5.0.1-bin-ppc-osx-mac.dmg -47M 5.0.1/racket/racket-5.0.1-bin-x86_64-linux-f7.sh -17M 5.0.1/racket/racket-5.0.1-src-mac.dmg -17M 5.0.1/racket/racket-5.0.1-src-unix.tgz -20M 5.0.1/racket/racket-5.0.1-src-win.zip -9.4M 5.0.2/racket-textual/racket-textual-5.0.2-bin-i386-linux-debian.sh -9.4M 5.0.2/racket-textual/racket-textual-5.0.2-bin-i386-linux-f12.sh -9.4M 5.0.2/racket-textual/racket-textual-5.0.2-bin-i386-linux-ubuntu-jaunty.sh -9.6M 5.0.2/racket-textual/racket-textual-5.0.2-bin-i386-osx-mac.dmg -7.2M 5.0.2/racket-textual/racket-textual-5.0.2-bin-i386-win32.exe -9.3M 5.0.2/racket-textual/racket-textual-5.0.2-bin-ppc-darwin.sh -9.6M 5.0.2/racket-textual/racket-textual-5.0.2-bin-ppc-osx-mac.dmg -9.5M 5.0.2/racket-textual/racket-textual-5.0.2-bin-x86_64-linux-f7.sh -5.7M 5.0.2/racket-textual/racket-textual-5.0.2-src-mac.dmg -5.6M 5.0.2/racket-textual/racket-textual-5.0.2-src-unix.tgz -7.0M 5.0.2/racket-textual/racket-textual-5.0.2-src-win.zip -48M 5.0.2/racket/racket-5.0.2-bin-i386-linux-debian.sh -48M 5.0.2/racket/racket-5.0.2-bin-i386-linux-f12.sh -48M 5.0.2/racket/racket-5.0.2-bin-i386-linux-ubuntu-jaunty.sh -50M 5.0.2/racket/racket-5.0.2-bin-i386-osx-mac.dmg -30M 5.0.2/racket/racket-5.0.2-bin-i386-win32.exe -48M 5.0.2/racket/racket-5.0.2-bin-ppc-darwin.sh -50M 5.0.2/racket/racket-5.0.2-bin-ppc-osx-mac.dmg -49M 5.0.2/racket/racket-5.0.2-bin-x86_64-linux-f7.sh -17M 5.0.2/racket/racket-5.0.2-src-mac.dmg -17M 5.0.2/racket/racket-5.0.2-src-unix.tgz -21M 5.0.2/racket/racket-5.0.2-src-win.zip -8.7M 5.0/racket-textual/racket-textual-5.0-bin-i386-linux-debian.sh -8.7M 5.0/racket-textual/racket-textual-5.0-bin-i386-linux-f12.sh -8.7M 5.0/racket-textual/racket-textual-5.0-bin-i386-linux-ubuntu-jaunty.sh -8.9M 5.0/racket-textual/racket-textual-5.0-bin-i386-osx-mac.dmg -6.7M 5.0/racket-textual/racket-textual-5.0-bin-i386-win32.exe -8.6M 5.0/racket-textual/racket-textual-5.0-bin-ppc-darwin.sh -8.9M 5.0/racket-textual/racket-textual-5.0-bin-ppc-osx-mac.dmg -8.8M 5.0/racket-textual/racket-textual-5.0-bin-x86_64-linux-f7.sh -5.3M 5.0/racket-textual/racket-textual-5.0-src-mac.dmg -5.2M 5.0/racket-textual/racket-textual-5.0-src-unix.tgz -6.8M 5.0/racket-textual/racket-textual-5.0-src-win.zip -45M 5.0/racket/racket-5.0-bin-i386-linux-debian.sh -45M 5.0/racket/racket-5.0-bin-i386-linux-f12.sh -45M 5.0/racket/racket-5.0-bin-i386-linux-ubuntu-jaunty.sh -46M 5.0/racket/racket-5.0-bin-i386-osx-mac.dmg -28M 5.0/racket/racket-5.0-bin-i386-win32.exe -45M 5.0/racket/racket-5.0-bin-ppc-darwin.sh -46M 5.0/racket/racket-5.0-bin-ppc-osx-mac.dmg -45M 5.0/racket/racket-5.0-bin-x86_64-linux-f7.sh -16M 5.0/racket/racket-5.0-src-mac.dmg -16M 5.0/racket/racket-5.0-src-unix.tgz -20M 5.0/racket/racket-5.0-src-win.zip -11M 5.1.1/racket-textual/racket-textual-5.1.1-bin-i386-linux-f12.sh -11M 5.1.1/racket-textual/racket-textual-5.1.1-bin-i386-linux-ubuntu-jaunty.sh -11M 5.1.1/racket-textual/racket-textual-5.1.1-bin-i386-osx-mac.dmg -7.6M 5.1.1/racket-textual/racket-textual-5.1.1-bin-i386-win32.exe -11M 5.1.1/racket-textual/racket-textual-5.1.1-bin-ppc-darwin.sh -11M 5.1.1/racket-textual/racket-textual-5.1.1-bin-ppc-osx-mac.dmg -11M 5.1.1/racket-textual/racket-textual-5.1.1-bin-x86_64-linux-f14.sh -5.9M 5.1.1/racket-textual/racket-textual-5.1.1-src-mac.dmg -5.7M 5.1.1/racket-textual/racket-textual-5.1.1-src-unix.tgz -6.8M 5.1.1/racket-textual/racket-textual-5.1.1-src-win.zip -50M 5.1.1/racket/racket-5.1.1-bin-i386-linux-f12.sh -50M 5.1.1/racket/racket-5.1.1-bin-i386-linux-ubuntu-jaunty.sh -51M 5.1.1/racket/racket-5.1.1-bin-i386-osx-mac.dmg -32M 5.1.1/racket/racket-5.1.1-bin-i386-win32.exe -49M 5.1.1/racket/racket-5.1.1-bin-ppc-darwin.sh -52M 5.1.1/racket/racket-5.1.1-bin-ppc-osx-mac.dmg -50M 5.1.1/racket/racket-5.1.1-bin-x86_64-linux-f14.sh -16M 5.1.1/racket/racket-5.1.1-src-mac.dmg -16M 5.1.1/racket/racket-5.1.1-src-unix.tgz -19M 5.1.1/racket/racket-5.1.1-src-win.zip -9.9M 5.1.2/racket-textual/racket-textual-5.1.2-bin-i386-linux-f12.sh -9.9M 5.1.2/racket-textual/racket-textual-5.1.2-bin-i386-linux-ubuntu-jaunty.sh -11M 5.1.2/racket-textual/racket-textual-5.1.2-bin-i386-osx-mac.dmg -7.4M 5.1.2/racket-textual/racket-textual-5.1.2-bin-i386-win32.exe -9.8M 5.1.2/racket-textual/racket-textual-5.1.2-bin-ppc-darwin.sh -11M 5.1.2/racket-textual/racket-textual-5.1.2-bin-ppc-osx-mac.dmg -10M 5.1.2/racket-textual/racket-textual-5.1.2-bin-x86_64-linux-debian-lenny.sh -10M 5.1.2/racket-textual/racket-textual-5.1.2-bin-x86_64-linux-debian-squeeze.sh -10M 5.1.2/racket-textual/racket-textual-5.1.2-bin-x86_64-linux-f14.sh -11M 5.1.2/racket-textual/racket-textual-5.1.2-bin-x86_64-osx-mac.dmg -7.7M 5.1.2/racket-textual/racket-textual-5.1.2-bin-x86_64-win32.exe -5.7M 5.1.2/racket-textual/racket-textual-5.1.2-src-mac.dmg -5.6M 5.1.2/racket-textual/racket-textual-5.1.2-src-unix.tgz -6.6M 5.1.2/racket-textual/racket-textual-5.1.2-src-win.zip -48M 5.1.2/racket/racket-5.1.2-bin-i386-linux-f12.sh -48M 5.1.2/racket/racket-5.1.2-bin-i386-linux-ubuntu-jaunty.sh -50M 5.1.2/racket/racket-5.1.2-bin-i386-osx-mac.dmg -32M 5.1.2/racket/racket-5.1.2-bin-i386-win32.exe -48M 5.1.2/racket/racket-5.1.2-bin-ppc-darwin.sh -51M 5.1.2/racket/racket-5.1.2-bin-ppc-osx-mac.dmg -49M 5.1.2/racket/racket-5.1.2-bin-x86_64-linux-debian-lenny.sh -49M 5.1.2/racket/racket-5.1.2-bin-x86_64-linux-debian-squeeze.sh -49M 5.1.2/racket/racket-5.1.2-bin-x86_64-linux-f14.sh -50M 5.1.2/racket/racket-5.1.2-bin-x86_64-osx-mac.dmg -32M 5.1.2/racket/racket-5.1.2-bin-x86_64-win32.exe -16M 5.1.2/racket/racket-5.1.2-src-mac.dmg -16M 5.1.2/racket/racket-5.1.2-src-unix.tgz -19M 5.1.2/racket/racket-5.1.2-src-win.zip -11M 5.1/racket-textual/racket-textual-5.1-bin-i386-linux-f12.sh -11M 5.1/racket-textual/racket-textual-5.1-bin-i386-linux-ubuntu-jaunty.sh -11M 5.1/racket-textual/racket-textual-5.1-bin-i386-osx-mac.dmg -7.6M 5.1/racket-textual/racket-textual-5.1-bin-i386-win32.exe -11M 5.1/racket-textual/racket-textual-5.1-bin-ppc-darwin.sh -11M 5.1/racket-textual/racket-textual-5.1-bin-ppc-osx-mac.dmg -11M 5.1/racket-textual/racket-textual-5.1-bin-x86_64-linux-f14.sh -5.8M 5.1/racket-textual/racket-textual-5.1-src-mac.dmg -5.7M 5.1/racket-textual/racket-textual-5.1-src-unix.tgz -5.8M 5.1/racket-textual/racket-textual-5.1-src-win.zip -50M 5.1/racket/racket-5.1-bin-i386-linux-f12.sh -50M 5.1/racket/racket-5.1-bin-i386-linux-ubuntu-jaunty.sh -51M 5.1/racket/racket-5.1-bin-i386-osx-mac.dmg -32M 5.1/racket/racket-5.1-bin-i386-win32.exe -49M 5.1/racket/racket-5.1-bin-ppc-darwin.sh -52M 5.1/racket/racket-5.1-bin-ppc-osx-mac.dmg -50M 5.1/racket/racket-5.1-bin-x86_64-linux-f14.sh -16M 5.1/racket/racket-5.1-src-mac.dmg -16M 5.1/racket/racket-5.1-src-unix.tgz -18M 5.1/racket/racket-5.1-src-win.zip +9300697 5.0.1/racket-textual/racket-textual-5.0.1-bin-i386-linux-debian.sh +9304219 5.0.1/racket-textual/racket-textual-5.0.1-bin-i386-linux-f12.sh +9313351 5.0.1/racket-textual/racket-textual-5.0.1-bin-i386-linux-ubuntu-jaunty.sh +9598271 5.0.1/racket-textual/racket-textual-5.0.1-bin-i386-osx-mac.dmg +7195260 5.0.1/racket-textual/racket-textual-5.0.1-bin-i386-win32.exe +9275500 5.0.1/racket-textual/racket-textual-5.0.1-bin-ppc-darwin.sh +9590434 5.0.1/racket-textual/racket-textual-5.0.1-bin-ppc-osx-mac.dmg +9428494 5.0.1/racket-textual/racket-textual-5.0.1-bin-x86_64-linux-f7.sh +5832011 5.0.1/racket-textual/racket-textual-5.0.1-src-mac.dmg +5714125 5.0.1/racket-textual/racket-textual-5.0.1-src-unix.tgz +7115859 5.0.1/racket-textual/racket-textual-5.0.1-src-win.zip +48280952 5.0.1/racket/racket-5.0.1-bin-i386-linux-debian.sh +48274719 5.0.1/racket/racket-5.0.1-bin-i386-linux-f12.sh +48321280 5.0.1/racket/racket-5.0.1-bin-i386-linux-ubuntu-jaunty.sh +49529404 5.0.1/racket/racket-5.0.1-bin-i386-osx-mac.dmg +29974852 5.0.1/racket/racket-5.0.1-bin-i386-win32.exe +48227579 5.0.1/racket/racket-5.0.1-bin-ppc-darwin.sh +49553958 5.0.1/racket/racket-5.0.1-bin-ppc-osx-mac.dmg +48582065 5.0.1/racket/racket-5.0.1-bin-x86_64-linux-f7.sh +17343846 5.0.1/racket/racket-5.0.1-src-mac.dmg +17272590 5.0.1/racket/racket-5.0.1-src-unix.tgz +20625477 5.0.1/racket/racket-5.0.1-src-win.zip +9753004 5.0.2/racket-textual/racket-textual-5.0.2-bin-i386-linux-debian.sh +9759330 5.0.2/racket-textual/racket-textual-5.0.2-bin-i386-linux-f12.sh +9769701 5.0.2/racket-textual/racket-textual-5.0.2-bin-i386-linux-ubuntu-jaunty.sh +10061865 5.0.2/racket-textual/racket-textual-5.0.2-bin-i386-osx-mac.dmg +7483846 5.0.2/racket-textual/racket-textual-5.0.2-bin-i386-win32.exe +9723983 5.0.2/racket-textual/racket-textual-5.0.2-bin-ppc-darwin.sh +10054183 5.0.2/racket-textual/racket-textual-5.0.2-bin-ppc-osx-mac.dmg +9889541 5.0.2/racket-textual/racket-textual-5.0.2-bin-x86_64-linux-f7.sh +5939776 5.0.2/racket-textual/racket-textual-5.0.2-src-mac.dmg +5815219 5.0.2/racket-textual/racket-textual-5.0.2-src-unix.tgz +7283576 5.0.2/racket-textual/racket-textual-5.0.2-src-win.zip +50263773 5.0.2/racket/racket-5.0.2-bin-i386-linux-debian.sh +50264748 5.0.2/racket/racket-5.0.2-bin-i386-linux-f12.sh +50304157 5.0.2/racket/racket-5.0.2-bin-i386-linux-ubuntu-jaunty.sh +51514800 5.0.2/racket/racket-5.0.2-bin-i386-osx-mac.dmg +31130193 5.0.2/racket/racket-5.0.2-bin-i386-win32.exe +50204906 5.0.2/racket/racket-5.0.2-bin-ppc-darwin.sh +51567239 5.0.2/racket/racket-5.0.2-bin-ppc-osx-mac.dmg +50579715 5.0.2/racket/racket-5.0.2-bin-x86_64-linux-f7.sh +17699549 5.0.2/racket/racket-5.0.2-src-mac.dmg +17622692 5.0.2/racket/racket-5.0.2-src-unix.tgz +21092427 5.0.2/racket/racket-5.0.2-src-win.zip +9015818 5.0/racket-textual/racket-textual-5.0-bin-i386-linux-debian.sh +9025266 5.0/racket-textual/racket-textual-5.0-bin-i386-linux-f12.sh +9039169 5.0/racket-textual/racket-textual-5.0-bin-i386-linux-ubuntu-jaunty.sh +9324539 5.0/racket-textual/racket-textual-5.0-bin-i386-osx-mac.dmg +7023498 5.0/racket-textual/racket-textual-5.0-bin-i386-win32.exe +8999839 5.0/racket-textual/racket-textual-5.0-bin-ppc-darwin.sh +9330306 5.0/racket-textual/racket-textual-5.0-bin-ppc-osx-mac.dmg +9159233 5.0/racket-textual/racket-textual-5.0-bin-x86_64-linux-f7.sh +5539138 5.0/racket-textual/racket-textual-5.0-src-mac.dmg +5408767 5.0/racket-textual/racket-textual-5.0-src-unix.tgz +7041524 5.0/racket-textual/racket-textual-5.0-src-win.zip +46469932 5.0/racket/racket-5.0-bin-i386-linux-debian.sh +46483844 5.0/racket/racket-5.0-bin-i386-linux-f12.sh +46515740 5.0/racket/racket-5.0-bin-i386-linux-ubuntu-jaunty.sh +47637362 5.0/racket/racket-5.0-bin-i386-osx-mac.dmg +28973247 5.0/racket/racket-5.0-bin-i386-win32.exe +46418573 5.0/racket/racket-5.0-bin-ppc-darwin.sh +47693225 5.0/racket/racket-5.0-bin-ppc-osx-mac.dmg +46784914 5.0/racket/racket-5.0-bin-x86_64-linux-f7.sh +16727955 5.0/racket/racket-5.0-src-mac.dmg +16661627 5.0/racket/racket-5.0-src-unix.tgz +20043612 5.0/racket/racket-5.0-src-win.zip +10608594 5.1.1/racket-textual/racket-textual-5.1.1-bin-i386-linux-f12.sh +10617031 5.1.1/racket-textual/racket-textual-5.1.1-bin-i386-linux-ubuntu-jaunty.sh +10944378 5.1.1/racket-textual/racket-textual-5.1.1-bin-i386-osx-mac.dmg +7871781 5.1.1/racket-textual/racket-textual-5.1.1-bin-i386-win32.exe +10563612 5.1.1/racket-textual/racket-textual-5.1.1-bin-ppc-darwin.sh +10925675 5.1.1/racket-textual/racket-textual-5.1.1-bin-ppc-osx-mac.dmg +10777466 5.1.1/racket-textual/racket-textual-5.1.1-bin-x86_64-linux-f14.sh +6088017 5.1.1/racket-textual/racket-textual-5.1.1-src-mac.dmg +5972450 5.1.1/racket-textual/racket-textual-5.1.1-src-unix.tgz +7072928 5.1.1/racket-textual/racket-textual-5.1.1-src-win.zip +51562160 5.1.1/racket/racket-5.1.1-bin-i386-linux-f12.sh +51583365 5.1.1/racket/racket-5.1.1-bin-i386-linux-ubuntu-jaunty.sh +53227597 5.1.1/racket/racket-5.1.1-bin-i386-osx-mac.dmg +33299725 5.1.1/racket/racket-5.1.1-bin-i386-win32.exe +51319041 5.1.1/racket/racket-5.1.1-bin-ppc-darwin.sh +54275107 5.1.1/racket/racket-5.1.1-bin-ppc-osx-mac.dmg +51928808 5.1.1/racket/racket-5.1.1-bin-x86_64-linux-f14.sh +16221515 5.1.1/racket/racket-5.1.1-src-mac.dmg +15884853 5.1.1/racket/racket-5.1.1-src-unix.tgz +19117693 5.1.1/racket/racket-5.1.1-src-win.zip +10294418 5.1.2/racket-textual/racket-textual-5.1.2-bin-i386-linux-f12.sh +10305056 5.1.2/racket-textual/racket-textual-5.1.2-bin-i386-linux-ubuntu-jaunty.sh +10649433 5.1.2/racket-textual/racket-textual-5.1.2-bin-i386-osx-mac.dmg +7735142 5.1.2/racket-textual/racket-textual-5.1.2-bin-i386-win32.exe +10229144 5.1.2/racket-textual/racket-textual-5.1.2-bin-ppc-darwin.sh +10600014 5.1.2/racket-textual/racket-textual-5.1.2-bin-ppc-osx-mac.dmg +10465204 5.1.2/racket-textual/racket-textual-5.1.2-bin-x86_64-linux-debian-lenny.sh +10476031 5.1.2/racket-textual/racket-textual-5.1.2-bin-x86_64-linux-debian-squeeze.sh +10474930 5.1.2/racket-textual/racket-textual-5.1.2-bin-x86_64-linux-f14.sh +10849704 5.1.2/racket-textual/racket-textual-5.1.2-bin-x86_64-osx-mac.dmg +8035589 5.1.2/racket-textual/racket-textual-5.1.2-bin-x86_64-win32.exe +5927007 5.1.2/racket-textual/racket-textual-5.1.2-src-mac.dmg +5814309 5.1.2/racket-textual/racket-textual-5.1.2-src-unix.tgz +6858089 5.1.2/racket-textual/racket-textual-5.1.2-src-win.zip +50068153 5.1.2/racket/racket-5.1.2-bin-i386-linux-f12.sh +50101512 5.1.2/racket/racket-5.1.2-bin-i386-linux-ubuntu-jaunty.sh +51665644 5.1.2/racket/racket-5.1.2-bin-i386-osx-mac.dmg +32577645 5.1.2/racket/racket-5.1.2-bin-i386-win32.exe +49784628 5.1.2/racket/racket-5.1.2-bin-ppc-darwin.sh +52725371 5.1.2/racket/racket-5.1.2-bin-ppc-osx-mac.dmg +50416939 5.1.2/racket/racket-5.1.2-bin-x86_64-linux-debian-lenny.sh +50437726 5.1.2/racket/racket-5.1.2-bin-x86_64-linux-debian-squeeze.sh +50446330 5.1.2/racket/racket-5.1.2-bin-x86_64-linux-f14.sh +51976069 5.1.2/racket/racket-5.1.2-bin-x86_64-osx-mac.dmg +33226602 5.1.2/racket/racket-5.1.2-bin-x86_64-win32.exe +16293184 5.1.2/racket/racket-5.1.2-src-mac.dmg +15960181 5.1.2/racket/racket-5.1.2-src-unix.tgz +19203148 5.1.2/racket/racket-5.1.2-src-win.zip +10277328 5.1.3/racket-textual/racket-textual-5.1.3-bin-i386-linux-f12.sh +10286517 5.1.3/racket-textual/racket-textual-5.1.3-bin-i386-linux-ubuntu-jaunty.sh +10646200 5.1.3/racket-textual/racket-textual-5.1.3-bin-i386-osx-mac.dmg +7721338 5.1.3/racket-textual/racket-textual-5.1.3-bin-i386-win32.exe +10209882 5.1.3/racket-textual/racket-textual-5.1.3-bin-ppc-darwin.sh +10578888 5.1.3/racket-textual/racket-textual-5.1.3-bin-ppc-osx-mac.dmg +10445665 5.1.3/racket-textual/racket-textual-5.1.3-bin-x86_64-linux-debian-lenny.sh +10458130 5.1.3/racket-textual/racket-textual-5.1.3-bin-x86_64-linux-debian-squeeze.sh +10458009 5.1.3/racket-textual/racket-textual-5.1.3-bin-x86_64-linux-f14.sh +10844242 5.1.3/racket-textual/racket-textual-5.1.3-bin-x86_64-osx-mac.dmg +8024578 5.1.3/racket-textual/racket-textual-5.1.3-bin-x86_64-win32.exe +5909369 5.1.3/racket-textual/racket-textual-5.1.3-src-mac.dmg +5795883 5.1.3/racket-textual/racket-textual-5.1.3-src-unix.tgz +6840314 5.1.3/racket-textual/racket-textual-5.1.3-src-win.zip +50047413 5.1.3/racket/racket-5.1.3-bin-i386-linux-f12.sh +50082199 5.1.3/racket/racket-5.1.3-bin-i386-linux-ubuntu-jaunty.sh +51638634 5.1.3/racket/racket-5.1.3-bin-i386-osx-mac.dmg +32548344 5.1.3/racket/racket-5.1.3-bin-i386-win32.exe +49765546 5.1.3/racket/racket-5.1.3-bin-ppc-darwin.sh +52694190 5.1.3/racket/racket-5.1.3-bin-ppc-osx-mac.dmg +50391225 5.1.3/racket/racket-5.1.3-bin-x86_64-linux-debian-lenny.sh +50405579 5.1.3/racket/racket-5.1.3-bin-x86_64-linux-debian-squeeze.sh +50431407 5.1.3/racket/racket-5.1.3-bin-x86_64-linux-f14.sh +51949468 5.1.3/racket/racket-5.1.3-bin-x86_64-osx-mac.dmg +33194397 5.1.3/racket/racket-5.1.3-bin-x86_64-win32.exe +16270003 5.1.3/racket/racket-5.1.3-src-mac.dmg +15939654 5.1.3/racket/racket-5.1.3-src-unix.tgz +19185643 5.1.3/racket/racket-5.1.3-src-win.zip +10661589 5.1/racket-textual/racket-textual-5.1-bin-i386-linux-f12.sh +10674322 5.1/racket-textual/racket-textual-5.1-bin-i386-linux-ubuntu-jaunty.sh +11019666 5.1/racket-textual/racket-textual-5.1-bin-i386-osx-mac.dmg +7899916 5.1/racket-textual/racket-textual-5.1-bin-i386-win32.exe +10627504 5.1/racket-textual/racket-textual-5.1-bin-ppc-darwin.sh +11009730 5.1/racket-textual/racket-textual-5.1-bin-ppc-osx-mac.dmg +10835079 5.1/racket-textual/racket-textual-5.1-bin-x86_64-linux-f14.sh +6064958 5.1/racket-textual/racket-textual-5.1-src-mac.dmg +5945844 5.1/racket-textual/racket-textual-5.1-src-unix.tgz +6071742 5.1/racket-textual/racket-textual-5.1-src-win.zip +51529968 5.1/racket/racket-5.1-bin-i386-linux-f12.sh +51560486 5.1/racket/racket-5.1-bin-i386-linux-ubuntu-jaunty.sh +53300468 5.1/racket/racket-5.1-bin-i386-osx-mac.dmg +33200268 5.1/racket/racket-5.1-bin-i386-win32.exe +51306060 5.1/racket/racket-5.1-bin-ppc-darwin.sh +54367850 5.1/racket/racket-5.1-bin-ppc-osx-mac.dmg +51892721 5.1/racket/racket-5.1-bin-x86_64-linux-f14.sh +16095941 5.1/racket/racket-5.1-src-mac.dmg +15759982 5.1/racket/racket-5.1-src-unix.tgz +17987080 5.1/racket/racket-5.1-src-win.zip From 1012b8a37b3a645d08b41d64f69f397101995e3f Mon Sep 17 00:00:00 2001 From: Ryan Culpepper Date: Fri, 7 Oct 2011 22:09:53 -0600 Subject: [PATCH 337/441] Alpha version number for the v5.2 release --- src/racket/src/schvers.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/racket/src/schvers.h b/src/racket/src/schvers.h index 29428f27d58..10ff176ecbb 100644 --- a/src/racket/src/schvers.h +++ b/src/racket/src/schvers.h @@ -13,12 +13,12 @@ consistently.) */ -#define MZSCHEME_VERSION "5.1.3.12" +#define MZSCHEME_VERSION "5.1.90" #define MZSCHEME_VERSION_X 5 #define MZSCHEME_VERSION_Y 1 -#define MZSCHEME_VERSION_Z 3 -#define MZSCHEME_VERSION_W 12 +#define MZSCHEME_VERSION_Z 90 +#define MZSCHEME_VERSION_W 0 #define MZSCHEME_VERSION_MAJOR ((MZSCHEME_VERSION_X * 100) + MZSCHEME_VERSION_Y) #define MZSCHEME_VERSION_MINOR ((MZSCHEME_VERSION_Z * 1000) + MZSCHEME_VERSION_W) From c056791190501ff7d2f07f3582a5d11349613773 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Sat, 8 Oct 2011 00:32:23 -0400 Subject: [PATCH 338/441] New Racket version 5.1.90. --- src/worksp/gracket/gracket.manifest | 2 +- src/worksp/gracket/gracket.rc | 8 ++++---- src/worksp/mzcom/mzcom.rc | 8 ++++---- src/worksp/mzcom/mzobj.rgs | 6 +++--- src/worksp/racket/racket.manifest | 2 +- src/worksp/racket/racket.rc | 8 ++++---- src/worksp/starters/start.rc | 8 ++++---- 7 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/worksp/gracket/gracket.manifest b/src/worksp/gracket/gracket.manifest index aa1f327b412..d15ace1e258 100644 --- a/src/worksp/gracket/gracket.manifest +++ b/src/worksp/gracket/gracket.manifest @@ -1,6 +1,6 @@ - diff --git a/src/worksp/gracket/gracket.rc b/src/worksp/gracket/gracket.rc index e64320e802f..ae692839f75 100644 --- a/src/worksp/gracket/gracket.rc +++ b/src/worksp/gracket/gracket.rc @@ -17,8 +17,8 @@ APPLICATION ICON DISCARDABLE "gracket.ico" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 5,1,3,12 - PRODUCTVERSION 5,1,3,12 + FILEVERSION 5,1,90,0 + PRODUCTVERSION 5,1,90,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -36,11 +36,11 @@ BEGIN VALUE "CompanyName", "PLT Scheme Inc.\0" VALUE "FileDescription", "Racket GUI application\0" VALUE "InternalName", "GRacket\0" - VALUE "FileVersion", "5, 1, 3, 12\0" + VALUE "FileVersion", "5, 1, 90, 0\0" VALUE "LegalCopyright", "Copyright © 1995-2011\0" VALUE "OriginalFilename", "GRacket.exe\0" VALUE "ProductName", "Racket\0" - VALUE "ProductVersion", "5, 1, 3, 12\0" + VALUE "ProductVersion", "5, 1, 90, 0\0" END END BLOCK "VarFileInfo" diff --git a/src/worksp/mzcom/mzcom.rc b/src/worksp/mzcom/mzcom.rc index 7bf9a4469aa..25e833e816c 100644 --- a/src/worksp/mzcom/mzcom.rc +++ b/src/worksp/mzcom/mzcom.rc @@ -53,8 +53,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 5,1,3,12 - PRODUCTVERSION 5,1,3,12 + FILEVERSION 5,1,90,0 + PRODUCTVERSION 5,1,90,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -70,12 +70,12 @@ BEGIN BLOCK "040904b0" BEGIN VALUE "FileDescription", "MzCOM Module" - VALUE "FileVersion", "5, 1, 3, 12" + VALUE "FileVersion", "5, 1, 90, 0" VALUE "InternalName", "MzCOM" VALUE "LegalCopyright", "Copyright 2000-2011 PLT (Paul Steckler)" VALUE "OriginalFilename", "MzCOM.EXE" VALUE "ProductName", "MzCOM Module" - VALUE "ProductVersion", "5, 1, 3, 12" + VALUE "ProductVersion", "5, 1, 90, 0" END END BLOCK "VarFileInfo" diff --git a/src/worksp/mzcom/mzobj.rgs b/src/worksp/mzcom/mzobj.rgs index f8cee1c81fe..cfd5cff31e1 100644 --- a/src/worksp/mzcom/mzobj.rgs +++ b/src/worksp/mzcom/mzobj.rgs @@ -1,19 +1,19 @@ HKCR { - MzCOM.MzObj.5.1.3.12 = s 'MzObj Class' + MzCOM.MzObj.5.1.90.0 = s 'MzObj Class' { CLSID = s '{A3B0AF9E-2AB0-11D4-B6D2-0060089002FE}' } MzCOM.MzObj = s 'MzObj Class' { CLSID = s '{A3B0AF9E-2AB0-11D4-B6D2-0060089002FE}' - CurVer = s 'MzCOM.MzObj.5.1.3.12' + CurVer = s 'MzCOM.MzObj.5.1.90.0' } NoRemove CLSID { ForceRemove {A3B0AF9E-2AB0-11D4-B6D2-0060089002FE} = s 'MzObj Class' { - ProgID = s 'MzCOM.MzObj.5.1.3.12' + ProgID = s 'MzCOM.MzObj.5.1.90.0' VersionIndependentProgID = s 'MzCOM.MzObj' ForceRemove 'Programmable' LocalServer32 = s '%MODULE%' diff --git a/src/worksp/racket/racket.manifest b/src/worksp/racket/racket.manifest index d625ba26cb0..debfb6c8ab8 100644 --- a/src/worksp/racket/racket.manifest +++ b/src/worksp/racket/racket.manifest @@ -1,6 +1,6 @@ - diff --git a/src/worksp/racket/racket.rc b/src/worksp/racket/racket.rc index de63e9e121d..c9d8703ebf2 100644 --- a/src/worksp/racket/racket.rc +++ b/src/worksp/racket/racket.rc @@ -29,8 +29,8 @@ APPLICATION ICON DISCARDABLE "racket.ico" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 5,1,3,12 - PRODUCTVERSION 5,1,3,12 + FILEVERSION 5,1,90,0 + PRODUCTVERSION 5,1,90,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -48,11 +48,11 @@ BEGIN VALUE "CompanyName", "PLT Scheme Inc.\0" VALUE "FileDescription", "Racket application\0" VALUE "InternalName", "Racket\0" - VALUE "FileVersion", "5, 1, 3, 12\0" + VALUE "FileVersion", "5, 1, 90, 0\0" VALUE "LegalCopyright", "Copyright © 1995-2011\0" VALUE "OriginalFilename", "racket.exe\0" VALUE "ProductName", "Racket\0" - VALUE "ProductVersion", "5, 1, 3, 12\0" + VALUE "ProductVersion", "5, 1, 90, 0\0" END END BLOCK "VarFileInfo" diff --git a/src/worksp/starters/start.rc b/src/worksp/starters/start.rc index 6acde57ee16..da58548d788 100644 --- a/src/worksp/starters/start.rc +++ b/src/worksp/starters/start.rc @@ -22,8 +22,8 @@ APPLICATION ICON DISCARDABLE "mzstart.ico" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 5,1,3,12 - PRODUCTVERSION 5,1,3,12 + FILEVERSION 5,1,90,0 + PRODUCTVERSION 5,1,90,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -45,7 +45,7 @@ BEGIN #ifdef MZSTART VALUE "FileDescription", "Racket Launcher\0" #endif - VALUE "FileVersion", "5, 1, 3, 12\0" + VALUE "FileVersion", "5, 1, 90, 0\0" #ifdef MRSTART VALUE "InternalName", "mrstart\0" #endif @@ -60,7 +60,7 @@ BEGIN VALUE "OriginalFilename", "MzStart.exe\0" #endif VALUE "ProductName", "Racket\0" - VALUE "ProductVersion", "5, 1, 3, 12\0" + VALUE "ProductVersion", "5, 1, 90, 0\0" END END BLOCK "VarFileInfo" From 82b0237cd1bba10548b5c1855fedbd4971527062 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Sat, 8 Oct 2011 04:29:53 -0400 Subject: [PATCH 339/441] Fix version number --- src/racket/src/schvers.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/racket/src/schvers.h b/src/racket/src/schvers.h index 10ff176ecbb..4110525107b 100644 --- a/src/racket/src/schvers.h +++ b/src/racket/src/schvers.h @@ -13,11 +13,11 @@ consistently.) */ -#define MZSCHEME_VERSION "5.1.90" +#define MZSCHEME_VERSION "5.1.900" #define MZSCHEME_VERSION_X 5 #define MZSCHEME_VERSION_Y 1 -#define MZSCHEME_VERSION_Z 90 +#define MZSCHEME_VERSION_Z 900 #define MZSCHEME_VERSION_W 0 #define MZSCHEME_VERSION_MAJOR ((MZSCHEME_VERSION_X * 100) + MZSCHEME_VERSION_Y) From 3fefe33c2ce908cf1dc4fb7b17ea332d402ea258 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Sat, 8 Oct 2011 03:02:20 -0400 Subject: [PATCH 340/441] Typo in error message detection (cherry picked from commit 7d1b00ff697eda9309f29195fb65723320a86ebd) --- collects/meta/web/download/mirror-link.rkt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/collects/meta/web/download/mirror-link.rkt b/collects/meta/web/download/mirror-link.rkt index b5a8e5cfb37..245240e6478 100644 --- a/collects/meta/web/download/mirror-link.rkt +++ b/collects/meta/web/download/mirror-link.rkt @@ -147,10 +147,10 @@ Polling a URL can result in one of four options: (define r (with-handlers ([exn:fail? exn-message]) (call/input-url (string->url url) head-impure-port check-contents))) - (if (boolean? r) - r + (if (string? r) (begin (eprintf "WARNING: failure getting http info for ~a (~a)\n" url r) - #f))) + #f) + r)) (define (verify-ftp url) (define-values [host port? path] From a4ad7349990cb170c4a83377f350a4f455ab07c0 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Sat, 8 Oct 2011 04:35:55 -0400 Subject: [PATCH 341/441] New Racket version 5.1.900. --- src/worksp/gracket/gracket.manifest | 2 +- src/worksp/gracket/gracket.rc | 8 ++++---- src/worksp/mzcom/mzcom.rc | 8 ++++---- src/worksp/mzcom/mzobj.rgs | 6 +++--- src/worksp/racket/racket.manifest | 2 +- src/worksp/racket/racket.rc | 8 ++++---- src/worksp/starters/start.rc | 8 ++++---- 7 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/worksp/gracket/gracket.manifest b/src/worksp/gracket/gracket.manifest index d15ace1e258..c239f9586aa 100644 --- a/src/worksp/gracket/gracket.manifest +++ b/src/worksp/gracket/gracket.manifest @@ -1,6 +1,6 @@ - diff --git a/src/worksp/gracket/gracket.rc b/src/worksp/gracket/gracket.rc index ae692839f75..74e0007f73d 100644 --- a/src/worksp/gracket/gracket.rc +++ b/src/worksp/gracket/gracket.rc @@ -17,8 +17,8 @@ APPLICATION ICON DISCARDABLE "gracket.ico" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 5,1,90,0 - PRODUCTVERSION 5,1,90,0 + FILEVERSION 5,1,900,0 + PRODUCTVERSION 5,1,900,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -36,11 +36,11 @@ BEGIN VALUE "CompanyName", "PLT Scheme Inc.\0" VALUE "FileDescription", "Racket GUI application\0" VALUE "InternalName", "GRacket\0" - VALUE "FileVersion", "5, 1, 90, 0\0" + VALUE "FileVersion", "5, 1, 900, 0\0" VALUE "LegalCopyright", "Copyright © 1995-2011\0" VALUE "OriginalFilename", "GRacket.exe\0" VALUE "ProductName", "Racket\0" - VALUE "ProductVersion", "5, 1, 90, 0\0" + VALUE "ProductVersion", "5, 1, 900, 0\0" END END BLOCK "VarFileInfo" diff --git a/src/worksp/mzcom/mzcom.rc b/src/worksp/mzcom/mzcom.rc index 25e833e816c..b8c2e370c40 100644 --- a/src/worksp/mzcom/mzcom.rc +++ b/src/worksp/mzcom/mzcom.rc @@ -53,8 +53,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 5,1,90,0 - PRODUCTVERSION 5,1,90,0 + FILEVERSION 5,1,900,0 + PRODUCTVERSION 5,1,900,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -70,12 +70,12 @@ BEGIN BLOCK "040904b0" BEGIN VALUE "FileDescription", "MzCOM Module" - VALUE "FileVersion", "5, 1, 90, 0" + VALUE "FileVersion", "5, 1, 900, 0" VALUE "InternalName", "MzCOM" VALUE "LegalCopyright", "Copyright 2000-2011 PLT (Paul Steckler)" VALUE "OriginalFilename", "MzCOM.EXE" VALUE "ProductName", "MzCOM Module" - VALUE "ProductVersion", "5, 1, 90, 0" + VALUE "ProductVersion", "5, 1, 900, 0" END END BLOCK "VarFileInfo" diff --git a/src/worksp/mzcom/mzobj.rgs b/src/worksp/mzcom/mzobj.rgs index cfd5cff31e1..2aba2e1ecbf 100644 --- a/src/worksp/mzcom/mzobj.rgs +++ b/src/worksp/mzcom/mzobj.rgs @@ -1,19 +1,19 @@ HKCR { - MzCOM.MzObj.5.1.90.0 = s 'MzObj Class' + MzCOM.MzObj.5.1.900.0 = s 'MzObj Class' { CLSID = s '{A3B0AF9E-2AB0-11D4-B6D2-0060089002FE}' } MzCOM.MzObj = s 'MzObj Class' { CLSID = s '{A3B0AF9E-2AB0-11D4-B6D2-0060089002FE}' - CurVer = s 'MzCOM.MzObj.5.1.90.0' + CurVer = s 'MzCOM.MzObj.5.1.900.0' } NoRemove CLSID { ForceRemove {A3B0AF9E-2AB0-11D4-B6D2-0060089002FE} = s 'MzObj Class' { - ProgID = s 'MzCOM.MzObj.5.1.90.0' + ProgID = s 'MzCOM.MzObj.5.1.900.0' VersionIndependentProgID = s 'MzCOM.MzObj' ForceRemove 'Programmable' LocalServer32 = s '%MODULE%' diff --git a/src/worksp/racket/racket.manifest b/src/worksp/racket/racket.manifest index debfb6c8ab8..578c3d3385d 100644 --- a/src/worksp/racket/racket.manifest +++ b/src/worksp/racket/racket.manifest @@ -1,6 +1,6 @@ - diff --git a/src/worksp/racket/racket.rc b/src/worksp/racket/racket.rc index c9d8703ebf2..a793e857175 100644 --- a/src/worksp/racket/racket.rc +++ b/src/worksp/racket/racket.rc @@ -29,8 +29,8 @@ APPLICATION ICON DISCARDABLE "racket.ico" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 5,1,90,0 - PRODUCTVERSION 5,1,90,0 + FILEVERSION 5,1,900,0 + PRODUCTVERSION 5,1,900,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -48,11 +48,11 @@ BEGIN VALUE "CompanyName", "PLT Scheme Inc.\0" VALUE "FileDescription", "Racket application\0" VALUE "InternalName", "Racket\0" - VALUE "FileVersion", "5, 1, 90, 0\0" + VALUE "FileVersion", "5, 1, 900, 0\0" VALUE "LegalCopyright", "Copyright © 1995-2011\0" VALUE "OriginalFilename", "racket.exe\0" VALUE "ProductName", "Racket\0" - VALUE "ProductVersion", "5, 1, 90, 0\0" + VALUE "ProductVersion", "5, 1, 900, 0\0" END END BLOCK "VarFileInfo" diff --git a/src/worksp/starters/start.rc b/src/worksp/starters/start.rc index da58548d788..5aec5899259 100644 --- a/src/worksp/starters/start.rc +++ b/src/worksp/starters/start.rc @@ -22,8 +22,8 @@ APPLICATION ICON DISCARDABLE "mzstart.ico" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 5,1,90,0 - PRODUCTVERSION 5,1,90,0 + FILEVERSION 5,1,900,0 + PRODUCTVERSION 5,1,900,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -45,7 +45,7 @@ BEGIN #ifdef MZSTART VALUE "FileDescription", "Racket Launcher\0" #endif - VALUE "FileVersion", "5, 1, 90, 0\0" + VALUE "FileVersion", "5, 1, 900, 0\0" #ifdef MRSTART VALUE "InternalName", "mrstart\0" #endif @@ -60,7 +60,7 @@ BEGIN VALUE "OriginalFilename", "MzStart.exe\0" #endif VALUE "ProductName", "Racket\0" - VALUE "ProductVersion", "5, 1, 90, 0\0" + VALUE "ProductVersion", "5, 1, 900, 0\0" END END BLOCK "VarFileInfo" From c414f057f76c8ba7de2f5caa75595ccc776c07e3 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Sat, 8 Oct 2011 05:16:46 -0400 Subject: [PATCH 342/441] Re-fix version number --- src/racket/src/schvers.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/racket/src/schvers.h b/src/racket/src/schvers.h index 4110525107b..288eb5b9a20 100644 --- a/src/racket/src/schvers.h +++ b/src/racket/src/schvers.h @@ -13,12 +13,12 @@ consistently.) */ -#define MZSCHEME_VERSION "5.1.900" +#define MZSCHEME_VERSION "5.1.900.1" #define MZSCHEME_VERSION_X 5 #define MZSCHEME_VERSION_Y 1 #define MZSCHEME_VERSION_Z 900 -#define MZSCHEME_VERSION_W 0 +#define MZSCHEME_VERSION_W 1 #define MZSCHEME_VERSION_MAJOR ((MZSCHEME_VERSION_X * 100) + MZSCHEME_VERSION_Y) #define MZSCHEME_VERSION_MINOR ((MZSCHEME_VERSION_Z * 1000) + MZSCHEME_VERSION_W) From d91cb717327fe41f759a4faece7b4b6f12a2b2e9 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Sat, 8 Oct 2011 05:17:24 -0400 Subject: [PATCH 343/441] New Racket version 5.1.900.1. --- src/worksp/gracket/gracket.manifest | 2 +- src/worksp/gracket/gracket.rc | 8 ++++---- src/worksp/mzcom/mzcom.rc | 8 ++++---- src/worksp/mzcom/mzobj.rgs | 6 +++--- src/worksp/racket/racket.manifest | 2 +- src/worksp/racket/racket.rc | 8 ++++---- src/worksp/starters/start.rc | 8 ++++---- 7 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/worksp/gracket/gracket.manifest b/src/worksp/gracket/gracket.manifest index c239f9586aa..03c5ce0eaae 100644 --- a/src/worksp/gracket/gracket.manifest +++ b/src/worksp/gracket/gracket.manifest @@ -1,6 +1,6 @@ - diff --git a/src/worksp/gracket/gracket.rc b/src/worksp/gracket/gracket.rc index 74e0007f73d..6236d8fc688 100644 --- a/src/worksp/gracket/gracket.rc +++ b/src/worksp/gracket/gracket.rc @@ -17,8 +17,8 @@ APPLICATION ICON DISCARDABLE "gracket.ico" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 5,1,900,0 - PRODUCTVERSION 5,1,900,0 + FILEVERSION 5,1,900,1 + PRODUCTVERSION 5,1,900,1 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -36,11 +36,11 @@ BEGIN VALUE "CompanyName", "PLT Scheme Inc.\0" VALUE "FileDescription", "Racket GUI application\0" VALUE "InternalName", "GRacket\0" - VALUE "FileVersion", "5, 1, 900, 0\0" + VALUE "FileVersion", "5, 1, 900, 1\0" VALUE "LegalCopyright", "Copyright © 1995-2011\0" VALUE "OriginalFilename", "GRacket.exe\0" VALUE "ProductName", "Racket\0" - VALUE "ProductVersion", "5, 1, 900, 0\0" + VALUE "ProductVersion", "5, 1, 900, 1\0" END END BLOCK "VarFileInfo" diff --git a/src/worksp/mzcom/mzcom.rc b/src/worksp/mzcom/mzcom.rc index b8c2e370c40..531fdf55db7 100644 --- a/src/worksp/mzcom/mzcom.rc +++ b/src/worksp/mzcom/mzcom.rc @@ -53,8 +53,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 5,1,900,0 - PRODUCTVERSION 5,1,900,0 + FILEVERSION 5,1,900,1 + PRODUCTVERSION 5,1,900,1 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -70,12 +70,12 @@ BEGIN BLOCK "040904b0" BEGIN VALUE "FileDescription", "MzCOM Module" - VALUE "FileVersion", "5, 1, 900, 0" + VALUE "FileVersion", "5, 1, 900, 1" VALUE "InternalName", "MzCOM" VALUE "LegalCopyright", "Copyright 2000-2011 PLT (Paul Steckler)" VALUE "OriginalFilename", "MzCOM.EXE" VALUE "ProductName", "MzCOM Module" - VALUE "ProductVersion", "5, 1, 900, 0" + VALUE "ProductVersion", "5, 1, 900, 1" END END BLOCK "VarFileInfo" diff --git a/src/worksp/mzcom/mzobj.rgs b/src/worksp/mzcom/mzobj.rgs index 2aba2e1ecbf..c9eb625c8cb 100644 --- a/src/worksp/mzcom/mzobj.rgs +++ b/src/worksp/mzcom/mzobj.rgs @@ -1,19 +1,19 @@ HKCR { - MzCOM.MzObj.5.1.900.0 = s 'MzObj Class' + MzCOM.MzObj.5.1.900.1 = s 'MzObj Class' { CLSID = s '{A3B0AF9E-2AB0-11D4-B6D2-0060089002FE}' } MzCOM.MzObj = s 'MzObj Class' { CLSID = s '{A3B0AF9E-2AB0-11D4-B6D2-0060089002FE}' - CurVer = s 'MzCOM.MzObj.5.1.900.0' + CurVer = s 'MzCOM.MzObj.5.1.900.1' } NoRemove CLSID { ForceRemove {A3B0AF9E-2AB0-11D4-B6D2-0060089002FE} = s 'MzObj Class' { - ProgID = s 'MzCOM.MzObj.5.1.900.0' + ProgID = s 'MzCOM.MzObj.5.1.900.1' VersionIndependentProgID = s 'MzCOM.MzObj' ForceRemove 'Programmable' LocalServer32 = s '%MODULE%' diff --git a/src/worksp/racket/racket.manifest b/src/worksp/racket/racket.manifest index 578c3d3385d..f9180cc43b9 100644 --- a/src/worksp/racket/racket.manifest +++ b/src/worksp/racket/racket.manifest @@ -1,6 +1,6 @@ - diff --git a/src/worksp/racket/racket.rc b/src/worksp/racket/racket.rc index a793e857175..75b9dfe52f7 100644 --- a/src/worksp/racket/racket.rc +++ b/src/worksp/racket/racket.rc @@ -29,8 +29,8 @@ APPLICATION ICON DISCARDABLE "racket.ico" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 5,1,900,0 - PRODUCTVERSION 5,1,900,0 + FILEVERSION 5,1,900,1 + PRODUCTVERSION 5,1,900,1 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -48,11 +48,11 @@ BEGIN VALUE "CompanyName", "PLT Scheme Inc.\0" VALUE "FileDescription", "Racket application\0" VALUE "InternalName", "Racket\0" - VALUE "FileVersion", "5, 1, 900, 0\0" + VALUE "FileVersion", "5, 1, 900, 1\0" VALUE "LegalCopyright", "Copyright © 1995-2011\0" VALUE "OriginalFilename", "racket.exe\0" VALUE "ProductName", "Racket\0" - VALUE "ProductVersion", "5, 1, 900, 0\0" + VALUE "ProductVersion", "5, 1, 900, 1\0" END END BLOCK "VarFileInfo" diff --git a/src/worksp/starters/start.rc b/src/worksp/starters/start.rc index 5aec5899259..9c7e5f6182c 100644 --- a/src/worksp/starters/start.rc +++ b/src/worksp/starters/start.rc @@ -22,8 +22,8 @@ APPLICATION ICON DISCARDABLE "mzstart.ico" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 5,1,900,0 - PRODUCTVERSION 5,1,900,0 + FILEVERSION 5,1,900,1 + PRODUCTVERSION 5,1,900,1 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -45,7 +45,7 @@ BEGIN #ifdef MZSTART VALUE "FileDescription", "Racket Launcher\0" #endif - VALUE "FileVersion", "5, 1, 900, 0\0" + VALUE "FileVersion", "5, 1, 900, 1\0" #ifdef MRSTART VALUE "InternalName", "mrstart\0" #endif @@ -60,7 +60,7 @@ BEGIN VALUE "OriginalFilename", "MzStart.exe\0" #endif VALUE "ProductName", "Racket\0" - VALUE "ProductVersion", "5, 1, 900, 0\0" + VALUE "ProductVersion", "5, 1, 900, 1\0" END END BLOCK "VarFileInfo" From 239ce3eec043ba86a1ae808dee37065d9592af74 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sat, 8 Oct 2011 06:09:14 -0600 Subject: [PATCH 344/441] another attempt to fix the 64-bit Lion hidden-window problem This fix uses the same`run'-vs-`finishLaunch' technique as before, but patches up the modal-dialog problem by calling `run' again with a callback to start a modal loop. Merge to 5.2. (cherry picked from commit f6e5468dbb85c2ed48178ac43fb25084430413ef) --- collects/mred/private/wx/cocoa/filedialog.rkt | 18 +++++---- collects/mred/private/wx/cocoa/printer-dc.rkt | 9 +++-- collects/mred/private/wx/cocoa/queue.rkt | 40 +++++++++++++++++-- 3 files changed, 52 insertions(+), 15 deletions(-) diff --git a/collects/mred/private/wx/cocoa/filedialog.rkt b/collects/mred/private/wx/cocoa/filedialog.rkt index 904acd7fbef..2afb2781715 100644 --- a/collects/mred/private/wx/cocoa/filedialog.rkt +++ b/collects/mred/private/wx/cocoa/filedialog.rkt @@ -91,14 +91,16 @@ (let ([front (get-front)] [parent (and (version-10.6-or-later?) parent)]) - (when parent - (tellv ns beginSheetModalForWindow: (send parent get-cocoa-window) - completionHandler: #f)) - (begin0 - (tell #:type _NSInteger ns runModal) - (when parent (tell app endSheet: ns)) - (when front (tellv (send front get-cocoa-window) - makeKeyAndOrderFront: #f)))))]) + (call-in-run-loop + (lambda () + (when parent + (tellv ns beginSheetModalForWindow: (send parent get-cocoa-window) + completionHandler: #f)) + (begin0 + (tell #:type _NSInteger ns runModal) + (when parent (tell app endSheet: ns)) + (when front (tellv (send front get-cocoa-window) + makeKeyAndOrderFront: #f)))))))]) (begin0 (if (zero? result) #f diff --git a/collects/mred/private/wx/cocoa/printer-dc.rkt b/collects/mred/private/wx/cocoa/printer-dc.rkt index 2df653c5cc8..10879424c5f 100644 --- a/collects/mred/private/wx/cocoa/printer-dc.rkt +++ b/collects/mred/private/wx/cocoa/printer-dc.rkt @@ -16,7 +16,8 @@ "bitmap.rkt" "cg.rkt" "utils.rkt" - "types.rkt") + "types.rkt" + "queue.rkt") (provide (protect-out printer-dc% @@ -105,8 +106,10 @@ (if (atomically (let ([front (get-front)]) (begin0 - (= (tell #:type _NSInteger (tell NSPageLayout pageLayout) runModalWithPrintInfo: print-info) - NSOkButton) + (call-in-run-loop + (lambda () + (= (tell #:type _NSInteger (tell NSPageLayout pageLayout) runModalWithPrintInfo: print-info) + NSOkButton))) (when front (tellv (send front get-cocoa-window) makeKeyAndOrderFront: #f))))) (begin diff --git a/collects/mred/private/wx/cocoa/queue.rkt b/collects/mred/private/wx/cocoa/queue.rkt index d0ac5d21a38..e455b988af6 100644 --- a/collects/mred/private/wx/cocoa/queue.rkt +++ b/collects/mred/private/wx/cocoa/queue.rkt @@ -21,6 +21,7 @@ set-menu-bar-hooks! set-fixup-window-locations! post-dummy-event + call-in-run-loop try-to-sync-refresh sync-cocoa-events) @@ -30,7 +31,8 @@ queue-event yield) -(import-class NSApplication NSAutoreleasePool NSColor NSProcessInfo NSArray) +(import-class NSApplication NSAutoreleasePool NSColor NSProcessInfo NSArray + NSRunLoop) (import-protocol NSApplicationDelegate) ;; Extreme hackery to hide original arguments from @@ -78,7 +80,11 @@ (queue-file-event (string->path filename))] [-a _void (applicationDidFinishLaunching: [_id notification]) (unless got-file? - (queue-start-empty-event))] + (queue-start-empty-event)) + (tellv app stop: self)] + [-a _void (callbackAndStopLoop) + (run-loop-callback) + (tellv app stop: self)] [-a _BOOL (applicationShouldHandleReopen: [_id app] hasVisibleWindows: [_BOOL has-visible?]) ;; If we have any visible windows, return #t to do the default thing. ;; Otherwise return #f, because we don't want any invisible windows resurrected. @@ -132,7 +138,34 @@ (unless (zero? v) (log-error (format "error from CGDisplayRegisterReconfigurationCallback: ~a" v)))) -(tellv app finishLaunching) +;; To make sure that `finishLaunching' is called, call `run' +;; and have `applicationDidFinishLaunching' quit the run loop. +;; This seems to work better than calling `finishLaunching' +;; directly undet 64-bt Lion, where calling just `finishLaunching' +;; somehow doesn't get the start-up AppleEvents. +(tellv app run) + +;; Use `call-in-run-loop' to run something that needs to be +;; within `run', such as a modal-dialog run loop. It starts +;; a `run' with a high-priority callback to run `thunk', and +;; the run loop is stopped immediately after `thunk' returns. +(define (call-in-run-loop thunk) + (define result #f) + (set! run-loop-callback + (lambda () + (set! run-loop-callback void) + (set! result (thunk)))) + (tellv (tell NSRunLoop currentRunLoop) + performSelector: #:type _SEL (selector callbackAndStopLoop) + target: app-delegate + argument: #f + order: #:type _NSUInteger 0 + modes: (tell NSArray + arrayWithObjects: #:type (_vector i _id) (vector NSDefaultRunLoopMode) + count: #:type _NSUInteger 1)) + (tellv app run) + result) +(define run-loop-callback void) ;; ------------------------------------------------------------ ;; Create an event to post when MzScheme has been sleeping but is @@ -221,7 +254,6 @@ (define kCFSocketReadCallBack 1) -(import-class NSRunLoop) (let* ([rl (tell #:type _CFRunLoopRef (tell NSRunLoop currentRunLoop) getCFRunLoop)] [cfs (CFSocketCreateWithNative (CFAllocatorGetDefault) ready_sock kCFSocketReadCallBack socket_callback sock-context)] From 1d6f193f3178e910f1b563153edc039520020f16 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sat, 8 Oct 2011 06:56:14 -0600 Subject: [PATCH 345/441] windows: add sqlite3.dll Merge to 5.2 (cherry picked from commit 41b18e3608912c68cf9056dc9872937634e15e30) --- collects/meta/build/build | 3 ++- src/get-libs.rkt | 8 +++++++- src/worksp/build.bat | 2 ++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/collects/meta/build/build b/collects/meta/build/build index 5727a29d194..39400647f19 100755 --- a/collects/meta/build/build +++ b/collects/meta/build/build @@ -1427,8 +1427,9 @@ DO_WINDOWS_BUILD() { win_build_step VSNET "mrstart" _cd "$PLTHOME/lib" - win_build_step RKT "get-libs (gui)" ../src/get-libs.rkt core + win_build_step RKT "get-libs (core)" ../src/get-libs.rkt core win_build_step RKT "get-libs (gui)" ../src/get-libs.rkt gui + win_build_step RKT "get-libs (db)" ../src/get-libs.rkt db separator "Windows: Building libraries" _cd "$PLTHOME" diff --git a/src/get-libs.rkt b/src/get-libs.rkt index a59042cee6c..37db6e9c1f3 100644 --- a/src/get-libs.rkt +++ b/src/get-libs.rkt @@ -111,7 +111,13 @@ ["libpangocairo-1.0-0.dll" 185168] ["libpangowin32-1.0-0.dll" 192656] ["libpangoft2-1.0-0.dll" 1188615] - ["libfit.dll" 69120]]])) + ["libfit.dll" 69120]]] + ;; Databse libraries + [db + [win32/i386 + ["sqlite3.dll" 570947]] + [win32/x86_64 + ["sqlite3.dll" 617472]]])) (define-values [package dest-dir] (command-line #:args [package [dest-dir (current-directory)]] diff --git a/src/worksp/build.bat b/src/worksp/build.bat index 054933225ba..0c7be9b7c61 100644 --- a/src/worksp/build.bat +++ b/src/worksp/build.bat @@ -21,6 +21,8 @@ cd .. if errorlevel 1 exit /B 1 ..\..\racket -cu ..\get-libs.rkt gui ..\..\lib if errorlevel 1 exit /B 1 +..\..\racket -cu ..\get-libs.rkt db ..\..\lib +if errorlevel 1 exit /B 1 cd mzstart devenv mzstart.sln /Build "Release|%BUILDMODE%" From 941f18a562c33c4402e79e9c868ae607a1db5632 Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Sat, 8 Oct 2011 08:51:02 -0500 Subject: [PATCH 346/441] adjust the way languages are chosen when opening a file. Specifically, in the case that we're inheriting a language setting from some earlier preference or something and the language we're inheriting is one that saves prefixes, and the current file being opened does not match any of the possible prefixes, then revert to the not-a-language language, instead of using the value from the preference Also: finish the removal of the EoPL language level from the DrRacket langauge dialog, and clean up the 'get guidance' dialog Please cherrypick this commit to the 5.2 release branch (cherry picked from commit d362bda6d3dbc404d33e46d939369b1c213e5141) --- .../private/language-configuration.rkt | 61 ++++++++++--------- collects/drracket/private/unit.rkt | 18 ++++-- collects/eopl/info.rkt | 5 -- 3 files changed, 44 insertions(+), 40 deletions(-) diff --git a/collects/drracket/private/language-configuration.rkt b/collects/drracket/private/language-configuration.rkt index 67a6a001771..468fddb43a6 100644 --- a/collects/drracket/private/language-configuration.rkt +++ b/collects/drracket/private/language-configuration.rkt @@ -560,7 +560,10 @@ (= (length positions) (length numbers)) ((length numbers) . >= . 1)) (error 'drracket:language - "languages position and numbers must be lists of strings and numbers, respectively, must have the same length, and must each contain at least one element, got: ~e ~e" + (string-append + "languages position and numbers must be lists of strings and numbers," + " respectively, must have the same length, and must each contain at" + " least one element, got: ~e ~e") positions numbers)) (when (null? (cdr positions)) @@ -1825,26 +1828,14 @@ [else (string<=? (cadr x) (cadr y))]))))) - (define plt-logo-shiny - (make-object bitmap% (collection-file-path "plt-logo-red-shiny.png" "icons") - 'png/mask)) - (define (display-racketeer) (new canvas-message% (parent racketeer-panel) (label (string-constant racketeer?))) - (new canvas% + (new canvas-message% + [label (read-bitmap (collection-file-path "plt-logo-red-shiny.png" "icons"))] [parent racketeer-panel] - [stretchable-width #f] - [paint-callback - (λ (c dc) - (send dc set-scale 1/2 1/2) - (send dc draw-bitmap plt-logo-shiny 0 0 - 'solid (send the-color-database find-color "black") - (send plt-logo-shiny get-loaded-mask)))] - [style '(transparent)] - [min-width (floor (/ (send plt-logo-shiny get-width) 2))] - [min-height (floor (/ (send plt-logo-shiny get-height) 2))]) + [callback (λ () (change-current-lang-to (λ (x) (is-a? x drracket:module-language:module-language<%>))))]) (new canvas-message% (parent racketeer-panel) (label (string-constant use-language-in-source)) @@ -1907,23 +1898,32 @@ (super on-event evt)])) (define/override (on-paint) - (let* ([dc (get-dc)] - [old-font (send dc get-font)] - [old-tf (send dc get-text-foreground)]) - (send dc set-text-foreground color) - (send dc set-font font) - (send dc draw-text label 0 0 #t) - (send dc set-font old-font) - (send dc set-text-foreground old-tf))) + (define dc (get-dc)) + (cond + [(string? label) + (define old-font (send dc get-font)) + (define old-tf (send dc get-text-foreground)) + (send dc set-text-foreground color) + (send dc set-font font) + (send dc draw-text label 0 0 #t) + (send dc set-font old-font) + (send dc set-text-foreground old-tf)] + [(is-a? label bitmap%) + (send dc draw-bitmap label 0 0)])) (super-new [stretchable-width #f] [stretchable-height #f] [style '(transparent)]) (inherit min-width min-height get-dc) - (let-values ([(w h _1 _2) (send (get-dc) get-text-extent label font #t)]) - (min-width (inexact->exact (floor w))) - (min-height (inexact->exact (floor h)))))) + (cond + [(string? label) + (define-values (w h _1 _2) (send (get-dc) get-text-extent label font #t)) + (min-width (inexact->exact (ceiling w))) + (min-height (inexact->exact (ceiling h)))] + [(is-a? label bitmap%) + (min-width (inexact->exact (ceiling (send label get-width)))) + (min-height (inexact->exact (ceiling (send label get-height))))]))) (define (question/answer line1 line2 icon-lst) (display-two-line-choice @@ -1947,7 +1947,7 @@ (define (get-text-pls info-filename) (let ([proc (get-info/full info-filename)]) (if proc - (let ([qs (proc 'textbook-pls)]) + (let ([qs (proc 'textbook-pls (λ () '()))]) (unless (list? qs) (error 'splash-questions "expected a list, got ~e" qs)) (for-each @@ -1963,7 +1963,10 @@ (andmap string? (cdr pr))) (error 'splash-questions - "expected a list of lists, with each inner list being at least three elements long and the first element of the inner list being a list of strings and the rest of the elements being strings, got ~e" + (string-append + "expected a list of lists, with each inner list being at least three elements long" + " and the first element of the inner list being a list of strings and the rest of" + " the elements being strings, got ~e") pr))) qs) qs) diff --git a/collects/drracket/private/unit.rkt b/collects/drracket/private/unit.rkt index 77eecc548ed..0cce7e97c9b 100644 --- a/collects/drracket/private/unit.rkt +++ b/collects/drracket/private/unit.rkt @@ -609,12 +609,18 @@ module browser threading seems wrong. (drracket:language-configuration:get-languages) module-language module-language-settings)]) - (when matching-language - (set-next-settings - (drracket:language-configuration:language-settings - matching-language - settings) - #f)))) + (cond + [matching-language + (set-next-settings + (drracket:language-configuration:language-settings + matching-language + settings) + #f)] + [else + (when (send (drracket:language-configuration:language-settings-language (get-next-settings)) get-reader-module) + (set-next-settings + (drracket:language-configuration:get-default-language-settings) + #f))]))) (set-modified #f)) (end-edit-sequence) diff --git a/collects/eopl/info.rkt b/collects/eopl/info.rkt index 0857a548142..957181140ae 100644 --- a/collects/eopl/info.rkt +++ b/collects/eopl/info.rkt @@ -4,8 +4,3 @@ (define scribblings '(("eopl.scrbl" () (teaching -20)))) -(define textbook-pls - (list (list '("eopl-small.png" "eopl") - "Essentials of Programming Languages" - (string-constant teaching-languages) - "Essentials of Programming Languages (3rd ed.)"))) From 52e1e8458d2a6fea5a533c60fc2bc8382c43d2e1 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sat, 8 Oct 2011 08:37:09 -0600 Subject: [PATCH 347/441] fix text% `get-paragraph-{start,end}-position' bug and doc bugs Merge to 5.2 (cherry picked from commit 379991c5bbd170085d1abfb7d766efa4f63e7a3c) --- collects/mred/private/wxme/text.rkt | 40 ++++++++++--------- .../scribblings/gui/editor-overview.scrbl | 10 ++--- collects/scribblings/gui/snip-class.scrbl | 4 +- collects/scribblings/gui/text-class.scrbl | 37 ++++++++--------- collects/tests/gracket/wxme.rkt | 16 ++++++++ 5 files changed, 63 insertions(+), 44 deletions(-) diff --git a/collects/mred/private/wxme/text.rkt b/collects/mred/private/wxme/text.rkt index bf1cb2c866c..b2fc7ceba7b 100644 --- a/collects/mred/private/wxme/text.rkt +++ b/collects/mred/private/wxme/text.rkt @@ -3343,25 +3343,27 @@ [any? [visible-only? #t]]) (if (not (check-recalc #f #f #t)) 0 - (let* ([i (max 0 i)] - [l (mline-find-paragraph (unbox line-root-box) i)] - [l (if l - (let loop ([l l]) - (if (and (mline-next l) - (zero? (mline-starts-paragraph (mline-next l)))) - (loop (mline-next l)) - l)) - (if extra-line? - len - last-line))]) - (if (mline? l) - (let ([p (+ (mline-get-position l) (mline-len l))]) - (if visible-only? - (let-boxes ([p p]) - (find-last-visible-position l p) - p) - p)) - l)))) + (if (i . > . (+ (last-paragraph) (if extra-line? -1 0))) + len + (let* ([i (max 0 i)] + [l (mline-find-paragraph (unbox line-root-box) i)] + [l (if l + (let loop ([l l]) + (if (and (mline-next l) + (zero? (mline-starts-paragraph (mline-next l)))) + (loop (mline-next l)) + l)) + (if extra-line? + len + last-line))]) + (if (mline? l) + (let ([p (+ (mline-get-position l) (mline-len l))]) + (if visible-only? + (let-boxes ([p p]) + (find-last-visible-position l p) + p) + p)) + l))))) (def/public (line-paragraph [exact-nonnegative-integer? i]) (cond diff --git a/collects/scribblings/gui/editor-overview.scrbl b/collects/scribblings/gui/editor-overview.scrbl index 8378d16266a..644645480dd 100644 --- a/collects/scribblings/gui/editor-overview.scrbl +++ b/collects/scribblings/gui/editor-overview.scrbl @@ -537,10 +537,10 @@ See also @method[editor<%> write-headers-to-file] and @section[#:tag "editoreol"]{End of Line Ambiguity} Because an editor can force a line break even when there is no - carriage return item, a @techlink{position} alone does not always + newline item, a @techlink{position} alone does not always specify a @techlink{location} for the caret. Consider the last - @techlink{position} of a line that is soft-broken (i.e., no carriage - return is present): there is no @techlink{item} between the last + @techlink{position} of a line that is soft-broken (i.e., no newline + is present): there is no @techlink{item} between the last @techlink{item} of the line and the first @techlink{item} of the next line, so two @techlink{location}s (one end-of-line and one start-of-line) map to the same @techlink{position}. @@ -570,8 +570,8 @@ Text can be extracted from an editor in either of two forms: @item{@deftech{Simple text}, where there is one character per @techlink{item}. @techlink{Item}s that are characters are mapped to themselves, and all other @techlink{item}s are mapped to a - period. Line breaks are represented by carriage-return characters - (ASCII 13).} + period. Line breaks are represented by newline characters + (ASCII 10).} @item{@deftech{Flattened text}, where each @techlink{item} can map to an arbitrary string. @techlink{Item}s that are characters are still diff --git a/collects/scribblings/gui/snip-class.scrbl b/collects/scribblings/gui/snip-class.scrbl index 7df8f280bb9..b139382a001 100644 --- a/collects/scribblings/gui/snip-class.scrbl +++ b/collects/scribblings/gui/snip-class.scrbl @@ -362,8 +362,8 @@ following symbols: @item{@indexed-racket['can-append] --- this snip can be merged with another snip of the same type} - @item{@indexed-racket['invisible] --- the user doesn't ``see'' this snip; - e.g.: a carriage return} + @item{@indexed-racket['invisible] --- an @deftech{invisible} snip + that the user doesn't see, such as a newline} @item{@indexed-racket['hard-newline] --- a newline must follow the snip} diff --git a/collects/scribblings/gui/text-class.scrbl b/collects/scribblings/gui/text-class.scrbl index cf3dcfb5f12..482d3a3072e 100644 --- a/collects/scribblings/gui/text-class.scrbl +++ b/collects/scribblings/gui/text-class.scrbl @@ -163,7 +163,7 @@ Called after the editor's maximum or minimum height or width is after-set-size-constraint] modifies the editor). (This callback method is provided because setting an editor's maximum - width may cause lines to be re-flowed with soft carriage returns.) + width may cause lines to be re-flowed with soft newlines.) See also @method[text% can-set-size-constraint?] and @method[editor<%> on-edit-sequence]. @@ -299,7 +299,7 @@ is changed. If the return value is @racket[#f], then the change will be aborted. (This callback method is provided because setting an editor's maximum -width may cause lines to be re-flowed with soft carriage returns.) +width may cause lines to be re-flowed with soft newlines.) See also @method[text% on-set-size-constraint], @method[text% after-set-size-constraint], and @method[editor<%> on-edit-sequence]. @@ -996,8 +996,8 @@ If @racket[flattened?] is not @racket[#f], then flattened text is returned. text. If @racket[force-cr?] is not @racket[#f] and @racket[flattened?] is not - @racket[#f], then automatic carriage returns (from word-wrapping) are - written into the return string as real carriage returns. + @racket[#f], then automatic newlines (from word-wrapping) are + written into the return string as real newlines. } @@ -1214,9 +1214,9 @@ If there are fewer than @math{@racket[line]-1} lines, the end of the last line is returned. If @racket[line] is less than 0, then the end of the first line is returned. -If the line ends with invisible @techlink{item}s (such as a carriage - return) and @racket[visible?] is not @racket[#f], the first - @techlink{position} before the invisible @techlink{item}s is +If the line ends with @tech{invisible} @techlink{item}s (such as a + newline) and @racket[visible?] is not @racket[#f], the first + @techlink{position} before the @tech{invisible} @techlink{item}s is returned. @LineToPara[@racket[paragraph-end-position]] @@ -1273,8 +1273,8 @@ If there are fewer than @math{@racket[line]-1} lines, the start of the last line is returned. If @racket[line] is less than 0, then the start of the first line is returned. -If the line starts with invisible @techlink{item}s and @racket[visible?] is not - @racket[#f], the first @techlink{position} past the invisible @techlink{item}s is +If the line starts with @tech{invisible} @techlink{item}s and @racket[visible?] is not + @racket[#f], the first @techlink{position} past the @tech{invisible} @techlink{item}s is returned. @LineToPara[@racket[paragraph-start-position]] @@ -1537,7 +1537,7 @@ Called before the editor's maximum or minimum height or width is the change has completed. (This callback method is provided because setting an editor's maximum - width may cause lines to be re-flowed with soft carriage returns.) + width may cause lines to be re-flowed with soft newlines.) See also @method[editor<%> on-edit-sequence]. @@ -1560,7 +1560,7 @@ Returns the ending line of a given paragraph. @|ParagraphNumbering| @|LineNumber @defmethod[(paragraph-end-position [paragraph exact-nonnegative-integer?] - [visible? any/c #f]) + [visible? any/c #t]) exact-nonnegative-integer?]{ Returns the ending @techlink{position} of a given paragraph. @|ParagraphNumbering| @@ -1569,9 +1569,9 @@ If there are fewer than @math{@racket[paragraph]-1} paragraphs, the end of the last paragraph is returned. If @racket[paragraph] is less than 0, then the end of the first paragraph is returned. -If the paragraph ends with invisible @techlink{item}s (such as a carriage - return) and @racket[visible?] is not @racket[#f], the first @techlink{position} - before the invisible @techlink{item}s is returned. +If the paragraph ends with @tech{invisible} @techlink{item}s (such as a newline) + and @racket[visible?] is not @racket[#f], the first @techlink{position} + before the @tech{invisible} @techlink{item}s is returned. } @@ -1589,7 +1589,7 @@ is greater than the highest-numbered paragraph, then the editor's end @defmethod[(paragraph-start-position [paragraph exact-nonnegative-integer?] - [visible? any/c #f]) + [visible? any/c #t]) exact-nonnegative-integer?]{ Returns the starting @techlink{position} of a given paragraph. @|ParagraphNumbering| @@ -1597,8 +1597,8 @@ Returns the starting @techlink{position} of a given paragraph. @|ParagraphNumber If there are fewer than @math{@racket[paragraph]-1} paragraphs, the start of the last paragraph is returned. -If the paragraph starts with invisible @techlink{item}s and @racket[visible?] is - not @racket[#f], the first @techlink{position} past the invisible @techlink{item}s is +If the paragraph starts with @tech{invisible} @techlink{item}s and @racket[visible?] is + not @racket[#f], the first @techlink{position} past the @tech{invisible} @techlink{item}s is returned. } @@ -1887,7 +1887,8 @@ The legal formats are: @itemize[ @item{@racket['standard] --- a standard editor file} @item{@racket['text] --- a text file} -@item{@racket['text-force-cr] --- a text file; when writing, change automatic newlines (from word-wrapping) into real carriage returns} +@item{@racket['text-force-cr] --- a text file; when writing, change +automatic newlines (from word-wrapping) into real newlines} ] @MonitorMethod[@elem{The file format of an editor} @elem{the diff --git a/collects/tests/gracket/wxme.rkt b/collects/tests/gracket/wxme.rkt index 47c2ad33480..2315916b51c 100644 --- a/collects/tests/gracket/wxme.rkt +++ b/collects/tests/gracket/wxme.rkt @@ -1400,4 +1400,20 @@ ;; ---------------------------------------- +(let () + (define t (new text%)) + (send t insert "1\n12\n123\n") + (expect (send t paragraph-start-position 3) 9) + (expect (send t paragraph-end-position 3) 9) + (expect (send t line-end-position 3) 9)) + +(let () + (define t (new text%)) + (send t insert "1\n12\n123\n\n") + (expect (send t paragraph-start-position 3) 9) + (expect (send t paragraph-end-position 3) 9) + (expect (send t line-end-position 3) 9)) + +;; ---------------------------------------- + (done) From c993d856d504b493e8f9fc63c8058029e842768a Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sat, 8 Oct 2011 09:08:01 -0600 Subject: [PATCH 348/441] editor<%> doc fixes (cherry picked from commit ed38297c971b7e5de07e32b1d82e827ce6a8f58f) --- collects/scribblings/gui/editor-intf.scrbl | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/collects/scribblings/gui/editor-intf.scrbl b/collects/scribblings/gui/editor-intf.scrbl index f70f8ccf2e3..4555fda0fd7 100644 --- a/collects/scribblings/gui/editor-intf.scrbl +++ b/collects/scribblings/gui/editor-intf.scrbl @@ -121,11 +121,9 @@ Does nothing. @methspec{ -Called just after the editor is loaded from a file. - -The argument to the method originally specified whether the save was -successful, but failures now trigger exceptions such that the method is -not even called. Consequently, the argument is always @racket[#t]. +Called just after the editor is loaded from a file or during the +exception escape when an attempt to load fails. The @racket[success?] +argument indicates whether the load succeeded. See also @method[editor<%> can-load-file?] and @@ -146,11 +144,9 @@ Does nothing. @methspec{ -Called just after the editor is saved to a file. - -The argument to the method originally specified whether the save was -successful, but failures now trigger exceptions such that the method is -not even called. Consequently, the argument is always @racket[#t]. +Called just after the editor is saved to a file or during the +exception escape when a save fails. The @racket[success?] argument +indicates whether the save succeeded. See also @method[editor<%> can-save-file?] and From fcd5fb9d746bd77def26cd8e92faa219d18c5616 Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Sat, 8 Oct 2011 10:42:32 -0500 Subject: [PATCH 349/441] adjust uses of after-load-file to use the success? flag (cherry picked from commit fcc720f43e7f92063637af65b8c087327908e2ca) --- collects/drracket/private/module-language.rkt | 2 +- collects/framework/private/text.rkt | 34 ++++++++++--------- 2 files changed, 19 insertions(+), 17 deletions(-) diff --git a/collects/drracket/private/module-language.rkt b/collects/drracket/private/module-language.rkt index 70d7c703544..e3cb18b8f37 100644 --- a/collects/drracket/private/module-language.rkt +++ b/collects/drracket/private/module-language.rkt @@ -1519,7 +1519,7 @@ (inner (void) after-delete start end)) (define/augment (after-load-file success?) - (buffer-modified) + (when success? (buffer-modified)) (inner (void) after-load-file success?)) (super-new))) diff --git a/collects/framework/private/text.rkt b/collects/framework/private/text.rkt index 5a1adf88d87..4cfe9f0f12d 100644 --- a/collects/framework/private/text.rkt +++ b/collects/framework/private/text.rkt @@ -295,10 +295,11 @@ (define/augment (after-load-file success?) (inner (void) after-load-file success?) - (set! ranges (make-hash)) - (set! ranges-low 0) - (set! ranges-high 0) - (set! ranges-list #f)) + (when success? + (set! ranges (make-hash)) + (set! ranges-low 0) + (set! ranges-high 0) + (set! ranges-list #f))) (define/public (highlight-range start end color [caret-space? #f] [priority 'low] [style 'rectangle]) (unless (let ([exact-pos-int? @@ -1816,18 +1817,19 @@ (mixin ((class->interface text%)) (crlf-line-endings<%>) (inherit get-filename use-file-text-mode) (define/augment (after-load-file success?) - (cond - [(preferences:get 'framework:always-use-platform-specific-linefeed-convention) - (use-file-text-mode #t)] - [else - (define unix-endings? - (with-handlers ((exn:fail:filesystem? (λ (x) #t))) - (call-with-input-file (get-filename) - (λ (port) - (regexp-match? unix-line-endings-regexp port))))) - (use-file-text-mode - (and (eq? (system-type) 'windows) - (not unix-endings?)))]) + (when success? + (cond + [(preferences:get 'framework:always-use-platform-specific-linefeed-convention) + (use-file-text-mode #t)] + [else + (define unix-endings? + (with-handlers ((exn:fail:filesystem? (λ (x) #t))) + (call-with-input-file (get-filename) + (λ (port) + (regexp-match? unix-line-endings-regexp port))))) + (use-file-text-mode + (and (eq? (system-type) 'windows) + (not unix-endings?)))])) (inner (void) after-load-file success?)) (super-new) From d2204bfd17bc2ec7efd9a1a790c919d9a913f59d Mon Sep 17 00:00:00 2001 From: Stephen Chang Date: Sat, 8 Oct 2011 15:54:09 -0400 Subject: [PATCH 350/441] fix lazy stepper bug: annota of non-identifier fns - fix lazy stepper bug where delaying of non-identifier fns wasnt being properly hidden - add test case for this bug include in 5.2 (cherry picked from commit 79dd7df9451627b206f97ede04ea223516a75088) --- collects/lazy/lazy.rkt | 5 ++++- collects/tests/stepper/automatic-tests.rkt | 2 +- collects/tests/stepper/test-cases.rkt | 12 ++++++++++-- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/collects/lazy/lazy.rkt b/collects/lazy/lazy.rkt index 006a984928b..e302b9a034f 100644 --- a/collects/lazy/lazy.rkt +++ b/collects/lazy/lazy.rkt @@ -78,7 +78,10 @@ (define-syntax (mark-as-lazy-op stx) (syntax-case stx () - [(_ arg) (stepper-add-lazy-op-prop (syntax/loc stx arg))])) + [(_ arg) + (identifier? #'arg) + (stepper-add-lazy-op-prop (syntax/loc stx arg))] + [(_ arg) #'arg])) (define-syntax (hidden-~ stx) (syntax-case stx () diff --git a/collects/tests/stepper/automatic-tests.rkt b/collects/tests/stepper/automatic-tests.rkt index c5d23c8c4f3..dc7a7a750a9 100644 --- a/collects/tests/stepper/automatic-tests.rkt +++ b/collects/tests/stepper/automatic-tests.rkt @@ -23,7 +23,7 @@ lazy-length lazy-list-ref lazy-list-tail lazy-append lazy-reverse lazy-empty? lazy-assoc lazy-assq lazy-assv lazy-cons? lazy-remove lazy-remq lazy-remv lazy-member lazy-memq lazy-memv lazy-filter1 lazy-filter2 lazy-fold - lazy-cyclic1)) + lazy-cyclic1 lazy-fn-app)) (let ((outer-namespace (current-namespace))) (parameterize ([display-only-errors #t] diff --git a/collects/tests/stepper/test-cases.rkt b/collects/tests/stepper/test-cases.rkt index 7eb7984ff78..be305019b33 100644 --- a/collects/tests/stepper/test-cases.rkt +++ b/collects/tests/stepper/test-cases.rkt @@ -2132,8 +2132,16 @@ -> ,def (+ 1 {1}) :: ,def {(+ 1 1)} -> ,def {2})) - - + ; application in function position -- checks bug fix + (let* ([lxx '(lambda (x) x)] + [def `(define I ,lxx)]) + (t 'lazy-fn-app m:lazy + ,def ((I I) I) + :: ,def (({I} I) I) -> ,def (({,lxx} I) I) + :: ,def ((,lxx {I}) I) -> ,def ((,lxx {,lxx}) I) + :: ,def ({(,lxx ,lxx)} I) -> ,def ({,lxx} I) + :: ,def (,lxx {I}) -> ,def (,lxx {,lxx}) + :: ,def {(,lxx ,lxx)} -> ,def {,lxx})) #; From a4a7b80c978a1dfe462009017d1a91961938a895 Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Sat, 8 Oct 2011 16:49:25 -0500 Subject: [PATCH 351/441] avoid calling the show method for tooltips unless the frame is shown. please include in 5.2 (cherry picked from commit 5db48b3e7379e35d84fadb02db0fddd5a3743e90) --- collects/drracket/private/syncheck/gui.rkt | 8 ++++++-- collects/drracket/private/tooltip.rkt | 16 +++++++++------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/collects/drracket/private/syncheck/gui.rkt b/collects/drracket/private/syncheck/gui.rkt index eeb105b19b8..eb30b0c0b89 100644 --- a/collects/drracket/private/syncheck/gui.rkt +++ b/collects/drracket/private/syncheck/gui.rkt @@ -1048,13 +1048,17 @@ If the namespace does not, they are colored the unbound color. ;; and on-paint gets called each time the cursor blinks...) (cond [(not eles) - (when tooltip-frame (send tooltip-frame show #f)) + (when tooltip-frame + (when (send tooltip-frame is-shown?) + (send tooltip-frame show #f))) (set! tooltips-in-sync-with-cursor-eles? #t)] [else (define tooltip-infos (filter tooltip-info? eles)) (cond [(null? tooltip-infos) - (when tooltip-frame (send tooltip-frame show #f)) + (when tooltip-frame + (when (send tooltip-frame is-shown?) + (send tooltip-frame show #f))) (set! tooltips-in-sync-with-cursor-eles? #t)] [else (unless tooltip-frame (set! tooltip-frame (new tooltip-frame%))) diff --git a/collects/drracket/private/tooltip.rkt b/collects/drracket/private/tooltip.rkt index 8b2efd4744a..2dc05e1d06a 100644 --- a/collects/drracket/private/tooltip.rkt +++ b/collects/drracket/private/tooltip.rkt @@ -6,14 +6,16 @@ (define tooltip-frame% (class frame% - (inherit show reflow-container move get-width get-height) + (inherit show reflow-container move get-width get-height is-shown?) + (define/override (on-subwindow-event r evt) - (cond - [(or (send evt entering?) - (send evt button-down?)) - (show #f) - #t] - [else #f])) + (and (is-shown?) + (cond + [(or (send evt entering?) + (send evt button-down?)) + (show #f) + #t] + [else #f]))) (define/public (set-tooltip ls) (send yellow-message set-lab ls)) From e1dfd37f75a5af4262df229bfd9067af0aa8e418 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sat, 8 Oct 2011 16:39:00 -0600 Subject: [PATCH 352/441] fix compiler bug that could cause infinite inlining loop The bug was that a procedure could be incorrectly marked as a "leaf" procedure, which could in turn cause the compiler to keep inlining a very small procedure that calls itself. Closes PR 12270 Merge to 5.2 (cherry picked from commit 1bc80310e3ae54963568238a0595935b2f558708) --- collects/tests/racket/optimize.rktl | 10 ++++++++++ src/racket/src/optimize.c | 20 +++++++++++++------- 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/collects/tests/racket/optimize.rktl b/collects/tests/racket/optimize.rktl index 4cfebc7c419..b7bf2a40286 100644 --- a/collects/tests/racket/optimize.rktl +++ b/collects/tests/racket/optimize.rktl @@ -1654,6 +1654,16 @@ (begin (f) #f)) #f)) +;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Make sure the compiler doesn't end up in an infinite inling loop: + +(module unc-small-self-call racket/base + (define unc1 + (let ([x 1]) + (lambda () + (unc1)))) + (unc1)) + ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (report-errs) diff --git a/src/racket/src/optimize.c b/src/racket/src/optimize.c index 86eaacfcff2..f46924be719 100644 --- a/src/racket/src/optimize.c +++ b/src/racket/src/optimize.c @@ -914,9 +914,9 @@ Scheme_Object *optimize_for_inline(Optimize_Info *info, Scheme_Object *le, int a int offset = 0, single_use = 0, psize = 0; Scheme_Object *bad_app = NULL, *prev = NULL, *orig_le = le; intptr_t prev_offset = 0; - int nested_count = 0, outside_nested = 0, already_opt = optimized_rator; + int nested_count = 0, outside_nested = 0, already_opt = optimized_rator, nonleaf; - if (info->inline_fuel < 0) + if ((info->inline_fuel < 0) && info->has_nonleaf) return NULL; /* Move inside `let' bindings, so we can convert ((let (....) proc) arg ...) @@ -996,7 +996,9 @@ Scheme_Object *optimize_for_inline(Optimize_Info *info, Scheme_Object *le, int a bad_app = le; } - if (le && SAME_TYPE(SCHEME_TYPE(le), scheme_compiled_unclosed_procedure_type)) { + nonleaf = 1; + + if (le && SAME_TYPE(SCHEME_TYPE(le), scheme_compiled_unclosed_procedure_type) && (info->inline_fuel >= 0)) { Scheme_Closure_Data *data = (Scheme_Closure_Data *)le; int sz; @@ -1048,25 +1050,28 @@ Scheme_Object *optimize_for_inline(Optimize_Info *info, Scheme_Object *le, int a return le; } else { LOG_INLINE(fprintf(stderr, "No inline %s\n", scheme_write_to_string(data->name ? data->name : scheme_false, NULL))); - info->has_nonleaf = 1; } } else { LOG_INLINE(fprintf(stderr, "No fuel %s %d[%d]>%d@%d %d\n", scheme_write_to_string(data->name ? data->name : scheme_false, NULL), sz, is_leaf, threshold, info->inline_fuel, info->use_psize)); - info->has_nonleaf = 1; } } else { /* Issue warning below */ bad_app = (Scheme_Object *)data; + nonleaf = 0; } } if (le && SCHEME_PRIMP(le)) { int opt; opt = ((Scheme_Prim_Proc_Header *)le)->flags & SCHEME_PRIM_OPT_MASK; - if (opt >= SCHEME_PRIM_OPT_NONCM) + if (opt >= SCHEME_PRIM_OPT_NONCM) { *_flags = (CLOS_PRESERVES_MARKS | CLOS_SINGLE_RESULT); + if (opt >= SCHEME_PRIM_OPT_IMMEDIATE) { + nonleaf = 0; + } + } } if (le && SCHEME_PROCP(le) && (app || app2 || app3)) { @@ -1074,6 +1079,7 @@ Scheme_Object *optimize_for_inline(Optimize_Info *info, Scheme_Object *le, int a a[0] = le; if (!scheme_check_proc_arity(NULL, argc, 0, 1, a)) { bad_app = le; + nonleaf = 0; } } @@ -1083,7 +1089,7 @@ Scheme_Object *optimize_for_inline(Optimize_Info *info, Scheme_Object *le, int a info->psize += psize; } - if (!le) + if (nonleaf) info->has_nonleaf = 1; if (bad_app) { From bdddffaa9b175339a005a8fdc894d9787d64c341 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sat, 8 Oct 2011 16:47:19 -0600 Subject: [PATCH 353/441] cocoa: fix `show #f' on already unshown frame shows it briefly Merge to 5.2 (cherry picked from commit bf3f09a3c18637b8ebf719f235813c2390ac331e) --- collects/mred/private/wx/cocoa/frame.rkt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/collects/mred/private/wx/cocoa/frame.rkt b/collects/mred/private/wx/cocoa/frame.rkt index ef26252a886..f16baaf0300 100644 --- a/collects/mred/private/wx/cocoa/frame.rkt +++ b/collects/mred/private/wx/cocoa/frame.rkt @@ -324,8 +324,9 @@ (send p set-sheet #f) (tell (tell NSApplication sharedApplication) endSheet: cocoa)))) - (tellv cocoa deminiaturize: #f) - (tellv cocoa orderOut: #f) + (when (is-shown?) ; otherwise, `deminiaturize' can show the window + (tellv cocoa deminiaturize: #f) + (tellv cocoa orderOut: #f)) (force-window-focus))) (register-frame-shown this on?) (let ([num (tell #:type _NSInteger cocoa windowNumber)]) From fd03fb8575990b3a7c31fd5a4c50e7d46c60f72e Mon Sep 17 00:00:00 2001 From: Mike Sperber Date: Sun, 9 Oct 2011 15:21:00 +0200 Subject: [PATCH 354/441] Synch German string constants with latest. (cherry picked from commit 334bf53bb99472ad62cd52ca36f218f505ab8f9b) --- .../string-constants/private/german-string-constants.rkt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/collects/string-constants/private/german-string-constants.rkt b/collects/string-constants/private/german-string-constants.rkt index b901e45303c..edec0f2aaea 100644 --- a/collects/string-constants/private/german-string-constants.rkt +++ b/collects/string-constants/private/german-string-constants.rkt @@ -709,6 +709,11 @@ (clear-current "Dieses löschen") (new-window "Neues Fenster") + ;; popup menu when right-clicking in the gap between + ;; the definitions and interactions window + (change-to-vertical-alignment "Auf vertikal umschalten") + (change-to-horizontal-alignment "Auf horizontal umschalten") + ;;; exiting and quitting ``are you sure'' dialog ;;; exit is used on windows, quit on macos, in English. Other ;;; languages probably use the same word on both platforms. @@ -822,6 +827,7 @@ ;;; edit menu (split-menu-item-label "&Splitten") (collapse-menu-item-label "Einfalten") + (find-longest-line "LĂ€ngste Zeile finden") ;;; language menu (language-menu-name "&Sprache") From 6fe0b3362521075417ca8df3480e7bf2bc4ad050 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sun, 9 Oct 2011 08:51:37 -0600 Subject: [PATCH 355/441] fix ffi retain of callbacks The FFI's weak table of callback procedures (to map Racket procedures to FFI callback objects) suffered from the classic key-in-value problem. Closes PR 12228, probably Merge to 5.2 (cherry picked from commit 8bd81f48062ef2295d95f01422d8c73aef355053) --- collects/ffi/unsafe.rkt | 2 +- collects/ffi/unsafe/try-atomic.rkt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/collects/ffi/unsafe.rkt b/collects/ffi/unsafe.rkt index 5852cf7c8fc..93bb391f85a 100644 --- a/collects/ffi/unsafe.rkt +++ b/collects/ffi/unsafe.rkt @@ -446,7 +446,7 @@ (lambda (x) (and x (let ([cb (ffi-callback (wrap x) itypes otype abi atomic? async-apply)]) - (cond [(eq? keep #t) (hash-set! held-callbacks x cb)] + (cond [(eq? keep #t) (hash-set! held-callbacks x (make-ephemeron x cb))] [(box? keep) (let ([x (unbox keep)]) (set-box! keep diff --git a/collects/ffi/unsafe/try-atomic.rkt b/collects/ffi/unsafe/try-atomic.rkt index 68f2f090438..c0c860e45de 100644 --- a/collects/ffi/unsafe/try-atomic.rkt +++ b/collects/ffi/unsafe/try-atomic.rkt @@ -67,7 +67,7 @@ (define (can-try-atomic?) (and (freezer-box) (not (in-try-atomic?)))) ;; prevent GC of handler while it's installed: -(define saved-ptrs (make-hash)) +(define saved-ptrs (make-hasheq)) (define (try-atomic thunk default #:should-give-up? [should-give-up? From 74846d068498690ba7ebd195f3ab2b6d555faa4b Mon Sep 17 00:00:00 2001 From: Sam Tobin-Hochstadt Date: Sat, 1 Oct 2011 11:20:27 -0400 Subject: [PATCH 356/441] Change basic-top-level-window% to support `set-icon', and use to set icon for splash screen. Closes 12241 Merge to 5.2 (cherry picked from commit 1b69d742bd7b895ce44c8ed21ffcbaa7caeebf93) --- collects/framework/splash.rkt | 7 +++---- collects/mred/private/mrtop.rkt | 10 +++++----- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/collects/framework/splash.rkt b/collects/framework/splash.rkt index 42bd77178ef..9d47d09078f 100644 --- a/collects/framework/splash.rkt +++ b/collects/framework/splash.rkt @@ -155,14 +155,13 @@ (send (get-gauge) set-range splash-max-width) (send splash-tlw set-label splash-title) - #; ;; commented out because dialogs don't accept set-icon (when frame-icon (if (pair? frame-icon) - (let ([small (car icon)] - [large (cdr icon)]) + (let ([small (car frame-icon)] + [large (cdr frame-icon)]) (send splash-tlw set-icon small (send small get-loaded-mask) 'small) (send splash-tlw set-icon large (send large get-loaded-mask) 'large)) - (send splash-tlw set-icon frame-icon (send icon get-loaded-mask) 'both))) + (send splash-tlw set-icon frame-icon (send frame-icon get-loaded-mask) 'both))) (cond [(or (path? splash-draw-spec) diff --git a/collects/mred/private/mrtop.rkt b/collects/mred/private/mrtop.rkt index 4fb5a7f78b7..92664d70301 100644 --- a/collects/mred/private/mrtop.rkt +++ b/collects/mred/private/mrtop.rkt @@ -85,6 +85,10 @@ [can-exit? (lambda () (can-close?))] [on-exit (lambda () (on-close) (show #f))] [on-activate (lambda (x) (void))] + [set-icon (case-lambda + [(i) (send wx set-icon i)] + [(i b) (send wx set-icon i b)] + [(i b l?) (send wx set-icon i b l?)])] [center (entry-point (case-lambda [() (send wx center 'both)] @@ -185,11 +189,7 @@ [set-status-text (lambda (s) (do-set-status-text s))] [has-status-line? (lambda () status-line?)] [iconize (entry-point (lambda (on?) (send wx iconize on?)))] - [is-iconized? (entry-point (lambda () (send wx iconized?)))] - [set-icon (case-lambda - [(i) (send wx set-icon i)] - [(i b) (send wx set-icon i b)] - [(i b l?) (send wx set-icon i b l?)])] + [is-iconized? (entry-point (lambda () (send wx iconized?)))] [maximize (entry-point (lambda (on?) (send wx position-for-initial-show) (send wx maximize on?)))] [is-maximized? (entry-point (lambda () (send wx is-maximized?)))] [get-menu-bar (entry-point (lambda () (let ([mb (send wx get-the-menu-bar)]) From 78c38d42b650e635115db1ef637f5327749b6015 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sun, 9 Oct 2011 09:45:42 -0600 Subject: [PATCH 357/441] docs and release notes for `set-icon' change Merge to 5.2 (cherry picked from commit 8f0fa96d699fd304b32e9cb00db8cc18220f58ee) --- collects/scribblings/gui/frame-class.scrbl | 38 ------------------- .../gui/top-level-window-intf.scrbl | 38 +++++++++++++++++++ doc/release-notes/racket/HISTORY.txt | 2 + 3 files changed, 40 insertions(+), 38 deletions(-) diff --git a/collects/scribblings/gui/frame-class.scrbl b/collects/scribblings/gui/frame-class.scrbl index ce2eaec33d7..515305f9be3 100644 --- a/collects/scribblings/gui/frame-class.scrbl +++ b/collects/scribblings/gui/frame-class.scrbl @@ -227,44 +227,6 @@ On Mac OS X, called when the user clicks the toolbar button on a } -@defmethod[(set-icon [icon (is-a?/c bitmap%)] - [mask (is-a?/c bitmap%) #f] - [which (one-of/c 'small 'large 'both) 'both]) - void?]{ - -Sets the large or small icon bitmap for this frame. Future changes to - the bitmap do not affect the frame's icon. - -The icon is used in a platform-specific way: - -@itemize[ - - @item{Windows --- the small icon is used for the frame's icon (in the - top-left) and in the task bar, and the large icon is used for - the Alt-Tab task switcher.} - - @item{Mac OS X --- both icons are ignored.} - - @item{Unix --- many window managers use the small icon in the same way - as Windows, and others use the small icon when iconifying the - frame; the large icon is ignored.} - -] - -The bitmap for either icon can be any size, but most platforms scale - the small bitmap to 16 by 16 pixels and the large bitmap to 32 by 32 - pixels. - -If a mask bitmap is not provided, then the entire (rectangular) bitmap - is used as an icon. - -If a mask bitmap is provided, the mask must be monochrome. In the mask - bitmap, use black pixels to indicate the icon's region and use white - pixels outside the icon's region. In the icon bitmap, use black - pixels for the region outside the icon. - -} - @defmethod[(set-status-text [text string?]) void?]{ diff --git a/collects/scribblings/gui/top-level-window-intf.scrbl b/collects/scribblings/gui/top-level-window-intf.scrbl index 8825ced0054..d097f85a432 100644 --- a/collects/scribblings/gui/top-level-window-intf.scrbl +++ b/collects/scribblings/gui/top-level-window-intf.scrbl @@ -312,6 +312,44 @@ Sets the size of the window (in pixels), but only if the given size is } + +@defmethod[(set-icon [icon (is-a?/c bitmap%)] + [mask (is-a?/c bitmap%) #f] + [which (one-of/c 'small 'large 'both) 'both]) + void?]{ + +Sets the large or small icon bitmap for the window. Future changes to + the bitmap do not affect the window's icon. + +The icon is used in a platform-specific way: + +@itemize[ + + @item{Windows --- the small icon is used for the window's icon (in the + top-left) and in the task bar, and the large icon is used for + the Alt-Tab task switcher.} + + @item{Mac OS X --- both icons are ignored.} + + @item{Unix --- many window managers use the small icon in the same way + as Windows, and others use the small icon when iconifying the + frame; the large icon is ignored.} + +] + +The bitmap for either icon can be any size, but most platforms scale + the small bitmap to 16 by 16 pixels and the large bitmap to 32 by 32 + pixels. + +If a mask bitmap is not provided, then the entire (rectangular) bitmap + is used as an icon. + +If a mask bitmap is provided, the mask must be monochrome. In the mask + bitmap, use black pixels to indicate the icon's region and use white + pixels outside the icon's region. In the icon bitmap, use black + pixels for the region outside the icon.} + + @defmethod[(show [show any/c]) void?]{ diff --git a/doc/release-notes/racket/HISTORY.txt b/doc/release-notes/racket/HISTORY.txt index cbbc486823c..cc8550b0c02 100644 --- a/doc/release-notes/racket/HISTORY.txt +++ b/doc/release-notes/racket/HISTORY.txt @@ -1,5 +1,7 @@ Version 5.1.3.12 Removed built-in support for Honu reading and printing +racket/gui: moved set-icon method from frame% to + top-level-window<%> Version 5.1.3.11 Added exn:fail:syntax:unbound From 187c9a18b7b352bacc6f1bd292c3b47e809353db Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sun, 9 Oct 2011 10:34:40 -0600 Subject: [PATCH 358/441] fix QNX sconfig entry Merge to 5.2 (cherry picked from commit e2bcbb0dfbfc05d759874318710285a08e9b13dc) --- src/racket/sconfig.h | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/src/racket/sconfig.h b/src/racket/sconfig.h index bf110ef2e4e..917ea70455f 100644 --- a/src/racket/sconfig.h +++ b/src/racket/sconfig.h @@ -933,17 +933,29 @@ #endif - /***************************************************/ - -#endif /* end not OSKit */ + /************ QNX *************/ #if defined(__QNX__) + +# define SCHEME_PLATFORM_LIBRARY_SUBPATH "i386-qnx" + +# include "uconfig.h" +# define SIGSET_IS_SIGNAL +# define SIGSET_NEEDS_REINSTALL + # define USE_FCNTL_O_NONBLOCK -# define SCHEME_PLATFORM_LIBRARY_SUBPATH "i386-QNX" + # define ASSUME_FIXED_STACK_SIZE # define FIXED_STACK_SIZE 524288 + +# define FLAGS_ALREADY_SET + #endif + /***************************************************/ + +#endif /* end not OSKit */ + /************** (END KNOWN ARCHITECTURE/SYSTEMS) ****************/ From 2fec3dd8f6d64fcd70ddbab73912d5c8a6b6f759 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sun, 9 Oct 2011 10:34:56 -0600 Subject: [PATCH 359/441] mark OS jmpbuf as GC-ignored This change is intended to make the QNX port work, but it should also future-proof Racket a little for other platforms. (cherry picked from commit b377cafdac9a4496e443275d4fb9ed91c4c6f4e0) --- collects/compiler/private/xform.rkt | 1 + src/racket/include/scheme.h | 35 ++++++++++++++++------------- 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/collects/compiler/private/xform.rkt b/collects/compiler/private/xform.rkt index 5f9890135f5..a7b131a535f 100644 --- a/collects/compiler/private/xform.rkt +++ b/collects/compiler/private/xform.rkt @@ -719,6 +719,7 @@ (printf "#define NULL_OUT_ARRAY(a) memset(a, 0, sizeof(a))\n") ;; Annotation that normally disappears: (printf "#define GC_CAN_IGNORE /**/\n") + (printf "#define XFORM_CAN_IGNORE /**/\n") (printf "#define __xform_nongcing__ /**/\n") ;; Another annotation to protect against GC conversion: (printf "#define HIDE_FROM_XFORM(x) x\n") diff --git a/src/racket/include/scheme.h b/src/racket/include/scheme.h index 27b01cee454..3aa17d44975 100644 --- a/src/racket/include/scheme.h +++ b/src/racket/include/scheme.h @@ -181,6 +181,25 @@ typedef struct FSSpec mzFSSpec; # endif #endif +#ifdef MZ_PRECISE_GC +# ifndef MZ_XFORM +# define XFORM_SKIP_PROC /* empty */ +# define XFORM_CAN_IGNORE /**/ +# endif +#else +# define XFORM_HIDE_EXPR(x) x +# define XFORM_START_SKIP /**/ +# define XFORM_END_SKIP /**/ +# define XFORM_START_SUSPEND /**/ +# define XFORM_END_SUSPEND /**/ +# define XFORM_SKIP_PROC /**/ +# define XFORM_START_TRUST_ARITH /**/ +# define XFORM_END_TRUST_ARITH /**/ +# define XFORM_CAN_IGNORE /**/ +# define XFORM_TRUST_PLUS + +# define XFORM_TRUST_MINUS - +#endif + /* PPC Linux plays a slimy trick: it defines strcpy() as a macro that uses __extension__. This breaks the 3m xform. */ #if defined(MZ_XFORM) && defined(strcpy) @@ -875,7 +894,7 @@ typedef mz_one_jit_jmp_buf mz_jit_jmp_buf[1]; #ifdef MZ_PRECISE_GC typedef struct { - mz_jit_jmp_buf jb; + XFORM_CAN_IGNORE mz_jit_jmp_buf jb; intptr_t gcvs; /* declared as `intptr_t' to hide pointer from 3m xform */ intptr_t gcvs_cnt; } mz_jmp_buf; @@ -1696,9 +1715,6 @@ extern void *scheme_malloc_envunbox(size_t); # define MZ_GC_REG() (__gc_var_stack__[0] = GC_variable_stack, \ GC_variable_stack = __gc_var_stack__) # define MZ_GC_UNREG() (GC_variable_stack = (void **)__gc_var_stack__[0]) -# ifndef MZ_XFORM -# define XFORM_SKIP_PROC /* empty */ -# endif #else # define MZ_GC_DECL_REG(size) /* empty */ # define MZ_GC_VAR_IN_REG(x, v) /* empty */ @@ -1706,17 +1722,6 @@ extern void *scheme_malloc_envunbox(size_t); # define MZ_GC_NO_VAR_IN_REG(x) /* empty */ # define MZ_GC_REG() /* empty */ # define MZ_GC_UNREG() /* empty */ -# define XFORM_HIDE_EXPR(x) x -# define XFORM_START_SKIP /**/ -# define XFORM_END_SKIP /**/ -# define XFORM_START_SUSPEND /**/ -# define XFORM_END_SUSPEND /**/ -# define XFORM_SKIP_PROC /**/ -# define XFORM_START_TRUST_ARITH /**/ -# define XFORM_END_TRUST_ARITH /**/ -# define XFORM_CAN_IGNORE /**/ -# define XFORM_TRUST_PLUS + -# define XFORM_TRUST_MINUS - #endif /*========================================================================*/ From 09e236caafbfc44901ad3a575253ce08646ca563 Mon Sep 17 00:00:00 2001 From: Matthias Felleisen Date: Sun, 9 Oct 2011 20:16:17 -0400 Subject: [PATCH 360/441] history for release (cherry picked from commit 051649fc13e92d114b6dbb25e08eddc5e2e44697) --- doc/release-notes/teachpack/HISTORY.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/release-notes/teachpack/HISTORY.txt b/doc/release-notes/teachpack/HISTORY.txt index 4954df644d7..6b3dd4925d3 100644 --- a/doc/release-notes/teachpack/HISTORY.txt +++ b/doc/release-notes/teachpack/HISTORY.txt @@ -43,7 +43,7 @@ Version 5.0 [Fri May 28 13:43:21 EDT 2010] * added to-draw to universe to prepare the switch to the new terminoloy ------------------------------------------------------------------------ -Versin 4.2.5 [Fri Mar 26 10:02:11 EDT 2010] +Version 4.2.5 [Fri Mar 26 10:02:11 EDT 2010] * "release" is no longer a key event; use "release" handler instead From 0aa9f436afd8511f464791ee93645c172788fd92 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sun, 9 Oct 2011 19:29:21 -0600 Subject: [PATCH 361/441] fix compiler confusion: non-mutating vs reorderable unsafe ops Reordering `unsafe-vector-ref' past an `unsafe-vector-set!' was particularly bad. Meanwhile, some non-mutating operations like `unsafe-mcar' were treated too conservatively. Merge to 5.2 (cherry picked from commit c805728d3e603cd71865e886baf5bcbdeb0a1dbe) --- collects/tests/racket/optimize.rktl | 61 +++++++++++++++++++++++++++++ src/racket/include/scheme.h | 14 +++---- src/racket/src/jit.c | 11 ++++-- src/racket/src/jitcommon.c | 14 +++---- src/racket/src/jitinline.c | 14 +++---- src/racket/src/list.c | 12 ++++-- src/racket/src/number.c | 10 ++--- src/racket/src/optimize.c | 24 ++++++------ src/racket/src/print.c | 12 +++++- src/racket/src/struct.c | 45 ++++++++++++--------- src/racket/src/vector.c | 14 +++---- 11 files changed, 158 insertions(+), 73 deletions(-) diff --git a/collects/tests/racket/optimize.rktl b/collects/tests/racket/optimize.rktl index b7bf2a40286..97e1730007b 100644 --- a/collects/tests/racket/optimize.rktl +++ b/collects/tests/racket/optimize.rktl @@ -1372,6 +1372,67 @@ (require racket/bool) (list #t))) +;; check omit & reorder possibilities for unsafe +;; operations on mutable values: +(let () + (define (check-omit-ok expr [yes? #t]) + ;; can omit: + (test-comp `(module m racket/base + (require racket/unsafe/ops) + (define (f x) + (f x))) + `(module m racket/base + (require racket/unsafe/ops) + (define (f x) + ,expr + (f x))) + yes?) + ;; cannot reorder: + (test-comp `(module m racket/base + (require racket/unsafe/ops) + (define (f x) + (let ([y ,expr]) + (vector-ref x x) + (f x y)))) + `(module m racket/base + (require racket/unsafe/ops) + (define (f x) + (vector-ref x x) + (f x ,expr))) + #f)) + (map check-omit-ok + '((unsafe-vector-ref x x) + (unsafe-vector*-ref x x) + (unsafe-struct-ref x x) + (unsafe-struct*-ref x x) + (unsafe-mcar x) + (unsafe-mcdr x) + (unsafe-unbox x) + (unsafe-unbox* x) + (unsafe-bytes-ref x x) + (unsafe-string-ref x x) + (unsafe-flvector-ref x x) + (unsafe-fxvector-ref x x) + (unsafe-f64vector-ref x x) + (unsafe-s16vector-ref x x) + (unsafe-u16vector-ref x x))) + (map (lambda (x) (check-omit-ok x #f)) + '((unsafe-vector-set! x x x) + (unsafe-vector*-set! x x x) + (unsafe-struct-set! x x x) + (unsafe-struct*-set! x x x) + (unsafe-set-mcar! x x) + (unsafe-set-mcdr! x x) + (unsafe-set-box! x x) + (unsafe-set-box*! x x) + (unsafe-bytes-set! x x x) + (unsafe-string-set! x x x) + (unsafe-flvector-set! x x x) + (unsafe-fxvector-set! x x x) + (unsafe-f64vector-set! x x x) + (unsafe-s16vector-set! x x x) + (unsafe-u16vector-set! x x x)))) + ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Check bytecode verification of lifted functions diff --git a/src/racket/include/scheme.h b/src/racket/include/scheme.h index 3aa17d44975..2f7d45efc36 100644 --- a/src/racket/include/scheme.h +++ b/src/racket/include/scheme.h @@ -657,10 +657,9 @@ typedef struct Scheme_Offset_Cptr Do not use them directly. */ #define SCHEME_PRIM_OPT_MASK (1 | 2) #define SCHEME_PRIM_IS_PRIMITIVE 4 -#define SCHEME_PRIM_IS_STRUCT_INDEXED_GETTER 8 -#define SCHEME_PRIM_IS_STRUCT_PRED 16 -#define SCHEME_PRIM_IS_STRUCT_OTHER 32 -#define SCHEME_PRIM_OTHER_TYPE_MASK (64 | 128 | 256) +#define SCHEME_PRIM_IS_UNSAFE_OMITABLE 8 +#define SCHEME_PRIM_IS_STRUCT_OTHER 16 +#define SCHEME_PRIM_OTHER_TYPE_MASK (32 | 64 | 128 | 256) #define SCHEME_PRIM_IS_MULTI_RESULT 512 #define SCHEME_PRIM_IS_BINARY_INLINED 1024 #define SCHEME_PRIM_IS_UNSAFE_FUNCTIONAL 2048 @@ -682,9 +681,9 @@ typedef struct Scheme_Offset_Cptr #define SCHEME_PRIM_TYPE_PARAMETER 64 #define SCHEME_PRIM_TYPE_STRUCT_PROP_GETTER (64 | 128) #define SCHEME_PRIM_SOMETIMES_INLINED (64 | 256) -#define SCHEME_PRIM_TYPE_STRUCT_PROP_PRED (64 | 128 | 256) - -#define SCHEME_PRIM_IS_STRUCT_PROC (SCHEME_PRIM_IS_STRUCT_INDEXED_GETTER | SCHEME_PRIM_IS_STRUCT_PRED | SCHEME_PRIM_IS_STRUCT_OTHER) +#define SCHEME_PRIM_STRUCT_TYPE_STRUCT_PROP_PRED (64 | 128 | 256) +#define SCHEME_PRIM_STRUCT_TYPE_INDEXED_GETTER 32 +#define SCHEME_PRIM_STRUCT_TYPE_PRED (32 | 64) #define SCHEME_PRIM_PROC_FLAGS(x) (((Scheme_Prim_Proc_Header *)x)->flags) @@ -811,7 +810,6 @@ typedef struct { #define SCHEME_ECONTP(obj) SAME_TYPE(SCHEME_TYPE(obj), scheme_escaping_cont_type) #define SCHEME_CONT_MARK_SETP(obj) SAME_TYPE(SCHEME_TYPE(obj), scheme_cont_mark_set_type) #define SCHEME_PROC_STRUCTP(obj) SAME_TYPE(SCHEME_TYPE(obj), scheme_proc_struct_type) -#define SCHEME_STRUCT_PROCP(obj) (SCHEME_PRIMP(obj) && (((Scheme_Primitive_Proc *)(obj))->pp.flags & SCHEME_PRIM_IS_STRUCT_PROC)) #define SCHEME_CLOSUREP(obj) (SAME_TYPE(SCHEME_TYPE(obj), scheme_closure_type) || SAME_TYPE(SCHEME_TYPE(obj), scheme_case_closure_type)) #define SCHEME_PRIM(obj) (((Scheme_Primitive_Proc *)(obj))->prim_val) diff --git a/src/racket/src/jit.c b/src/racket/src/jit.c index 3354e60be74..7554ef39bf2 100644 --- a/src/racket/src/jit.c +++ b/src/racket/src/jit.c @@ -495,10 +495,15 @@ int scheme_is_noncm(Scheme_Object *a, mz_jit_state *jitter, int depth, int stack if (SCHEME_PRIMP(a)) { int opts; opts = ((Scheme_Prim_Proc_Header *)a)->flags & SCHEME_PRIM_OPT_MASK; - if (opts >= SCHEME_PRIM_OPT_NONCM) + if (opts >= SCHEME_PRIM_OPT_NONCM) { /* Structure-type predicates are handled specially, so don't claim NONCM: */ - if (!(((Scheme_Prim_Proc_Header *)a)->flags & SCHEME_PRIM_IS_STRUCT_PRED)) - return 1; + if (((Scheme_Prim_Proc_Header *)a)->flags & SCHEME_PRIM_IS_STRUCT_OTHER) { + if ((((Scheme_Prim_Proc_Header *)a)->flags & SCHEME_PRIM_OTHER_TYPE_MASK) + == SCHEME_PRIM_STRUCT_TYPE_PRED) + return 0; + } + return 1; + } } if (depth diff --git a/src/racket/src/jitcommon.c b/src/racket/src/jitcommon.c index 53b2dd61e97..55722efadbf 100644 --- a/src/racket/src/jitcommon.c +++ b/src/racket/src/jitcommon.c @@ -1552,14 +1552,12 @@ static int common4(mz_jit_state *jitter, void *_data) mz_patch_branch(ref); (void)mz_bnei_t(refslow, JIT_R0, scheme_prim_type, JIT_R2); jit_ldxi_s(JIT_R2, JIT_R0, &((Scheme_Primitive_Proc *)0x0)->pp.flags); - if (kind == 3) { - jit_andi_i(JIT_R2, JIT_R2, SCHEME_PRIM_OTHER_TYPE_MASK); - (void)jit_bnei_i(refslow, JIT_R2, SCHEME_PRIM_STRUCT_TYPE_INDEXED_SETTER); - } else { - (void)jit_bmci_i(refslow, JIT_R2, ((kind == 1) - ? SCHEME_PRIM_IS_STRUCT_PRED - : SCHEME_PRIM_IS_STRUCT_INDEXED_GETTER)); - } + jit_andi_i(JIT_R2, JIT_R2, SCHEME_PRIM_OTHER_TYPE_MASK); + (void)jit_bnei_i(refslow, JIT_R2, ((kind == 3) + ? SCHEME_PRIM_STRUCT_TYPE_INDEXED_SETTER + : ((kind == 1) + ? SCHEME_PRIM_STRUCT_TYPE_PRED + : SCHEME_PRIM_STRUCT_TYPE_INDEXED_GETTER))); CHECK_LIMIT(); /* Check argument: */ if (kind == 1) { diff --git a/src/racket/src/jitinline.c b/src/racket/src/jitinline.c index 55754bfaf34..e0ab079d2f3 100644 --- a/src/racket/src/jitinline.c +++ b/src/racket/src/jitinline.c @@ -109,15 +109,15 @@ static int check_val_struct_prim(Scheme_Object *p, int arity) { if (p && SCHEME_PRIMP(p)) { if (arity == 1) { - if (((Scheme_Primitive_Proc *)p)->pp.flags & SCHEME_PRIM_IS_STRUCT_PRED) - return 1; - else if (((Scheme_Primitive_Proc *)p)->pp.flags & SCHEME_PRIM_IS_STRUCT_INDEXED_GETTER) - return 2; - else if (((Scheme_Primitive_Proc *)p)->pp.flags & SCHEME_PRIM_IS_STRUCT_OTHER) { + if (((Scheme_Primitive_Proc *)p)->pp.flags & SCHEME_PRIM_IS_STRUCT_OTHER) { int t = (((Scheme_Primitive_Proc *)p)->pp.flags & SCHEME_PRIM_OTHER_TYPE_MASK); - if (t == SCHEME_PRIM_TYPE_STRUCT_PROP_GETTER) + if (t == SCHEME_PRIM_STRUCT_TYPE_PRED) + return 1; + if (t == SCHEME_PRIM_STRUCT_TYPE_INDEXED_GETTER) + return 2; + else if (t == SCHEME_PRIM_TYPE_STRUCT_PROP_GETTER) return 4; - else if (t == SCHEME_PRIM_TYPE_STRUCT_PROP_PRED) + else if (t == SCHEME_PRIM_STRUCT_TYPE_STRUCT_PROP_PRED) return 6; } } else if (arity == 2) { diff --git a/src/racket/src/list.c b/src/racket/src/list.c index be7e3cd2dde..e404edd4501 100644 --- a/src/racket/src/list.c +++ b/src/racket/src/list.c @@ -746,11 +746,13 @@ scheme_init_unsafe_list (Scheme_Env *env) scheme_add_global_constant ("unsafe-list-tail", p, env); p = scheme_make_immed_prim(unsafe_mcar, "unsafe-mcar", 1, 1); - SCHEME_PRIM_PROC_FLAGS(p) |= SCHEME_PRIM_IS_UNARY_INLINED; + SCHEME_PRIM_PROC_FLAGS(p) |= (SCHEME_PRIM_IS_UNARY_INLINED + | SCHEME_PRIM_IS_UNSAFE_OMITABLE); scheme_add_global_constant ("unsafe-mcar", p, env); p = scheme_make_immed_prim(unsafe_mcdr, "unsafe-mcdr", 1, 1); - SCHEME_PRIM_PROC_FLAGS(p) |= SCHEME_PRIM_IS_UNARY_INLINED; + SCHEME_PRIM_PROC_FLAGS(p) |= (SCHEME_PRIM_IS_UNARY_INLINED + | SCHEME_PRIM_IS_UNSAFE_OMITABLE); scheme_add_global_constant ("unsafe-mcdr", p, env); p = scheme_make_immed_prim(unsafe_set_mcar, "unsafe-set-mcar!", 2, 2); @@ -762,11 +764,13 @@ scheme_init_unsafe_list (Scheme_Env *env) scheme_add_global_constant ("unsafe-set-mcdr!", p, env); p = scheme_make_immed_prim(unsafe_unbox, "unsafe-unbox", 1, 1); - SCHEME_PRIM_PROC_FLAGS(p) |= SCHEME_PRIM_IS_UNARY_INLINED; + SCHEME_PRIM_PROC_FLAGS(p) |= (SCHEME_PRIM_IS_UNARY_INLINED + | SCHEME_PRIM_IS_UNSAFE_OMITABLE); scheme_add_global_constant("unsafe-unbox", p, env); p = scheme_make_immed_prim(unsafe_unbox_star, "unsafe-unbox*", 1, 1); - SCHEME_PRIM_PROC_FLAGS(p) |= SCHEME_PRIM_IS_UNARY_INLINED; + SCHEME_PRIM_PROC_FLAGS(p) |= (SCHEME_PRIM_IS_UNARY_INLINED + | SCHEME_PRIM_IS_UNSAFE_OMITABLE); scheme_add_global_constant("unsafe-unbox*", p, env); p = scheme_make_immed_prim(unsafe_set_box, "unsafe-set-box!", 2, 2); diff --git a/src/racket/src/number.c b/src/racket/src/number.c index fb934b182f8..368cb0f7e39 100644 --- a/src/racket/src/number.c +++ b/src/racket/src/number.c @@ -864,7 +864,7 @@ void scheme_init_unsafe_number(Scheme_Env *env) SCHEME_PRIM_PROC_FLAGS(p) |= SCHEME_PRIM_IS_BINARY_INLINED; else SCHEME_PRIM_PROC_FLAGS(p) |= SCHEME_PRIM_SOMETIMES_INLINED; - SCHEME_PRIM_PROC_FLAGS(p) |= SCHEME_PRIM_IS_UNSAFE_FUNCTIONAL; + SCHEME_PRIM_PROC_FLAGS(p) |= SCHEME_PRIM_IS_UNSAFE_OMITABLE; scheme_add_global_constant("unsafe-f64vector-ref", p, env); p = scheme_make_immed_prim(fl_set, "unsafe-f64vector-set!", @@ -887,7 +887,7 @@ void scheme_init_unsafe_number(Scheme_Env *env) SCHEME_PRIM_PROC_FLAGS(p) |= SCHEME_PRIM_IS_BINARY_INLINED; else SCHEME_PRIM_PROC_FLAGS(p) |= SCHEME_PRIM_SOMETIMES_INLINED; - SCHEME_PRIM_PROC_FLAGS(p) |= SCHEME_PRIM_IS_UNSAFE_FUNCTIONAL; + SCHEME_PRIM_PROC_FLAGS(p) |= SCHEME_PRIM_IS_UNSAFE_OMITABLE; scheme_add_global_constant("unsafe-flvector-ref", p, env); p = scheme_make_immed_prim(unsafe_flvector_set, "unsafe-flvector-set!", @@ -904,7 +904,7 @@ void scheme_init_unsafe_number(Scheme_Env *env) p = scheme_make_immed_prim(unsafe_fxvector_ref, "unsafe-fxvector-ref", 2, 2); SCHEME_PRIM_PROC_FLAGS(p) |= (SCHEME_PRIM_IS_BINARY_INLINED - | SCHEME_PRIM_IS_UNSAFE_FUNCTIONAL); + | SCHEME_PRIM_IS_UNSAFE_OMITABLE); scheme_add_global_constant("unsafe-fxvector-ref", p, env); p = scheme_make_immed_prim(unsafe_fxvector_set, "unsafe-fxvector-set!", @@ -915,7 +915,7 @@ void scheme_init_unsafe_number(Scheme_Env *env) p = scheme_make_immed_prim(s16_ref, "unsafe-s16vector-ref", 2, 2); SCHEME_PRIM_PROC_FLAGS(p) |= SCHEME_PRIM_IS_BINARY_INLINED; - SCHEME_PRIM_PROC_FLAGS(p) |= SCHEME_PRIM_IS_UNSAFE_FUNCTIONAL; + SCHEME_PRIM_PROC_FLAGS(p) |= SCHEME_PRIM_IS_UNSAFE_OMITABLE; scheme_add_global_constant("unsafe-s16vector-ref", p, env); p = scheme_make_immed_prim(s16_set, "unsafe-s16vector-set!", @@ -926,7 +926,7 @@ void scheme_init_unsafe_number(Scheme_Env *env) p = scheme_make_immed_prim(u16_ref, "unsafe-u16vector-ref", 2, 2); SCHEME_PRIM_PROC_FLAGS(p) |= SCHEME_PRIM_IS_BINARY_INLINED; - SCHEME_PRIM_PROC_FLAGS(p) |= SCHEME_PRIM_IS_UNSAFE_FUNCTIONAL; + SCHEME_PRIM_PROC_FLAGS(p) |= SCHEME_PRIM_IS_UNSAFE_OMITABLE; scheme_add_global_constant("unsafe-u16vector-ref", p, env); p = scheme_make_immed_prim(u16_set, "unsafe-u16vector-set!", diff --git a/src/racket/src/optimize.c b/src/racket/src/optimize.c index f46924be719..5fcffdece97 100644 --- a/src/racket/src/optimize.c +++ b/src/racket/src/optimize.c @@ -42,6 +42,8 @@ #define MAX_PROC_INLINE_SIZE 256 +#define SCHEME_PRIM_IS_UNSAFE_NONMUTATING (SCHEME_PRIM_IS_UNSAFE_FUNCTIONAL | SCHEME_PRIM_IS_UNSAFE_OMITABLE) + struct Optimize_Info { MZTAG_IF_REQUIRED @@ -385,7 +387,7 @@ int scheme_omittable_expr(Scheme_Object *o, int vals, int fuel, int resolved, } } if (SCHEME_PRIMP(app->args[0]) - && (SCHEME_PRIM_PROC_FLAGS(app->args[0]) & SCHEME_PRIM_IS_UNSAFE_FUNCTIONAL) + && (SCHEME_PRIM_PROC_FLAGS(app->args[0]) & SCHEME_PRIM_IS_UNSAFE_NONMUTATING) && (app->num_args >= ((Scheme_Primitive_Proc *)app->args[0])->mina) && (app->num_args <= ((Scheme_Primitive_Proc *)app->args[0])->mu.maxa)) { note_match(1, vals, warn_info); @@ -421,7 +423,7 @@ int scheme_omittable_expr(Scheme_Object *o, int vals, int fuel, int resolved, } } if (SCHEME_PRIMP(app->rator) - && (SCHEME_PRIM_PROC_FLAGS(app->rator) & SCHEME_PRIM_IS_UNSAFE_FUNCTIONAL) + && (SCHEME_PRIM_PROC_FLAGS(app->rator) & SCHEME_PRIM_IS_UNSAFE_NONMUTATING) && (1 >= ((Scheme_Primitive_Proc *)app->rator)->mina) && (1 <= ((Scheme_Primitive_Proc *)app->rator)->mu.maxa)) { note_match(1, vals, warn_info); @@ -465,7 +467,7 @@ int scheme_omittable_expr(Scheme_Object *o, int vals, int fuel, int resolved, } } if (SCHEME_PRIMP(app->rator) - && (SCHEME_PRIM_PROC_FLAGS(app->rator) & SCHEME_PRIM_IS_UNSAFE_FUNCTIONAL) + && (SCHEME_PRIM_PROC_FLAGS(app->rator) & SCHEME_PRIM_IS_UNSAFE_NONMUTATING) && (2 >= ((Scheme_Primitive_Proc *)app->rator)->mina) && (2 <= ((Scheme_Primitive_Proc *)app->rator)->mu.maxa)) { note_match(1, vals, warn_info); @@ -1337,10 +1339,10 @@ static Scheme_Object *check_app_let_rator(Scheme_Object *app, Scheme_Object *rat return NULL; } -static int purely_functional_primitive(Scheme_Object *rator, int n) +static int is_nonmutating_primitive(Scheme_Object *rator, int n) { if (SCHEME_PRIMP(rator) - && (SCHEME_PRIM_PROC_FLAGS(rator) & SCHEME_PRIM_IS_UNSAFE_FUNCTIONAL) + && (SCHEME_PRIM_PROC_FLAGS(rator) & SCHEME_PRIM_IS_UNSAFE_NONMUTATING) && (n >= ((Scheme_Primitive_Proc *)rator)->mina) && (n <= ((Scheme_Primitive_Proc *)rator)->mu.maxa)) return 1; @@ -1363,7 +1365,7 @@ int scheme_wants_flonum_arguments(Scheme_Object *rator, int argpos, int rotate_m /* In rotate mode, we really want to know whether any argument wants to be lifted out. */ { if (SCHEME_PRIMP(rator)) { - if (SCHEME_PRIM_PROC_FLAGS(rator) & SCHEME_PRIM_IS_UNSAFE_FUNCTIONAL) { + if (SCHEME_PRIM_PROC_FLAGS(rator) & SCHEME_PRIM_IS_UNSAFE_NONMUTATING) { if (IS_NAMED_PRIM(rator, "unsafe-flabs") || IS_NAMED_PRIM(rator, "unsafe-flsqrt") || IS_NAMED_PRIM(rator, "unsafe-fl+") @@ -1424,7 +1426,7 @@ int scheme_wants_flonum_arguments(Scheme_Object *rator, int argpos, int rotate_m static int produces_unboxed(Scheme_Object *rator, int *non_fl_args, int argc, int for_args) { if (SCHEME_PRIMP(rator)) { - if (SCHEME_PRIM_PROC_FLAGS(rator) & SCHEME_PRIM_IS_UNSAFE_FUNCTIONAL) { + if (SCHEME_PRIM_PROC_FLAGS(rator) & SCHEME_PRIM_IS_UNSAFE_NONMUTATING) { if (((argc == 1) && (IS_NAMED_PRIM(rator, "unsafe-flabs") || IS_NAMED_PRIM(rator, "unsafe-flsqrt") @@ -1880,7 +1882,7 @@ static Scheme_Object *finish_optimize_application(Scheme_App_Rec *app, Optimize_ } info->size += 1; - if (!purely_functional_primitive(app->args[0], app->num_args)) + if (!is_nonmutating_primitive(app->args[0], app->num_args)) info->vclock += 1; if (all_vals) { @@ -2027,7 +2029,7 @@ static Scheme_Object *finish_optimize_application2(Scheme_App2_Rec *app, Optimiz return app->rand; } - if (!purely_functional_primitive(app->rator, 1)) + if (!is_nonmutating_primitive(app->rator, 1)) info->vclock += 1; info->preserves_marks = !!(rator_flags & CLOS_PRESERVES_MARKS); @@ -2196,7 +2198,7 @@ static Scheme_Object *finish_optimize_application3(Scheme_App3_Rec *app, Optimiz return le; } - if (!purely_functional_primitive(app->rator, 2)) + if (!is_nonmutating_primitive(app->rator, 2)) info->vclock += 1; /* Check for (call-with-values (lambda () M) N): */ @@ -2272,7 +2274,7 @@ static Scheme_Object *finish_optimize_application3(Scheme_App3_Rec *app, Optimiz /* Ad hoc optimization of (unsafe-fx+ 0), etc. */ if (SCHEME_PRIMP(app->rator) - && (SCHEME_PRIM_PROC_FLAGS(app->rator) & SCHEME_PRIM_IS_UNSAFE_FUNCTIONAL)) { + && (SCHEME_PRIM_PROC_FLAGS(app->rator) & SCHEME_PRIM_IS_UNSAFE_NONMUTATING)) { int z1, z2; z1 = SAME_OBJ(app->rand1, scheme_make_integer(0)); diff --git a/src/racket/src/print.c b/src/racket/src/print.c index 433de3415bc..24452794394 100644 --- a/src/racket/src/print.c +++ b/src/racket/src/print.c @@ -2382,7 +2382,17 @@ print(Scheme_Object *obj, int notdisplay, int compact, Scheme_Hash_Table *ht, if (compact || !pp->print_unreadable) cannot_print(pp, notdisplay, obj, ht, compact); else { - if (SCHEME_STRUCT_PROCP(obj)) { + int kind; + if (((Scheme_Primitive_Proc *)(obj))->pp.flags & SCHEME_PRIM_IS_STRUCT_OTHER) + kind = (((Scheme_Primitive_Proc *)(obj))->pp.flags & SCHEME_PRIM_OTHER_TYPE_MASK); + else + kind = -1; + if ((kind == SCHEME_PRIM_STRUCT_TYPE_INDEXLESS_GETTER) + || (kind == SCHEME_PRIM_STRUCT_TYPE_CONSTR) + || (kind == SCHEME_PRIM_STRUCT_TYPE_INDEXLESS_SETTER) + || (kind == SCHEME_PRIM_STRUCT_TYPE_INDEXED_SETTER) + || (kind == SCHEME_PRIM_STRUCT_TYPE_INDEXED_GETTER) + || (kind == SCHEME_PRIM_STRUCT_TYPE_PRED)) { print_named(obj, "struct-procedure", ((Scheme_Closed_Primitive_Proc *)obj)->name, -1, pp); diff --git a/src/racket/src/struct.c b/src/racket/src/struct.c index 0055ccfb4ae..5d330a38228 100644 --- a/src/racket/src/struct.c +++ b/src/racket/src/struct.c @@ -1156,7 +1156,7 @@ static Scheme_Object *make_struct_type_property_from_c(int argc, Scheme_Object * v = scheme_make_folding_prim_closure(prop_pred, 1, a, name, 1, 1, 0); ((Scheme_Closed_Primitive_Proc *)v)->pp.flags |= (SCHEME_PRIM_IS_STRUCT_OTHER - | SCHEME_PRIM_TYPE_STRUCT_PROP_PRED); + | SCHEME_PRIM_STRUCT_TYPE_STRUCT_PROP_PRED); *predout = v; name = MALLOC_N_ATOMIC(char, len + 10); @@ -3035,8 +3035,10 @@ struct_getter_p(int argc, Scheme_Object *argv[]) { Scheme_Object *v = argv[0]; if (SCHEME_CHAPERONEP(v)) v = SCHEME_CHAPERONE_VAL(v); - return ((STRUCT_PROCP(v, SCHEME_PRIM_IS_STRUCT_INDEXED_GETTER) - || STRUCT_mPROCP(v, + return ((STRUCT_mPROCP(v, + SCHEME_PRIM_IS_STRUCT_OTHER | SCHEME_PRIM_OTHER_TYPE_MASK, + SCHEME_PRIM_IS_STRUCT_OTHER | SCHEME_PRIM_STRUCT_TYPE_INDEXED_GETTER) + || STRUCT_mPROCP(v, SCHEME_PRIM_IS_STRUCT_OTHER | SCHEME_PRIM_OTHER_TYPE_MASK, SCHEME_PRIM_IS_STRUCT_OTHER | SCHEME_PRIM_STRUCT_TYPE_INDEXLESS_GETTER)) ? scheme_true : scheme_false); @@ -3047,7 +3049,9 @@ struct_pred_p(int argc, Scheme_Object *argv[]) { Scheme_Object *v = argv[0]; if (SCHEME_CHAPERONEP(v)) v = SCHEME_CHAPERONE_VAL(v); - return (STRUCT_PROCP(v, SCHEME_PRIM_IS_STRUCT_PRED) + return (STRUCT_mPROCP(v, + SCHEME_PRIM_IS_STRUCT_OTHER | SCHEME_PRIM_OTHER_TYPE_MASK, + SCHEME_PRIM_IS_STRUCT_OTHER | SCHEME_PRIM_STRUCT_TYPE_PRED) ? scheme_true : scheme_false); } @@ -3783,7 +3787,7 @@ make_struct_proc(Scheme_Struct_Type *struct_type, 1, a, func_name, 1, 1, 1); - flags |= SCHEME_PRIM_IS_STRUCT_PRED; + flags |= SCHEME_PRIM_STRUCT_TYPE_PRED | SCHEME_PRIM_IS_STRUCT_OTHER; } else { Struct_Proc_Info *i; int need_pos; @@ -3812,7 +3816,7 @@ make_struct_proc(Scheme_Struct_Type *struct_type, if (need_pos) flags |= SCHEME_PRIM_STRUCT_TYPE_INDEXLESS_GETTER | SCHEME_PRIM_IS_STRUCT_OTHER; else - flags |= SCHEME_PRIM_IS_STRUCT_INDEXED_GETTER; + flags |= SCHEME_PRIM_STRUCT_TYPE_INDEXED_GETTER | SCHEME_PRIM_IS_STRUCT_OTHER; /* Cache the accessor only if `struct_info' is used. This avoids keep lots of useless accessors. if (need_pos) struct_type->accessor = p; */ @@ -3838,20 +3842,23 @@ make_struct_proc(Scheme_Struct_Type *struct_type, Scheme_Object *scheme_rename_struct_proc(Scheme_Object *p, Scheme_Object *sym) { if (SCHEME_PRIMP(p)) { - int is_getter = (((Scheme_Primitive_Proc *)p)->pp.flags & SCHEME_PRIM_IS_STRUCT_INDEXED_GETTER); - int is_setter = (((Scheme_Primitive_Proc *)p)->pp.flags & SCHEME_PRIM_IS_STRUCT_INDEXED_GETTER); - - if (is_getter || is_setter) { - const char *func_name; - Struct_Proc_Info *i; - - func_name = scheme_symbol_name(sym); - - i = (Struct_Proc_Info *)SCHEME_PRIM_CLOSURE_ELS(p)[0]; + unsigned short flags = ((Scheme_Primitive_Proc *)p)->pp.flags; + if (flags & SCHEME_PRIM_IS_STRUCT_OTHER) { + int is_getter = ((flags & SCHEME_PRIM_OTHER_TYPE_MASK) == SCHEME_PRIM_STRUCT_TYPE_INDEXED_GETTER); + int is_setter = ((flags & SCHEME_PRIM_OTHER_TYPE_MASK) == SCHEME_PRIM_STRUCT_TYPE_INDEXED_SETTER); - return make_struct_proc(i->struct_type, (char *)func_name, - is_getter ? SCHEME_GETTER : SCHEME_SETTER, - i->field); + if (is_getter || is_setter) { + const char *func_name; + Struct_Proc_Info *i; + + func_name = scheme_symbol_name(sym); + + i = (Struct_Proc_Info *)SCHEME_PRIM_CLOSURE_ELS(p)[0]; + + return make_struct_proc(i->struct_type, (char *)func_name, + is_getter ? SCHEME_GETTER : SCHEME_SETTER, + i->field); + } } } diff --git a/src/racket/src/vector.c b/src/racket/src/vector.c index f9e3a2312bc..db688adc2c0 100644 --- a/src/racket/src/vector.c +++ b/src/racket/src/vector.c @@ -176,12 +176,12 @@ scheme_init_unsafe_vector (Scheme_Env *env) p = scheme_make_immed_prim(unsafe_vector_ref, "unsafe-vector-ref", 2, 2); SCHEME_PRIM_PROC_FLAGS(p) |= (SCHEME_PRIM_IS_BINARY_INLINED - | SCHEME_PRIM_IS_UNSAFE_FUNCTIONAL); + | SCHEME_PRIM_IS_UNSAFE_OMITABLE); scheme_add_global_constant("unsafe-vector-ref", p, env); p = scheme_make_immed_prim(unsafe_vector_star_ref, "unsafe-vector*-ref", 2, 2); SCHEME_PRIM_PROC_FLAGS(p) |= (SCHEME_PRIM_IS_BINARY_INLINED - | SCHEME_PRIM_IS_UNSAFE_FUNCTIONAL); + | SCHEME_PRIM_IS_UNSAFE_OMITABLE); scheme_add_global_constant("unsafe-vector*-ref", p, env); p = scheme_make_immed_prim(unsafe_vector_set, "unsafe-vector-set!", 3, 3); @@ -194,12 +194,12 @@ scheme_init_unsafe_vector (Scheme_Env *env) p = scheme_make_immed_prim(unsafe_struct_ref, "unsafe-struct-ref", 2, 2); SCHEME_PRIM_PROC_FLAGS(p) |= (SCHEME_PRIM_IS_BINARY_INLINED - | SCHEME_PRIM_IS_UNSAFE_FUNCTIONAL); + | SCHEME_PRIM_IS_UNSAFE_OMITABLE); scheme_add_global_constant("unsafe-struct-ref", p, env); p = scheme_make_immed_prim(unsafe_struct_star_ref, "unsafe-struct*-ref", 2, 2); SCHEME_PRIM_PROC_FLAGS(p) |= (SCHEME_PRIM_IS_BINARY_INLINED - | SCHEME_PRIM_IS_UNSAFE_FUNCTIONAL); + | SCHEME_PRIM_IS_UNSAFE_OMITABLE); scheme_add_global_constant("unsafe-struct*-ref", p, env); p = scheme_make_immed_prim(unsafe_struct_set, "unsafe-struct-set!", 3, 3); @@ -217,12 +217,12 @@ scheme_init_unsafe_vector (Scheme_Env *env) p = scheme_make_immed_prim(unsafe_string_ref, "unsafe-string-ref", 2, 2); SCHEME_PRIM_PROC_FLAGS(p) |= (SCHEME_PRIM_IS_BINARY_INLINED - | SCHEME_PRIM_IS_UNSAFE_FUNCTIONAL); + | SCHEME_PRIM_IS_UNSAFE_OMITABLE); scheme_add_global_constant("unsafe-string-ref", p, env); p = scheme_make_immed_prim(unsafe_string_set, "unsafe-string-set!", 3, 3); SCHEME_PRIM_PROC_FLAGS(p) |= SCHEME_PRIM_IS_NARY_INLINED; - scheme_add_global_constant("unsafe-string-set!", p, env); + scheme_add_global_constant("unsafe-string-set!", p, env); p = scheme_make_immed_prim(unsafe_bytes_len, "unsafe-bytes-length", 1, 1); SCHEME_PRIM_PROC_FLAGS(p) |= (SCHEME_PRIM_IS_UNARY_INLINED @@ -231,7 +231,7 @@ scheme_init_unsafe_vector (Scheme_Env *env) p = scheme_make_immed_prim(unsafe_bytes_ref, "unsafe-bytes-ref", 2, 2); SCHEME_PRIM_PROC_FLAGS(p) |= (SCHEME_PRIM_IS_BINARY_INLINED - | SCHEME_PRIM_IS_UNSAFE_FUNCTIONAL); + | SCHEME_PRIM_IS_UNSAFE_OMITABLE); scheme_add_global_constant("unsafe-bytes-ref", p, env); p = scheme_make_immed_prim(unsafe_bytes_set, "unsafe-bytes-set!", 3, 3); From 2698db08a55e139e39a986f7b351da2ac8442848 Mon Sep 17 00:00:00 2001 From: Jay McCarthy Date: Mon, 10 Oct 2011 06:45:31 -0600 Subject: [PATCH 362/441] Fixing PR 12271 (cherry picked from commit 354283132d406d9a2a8fbaea1a8fa121ac5d5474) --- collects/tests/web-server/pr/12271.rkt | 16 ++++++++++++++++ collects/xml/private/writer.rkt | 3 +++ collects/xml/private/xexpr.rkt | 8 ++++++-- collects/xml/xml.rkt | 3 +++ 4 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 collects/tests/web-server/pr/12271.rkt diff --git a/collects/tests/web-server/pr/12271.rkt b/collects/tests/web-server/pr/12271.rkt new file mode 100644 index 00000000000..d3e08c067b1 --- /dev/null +++ b/collects/tests/web-server/pr/12271.rkt @@ -0,0 +1,16 @@ +#lang racket +(require tests/eli-tester + xml) + +(test + (with-output-to-bytes + (lambda () + (write-xexpr + `(html (head (title "Form with CDATA")) + (body (p "Hello, this is a form") + (p ,(cdata 'cdata-start 'cdata-end "")) + (p ,(p-i 'pis 'pie 'target "instruction")) + (p ,(comment "comment")) + "Something"))))) + => + #"Form with CDATA

Hello, this is a form

Something") diff --git a/collects/xml/private/writer.rkt b/collects/xml/private/writer.rkt index 13339fb4276..1abc891e7a2 100644 --- a/collects/xml/private/writer.rkt +++ b/collects/xml/private/writer.rkt @@ -169,6 +169,9 @@ escape-table escape-attribute-table lowercase-symbol + write-xml-cdata + write-xml-comment + write-xml-p-i write-xml-element) ;; incr : Nat -> Nat diff --git a/collects/xml/private/xexpr.rkt b/collects/xml/private/xexpr.rkt index e541e9290cf..ae0d35bb097 100644 --- a/collects/xml/private/xexpr.rkt +++ b/collects/xml/private/xexpr.rkt @@ -299,5 +299,9 @@ [(valid-char? x) (fprintf out "&#~a;" x)] ; Embedded XML - [(source? x) - (write-xml-element x 0 void out)])) + [(cdata? x) + (write-xml-cdata x 0 void out)] + [(comment? x) + (write-xml-comment x 0 void out)] + [(p-i? x) + (write-xml-p-i x 0 void out)])) diff --git a/collects/xml/xml.rkt b/collects/xml/xml.rkt index e61183b0175..d2928312d35 100644 --- a/collects/xml/xml.rkt +++ b/collects/xml/xml.rkt @@ -7,6 +7,9 @@ escape-table escape-attribute-table lowercase-symbol + write-xml-cdata + write-xml-comment + write-xml-p-i write-xml-element) "private/xexpr.rkt" "private/syntax.rkt") From f680811cb6dff24f1ada7f53bcd335c63b870c7b Mon Sep 17 00:00:00 2001 From: Jay McCarthy Date: Mon, 10 Oct 2011 08:27:34 -0600 Subject: [PATCH 363/441] Fixing breakage from push 23693 (cherry picked from commit b20ffdbe95385f8357db0a4a9ab1b33fe2161a32) --- collects/tests/rackunit/check-test.rkt | 13 ++++--------- collects/tests/rackunit/standalone.rkt | 4 ++-- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/collects/tests/rackunit/check-test.rkt b/collects/tests/rackunit/check-test.rkt index 53fe9986095..4f994bb4260 100644 --- a/collects/tests/rackunit/check-test.rkt +++ b/collects/tests/rackunit/check-test.rkt @@ -310,14 +310,9 @@ ;; Check evaluation contexts (test-case "current-check-around is used by checks" - (check-eq? (parameterize ([current-check-around (lambda (t) 'foo)]) + (let ([x #f]) + (parameterize ([current-check-around (lambda (t) (set! x 'foo))]) (check-eq? 'a 'b)) - 'foo)) - - (test-case - "current-check-handler is used by checks" - (check-eq? (parameterize ([current-check-handler (lambda (e) 'foo)]) - (check-eq? 'a 'b)) - 'foo)) - )) + (check-eq? x + 'foo))))) diff --git a/collects/tests/rackunit/standalone.rkt b/collects/tests/rackunit/standalone.rkt index 4b7f36ef69d..00f00f67690 100644 --- a/collects/tests/rackunit/standalone.rkt +++ b/collects/tests/rackunit/standalone.rkt @@ -29,9 +29,9 @@ (test-file "standalone-check-test.rkt" #"Oh HAI!\nI didn't run\n" - #"--------------------\nERROR\nOutta here!\n\n === context ===\nPLTHOME/collects/tests/rackunit/standalone-check-test.rkt:40:12: temp7\nPLTHOME/collects/rackunit/private/check.rkt:122:29\nPLTHOME/collects/racket/private/more-scheme.rkt:209:2: call-handled-body\nPLTHOME/collects/rackunit/private/check.rkt:55:0: top-level-check-around\n\n\n--------------------\n--------------------\nFAILURE\nname: check\nlocation: (# 44 0 1344 17)\nexpression: (check = 1 2)\nparams: (# 1 2)\nmessage: 0.0\n\nCheck failure\n--------------------\n") + #"--------------------\nERROR\nOutta here!\n\n === context ===\nPLTHOME/collects/tests/rackunit/standalone-check-test.rkt:40:12: temp7\nPLTHOME/collects/rackunit/private/check.rkt:122:29\nPLTHOME/collects/racket/private/more-scheme.rkt:209:2: call-handled-body\nPLTHOME/collects/rackunit/private/check.rkt:55:0: top-level-check-around\nPLTHOME/collects/rackunit/private/check.rkt:108:21: core50\n\n\n--------------------\n--------------------\nFAILURE\nname: check\nlocation: (# 44 0 1344 17)\nexpression: (check = 1 2)\nparams: (# 1 2)\nmessage: 0.0\n\nCheck failure\n--------------------\n") (test-file "standalone-test-case-test.rkt" - #"#t\n#t\n" + #"" #"--------------------\nERROR\nFirst Outta here!\n\n === context ===\nPLTHOME/collects/racket/private/more-scheme.rkt:209:2: call-handled-body\n\n\n--------------------\n--------------------\nerror\nERROR\nSecond Outta here!\n\n === context ===\nPLTHOME/collects/racket/private/more-scheme.rkt:209:2: call-handled-body\n\n\n--------------------\n--------------------\nFAILURE\nname: check-eq?\nlocation: (# 19 12 520 15)\nexpression: (check-eq? 1 2)\nactual: 1\nexpected: 2\n\nCheck failure\n--------------------\n--------------------\nfailure\nFAILURE\nname: check-eq?\nlocation: (# 20 21 558 15)\nexpression: (check-eq? 1 2)\nactual: 1\nexpected: 2\n\nCheck failure\n--------------------\n") From 1357a22a9e9b8a63a9208e500fa57b4eaf892286 Mon Sep 17 00:00:00 2001 From: Vincent St-Amour Date: Tue, 16 Aug 2011 17:10:45 -0400 Subject: [PATCH 364/441] Typoes. (cherry picked from commit 90aa9c9d755c6accb57e54e317f90b7e436728c6) --- src/racket/src/eval.c | 4 ++-- src/racket/src/optimize.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/racket/src/eval.c b/src/racket/src/eval.c index f3952662429..9628c90a37d 100644 --- a/src/racket/src/eval.c +++ b/src/racket/src/eval.c @@ -98,10 +98,10 @@ lifting (of procedures that close over nothing or only globals). Beware that the resulting bytecode object is a graph, not a tree, due to sharing (potentially cyclic) of closures that are "empty" - but actually refer to other "empty" closures. See "resove.c". + but actually refer to other "empty" closures. See "resolve.c". The fourth pass, "sfs", performs another liveness analysis on stack - slows and inserts operations to clear stack slots as necessary to + slots and inserts operations to clear stack slots as necessary to make execution safe for space. In particular, dead slots need to be cleared before a non-tail call into arbitrary Scheme code. This pass can mutate the result of the "resolve" pass. See "sfs.c". diff --git a/src/racket/src/optimize.c b/src/racket/src/optimize.c index 5fcffdece97..79846dc886f 100644 --- a/src/racket/src/optimize.c +++ b/src/racket/src/optimize.c @@ -5052,7 +5052,7 @@ Scheme_Object *scheme_optimize_expr(Scheme_Object *expr, Optimize_Info *info, in } Scheme_Object *scheme_optimize_clone(int dup_ok, Scheme_Object *expr, Optimize_Info *info, int delta, int closure_depth) -/* Past closure_depth, need to reverse optimize to unoptimzed with respect to info; +/* Past closure_depth, need to reverse optimize to unoptimized with respect to info; delta is the amount to skip in info to get to the frame that bound the code. If dup_ok is 1, then the old copy will be dropped, so it's ok to "duplicate" any constant. */ From f108ea88619d31e8aa88b43e8384b8384df6b01a Mon Sep 17 00:00:00 2001 From: Rodolfo Carvalho Date: Sun, 9 Oct 2011 23:02:32 -0300 Subject: [PATCH 365/441] Fix typo in Slideshow documentation (cherry picked from commit a3890f7e3272ef9fa7b44d9f09a6b8acf6a356e0) --- collects/scribblings/slideshow/slides.scrbl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collects/scribblings/slideshow/slides.scrbl b/collects/scribblings/slideshow/slides.scrbl index 4dd6c4787d3..df3f28b14f3 100644 --- a/collects/scribblings/slideshow/slides.scrbl +++ b/collects/scribblings/slideshow/slides.scrbl @@ -404,7 +404,7 @@ triggered via the @DFlag{condense} command-line flag.} @defparam[current-font-size n exact-nonnegative-integer?]{ -Parameter that determines he font size used by @racket[t], +Parameter that determines the font size used by @racket[t], @racket[para], etc. The default size is @racket[32].} From 566c36c4f2911d582db8d45a9400752ce4d7faa5 Mon Sep 17 00:00:00 2001 From: Kevin Tew Date: Sat, 8 Oct 2011 12:49:18 -0600 Subject: [PATCH 366/441] pr 12268 fix merge to 5.2 (cherry picked from commit 58b1f8632621b1c5cc67e7dc9fbaa9d07d377377) --- src/racket/src/place.c | 60 ++++++++++++++++++++++-------------------- 1 file changed, 31 insertions(+), 29 deletions(-) diff --git a/src/racket/src/place.c b/src/racket/src/place.c index 58bf96eac0b..96c10b2bf33 100644 --- a/src/racket/src/place.c +++ b/src/racket/src/place.c @@ -2465,38 +2465,40 @@ static void async_channel_finalize(void *p, void* data) { ch->out = 0; ch->count = 0; - /*release single receiver */ - if (SCHEME_PLACE_OBJECTP(ch->wakeup_signal)) { - int refcount = 0; - Scheme_Place_Object *place_obj; - place_obj = ((Scheme_Place_Object *) ch->wakeup_signal); + if (ch->wakeup_signal) { + /*release single receiver */ + if (SCHEME_PLACE_OBJECTP(ch->wakeup_signal)) { + int refcount = 0; + Scheme_Place_Object *place_obj; + place_obj = ((Scheme_Place_Object *) ch->wakeup_signal); - mzrt_mutex_lock(place_obj->lock); - place_obj->refcount--; - refcount = place_obj->refcount; - mzrt_mutex_unlock(place_obj->lock); - if (!refcount) { - destroy_place_object_locks(place_obj); + mzrt_mutex_lock(place_obj->lock); + place_obj->refcount--; + refcount = place_obj->refcount; + mzrt_mutex_unlock(place_obj->lock); + if (!refcount) { + destroy_place_object_locks(place_obj); + } } - } - /*release multiple receiver */ - else if (SCHEME_VECTORP(ch->wakeup_signal)) { - Scheme_Object *v = ch->wakeup_signal; - int i; - int size = SCHEME_VEC_SIZE(v); - for (i = 0; i < size; i++) { - Scheme_Place_Object *o3; - o3 = (Scheme_Place_Object *)SCHEME_VEC_ELS(v)[i]; - if (o3) { - int refcount = 0; - mzrt_mutex_lock(o3->lock); - SCHEME_VEC_ELS(v)[i] = NULL; - o3->refcount--; - refcount = o3->refcount; - mzrt_mutex_unlock(o3->lock); + /*release multiple receiver */ + else if (SCHEME_VECTORP(ch->wakeup_signal)) { + Scheme_Object *v = ch->wakeup_signal; + int i; + int size = SCHEME_VEC_SIZE(v); + for (i = 0; i < size; i++) { + Scheme_Place_Object *o3; + o3 = (Scheme_Place_Object *)SCHEME_VEC_ELS(v)[i]; + if (o3) { + int refcount = 0; + mzrt_mutex_lock(o3->lock); + SCHEME_VEC_ELS(v)[i] = NULL; + o3->refcount--; + refcount = o3->refcount; + mzrt_mutex_unlock(o3->lock); - if (!refcount) { - destroy_place_object_locks(o3); + if (!refcount) { + destroy_place_object_locks(o3); + } } } } From d586e78e7a99e3e75a194e55786d0ced271f368e Mon Sep 17 00:00:00 2001 From: Kevin Tew Date: Mon, 10 Oct 2011 10:30:03 -0600 Subject: [PATCH 367/441] Fix QNX merge to 5.2 (cherry picked from commit 1a2d425ece257cef5a99c49b70cacb6eb127bed2) --- src/racket/sconfig.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/racket/sconfig.h b/src/racket/sconfig.h index 917ea70455f..53ef1e9ca1a 100644 --- a/src/racket/sconfig.h +++ b/src/racket/sconfig.h @@ -937,7 +937,10 @@ #if defined(__QNX__) +#if defined(i386) # define SCHEME_PLATFORM_LIBRARY_SUBPATH "i386-qnx" +#endif +# define ASSUME_FIXED_STACK_SIZE # include "uconfig.h" # define SIGSET_IS_SIGNAL @@ -945,11 +948,20 @@ # define USE_FCNTL_O_NONBLOCK -# define ASSUME_FIXED_STACK_SIZE # define FIXED_STACK_SIZE 524288 # define FLAGS_ALREADY_SET +#if defined(i386) +# define MZ_USE_JIT_I386 +# define MZ_JIT_USE_MPROTECT +#endif +#if defined(__x86_64__) +# define MZ_USE_JIT_X86_64 +# define MZ_JIT_USE_MPROTECT +# define MZ_USE_DWARF_LIBUNWIND +#endif + #endif /***************************************************/ From 7a66972313bd41ae6dff2a9c3947101272b033c1 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Mon, 10 Oct 2011 12:42:44 -0400 Subject: [PATCH 368/441] Rename "$WHERE1" -> "$BASE". (cherry picked from commit de40798d49762270cecb397fb8af6f08125a3c13) --- .../build/unix-installer/installer-header | 82 +++++++++---------- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/collects/meta/build/unix-installer/installer-header b/collects/meta/build/unix-installer/installer-header index 7c6e8156b98..59527bb45a3 100644 --- a/collects/meta/build/unix-installer/installer-header +++ b/collects/meta/build/unix-installer/installer-header @@ -147,12 +147,12 @@ if test "$unixstyle" = "N"; then fi fi -# WHERE1 can be used with "$WHERE1/$TARGET" to avoid a double slash +# BASE can be used with "$BASE/$TARGET" to avoid a double slash case "$where" in "" ) failwith "internal error (empty \$where)" ;; - "/" ) WHERE1="" ;; + "/" ) BASE="" ;; *"/" ) failwith "internal error (\$where ends in a slash)" ;; - "/"* ) WHERE1="$where" ;; + "/"* ) BASE="$where" ;; * ) failwith "internal error (\$where is not absolute)" ;; esac @@ -169,20 +169,20 @@ fi set_prefix() { where="$1" # default dirs -- mimic configure behavior - bindir="$WHERE1/bin" - collectsdir="$WHERE1/lib/racket/collects" - if test -d "$WHERE1/share"; then docdir="$WHERE1/share/racket/doc" - elif test -d "$WHERE1/doc"; then docdir="$WHERE1/doc/racket" - else docdir="$WHERE1/share/racket/doc" + bindir="$BASE/bin" + collectsdir="$BASE/lib/racket/collects" + if test -d "$BASE/share"; then docdir="$BASE/share/racket/doc" + elif test -d "$BASE/doc"; then docdir="$BASE/doc/racket" + else docdir="$BASE/share/racket/doc" fi - libdir="$WHERE1/lib" - includerktdir="$WHERE1/include/racket" - librktdir="$WHERE1/lib/racket" - mandir="$WHERE1/man" + libdir="$BASE/lib" + includerktdir="$BASE/include/racket" + librktdir="$BASE/lib/racket" + mandir="$BASE/man" # The source tree is always removed -- no point keeping it if it won't work - # if test -d "$WHERE1/share"; then srcdir="$WHERE1/share/racket/src" - # elif test -d "$WHERE1/src"; then srcdir="$WHERE1/src/racket" - # else srcdir="$WHERE1/share/racket/src" + # if test -d "$BASE/share"; then srcdir="$BASE/share/racket/src" + # elif test -d "$BASE/src"; then srcdir="$BASE/src/racket" + # else srcdir="$BASE/share/racket/src" # fi } @@ -208,7 +208,7 @@ read_dir() { read new_dir case "$new_dir" in "/"* ) echo "$new_dir" ;; - * ) echo "$WHERE1/$new_dir" ;; + * ) echo "$BASE/$new_dir" ;; esac } @@ -272,30 +272,30 @@ echo "ok." unpack_installation() { # test that no TARGET exists - if test -d "$WHERE1/$TARGET" || test -f "$WHERE1/$TARGET"; then - echon "\"$WHERE1/$TARGET\" exists, delete? " + if test -d "$BASE/$TARGET" || test -f "$BASE/$TARGET"; then + echon "\"$BASE/$TARGET\" exists, delete? " read yesno case "$yesno" in [yY]*) - echon "Deleting old \"$WHERE1/$TARGET\"... " - "$rm" -rf "$WHERE1/$TARGET" \ - || failwith "could not delete \"$WHERE1/$TARGET\"." + echon "Deleting old \"$BASE/$TARGET\"... " + "$rm" -rf "$BASE/$TARGET" \ + || failwith "could not delete \"$BASE/$TARGET\"." echo "done." ;; - *) failwith "aborting because \"$WHERE1/$TARGET\" exists." ;; + *) failwith "aborting because \"$BASE/$TARGET\" exists." ;; esac fi # unpack - echon "Unpacking into \"$WHERE1/$TARGET\"... " - rm_on_abort="$WHERE1/$TARGET" - "$mkdir" "$WHERE1/$TARGET" + echon "Unpacking into \"$BASE/$TARGET\"... " + rm_on_abort="$BASE/$TARGET" + "$mkdir" "$BASE/$TARGET" "$tail" +"$BINSTARTLINE" "$0" | "$gunzip" -c \ - | { cd "$WHERE1/$TARGET" + | { cd "$BASE/$TARGET" "$tar" xf - || failwith "problems during unpacking of binary archive." } - cd "$WHERE1/$TARGET" + cd "$BASE/$TARGET" test -d "collects" \ - || failwith "unpack failed (could not find \"$WHERE1/$TARGET/collects\")." + || failwith "unpack failed (could not find \"$BASE/$TARGET/collects\")." echo "done." } @@ -346,15 +346,15 @@ if test ! "x$sysdir" = "x"; then echo "Installing links in \"$sysdir/bin\"..." printsep=" " cd "bin" - for x in `cd "$WHERE1/$TARGET/bin"; ls`; do - if test -x "$WHERE1/$TARGET/bin/$x"; then + for x in `cd "$BASE/$TARGET/bin"; ls`; do + if test -x "$BASE/$TARGET/bin/$x"; then echon "${printsep}$x" printsep=", " - link "$WHERE1/$TARGET/bin/$x" "$x" "$sysdir/bin" + link "$BASE/$TARGET/bin/$x" "$x" "$sysdir/bin" fi done echo "" - echo "Done. (see \"$WHERE1/$TARGET/bin\" for other executables)" + echo "Done. (see \"$BASE/$TARGET/bin\" for other executables)" else echo "Skipping \"$sysdir/bin\" (does not exist or not writable)." fi @@ -374,10 +374,10 @@ if test ! "x$sysdir" = "x"; then cd "$mandir" echo "Installing links in \"$sysdir/$mandir\"..." printsep=" " - for x in `cd "$WHERE1/$TARGET/man/man1/"; "$ls"`; do + for x in `cd "$BASE/$TARGET/man/man1/"; "$ls"`; do echon "${printsep}$x" printsep=", " - link "$WHERE1/$TARGET/man/man1/$x" "$x" "$sysdir/$mandir" + link "$BASE/$TARGET/man/man1/$x" "$x" "$sysdir/$mandir" done echo "" echo "Done" @@ -396,7 +396,7 @@ if test ! "x$sysdir" = "x"; then else cd "$libdir" echo "Installing \"$sysdir/$libdir/$TARGET\"." - link "$WHERE1/$TARGET/lib" "$TARGET" "$sysdir/$libdir" + link "$BASE/$TARGET/lib" "$TARGET" "$sysdir/$libdir" fi # include link cd "$sysdir" @@ -413,7 +413,7 @@ if test ! "x$sysdir" = "x"; then else cd "$incdir" echo "Installing \"$sysdir/$incdir/$TARGET\"." - link "$WHERE1/$TARGET/include" "$TARGET" "$sysdir/$incdir" + link "$BASE/$TARGET/include" "$TARGET" "$sysdir/$incdir" fi # doc link cd "$sysdir" @@ -429,7 +429,7 @@ if test ! "x$sysdir" = "x"; then else cd "$docdir" echo "Installing \"$sysdir/$docdir/$TARGET\"." - link "$WHERE1/$TARGET/notes" "$TARGET" "$sysdir/$docdir" + link "$BASE/$TARGET/notes" "$TARGET" "$sysdir/$docdir" fi fi @@ -441,12 +441,12 @@ fi unixstyle_install() { TARGET="$TARGET-tmp-install" -if test -e "$WHERE1/$TARGET"; then - echo "\"$WHERE1/$TARGET\" already exists (needed for the installation)," +if test -e "$BASE/$TARGET"; then + echo "\"$BASE/$TARGET\" already exists (needed for the installation)," echon " ok to remove? " read R case "$R" in - [yY]* ) "$rm" -rf "$WHERE1/$TARGET" ;; + [yY]* ) "$rm" -rf "$BASE/$TARGET" ;; * ) failwith "abort..." ;; esac fi @@ -468,7 +468,7 @@ unpack_installation cd "$where" "$TARGET/bin/racket" "$TARGET/collects/setup/unixstyle-install.rkt" \ - "move" "$WHERE1/$TARGET" "$bindir" "$collectsdir" "$docdir" "$libdir" \ + "move" "$BASE/$TARGET" "$bindir" "$collectsdir" "$docdir" "$libdir" \ "$includerktdir" "$librktdir" "$mandir" \ || failwith "installation failed" From c6c7490bacf6d14b0ab703212ead62ee92e78acd Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Mon, 10 Oct 2011 12:44:22 -0400 Subject: [PATCH 369/441] Clearer question about running an existing uninstaller. (cherry picked from commit e9db4df6c35ccceba32853de9a8f83484de1199a) --- collects/meta/build/unix-installer/installer-header | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collects/meta/build/unix-installer/installer-header b/collects/meta/build/unix-installer/installer-header index 59527bb45a3..7dbbaf130f1 100644 --- a/collects/meta/build/unix-installer/installer-header +++ b/collects/meta/build/unix-installer/installer-header @@ -454,7 +454,7 @@ fi if test -x "$bindir/racket-uninstall"; then echo "A previous Racket uninstaller is found at" echo " \"$bindir/racket-uninstall\"," - echon " ok to run it? " + echon " should I run it? (default: no) " read R case "$R" in [yY]* ) echon " running uninstaller..." From 4f355fbc6554b78fa6ba3175d7fd412d47d044bf Mon Sep 17 00:00:00 2001 From: Neil Toronto Date: Mon, 10 Oct 2011 13:26:30 -0600 Subject: [PATCH 370/441] Fixed error: attempt to divide by (void) when axis bounds' length is a multiple of 1000 Please merge into 5.2 (cherry picked from commit a0e2401cbef7d9745ea6be339457484fcc0f4c6a) --- collects/plot/common/ticks.rkt | 6 +++--- collects/plot/tests/plot2d-tests.rkt | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/collects/plot/common/ticks.rkt b/collects/plot/common/ticks.rkt index c6d8b6634b0..b5ed92e69ed 100644 --- a/collects/plot/common/ticks.rkt +++ b/collects/plot/common/ticks.rkt @@ -29,9 +29,9 @@ (define e (floor-log10 (- x-max x-min))) (define mag (expt 10 e)) (define step (let ([y (/ (- x-max x-min) mag)]) - (cond [(y . < . 2) (* 1/5 mag)] - [(y . < . 5) (* 1/2 mag)] - [(y . < . 10) mag]))) + (cond [(y . < . 2) (* 1/5 mag)] + [(y . < . 5) (* 1/2 mag)] + [else mag]))) (define start (* (ceiling (/ x-min step)) step)) (define stop (* (floor (/ x-max step)) step)) (define num (+ 1 (round (/ (- stop start) step)))) diff --git a/collects/plot/tests/plot2d-tests.rkt b/collects/plot/tests/plot2d-tests.rkt index 14a6ee42a95..000531b9bcc 100644 --- a/collects/plot/tests/plot2d-tests.rkt +++ b/collects/plot/tests/plot2d-tests.rkt @@ -11,6 +11,8 @@ (plot empty #:x-min -1 #:x-max 1 #:y-min -1 #:y-max 1) +(time (plot (function values 0 1000))) + (parameterize ([plot-background "black"] [plot-foreground "white"] [plot-background-alpha 1/2] From c2ccac22acc8588855847ef5c93a34de2c6ba58a Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Mon, 10 Oct 2011 14:18:26 -0600 Subject: [PATCH 371/441] fix argument-error report Merge to 5.2 (cherry picked from commit 6aaa0d44c0b0905d2ff24504a19d77ac749b8ea1) --- collects/racket/place.rkt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collects/racket/place.rkt b/collects/racket/place.rkt index 16a0bc650de..ec0f3c28b34 100644 --- a/collects/racket/place.rkt +++ b/collects/racket/place.rkt @@ -175,7 +175,7 @@ (unless (or (module-path? module-path) (path? module-path)) (raise-type-error who "module-path or path" module-path)) (unless (symbol? function) - (raise-type-error who "symbol" module-path)) + (raise-type-error who "symbol" function)) (unless (or (not in) (input-port? in)) (raise-type-error who "input-port or #f" in)) (unless (or (not out) (output-port? out)) From ff5b2dd31d124498153c0d901ca07d028627ea49 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Mon, 10 Oct 2011 14:45:53 -0600 Subject: [PATCH 372/441] doc clarifications Merge to 5.2 (cherry picked from commit 5724aa1d1b2f30296b134f1ee5de57e8f4737f34) --- collects/scribblings/foreign/cpointer.scrbl | 27 +++++++++++---------- collects/scribblings/reference/places.scrbl | 7 +++--- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/collects/scribblings/foreign/cpointer.scrbl b/collects/scribblings/foreign/cpointer.scrbl index 5c40a00f4db..a6f072944f3 100644 --- a/collects/scribblings/foreign/cpointer.scrbl +++ b/collects/scribblings/foreign/cpointer.scrbl @@ -22,20 +22,21 @@ to Racket, and accept only such tagged pointers when going to C. An optional @racket[ptr-type] can be given to be used as the base pointer type, instead of @racket[_pointer]. -By convention, tags are symbols named after the -type they point to. For example, the cpointer @racket[_car] would -be created using @racket['car] as the key. However, any symbol can be -used as the tag. +Although any value can be used as a tag, by convention the symbol form +of a type name---without a leading underscore---is used as the +tag. For example, a pointer type @racketidfont{_animal} +would normally use @racket['animal] as the key. + Pointer tags are checked with @racket[cpointer-has-tag?] and changed -with @racket[cpointer-push-tag!] which means that other tags are -preserved. Specifically, if a base @racket[ptr-type] is given and is -itself a @racket[_cpointer], then the new type will handle pointers -that have the new tag in addition to @racket[ptr-type]'s tag(s). When -the tag is a pair, its first value is used for printing, so the most -recently pushed tag which corresponds to the inheriting type will be -displayed. - -@racket[_cpointer/null] is similar to @racket[_cpointer] except that +with @racket[cpointer-push-tag!], which means that other tags are +preserved on an existing pointer value. Specifically, if a base +@racket[ptr-type] is given and is itself a @racket[_cpointer], then +the new type will handle pointers that have the new tag in addition to +@racket[ptr-type]'s tag(s). When the tag is a pair, its first value +is used for printing, so the most recently pushed tag which +corresponds to the inheriting type is displayed. + +The @racket[_cpointer/null] function is similar to @racket[_cpointer], except that it tolerates @cpp{NULL} pointers both going to C and back. Note that @cpp{NULL} pointers are represented as @racket[#f] in Racket, so they are not tagged.} diff --git a/collects/scribblings/reference/places.scrbl b/collects/scribblings/reference/places.scrbl index dffbb0d294f..87980decf66 100644 --- a/collects/scribblings/reference/places.scrbl +++ b/collects/scribblings/reference/places.scrbl @@ -267,12 +267,13 @@ If any pumping threads were created to connect a non-@tech{file-stream } @defproc[(place-channel-get [pch place-channel?]) place-message-allowed?]{ - Returns a message received on channel @racket[pch]. + Returns a message received on channel @racket[pch], blocking until a + message is available. } -@defproc[(place-channel-put/get [pch place-channel?] [v any/c]) void]{ +@defproc[(place-channel-put/get [pch place-channel?] [v any/c]) any/c]{ Sends an immutable message @racket[v] on channel @racket[pch] and then - waits for a reply message on the same channel. + waits for a message (perhaps a reply) on the same channel. } @defproc[(place-message-allowed? [v any/c]) boolean?]{ From 635a879727ad8434e556ba5b59c0f5b8bfd771af Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Mon, 10 Oct 2011 15:38:42 -0600 Subject: [PATCH 373/441] Revert "another attempt to fix the 64-bit Lion hidden-window problem" This reverts commit f6e5468dbb85c2ed48178ac43fb25084430413ef. Merge to 5.2 (cherry picked from commit 9fd11ac92cec38a0497ae155f472ab82cca97a2b) --- collects/mred/private/wx/cocoa/filedialog.rkt | 18 ++++----- collects/mred/private/wx/cocoa/printer-dc.rkt | 9 ++--- collects/mred/private/wx/cocoa/queue.rkt | 40 ++----------------- 3 files changed, 15 insertions(+), 52 deletions(-) diff --git a/collects/mred/private/wx/cocoa/filedialog.rkt b/collects/mred/private/wx/cocoa/filedialog.rkt index 2afb2781715..904acd7fbef 100644 --- a/collects/mred/private/wx/cocoa/filedialog.rkt +++ b/collects/mred/private/wx/cocoa/filedialog.rkt @@ -91,16 +91,14 @@ (let ([front (get-front)] [parent (and (version-10.6-or-later?) parent)]) - (call-in-run-loop - (lambda () - (when parent - (tellv ns beginSheetModalForWindow: (send parent get-cocoa-window) - completionHandler: #f)) - (begin0 - (tell #:type _NSInteger ns runModal) - (when parent (tell app endSheet: ns)) - (when front (tellv (send front get-cocoa-window) - makeKeyAndOrderFront: #f)))))))]) + (when parent + (tellv ns beginSheetModalForWindow: (send parent get-cocoa-window) + completionHandler: #f)) + (begin0 + (tell #:type _NSInteger ns runModal) + (when parent (tell app endSheet: ns)) + (when front (tellv (send front get-cocoa-window) + makeKeyAndOrderFront: #f)))))]) (begin0 (if (zero? result) #f diff --git a/collects/mred/private/wx/cocoa/printer-dc.rkt b/collects/mred/private/wx/cocoa/printer-dc.rkt index 10879424c5f..2df653c5cc8 100644 --- a/collects/mred/private/wx/cocoa/printer-dc.rkt +++ b/collects/mred/private/wx/cocoa/printer-dc.rkt @@ -16,8 +16,7 @@ "bitmap.rkt" "cg.rkt" "utils.rkt" - "types.rkt" - "queue.rkt") + "types.rkt") (provide (protect-out printer-dc% @@ -106,10 +105,8 @@ (if (atomically (let ([front (get-front)]) (begin0 - (call-in-run-loop - (lambda () - (= (tell #:type _NSInteger (tell NSPageLayout pageLayout) runModalWithPrintInfo: print-info) - NSOkButton))) + (= (tell #:type _NSInteger (tell NSPageLayout pageLayout) runModalWithPrintInfo: print-info) + NSOkButton) (when front (tellv (send front get-cocoa-window) makeKeyAndOrderFront: #f))))) (begin diff --git a/collects/mred/private/wx/cocoa/queue.rkt b/collects/mred/private/wx/cocoa/queue.rkt index e455b988af6..d0ac5d21a38 100644 --- a/collects/mred/private/wx/cocoa/queue.rkt +++ b/collects/mred/private/wx/cocoa/queue.rkt @@ -21,7 +21,6 @@ set-menu-bar-hooks! set-fixup-window-locations! post-dummy-event - call-in-run-loop try-to-sync-refresh sync-cocoa-events) @@ -31,8 +30,7 @@ queue-event yield) -(import-class NSApplication NSAutoreleasePool NSColor NSProcessInfo NSArray - NSRunLoop) +(import-class NSApplication NSAutoreleasePool NSColor NSProcessInfo NSArray) (import-protocol NSApplicationDelegate) ;; Extreme hackery to hide original arguments from @@ -80,11 +78,7 @@ (queue-file-event (string->path filename))] [-a _void (applicationDidFinishLaunching: [_id notification]) (unless got-file? - (queue-start-empty-event)) - (tellv app stop: self)] - [-a _void (callbackAndStopLoop) - (run-loop-callback) - (tellv app stop: self)] + (queue-start-empty-event))] [-a _BOOL (applicationShouldHandleReopen: [_id app] hasVisibleWindows: [_BOOL has-visible?]) ;; If we have any visible windows, return #t to do the default thing. ;; Otherwise return #f, because we don't want any invisible windows resurrected. @@ -138,34 +132,7 @@ (unless (zero? v) (log-error (format "error from CGDisplayRegisterReconfigurationCallback: ~a" v)))) -;; To make sure that `finishLaunching' is called, call `run' -;; and have `applicationDidFinishLaunching' quit the run loop. -;; This seems to work better than calling `finishLaunching' -;; directly undet 64-bt Lion, where calling just `finishLaunching' -;; somehow doesn't get the start-up AppleEvents. -(tellv app run) - -;; Use `call-in-run-loop' to run something that needs to be -;; within `run', such as a modal-dialog run loop. It starts -;; a `run' with a high-priority callback to run `thunk', and -;; the run loop is stopped immediately after `thunk' returns. -(define (call-in-run-loop thunk) - (define result #f) - (set! run-loop-callback - (lambda () - (set! run-loop-callback void) - (set! result (thunk)))) - (tellv (tell NSRunLoop currentRunLoop) - performSelector: #:type _SEL (selector callbackAndStopLoop) - target: app-delegate - argument: #f - order: #:type _NSUInteger 0 - modes: (tell NSArray - arrayWithObjects: #:type (_vector i _id) (vector NSDefaultRunLoopMode) - count: #:type _NSUInteger 1)) - (tellv app run) - result) -(define run-loop-callback void) +(tellv app finishLaunching) ;; ------------------------------------------------------------ ;; Create an event to post when MzScheme has been sleeping but is @@ -254,6 +221,7 @@ (define kCFSocketReadCallBack 1) +(import-class NSRunLoop) (let* ([rl (tell #:type _CFRunLoopRef (tell NSRunLoop currentRunLoop) getCFRunLoop)] [cfs (CFSocketCreateWithNative (CFAllocatorGetDefault) ready_sock kCFSocketReadCallBack socket_callback sock-context)] From baa0191aff29fab9132f89ed991a19b9ffa9828d Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Mon, 10 Oct 2011 15:44:44 -0600 Subject: [PATCH 374/441] third attempt to fix 64-bit Lion hidden-window problem After all the previous attempts, the problem seems almost trivial: although Apple documents `NSAnyEventMask' as the constant #xFFFFFFFF, it's actually NSUIntegerMax (and the difference matters in 64-bit mode). Merge to 5.2. (cherry picked from commit dc912ee6def7a6e8b4edc13c230b367761c5c722) --- collects/mred/private/wx/cocoa/const.rkt | 2 -- collects/mred/private/wx/cocoa/queue.rkt | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/collects/mred/private/wx/cocoa/const.rkt b/collects/mred/private/wx/cocoa/const.rkt index d2f99cb325e..63e6b8a78f5 100644 --- a/collects/mred/private/wx/cocoa/const.rkt +++ b/collects/mred/private/wx/cocoa/const.rkt @@ -16,8 +16,6 @@ (define NSRoundedBezelStyle 1) (define NSRegularSquareBezelStyle 2) -(define NSAnyEventMask #xffffffff) - (define NSLeftMouseDown 1) (define NSLeftMouseUp 2) (define NSRightMouseDown 3) diff --git a/collects/mred/private/wx/cocoa/queue.rkt b/collects/mred/private/wx/cocoa/queue.rkt index d0ac5d21a38..67af3656dd8 100644 --- a/collects/mred/private/wx/cocoa/queue.rkt +++ b/collects/mred/private/wx/cocoa/queue.rkt @@ -312,6 +312,8 @@ (custodian-shutdown-all c))))))) (set! was-menu-bar #f))) +(define NSAnyEventMask (sub1 (arithmetic-shift 1 (* 8 (ctype-sizeof _NSUInteger))))) + ;; Call this function only in atomic mode: (define (check-one-event wait? dequeue?) (pre-event-sync wait?) From aeac9e4df57264f695392c9211e25f107c193315 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Tue, 11 Oct 2011 06:45:14 -0600 Subject: [PATCH 375/441] add missing GC registration for places Merge to 5.2 (cherry picked from commit 32b5390ad2f5dfe5f7af46b96e33b03e47c20f33) --- collects/tests/racket/place-master-gc.rkt | 5 +++++ src/racket/src/env.c | 1 + src/racket/src/place.c | 1 + 3 files changed, 7 insertions(+) create mode 100644 collects/tests/racket/place-master-gc.rkt diff --git a/collects/tests/racket/place-master-gc.rkt b/collects/tests/racket/place-master-gc.rkt new file mode 100644 index 00000000000..974425f52ac --- /dev/null +++ b/collects/tests/racket/place-master-gc.rkt @@ -0,0 +1,5 @@ +#lang racket/base + +;; Try to trigger master GCs: +(for ([i 100000]) + (make-shared-bytes 1024)) diff --git a/src/racket/src/env.c b/src/racket/src/env.c index dfe7a8ba6c0..60840f13392 100644 --- a/src/racket/src/env.c +++ b/src/racket/src/env.c @@ -292,6 +292,7 @@ Scheme_Env *scheme_engine_instance_init() #if defined(MZ_PRECISE_GC) && defined(MZ_USE_PLACES) { void *signal_handle; + REGISTER_SO(place_object); place_object = (Scheme_Place_Object*) scheme_make_place_object(); signal_handle = scheme_get_signal_handle(); GC_set_put_external_event_fd(signal_handle); diff --git a/src/racket/src/place.c b/src/racket/src/place.c index 96c10b2bf33..de3f85c5bf6 100644 --- a/src/racket/src/place.c +++ b/src/racket/src/place.c @@ -2189,6 +2189,7 @@ static void *place_start_proc_after_stack(void *data_arg, void *stack_base) { channel = place_data->channel; } place_obj = place_data->place_obj; + REGISTER_SO(place_object); place_object = place_obj; place_obj->refcount++; From 6981f40cd6902c4b3fc925aca0d7e48f98e7e4b4 Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Tue, 11 Oct 2011 08:32:42 -0500 Subject: [PATCH 376/441] adjust 2htdp/image library so that it doesn't create arbitrarily large bitmaps when rendering images closes PR 12277 (except I didn't fix the make-bitmap contract) include in 5.2 (cherry picked from commit 10d19bf8d51d24c83e495e957c2a50af265e23a7) --- collects/mrlib/image-core.rkt | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/collects/mrlib/image-core.rkt b/collects/mrlib/image-core.rkt index c151a926cea..214aa6a6486 100644 --- a/collects/mrlib/image-core.rkt +++ b/collects/mrlib/image-core.rkt @@ -230,17 +230,21 @@ has been moved out). (get-output-bytes s))] [else default]))]))) -(define (to-bitmap img) - (let* ([bb (send img get-bb)] - [bm (make-bitmap - (inexact->exact (ceiling (bb-right bb))) - (inexact->exact (ceiling (bb-bottom bb))))] - [bdc (new bitmap-dc% [bitmap bm])]) - (send bdc erase) - (render-image img bdc 0 0) - (begin0 - (send bdc get-bitmap) - (send bdc set-bitmap #f)))) +;; these are used when building a bitmap to render the final image +;; they are probably smaller than the allowed maximum, but they are +;; still huge +(define maximum-width 5000) +(define maximum-height 5000) + +(define (to-bitmap img) + (define bb (send img get-bb)) + (define w (min (inexact->exact (ceiling (bb-right bb))) maximum-width)) + (define h (min (inexact->exact (ceiling (bb-bottom bb))) maximum-height)) + (define bm (make-bitmap w h)) + (define bdc (new bitmap-dc% [bitmap bm])) + (render-image img bdc 0 0) + (send bdc set-bitmap #f) + bm) (define-local-member-name set-use-bitmap-cache?! @@ -350,8 +354,8 @@ has been moved out). (define/public (compute-cached-bitmap) (when use-cached-bitmap? (unless cached-bitmap - (set! cached-bitmap (make-bitmap (+ (inexact->exact (round (bb-right bb))) 1) - (+ (inexact->exact (round (bb-bottom bb))) 1))) + (set! cached-bitmap (make-bitmap (min (+ (inexact->exact (round (bb-right bb))) 1) maximum-width) + (min (+ (inexact->exact (round (bb-bottom bb))) 1) maximum-height))) (define bdc (make-object bitmap-dc% cached-bitmap)) (send bdc erase) (render-image this bdc 0 0) @@ -1032,7 +1036,7 @@ the mask bitmap and the original bitmap are all together in a single bytes! (define sth (apply max latitudes)) (define new-w (ceiling (inexact->exact (- east west)))) (define new-h (ceiling (inexact->exact (- sth nrth)))) - + (define new-bm (make-bitmap new-w new-h)) (define bdc (make-object bitmap-dc% new-bm)) (send bdc set-smoothing 'smoothed) From 804408bdae5dc2241054832e6ee450b75059086c Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Tue, 11 Oct 2011 10:43:37 -0500 Subject: [PATCH 377/441] error message typo include in 5.2 (cherry picked from commit 95e29376fd04c54c9e4a4647fc6e95b73d5c0b21) --- collects/mred/private/mrcontainer.rkt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collects/mred/private/mrcontainer.rkt b/collects/mred/private/mrcontainer.rkt index d947ba82973..fce9f336ef7 100644 --- a/collects/mred/private/mrcontainer.rkt +++ b/collects/mred/private/mrcontainer.rkt @@ -87,7 +87,7 @@ (unless (and (procedure? f) (procedure-arity-includes? f 1)) (raise-type-error (who->name '(method container<%> change-children)) - "procedure or arity 1" + "procedure of arity 1" f)) (send (get-wx-panel) change-children (lambda (kids) From 5e141b087d6aa067891d65d6032600b46bb1bbf6 Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Tue, 11 Oct 2011 10:44:00 -0500 Subject: [PATCH 378/441] adjust the autosave gui so that closing the window doesn't cause drracket to exit (this only happened on non-mac os x platforms) include in 5.2 (cherry picked from commit 4d00b13ce0f28e876ea87bc4159673c274247f7b) --- collects/framework/private/autosave.rkt | 81 +++++++++++-------------- 1 file changed, 37 insertions(+), 44 deletions(-) diff --git a/collects/framework/private/autosave.rkt b/collects/framework/private/autosave.rkt index f0946543902..2fc4e4efaf3 100644 --- a/collects/framework/private/autosave.rkt +++ b/collects/framework/private/autosave.rkt @@ -144,16 +144,22 @@ [filtered-table (filter (λ (x) (file-exists? (cadr x))) table)]) (unless (null? filtered-table) - (let* ([f (new final-frame% - (label (string-constant recover-autosave-files-frame-title)))] + (let* ([dlg (new dialog% + (label (string-constant recover-autosave-files-frame-title)))] [t (new text% (auto-wrap #t))] [ec (new editor-canvas% - (parent (send f get-area-container)) + (parent dlg) (editor t) (line-count 2) + (stretchable-height #f) (style '(no-hscroll)))] - [hp (make-object horizontal-panel% (send f get-area-container))] - [vp (make-object vertical-panel% hp)]) + [hp (new horizontal-panel% + [parent dlg] + [stretchable-height #f])] + [vp (new vertical-panel% + [parent hp] + [stretchable-height #f])] + [details-parent (new horizontal-panel% [parent dlg])]) (send vp set-alignment 'right 'center) (make-object grow-box-spacer-pane% hp) (send t insert (string-constant autosave-explanation)) @@ -161,36 +167,24 @@ (send t set-position 0 0) (send t lock #t) - (for-each (add-table-line vp f) filtered-table) + (for-each (add-table-line vp dlg details-parent) filtered-table) (make-object button% (string-constant autosave-done) vp (λ (x y) - (when (send f can-close?) - (send f on-close) - (send f show #f)))) - (send f show #t) - (yield done-semaphore) + (when (send dlg can-close?) + (send dlg on-close) + (send dlg show #f)))) + (send dlg show #t) (void)))))) - (define done-semaphore (make-semaphore 0)) - - (define final-frame% - (class frame:basic% - (define/augment (can-close?) #t) - (define/augment (on-close) - (inner (void) on-close) - (send (group:get-the-frame-group) - remove-frame - this) - (semaphore-post done-semaphore)) - (super-new))) - - ;; add-table-line : (is-a? area-container<%>) (union #f (is-a?/c top-level-window<%>)) - ;; -> (list (union #f string[filename]) string[filename-file-exists?]) - ;; -> void + ;; add-table-line : (is-a? area-container<%>) + ;; (or/c #f (is-a?/c top-level-window<%>)) + ;; (is-a? area-container<%>) + ;; -> (list/c (or/c #f path?) path?) + ;; -> void? ;; adds in a line to the overview table showing this pair of files. - (define (add-table-line area-container parent) + (define (add-table-line area-container dlg show-details-parent) (λ (table-entry) (letrec ([orig-file (car table-entry)] [backup-file (cadr table-entry)] @@ -221,7 +215,7 @@ [details (make-object button% (string-constant autosave-details) hp (λ (x y) - (show-files table-entry)))] + (show-files table-entry show-details-parent dlg)))] [delete (make-object button% (string-constant autosave-delete-button) @@ -235,7 +229,7 @@ (string-constant autosave-recover) hp (λ (recover y) - (let ([filename-result (recover-file parent table-entry)]) + (let ([filename-result (recover-file dlg table-entry)]) (when filename-result (disable-line) (send msg2 set-label (string-constant autosave-recovered!)) @@ -276,23 +270,21 @@ (delete-file autosave-file) #t)))) - ;; show-files : (list (union #f string[filename]) string) -> void - (define (show-files table-entry) + ;; show-files : (list (or/c #f path?) path?) (is-a?/c area-container<%>) (is-a?/c dialog%) -> void + (define (show-files table-entry show-details-parent dlg) (let ([file1 (list-ref table-entry 0)] [file2 (list-ref table-entry 1)]) - (define frame (make-object show-files-frame% - (if file1 - (string-constant autosave-compare-files) - (string-constant autosave-show-autosave)) - #f - (if file1 600 300) - 600)) - (define hp (new horizontal-panel% - (parent (send frame get-area-container)))) + (send dlg begin-container-sequence) + (define had-children? #f) + (send show-details-parent change-children (λ (x) + (set! had-children? (not (null? x))) + '())) (when file1 - (add-file-viewer file1 hp (string-constant autosave-original-label))) - (add-file-viewer file2 hp (string-constant autosave-autosave-label)) - (send frame show #t))) + (add-file-viewer file1 show-details-parent (string-constant autosave-original-label))) + (add-file-viewer file2 show-details-parent (string-constant autosave-autosave-label)) + (send dlg end-container-sequence) + (unless had-children? + (send dlg center)))) ;; add-file-viewer : path? -> void (define (add-file-viewer filename parent label) @@ -305,6 +297,7 @@ #:quote-amp? #f)] [parent vp])) (define ec (make-object editor-canvas% vp t)) + (send ec min-height 400) (send t load-file filename) (send t hide-caret #t) (send t lock #t)) From c760197bd05a8882a38aa2824521271f82859571 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Tue, 11 Oct 2011 16:15:40 -0600 Subject: [PATCH 379/441] fix framework doc reference to `set-icon' method Merge to 5.2 (cherry picked from commit f2082e6eeb4a41ad6e1c33416fa4ae59430362a2) --- collects/framework/main.rkt | 4 ++-- collects/scribblings/framework/frame.scrbl | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/collects/framework/main.rkt b/collects/framework/main.rkt index 5b23f4795f0..383b5027834 100644 --- a/collects/framework/main.rkt +++ b/collects/framework/main.rkt @@ -707,10 +707,10 @@ @racket[frame:basic-mixin]. @itemize[ @item{If it is @racket[#f], then its value is ignored.} - @item{If it is a @racket[bitmap%], then the @method[frame% set-icon] is + @item{If it is a @racket[bitmap%], then the @method[top-level-window<%> set-icon] is called with the bitmap, the result of invoking the @racket[bitmap% get-loaded-mask] method, and @racket['both].} - @item{If it is a pair of bitmaps, then the @method[frame% set-icon] + @item{If it is a pair of bitmaps, then the @method[top-level-window<%> set-icon] method is invoked twice, once with each bitmap in the pair. The first bitmap is passed (along with the result of its @racket[bitmap% get-loaded-mask]) and @racket['small], and then the diff --git a/collects/scribblings/framework/frame.scrbl b/collects/scribblings/framework/frame.scrbl index 11c71d5332c..f77140e24ec 100644 --- a/collects/scribblings/framework/frame.scrbl +++ b/collects/scribblings/framework/frame.scrbl @@ -113,7 +113,7 @@ This mixin calls its @method[window<%> accept-drop-files] with @racket[#t]. - It also calls its @method[frame% set-icon] method according to the current + It also calls its @method[top-level-window<%> set-icon] method according to the current value of @racket[frame:current-icon]. See also @racket[frame:reorder-menus]. From a24c809202cfbd24de37ea197a5f35c81449cffe Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Tue, 11 Oct 2011 16:40:54 -0600 Subject: [PATCH 380/441] fix `place-break' on terminated place Merge to 5.2 (cherry picked from commit 0993408c19b5f4d640a381f000f4c31d0b6bffcc) --- src/racket/src/place.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/racket/src/place.c b/src/racket/src/place.c index de3f85c5bf6..9516e275461 100644 --- a/src/racket/src/place.c +++ b/src/racket/src/place.c @@ -515,7 +515,7 @@ static int do_place_break(Scheme_Place *place) Scheme_Place_Object *place_obj; place_obj = place->place_obj; - { + if (place_obj) { mzrt_mutex_lock(place_obj->lock); place_obj->pbreak = 1; From fa0809eb4d9bc6e339c60b58996368bfb82e67fa Mon Sep 17 00:00:00 2001 From: Matthias Felleisen Date: Wed, 12 Oct 2011 09:36:39 -0400 Subject: [PATCH 381/441] document unexpected mouse event reporting; Closes PR 12278 (cherry picked from commit 8cdbd3285b5acc34df301545df26144159e13b83) --- collects/teachpack/2htdp/scribblings/universe.scrbl | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/collects/teachpack/2htdp/scribblings/universe.scrbl b/collects/teachpack/2htdp/scribblings/universe.scrbl index 31f45bb72a6..a3d1f5a4e71 100644 --- a/collects/teachpack/2htdp/scribblings/universe.scrbl +++ b/collects/teachpack/2htdp/scribblings/universe.scrbl @@ -442,10 +442,16 @@ All @tech{MouseEvent}s are represented via strings: coordinates may be negative or larger than the (implicitly) specified width and height. - Note: the computer's software doesn't really notice every single movement + @bold{Note 1}: the operating system doesn't really notice every single movement of the mouse (across the mouse pad). Instead it samples the movements and signals most of them.} -} + + @bold{Note 2}: while mouse events are usually reported in the expected + manner, the operating system doesn't necessarily report them in the + expected order. For example, the Windows operating system insists on + signaling a @racket["move"] event immediately after a @racket["button-up"] + event is discovered. Programmers must design the @racket[on-mouse] + handler to handle any possible mouse event at any moment. } @item{ From 61f2ed8ac784d6d175fd6311042e81baa0fe40b2 Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Tue, 11 Oct 2011 16:32:12 -0500 Subject: [PATCH 382/441] add call to 'test-results' (cherry picked from commit a43973157b82266a97c874a7860dd246601ff5ba) --- collects/redex/examples/cont-mark-transform/all-test.rkt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/collects/redex/examples/cont-mark-transform/all-test.rkt b/collects/redex/examples/cont-mark-transform/all-test.rkt index 56c8966affc..e0188bb4de1 100644 --- a/collects/redex/examples/cont-mark-transform/all-test.rkt +++ b/collects/redex/examples/cont-mark-transform/all-test.rkt @@ -2,4 +2,7 @@ (require "TL-semantics-test.rkt" "SL-semantics-test.rkt" - "CMT-test.rkt") + "CMT-test.rkt" + redex/reduction-semantics) + +(test-results) \ No newline at end of file From 8ad66c4b8dff7c52713ea01fb2c5bb599d1b96f8 Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Wed, 12 Oct 2011 20:45:09 -0500 Subject: [PATCH 383/441] swapped the backwards triangles (cherry picked from commit 770c2d14f807dfd5b1426b18cf5275167e2fce97) --- collects/mrlib/tex-table.rkt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/collects/mrlib/tex-table.rkt b/collects/mrlib/tex-table.rkt index cead332c485..9fde8992910 100644 --- a/collects/mrlib/tex-table.rkt +++ b/collects/mrlib/tex-table.rkt @@ -113,13 +113,13 @@ ("otimes" "⊗") ("div" "Ă·") ("sqcap" "⊓") - ("triangleleft" "â–č") + ("triangleright" "â–č") ("oslash" "⊘") ("ast" "∗") ("sqcup" "⊔") ("vee" "√") ("wedge" "∧") - ("triangleright" "◃") + ("triangleleft" "◃") ("odot" "⊙") ("star" "★") ("dagger" "†") From ff34ed4f0a2048b2228876fa6406a5e216b730d2 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Thu, 13 Oct 2011 05:56:08 -0600 Subject: [PATCH 384/441] fix tab problem in text% Merge to 5.2 (cherry picked from commit 5fb2f56fdffc5646b7858af9fea7eb528a73234a) --- collects/racket/snip/private/snip.rkt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/collects/racket/snip/private/snip.rkt b/collects/racket/snip/private/snip.rkt index 839111f0804..908784dc453 100644 --- a/collects/racket/snip/private/snip.rkt +++ b/collects/racket/snip/private/snip.rkt @@ -697,12 +697,12 @@ (send admin get-editor))]) (let-values ([(n tabs tabspace mult) (let-boxes ([n 0] - [space 0] - [units? #f] - [tabs null]) + [space 0] + [units? #f] + [tabs null]) (set-box! tabs (send admin get-tabs n space units?)) (values n - tabs ;; this should be a vector, right? + tabs ;; a list space (if units? 1 @@ -714,12 +714,12 @@ (if (= i n) (let ([base (if (zero? n) 0 - (vector-ref tabs (- n 1)))]) + (list-ref tabs (- n 1)))]) (let ([tabspace (* tabspace mult)]) (+ base (- (->long tabspace) (modulo (->long (- ex base)) (->long tabspace)))))) - (let ([v (vector-ref tabs i)]) + (let ([v (list-ref tabs i)]) (if ((* mult v) . > . ex) (- (* mult v) ex) (loop (add1 i)))))))))) From d02d7aae9787801230c0c67e4790ba19f96d56c7 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Thu, 13 Oct 2011 06:03:10 -0600 Subject: [PATCH 385/441] add missing test for text% tab fix Merge to 5.2 (cherry picked from commit 6d608e392c301cfcff4529445a74788745ad79cc) --- collects/tests/gracket/wxme.rkt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/collects/tests/gracket/wxme.rkt b/collects/tests/gracket/wxme.rkt index 2315916b51c..c8da28eeaac 100644 --- a/collects/tests/gracket/wxme.rkt +++ b/collects/tests/gracket/wxme.rkt @@ -1414,6 +1414,16 @@ (expect (send t paragraph-end-position 3) 9) (expect (send t line-end-position 3) 9)) +;; ---------------------------------------- +;; tabs + +(let ([t1 (new text%)]) + (send t1 set-admin (new test-editor-admin%)) + (send t1 set-tabs '(100 200 300 400 500 600 700 800 900 1000 100) 1 #t) + (send t1 insert "Hello\tWorld") + (send t1 get-extent (box 0) (box 0))) + + ;; ---------------------------------------- (done) From 8031c88b9ce8348318bc6b7b3b44ab14cae1543c Mon Sep 17 00:00:00 2001 From: Neil Toronto Date: Thu, 13 Oct 2011 16:16:02 -0600 Subject: [PATCH 386/441] Rename plot3d-animating? -> plot->animating? Combine plot-ps-interactive? and plot-pdf-interactive? into plot-ps/pdf-interactive? Rename plot3d-ambient-light-value -> plot3d-ambient-light Fix off-by-one 2D plot area clipping Add warning to docs about 'fit' disappearing Stop providing 'fit', 'derivative', 'gradient' and 'make-vec' from the 'plot' module Merge into 5.2 (cherry picked from commit 522ba14b9f646403a6978c910d615b37f324a601) --- collects/plot/common/parameters.rkt | 17 ++++----- collects/plot/deprecated.rkt | 13 +------ collects/plot/plot2d/area.rkt | 4 +- collects/plot/plot2d/plot.rkt | 12 ++++-- collects/plot/plot3d/area.rkt | 2 +- collects/plot/plot3d/contour.rkt | 8 ++-- collects/plot/plot3d/isosurface.rkt | 18 ++++----- collects/plot/plot3d/line.rkt | 2 +- collects/plot/plot3d/plot.rkt | 52 +++++++++++++------------- collects/plot/plot3d/surface.rkt | 4 +- collects/plot/scribblings/compat.scrbl | 15 +++++++- collects/plot/scribblings/params.scrbl | 15 ++++---- collects/plot/scribblings/plot2d.scrbl | 2 +- collects/plot/tests/compat-tests.rkt | 40 +++++++++----------- collects/plot/tests/fit-test-1.rkt | 35 ++++++++++------- collects/plot/tests/fit-test-2.rkt | 37 ++++++++++-------- 16 files changed, 144 insertions(+), 132 deletions(-) diff --git a/collects/plot/common/parameters.rkt b/collects/plot/common/parameters.rkt index 45d7c15377c..2b0387f8546 100644 --- a/collects/plot/common/parameters.rkt +++ b/collects/plot/common/parameters.rkt @@ -20,8 +20,7 @@ (defparam plot-height exact-positive-integer? 400) (defparam plot-new-window? boolean? #f) (defparam plot-jpeg-quality (integer-in 0 100) 100) -(defparam plot-ps-interactive? boolean? #f) -(defparam plot-pdf-interactive? boolean? #f) +(defparam plot-ps/pdf-interactive? boolean? #f) ;; General appearance @@ -46,6 +45,12 @@ (defparam plot-y-label (or/c string? #f) "y axis") (defparam plot-z-label (or/c string? #f) #f) +(defparam plot-animating? boolean? #f) + +(defproc (animated-samples [samples (and/c exact-integer? (>=/c 2))]) (and/c exact-integer? (>=/c 2)) + (cond [(plot-animating?) (max 2 (ceiling (* 1/4 samples)))] + [else samples])) + ;; Lines (defparam line-samples (and/c exact-integer? (>=/c 2)) 500) @@ -148,18 +153,12 @@ ;; General appearance (defparam plot3d-samples (and/c exact-integer? (>=/c 2)) 41) -(defparam plot3d-animating? boolean? #f) (defparam plot3d-angle real? 30) (defparam plot3d-altitude real? 60) -(defparam plot3d-ambient-light-value (real-in 0 1) 2/3) +(defparam plot3d-ambient-light (real-in 0 1) 2/3) (defparam plot3d-diffuse-light? boolean? #t) (defparam plot3d-specular-light? boolean? #t) -(defproc (samples/animating? [samples (and/c exact-integer? (>=/c 2))] - ) (and/c exact-integer? (>=/c 2)) - (cond [(plot3d-animating?) (max 2 (ceiling (* 1/4 samples)))] - [else samples])) - ;; Surfaces (defparam surface-color plot-color/c 0) diff --git a/collects/plot/deprecated.rkt b/collects/plot/deprecated.rkt index 4f050d4c841..5099f52abb4 100644 --- a/collects/plot/deprecated.rkt +++ b/collects/plot/deprecated.rkt @@ -11,18 +11,9 @@ "plot3d/surface.rkt" "plot3d/renderer.rkt" "utils.rkt" - "deprecated/renderers.rkt" - ;; Curve fitting - "deprecated/fit.rkt" - ;; Miscellaneous - "deprecated/math.rkt") + "deprecated/renderers.rkt") -(provide mix line contour shade surface - ;; Curve fitting - (rename-out [fit-int fit]) - (struct-out fit-result) - ;; Miscellaneous - make-vec derivative gradient) +(provide mix line contour shade surface) (define (mix . renderers) (deprecation-warning "mix" "list") diff --git a/collects/plot/plot2d/area.rkt b/collects/plot/plot2d/area.rkt index 713c3baa5a6..8ed1256b0c3 100644 --- a/collects/plot/plot2d/area.rkt +++ b/collects/plot/plot2d/area.rkt @@ -246,8 +246,8 @@ (define/public (start-renderer rx-min rx-max ry-min ry-max) (reset-drawing-params) - (set-clipping-rect (vector (- area-x-min (plot-line-width)) - (- area-y-min (plot-line-width))) + (set-clipping-rect (vector (+ 1/2 (- area-x-min (plot-line-width))) + (+ 1/2 (- area-y-min (plot-line-width)))) (vector (+ area-x-max (plot-line-width)) (+ area-y-max (plot-line-width)))) (clip-to-bounds rx-min rx-max ry-min ry-max)) diff --git a/collects/plot/plot2d/plot.rkt b/collects/plot/plot2d/plot.rkt index 122127eed3a..5689886c57a 100644 --- a/collects/plot/plot2d/plot.rkt +++ b/collects/plot/plot2d/plot.rkt @@ -131,6 +131,8 @@ (define tick-skip (plot-tick-skip)) (define x-transform (plot-x-transform)) (define y-transform (plot-y-transform)) + (define z-transform (plot-z-transform)) + (define animating? (plot-animating?)) (dc (λ (dc x y) (parameterize ([plot-foreground foreground] @@ -144,7 +146,9 @@ [plot-tick-size tick-size] [plot-tick-skip tick-skip] [plot-x-transform x-transform] - [plot-y-transform y-transform]) + [plot-y-transform y-transform] + [plot-z-transform z-transform] + [plot-animating? animating?]) (plot/dc renderer-tree dc x y width height #:x-min x-min #:x-max x-max #:y-min y-min #:y-max y-max #:title title #:x-label x-label #:y-label y-label #:legend-anchor legend-anchor))) @@ -211,10 +215,10 @@ (define dc (case real-kind [(ps) (new post-script-dc% - [interactive (plot-ps-interactive?)] [parent #f] [use-paper-bbox #f] [as-eps #t] - [width width] [height height] [output output])] + [interactive (plot-ps/pdf-interactive?)] [parent #f] [use-paper-bbox #f] + [as-eps #t] [width width] [height height] [output output])] [(pdf) (new pdf-dc% - [interactive (plot-pdf-interactive?)] [parent #f] [use-paper-bbox #f] + [interactive (plot-ps/pdf-interactive?)] [parent #f] [use-paper-bbox #f] [width width] [height height] [output output])] [(svg) (new svg-dc% [width width] [height height] [output output] [exists 'truncate/replace])])) diff --git a/collects/plot/plot3d/area.rkt b/collects/plot/plot3d/area.rkt index 9803775e26b..c000c4c0e70 100644 --- a/collects/plot/plot3d/area.rkt +++ b/collects/plot/plot3d/area.rkt @@ -467,7 +467,7 @@ (* 32 (expt (if (cos-angle . > . 0) cos-angle 0.0) 10))] [else 0.0])) ; ambient lighting - (define amb (plot3d-ambient-light-value)) + (define amb (plot3d-ambient-light)) ; put it all together (values (+ amb (* (- 1 amb) diff)) spec)])) diff --git a/collects/plot/plot3d/contour.rkt b/collects/plot/plot3d/contour.rkt index 5c8bcee125c..05ed7646e51 100644 --- a/collects/plot/plot3d/contour.rkt +++ b/collects/plot/plot3d/contour.rkt @@ -21,8 +21,8 @@ (define ((contours3d-render-proc f levels samples colors widths styles alphas label) area) (define-values (x-min x-max y-min y-max z-min z-max) (send area get-bounds)) - (match-define (list xs ys zss) (f x-min x-max (samples/animating? samples) - y-min y-max (samples/animating? samples))) + (match-define (list xs ys zss) (f x-min x-max (animated-samples samples) + y-min y-max (animated-samples samples))) (define zs (cond [(list? levels) levels] [(eq? levels 'auto) (auto-contour-zs z-min z-max)] @@ -91,8 +91,8 @@ contour-colors contour-widths contour-styles alphas label) area) (define-values (x-min x-max y-min y-max z-min z-max) (send area get-bounds)) - (match-define (list xs ys zss) (f x-min x-max (samples/animating? samples) - y-min y-max (samples/animating? samples))) + (match-define (list xs ys zss) (f x-min x-max (animated-samples samples) + y-min y-max (animated-samples samples))) (define contour-zs (cond [(list? levels) levels] diff --git a/collects/plot/plot3d/isosurface.rkt b/collects/plot/plot3d/isosurface.rkt index 923b1988ad5..e8b745fd739 100644 --- a/collects/plot/plot3d/isosurface.rkt +++ b/collects/plot/plot3d/isosurface.rkt @@ -25,9 +25,9 @@ area) (define-values (x-min x-max y-min y-max z-min z-max) (send area get-bounds)) (match-define (list xs ys zs dsss) - (f x-min x-max (samples/animating? samples) - y-min y-max (samples/animating? samples) - z-min z-max (samples/animating? samples))) + (f x-min x-max (animated-samples samples) + y-min y-max (animated-samples samples) + z-min z-max (animated-samples samples))) (send area put-alpha alpha) (send area put-brush color 'solid) @@ -98,9 +98,9 @@ area) (define-values (x-min x-max y-min y-max z-min z-max) (send area get-bounds)) (match-define (list xs ys zs dsss) - (f x-min x-max (samples/animating? samples) - y-min y-max (samples/animating? samples) - z-min z-max (samples/animating? samples))) + (f x-min x-max (animated-samples samples) + y-min y-max (animated-samples samples) + z-min z-max (animated-samples samples))) (define-values (fd-min fd-max) (let ([regular-ds (filter regular? (3d-sample->list dsss))]) @@ -189,9 +189,9 @@ (define ((polar3d-render-proc f g samples color line-color line-width line-style alpha label) area) (define-values (x-min x-max y-min y-max z-min z-max) (send area get-bounds)) (match-define (list xs ys zs dsss) - (g x-min x-max (samples/animating? samples) - y-min y-max (samples/animating? samples) - z-min z-max (samples/animating? samples))) + (g x-min x-max (animated-samples samples) + y-min y-max (animated-samples samples) + z-min z-max (animated-samples samples))) (send area put-alpha alpha) (send area put-brush color 'solid) diff --git a/collects/plot/plot3d/line.rkt b/collects/plot/plot3d/line.rkt index 37d7b05beb0..e7ced21fc5c 100644 --- a/collects/plot/plot3d/line.rkt +++ b/collects/plot/plot3d/line.rkt @@ -65,5 +65,5 @@ [#:alpha alpha (real-in 0 1) (line-alpha)] [#:label label (or/c string? #f) #f] ) renderer3d? - (lines3d-renderer (λ () (sample-parametric f t-min t-max (samples/animating? samples))) + (lines3d-renderer (λ () (sample-parametric f t-min t-max (animated-samples samples))) x-min x-max y-min y-max z-min z-max color width style alpha label)) diff --git a/collects/plot/plot3d/plot.rkt b/collects/plot/plot3d/plot.rkt index 1b0ffb30886..2df82378ea0 100644 --- a/collects/plot/plot3d/plot.rkt +++ b/collects/plot/plot3d/plot.rkt @@ -93,11 +93,11 @@ (send area end-plot) (when (and (not (empty? legend-entries)) - (or (not (plot3d-animating?)) + (or (not (plot-animating?)) (not (equal? (plot-legend-anchor) 'center)))) (send area put-legend legend-entries)) - (when (plot3d-animating?) (send area put-angles)) + (when (plot-animating?) (send area put-angles)) (send area restore-drawing-params))))) @@ -154,31 +154,31 @@ (define x-transform (plot-x-transform)) (define y-transform (plot-y-transform)) (define z-transform (plot-z-transform)) + (define animating? (plot-animating?)) (define samples (plot3d-samples)) - (define animating? (plot3d-animating?)) - (define ambient-light-value (plot3d-ambient-light-value)) + (define ambient-light (plot3d-ambient-light)) (define diffuse-light? (plot3d-diffuse-light?)) (define specular-light? (plot3d-specular-light?)) (dc (λ (dc x y) - (parameterize ([plot-foreground foreground] - [plot-background background] - [plot-foreground-alpha foreground-alpha] - [plot-background-alpha background-alpha] - [plot-font-size font-size] - [plot-font-family font-family] - [plot-line-width line-width] - [plot-legend-box-alpha legend-box-alpha] - [plot-tick-size tick-size] - [plot-tick-skip tick-skip] - [plot-x-transform x-transform] - [plot-y-transform y-transform] - [plot-z-transform z-transform] - [plot3d-samples samples] - [plot3d-animating? animating?] - [plot3d-ambient-light-value ambient-light-value] - [plot3d-diffuse-light? diffuse-light?] - [plot3d-specular-light? specular-light?]) + (parameterize ([plot-foreground foreground] + [plot-background background] + [plot-foreground-alpha foreground-alpha] + [plot-background-alpha background-alpha] + [plot-font-size font-size] + [plot-font-family font-family] + [plot-line-width line-width] + [plot-legend-box-alpha legend-box-alpha] + [plot-tick-size tick-size] + [plot-tick-skip tick-skip] + [plot-x-transform x-transform] + [plot-y-transform y-transform] + [plot-z-transform z-transform] + [plot-animating? animating?] + [plot3d-samples samples] + [plot3d-ambient-light ambient-light] + [plot3d-diffuse-light? diffuse-light?] + [plot3d-specular-light? specular-light?]) (plot3d/dc renderer-tree dc x y width height #:x-min x-min #:x-max x-max #:y-min y-min #:y-max y-max #:z-min z-min #:z-max z-max @@ -203,7 +203,7 @@ ) (is-a?/c image-snip%) (make-3d-plot-snip (λ (angle altitude anim?) - (parameterize ([plot3d-animating? (if anim? #t (plot3d-animating?))]) + (parameterize ([plot-animating? (if anim? #t (plot-animating?))]) (plot3d-bitmap renderer-tree #:x-min x-min #:x-max x-max #:y-min y-min #:y-max y-max #:z-min z-min #:z-max z-max @@ -264,10 +264,10 @@ (define dc (case real-kind [(ps) (new post-script-dc% - [interactive (plot-ps-interactive?)] [parent #f] [use-paper-bbox #f] [as-eps #t] - [width width] [height height] [output output])] + [interactive (plot-ps/pdf-interactive?)] [parent #f] [use-paper-bbox #f] + [as-eps #t] [width width] [height height] [output output])] [(pdf) (new pdf-dc% - [interactive (plot-pdf-interactive?)] [parent #f] [use-paper-bbox #f] + [interactive (plot-ps/pdf-interactive?)] [parent #f] [use-paper-bbox #f] [width width] [height height] [output output])] [(svg) (new svg-dc% [width width] [height height] [output output] [exists 'truncate/replace])])) diff --git a/collects/plot/plot3d/surface.rkt b/collects/plot/plot3d/surface.rkt index 5e6943ad94e..e858f586d0e 100644 --- a/collects/plot/plot3d/surface.rkt +++ b/collects/plot/plot3d/surface.rkt @@ -23,8 +23,8 @@ (define ((surface3d-render-proc f samples color style line-color line-width line-style alpha label) area) (define-values (x-min x-max y-min y-max z-min z-max) (send area get-bounds)) - (match-define (list xs ys zss) (f x-min x-max (samples/animating? samples) - y-min y-max (samples/animating? samples))) + (match-define (list xs ys zss) (f x-min x-max (animated-samples samples) + y-min y-max (animated-samples samples))) (send area put-alpha alpha) (send area put-brush color style) diff --git a/collects/plot/scribblings/compat.scrbl b/collects/plot/scribblings/compat.scrbl index 0c37b0686eb..8ec712b9dae 100644 --- a/collects/plot/scribblings/compat.scrbl +++ b/collects/plot/scribblings/compat.scrbl @@ -129,8 +129,17 @@ Returns @racket[#t] if @racket[v] is one of the following symbols, @section[#:tag "curve-fit"]{Curve Fitting} -The @racketmodname[plot] library uses a non-linear, least-squares fit -algorithm to fit parameterized functions to given data. +@define[fit-warning]{ +@para{ +@bold{Do not use the @(racket fit) function. It is going to be removed in Racket 5.2.1.} +It relies on old C code that nobody understands or is willing to maintain, and that is also slightly crashy. +}} + +@fit-warning + +Quite independent of plotting, and for reasons lost in the sands of time, +the @racketmodname[plot] library provides a non-linear, least-squares +fit algorithm to fit parameterized functions to given data. The code that implements the algorithm is public domain, and is used by the @tt{gnuplot} package. @@ -204,6 +213,8 @@ A more realistic example can be found in (list-of (vector/c real? real? real? real?)))]) fit-result?]{ +@fit-warning + Attempts to fit a @defterm{fittable function} to the data that is given. The @racket[guess-list] should be a set of arguments and values. The more accurate your initial guesses are, the more likely diff --git a/collects/plot/scribblings/params.scrbl b/collects/plot/scribblings/params.scrbl index 687f4e364e9..3aaa1ce164c 100644 --- a/collects/plot/scribblings/params.scrbl +++ b/collects/plot/scribblings/params.scrbl @@ -27,12 +27,8 @@ before using @(racket plot) or @(racket plot3d).} The quality of JPEG images written by @(racket plot-file) and @(racket plot3d-file). See @(method bitmap% save-file). } -@doc-apply[plot-ps-interactive?]{ -If @(racket #t), @(racket plot-file) and @(racket plot3d-file) open a dialog when writing PostScript files. See @(racket post-script-dc%). -} - -@doc-apply[plot-pdf-interactive?]{ -If @(racket #t), @(racket plot-file) and @(racket plot3d-file) open a dialog when writing PDF files. See @(racket pdf-dc%). +@doc-apply[plot-ps/pdf-interactive?]{ +If @(racket #t), @(racket plot-file) and @(racket plot3d-file) open a dialog when writing PostScript or PDF files. See @(racket post-script-dc%) and @(racket pdf-dc%). } @section{Axis Transforms} @@ -96,6 +92,10 @@ See @(racket ->pen-color) and @(racket ->brush-color) for details on how PLoT in @doc-apply[plot-z-label]{The title and axis labels. A @(racket #f) value means the label is not drawn and takes no space. A @(racket "") value effectively means the label is not drawn, but it takes space. } +@doc-apply[plot-animating?]{ +When @(racket #t), certain renderers draw simplified plots to speed up drawing. PLoT sets it to @(racket #t), for example, when a user is clicking and dragging a 3D plot to rotate it. +} + @section{Lines} @doc-apply[line-samples] @@ -189,10 +189,9 @@ These parameters do not control the @italic{typical} appearance of plots. Instea @section{3D General Appearance} @doc-apply[plot3d-samples] -@doc-apply[plot3d-animating?] @doc-apply[plot3d-angle] @doc-apply[plot3d-altitude] -@doc-apply[plot3d-ambient-light-value] +@doc-apply[plot3d-ambient-light] @doc-apply[plot3d-diffuse-light?] @doc-apply[plot3d-specular-light?] diff --git a/collects/plot/scribblings/plot2d.scrbl b/collects/plot/scribblings/plot2d.scrbl index 6e0dee80b0b..9893030dc21 100644 --- a/collects/plot/scribblings/plot2d.scrbl +++ b/collects/plot/scribblings/plot2d.scrbl @@ -62,7 +62,7 @@ Plot to different backends. Each of these procedures has the same keyword argume Use @(racket plot-file) to save a plot to a file. When creating a JPEG file, the parameter @(racket plot-jpeg-quality) determines its quality. -When creating a PostScript or PDF file, the parameters @(racket plot-ps-interactive?) and @(racket plot-pdf-interactive?) determine whether the user is given a dialog for setting printing parameters. +When creating a PostScript or PDF file, the parameter @(racket plot-ps/pdf-interactive?) determines whether the user is given a dialog for setting printing parameters. (See @(racket post-script-dc%) and @(racket pdf-dc%).) When @(racket kind) is @(racket 'auto), @(racket plot-file) tries to determine the kind of file to write from the file name extension. diff --git a/collects/plot/tests/compat-tests.rkt b/collects/plot/tests/compat-tests.rkt index dcf2573f0fb..22caf316d19 100644 --- a/collects/plot/tests/compat-tests.rkt +++ b/collects/plot/tests/compat-tests.rkt @@ -1,7 +1,7 @@ #reader(lib"read.ss""wxme")WXME0108 ## #| This file uses the GRacket editor format. - Open this file in DrRacket version 5.1.3.11 or later to read it. + Open this file in DrRacket version 5.2.0.1 or later to read it. Most likely, it was created by saving a program in DrRacket, and it probably contains a program with non-text elements @@ -446,7 +446,7 @@ 255 255 -1 -1 43 1 #"\0" 0 -1 1 #"\0" 1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 1 0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 0 255 -255 255 -1 -1 0 1595 0 26 3 12 #"#lang racket" +255 255 -1 -1 0 1589 0 26 3 12 #"#lang racket" 0 0 4 29 1 #"\n" 0 0 4 29 1 #"\n" 0 0 17 3 1 #"#" @@ -494,6 +494,18 @@ 0 0 4 29 1 #"\n" 0 0 4 29 1 #"\n" 0 0 22 3 1 #"(" +0 0 14 3 7 #"require" +0 0 4 3 1 #" " +0 0 22 3 1 #"(" +0 0 14 3 7 #"only-in" +0 0 4 3 1 #" " +0 0 14 3 11 #"plot/compat" +0 0 4 3 1 #" " +0 0 14 3 8 #"gradient" +0 0 22 3 2 #"))" +0 0 4 29 1 #"\n" +0 0 4 29 1 #"\n" +0 0 22 3 1 #"(" 0 0 15 3 6 #"define" 0 0 4 3 1 #" " 0 0 22 3 1 #"(" @@ -542,8 +554,7 @@ 0 0 4 3 1 #" " 0 0 19 3 1 #"\"" 0 0 19 3 3 #"The" -0 0 19 3 1 #" " -0 0 19 3 37 #"old plot library produced this plot:\"" +0 0 19 3 38 #" old plot library produced this plot:\"" 0 0 22 3 1 #")" 0 0 4 29 1 #"\n" 0 0 4 3 2 #" " @@ -742,21 +753,6 @@ 0 0 22 3 2 #"))" 0 0 4 29 1 #"\n" 0 0 4 3 2 #" " -0 0 22 3 1 #"(" -0 0 15 3 6 #"define" -0 0 4 3 1 #" " -0 0 14 3 8 #"gradient" -0 0 4 3 1 #" " -0 0 22 3 1 #"(" -0 0 14 3 15 #"dynamic-require" -0 0 4 3 1 #" " -0 0 14 3 11 #"module-path" -0 0 4 3 1 #" " -0 0 20 3 1 #"'" -0 0 14 3 8 #"gradient" -0 0 22 3 2 #"))" -0 0 4 29 1 #"\n" -0 0 4 3 2 #" " 0 0 4 29 1 #"\n" 0 0 4 3 2 #" " 0 0 17 3 71 @@ -14292,8 +14288,7 @@ 0 0 4 3 1 #" " 0 0 19 3 1 #"\"" 0 0 19 3 7 #"Testing" -0 0 19 3 1 #" " -0 0 19 3 18 #"plot's #:out-file\"" +0 0 19 3 19 #" plot's #:out-file\"" 0 0 22 3 1 #")" 0 0 4 29 1 #"\n" 0 0 4 3 2 #" " @@ -14349,8 +14344,7 @@ 0 0 4 3 1 #" " 0 0 19 3 1 #"\"" 0 0 19 3 7 #"Testing" -0 0 19 3 1 #" " -0 0 19 3 20 #"plot3d's #:out-file\"" +0 0 19 3 21 #" plot3d's #:out-file\"" 0 0 22 3 1 #")" 0 0 4 29 1 #"\n" 0 0 4 3 2 #" " diff --git a/collects/plot/tests/fit-test-1.rkt b/collects/plot/tests/fit-test-1.rkt index 132e285e8ee..9e3f47ed727 100644 --- a/collects/plot/tests/fit-test-1.rkt +++ b/collects/plot/tests/fit-test-1.rkt @@ -1,7 +1,7 @@ #reader(lib"read.ss""wxme")WXME0108 ## #| This file uses the GRacket editor format. - Open this file in DrRacket version 5.1.3.11 or later to read it. + Open this file in DrRacket version 5.2.0.1 or later to read it. Most likely, it was created by saving a program in DrRacket, and it probably contains a program with non-text elements @@ -221,12 +221,15 @@ 0 71 1 #"\0" 1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1.0 1.0 1.0 0 100 0 0 0 0 -1 -1 0 1 #"\0" -0 -1 1 #"\0" -1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 200 0 0 0 0 0 -1 -1 0 1 -#"\0" 0 75 10 #"Monospace\0" 0.0 10 90 -1 90 -1 3 -1 0 1 0 1 0 0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 0 255 255 255 1 -1 0 1 #"\0" +0 -1 1 #"\0" +1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 200 0 0 0 0 +0 -1 -1 4 1 #"\0" +0 -1 1 #"\0" +1.0 0 92 -1 -1 -1 -1 -1 0 0 0 0 0 1 0.0 0.0 0.0 0.0 0.0 0.0 0 0 0 255 +255 0 -1 -1 0 1 #"\0" 0 75 1 #"\0" 0.0 11 90 -1 90 -1 3 -1 0 1 0 1 0 0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 0 255 255 255 1 -1 0 1 #"\0" @@ -356,7 +359,7 @@ #"macro-debugger/syntax-browser/properties color-text% basic\0" 0 70 1 #"\0" 1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0 --1 -1 98 1 #"\0" +-1 -1 99 1 #"\0" 0 -1 1 #"\0" 1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 190 190 190 0 0 0 -1 -1 4 1 #"\0" @@ -443,10 +446,7 @@ 255 255 -1 -1 43 1 #"\0" 0 -1 1 #"\0" 1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 1 0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 0 255 -255 255 -1 -1 4 1 #"\0" -0 -1 1 #"\0" -1.0 0 92 -1 -1 -1 -1 -1 0 0 0 0 0 1 0.0 0.0 0.0 0.0 0.0 0.0 0 0 0 255 -255 0 -1 -1 0 250 0 26 3 12 #"#lang racket" +255 255 -1 -1 0 259 0 26 3 12 #"#lang racket" 0 0 4 29 1 #"\n" 0 0 4 29 1 #"\n" 0 0 17 3 81 @@ -457,9 +457,19 @@ 0 0 4 29 1 #"\n" 0 0 22 3 1 #"(" 0 0 14 3 7 #"require" -0 0 17 3 1 #" " +0 0 4 3 1 #" " 0 0 14 3 4 #"plot" -0 0 22 3 1 #")" +0 0 4 29 1 #"\n" +0 0 4 3 9 #" " +0 0 22 3 1 #"(" +0 0 14 3 7 #"only-in" +0 0 4 3 1 #" " +0 0 14 3 11 #"plot/compat" +0 0 4 3 1 #" " +0 0 14 3 3 #"fit" +0 0 4 3 1 #" " +0 0 14 3 23 #"fit-result-final-params" +0 0 22 3 2 #"))" 0 0 4 29 1 #"\n" 0 0 4 29 1 #"\n" 0 0 22 3 1 #"(" @@ -622,8 +632,7 @@ 0 0 14 3 9 #"displayln" 0 0 4 3 1 #" " 0 0 19 3 1 #"\"" -0 0 19 3 4 #"The " -0 0 19 3 37 #"old plot library produced this plot:\"" +0 0 19 3 41 #"The old plot library produced this plot:\"" 0 0 22 3 1 #")" 0 0 4 29 1 #"\n" 0 2 41 4 1 #"\0" diff --git a/collects/plot/tests/fit-test-2.rkt b/collects/plot/tests/fit-test-2.rkt index fd8b256223d..bad31fed8eb 100644 --- a/collects/plot/tests/fit-test-2.rkt +++ b/collects/plot/tests/fit-test-2.rkt @@ -1,7 +1,7 @@ #reader(lib"read.ss""wxme")WXME0108 ## #| This file uses the GRacket editor format. - Open this file in DrRacket version 5.1.3.12 or later to read it. + Open this file in DrRacket version 5.2.0.1 or later to read it. Most likely, it was created by saving a program in DrRacket, and it probably contains a program with non-text elements @@ -446,7 +446,7 @@ 255 255 -1 -1 43 1 #"\0" 0 -1 1 #"\0" 1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 1 0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 0 255 -255 255 -1 -1 0 748 0 26 3 12 #"#lang racket" +255 255 -1 -1 0 753 0 26 3 12 #"#lang racket" 0 0 4 29 1 #"\n" 0 0 4 29 1 #"\n" 0 0 17 3 81 @@ -461,7 +461,19 @@ 0 0 14 3 4 #"plot" 0 0 4 3 1 #" " 0 0 14 3 8 #"rackunit" -0 0 22 3 1 #")" +0 0 4 29 1 #"\n" +0 0 4 3 9 #" " +0 0 22 3 1 #"(" +0 0 14 3 7 #"only-in" +0 0 4 3 1 #" " +0 0 14 3 11 #"plot/compat" +0 0 4 3 1 #" " +0 0 14 3 3 #"fit" +0 0 4 3 1 #" " +0 0 14 3 19 #"fit-result-function" +0 0 4 3 1 #" " +0 0 14 3 23 #"fit-result-final-params" +0 0 22 3 2 #"))" 0 0 4 29 1 #"\n" 0 0 4 29 1 #"\n" 0 0 17 3 45 #";; This is data from the Cavendish experiment" @@ -1416,8 +1428,7 @@ 0 0 4 3 1 #" " 0 0 19 3 1 #"\"" 0 0 19 3 3 #"The" -0 0 19 3 1 #" " -0 0 19 3 32 #"old library produced this plot:\"" +0 0 19 3 33 #" old library produced this plot:\"" 0 0 22 3 1 #")" 0 0 4 29 1 #"\n" 0 2 83 4 1 #"\0" @@ -2593,38 +2604,32 @@ 0 0 17 3 1 #" " 0 0 17 3 1 #"a" 0 0 17 3 1 #" " -0 0 17 3 4 #"44.5" -0 0 17 3 5 #" 0.5)" +0 0 17 3 9 #"44.5 0.5)" 0 0 4 29 1 #"\n" 0 0 17 3 2 #";(" 0 0 17 3 7 #"check-=" 0 0 17 3 1 #" " 0 0 17 3 3 #"tau" 0 0 17 3 1 #" " -0 0 17 3 4 #"57.5" -0 0 17 3 5 #" 0.5)" +0 0 17 3 9 #"57.5 0.5)" 0 0 4 29 1 #"\n" 0 0 17 3 2 #";(" 0 0 17 3 7 #"check-=" 0 0 17 3 1 #" " 0 0 17 3 3 #"phi" 0 0 17 3 1 #" " -0 0 17 3 5 #"-0.38" -0 0 17 3 6 #" 0.05)" +0 0 17 3 11 #"-0.38 0.05)" 0 0 4 29 1 #"\n" 0 0 17 3 2 #";(" 0 0 17 3 7 #"check-=" 0 0 17 3 1 #" " 0 0 17 3 1 #"T" 0 0 17 3 1 #" " -0 0 17 3 4 #"13.1" -0 0 17 3 5 #" 0.5)" +0 0 17 3 9 #"13.1 0.5)" 0 0 4 29 1 #"\n" 0 0 17 3 2 #";(" 0 0 17 3 7 #"check-=" 0 0 17 3 1 #" " -0 0 17 3 6 #"theta0" -0 0 17 3 1 #" " -0 0 17 3 8 #"2.5 0.5)" +0 0 17 3 15 #"theta0 2.5 0.5)" 0 0 4 29 1 #"\n" 0 0 From 9465805f50a665b7f369d500ea38dbb3d3c2977b Mon Sep 17 00:00:00 2001 From: Neil Toronto Date: Fri, 14 Oct 2011 22:04:59 -0600 Subject: [PATCH 387/441] Fixed x/y mixup in 'axes' Removed 'plot-tick-skip' parameter Merge into 5.2 (cherry picked from commit 7270c27141d017a4d3edd19231489a780a111348) --- collects/plot/common/parameters.rkt | 1 - collects/plot/common/ticks.rkt | 2 +- collects/plot/plot2d/decoration.rkt | 4 ++-- collects/plot/plot2d/plot.rkt | 2 -- collects/plot/plot3d/plot.rkt | 2 -- collects/plot/scribblings/params.scrbl | 1 - collects/plot/tests/plot2d-tests.rkt | 2 ++ 7 files changed, 5 insertions(+), 9 deletions(-) diff --git a/collects/plot/common/parameters.rkt b/collects/plot/common/parameters.rkt index 2b0387f8546..dbb8d5ce704 100644 --- a/collects/plot/common/parameters.rkt +++ b/collects/plot/common/parameters.rkt @@ -38,7 +38,6 @@ (defparam plot-legend-box-alpha alpha (real-in 0 1) 2/3) (defparam plot-tick-size (>=/c 0) 10) -(defparam plot-tick-skip exact-positive-integer? 2) (defparam plot-title (or/c string? #f) #f) (defparam plot-x-label (or/c string? #f) "x axis") diff --git a/collects/plot/common/ticks.rkt b/collects/plot/common/ticks.rkt index b5ed92e69ed..d87c12ba667 100644 --- a/collects/plot/common/ticks.rkt +++ b/collects/plot/common/ticks.rkt @@ -42,7 +42,7 @@ (map tick ps labels majors))) (defproc (default-ticks-fun [x-min real?] [x-max real?]) (listof tick?) - (linear-ticks (plot-tick-skip) x-min x-max)) + (linear-ticks 2 x-min x-max)) (defproc (auto-contour-zs [z-min real?] [z-max real?]) (listof real?) (let* ([zs (map tick-p (default-ticks-fun z-min z-max))] diff --git a/collects/plot/plot2d/decoration.rkt b/collects/plot/plot2d/decoration.rkt index 90bdebd46ae..7f2b2335d6c 100644 --- a/collects/plot/plot2d/decoration.rkt +++ b/collects/plot/plot2d/decoration.rkt @@ -76,8 +76,8 @@ [#:x-ticks? x-ticks? boolean? (x-axis-ticks?)] [#:y-ticks? y-ticks? boolean? (y-axis-ticks?)] ) (listof renderer2d?) - (list (x-axis x #:ticks? x-ticks?) - (y-axis y #:ticks? y-ticks?))) + (list (x-axis y #:ticks? x-ticks?) + (y-axis x #:ticks? y-ticks?))) ;; =================================================================================================== ;; Polar axes diff --git a/collects/plot/plot2d/plot.rkt b/collects/plot/plot2d/plot.rkt index 5689886c57a..9555afbb349 100644 --- a/collects/plot/plot2d/plot.rkt +++ b/collects/plot/plot2d/plot.rkt @@ -128,7 +128,6 @@ (define line-width (plot-line-width)) (define legend-box-alpha (plot-legend-box-alpha)) (define tick-size (plot-tick-size)) - (define tick-skip (plot-tick-skip)) (define x-transform (plot-x-transform)) (define y-transform (plot-y-transform)) (define z-transform (plot-z-transform)) @@ -144,7 +143,6 @@ [plot-line-width line-width] [plot-legend-box-alpha legend-box-alpha] [plot-tick-size tick-size] - [plot-tick-skip tick-skip] [plot-x-transform x-transform] [plot-y-transform y-transform] [plot-z-transform z-transform] diff --git a/collects/plot/plot3d/plot.rkt b/collects/plot/plot3d/plot.rkt index 2df82378ea0..97b9b6ded50 100644 --- a/collects/plot/plot3d/plot.rkt +++ b/collects/plot/plot3d/plot.rkt @@ -150,7 +150,6 @@ (define line-width (plot-line-width)) (define legend-box-alpha (plot-legend-box-alpha)) (define tick-size (plot-tick-size)) - (define tick-skip (plot-tick-skip)) (define x-transform (plot-x-transform)) (define y-transform (plot-y-transform)) (define z-transform (plot-z-transform)) @@ -170,7 +169,6 @@ [plot-line-width line-width] [plot-legend-box-alpha legend-box-alpha] [plot-tick-size tick-size] - [plot-tick-skip tick-skip] [plot-x-transform x-transform] [plot-y-transform y-transform] [plot-z-transform z-transform] diff --git a/collects/plot/scribblings/params.scrbl b/collects/plot/scribblings/params.scrbl index 3aaa1ce164c..89654e4cbb2 100644 --- a/collects/plot/scribblings/params.scrbl +++ b/collects/plot/scribblings/params.scrbl @@ -84,7 +84,6 @@ See @(racket ->pen-color) and @(racket ->brush-color) for details on how PLoT in @doc-apply[plot-legend-box-alpha]{The opacity of the filled rectangle behind the legend entries.} @doc-apply[plot-tick-size]{The length of tick lines, in drawing units.} -@doc-apply[plot-tick-skip]{Controls the spacing between major ticks for renderers that use the default tick function, such as the renderers returned by @(racket function) and @(racket surface3d). With the default value @(racket 2), every other tick is major. A tick at @(racket 0) is always major. Major ticks are thicker and labeled; minor ticks are thinner and unlabeled.} @doc-apply[plot-title] @doc-apply[plot-x-label] diff --git a/collects/plot/tests/plot2d-tests.rkt b/collects/plot/tests/plot2d-tests.rkt index 000531b9bcc..9db7b8634ad 100644 --- a/collects/plot/tests/plot2d-tests.rkt +++ b/collects/plot/tests/plot2d-tests.rkt @@ -11,6 +11,8 @@ (plot empty #:x-min -1 #:x-max 1 #:y-min -1 #:y-max 1) +(plot (list (axes 1 2) (function values -4 4))) + (time (plot (function values 0 1000))) (parameterize ([plot-background "black"] From 67dd5e8c1b93487409e4406ada2146d3533fe82a Mon Sep 17 00:00:00 2001 From: Mike Sperber Date: Sat, 15 Oct 2011 14:28:22 +0200 Subject: [PATCH 388/441] Synch German string constants with latest. (cherry picked from commit 2db0791e274650858051a20b75b6d8e80ed34163) --- .../private/german-string-constants.rkt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/collects/string-constants/private/german-string-constants.rkt b/collects/string-constants/private/german-string-constants.rkt index edec0f2aaea..3889fa6273f 100644 --- a/collects/string-constants/private/german-string-constants.rkt +++ b/collects/string-constants/private/german-string-constants.rkt @@ -1120,9 +1120,13 @@ (exited-successfully "Erfolgreich beendet.") (exited-with-error-code "Beendet mit Fehlercode ~a.") ;; ~a is filled in with a number between 1 and 255 (program-ran-out-of-memory "Dem Programm ist der Speicher ausgegangen.") - (last-stack-frame "letzten Stack-Frame zeigen") - (last-stack-frames "die letzten ~a Stack-Frames zeigen") - (next-stack-frames "die nĂ€chsten ~a Stack-Frames zeigen") + + (show-evaluation-terminated-dialog "Den Dialog ‘Auswertung abgebrochen’ zeigen") + (evaluation-terminated-ask "Diesen Dialog das nĂ€chste Mal anzeigen?") + + (last-stack-frame "letzten Stack-Frame anzeigen") + (last-stack-frames "die letzten ~a Stack-Frames anzeigen") + (next-stack-frames "die nĂ€chsten ~a Stack-Frames anzeigen") ;;; welcoming message in repl (language "Sprache") From ab2d140d7d86844926bd3eca41734bfa85d0b292 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Fri, 14 Oct 2011 08:54:46 -0700 Subject: [PATCH 389/441] reader doc fixes Closes PR 11086 (cherry picked from commit e55e0a5e4a94719eb90d09b8a45495e2dad0b76b) --- collects/scribblings/reference/reader.scrbl | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/collects/scribblings/reference/reader.scrbl b/collects/scribblings/reference/reader.scrbl index 508d130a8fa..0d4171eb8a1 100644 --- a/collects/scribblings/reference/reader.scrbl +++ b/collects/scribblings/reference/reader.scrbl @@ -229,13 +229,17 @@ specials with the @litchar{.0} suffix, like @racket[-nan.0] are double-precision, whereas specials with the @litchar{.f} suffix are single-precision. +A @litchar{#} in an @nunterm{inexact} number is the same as +@litchar{0}, but @litchar{#} can be used to suggest +that the digit's actual value is unknown. + @BNF[(list @nunterm{number} @BNF-alt[@nunterm{exact} @nunterm{inexact}]) (list @nunterm{exact} @BNF-alt[@nunterm{exact-integer} @nunterm{exact-rational}] @nunterm{exact-complex}) - (list @nunterm{exact-integer} @BNF-seq[@optional{@nonterm{sign}} @nunterm{digits}]) - (list @nunterm{digits} @kleeneplus{@nunterm{digit}}) + (list @nunterm{exact-integer} @BNF-seq[@optional{@nonterm{sign}} @nunterm{unsigned-integer}]) + (list @nunterm{unsigned-integer} @kleeneplus{@nunterm{digit}}) (list @nunterm{exact-rational} @BNF-seq[@nunterm{exact-integer} @litchar{/} @nunterm{unsigned-integer}]) (list @nunterm{exact-complex} @BNF-seq[@nunterm{exact-rational} @nonterm{sign} @nunterm{exact-rational} @litchar{i}]) (list @nunterm{inexact} @BNF-alt[@nunterm{inexact-real} @@ -263,8 +267,8 @@ single-precision. (list @nonterm{digit@sub{8}} @BNF-alt[@nonterm{digit@sub{2}} @litchar{2} @litchar{3} @litchar{4} @litchar{5} @litchar{6} @litchar{7}]) (list @nonterm{digit@sub{2}} @BNF-alt[@litchar{0} @litchar{1}]) - (list @nonterm{exp-mark@sub{16}} @BNF-alt[@litchar{s} @litchar{d} @litchar{l}]) - (list @nonterm{exp-mark@sub{10}} @BNF-alt[@nonterm{exp-mark@sub{16}} @litchar{e} @litchar{f}]) + (list @nonterm{exp-mark@sub{16}} @BNF-alt[@litchar{s} @litchar{l}]) + (list @nonterm{exp-mark@sub{10}} @BNF-alt[@nonterm{exp-mark@sub{16}} @litchar{d} @litchar{e} @litchar{f}]) (list @nonterm{exp-mark@sub{8}} @nonterm{exp-mark@sub{10}}) (list @nonterm{exp-mark@sub{2}} @nonterm{exp-mark@sub{10}}) (list @nunterm{general-number} @BNF-seq[@optional{@nonterm{exactness}} @nunterm{number}]) From a997bc72fd82ede71bc645ec65c117f2e05be405 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Fri, 14 Oct 2011 09:12:35 -0700 Subject: [PATCH 390/441] add cross-ref from reference to guide on places (cherry picked from commit eba0ca2d4dd874903953a742504d753729528965) --- collects/scribblings/reference/places.scrbl | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/collects/scribblings/reference/places.scrbl b/collects/scribblings/reference/places.scrbl index 87980decf66..6301370169a 100644 --- a/collects/scribblings/reference/places.scrbl +++ b/collects/scribblings/reference/places.scrbl @@ -15,12 +15,7 @@ @; ---------------------------------------------------------------------- -@margin-note{Currently, parallel support for places is enabled - only for Racket 3m (which is the main variant of Racket), and only - by default for Windows, Linux x86/x86_64, and Mac OS X x86/x86_64. To - enable support for other platforms, use @DFlag{enable-places} with - @exec{configure} when building Racket. The @racket[place-enabled?] - function reports whether places run in parallel.} +@guideintro["effective-places"]{places} @note-lib[racket/place] @@ -28,6 +23,13 @@ take advantage of machines with multiple processors, cores, or hardware threads. +@margin-note{Currently, parallel support for places is enabled + only for Racket 3m (which is the main variant of Racket), and only + by default for Windows, Linux x86/x86_64, and Mac OS X x86/x86_64. To + enable support for other platforms, use @DFlag{enable-places} with + @exec{configure} when building Racket. The @racket[place-enabled?] + function reports whether places run in parallel.} + A @deftech{place} is a parallel task that is effectively a separate instance of the Racket virtual machine. Places communicate through @deftech{place channels}, which are endpoints for a two-way buffered From 7ad41cd9dcb34f8de6d12efb4429eac73b35bfe1 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Fri, 14 Oct 2011 09:12:48 -0700 Subject: [PATCH 391/441] fix docs on reading characters Closes PR 11102 (cherry picked from commit 2a39a098a65997565dbda6a738d35b3886cae6be) --- collects/scribblings/reference/reader.scrbl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/collects/scribblings/reference/reader.scrbl b/collects/scribblings/reference/reader.scrbl index 0d4171eb8a1..22dc2fc2e38 100644 --- a/collects/scribblings/reference/reader.scrbl +++ b/collects/scribblings/reference/reader.scrbl @@ -678,10 +678,13 @@ one of the following forms: 3]{@nonterm{digit@sub{8}}}, as in string escapes (see @secref["parse-string"]).} +@;{ + Not implemented: @item{@litchar{#\x}@kleenerange[1 2]{@nonterm{digit@sub{16}}}: Unicode for the hexadecimal number specified by @kleenerange[1 2]{@nonterm{digit@sub{16}}}, as in string escapes (see @secref["parse-string"]).} +} @item{@litchar{#\u}@kleenerange[1 4]{@nonterm{digit@sub{16}}}: like @litchar{#\x}, but with up to four hexadecimal digits.} From 394e62a31e9193fce707fbd9de3040cff8470464 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sat, 15 Oct 2011 07:18:01 -0700 Subject: [PATCH 392/441] add cross-reference between data and read/print descriptions Closes PR 11096 (cherry picked from commit d4f7020cd2c11088530b649fdbee972ab2705f62) --- collects/scribblings/reference/booleans.scrbl | 4 +- collects/scribblings/reference/bytes.scrbl | 2 + collects/scribblings/reference/chars.scrbl | 2 + collects/scribblings/reference/data.scrbl | 6 + collects/scribblings/reference/hashes.scrbl | 3 + collects/scribblings/reference/mz.rkt | 278 +++++++++--------- collects/scribblings/reference/numbers.scrbl | 2 + collects/scribblings/reference/pairs.scrbl | 2 + collects/scribblings/reference/printer.scrbl | 12 +- collects/scribblings/reference/regexps.scrbl | 3 + collects/scribblings/reference/strings.scrbl | 2 + collects/scribblings/reference/vectors.scrbl | 4 + 12 files changed, 178 insertions(+), 142 deletions(-) diff --git a/collects/scribblings/reference/booleans.scrbl b/collects/scribblings/reference/booleans.scrbl index a18c1905d01..25f91ae50e7 100644 --- a/collects/scribblings/reference/booleans.scrbl +++ b/collects/scribblings/reference/booleans.scrbl @@ -9,7 +9,9 @@ depend on a boolean value typically treat anything other than @racket[#f] as true. The @racket[#t] value is always @racket[eq?] to itself, and @racket[#f] is always @racket[eq?] to itself. -See also: @racket[and], @racket[or], @racket[andmap], @racket[ormap]. +@see-read-print["boolean" #:print "booleans"]{booleans} + +See also @racket[and], @racket[or], @racket[andmap], and @racket[ormap]. @defproc[(boolean? [v any/c]) boolean?]{ diff --git a/collects/scribblings/reference/bytes.scrbl b/collects/scribblings/reference/bytes.scrbl index a3fae2021c1..9eee201572c 100644 --- a/collects/scribblings/reference/bytes.scrbl +++ b/collects/scribblings/reference/bytes.scrbl @@ -22,6 +22,8 @@ A byte string can be used as a single-valued sequence (see @secref["sequences"]). The bytes of the string serve as elements of the sequence. See also @racket[in-bytes]. +@see-read-print["string"]{byte strings} + See also: @racket[immutable?]. @; ---------------------------------------- diff --git a/collects/scribblings/reference/chars.scrbl b/collects/scribblings/reference/chars.scrbl index e4c8f211efd..0e183a9bc10 100644 --- a/collects/scribblings/reference/chars.scrbl +++ b/collects/scribblings/reference/chars.scrbl @@ -18,6 +18,8 @@ Two characters are @racket[eqv?] if they correspond to the same scalar value. For each scalar value less than 256, character values that are @racket[eqv?] are also @racket[eq?]. +@see-read-print["character"]{characters} + @; ---------------------------------------- @section{Characters and Scalar Values} diff --git a/collects/scribblings/reference/data.scrbl b/collects/scribblings/reference/data.scrbl index 966bd5633af..2f0b7884b02 100644 --- a/collects/scribblings/reference/data.scrbl +++ b/collects/scribblings/reference/data.scrbl @@ -59,6 +59,8 @@ disappear when placed into a weak box (see @secref["weakbox"]) used as the key in a weak @tech{hash table} (see @secref["hashtables"]), or used as an ephemeron key (see @secref["ephemerons"]). +@see-read-print["symbol"]{symbols} + @defproc[(symbol? [v any/c]) boolean?]{Returns @racket[#t] if @racket[v] is a symbol, @racket[#f] otherwise. @@ -141,6 +143,8 @@ Two keywords are @racket[eq?] if and only if they print the same. Like symbols, keywords are only weakly held by the internal keyword table; see @secref["symbols"] for more information. +@see-read-print["keyword"]{keywords} + @defproc[(keyword? [v any/c]) boolean?]{ Returns @racket[#t] if @racket[v] is a keyword, @racket[#f] otherwise.} @@ -178,6 +182,8 @@ for each pair of keywords is the same as using A @deftech{box} is like a single-element vector, normally used as minimal mutable storage. +A literal or printed box starts with @litchar{#&}. @see-read-print["box"]{boxes} + @defproc[(box? [v any/c]) boolean?]{ Returns @racket[#t] if @racket[v] is a box, @racket[#f] otherwise.} diff --git a/collects/scribblings/reference/hashes.scrbl b/collects/scribblings/reference/hashes.scrbl index 15c16379ee7..e48e9aa399f 100644 --- a/collects/scribblings/reference/hashes.scrbl +++ b/collects/scribblings/reference/hashes.scrbl @@ -80,6 +80,9 @@ keys:}} If a key in an @racket[equal?]-based hash table is mutated hash table's behavior for insertion and lookup operations becomes unpredictable. +A literal or printed hash table starts with @litchar{#hash}, +@litchar{#hasheqv}, or +@litchar{#hasheq}. @see-read-print["hashtable"]{hash tables} @defproc[(hash? [v any/c]) boolean?]{ diff --git a/collects/scribblings/reference/mz.rkt b/collects/scribblings/reference/mz.rkt index d2e6cac1144..4bacbf193b7 100644 --- a/collects/scribblings/reference/mz.rkt +++ b/collects/scribblings/reference/mz.rkt @@ -1,137 +1,145 @@ -(module mz racket/base - (require scribble/struct - scribble/manual - scribble/eval - scribble/decode - racket/contract - "../icons.rkt") - - (provide (all-from-out scribble/manual) - (all-from-out scribble/eval) - (all-from-out racket/contract)) - - (require (for-label racket)) - (provide (for-label (all-from-out racket))) - - (provide mz-examples) - (define mz-eval (make-base-eval)) - (define-syntax mz-examples - (syntax-rules () - [(_ #:eval . rest) - (examples #:eval . rest)] - [(_ . rest) - (examples #:eval mz-eval . rest)])) - - (define AllUnix "Unix and Mac OS X") - (provide AllUnix) - - (provide note-lib) - (define-syntax note-lib - (syntax-rules () - [(_ lib #:use-sources (src ...) . more) - (begin - (declare-exporting lib racket #:use-sources (src ...)) - (defmodule*/no-declare (lib) - (t (make-collect-element - #f null - (lambda (ci) - (collect-put! ci `(racket-extra-lib ,'lib) (racketmodname lib)))) - "The bindings documented in this section are provided by the " - (racketmodname lib) - " and " - (racketmodname racket) - " libraries, but not " (racketmodname racket/base) - "." - . more)))] - [(_ lib . more) - (note-lib lib #:use-sources () . more)])) - - (provide note-init-lib) - (define-syntax note-init-lib - (syntax-rules () - [(_ lib #:use-sources (src ...) . more) - (begin - (declare-exporting lib racket/init #:use-sources (src ...)) - (defmodule*/no-declare (lib) - (t "The bindings documented in this section are provided by the " - (racketmodname lib) - " and " - (racketmodname racket/init) - " libraries, which means that they are available when " - " the Racket executable is started with no command-line arguments." - " They are not provided by " (racketmodname racket/base) - " or " (racketmodname racket) "." - . more)))] - [(_ lib . more) - (note-init-lib lib #:use-sources () . more)])) - - (provide note-lib-only) - (define-syntax note-lib-only - (syntax-rules () - [(_ lib #:use-sources (src ...) . more) - (defmodule lib #:use-sources (src ...) - (t "The bindings documented in this section are provided by the " +#lang at-exp racket/base + +(require scribble/struct + scribble/manual + scribble/eval + scribble/decode + racket/contract + "../icons.rkt") + +(provide (all-from-out scribble/manual) + (all-from-out scribble/eval) + (all-from-out racket/contract)) + +(require (for-label racket)) +(provide (for-label (all-from-out racket))) + +(provide mz-examples) +(define mz-eval (make-base-eval)) +(define-syntax mz-examples + (syntax-rules () + [(_ #:eval . rest) + (examples #:eval . rest)] + [(_ . rest) + (examples #:eval mz-eval . rest)])) + +(define AllUnix "Unix and Mac OS X") +(provide AllUnix) + +(provide note-lib) +(define-syntax note-lib + (syntax-rules () + [(_ lib #:use-sources (src ...) . more) + (begin + (declare-exporting lib racket #:use-sources (src ...)) + (defmodule*/no-declare (lib) + (t (make-collect-element + #f null + (lambda (ci) + (collect-put! ci `(racket-extra-lib ,'lib) (racketmodname lib)))) + "The bindings documented in this section are provided by the " (racketmodname lib) - " library, not " (racketmodname racket/base) - " or " (racketmodname racket) + " and " + (racketmodname racket) + " libraries, but not " (racketmodname racket/base) "." - . more))] - [(_ lib . more) - (note-lib-only lib #:use-sources () . more)])) - - (define (*exnraise s) - (make-element #f (list s " exception is raised"))) - (define-syntax exnraise - (syntax-rules () - [(_ s) (*exnraise (racket s))])) - (define-syntax Exn - (syntax-rules () - [(_ s) (racket s)])) - (provide exnraise Exn) - - (provide margin-note/ref - refalso moreref Guide guideintro guidealso guidesecref - raco-doc) - - (define (margin-note/ref . s) - (apply margin-note - (decode-content (cons magnify s)))) - - (define (refalso tag . s) - (apply margin-note - (decode-content (append (list magnify (secref tag) " also provides information on ") - s - (list "."))))) - - (define (moreref tag . s) - (apply margin-note - (decode-content (append (list magnify (secref tag) " provides more information on ") - s - (list "."))))) - - (define (guidesecref s) - (secref #:doc '(lib "scribblings/guide/guide.scrbl") s)) - - (define (guideintro tag . s) - (apply margin-note - (decode-content (append (list finger (guidesecref tag) " in " Guide " introduces ") - s - (list "."))))) - - (define (guidealso tag) - (apply margin-note - (decode-content (append (list finger "See also " (guidesecref tag) " in " Guide "."))))) - - (define Guide - (other-manual '(lib "scribblings/guide/guide.scrbl"))) - - (define raco-doc - '(lib "scribblings/raco/raco.scrbl")) - - (provide speed) - (define-syntax speed - (syntax-rules () - [(_ id what) - (t "An " (racket id) " application can provide better performance for " - (elem what) - " iteration when it appears directly in a " (racket for) " clause.")]))) + . more)))] + [(_ lib . more) + (note-lib lib #:use-sources () . more)])) + +(provide note-init-lib) +(define-syntax note-init-lib + (syntax-rules () + [(_ lib #:use-sources (src ...) . more) + (begin + (declare-exporting lib racket/init #:use-sources (src ...)) + (defmodule*/no-declare (lib) + (t "The bindings documented in this section are provided by the " + (racketmodname lib) + " and " + (racketmodname racket/init) + " libraries, which means that they are available when " + " the Racket executable is started with no command-line arguments." + " They are not provided by " (racketmodname racket/base) + " or " (racketmodname racket) "." + . more)))] + [(_ lib . more) + (note-init-lib lib #:use-sources () . more)])) + +(provide note-lib-only) +(define-syntax note-lib-only + (syntax-rules () + [(_ lib #:use-sources (src ...) . more) + (defmodule lib #:use-sources (src ...) + (t "The bindings documented in this section are provided by the " + (racketmodname lib) + " library, not " (racketmodname racket/base) + " or " (racketmodname racket) + "." + . more))] + [(_ lib . more) + (note-lib-only lib #:use-sources () . more)])) + +(define (*exnraise s) + (make-element #f (list s " exception is raised"))) +(define-syntax exnraise + (syntax-rules () + [(_ s) (*exnraise (racket s))])) +(define-syntax Exn + (syntax-rules () + [(_ s) (racket s)])) +(provide exnraise Exn) + +(provide margin-note/ref + refalso moreref Guide guideintro guidealso guidesecref + raco-doc) + +(define (margin-note/ref . s) + (apply margin-note + (decode-content (cons magnify s)))) + +(define (refalso tag . s) + (apply margin-note + (decode-content (append (list magnify (secref tag) " also provides information on ") + s + (list "."))))) + +(define (moreref tag . s) + (apply margin-note + (decode-content (append (list magnify (secref tag) " provides more information on ") + s + (list "."))))) + +(define (guidesecref s) + (secref #:doc '(lib "scribblings/guide/guide.scrbl") s)) + +(define (guideintro tag . s) + (apply margin-note + (decode-content (append (list finger (guidesecref tag) " in " Guide " introduces ") + s + (list "."))))) + +(define (guidealso tag) + (apply margin-note + (decode-content (append (list finger "See also " (guidesecref tag) " in " Guide "."))))) + +(define Guide + (other-manual '(lib "scribblings/guide/guide.scrbl"))) + +(define raco-doc + '(lib "scribblings/raco/raco.scrbl")) + +(provide see-read-print) +(define (see-read-print tag-part #:print [print-tag-part tag-part] vals) + @elem{See @secref[(string-append "parse-" tag-part)] + for information on @racket[read]ing + @|vals| and @secref[(string-append "print-" print-tag-part)] + for information on @racket[print]ing @|vals|.}) + +(provide speed) +(define-syntax speed + (syntax-rules () + [(_ id what) + (t "An " (racket id) " application can provide better performance for " + (elem what) + " iteration when it appears directly in a " (racket for) " clause.")])) diff --git a/collects/scribblings/reference/numbers.scrbl b/collects/scribblings/reference/numbers.scrbl index 57d9c108ed3..a5ac42d59c2 100644 --- a/collects/scribblings/reference/numbers.scrbl +++ b/collects/scribblings/reference/numbers.scrbl @@ -87,6 +87,8 @@ exact, and when they are @racket[=] (except for @racket[+nan.0], @racket[+nan.f] @racket[+0.0], @racket[+0.0f0], @racket[-0.0], and @racket[-0.0f0], as noted above). Two numbers are @racket[equal?] when they are @racket[eqv?]. +@see-read-print["number"]{numbers} + @local-table-of-contents[] @; ---------------------------------------- diff --git a/collects/scribblings/reference/pairs.scrbl b/collects/scribblings/reference/pairs.scrbl index 4ccc6386a38..2e677f1d8ce 100644 --- a/collects/scribblings/reference/pairs.scrbl +++ b/collects/scribblings/reference/pairs.scrbl @@ -97,6 +97,8 @@ Cyclic data structures can be created using only immutable pairs via and using some number of @racket[cdr]s returns to the starting pair, then the pair is not a list. +@see-read-print["pair" #:print "pairs"]{pairs and lists} + @; ---------------------------------------- @section{Pair Constructors and Selectors} diff --git a/collects/scribblings/reference/printer.scrbl b/collects/scribblings/reference/printer.scrbl index 4a5ec9c9279..62009bc9cc9 100644 --- a/collects/scribblings/reference/printer.scrbl +++ b/collects/scribblings/reference/printer.scrbl @@ -97,7 +97,7 @@ Symbols @racket[print] the same as they @racket[write], unless @racket[print]ed form is prefixed with @litchar{'}. For the purposes of printing enclosing datatypes, a symbol is @tech{quotable}. -@section{Printing Numbers} +@section[#:tag "print-number"]{Printing Numbers} A @tech{number} prints the same way in @racket[write], @racket[display], and @racket[print] modes. For the purposes of printing enclosing @@ -126,7 +126,7 @@ determined by @racket[numerator] and @racket[denominator]). A negative @tech{exact number} prints with a @litchar{-} prefix on the printed form of the number's exact negation. -@section{Printing Booleans} +@section[#:tag "print-booleans"]{Printing Booleans} The @tech{boolean} constant @racket[#t] prints as @litchar{#true} or @litchar{#t} in all modes (@racket[display], @racket[write], and @racket[print]), @@ -219,7 +219,7 @@ always @tech{quotable}, a pair is @tech{quotable} when its @racket[car] and @racket[cdr] are @tech{quotable}, and a mutable list is never @tech{quotable}. -@section{Printing Strings} +@section[#:tag "print-string"]{Printing Strings} All @tech{strings} @racket[display] as their literal character sequences. @@ -419,7 +419,7 @@ When the @racket[print-box] parameter is set to @racket[#f], a box prints as @litchar{#} and counts as @tech{quotable}. -@section{Printing Characters} +@section[#:tag "print-character"]{Printing Characters} @tech{Characters} with the special names described in @secref["parse-character"] @racket[write] and @racket[print] using the @@ -439,7 +439,7 @@ For the purposes of printing enclosing datatypes, a character is @tech{quotable}. -@section{Printing Keywords} +@section[#:tag "print-keyword"]{Printing Keywords} @tech{Keywords} @racket[write], @racket[print], and @racket[display] the same as symbols (see @secref["print-symbol"]) except with a leading @@ -452,7 +452,7 @@ For the purposes of printing enclosing datatypes, a keyword is @tech{quotable}. -@section{Printing Regular Expressions} +@section[#:tag "print-regexp"]{Printing Regular Expressions} @tech{Regexp values} @racket[write], @racket[display], and @racket[print] starting with @litchar{#px} (for @racket[pregexp]-based regexps) or diff --git a/collects/scribblings/reference/regexps.scrbl b/collects/scribblings/reference/regexps.scrbl index c810e9858ec..ed00b16b5d0 100644 --- a/collects/scribblings/reference/regexps.scrbl +++ b/collects/scribblings/reference/regexps.scrbl @@ -54,6 +54,9 @@ compatible with Perl. In addition, Racket constants written with @litchar{#rx} or @litchar{#px} (see @secref["reader"]) produce compiled regexp values. +A literal or printed regular expression starts with @litchar{#rx} or +@litchar{#px}. @see-read-print["regexp"]{regular expressions} + The internal size of a regexp value is limited to 32 kilobytes; this limit roughly corresponds to a source string with 32,000 literal characters or 5,000 operators. diff --git a/collects/scribblings/reference/strings.scrbl b/collects/scribblings/reference/strings.scrbl index 2a88811bfd2..1cd62544dad 100644 --- a/collects/scribblings/reference/strings.scrbl +++ b/collects/scribblings/reference/strings.scrbl @@ -22,6 +22,8 @@ A string can be used as a single-valued sequence (see @secref["sequences"]). The characters of the string serve as elements of the sequence. See also @racket[in-string]. +@see-read-print["string"]{strings} + See also: @racket[immutable?], @racket[symbol->string], @racket[bytes->string/utf-8]. diff --git a/collects/scribblings/reference/vectors.scrbl b/collects/scribblings/reference/vectors.scrbl index 6dae2282a4f..e2e21b56648 100644 --- a/collects/scribblings/reference/vectors.scrbl +++ b/collects/scribblings/reference/vectors.scrbl @@ -22,6 +22,10 @@ A vector can be used as a single-valued sequence (see @secref["sequences"]). The elements of the vector serve as elements of the sequence. See also @racket[in-vector]. +A literal or printed vector starts with @litchar{#(}, optionally with +a number between the @litchar{#} and +@litchar{(}. @see-read-print["vector" #:print "vectors"]{vectors} + @defproc[(vector? [v any/c]) boolean?]{ Returns @racket[#t] if @racket[v] is a vector, @racket[#f] otherwise.} From 38c55dc0635211d2fa3dbbda3aa16648a893cf8c Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Sat, 15 Oct 2011 13:59:26 -0500 Subject: [PATCH 393/441] fix the error check closes PR 12290 (cherry picked from commit 9ab6a93127f079f9d9380e16568e7e65e4bcc11e) --- collects/redex/private/reduction-semantics.rkt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collects/redex/private/reduction-semantics.rkt b/collects/redex/private/reduction-semantics.rkt index 15377870c01..182dbdd85da 100644 --- a/collects/redex/private/reduction-semantics.rkt +++ b/collects/redex/private/reduction-semantics.rkt @@ -1757,7 +1757,7 @@ (for-each (λ (x) (syntax-case x () - [(stuff ...) (void)] + [(stuff stuff2 ...) (void)] [x (raise-syntax-error syn-error-name "expected a clause" stx #'x)])) (syntax->list #'(x ...))) (raise-syntax-error syn-error-name "error checking failed.2" stx))])) From b655a344180ae49d05142b7764701a802574c581 Mon Sep 17 00:00:00 2001 From: Ryan Culpepper Date: Sat, 8 Oct 2011 01:07:08 -0600 Subject: [PATCH 394/441] rackunit: fix tests merge to 5.2 (cherry picked from commit 18b3899e6aac5a6d39507e8b2b549f05b4eec0ca) --- collects/tests/rackunit/check-test.rkt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/collects/tests/rackunit/check-test.rkt b/collects/tests/rackunit/check-test.rkt index 4f994bb4260..4952d7570c1 100644 --- a/collects/tests/rackunit/check-test.rkt +++ b/collects/tests/rackunit/check-test.rkt @@ -314,5 +314,12 @@ (parameterize ([current-check-around (lambda (t) (set! x 'foo))]) (check-eq? 'a 'b)) (check-eq? x - 'foo))))) + 'foo))) + (test-case + "current-check-handler is used by checks" + (check-eq? (let/ec escape + (parameterize ([current-check-handler (lambda (e) (escape 'foo))]) + (check-eq? 'a 'b))) + 'foo)) + )) From cafe0d95358527a575e4590f6f3c046008954620 Mon Sep 17 00:00:00 2001 From: Ryan Culpepper Date: Sat, 8 Oct 2011 01:21:54 -0600 Subject: [PATCH 395/441] rackunit: fixed test merge to 5.2 (cherry picked from commit 1695d73f5b427a0ced3dbf314bdbded48be4c955) --- collects/tests/rackunit/standalone.rkt | 57 ++++++++++++++++++++++++-- 1 file changed, 53 insertions(+), 4 deletions(-) diff --git a/collects/tests/rackunit/standalone.rkt b/collects/tests/rackunit/standalone.rkt index 00f00f67690..5c096a22666 100644 --- a/collects/tests/rackunit/standalone.rkt +++ b/collects/tests/rackunit/standalone.rkt @@ -8,12 +8,14 @@ (normalize-path (build-path here ".." ".."))) (define (collect-trim bs) (regexp-replace* (regexp-quote (path->bytes collects)) bs #"PLTHOME/collects")) - + (define (require&catch path) (define out-bs (open-output-bytes)) (define err-bs (open-output-bytes)) (parameterize ([current-output-port out-bs] - [current-error-port err-bs]) + [current-error-port err-bs] + ;; Don't test context output; it's too fragile. + [error-print-context-length 0]) (dynamic-require path #f)) (close-output-port out-bs) (close-output-port err-bs) @@ -29,9 +31,56 @@ (test-file "standalone-check-test.rkt" #"Oh HAI!\nI didn't run\n" - #"--------------------\nERROR\nOutta here!\n\n === context ===\nPLTHOME/collects/tests/rackunit/standalone-check-test.rkt:40:12: temp7\nPLTHOME/collects/rackunit/private/check.rkt:122:29\nPLTHOME/collects/racket/private/more-scheme.rkt:209:2: call-handled-body\nPLTHOME/collects/rackunit/private/check.rkt:55:0: top-level-check-around\nPLTHOME/collects/rackunit/private/check.rkt:108:21: core50\n\n\n--------------------\n--------------------\nFAILURE\nname: check\nlocation: (# 44 0 1344 17)\nexpression: (check = 1 2)\nparams: (# 1 2)\nmessage: 0.0\n\nCheck failure\n--------------------\n") + #"\ +-------------------- +ERROR +Outta here! + +-------------------- +-------------------- +FAILURE +name: check +location: (# 44 0 1344 17) +expression: (check = 1 2) +params: (# 1 2)\nmessage: 0.0 + +Check failure +-------------------- +") (test-file "standalone-test-case-test.rkt" #"" - #"--------------------\nERROR\nFirst Outta here!\n\n === context ===\nPLTHOME/collects/racket/private/more-scheme.rkt:209:2: call-handled-body\n\n\n--------------------\n--------------------\nerror\nERROR\nSecond Outta here!\n\n === context ===\nPLTHOME/collects/racket/private/more-scheme.rkt:209:2: call-handled-body\n\n\n--------------------\n--------------------\nFAILURE\nname: check-eq?\nlocation: (# 19 12 520 15)\nexpression: (check-eq? 1 2)\nactual: 1\nexpected: 2\n\nCheck failure\n--------------------\n--------------------\nfailure\nFAILURE\nname: check-eq?\nlocation: (# 20 21 558 15)\nexpression: (check-eq? 1 2)\nactual: 1\nexpected: 2\n\nCheck failure\n--------------------\n") + #"\ +-------------------- +ERROR +First Outta here! + +-------------------- +-------------------- +error +ERROR +Second Outta here! + +-------------------- +-------------------- +FAILURE +name: check-eq? +location: (# 19 12 520 15) +expression: (check-eq? 1 2) +actual: 1 +expected: 2 + +Check failure +-------------------- +-------------------- +failure +FAILURE +name: check-eq? +location: (# 20 21 558 15) +expression: (check-eq? 1 2) +actual: 1 +expected: 2 +Check failure +-------------------- +") From 067c4b4359fbaa496dd1d91e35e97bc57d2d593f Mon Sep 17 00:00:00 2001 From: Ryan Culpepper Date: Sat, 8 Oct 2011 23:23:57 -0600 Subject: [PATCH 396/441] updated documentation for syntax/trusted-xforms closes PR 12269 merge to 5.2 (cherry picked from commit 81fa15e27bc88c6a7f494d0d6f32e1d748205021) --- collects/syntax/scribblings/trusted-xforms.scrbl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/collects/syntax/scribblings/trusted-xforms.scrbl b/collects/syntax/scribblings/trusted-xforms.scrbl index 5719bd4bd64..e14c0a5745d 100644 --- a/collects/syntax/scribblings/trusted-xforms.scrbl +++ b/collects/syntax/scribblings/trusted-xforms.scrbl @@ -8,8 +8,8 @@ The @racketmodname[syntax/trusted-xforms] library has no exports. It exists only to require other modules that perform syntax transformations, where the other transformations must use -@racket[syntax-recertify]. An application that wishes to provide a -less powerful code inspector to a sub-program should generally attach -@racketmodname[syntax/trusted-xforms] to the sub-program's namespace -so that things like the class system from @racketmodname[scheme/class] -work properly. +@racket[syntax-disarm] or @racket[syntax-arm]. An application that +wishes to provide a less powerful code inspector to a sub-program +should generally attach @racketmodname[syntax/trusted-xforms] to the +sub-program's namespace so that things like the class system from +@racketmodname[racket/class] work properly. From 26aadb28d7e2dea24264f59d36ed2527e5049d2d Mon Sep 17 00:00:00 2001 From: Ryan Culpepper Date: Sun, 16 Oct 2011 00:05:26 -0600 Subject: [PATCH 397/441] db: updated note about sqlite3.dll merge to 5.2 (cherry picked from commit 8f2fe7a5aaced310594faa0d42f028c0638dc1a2) --- collects/db/scribblings/notes.scrbl | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/collects/db/scribblings/notes.scrbl b/collects/db/scribblings/notes.scrbl index 2a5860c0606..be115511917 100644 --- a/collects/db/scribblings/notes.scrbl +++ b/collects/db/scribblings/notes.scrbl @@ -82,11 +82,8 @@ SQLite support requires the appropriate native library. @itemlist[ -@item{On Windows, the library is @tt{sqlite3.dll}. It can be obtained -from @hyperlink["http://www.sqlite.org/download.html"]{the SQLite -download page}; the DLL file should be extracted and placed into one -of the directories produced by -@racketblock[(begin (require setup/dirs) (get-lib-search-dirs))]} +@item{On Windows, the library is @tt{sqlite3.dll}. It is included in +the Racket distribution.} @item{On Mac OS X, the library is @tt{libsqlite3.0.dylib}, which is included (in @tt{/usr/lib}) in Mac OS X version 10.4 onwards.} From 97a1f3cd5cd2d1bd2e58cec25e08d965bfe03a79 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sun, 16 Oct 2011 07:00:04 -0700 Subject: [PATCH 398/441] fix an identifier binding bug Merge to 5.2 (cherry picked from commit c514fd3470dad254850086a11d7ec5a2345ea59d) --- collects/tests/racket/macro.rktl | 36 ++++++++++++++++++++++++++++++++ src/racket/src/compenv.c | 9 +++++--- 2 files changed, 42 insertions(+), 3 deletions(-) diff --git a/collects/tests/racket/macro.rktl b/collects/tests/racket/macro.rktl index 1b84ae708b0..96f98a9fc96 100644 --- a/collects/tests/racket/macro.rktl +++ b/collects/tests/racket/macro.rktl @@ -566,6 +566,42 @@ (q)))) (require 'm-check-varref-expand) +;; ---------------------------------------- +;; Check that a modul-level binding with 0 marks +;; but lexical context is found correctly with +;; 1 and 2 marks (test case by Carl): + +(module check-macro-introduced-via-defctx racket/base + (require (for-syntax racket/base racket/syntax)) + + (begin-for-syntax + (define env (box #false))) + + (define-syntax (one stx) + (define ctx (syntax-local-make-definition-context #false)) + (define id + (internal-definition-context-apply + ctx + (syntax-local-introduce (datum->syntax #false 'private)))) + (syntax-local-bind-syntaxes (list id) #false ctx) + (internal-definition-context-seal ctx) + #`(begin + (begin-for-syntax (set-box! env #'#,id)) + (define #,id #false))) + (one) + + (define-syntax (two stx) + (define id ((make-syntax-introducer) (unbox env))) + (unless (free-identifier=? id (syntax-local-introduce id)) + (raise-syntax-error + #false + (format "mark changes identifier's binding: ~v / ~v" + (identifier-binding id) + (identifier-binding (syntax-local-introduce id))) + id)) + #'#f) + (two)) + ;; ---------------------------------------- (report-errs) diff --git a/src/racket/src/compenv.c b/src/racket/src/compenv.c index 9bf196b9cdd..2bd5720e42f 100644 --- a/src/racket/src/compenv.c +++ b/src/racket/src/compenv.c @@ -1086,10 +1086,13 @@ Scheme_Object *scheme_tl_id_sym(Scheme_Env *env, Scheme_Object *id, Scheme_Objec break; } } else { - if (!SCHEME_PAIRP(marks)) { + if (SCHEME_NULLP(amarks)) { + /* can always match empty marks */ + best_match = SCHEME_CDR(a); + best_match_skipped = 0; + } else if (!SCHEME_PAIRP(marks)) { /* To be better than nothing, could only match exactly: */ - if (scheme_equal(amarks, marks) - || SCHEME_NULLP(amarks)) { + if (scheme_equal(amarks, marks)) { best_match = SCHEME_CDR(a); best_match_skipped = 0; } From 728153bb07aa258ebc0c9671134ef2c90a1b4d85 Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Sun, 16 Oct 2011 17:38:50 -0500 Subject: [PATCH 399/441] adjust the code that checks to see if a file is in the module language so that it uses read-language, in the case that the simpler check (that just looks for "#lang") fails. please include in 5.2 (cherry picked from commit abf722f19ac5268616826ca4c461d71c13b790b9) --- collects/drracket/private/auto-language.rkt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/collects/drracket/private/auto-language.rkt b/collects/drracket/private/auto-language.rkt index 44ec5a5d5ef..86d69776a67 100644 --- a/collects/drracket/private/auto-language.rkt +++ b/collects/drracket/private/auto-language.rkt @@ -58,7 +58,11 @@ (: looks-like-module? ((Instance Text%) -> Boolean)) (define (looks-like-module? text) (or (looks-like-new-module-style? text) - (looks-like-old-module-style? text))) + (looks-like-old-module-style? text) + (with-handlers ((exn:fail? (λ (x) #f))) + (procedure? + (read-language (open-input-text-editor text 0 'end (λ (x) x) text #f) + (λ () #f)))))) (: looks-like-old-module-style? ((Instance Text%) -> Boolean)) (define (looks-like-old-module-style? text) From 83c56bb5f21823bb9700968e371116bf1ac0b10a Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Mon, 10 Oct 2011 21:24:17 -0400 Subject: [PATCH 400/441] Make the default answer for running an older uninstaller "yes". This makes it behave more like the Windows installer, where the default is to remove an older installation, which most people want to do anyway. (cherry picked from commit 08e70c5e45c8040c9e1440c3a7fa9f30caedae14) --- collects/meta/build/unix-installer/installer-header | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/collects/meta/build/unix-installer/installer-header b/collects/meta/build/unix-installer/installer-header index 7dbbaf130f1..ecd42048d4a 100644 --- a/collects/meta/build/unix-installer/installer-header +++ b/collects/meta/build/unix-installer/installer-header @@ -454,13 +454,13 @@ fi if test -x "$bindir/racket-uninstall"; then echo "A previous Racket uninstaller is found at" echo " \"$bindir/racket-uninstall\"," - echon " should I run it? (default: no) " + echon " should I run it? (default: yes) " read R case "$R" in - [yY]* ) echon " running uninstaller..." - "$bindir/racket-uninstall" || failwith "problems during uninstall" - echo " done." ;; - * ) failwith "abort..." ;; + [nN]* ) failwith "abort..." ;; + * ) echon " running uninstaller..." + "$bindir/racket-uninstall" || failwith "problems during uninstall" + echo " done." ;; esac fi From 87500a7e8f5f23b01453f9fc50e28bd817b131cf Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Tue, 11 Oct 2011 17:13:10 -0400 Subject: [PATCH 401/441] Misc improvements (no functionality changes, yet). (cherry picked from commit f882c01e654890d3076db856bb6b9414236fee3a) --- .../build/unix-installer/installer-header | 68 +++++++++---------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/collects/meta/build/unix-installer/installer-header b/collects/meta/build/unix-installer/installer-header index ecd42048d4a..9da4b97dc66 100644 --- a/collects/meta/build/unix-installer/installer-header +++ b/collects/meta/build/unix-installer/installer-header @@ -4,7 +4,7 @@ PATH=/usr/bin:/bin -if [ "x`echo -n`" = "x-n" ]; then +if test "x`echo -n`" = "x-n"; then echon() { /bin/echo "$*\c"; } else echon() { echo -n "$*"; } @@ -27,16 +27,16 @@ exithandler() { trap exithandler 2 3 9 15 lookfor() { - save_IFS="${IFS}" + saved_IFS="${IFS}" IFS=":" for dir in $PATH; do if test -x "$dir/$1"; then eval "$1=$dir/$1" - IFS="$save_IFS" + IFS="$saved_IFS" return fi done - IFS="$save_IFS" + IFS="$saved_IFS" failwith "could not find \"$1\"." } @@ -65,7 +65,7 @@ origwd="`pwd`" echo "This program will extract and install $DISTNAME." echo "" -echo "Note: the required diskspace for this installation is about $ORIGSIZE." +echo "Note: the required diskspace for this installation is $ORIGSIZE." ############################################################################### ## What kind of installation? @@ -76,9 +76,9 @@ echo " In this distribution mode files go into different directories according" echo " to Unix conventions. A \"racket-uninstall\" script will be generated" echo " to be used when you want to remove the installation. If you say 'no'," echo " the whole Racket directory is kept in a single installation directory" -echo " (movable and erasable) unit, possibly with convenient external links" -echo " into it -- this is often more convenient, especially if you want to" -echo " install multiple versions or keep it in your home directory." +echo " (movable and erasable), possibly with external links into it -- this is" +echo " often more convenient, especially if you want to install multiple" +echo " versions or keep it in your home directory." if test ! "x$RELEASED" = "xyes"; then echo "*** This is a nightly build: such a unix-style distribution is *not*" echo "*** recommended because it cannot be used to install multiple versions." @@ -101,9 +101,8 @@ done echo "" if test "$unixstyle" = "Y"; then echo "Where do you want to base your installation of $DISTNAME?" - echo " (Use an existing directory. If you've done such an installation in" - echo " the past, either use the same place, or manually run" - echo " 'racket-uninstall' now.)" + echo " (If you've done such an installation in the past, either" + echo " enter the same directory, or run 'racket-uninstall' manually.)" TARGET1="..." else echo "Where do you want to install the \"$TARGET\" directory tree?" @@ -167,7 +166,7 @@ fi ## Deal with Unix-style path questions set_prefix() { - where="$1" + BASE="$1" # default dirs -- mimic configure behavior bindir="$BASE/bin" collectsdir="$BASE/lib/racket/collects" @@ -205,6 +204,7 @@ show_dir_var() { } read_dir() { + echon "New directory: " read new_dir case "$new_dir" in "/"* ) echo "$new_dir" ;; @@ -213,7 +213,7 @@ read_dir() { } if test "$unixstyle" = "Y"; then - set_prefix "$where" + set_prefix "$BASE" # loop for possible changes done="N" while test ! "$done" = "Y"; do @@ -232,19 +232,19 @@ if test "$unixstyle" = "Y"; then # show_dir_var "[r] Source Tree " "$srcdir" fi if test "$err" = "Y"; then echo "*** Errors in some paths ***"; fi - echo "Enter a new prefix, a letter to change an entry, enter to continue" + echo "Enter a letter to change an entry, a new prefix, or enter to continue" echon "> " read change_what case "$change_what" in - [eE]* ) echon "New directory: "; bindir="`read_dir`" ;; - [sS]* ) echon "New directory: "; collectsdir="`read_dir`" ;; - [dD]* ) echon "New directory: "; docdir="`read_dir`" ;; - [lL]* ) echon "New directory: "; libdir="`read_dir`" ;; - [hH]* ) echon "New directory: "; includerktdir="`read_dir`" ;; - [oO]* ) echon "New directory: "; librktdir="`read_dir`" ;; - [mM]* ) echon "New directory: "; mandir="`read_dir`" ;; + [eE]* ) bindir="`read_dir`" ;; + [sS]* ) collectsdir="`read_dir`" ;; + [dD]* ) docdir="`read_dir`" ;; + [lL]* ) libdir="`read_dir`" ;; + [hH]* ) includerktdir="`read_dir`" ;; + [oO]* ) librktdir="`read_dir`" ;; + [mM]* ) mandir="`read_dir`" ;; # [rR]* ) if test "$PNAME" = "full"; then - # echon "New directory: "; srcdir="`read_dir`" + # srcdir="`read_dir`" # else # echo "Invalid response" # fi ;; @@ -268,21 +268,21 @@ test "$BINSUM" = "$SUM" || failwith "bad CRC checksum." echo "ok." ############################################################################### -## Unpacking into $where/$TARGET +## Unpacking into $BASE/$TARGET unpack_installation() { # test that no TARGET exists if test -d "$BASE/$TARGET" || test -f "$BASE/$TARGET"; then echon "\"$BASE/$TARGET\" exists, delete? " - read yesno - case "$yesno" in - [yY]*) + read R + case "$R" in + [yY]* ) echon "Deleting old \"$BASE/$TARGET\"... " "$rm" -rf "$BASE/$TARGET" \ || failwith "could not delete \"$BASE/$TARGET\"." echo "done." ;; - *) failwith "aborting because \"$BASE/$TARGET\" exists." ;; + * ) failwith "aborting because \"$BASE/$TARGET\" exists." ;; esac fi # unpack @@ -307,14 +307,14 @@ wholedir_install() { unpack_installation rm_on_abort="" -cd "$where" +cd "$BASE" if test -d "bin"; then echo "Do you want to install new system links within the bin, lib, include," - echo " man, and doc subdirectories of \"$where\", possibly overriding" + echo " man, and doc subdirectories of \"$BASE\", possibly overriding" echon " existing links? " - read yesno - case "$yesno" in - [yY]* ) sysdir="$where" ;; + read R + case "$R" in + [yY]* ) sysdir="$BASE" ;; * ) sysdir="" ;; esac else @@ -429,7 +429,7 @@ if test ! "x$sysdir" = "x"; then else cd "$docdir" echo "Installing \"$sysdir/$docdir/$TARGET\"." - link "$BASE/$TARGET/notes" "$TARGET" "$sysdir/$docdir" + link "$BASE/$TARGET/doc" "$TARGET" "$sysdir/$docdir" fi fi @@ -466,7 +466,7 @@ fi unpack_installation -cd "$where" +cd "$BASE" "$TARGET/bin/racket" "$TARGET/collects/setup/unixstyle-install.rkt" \ "move" "$BASE/$TARGET" "$bindir" "$collectsdir" "$docdir" "$libdir" \ "$includerktdir" "$librktdir" "$mandir" \ From b06d1efc4d2cbf7754f821950062e6ebfd4a2bba Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Thu, 13 Oct 2011 17:25:50 -0400 Subject: [PATCH 402/441] Rewrote large parts of the unix installer script. It's now simpler, shorter, and better. Some of the text is revised, accepts environment variables when asked for the path, some additional fixes in misc places. (cherry picked from commit 3589a703087038a58ae3c3cb27a5dc7d2e4aec47) --- .../build/unix-installer/installer-header | 508 +++++++----------- 1 file changed, 199 insertions(+), 309 deletions(-) diff --git a/collects/meta/build/unix-installer/installer-header b/collects/meta/build/unix-installer/installer-header index 9da4b97dc66..205835dd51c 100644 --- a/collects/meta/build/unix-installer/installer-header +++ b/collects/meta/build/unix-installer/installer-header @@ -20,9 +20,10 @@ failwith() { fi exit 1 } -exithandler() { - failwith "Aborting..." -} +# intentional aborts +abort() { failwith "abort."; } +# unexpected exits +exithandler() { failwith "Aborting..."; } trap exithandler 2 3 9 15 @@ -40,11 +41,6 @@ lookfor() { failwith "could not find \"$1\"." } -link() { # args are source, target, where we are - "$rm" -f "$2" || failwith "could not remove \"$2\" in \"$3\"." - "$ln" -s "$1" "$2" || failwith "could not link \"$2\" in \"$3\"." -} - lookfor rm lookfor ls lookfor ln @@ -62,6 +58,12 @@ _POSIX2_VERSION=199209 export _POSIX2_VERSION origwd="`pwd`" +installer_file="$0" +cat_installer() { + oldwd="`pwd`"; cd "$origwd" + "$tail" +"$BINSTARTLINE" "$installer_file" + cd "$oldwd" +} echo "This program will extract and install $DISTNAME." echo "" @@ -97,6 +99,7 @@ done ############################################################################### ## Where do you want it? +## sets $where to the location: target path for wholedir, prefix for unixstyle echo "" if test "$unixstyle" = "Y"; then @@ -119,363 +122,250 @@ else fi echon "> " read where -case "$where" in - "~/"* ) where="$HOME/${where#\~/}" ;; - "~"* ) failwith "cannot use '~user' paths" ;; -esac -case "$unixstyle$where" in - ? | ?1 ) where="/usr" ;; - ?2 ) where="/usr/local" ;; - ?3 ) where="$HOME" ;; - ?4 | ?. ) where="`pwd`" ;; - N/* ) TARGET="`\"$basename\" \"$where\"`" - where="`\"$dirname\" \"$where\"`" ;; - Y/* ) ;; - N* ) TARGET="`\"$basename\" \"$where\"`" - where="`\"$dirname\" \"$where\"`" - if test -d "$where"; then cd "$where"; where="`pwd`"; cd "$origwd" - else where="`pwd`/$where"; fi ;; - Y* ) if test -d "$where"; then cd "$where"; where="`pwd`"; cd "$origwd" - else where="`pwd`/$where"; fi ;; -esac - -if test "$unixstyle" = "N"; then - # can happen when choosing the root - if test "$TARGET" = "/"; then - failwith "refusing to remove your root" - fi -fi -# BASE can be used with "$BASE/$TARGET" to avoid a double slash -case "$where" in - "" ) failwith "internal error (empty \$where)" ;; - "/" ) BASE="" ;; - *"/" ) failwith "internal error (\$where ends in a slash)" ;; - "/"* ) BASE="$where" ;; - * ) failwith "internal error (\$where is not absolute)" ;; +# numeric choice (make "." and "./" synonym for 4) +if test "$unixstyle" = "Y"; then TARGET1="" +else TARGET1="/$TARGET"; fi +case "x$where" in + x | x1 ) where="/usr$TARGET1" ;; + x2 ) where="/usr/local${TARGET1}" ;; + x3 ) where="${HOME}${TARGET1}" ;; + x4 | x. | x./ ) where="`pwd`${TARGET1}" ;; esac -if test ! -d "$where"; then - failwith "the directory \"$where\" does not exist." -fi -if test ! -w "$where"; then - failwith "cannot write to \"$where\"." -fi +# substitute env vars and tildes +where="`eval \"echo \\\"$where\\\"\"`" ############################################################################### -## Deal with Unix-style path questions - -set_prefix() { - BASE="$1" - # default dirs -- mimic configure behavior - bindir="$BASE/bin" - collectsdir="$BASE/lib/racket/collects" - if test -d "$BASE/share"; then docdir="$BASE/share/racket/doc" - elif test -d "$BASE/doc"; then docdir="$BASE/doc/racket" - else docdir="$BASE/share/racket/doc" +## Default system directories prefixed by $1, mimic configure behavior +## used for unixstyle targets and for wholedir links + +set_dirs() { + # unixstyle: uses all of these + # wholedir: uses only bindir & mandir, no need for the others + bindir="$1/bin" + libdir="$1/lib" + incrktdir="$1/include/$TARGET" + librktdir="$1/lib/$TARGET" + collectsdir="$1/lib/$TARGET/collects" + has_share="N" + if test -d "$1/share"; then has_share="Y"; fi + if test "$has_share" = "N" && test -d "$1/doc"; then docdir="$1/doc/$TARGET" + else docdir="$1/share/$TARGET/doc" + fi + if test "$has_share" = "N" && test -d "$1/man"; then mandir="$1/man" + else mandir="$1/share/man" fi - libdir="$BASE/lib" - includerktdir="$BASE/include/racket" - librktdir="$BASE/lib/racket" - mandir="$BASE/man" # The source tree is always removed -- no point keeping it if it won't work - # if test -d "$BASE/share"; then srcdir="$BASE/share/racket/src" - # elif test -d "$BASE/src"; then srcdir="$BASE/src/racket" - # else srcdir="$BASE/share/racket/src" + # if test "$has_share" = "N" && test -d "$1/src"; then srcdir="$1/src/$TARGET" + # else srcdir="$1/share/$TARGET/src" # fi } +############################################################################### +## Integrity check and unpack into $1 +## also sets $INSTDIR to the directory in its canonical form + +unpack_installation() { + T="$1" + # integrity check + echo "" + echon "Checking the integrity of the binary archive... " + SUM="`cat_installer | \"$cksum\"`" || failwith "problems running cksum." + SUM="`set $SUM; echo $1`" + test "$BINSUM" = "$SUM" || failwith "bad CRC checksum." + echo "ok." + # test that the target does not exists + if test -d "$T" || test -f "$T"; then + if test -d "$T"; then + # use the real name, so "/foo/.." shows as an explicit "/" + oldwd="`pwd`"; cd "$T"; T="`pwd`"; cd "$oldwd"; echon "\"$T\" exists" + else + echon "\"$T\" exists (as a file)" + fi + echon ", delete? " + read R + case "$R" in + [yY]* ) + echon "Deleting old \"$T\"... " + "$rm" -rf "$T" || failwith "could not delete \"$T\"." + echo "done." + ;; + * ) abort ;; + esac + fi + # unpack + rm_on_abort="$T" + "$mkdir" -p "$T" || failwith "could not create directory: $T" + oldwd="`pwd`"; cd "$T"; INSTDIR="`pwd`"; cd "$oldwd" + echon "Unpacking into \"$INSTDIR\" (Ctrl+C to abort)... " + cat_installer | "$gunzip" -c \ + | { cd "$INSTDIR" + "$tar" xf - || failwith "problems during unpacking of binary archive." + } + test -d "$INSTDIR/collects" \ + || failwith "unpack failed (could not find \"$T/collects\")." + echo "done." +} + +############################################################################### +## Whole-directory installations + +wholedir_install() { + + unpack_installation "$where" + rm_on_abort="" + + echo "" + echo "If you want to install new system links within the \"bin\" and" + echo " \"man\" subdirectories of a common directory prefix (for example," + echo " \"/usr/local\") then enter the prefix of an existing directory" + echo " that you want to use. This might overwrite existing symlinks," + echo " but not files." + echon "(default: skip links) > " + read SYSDIR + if test "x$SYSDIR" = "x"; then : + elif test ! -d "$SYSDIR"; then + echo "\"$SYSDIR\" does not exist, skipping links." + elif test ! -w "$SYSDIR"; then + echo "\"$SYSDIR\" is not writable, skipping links." + else + oldwd="`pwd`"; cd "$SYSDIR"; SYSDIR="`pwd`"; cd "$oldwd" + set_dirs "$SYSDIR" + install_links() { # tgtdir(absolute) srcdir(relative to INSTDIR) + if ! test -d "$1"; then + echo "\"$1\" does not exist, skipping." + elif ! test -w "$1"; then + echo "\"$1\" is not writable, skipping" + else + echo "Installing links in \"$1\"..." + printsep=" " + cd "$1" + for x in `cd "$INSTDIR/$2"; ls`; do + echon "${printsep}$x"; printsep=", " + if test -h "$x"; then rm -f "$x"; fi + if test -d "$x" || test -f "$x"; then + echon " skipped (non-link exists)" + elif ! "$ln" -s "$INSTDIR/$2/$x" "$x"; then + echon " skipped (symlink failed)" + fi + done + echo ""; echo " done." + fi + } + install_links "$bindir" "bin" + install_links "$mandir/man1" "man/man1" + fi + +} + +############################################################################### +## Unix-style installations + dir_createable() { test_dir="`\"$dirname\" \"$1\"`" if test -d "$test_dir" && test -w "$test_dir"; then return 0 elif test "$test_dir" = "/"; then return 1 else dir_createable "$test_dir"; fi } - show_dir_var() { - if test -f "$2"; then dir_status="(error: not a directory!)"; err="Y" + if test -f "$2"; then status="error: not a directory!"; err="Y" elif test ! -d "$2"; then - if dir_createable "$2"; then dir_status="(will be created)" - else dir_status="(error: not writable!)"; err="Y"; fi - elif test ! -w "$2"; then dir_status="(error: not writable!)"; err="Y" - else dir_status="(exists)" + if dir_createable "$2"; then status="will be created" + else status="error: not writable!"; err="Y"; fi + elif test ! -w "$2"; then status="error: not writable!"; err="Y" + else status="exists" fi - echo " $1 $2 $dir_status" + echo " $1 $2 ($status)" } -read_dir() { - echon "New directory: " - read new_dir - case "$new_dir" in - "/"* ) echo "$new_dir" ;; - * ) echo "$BASE/$new_dir" ;; - esac -} +unixstyle_install() { -if test "$unixstyle" = "Y"; then - set_prefix "$BASE" + if test -f "$where"; then + failwith "The entered base directory exists as a file: $where" + elif test ! -d "$where"; then + echo "Base directory does not exist: $where" + echon " should I create it? (default: yes) " + read R; case "$R" in [nN]* ) abort ;; esac + "$mkdir" -p "$where" || failwith "could not create directory: $where" + fi + cd "$where" || failwith "Base directory does not exist: $where" + where="`pwd`"; cd "$origwd" + + set_dirs "$where" # loop for possible changes done="N" - while test ! "$done" = "Y"; do + while test ! "$done" = "Y" || test "x$err" = "xY" ; do echo "" echo "Target Directories:" err="N" show_dir_var "[e] Executables " "$bindir" - show_dir_var "[s] Scheme Code " "$collectsdir" + show_dir_var "[r] Racket Code " "$collectsdir" show_dir_var "[d] Core Docs " "$docdir" show_dir_var "[l] C Libraries " "$libdir" - show_dir_var "[h] C headers " "$includerktdir" + show_dir_var "[h] C headers " "$incrktdir" show_dir_var "[o] Extra C Objs " "$librktdir" show_dir_var "[m] Man Pages " "$mandir" if test "$PNAME" = "full"; then echo " (C sources are not kept)" - # show_dir_var "[r] Source Tree " "$srcdir" + # show_dir_var "[s] Source Tree " "$srcdir" fi - if test "$err" = "Y"; then echo "*** Errors in some paths ***"; fi - echo "Enter a letter to change an entry, a new prefix, or enter to continue" - echon "> " - read change_what + echo "Enter a letter to change an entry, or enter to continue" + echon "> "; read change_what + read_dir() { + echon "New directory (absolute or relative to $where): "; read new_dir + case "$new_dir" in + "/"* ) echo "$new_dir" ;; + * ) echo "$where/$new_dir" ;; + esac + } case "$change_what" in [eE]* ) bindir="`read_dir`" ;; - [sS]* ) collectsdir="`read_dir`" ;; + [rR]* ) collectsdir="`read_dir`" ;; [dD]* ) docdir="`read_dir`" ;; [lL]* ) libdir="`read_dir`" ;; - [hH]* ) includerktdir="`read_dir`" ;; + [hH]* ) incrktdir="`read_dir`" ;; [oO]* ) librktdir="`read_dir`" ;; [mM]* ) mandir="`read_dir`" ;; - # [rR]* ) if test "$PNAME" = "full"; then - # srcdir="`read_dir`" - # else - # echo "Invalid response" - # fi ;; - "/"* ) set_prefix "$change_what" ;; - "" ) done="Y" ;; + # [sS]* ) if test "$PNAME" = "full"; then srcdir="`read_dir`" + # else echo "Invalid response"; fi ;; + "" ) if test "$err" = "N"; then done="Y" + else echo "*** Please fix erroneous paths to proceed"; fi ;; * ) echo "Invalid response" ;; esac done - if test "$err" = "Y"; then failwith "errors in some paths"; fi -fi - -############################################################################### -## Integrity check -echo "" -echon "Checking the integrity of the binary archive... " -SUM="`\"$tail\" +\"$BINSTARTLINE\" \"$0\" | \"$cksum\"`" \ - || failwith "problems running cksum." -SUM="`set $SUM; echo $1`" -test "$BINSUM" = "$SUM" || failwith "bad CRC checksum." -echo "ok." - -############################################################################### -## Unpacking into $BASE/$TARGET - -unpack_installation() { - # test that no TARGET exists - if test -d "$BASE/$TARGET" || test -f "$BASE/$TARGET"; then - echon "\"$BASE/$TARGET\" exists, delete? " + if test -x "$bindir/racket-uninstall"; then + echo "A previous Racket uninstaller is found at" + echo " \"$bindir/racket-uninstall\"," + echon " should I run it? (default: yes) " read R case "$R" in - [yY]* ) - echon "Deleting old \"$BASE/$TARGET\"... " - "$rm" -rf "$BASE/$TARGET" \ - || failwith "could not delete \"$BASE/$TARGET\"." - echo "done." - ;; - * ) failwith "aborting because \"$BASE/$TARGET\" exists." ;; + [nN]* ) abort ;; + * ) echon " running uninstaller..." + "$bindir/racket-uninstall" || failwith "problems during uninstall" + echo " done." ;; esac fi - # unpack - echon "Unpacking into \"$BASE/$TARGET\"... " - rm_on_abort="$BASE/$TARGET" - "$mkdir" "$BASE/$TARGET" - "$tail" +"$BINSTARTLINE" "$0" | "$gunzip" -c \ - | { cd "$BASE/$TARGET" - "$tar" xf - || failwith "problems during unpacking of binary archive." - } - cd "$BASE/$TARGET" - test -d "collects" \ - || failwith "unpack failed (could not find \"$BASE/$TARGET/collects\")." - echo "done." -} - -############################################################################### -## Whole-directory installations - -wholedir_install() { - -unpack_installation -rm_on_abort="" - -cd "$BASE" -if test -d "bin"; then - echo "Do you want to install new system links within the bin, lib, include," - echo " man, and doc subdirectories of \"$BASE\", possibly overriding" - echon " existing links? " - read R - case "$R" in - [yY]* ) sysdir="$BASE" ;; - * ) sysdir="" ;; - esac -else - cd "$origwd" - echo "" - echo "If you want to install new system links within the bin, lib, include," - echo " man, and doc subdirectories of a common directory prefix (for" - echo " example, \"/usr/local\") then enter the prefix you want to use." - echon "(default: skip links) > " - read sysdir - if test ! "x$sysdir" = "x"; then - if test ! -d "$sysdir"; then - echo "Directory \"$sysdir\" does not exist, skipping links." - sysdir="" - elif test ! -w "$sysdir"; then - echo "Directory \"$sysdir\" is not writable, skipping links." - sysdir="" - else - cd "$sysdir" - sysdir="`pwd`" - fi - fi -fi -if test ! "x$sysdir" = "x"; then - # binaries - cd "$sysdir" - if test -d "bin" && test -w "bin"; then - echo "Installing links in \"$sysdir/bin\"..." - printsep=" " - cd "bin" - for x in `cd "$BASE/$TARGET/bin"; ls`; do - if test -x "$BASE/$TARGET/bin/$x"; then - echon "${printsep}$x" - printsep=", " - link "$BASE/$TARGET/bin/$x" "$x" "$sysdir/bin" - fi - done - echo "" - echo "Done. (see \"$BASE/$TARGET/bin\" for other executables)" - else - echo "Skipping \"$sysdir/bin\" (does not exist or not writable)." - fi - # man pages - cd "$sysdir" - if test -d "man" && test -d "man/man1" && test -w "man/man1"; then - mandir="man/man1" - elif test -d "share" && test -d "share/man" && test -d "share/man/man1" \ - && test -w "share/man/man1"; then - mandir="share/man/man1" - else - mandir="" + tmp="$where/$TARGET-tmp-install" + if test -f "$tmp" || test -d "$tmp"; then + echo "\"$tmp\" already exists (needed for the installation)," + echon " ok to remove it? " + read R; case "$R" in [yY]* ) "$rm" -rf "$tmp" ;; * ) abort ;; esac fi - if test "x$mandir" = "x"; then - echo "Skipping \"$sysdir/man/man1\" (does not exist or not writable)." - else - cd "$mandir" - echo "Installing links in \"$sysdir/$mandir\"..." - printsep=" " - for x in `cd "$BASE/$TARGET/man/man1/"; "$ls"`; do - echon "${printsep}$x" - printsep=", " - link "$BASE/$TARGET/man/man1/$x" "$x" "$sysdir/$mandir" - done - echo "" - echo "Done" - fi - # lib link - cd "$sysdir" - if test -d "lib" && test -w "lib"; then - libdir="lib" - elif test -d "share" && test -d "share/lib" && test -w "share/lib"; then - libdir="share/lib" - else - libdir="" - fi - if test "x$libdir" = "x"; then - echo "Skipping \"$sysdir/lib\" (does not exist or not writable)." - else - cd "$libdir" - echo "Installing \"$sysdir/$libdir/$TARGET\"." - link "$BASE/$TARGET/lib" "$TARGET" "$sysdir/$libdir" - fi - # include link - cd "$sysdir" - if test -d "include" && test -w "include"; then - incdir="include" - elif test -d "share" && test -d "share/include" \ - && test -w "share/include"; then - incdir="share/include" - else - incdir="" - fi - if test "x$incdir" = "x"; then - echo "Skipping \"$sysdir/include\" (does not exist or not writable)." - else - cd "$incdir" - echo "Installing \"$sysdir/$incdir/$TARGET\"." - link "$BASE/$TARGET/include" "$TARGET" "$sysdir/$incdir" - fi - # doc link - cd "$sysdir" - if test -d "doc" && test -w "doc"; then - docdir="doc" - elif test -d "share" && test -d "share/doc" && test -w "share/doc"; then - docdir="share/doc" - else - docdir="" - fi - if test "x$docdir" = "x"; then - echo "Skipping \"$sysdir/doc\" (does not exist or not writable)." - else - cd "$docdir" - echo "Installing \"$sysdir/$docdir/$TARGET\"." - link "$BASE/$TARGET/doc" "$TARGET" "$sysdir/$docdir" - fi -fi - -} - -############################################################################### -## Unix-style installations - -unixstyle_install() { - -TARGET="$TARGET-tmp-install" -if test -e "$BASE/$TARGET"; then - echo "\"$BASE/$TARGET\" already exists (needed for the installation)," - echon " ok to remove? " - read R - case "$R" in - [yY]* ) "$rm" -rf "$BASE/$TARGET" ;; - * ) failwith "abort..." ;; - esac -fi - -if test -x "$bindir/racket-uninstall"; then - echo "A previous Racket uninstaller is found at" - echo " \"$bindir/racket-uninstall\"," - echon " should I run it? (default: yes) " - read R - case "$R" in - [nN]* ) failwith "abort..." ;; - * ) echon " running uninstaller..." - "$bindir/racket-uninstall" || failwith "problems during uninstall" - echo " done." ;; - esac -fi - -unpack_installation + unpack_installation "$tmp" -cd "$BASE" -"$TARGET/bin/racket" "$TARGET/collects/setup/unixstyle-install.rkt" \ - "move" "$BASE/$TARGET" "$bindir" "$collectsdir" "$docdir" "$libdir" \ - "$includerktdir" "$librktdir" "$mandir" \ -|| failwith "installation failed" + cd "$where" + "$tmp/bin/racket" "$tmp/collects/setup/unixstyle-install.rkt" \ + "move" "$tmp" "$bindir" "$collectsdir" "$docdir" "$libdir" \ + "$incrktdir" "$librktdir" "$mandir" \ + || failwith "installation failed" } ############################################################################### -## Done +## Run the right installer now if test "$unixstyle" = "Y"; then unixstyle_install; else wholedir_install; fi From 06bc3bd4706606fbe079c39cb869e9422cef8fe9 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Sun, 16 Oct 2011 18:53:13 -0400 Subject: [PATCH 403/441] Lots of little changes and fixes, and an extensive testing script. (cherry picked from commit 08b2d7b595780e6e95a851b54611fcd643247d62) --- .../build/unix-installer/installer-header | 107 +++-- .../meta/build/unix-installer/test-installer | 447 ++++++++++++++++++ 2 files changed, 510 insertions(+), 44 deletions(-) create mode 100755 collects/meta/build/unix-installer/test-installer diff --git a/collects/meta/build/unix-installer/installer-header b/collects/meta/build/unix-installer/installer-header index 205835dd51c..3edd4f7c4db 100644 --- a/collects/meta/build/unix-installer/installer-header +++ b/collects/meta/build/unix-installer/installer-header @@ -12,7 +12,9 @@ fi rm_on_abort="" failwith() { - echo "Error: $*" 1>&2 + err="Error: " + if test "x$1" = "x-noerror"; then err=""; shift; fi + echo "$err$*" 1>&2 if test ! "x$rm_on_abort" = "x" && test -e "$rm_on_abort"; then echon " (Removing installation files in $rm_on_abort)" "$rm" -rf "$rm_on_abort" @@ -21,9 +23,9 @@ failwith() { exit 1 } # intentional aborts -abort() { failwith "abort."; } +abort() { failwith -noerror "Aborting installation."; } # unexpected exits -exithandler() { failwith "Aborting..."; } +exithandler() { echo ""; failwith "Aborting..."; } trap exithandler 2 3 9 15 @@ -68,11 +70,11 @@ cat_installer() { echo "This program will extract and install $DISTNAME." echo "" echo "Note: the required diskspace for this installation is $ORIGSIZE." +echo "" ############################################################################### ## What kind of installation? -echo "" echo "Do you want a Unix-style distribution?" echo " In this distribution mode files go into different directories according" echo " to Unix conventions. A \"racket-uninstall\" script will be generated" @@ -96,12 +98,12 @@ while test "$unixstyle" = "x"; do * ) unixstyle="x" ;; esac done +echo "" ############################################################################### ## Where do you want it? ## sets $where to the location: target path for wholedir, prefix for unixstyle -echo "" if test "$unixstyle" = "Y"; then echo "Where do you want to base your installation of $DISTNAME?" echo " (If you've done such an installation in the past, either" @@ -176,12 +178,15 @@ unpack_installation() { test "$BINSUM" = "$SUM" || failwith "bad CRC checksum." echo "ok." # test that the target does not exists + here="N" if test -d "$T" || test -f "$T"; then - if test -d "$T"; then + if test -d "$T" && test -x "$T"; then # use the real name, so "/foo/.." shows as an explicit "/" - oldwd="`pwd`"; cd "$T"; T="`pwd`"; cd "$oldwd"; echon "\"$T\" exists" - else - echon "\"$T\" exists (as a file)" + oldwd="`pwd`"; cd "$T"; T="`pwd`"; cd "$oldwd" + fi + if test -f "$T"; then echon "\"$T\" exists (as a file)" + elif test ! "`pwd`" = "$T"; then echon "\"$T\" exists" + else here="Y"; echon "\"$T\" is where you ran the installer from" fi echon ", delete? " read R @@ -197,15 +202,23 @@ unpack_installation() { # unpack rm_on_abort="$T" "$mkdir" -p "$T" || failwith "could not create directory: $T" - oldwd="`pwd`"; cd "$T"; INSTDIR="`pwd`"; cd "$oldwd" - echon "Unpacking into \"$INSTDIR\" (Ctrl+C to abort)... " + if test "$here" = "Y"; then + cd "$T"; INSTDIR="$T" + echo "*** Note: your original directory was deleted, so you will need" + echo "*** to 'cd' back into it when the installer is done, otherwise" + echo "*** it will look like you have an empty directory." + sleep 1 + else oldwd="`pwd`"; cd "$T"; INSTDIR="`pwd`"; cd "$oldwd" + fi + rm_on_abort="$INSTDIR" + echo "Unpacking into \"$INSTDIR\" (Ctrl+C to abort)..." cat_installer | "$gunzip" -c \ | { cd "$INSTDIR" "$tar" xf - || failwith "problems during unpacking of binary archive." } test -d "$INSTDIR/collects" \ || failwith "unpack failed (could not find \"$T/collects\")." - echo "done." + echo "Done." } ############################################################################### @@ -227,7 +240,7 @@ wholedir_install() { if test "x$SYSDIR" = "x"; then : elif test ! -d "$SYSDIR"; then echo "\"$SYSDIR\" does not exist, skipping links." - elif test ! -w "$SYSDIR"; then + elif test ! -x "$SYSDIR" || test ! -w "$SYSDIR"; then echo "\"$SYSDIR\" is not writable, skipping links." else oldwd="`pwd`"; cd "$SYSDIR"; SYSDIR="`pwd`"; cd "$oldwd" @@ -235,7 +248,7 @@ wholedir_install() { install_links() { # tgtdir(absolute) srcdir(relative to INSTDIR) if ! test -d "$1"; then echo "\"$1\" does not exist, skipping." - elif ! test -w "$1"; then + elif ! test -x "$1" || ! test -w "$1"; then echo "\"$1\" is not writable, skipping" else echo "Installing links in \"$1\"..." @@ -263,10 +276,10 @@ wholedir_install() { ## Unix-style installations dir_createable() { - test_dir="`\"$dirname\" \"$1\"`" - if test -d "$test_dir" && test -w "$test_dir"; then return 0 - elif test "$test_dir" = "/"; then return 1 - else dir_createable "$test_dir"; fi + tdir="`\"$dirname\" \"$1\"`" + if test -d "$tdir" && test -x "$tdir" && test -w "$tdir"; then return 0 + elif test "$tdir" = "/"; then return 1 + else dir_createable "$tdir"; fi } show_dir_var() { if test -f "$2"; then status="error: not a directory!"; err="Y" @@ -288,54 +301,60 @@ unixstyle_install() { echon " should I create it? (default: yes) " read R; case "$R" in [nN]* ) abort ;; esac "$mkdir" -p "$where" || failwith "could not create directory: $where" + elif test ! -w "$where"; then + failwith "The entered base directory is not writable: $where" fi cd "$where" || failwith "Base directory does not exist: $where" where="`pwd`"; cd "$origwd" set_dirs "$where" # loop for possible changes - done="N" + done="N"; retry="N" while test ! "$done" = "Y" || test "x$err" = "xY" ; do - echo "" - echo "Target Directories:" err="N" - show_dir_var "[e] Executables " "$bindir" - show_dir_var "[r] Racket Code " "$collectsdir" - show_dir_var "[d] Core Docs " "$docdir" - show_dir_var "[l] C Libraries " "$libdir" - show_dir_var "[h] C headers " "$incrktdir" - show_dir_var "[o] Extra C Objs " "$librktdir" - show_dir_var "[m] Man Pages " "$mandir" - if test "$PNAME" = "full"; then - echo " (C sources are not kept)" - # show_dir_var "[s] Source Tree " "$srcdir" + if test "$retry" = "N"; then + echo "" + echo "Target Directories:" + show_dir_var "[e] Executables " "$bindir" + show_dir_var "[r] Racket Code " "$collectsdir" + show_dir_var "[d] Core Docs " "$docdir" + show_dir_var "[l] C Libraries " "$libdir" + show_dir_var "[h] C headers " "$incrktdir" + show_dir_var "[o] Extra C Objs " "$librktdir" + show_dir_var "[m] Man Pages " "$mandir" + if test "$PNAME" = "full"; then + echo " (C sources are not kept)" + # show_dir_var "[s] Source Tree " "$srcdir" + fi + echo "Enter a letter to change an entry, or enter to continue." fi - echo "Enter a letter to change an entry, or enter to continue" + retry="N" echon "> "; read change_what read_dir() { echon "New directory (absolute or relative to $where): "; read new_dir case "$new_dir" in - "/"* ) echo "$new_dir" ;; - * ) echo "$where/$new_dir" ;; + "/"* ) eval "$1=\"$new_dir\"" ;; + * ) eval "$1=\"$where/$new_dir\"" ;; esac } case "$change_what" in - [eE]* ) bindir="`read_dir`" ;; - [rR]* ) collectsdir="`read_dir`" ;; - [dD]* ) docdir="`read_dir`" ;; - [lL]* ) libdir="`read_dir`" ;; - [hH]* ) incrktdir="`read_dir`" ;; - [oO]* ) librktdir="`read_dir`" ;; - [mM]* ) mandir="`read_dir`" ;; - # [sS]* ) if test "$PNAME" = "full"; then srcdir="`read_dir`" + [eE]* ) read_dir bindir ;; + [rR]* ) read_dir collectsdir ;; + [dD]* ) read_dir docdir ;; + [lL]* ) read_dir libdir ;; + [hH]* ) read_dir incrktdir ;; + [oO]* ) read_dir librktdir ;; + [mM]* ) read_dir mandir ;; + # [sS]* ) if test "$PNAME" = "full"; then read_dir srcdir # else echo "Invalid response"; fi ;; "" ) if test "$err" = "N"; then done="Y" else echo "*** Please fix erroneous paths to proceed"; fi ;; - * ) echo "Invalid response" ;; + * ) retry="Y" ;; esac done if test -x "$bindir/racket-uninstall"; then + echo "" echo "A previous Racket uninstaller is found at" echo " \"$bindir/racket-uninstall\"," echon " should I run it? (default: yes) " @@ -370,7 +389,7 @@ unixstyle_install() { if test "$unixstyle" = "Y"; then unixstyle_install; else wholedir_install; fi echo "" -echo "All done." +echo "Installation complete." exit diff --git a/collects/meta/build/unix-installer/test-installer b/collects/meta/build/unix-installer/test-installer new file mode 100755 index 00000000000..55ed825f616 --- /dev/null +++ b/collects/meta/build/unix-installer/test-installer @@ -0,0 +1,447 @@ +#!/bin/sh +#| -*- scheme -*- +exec racket "$0" "$@" +|# + +#lang at-exp racket/base + +(require racket/list racket/file racket/match racket/system) + +(define testdir "/tmp/racket-installer-test") +(define installer "/tmp/r.sh") + +(define (err fmt . args) + (raise-user-error (format "Error: ~a" (apply format fmt args)))) + +(define (exe name [just-path? #f]) + (define path (or (find-executable-path name) + (err "no `~a' executable found" name))) + (λ args (unless (apply system* path args) + (err "`~a' signalled an error" name)))) + +(define expect-exe (exe "expect")) +(define sync-exe (exe "sync")) + +(unless (file-exists? installer) (err "missing installer at: ~a" installer)) +(when (directory-exists? testdir) (err "test directory exists: ~a" testdir)) +(make-directory testdir) +(current-directory testdir) +;; make identifiable prompts, predictable ls output, safe-for-play home +(void (putenv "PS1" "sh> ") (putenv "COLUMNS" "72") (putenv "HOME" testdir)) + +(define (transcript) + ;; the test transcript text: + ;; - text is matched against the process output (anchored) + ;; - `i' is for user input to send + ;; - `r' is for a regexp + ;; - `s' is a nested list to be spliced in + ;; - `N' is short for @r{[0-9.]+} + ;; - `...' makes the next match unanchored (so it's similar to a non-greedy + ;; ".*" regexp) + (define (i . xs) `(i . ,xs)) + (define (r . xs) `(r . ,xs)) + (define (s . xs) `(s . ,xs)) + (define break 'break) + (define N @r{[0-9.]+}) + (define ... '...) + @list{ + @; the first few puzzling interactions are testing that we generate the + @; right expect code -- which requires regexp and $-quoting. + sh> @i{echo "blah"} + blah + sh> @i{echo 'blah'} + blah + sh> @i{x=123} + sh> @i{echo "][@"}{"blah*$x*"} + ][@"}{"blah*123* + sh> @i{echo '[]{}blah*$x*'} + []{}blah*$x* + sh> @i{pwd} + @testdir + @; proper testing begins here + sh> @i{sh @installer} + This program will extract and install Racket v@|N|. + @|| + Note: the required diskspace for this installation is @|N|M. + @|| + Do you want a Unix-style distribution? + In this distribution mode files go into different directories according + to Unix conventions. A "racket-uninstall" script will be generated + to be used when you want to remove the installation. If you say 'no', + the whole Racket directory is kept in a single installation directory + (movable and erasable), possibly with external links into it -- this is + often more convenient, especially if you want to install multiple + versions or keep it in your home directory. + *** This is a nightly build: such a unix-style distribution is *not* + *** recommended because it cannot be used to install multiple versions. + Enter yes/no (default: no) > @i{bleh} + Enter yes/no (default: no) > @i{foo} + Enter yes/no (default: no) > @i{} + @|| + Where do you want to install the "racket-@N" directory tree? + 1 - /usr/racket-@N [default] + 2 - /usr/local/racket-@N + 3 - ~/racket-@N (@|testdir|/racket-@N) + 4 - ./racket-@N (here) + Or enter a different "racket" directory to install in. + > @i{4} + @|| + Checking the integrity of the binary archive... ok. + Unpacking into "@|testdir|/racket-@N" (Ctrl+C to abort)... + Done. + @|| + If you want to install new system links within the "bin" and + "man" subdirectories of a common directory prefix (for example, + "/usr/local") then enter the prefix of an existing directory + that you want to use. This might overwrite existing symlinks, + but not files. + (default: skip links) > @i{} + @|| + Installation complete. + sh> @i{ls -mF} + racket-@|N|/ + sh> @i{ls -mF racket-*} + README, bin/, collects/, doc/, include/, lib/, man/ + sh> @i{sh @installer} + @... + Enter yes/no (default: no) > @i{No} + @... + > @i{.} + @|| + Checking the integrity of the binary archive... ok. + "@|testdir|/racket-@N" exists, delete? @i{n} + Aborting installation. + sh> @i{ls -mF racket-*} + README, bin/, collects/, doc/, include/, lib/, man/ + sh> @i{chmod 000 racket*} + sh> @i{sh @installer} + @... + Enter yes/no (default: no) > @i{No} + @... + > @i{./} + @|| + Checking the integrity of the binary archive... ok. + "@|testdir|/racket-@N" exists, delete? @i{y} + Deleting old "@|testdir|/racket-@N"... @; + /bin/rm: cannot remove `@|testdir|/racket-@N': @; + Permission denied + Error: could not delete "@|testdir|/racket-@N". + sh> @i{chmod 755 racket*} + sh> @i{sh @installer} + @... + Enter yes/no (default: no) > @i{No} + @... + > @i{.} + @|| + Checking the integrity of the binary archive... ok. + "@|testdir|/racket-@N" exists, delete? @i{y} + Deleting old "@|testdir|/racket-@N"... done. + @... + (default: skip links) > @i{.} + "@|testdir|/bin" does not exist, skipping. + "@|testdir|/share/man/man1" does not exist, skipping. + @|| + Installation complete. + sh> @i{mkdir bin} + sh> @i{touch R bin/gracket} + sh> @i{export TGT=R} + sh> @i{sh @installer} + @... + Enter yes/no (default: no) > @i{} + @... + > @i{$TGT} + @|| + Checking the integrity of the binary archive... ok. + "R" exists (as a file), delete? @i{y} + Deleting old "R"... done. + Unpacking into "@|testdir|/R" (Ctrl+C to abort)... + Done. + @... + (default: skip links) > @i{.} + Installing links in "@|testdir|/bin"... + drracket, gracket skipped (non-link exists), gracket-text, mred, @; + mred-text, mzc, mzpp, mzscheme, mztext, pdf-slatex, planet, plt-games, @; + plt-help, plt-r5rs, plt-r6rs, plt-web-server, racket, raco, scribble, @; + setup-plt, slatex, slideshow, swindle, tex2page + done. + "@|testdir|/share/man/man1" does not exist, skipping. + @|| + Installation complete. + sh> @i{ls -mF .} + R/, bin/, racket-@|N|/ + sh> @i{ls -mF R} + README, bin/, collects/, doc/, include/, lib/, man/ + sh> @i{ls -mF bin} + @s|{drracket@, gracket, gracket-text@, mred@, mred-text@, mzc@, mzpp@, + mzscheme@, mztext@, pdf-slatex@, planet@, plt-games@, plt-help@, + plt-r5rs@, plt-r6rs@, plt-web-server@, racket@, raco@, scribble@, + setup-plt@, slatex@, slideshow@, swindle@, tex2page@}| + sh> @i{ls -l bin/ra*} + lrwxrwxrwx. @... bin/racket -> @|testdir|/R/bin/racket + lrwxrwxrwx. @... bin/raco -> @|testdir|/R/bin/raco + sh> @i{sh @installer} + @... + Enter yes/no (default: no) > @i{} + @... + > @i{$TGT`echo 1`} + @|| + Checking the integrity of the binary archive... ok. + Unpacking into "@|testdir|/R1" (Ctrl+C to abort)... + @break + Error: Aborting... + (Removing installation files in @|testdir|/R1) + sh> @i{ls -mF} + R/, bin/, racket-@|N|/ + sh> @i{sh @installer} + @... + Enter yes/no (default: no) > @i{} + @... + > @i{mmm} + @... + Unpacking into "@|testdir|/mmm" (Ctrl+C to abort)... + Done. + @... + (default: skip links) > @break + Error: Aborting... + sh> @i{ls -mF} + R/, bin/, mmm/, racket-5.2.0.1/ + sh> @i{sh @installer} + @... + Enter yes/no (default: no) > @i{} + @... + > @i{`pwd`} + @... + "@testdir" is where you ran the installer from, delete? @i{y} + Deleting old "@testdir"... done. + *** Note: your original directory was deleted, so you will need + *** to 'cd' back into it when the installer is done, otherwise + *** it will look like you have an empty directory. + Unpacking into "@testdir" (Ctrl+C to abort)... + Done. + @... + (default: skip links) > @i{/usr/local} + "/usr/local" is not writable, skipping links. + @|| + Installation complete. + sh> @i{ls -mF} + sh> @i{cd /} + sh> @i{cd @testdir} + sh> @i{ls -mF} + README, bin/, collects/, doc/, include/, lib/, man/ + sh> @i{rm -rf [a-zR]*} + sh> @i{ls -mF} + sh> @i{sh @installer} + @... + Do you want a Unix-style distribution? + @... + Enter yes/no (default: no) > @i{bleh} + Enter yes/no (default: no) > @i{yes} + @|| + Where do you want to base your installation of Racket v@|N|? + (If you've done such an installation in the past, either + enter the same directory, or run 'racket-uninstall' manually.) + 1 - /usr/... [default] + 2 - /usr/local/... + 3 - ~/... (@|testdir|/...) + 4 - ./... (here) + Or enter a different directory prefix to install in. + > @i{} + Error: The entered base directory is not writable: /usr + sh> @i{sh @installer} + @... + Enter yes/no (default: no) > @i{y} + @... + > @i{2} + Error: The entered base directory is not writable: /usr/local + sh> @i{sh @installer} + @... + Enter yes/no (default: no) > @i{y} + @... + > @i{3} + @|| + Target Directories: + [e] Executables @|testdir|/bin (will be created) + [r] Racket Code @|testdir|/lib/racket-@|N|/collects (will be created) + [d] Core Docs @|testdir|/share/racket-@|N|/doc (will be created) + [l] C Libraries @|testdir|/lib (will be created) + [h] C headers @|testdir|/include/racket-@|N| (will be created) + [o] Extra C Objs @|testdir|/lib/racket-@|N| (will be created) + [m] Man Pages @|testdir|/share/man (will be created) + Enter a letter to change an entry, or enter to continue. + > @i{z} + > @i{Q} + > @i{} + @|| + Checking the integrity of the binary archive... ok. + Unpacking into "@|testdir|/racket-@|N|-tmp-install" (Ctrl+C to abort)... + Done. + Moving bin -> @|testdir|/bin + Moving collects -> @|testdir|/lib/racket-@|N|/collects + Moving doc -> @|testdir|/share/racket-@|N|/doc + Moving include -> @|testdir|/include/racket-@|N| + Moving lib -> @|testdir|/lib/racket-@|N| + Moving man -> @|testdir|/share/man + Moving README -> @|testdir|/share/racket-@|N|/doc/README + Writing uninstaller at: @|testdir|/bin/racket-uninstall... + Rewriting configuration file at: @|testdir|/lib/racket-@|N|/@; + collects/config/config.rkt... + Recompiling to @|testdir|/lib/racket-@|N|/@; + collects/config/compiled/config_rkt.zo... + @|| + Installation complete. + sh> @i{ls -mF} + bin/, include/, lib/, share/ + sh> @i{ls -mF bin} + drracket*, gracket*, gracket-text*, mred*, mred-text*, mzc*, mzpp*, + mzscheme*, mztext*, pdf-slatex*, planet*, plt-games*, plt-help*, + plt-r5rs*, plt-r6rs*, plt-web-server*, racket*, racket-uninstall*, + raco*, scribble*, setup-plt*, slatex*, slideshow*, swindle*, tex2page* + sh> @i{ls -mF include && ls -mF lib && ls -mF share} + racket-@|N|/ + racket-@|N|/ + man/, racket-@|N|/ + sh> @i{ls -mF include/r*} + escheme.h, ext.exp, mzconfig.h, mzscheme3m.exp, scheme.h, schemef.h, + schemegc2.h, schemex.h, schemexm.h, schexn.h, schgc2obj.h, schthread.h, + schvers.h, sconfig.h, stypes.h, uconfig.h + sh> @i{ls -mF lib/r*} + buildinfo, collects/, libfit.so*, mzdyn3m.o, starter* + sh> @i{ls -mF share/r* && ls -mF share/r*/doc} + doc/ + README, @... xrepl/ + sh> @i{ls -mF share/man && ls -mF share/man/man1} + man1/ + drracket.1, gracket.1, mred.1, mzc.1, mzscheme.1, plt-help.1, racket.1, + raco.1, setup-plt.1, tex2page.1 + sh> @i{sh @installer} + @... + Enter yes/no (default: no) > @i{y} + @... + > @i{meh} + Base directory does not exist: meh + should I create it? (default: yes) @i{n} + Aborting installation. + sh> @i{touch m} + sh> @i{sh @installer} + @... + Enter yes/no (default: no) > @i{y} + @... + > @i{4} + @|| + Target Directories: + [e] Executables @|testdir|/bin (exists) + [r] Racket Code @|testdir|/lib/racket-@|N|/collects (exists) + [d] Core Docs @|testdir|/share/racket-@|N|/doc (exists) + [l] C Libraries @|testdir|/lib (exists) + [h] C headers @|testdir|/include/racket-@|N| (exists) + [o] Extra C Objs @|testdir|/lib/racket-@|N| (exists) + [m] Man Pages @|testdir|/share/man (exists) + Enter a letter to change an entry, or enter to continue. + > @i{m} + New directory (absolute or relative to @testdir): @i{m} + @|| + Target Directories: + [e] Executables @|testdir|/bin (exists) + [r] Racket Code @|testdir|/lib/racket-@|N|/collects (exists) + [d] Core Docs @|testdir|/share/racket-@|N|/doc (exists) + [l] C Libraries @|testdir|/lib (exists) + [h] C headers @|testdir|/include/racket-@|N| (exists) + [o] Extra C Objs @|testdir|/lib/racket-@|N| (exists) + [m] Man Pages @|testdir|/m (error: not a directory!) + Enter a letter to change an entry, or enter to continue. + > @i{} + *** Please fix erroneous paths to proceed + @... + Enter a letter to change an entry, or enter to continue. + > @i{m} + New directory (absolute or relative to @testdir): @i{man} + @|| + Target Directories: + [e] Executables @|testdir|/bin (exists) + [r] Racket Code @|testdir|/lib/racket-@|N|/collects (exists) + [d] Core Docs @|testdir|/share/racket-@|N|/doc (exists) + [l] C Libraries @|testdir|/lib (exists) + [h] C headers @|testdir|/include/racket-@|N| (exists) + [o] Extra C Objs @|testdir|/lib/racket-@|N| (exists) + [m] Man Pages @|testdir|/man (will be created) + Enter a letter to change an entry, or enter to continue. + > @i{} + @|| + A previous Racket uninstaller is found at + "@|testdir|/bin/racket-uninstall", + should I run it? (default: yes) @i{} + running uninstaller... done. + @|| + Checking the integrity of the binary archive... ok. + @... + Installation complete. + sh> @i{ls -mF} + bin/, include/, lib/, m, man/, share/ + sh> @i{sh @installer} + @... + Enter yes/no (default: no) > @i{y} + @... + > @i{4} + @... + > @i{} + @|| + A previous Racket uninstaller is found at + "@|testdir|/bin/racket-uninstall", + should I run it? (default: yes) @i{n} + Aborting installation. + sh> @i{rm -rf share} + sh> @i{sh @installer} + @... + Enter yes/no (default: no) > @i{y} + @... + > @i{4} + @... + [m] Man Pages @|testdir|/man (exists) + Enter a letter to change an entry, or enter to continue. + > @break + Error: Aborting... + sh> @i{ls -mF} + bin/, include/, lib/, m, man/ + sh> @i{exit} + @||}) + +(define (make-expect-script) + (printf "spawn sh\nproc abort {} { puts \"timeout!\\n\"; exit 1 }\n") + (printf "set timeout 60\n") + (define (tclq str) + ;; tcl uses $ and [] for variable & function call interpolation, and "}{" + ;; can confuse it; quote all of these + (regexp-replace* "[][{}$]" (format "~s" str) "\\\\&")) + (define (expect strs anchored?) + (unless (null? strs) + (define str (if (string? strs) strs (apply string-append strs))) + (let ([str (regexp-replace* "\r?\n" str "\r\n")]) + (printf "expect {\n timeout abort\n -re ~a\n}\n" + (tclq (if anchored? (string-append "^" str) str)))))) + (define (send strs) + (define str (if (string? strs) strs (apply string-append strs))) + (printf "send -- ~a\n" (tclq (string-append str "\n")))) + (let loop ([strs '()] [xs (transcript)] [anchored? #t]) + (define (do-expect) (expect (reverse strs) anchored?)) + (if (null? xs) + (do-expect) + (match (car xs) + ['... (do-expect) (loop '() (cdr xs) #f)] + [(? string? x) (loop (cons (regexp-quote x) strs) (cdr xs) anchored?)] + [`(s . ,sxs) (loop strs (append sxs (cdr xs)) anchored?)] + [`(r . ,rxs) (loop (append (reverse rxs) strs) (cdr xs) anchored?)] + [`(i . ,inps) (do-expect) (send inps) + (loop (map regexp-quote (reverse inps)) (cdr xs) #t)] + ['break (do-expect) (printf "send \"\\03\"\n") + (loop '("\\^C") (cdr xs) #t)] + [x (err "bad item in transcript: ~s" (car xs))]))) + (printf "expect eof\n")) + +(with-output-to-file "/tmp/racket-installer-expect-script" make-expect-script) +(sync-exe) ; we'll shuffle a lot of bytes, be prepared +(expect-exe "/tmp/racket-installer-expect-script") + +(delete-directory/files testdir) +(delete-file "/tmp/racket-installer-expect-script") + +(printf "\n--> All tests passed.\n") From 6efb5c1847270ed84504c61557f3841a64e93dc9 Mon Sep 17 00:00:00 2001 From: Matthias Felleisen Date: Sun, 16 Oct 2011 16:31:50 -0400 Subject: [PATCH 404/441] on-release works without on-key; Closes PR12291 please propagate (cherry picked from commit 2a43c68dd7d5909c48f99079cb104cdcec8c5d8f) --- collects/2htdp/private/world.rkt | 11 +++++----- collects/2htdp/tests/on-release-no-key.rkt | 24 ++++++++++++++++++++++ collects/2htdp/universe.rkt | 2 +- collects/2htdp/xtest | 1 + 4 files changed, 32 insertions(+), 6 deletions(-) create mode 100644 collects/2htdp/tests/on-release-no-key.rkt diff --git a/collects/2htdp/private/world.rkt b/collects/2htdp/private/world.rkt index 30a3e66e13e..62160295283 100644 --- a/collects/2htdp/private/world.rkt +++ b/collects/2htdp/private/world.rkt @@ -52,8 +52,8 @@ (class* object% (start-stop<%>) (inspect #f) (init-field world0) - (init-field name state register check-with on-key on-mouse record?) - (init on-release on-receive on-draw stop-when) + (init-field name state register check-with on-key on-release on-mouse record?) + (init on-receive on-draw stop-when) ;; ----------------------------------------------------------------------- (field @@ -152,7 +152,8 @@ (show fst-scene))) (define/public (deal-with-key %) - (if (not on-key) % + (if (and (not on-key) (not on-release)) + % (class % (super-new) (define/override (on-char e) @@ -235,8 +236,8 @@ ;; ---------------------------------------------------------------------- ;; callbacks (field - (key on-key) - (release on-release) + (key (if on-key on-key (lambda (w ke) w))) + (release (if on-release on-release (lambda (w ke) w))) (mouse on-mouse) (rec on-receive)) diff --git a/collects/2htdp/tests/on-release-no-key.rkt b/collects/2htdp/tests/on-release-no-key.rkt new file mode 100644 index 00000000000..47eeadab588 --- /dev/null +++ b/collects/2htdp/tests/on-release-no-key.rkt @@ -0,0 +1,24 @@ +;; The first three lines of this file were inserted by DrRacket. They record metadata +;; about the language level of this file in a form that our tools can easily process. +#reader(lib "htdp-advanced-reader.ss" "lang")((modname on-release-no-key) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #t #t none #f ()))) +;; Any key inflates the balloon + +(require 2htdp/image) +(require 2htdp/universe) + +(define large 50) + +(define (balloon b) + (if (<= b 10) + (text "press any key now" 22 'red) + (circle b "solid" "red"))) + +(define (blow-up b k) large) + +(define (deflate b) (max (- b 1) 1)) + +(big-bang 20 + (on-release blow-up) + (on-tick deflate) + (to-draw balloon 200 200) + (stop-when (lambda (w) (>= w large)))) diff --git a/collects/2htdp/universe.rkt b/collects/2htdp/universe.rkt index 01fb94b1dc8..381773d2dbe 100644 --- a/collects/2htdp/universe.rkt +++ b/collects/2htdp/universe.rkt @@ -93,7 +93,7 @@ [on-key DEFAULT #f (function-with-arity 2)] ;; World KeyEvent -> World ;; on-release must specify a release event handler - [on-release DEFAULT #'K (function-with-arity 2)] + [on-release DEFAULT #f (function-with-arity 2)] ;; (U #f (World S-expression -> World)) ;; -- on-receive must specify a receive handler [on-receive DEFAULT #'#f (function-with-arity 2)] diff --git a/collects/2htdp/xtest b/collects/2htdp/xtest index 52553b93252..2efd7d3556b 100755 --- a/collects/2htdp/xtest +++ b/collects/2htdp/xtest @@ -35,4 +35,5 @@ run record-stop-when.rkt run stop-when-crash.rkt run on-tick-universe-with-limit.rkt run on-tick-with-limit.rkt +run on-release-no-key.rkt From 58b46792693ec26559190cc2fc67d8b2a279a198 Mon Sep 17 00:00:00 2001 From: Rodolfo Carvalho Date: Sat, 15 Oct 2011 03:02:28 -0300 Subject: [PATCH 405/441] Add missing word 'one', clarify behavior of the 'semi-or-amp mode. (cherry picked from commit f43405543a89b2c61ccc9174cbc5657dff832653) --- collects/net/scribblings/uri-codec.scrbl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/collects/net/scribblings/uri-codec.scrbl b/collects/net/scribblings/uri-codec.scrbl index 17a8da688c3..6429b238f49 100644 --- a/collects/net/scribblings/uri-codec.scrbl +++ b/collects/net/scribblings/uri-codec.scrbl @@ -131,8 +131,9 @@ associations in @racket[form-urlencoded->alist], The default value is @racket['amp-or-semi], which means that both @litchar{&} and @litchar{;} are treated as separators when parsing, -and @litchar{&} is used as a separator when encoding. The other modes -use/recognize only of the separators. +and @litchar{&} is used as a separator when encoding. The @racket['semi-or-amp] +mode is similar, but @litchar{;} is used when encoding. The other modes +use/recognize only one of the separators. @examples[ #:eval uri-codec-eval From b42223aa5d1f8f2943e7939f7ab3b7926f859099 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Mon, 17 Oct 2011 11:03:51 -0400 Subject: [PATCH 406/441] Add sqlite libraries to the `db' spec. (cherry picked from commit df4a227571b73d3970495261f6cf9a2518418af7) --- collects/meta/dist-specs.rkt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/collects/meta/dist-specs.rkt b/collects/meta/dist-specs.rkt index 4a1ae7bf041..d994a8e59ca 100644 --- a/collects/meta/dist-specs.rkt +++ b/collects/meta/dist-specs.rkt @@ -686,8 +686,7 @@ mz-extras :+= (- (package: "unstable") plt-extras :+= (package: "plai/") ;; -------------------- rackunit & older schemeunit compatibility -plt-extras :+= (package: "rackunit/") -plt-extras :+= (package: "schemeunit/") +plt-extras :+= (package: "rackunit/") (package: "schemeunit/") ;; -------------------- racklog (aka schelog) plt-extras :+= (package: "racklog/") @@ -696,7 +695,7 @@ plt-extras :+= (package: "racklog/") plt-extras :+= (package: "datalog/") ;; -------------------- db -plt-extras :+= (package: "db/") +plt-extras :+= (package: "db/") (lib: "sqlite*") ;; ============================================================================ ;; Readme header From 29db510d2a30126fcb33bbec7cb8494bcedc8254 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Mon, 17 Oct 2011 11:08:23 -0400 Subject: [PATCH 407/441] Make the example `rebind' more like other rebinds in Emacs and others. (cherry picked from commit 6a323fe75e102f7cdfaa6fafb6b5497e676aa4ba) --- collects/scribblings/drracket/keybindings.scrbl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/collects/scribblings/drracket/keybindings.scrbl b/collects/scribblings/drracket/keybindings.scrbl index ac6eeb17495..71bd4546799 100644 --- a/collects/scribblings/drracket/keybindings.scrbl +++ b/collects/scribblings/drracket/keybindings.scrbl @@ -239,13 +239,13 @@ name with the new keystroke you want, like this: @racketmod[ s-exp framework/keybinding-lang -(define (rebind name new) - (keybinding - new - (lambda (ed evt) - (send (send ed get-keymap) call-function name ed evt #t)))) +(define (rebind key command) + (keybinding + key + (λ (ed evt) + (send (send ed get-keymap) call-function command ed evt #t)))) -(rebind "backward-kill-word" "c:w") +(rebind "c:w" "backward-kill-word") ] Note that DrRacket does not reload keybindings files automatically when you From 6d49072822115bcf3e2b227ae66fbd07a65912f7 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Mon, 17 Oct 2011 11:45:43 -0400 Subject: [PATCH 408/441] Document `next-tab' and `prev-tab'. (cherry picked from commit 8f66afe5a6050c0ca19c6c02799d214c38f944ad) --- collects/scribblings/tools/unit.scrbl | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/collects/scribblings/tools/unit.scrbl b/collects/scribblings/tools/unit.scrbl index 89caa2c9322..0e7bc895cee 100644 --- a/collects/scribblings/tools/unit.scrbl +++ b/collects/scribblings/tools/unit.scrbl @@ -608,6 +608,14 @@ Returns the currently active tab. It loads that file in the definitions window of the new tab. } +@defmethod[(next-tab) void?]{ + Switches to the next tab. +} + +@defmethod[(prev-tab) void?]{ + Switches to the previous tab. +} + @defmethod[#:mode public-final (close-current-tab) void?]{ Closes the current tab, making some other tab visible. If there is only one tab open, this method does nothing. From e1ffc0dd9aa5bc9311e478733c232909eaa4e9eb Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Mon, 17 Oct 2011 11:47:41 -0400 Subject: [PATCH 409/441] Make `create-new-tab' public. (cherry picked from commit 319a158dec0052f3e4ab150405c9855342973002) --- collects/drracket/private/interface.rkt | 1 + collects/drracket/private/unit.rkt | 2 +- collects/scribblings/tools/unit.scrbl | 4 ++++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/collects/drracket/private/interface.rkt b/collects/drracket/private/interface.rkt index eafa17386c7..c070e4db60f 100644 --- a/collects/drracket/private/interface.rkt +++ b/collects/drracket/private/interface.rkt @@ -37,6 +37,7 @@ remain the same for tools that use them. execute-callback get-current-tab open-in-new-tab + create-new-tab close-current-tab on-tab-change enable-evaluation diff --git a/collects/drracket/private/unit.rkt b/collects/drracket/private/unit.rkt index 0cce7e97c9b..0c5651583e0 100644 --- a/collects/drracket/private/unit.rkt +++ b/collects/drracket/private/unit.rkt @@ -2770,7 +2770,7 @@ module browser threading seems wrong. ;; create-new-tab : -> void ;; creates a new tab and updates the GUI for that new tab - (define/private create-new-tab + (define/public create-new-tab (lambda ([filename #f]) (let* ([defs (new (drracket:get/extend:get-definitions-text))] [tab-count (length tabs)] diff --git a/collects/scribblings/tools/unit.scrbl b/collects/scribblings/tools/unit.scrbl index 0e7bc895cee..85fd7c18337 100644 --- a/collects/scribblings/tools/unit.scrbl +++ b/collects/scribblings/tools/unit.scrbl @@ -608,6 +608,10 @@ Returns the currently active tab. It loads that file in the definitions window of the new tab. } +@defmethod[(create-new-tab) void?]{ + Creates a new tab. +} + @defmethod[(next-tab) void?]{ Switches to the next tab. } From 1d6c344fffc0f17fd0177da8547f8a4e40e98205 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Mon, 17 Oct 2011 13:17:23 -0400 Subject: [PATCH 410/441] Add an example for old-style keys. (cherry picked from commit 016e6d771c602a163603c9a7db42f25935a99517) --- .../scribblings/drracket/keybindings.scrbl | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/collects/scribblings/drracket/keybindings.scrbl b/collects/scribblings/drracket/keybindings.scrbl index 71bd4546799..319b4f4c7ab 100644 --- a/collects/scribblings/drracket/keybindings.scrbl +++ b/collects/scribblings/drracket/keybindings.scrbl @@ -229,6 +229,35 @@ s-exp framework/keybinding-lang (keybinding "c:a" (λ (editor evt) (send editor insert "!"))) ] +Since the file contains plain Racket code, you can write keybindings +files that use DrRacket's @seclink[#:doc '(lib +"scribblings/tools/tools.scrbl") "implementing-tools"]{Extension API}. +For example, the following file binds ``control-t'' and ``control-='' to +a execute the program and open a new tab respectively, as they were used +before version 5.2. + +@racketmod[ +s-exp framework/keybinding-lang + +(require drracket/tool-lib) + +(define-syntax-rule (frame-key key command) + (keybinding + (format "~a:~a" + (case (get-default-shortcut-prefix) + [(ctl) "c"] [(cmd) "d"] [(alt meta) "m"] + [(shift) "s"] [(option) "a"]) + key) + (λ (ed evt) + (when (is-a? ed text:basic<%>) + (define fr (send ed get-top-level-window)) + ;; note: fr could be #f + (when fr (send fr command)))))) + +(frame-key "t" execute-callback) +(frame-key "=" create-new-tab) +] + Another example, this file rebinds ``control-w'' to delete the word behind the insertion point, but it does it by setting a new key to be an existing keyboard shortcut. If you see a key in the From 47460ac45137401328a167596e8e60610394db47 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Mon, 17 Oct 2011 14:09:26 -0400 Subject: [PATCH 411/441] Remove preference for old-style menu bindings, and instead add a sample keybindings file that does that. (This reverts most of commit 26f6c588fcfa45a1a12c275e5824aede8ba23e3e.) (cherry picked from commit c66c669ee36e106fefafd92c5cf5513accf16f7c) --- collects/drracket/private/main.rkt | 6 +----- collects/drracket/private/unit.rkt | 9 ++------- .../private/english-string-constants.rkt | 3 +-- .../string-constants/private/german-string-constants.rkt | 1 - doc/release-notes/drracket/HISTORY.txt | 9 +++++---- 5 files changed, 9 insertions(+), 19 deletions(-) diff --git a/collects/drracket/private/main.rkt b/collects/drracket/private/main.rkt index dde8826d472..10eabae4554 100644 --- a/collects/drracket/private/main.rkt +++ b/collects/drracket/private/main.rkt @@ -84,7 +84,7 @@ ll)))) (drr:set-default 'drracket:module-language-first-line-special? #t boolean?) -(drr:set-default 'drracket:use-old-style-keybindings #f boolean?) + (drr:set-default 'drracket:defns-popup-sort-by-name? #f boolean?) (drr:set-default 'drracket:show-line-numbers? #f boolean?) @@ -297,10 +297,6 @@ (make-check-box 'drracket:module-language-first-line-special? (string-constant ml-always-show-#lang-line) - editor-panel) - - (make-check-box 'drracket:use-old-style-keybindings - (string-constant old-style-keybindings) editor-panel))) (preferences:add-to-editor-checkbox-panel diff --git a/collects/drracket/private/unit.rkt b/collects/drracket/private/unit.rkt index 0c5651583e0..30833abb8b4 100644 --- a/collects/drracket/private/unit.rkt +++ b/collects/drracket/private/unit.rkt @@ -3380,7 +3380,7 @@ module browser threading seems wrong. (set! file-menu:create-new-tab-item (new menu:can-restore-menu-item% (label (string-constant new-tab)) - (shortcut (if (preferences:get 'drracket:use-old-style-keybindings) #\= #\t)) + (shortcut #\t) (parent file-menu) (callback (λ (x y) @@ -3459,13 +3459,8 @@ module browser threading seems wrong. (preferences:get 'framework:print-output-mode))))) (super file-menu:between-print-and-close file-menu)) - (inherit edit-menu:get-replace-item) (define/override (edit-menu:between-find-and-preferences edit-menu) (super edit-menu:between-find-and-preferences edit-menu) - (when (preferences:get 'drracket:use-old-style-keybindings) - (define item (edit-menu:get-replace-item)) - (send item set-shortcut #\r) - (send item set-shortcut-prefix (get-default-shortcut-prefix))) (new menu:can-restore-menu-item% [label (string-constant complete-word)] [shortcut #\/] @@ -3676,7 +3671,7 @@ module browser threading seems wrong. (string-constant execute-menu-item-label) language-specific-menu (λ (_1 _2) (execute-callback)) - (if (preferences:get 'drracket:use-old-style-keybindings) #\t #\r) + #\r (string-constant execute-menu-item-help-string))) (make-object menu:can-restore-menu-item% (string-constant ask-quit-menu-item-label) diff --git a/collects/string-constants/private/english-string-constants.rkt b/collects/string-constants/private/english-string-constants.rkt index 95aaf54a6bf..454901d4a19 100644 --- a/collects/string-constants/private/english-string-constants.rkt +++ b/collects/string-constants/private/english-string-constants.rkt @@ -492,7 +492,6 @@ please adhere to these guidelines: (show-interactions-on-execute "Automatically open interactions window when running a program") (switch-to-module-language-automatically "Automatically switch to the module language when opening a module") (interactions-beside-definitions "Put the interactions window beside the definitions window") ;; in preferences, below the checkbox one line above this one - (old-style-keybindings "Old-style keybindings (Run: -t; New-tab: -=; Replace: -r)") (show-line-numbers "Show line numbers") (show-line-numbers/menu "Show Line &Numbers") ;; just like the above, but capitalized for appearance in a menu item (hide-line-numbers/menu "Hide Line &Numbers") @@ -1395,7 +1394,7 @@ please adhere to these guidelines: ;; title of this section of the dialog (possibly the word ;; `Collection' should not be translated) (ml-cp-collection-paths "Collection Paths") - + ;; button labels (ml-cp-add "Add") (ml-cp-add-default "Add Default") diff --git a/collects/string-constants/private/german-string-constants.rkt b/collects/string-constants/private/german-string-constants.rkt index 3889fa6273f..5d085554278 100644 --- a/collects/string-constants/private/german-string-constants.rkt +++ b/collects/string-constants/private/german-string-constants.rkt @@ -389,7 +389,6 @@ (open-files-in-tabs "Dateien in separaten Tabs öffnen (nicht separaten Fenstern)") (show-interactions-on-execute "Interaktionen beim Programmstart automatisch öffnen") (switch-to-module-language-automatically "Automatisch in die `module'-Sprache wechseln, wenn ein Modul geöffnet wird") - (old-style-keybindings "Historische Tastaturbelegungkeybindings (Start: -t; Neuer Tab: -=; Ersetzen: -r)") (interactions-beside-definitions "Interaktionen neben den Definitionen anzeigen") ;; in preferences, below the checkbox one line above this one (show-line-numbers "Zeilennummern einblenden") (show-line-numbers/menu "Zeilen&nummern einblenden") diff --git a/doc/release-notes/drracket/HISTORY.txt b/doc/release-notes/drracket/HISTORY.txt index 59ba90b6659..6312b95b240 100644 --- a/doc/release-notes/drracket/HISTORY.txt +++ b/doc/release-notes/drracket/HISTORY.txt @@ -2,13 +2,14 @@ Version 5.2 ------------------------------ - . changed a three menu keybidings: + . changed three menu keybidings: "New Tab" is now -t "Run" is now -r "Replace" is now -shift-f - The preferences dialog (general tab) has a checkbox to - restore the old behavior. + The Keyboard Shortcuts section in the manual has a sample + keybindings file a checkbox that restores the old behavior of + the first two. . Under Windows, DrRacket now saves files, in some situations, with LF terminators. Previously, under windows, all files @@ -26,7 +27,7 @@ . removed the "open here" functionality (both from the DrRacket app and from the framework library) - . 2htdp/image: + . 2htdp/image: - shrunk the size of saved files that contain 2htdp/image bitmaps (you can get these by copying and pasting from the REPL; using "insert image" isn't affected) From 1d7e5f3cbc6a158d14b4b1172a6def36454c5cc7 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Mon, 17 Oct 2011 14:32:23 -0400 Subject: [PATCH 412/441] Remove the unneeded `require' in that example. (cherry picked from commit 7bff0e888d5866b9b884e9d153b866d5d33a8e7e) --- collects/scribblings/drracket/keybindings.scrbl | 2 -- 1 file changed, 2 deletions(-) diff --git a/collects/scribblings/drracket/keybindings.scrbl b/collects/scribblings/drracket/keybindings.scrbl index 319b4f4c7ab..c0aaf1c18a2 100644 --- a/collects/scribblings/drracket/keybindings.scrbl +++ b/collects/scribblings/drracket/keybindings.scrbl @@ -239,8 +239,6 @@ before version 5.2. @racketmod[ s-exp framework/keybinding-lang -(require drracket/tool-lib) - (define-syntax-rule (frame-key key command) (keybinding (format "~a:~a" From 17d0749a26614c64130121aafe6e79d3033beb99 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Mon, 17 Oct 2011 06:55:04 -0700 Subject: [PATCH 413/441] fix a type name Closes PR 12297 Merge to 5.2 (cherry picked from commit 099e4d7dad9767ed95f0e617fc627a94ac2eb899) --- src/racket/src/type.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/racket/src/type.c b/src/racket/src/type.c index 399e148266f..67b20529282 100644 --- a/src/racket/src/type.c +++ b/src/racket/src/type.c @@ -300,6 +300,9 @@ scheme_init_type () set_name(scheme_place_type, ""); set_name(scheme_place_async_channel_type, ""); set_name(scheme_place_bi_channel_type, ""); + set_name(scheme_place_dead_type, ""); + + set_name(scheme_resolved_module_path_type, ""); #ifdef MZ_GC_BACKTRACE set_name(scheme_rt_meta_cont, ""); @@ -388,9 +391,14 @@ Scheme_Type scheme_make_type(const char *name) char *scheme_get_type_name(Scheme_Type t) { + char *s; if (t < 0 || t >= maxtype) return ""; - return type_names[t]; + s = type_names[t]; + if (!s) + return "???"; + else + return s; } void scheme_install_type_reader(Scheme_Type t, Scheme_Type_Reader f) From 4b46e79b55ab5f524ef73874356d2dd1cef92b47 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Mon, 17 Oct 2011 16:12:20 -0400 Subject: [PATCH 414/441] Fix typo in htdp url. Fixes PR 12282. (Which was closed prematurely.) (cherry picked from commit 3b93da83c49627625f353b1cf3bc19ae93564308) --- collects/scribblings/main/getting-started.scrbl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collects/scribblings/main/getting-started.scrbl b/collects/scribblings/main/getting-started.scrbl index 3faf2305541..a7af167473e 100644 --- a/collects/scribblings/main/getting-started.scrbl +++ b/collects/scribblings/main/getting-started.scrbl @@ -8,7 +8,7 @@ through a textbook: @itemize[ - @item{@italic{@link["http:///www.htdp.org/"]{How to Design Programs}} + @item{@italic{@link["http://htdp.org/"]{How to Design Programs}} is the best place to start. Whenever the book says ``Scheme,'' you can read it as ``Racket.''} From 124688fa51074a379448a7d9b380937e8eb29bd4 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Mon, 17 Oct 2011 15:52:14 -0600 Subject: [PATCH 415/441] gtk: no freeze/thaw before/after unmap Merge to 5.2 (cherry picked from commit a09543772a93ca8d7cf58fa2c4e60f3c559f031b) --- collects/mred/private/wx/gtk/canvas.rkt | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/collects/mred/private/wx/gtk/canvas.rkt b/collects/mred/private/wx/gtk/canvas.rkt index abe4cff19cb..03736853ea9 100644 --- a/collects/mred/private/wx/gtk/canvas.rkt +++ b/collects/mred/private/wx/gtk/canvas.rkt @@ -209,6 +209,13 @@ (when wx (send wx unrealize))))) +(define-signal-handler connect-unmap "unmap" + (_fun _GtkWidget -> _void) + (lambda (gtk) + (let ([wx (gtk->wx gtk)]) + (when wx + (send wx unrealize))))) + (define (do-value-changed gtk dir) (let ([wx (gtk->wx gtk)]) (when wx @@ -385,6 +392,7 @@ (when combo-button-gtk (connect-combo-key-and-mouse combo-button-gtk)) (connect-unrealize client-gtk) + (connect-unmap client-gtk) (when hscroll-adj (connect-value-changed-h hscroll-adj)) (when vscroll-adj (connect-value-changed-v vscroll-adj)) @@ -467,11 +475,14 @@ (define flush-win-box (mcons #f 0)) (define/public (get-flush-window) (atomically - (if (win-box-valid? flush-win-box) - flush-win-box - (begin - (set! flush-win-box (window->win-box (widget-window client-gtk))) - flush-win-box)))) + (if (zero? (bitwise-and (get-gtk-object-flags client-gtk) + GTK_MAPPED)) + (mcons #f #f) + (if (win-box-valid? flush-win-box) + flush-win-box + (begin + (set! flush-win-box (window->win-box (widget-window client-gtk))) + flush-win-box))))) (define/public (unrealize) (unrealize-win-box flush-win-box)) From 856664c7e6bd68aa1f096b41c588c729cfff00df Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Tue, 18 Oct 2011 06:33:30 -0600 Subject: [PATCH 416/441] fix cocoa `get-clipboard-string' to never return #f; fix docs Merge to 5.2 (cherry picked from commit 718229387c05daba0c2cce9f68f757e72fe0ad2d) --- collects/mred/private/wx/cocoa/clipboard.rkt | 5 +++-- collects/scribblings/gui/clipboard-intf.scrbl | 12 ++++++------ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/collects/mred/private/wx/cocoa/clipboard.rkt b/collects/mred/private/wx/cocoa/clipboard.rkt index 2556146cd29..e64d9a5c896 100644 --- a/collects/mred/private/wx/cocoa/clipboard.rkt +++ b/collects/mred/private/wx/cocoa/clipboard.rkt @@ -80,8 +80,9 @@ (define/public (get-text-data) (let ([bstr (get-data "TEXT")]) - (and bstr - (bytes->string/utf-8 bstr #\?)))) + (or (and bstr + (bytes->string/utf-8 bstr #\?)) + ""))) (define/public (get-data type) (atomically diff --git a/collects/scribblings/gui/clipboard-intf.scrbl b/collects/scribblings/gui/clipboard-intf.scrbl index 1155754ff63..c2afe286272 100644 --- a/collects/scribblings/gui/clipboard-intf.scrbl +++ b/collects/scribblings/gui/clipboard-intf.scrbl @@ -29,7 +29,7 @@ Generic data is always retrieved from the clipboard as a byte @defmethod[(get-clipboard-bitmap [time exact-integer?]) - (or/c (is-a?/c bitmap%) false/c)]{ + (or/c (is-a?/c bitmap%) #f)]{ Gets the current clipboard contents as a bitmap (Windows, Mac OS X), returning @racket[#f] if the clipboard does not contain a bitmap. @@ -43,9 +43,9 @@ See @|timediscuss| for a discussion of the @racket[time] argument. If } -@defmethod[(get-clipboard-data [format string] +@defmethod[(get-clipboard-data [format string?] [time exact-integer?]) - (or/c bytes? string? false/c)]{ + (or/c bytes? string? #f)]{ Gets the current clipboard contents in a specific format, returning @racket[#f] if the clipboard does not contain data in the requested @@ -66,10 +66,10 @@ See @|timediscuss| for a discussion of the @racket[time] argument. If } @defmethod[(get-clipboard-string [time exact-integer?]) - (or/c string false/c)]{ + string?]{ Gets the current clipboard contents as simple text, returning - @racket[#f] if the clipboard does not contain any text. + @racket[""] if the clipboard does not contain any text. See @method[clipboard<%> get-clipboard-data] for information on eventspaces and the current clipboard client. @@ -117,7 +117,7 @@ See @|timediscuss| for a discussion of the @racket[time] argument. If } -@defmethod[(set-clipboard-string [new-text string] +@defmethod[(set-clipboard-string [new-text string?] [time exact-integer?]) void?]{ From 69077c6f57640fe28a6c1967a60d37fa1ceecb22 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Tue, 18 Oct 2011 06:46:30 -0600 Subject: [PATCH 417/441] update Racket history for v5.2 Merge to 5.2 (cherry picked from commit ff839d1cdac02e30a3ecbdc330496e03bb52a6dc) --- doc/release-notes/racket/HISTORY.txt | 96 +++++++++++----------------- 1 file changed, 38 insertions(+), 58 deletions(-) diff --git a/doc/release-notes/racket/HISTORY.txt b/doc/release-notes/racket/HISTORY.txt index cc8550b0c02..6d12b445774 100644 --- a/doc/release-notes/racket/HISTORY.txt +++ b/doc/release-notes/racket/HISTORY.txt @@ -1,77 +1,57 @@ -Version 5.1.3.12 -Removed built-in support for Honu reading and printing -racket/gui: moved set-icon method from frame% to - top-level-window<%> - -Version 5.1.3.11 +Version 5.2, November 2011 +Generalized begin-with-syntax to allow phase-N definitions, + both variable and syntax, within a module for all N >= 0; + removed define-values-for-syntax from fully expanded forms; + added begin-with-syntax to fully expanded forms +Changed the location-creation semantics of internal definitions + and letrec-syntaxes+values (to make them more let-like) +Added support for the collection links file, including + (find-system-path 'links-file) and the raco link command Added exn:fail:syntax:unbound Added date*, which extends date to include nanoseconds and a time zone name Changed seconds->date to accept a real number return a date* -Added support for redirections to get-pure-port - -Version 5.1.3.10 +Added set-port-next-location! and changed the default prompt + read handler to use it when input and output ar terminals +Changed syntax-local-module-defined-identifiers to return + a table for all phases instead of just two values +Add syntax-transforming-module-expression? and + variable-reference->module-base-phase Added variable-reference->module-declare-inspector, which allows a macro or other syntax tool to get the enclosing module's declaration-time inspector for taint operations -Removed the Racket-to-C compiler: raco ctool -e/-c, mzc -e/-c, - compile-extensions, compile-extensions-to-c, compile-c-extensions, - compiler/cffi, compiler/comp-unit, compiler:inner^, and most - options in compiler/option - -Version 5.1.3.9 -Add syntax-shift-phase-level +Added syntax-shift-phase-level +Removed built-in support for Honu reading and printing +racket/unsafe/ops: added unsafe-list-ref and unsafe-list-tail +ffi/unsafe: added support for C arrays and unions +ffi/unsafe: changed define-cstruct to use an interned symbol tag, + which means that it is not generative +racket/place: added place* and dynamic-place* to specify the input, + output, and error ports to use for a new place +racket/place: cpointers, file-stream ports, and TCP ports can be + sent across place channels +racket/gui: moved set-icon method from frame% to + top-level-window<%> +racket/gui: removed unsupported MDI styles and method errortrace: with-mark and make-st-mark now take a phase level -place:place* and dynamic place* forms now take in, out, and err named - arguments which become the standard io ports for the new place - -Version 5.1.3.8 -Add syntax-transforming-module-expression? and - variable-reference->module-base-phase - -Version 5.1.3.7 -Generalized begin-with-syntax to allow phase-N definitions, - both variable and syntax, within a module for all N >= 0; - removed define-values-for-syntax from fully expanded forms; - added begin-with-syntax to fully expanded forms -Changed syntax-local-module-defined-identifiers to return - a table for all phases instead of just two values compiler/zo-structs: removed def-for-syntax, added seq-for-syntax, changed some mod fields, added field to def-syntaxes - -Version 5.1.3.6 -unsafe/ffi:Changed cstructs to not be generative. -place:cpointers and file descriptors can now be sent across - place channels. - -Version 5.1.3.4 -Add support for the collection links file, including - (find-system-path 'links-file) and the raco link command - -Version 5.1.3.3 -unsafe/ffi: added support for C arrays and unions -Fixed the planet module-name-resolver to be thread safe -mrlib/include-bitmap: Adjust include-bitmap so it does not - write to the filesystem -framework: the finder get-file & put-file dialogs no +net/url: added support for redirections to get-pure-port +planet: made the planet module-name-resolver thread-safe, and + fixed planet to use already-downloaded .plt files (when present) +framework: the finder get-file and put-file dialogs no longer normalize their results framework: added to the testing library so that tests can be run when ignoring focus information from the underlying OS - -Version 5.1.2.3 -Added set-port-next-location! and changed the default prompt - read handler to use it when input and output ar terminals -racket/gui: removed unsupported MDI styles and method compiler/cm: added support for using more powerful security-guards when writing to the filesystem -Fixed an old bug so that planet now uses the already-downloaded - .plt files (when present) - -Version 5.1.2.2 -Changed the location-creation semantics of internal definitions - and `letrec-syntaxes+values' -Added unsafe-list-ref and unsafe-list-tail +mrlib/include-bitmap: adjust include-bitmap so it does not + write to the filesystem +Removed the Racket-to-C compiler: raco ctool -e/-c, mzc -e/-c, + compile-extensions, compile-extensions-to-c, compile-c-extensions, + compiler/cffi, compiler/comp-unit, compiler:inner^, and most + options in compiler/option Version 5.1.3, August 2011 No changes From b2e1bd0645033e5fde6eae2b34148c15712339e6 Mon Sep 17 00:00:00 2001 From: Matthias Felleisen Date: Tue, 18 Oct 2011 12:35:42 -0400 Subject: [PATCH 418/441] history for teachpacks updated; please propagate (cherry picked from commit 38b802dde454f0e6a675a10e31f86e7f05cf2f2a) --- doc/release-notes/teachpack/HISTORY.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/release-notes/teachpack/HISTORY.txt b/doc/release-notes/teachpack/HISTORY.txt index 6b3dd4925d3..3af60143976 100644 --- a/doc/release-notes/teachpack/HISTORY.txt +++ b/doc/release-notes/teachpack/HISTORY.txt @@ -1,3 +1,9 @@ +------------------------------------------------------------------------ +Version 5.2 [Tue Oct 18 12:34:16 EDT 2011] + +* bug fixes in 2htdp/universe +* also, on-release now works without presence of an on-key clause + ------------------------------------------------------------------------ Version 5.1.2 [Fri Jul 22 15:27:37 EDT 2011] From 0eb11080c20797cf19b01bb5983798831ee6f394 Mon Sep 17 00:00:00 2001 From: Carl Eastlund Date: Tue, 18 Oct 2011 16:17:54 -0400 Subject: [PATCH 419/441] Fixed a typo (syntax-quote => quote-syntax). (cherry picked from commit bb828c312ffa8d63ee625b1d2492378473c531c3) --- collects/planet/scribble.rkt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collects/planet/scribble.rkt b/collects/planet/scribble.rkt index f858ee6e927..a03cdf3a4a2 100644 --- a/collects/planet/scribble.rkt +++ b/collects/planet/scribble.rkt @@ -86,7 +86,7 @@ (syntax-parser #:literals [unsyntax] [(~and orig (_ (unsyntax e:expr))) #'(racketmodname - (unsyntax `(planet ,(make-planet-symbol (syntax-quote orig) e))))] + (unsyntax `(planet ,(make-planet-symbol (quote-syntax orig) e))))] [(_ suffix:id/this-package) #'(racketmodname (planet suffix.planet-id))])) From 34f3b16626b3a0e50a1d5eddf8796b5ff91a7daa Mon Sep 17 00:00:00 2001 From: Carl Eastlund Date: Tue, 18 Oct 2011 16:18:32 -0400 Subject: [PATCH 420/441] Made constructed planet links force the minor version for more reliable self-reference. (cherry picked from commit cc70834024161a1f81b9c69f13a4ccdb0aad2032) --- collects/planet/syntax.rkt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collects/planet/syntax.rkt b/collects/planet/syntax.rkt index 43b62fdfbb4..6768d538ff2 100644 --- a/collects/planet/syntax.rkt +++ b/collects/planet/syntax.rkt @@ -43,7 +43,7 @@ (match (syntax-source-planet-package stx) [(list owner name major minor) (string->symbol - (format "~a/~a:~a:~a~a" + (format "~a/~a:~a:=~a~a" owner (regexp-replace "\\.plt$" name "") major From a82a55074baf130cd2aa79d22ed9d7fe1ff0528b Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Tue, 18 Oct 2011 20:41:44 -0600 Subject: [PATCH 421/441] fix a marshaling bug for syntax objects Closes PR 12300 Merge to 5.2 (cherry picked from commit a81054fef44ca0844acd35fd5ebececdde78e80a) --- collects/tests/racket/stx.rktl | 55 ++++++++++++++++++++++++++++++++++ src/racket/src/syntax.c | 17 +++++++---- 2 files changed, 66 insertions(+), 6 deletions(-) diff --git a/collects/tests/racket/stx.rktl b/collects/tests/racket/stx.rktl index cb2cd2520a6..a13e853602d 100644 --- a/collects/tests/racket/stx.rktl +++ b/collects/tests/racket/stx.rktl @@ -1611,6 +1611,61 @@ (displayln (syntax-transforming-module-expression?)))))) (test "#t\n#f\n" get-output-string o)) +;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Check that a common wraps encoding that is detected only +;; after simplification and encoding is shared propery. If +;; it's not shared properly in this example, a gensym for +;; the internal-definition context gets duplicated. + +(parameterize ([current-namespace (make-base-namespace)]) + (define e + (compile '(module producer racket/base + (#%module-begin + + (require (for-syntax racket/base)) + + (define-syntax (compare stx) + (syntax-case stx () + [(_ formal body) + (let () + + (define (internal-definition-context-apply ctx s) + (syntax-case (local-expand #`(quote-syntax #,s) + 'expression + (list #'quote-syntax) + ctx) () + [(qs e) #'e])) + + (define ctx (syntax-local-make-definition-context)) + (syntax-local-bind-syntaxes (list #'formal) #f ctx) + (internal-definition-context-seal ctx) + + (with-syntax ([one + (internal-definition-context-apply ctx #'formal)] + [two + (syntax-local-introduce + (internal-definition-context-apply + ctx + (syntax-local-introduce + (internal-definition-context-apply ctx #'body))))]) + + (unless (free-identifier=? #'one #'two) + (error 'before + "identifiers were never the same")) + + #'(begin-for-syntax + (unless (free-identifier=? #'one #'two) + (error 'after + "identifiers used to be the same, but now are not")))))])) + + (compare z z))))) + (let ([o (open-output-bytes)]) + (write e o) + (parameterize ([read-accept-compiled #t]) + (eval (read (open-input-bytes (get-output-bytes o)))))) + (namespace-require ''producer) + (eval 10)) + ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (report-errs) diff --git a/src/racket/src/syntax.c b/src/racket/src/syntax.c index aa412dd65aa..5da668595f2 100644 --- a/src/racket/src/syntax.c +++ b/src/racket/src/syntax.c @@ -3764,7 +3764,7 @@ static Scheme_Object *resolve_env(Scheme_Object *a, Scheme_Object *orig_phase, scheme_write_to_string(((Scheme_Modidx *)result)->path, NULL), scheme_write_to_string(((Scheme_Modidx *)result)->base, NULL))); } else { - EXPLAIN(fprintf(stderr, "%d Result: %s\n", depth, scheme_write_to_string(result, NULL))); + EXPLAIN(fprintf(stderr, "%d Result: %s %p\n", depth, scheme_write_to_string(result, NULL), result)); } if (get_names) { EXPLAIN(fprintf(stderr, "%d phase %s\n", depth, scheme_write_to_string(get_names[3], NULL))); @@ -5075,12 +5075,17 @@ Scheme_Object *scheme_flatten_syntax_list(Scheme_Object *lst, int *islist) #define EXPLAIN_SIMP 0 #if EXPLAIN_SIMP #define EXPLAIN_S(x) if (explain_simp) x -static int explain_simp = 0; +static int explain_simp = 1; static void print_skips(Scheme_Object *skips) { while (skips) { - fprintf(stderr, " skip %s\n", scheme_write_to_string(SCHEME_CAR(skips), NULL)); - skips = SCHEME_CDR(skips); + if (SCHEME_PAIRP(skips)) { + fprintf(stderr, " skip %s\n", scheme_write_to_string(SCHEME_CAR(skips), NULL)); + skips = SCHEME_CDR(skips); + } else { + fprintf(stderr, " skip val %s\n", scheme_write_to_string(skips, NULL)); + skips = NULL; + } } } #else @@ -5273,7 +5278,7 @@ static Scheme_Object *simplify_lex_renames(Scheme_Object *wraps, Scheme_Hash_Tab EXPLAIN_S(fprintf(stderr, "[in simplify]\n")); - EXPLAIN_R(printf("Simplifying %p\n", lex_cache)); + EXPLAIN_R(printf("Simplifying %p %s\n", lex_cache, scheme_write_to_string(stx_datum, NULL))); while (!WRAP_POS_END_P(w)) { if (SCHEME_VECTORP(WRAP_POS_FIRST(w)) @@ -6224,7 +6229,6 @@ static Scheme_Object *wraps_to_datum(Scheme_Object *stx_datum, return scheme_hash_get(rns, old_key); } else { a = scheme_marshal_lookup(mt, old_key); - scheme_marshal_using_key(mt, old_key); if (!mt->same_map) { Scheme_Hash_Table *same_map; same_map = scheme_make_hash_table(SCHEME_hash_ptr); @@ -6233,6 +6237,7 @@ static Scheme_Object *wraps_to_datum(Scheme_Object *stx_datum, scheme_hash_set(mt->same_map, w_in, old_key); /* nevermind references that we saw when creating `stack': */ scheme_marshal_pop_refs(mt, 0); + scheme_marshal_using_key(mt, old_key); return a; } } From a38f02160e05a249175b82c435fcae2327f24458 Mon Sep 17 00:00:00 2001 From: Casey Klein Date: Wed, 19 Oct 2011 13:32:59 -0500 Subject: [PATCH 422/441] Updates Redex history for v5.2 Merge to release branch (cherry picked from commit 210a6f329ee19ad44bb5d321f5386a1a3cd42227) --- doc/release-notes/redex/HISTORY.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/doc/release-notes/redex/HISTORY.txt b/doc/release-notes/redex/HISTORY.txt index 55e838c3268..9c95c3cff96 100644 --- a/doc/release-notes/redex/HISTORY.txt +++ b/doc/release-notes/redex/HISTORY.txt @@ -1,3 +1,15 @@ +v5.2 + + * added define-judgment-form form + + * added define-term form + + * added with-compound-rewriters form + + * added Ariola-Felleisen by-need evaluation contexts to examples + + * improved error message for definition forms in expression contexts + v5.1.2 * added support for typsetting define-relation relations From cb6be016c63903d262ce4dd0cbfb62eecf33676c Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Thu, 20 Oct 2011 14:01:26 -0600 Subject: [PATCH 423/441] CGC fix for OpenBSD x86_64 Merge to 5.2 (cherry picked from commit a4011890e17f91332753240ddb9a2d3598fe8c79) --- src/racket/gc/include/private/gcconfig.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/racket/gc/include/private/gcconfig.h b/src/racket/gc/include/private/gcconfig.h index 3eb01a4b7f7..5d8ab05f8f8 100644 --- a/src/racket/gc/include/private/gcconfig.h +++ b/src/racket/gc/include/private/gcconfig.h @@ -1983,8 +1983,9 @@ # define STACKBOTTOM USRSTACK # endif extern int __data_start[]; -# define DATASTART ((ptr_t)(__data_start)) - extern char _end[]; +/* PLTSCHEME: commented out these two: */ +/*# define DATASTART ((ptr_t)(__data_start)) */ +/* extern char _end[]; */ # define DATAEND ((ptr_t)(&_end)) # define DYNAMIC_LOADING # endif From 1c745c59a02e85ea647d44e7dfcf693415dd1fa9 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Thu, 20 Oct 2011 14:26:07 -0600 Subject: [PATCH 424/441] fix JIT early reference to JIT generated address On x86_64, if the scratch-space address fits into 32 bits and the final place for shared code doesn't fit into a 32-bit address, then the size of the generated code could change, leading to a JIT buffer overflow. Merge to 5.2 (cherry picked from commit 35526a7bd73ad554fabbcf121822e9859fe3de59) --- src/racket/src/jitcommon.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/racket/src/jitcommon.c b/src/racket/src/jitcommon.c index 55722efadbf..4658fb68bfa 100644 --- a/src/racket/src/jitcommon.c +++ b/src/racket/src/jitcommon.c @@ -2597,7 +2597,8 @@ static int common10(mz_jit_state *jitter, void *_data) jit_ldxi_i(JIT_R2, JIT_V1, &((Scheme_Native_Closure_Data *)0x0)->closure_size); (void)jit_blti_i(refslow, JIT_R2, 0); /* case lambda */ jit_ldxi_p(JIT_R2, JIT_V1, &((Scheme_Native_Closure_Data *)0x0)->code); - ref_nc = jit_beqi_p(jit_forward(), JIT_R2, scheme_on_demand_jit_code); /* not yet JITted */ + jit_movi_p(JIT_V1, scheme_on_demand_jit_code); /* movi_p doesn't depends on actual address, which might change size */ + ref_nc = jit_beqr_p(jit_forward(), JIT_R2, JIT_V1); /* not yet JITted? */ jit_rshi_l(JIT_V1, JIT_R1, 1); jit_addi_l(JIT_V1, JIT_V1, 1); CHECK_LIMIT(); @@ -2614,6 +2615,7 @@ static int common10(mz_jit_state *jitter, void *_data) /* not-yet-JITted native: */ mz_patch_branch(ref_nc); + jit_ldxi_p(JIT_V1, JIT_R0, &((Scheme_Native_Closure *)0x0)->code); jit_ldxi_p(JIT_R0, JIT_V1, &((Scheme_Native_Closure_Data *)0x0)->u2.orig_code); jit_rshi_l(JIT_V1, JIT_R1, 1); jit_ldxi_i(JIT_R2, JIT_R0, &((Scheme_Closure_Data *)0x0)->num_params); From c6e1796afad27cdeafbacf4ba3afc5e47a034cd9 Mon Sep 17 00:00:00 2001 From: John Clements Date: Fri, 21 Oct 2011 02:17:03 -0700 Subject: [PATCH 425/441] updated history Merge to 5.2 (cherry picked from commit e830fb1b38e1c273e05513b1f1c68368e91f42e9) --- doc/release-notes/stepper/HISTORY.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/release-notes/stepper/HISTORY.txt b/doc/release-notes/stepper/HISTORY.txt index 381b630f9f8..f900a225aba 100644 --- a/doc/release-notes/stepper/HISTORY.txt +++ b/doc/release-notes/stepper/HISTORY.txt @@ -1,6 +1,10 @@ Stepper ------- +Changes for v5.2: + +None. + Changes for v5.1.2: Support for 'require' in stepped programs, fixed a number of From 564f9d0062444e9b65cafc437801719e79d06e34 Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Fri, 21 Oct 2011 07:26:55 -0500 Subject: [PATCH 426/441] adjust HtDP teaching languages' first and rest so that they accept circular lists. This commit fix an unintentional change introduced by this commit: c7d67f9babc2496aaf295a08264b79750785314b (and it also adds in test cases for what that commit appears to have been doing) Assuming everyone agrees that the behavior for first rest from back in 2010 is the behavior we still want (and the lack of release notes on the subject makes me believe that we do), then: Please include in 5.2. (cherry picked from commit 7acc5b78521ca86acd58e3e871af07bc2a3c716e) --- collects/deinprogramm/signature/signature-unit.rkt | 2 +- collects/tests/htdp-lang/advanced.rktl | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/collects/deinprogramm/signature/signature-unit.rkt b/collects/deinprogramm/signature/signature-unit.rkt index 2059bb7fc43..c608317da0c 100644 --- a/collects/deinprogramm/signature/signature-unit.rkt +++ b/collects/deinprogramm/signature/signature-unit.rkt @@ -5,7 +5,7 @@ (require scheme/promise mzlib/struct - (only-in racket/list first rest) + (only-in mzlib/list first rest) (for-syntax scheme/base) (for-syntax stepper/private/shared)) diff --git a/collects/tests/htdp-lang/advanced.rktl b/collects/tests/htdp-lang/advanced.rktl index 0a82c83f47b..dc6c8d89ba2 100644 --- a/collects/tests/htdp-lang/advanced.rktl +++ b/collects/tests/htdp-lang/advanced.rktl @@ -174,6 +174,14 @@ (htdp-test 1 car (shared ([x (cons 1 x)]) x)) (htdp-test 1 cadr (shared ([x (cons 1 x)][y (cons 2 x)]) y)) (htdp-test 1 cadddr (shared ([x (cons 1 x)][y (cons 2 x)]) y)) +(htdp-test 1 first (shared ([x (cons 1 x)]) x)) +(htdp-test 1 second (shared ([x (cons 1 x)]) x)) +(htdp-test 1 third (shared ([x (cons 1 x)]) x)) +(htdp-test 1 fourth (shared ([x (cons 1 x)]) x)) +(htdp-test 1 fifth (shared ([x (cons 1 x)]) x)) +(htdp-test 1 sixth (shared ([x (cons 1 x)]) x)) +(htdp-test 1 seventh (shared ([x (cons 1 x)]) x)) +(htdp-test 1 eighth (shared ([x (cons 1 x)]) x)) (htdp-test #t (lambda (l) (eq? l (cdr l))) (shared ([x (cons 1 x)]) x)) (htdp-test #t (lambda (l) (eq? l (car l))) (shared ([x (list x x)]) x)) (htdp-test #t (lambda (l) (eq? l (cadr l))) (shared ([x (list x x)]) x)) @@ -200,6 +208,10 @@ (htdp-err/rt-test (cons 1 2) "cons: second argument must be a list or cyclic list, but received 1 and 2") (htdp-err/rt-test (append (list 1) 2) "append: last argument must be a list or cyclic list, but received 2") +(htdp-err/rt-test (first 1) "first: expected argument of type ; given 1") +(htdp-err/rt-test (rest 1) "rest: expected argument of type ; given 1") + + (htdp-test #t 'equal? (equal? (vector (list 10) 'apple) (vector (list 10) 'apple))) (htdp-test #t 'equal? (equal? (shared ([x (cons 10 x)]) x) (shared ([x (cons 10 x)]) x))) (htdp-test #t 'equal? (equal? (shared ([x (cons (vector x) x)]) x) (shared ([x (cons (vector x) x)]) x))) From 90674cf9b20daa480b6df8bec4455e214fc451ca Mon Sep 17 00:00:00 2001 From: Sam Tobin-Hochstadt Date: Fri, 21 Oct 2011 10:54:56 -0400 Subject: [PATCH 427/441] Fix wrapping of `null' when provided as `Any'. Reported by 'dingfeng' on #racket. Please merge to 5.2. (cherry picked from commit da5b68fd4d944cef981062de5ed6d283a351fd1d) --- collects/tests/typed-racket/succeed/any-wrap-list.rkt | 11 +++++++++++ collects/typed-racket/utils/any-wrap.rkt | 3 +++ 2 files changed, 14 insertions(+) create mode 100644 collects/tests/typed-racket/succeed/any-wrap-list.rkt diff --git a/collects/tests/typed-racket/succeed/any-wrap-list.rkt b/collects/tests/typed-racket/succeed/any-wrap-list.rkt new file mode 100644 index 00000000000..9576df4b777 --- /dev/null +++ b/collects/tests/typed-racket/succeed/any-wrap-list.rkt @@ -0,0 +1,11 @@ +#lang racket/load + +(module m typed/racket + (provide f) + (define: f : Any '(a (2 3)))) + +(module n racket + (require 'm) + (list? (second f))) + +(require 'n) diff --git a/collects/typed-racket/utils/any-wrap.rkt b/collects/typed-racket/utils/any-wrap.rkt index 9974543c2e9..ce72581899a 100644 --- a/collects/typed-racket/utils/any-wrap.rkt +++ b/collects/typed-racket/utils/any-wrap.rkt @@ -7,12 +7,15 @@ (lambda (v p write?) (fprintf p "#" (any-wrap-val v)))) +(define undef (letrec ([x x]) x)) + (define (traverse wrap?) (define (t v) (match v [(? (lambda (e) (and (any-wrap? e) (not wrap?)))) (any-wrap-val v)] [(? (lambda (e) (or (number? e) (string? e) (char? e) (symbol? e) + (null? e) (regexp? e) (eq? undef e) (keyword? e) (bytes? e) (boolean? e) (void? e)))) v] [(cons x y) (cons (t x) (t y))] From e992a7f2b1ccc02e16cd0acf2d9587182b9910e4 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Fri, 21 Oct 2011 11:12:36 -0400 Subject: [PATCH 428/441] Fix the old-style keybinding example. (cherry picked from commit d8d79d22b2112afe583938bf7287d6b221bb9eda) --- collects/scribblings/drracket/keybindings.scrbl | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/collects/scribblings/drracket/keybindings.scrbl b/collects/scribblings/drracket/keybindings.scrbl index c0aaf1c18a2..33d616707ec 100644 --- a/collects/scribblings/drracket/keybindings.scrbl +++ b/collects/scribblings/drracket/keybindings.scrbl @@ -239,13 +239,17 @@ before version 5.2. @racketmod[ s-exp framework/keybinding-lang +(define modifiers + (apply string-append + (map (λ (p) + (case p + [(ctl) "c:"] [(cmd) "d:"] [(alt meta) "m:"] + [(shift) "s:"] [(option) "a:"])) + (get-default-shortcut-prefix)))) + (define-syntax-rule (frame-key key command) (keybinding - (format "~a:~a" - (case (get-default-shortcut-prefix) - [(ctl) "c"] [(cmd) "d"] [(alt meta) "m"] - [(shift) "s"] [(option) "a"]) - key) + (string-append modifiers key) (λ (ed evt) (when (is-a? ed text:basic<%>) (define fr (send ed get-top-level-window)) From 3c3633cd46ef1b2c0c5b072298ae3ec8e8975cd3 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Fri, 21 Oct 2011 11:13:02 -0400 Subject: [PATCH 429/441] Indicate repl phase level when it's not 0. (cherry picked from commit 0d642cf9763712bd557f89b767eb4a0aa75dd66b) --- collects/xrepl/xrepl.rkt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/collects/xrepl/xrepl.rkt b/collects/xrepl/xrepl.rkt index aef2c2cb9d8..47aae023219 100644 --- a/collects/xrepl/xrepl.rkt +++ b/collects/xrepl/xrepl.rkt @@ -1300,7 +1300,9 @@ (define (get-prefix) (let* ([x (here-source)] [x (and x (if (symbol? x) (format "'~s" x) (get-prefix* x)))] - [x (or x (toplevel-prefix))]) + [x (or x (toplevel-prefix))] + [x (let ([ph (namespace-base-phase)]) + (if (eq? 0 ph) x (format "~a[~a]" x ph)))]) (if (eq? (current-namespace-name) default-namespace-name) x (format "~a::~a" (current-namespace-name) x)))) (define last-directory #f) From a169f7ffa712a53a23a346a5290207c79e2a9977 Mon Sep 17 00:00:00 2001 From: Mike Sperber Date: Fri, 21 Oct 2011 20:43:50 +0200 Subject: [PATCH 430/441] Unbreak "Enable signature checking". Previously, if you disabled it once, it would stay disabled. (cherry picked from commit 36d3745d4c8e1ff655bb189a5d7853690c6eb139) --- collects/deinprogramm/signature/tool.rkt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collects/deinprogramm/signature/tool.rkt b/collects/deinprogramm/signature/tool.rkt index c18490472bd..c943c2af92c 100644 --- a/collects/deinprogramm/signature/tool.rkt +++ b/collects/deinprogramm/signature/tool.rkt @@ -37,7 +37,7 @@ (unless enabled? (set! enabled? #t) (set-label disable-label) - (preferences:set 'signatures:enable-checking? '#f))) + (preferences:set 'signatures:enable-checking? '#t))) (define/public (disable-signature-checking) (when enabled? (set! enabled? #f) From 7bdfbe11d65818f1f4ce5e912ac825833306bbb6 Mon Sep 17 00:00:00 2001 From: Eric Hanchrow Date: Sat, 22 Oct 2011 14:47:41 -0700 Subject: [PATCH 431/441] add missing word (cherry picked from commit b498d6e9e78556f790475c41ede41163aceaa615) --- collects/scribblings/guide/unit.scrbl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collects/scribblings/guide/unit.scrbl b/collects/scribblings/guide/unit.scrbl index d464aa6862c..7f7ce014da4 100644 --- a/collects/scribblings/guide/unit.scrbl +++ b/collects/scribblings/guide/unit.scrbl @@ -611,7 +611,7 @@ simple application to values---that make them suitable for different purposes. The @racket[module] form is more fundamental than the others, in a -sense. After all, a program fragment cannot reliably refer to +sense. After all, a program fragment cannot reliably refer to a @racket[lambda], @racket[class], or @racket[unit] form without the namespace management provided by @racket[module]. At the same time, because namespace management is closely related to separate expansion From c1eb2733a6d208471004b0ccf8031fbee0b747a7 Mon Sep 17 00:00:00 2001 From: Eric Hanchrow Date: Sat, 22 Oct 2011 14:47:42 -0700 Subject: [PATCH 432/441] add an "s" (cherry picked from commit 723934a608703d90631b5dae5c66306201644270) --- collects/web-server/scribblings/web-server.scrbl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collects/web-server/scribblings/web-server.scrbl b/collects/web-server/scribblings/web-server.scrbl index 3bd19105b99..11c610c5c35 100644 --- a/collects/web-server/scribblings/web-server.scrbl +++ b/collects/web-server/scribblings/web-server.scrbl @@ -13,7 +13,7 @@ This manual describes the Racket libraries for building Web applications. @secref["servlet"] use the entire Racket language, but their continuations are stored in the Web server's memory. @secref["stateless"] use a slightly restricted Racket language, but their continuation can be stored by the Web client or on a Web server's disk. If you can, you want to use @secref["stateless"] for the improved scalability. -The @secref["http"] section describes the common library function for manipulating HTTP requests and creating HTTP responses. +The @secref["http"] section describes the common library functions for manipulating HTTP requests and creating HTTP responses. In particular, this section covers cookies, authentication, and request bindings. The final five sections (@secref["dispatch"], @secref["formlets"], @secref["templates"], @secref["page"], and @secref["test"]) cover utility libraries that ease the creation of typical Web applications. From 8400ccc456a188ea0fbb060fbc14aa672f704a4d Mon Sep 17 00:00:00 2001 From: Jay McCarthy Date: Mon, 24 Oct 2011 06:50:36 -0600 Subject: [PATCH 433/441] Incorporating section from Mike W (cherry picked from commit ab45f4f1dbafed8fb09c60e33fdf541734a7e50d) --- .../web-server/scribblings/templates.scrbl | 78 +++++++++++++++++++ 1 file changed, 78 insertions(+) diff --git a/collects/web-server/scribblings/templates.scrbl b/collects/web-server/scribblings/templates.scrbl index d52568ad97b..f9d3f8ea0ff 100644 --- a/collects/web-server/scribblings/templates.scrbl +++ b/collects/web-server/scribblings/templates.scrbl @@ -256,6 +256,84 @@ issue for you called @racket[in]: }| Notice how it also avoids the absurd amount of punctuation on line two. +@section{Escaping} + +@margin-note{Thanks to Michael W. for this section.} + +Because templates are useful for many things (scripts, CSS, HTML, +etc), the Web Server does not assume that the template is for XML-like +content. Therefore when when templates are expanded, no +XML escaping is done by default. Beware of @emph{cross-site scripting} +vulnerabilities! For example, suppose a servlet serves the following +template where @racket[_some-variable] is an input string supplied by +the client: + +@verbatim[#:indent 2]|{ + + Fastest Templates in the West! + + @some-variable + + +}| + +If the servlet contains something like the following: + +@racketblock[ + (let ([some-variable (get-input-from-user)]) + (include-template "static.htm")) +] + +There is nothing to prevent an attacker from entering +@litchar[""] to make the +template expand into: + +@verbatim[#:indent 2]|{ + + Fastest Templates in the West! + + + + +}| + +Now the server will send the attacker's code to millions of innocent +users. To keep this from happening when serving HTML, use the +@racket[xexpr->string] function from the @racketmodname[xml] module. + +This can be done in the servlet: + +@racketblock[ + (require xml) + + (let ([some-variable (xexpr->string (get-input-from-user))]) + (include-template "static.htm")) +] + +Alternatively, make the template responsible for its own escaping: + +@verbatim[#:indent 2]|{ + + Fastest Templates in the West! + + @(xexpr->string some-variable) + + +}| + +The improved version renders as: + +@verbatim[#:indent 2]|{ + + Fastest Templates in the West! + + <script type=\"text/javascript\">...</script> + + +}| + +When writing templates, always remember to escape user-supplied input. + @section{HTTP Responses} The quickest way to generate an HTTP response from a template is using From f0db9180b4348bd329dbfc1ff19019b967899c02 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Sat, 29 Oct 2011 00:16:27 -0400 Subject: [PATCH 434/441] Improve unix installer tester. * The installer is a command-line argument. * Make it work in xterm too, by unsetting TERM. * Works with version-less directories, from release installers. (cherry picked from commit 1eec2b75e3c9c77e5d59a93172a34ef6ae67efba) --- .../meta/build/unix-installer/test-installer | 163 ++++++++++-------- 1 file changed, 87 insertions(+), 76 deletions(-) diff --git a/collects/meta/build/unix-installer/test-installer b/collects/meta/build/unix-installer/test-installer index 55ed825f616..4ec65c7c9af 100755 --- a/collects/meta/build/unix-installer/test-installer +++ b/collects/meta/build/unix-installer/test-installer @@ -7,12 +7,15 @@ exec racket "$0" "$@" (require racket/list racket/file racket/match racket/system) -(define testdir "/tmp/racket-installer-test") -(define installer "/tmp/r.sh") - (define (err fmt . args) (raise-user-error (format "Error: ~a" (apply format fmt args)))) +(define testdir "/tmp/racket-installer-test") +(define installer + (match (current-command-line-arguments) + [(vector installer) installer] + [(vector _ ...) (err "usage: test-installer ")])) + (define (exe name [just-path? #f]) (define path (or (find-executable-path name) (err "no `~a' executable found" name))) @@ -26,8 +29,8 @@ exec racket "$0" "$@" (when (directory-exists? testdir) (err "test directory exists: ~a" testdir)) (make-directory testdir) (current-directory testdir) -;; make identifiable prompts, predictable ls output, safe-for-play home -(void (putenv "PS1" "sh> ") (putenv "COLUMNS" "72") (putenv "HOME" testdir)) +;; plain interaction, identifiable prompts, safe-for-play home +(void (putenv "TERM" "dumb") (putenv "PS1" "sh> ") (putenv "HOME" testdir)) (define (transcript) ;; the test transcript text: @@ -35,15 +38,22 @@ exec racket "$0" "$@" ;; - `i' is for user input to send ;; - `r' is for a regexp ;; - `s' is a nested list to be spliced in - ;; - `N' is short for @r{[0-9.]+} + ;; - `N' is short for @r{(?:-?[0-9.]+)?} ;; - `...' makes the next match unanchored (so it's similar to a non-greedy ;; ".*" regexp) (define (i . xs) `(i . ,xs)) (define (r . xs) `(r . ,xs)) (define (s . xs) `(s . ,xs)) (define break 'break) - (define N @r{[0-9.]+}) + (define N @r{(?:-?[0-9.]+)?}) (define ... '...) + (define not-recommended + (let ([s (string-append + "*** This is a nightly build: such a unix-style distribution" + " is *not*\n" + "*** recommended because it cannot be used to install multiple" + " versions.\n")]) + (format "(?:~a)?" (regexp-quote s)))) @list{ @; the first few puzzling interactions are testing that we generate the @; right expect code -- which requires regexp and $-quoting. @@ -58,6 +68,8 @@ exec racket "$0" "$@" []{}blah*$x* sh> @i{pwd} @testdir + @; utilities + sh> @i{LS() { ls --width=72 -mF "$@"@""@";" }} @; proper testing begins here sh> @i{sh @installer} This program will extract and install Racket v@|N|. @@ -72,22 +84,21 @@ exec racket "$0" "$@" (movable and erasable), possibly with external links into it -- this is often more convenient, especially if you want to install multiple versions or keep it in your home directory. - *** This is a nightly build: such a unix-style distribution is *not* - *** recommended because it cannot be used to install multiple versions. + @r{@not-recommended}@; Enter yes/no (default: no) > @i{bleh} Enter yes/no (default: no) > @i{foo} Enter yes/no (default: no) > @i{} @|| - Where do you want to install the "racket-@N" directory tree? - 1 - /usr/racket-@N [default] - 2 - /usr/local/racket-@N - 3 - ~/racket-@N (@|testdir|/racket-@N) - 4 - ./racket-@N (here) + Where do you want to install the "racket@N" directory tree? + 1 - /usr/racket@N [default] + 2 - /usr/local/racket@N + 3 - ~/racket@N (@|testdir|/racket@N) + 4 - ./racket@N (here) Or enter a different "racket" directory to install in. > @i{4} @|| Checking the integrity of the binary archive... ok. - Unpacking into "@|testdir|/racket-@N" (Ctrl+C to abort)... + Unpacking into "@|testdir|/racket@N" (Ctrl+C to abort)... Done. @|| If you want to install new system links within the "bin" and @@ -98,9 +109,9 @@ exec racket "$0" "$@" (default: skip links) > @i{} @|| Installation complete. - sh> @i{ls -mF} - racket-@|N|/ - sh> @i{ls -mF racket-*} + sh> @i{LS} + racket@|N|/ + sh> @i{LS racket*} README, bin/, collects/, doc/, include/, lib/, man/ sh> @i{sh @installer} @... @@ -109,9 +120,9 @@ exec racket "$0" "$@" > @i{.} @|| Checking the integrity of the binary archive... ok. - "@|testdir|/racket-@N" exists, delete? @i{n} + "@|testdir|/racket@N" exists, delete? @i{n} Aborting installation. - sh> @i{ls -mF racket-*} + sh> @i{LS racket*} README, bin/, collects/, doc/, include/, lib/, man/ sh> @i{chmod 000 racket*} sh> @i{sh @installer} @@ -121,11 +132,11 @@ exec racket "$0" "$@" > @i{./} @|| Checking the integrity of the binary archive... ok. - "@|testdir|/racket-@N" exists, delete? @i{y} - Deleting old "@|testdir|/racket-@N"... @; - /bin/rm: cannot remove `@|testdir|/racket-@N': @; + "@|testdir|/racket@N" exists, delete? @i{y} + Deleting old "@|testdir|/racket@N"... @; + /bin/rm: cannot remove `@|testdir|/racket@N': @; Permission denied - Error: could not delete "@|testdir|/racket-@N". + Error: could not delete "@|testdir|/racket@N". sh> @i{chmod 755 racket*} sh> @i{sh @installer} @... @@ -134,8 +145,8 @@ exec racket "$0" "$@" > @i{.} @|| Checking the integrity of the binary archive... ok. - "@|testdir|/racket-@N" exists, delete? @i{y} - Deleting old "@|testdir|/racket-@N"... done. + "@|testdir|/racket@N" exists, delete? @i{y} + Deleting old "@|testdir|/racket@N"... done. @... (default: skip links) > @i{.} "@|testdir|/bin" does not exist, skipping. @@ -167,18 +178,18 @@ exec racket "$0" "$@" "@|testdir|/share/man/man1" does not exist, skipping. @|| Installation complete. - sh> @i{ls -mF .} - R/, bin/, racket-@|N|/ - sh> @i{ls -mF R} + sh> @i{LS .} + R/, bin/, racket@|N|/ + sh> @i{LS R} README, bin/, collects/, doc/, include/, lib/, man/ - sh> @i{ls -mF bin} + sh> @i{LS bin} @s|{drracket@, gracket, gracket-text@, mred@, mred-text@, mzc@, mzpp@, mzscheme@, mztext@, pdf-slatex@, planet@, plt-games@, plt-help@, plt-r5rs@, plt-r6rs@, plt-web-server@, racket@, raco@, scribble@, setup-plt@, slatex@, slideshow@, swindle@, tex2page@}| - sh> @i{ls -l bin/ra*} - lrwxrwxrwx. @... bin/racket -> @|testdir|/R/bin/racket - lrwxrwxrwx. @... bin/raco -> @|testdir|/R/bin/raco + sh> @i{LS -l bin/ra*} + lrwxrwxrwx. @... bin/racket -> @|testdir|/R/bin/racket* + lrwxrwxrwx. @... bin/raco -> @|testdir|/R/bin/raco* sh> @i{sh @installer} @... Enter yes/no (default: no) > @i{} @@ -190,8 +201,8 @@ exec racket "$0" "$@" @break Error: Aborting... (Removing installation files in @|testdir|/R1) - sh> @i{ls -mF} - R/, bin/, racket-@|N|/ + sh> @i{LS} + R/, bin/, racket@|N|/ sh> @i{sh @installer} @... Enter yes/no (default: no) > @i{} @@ -203,8 +214,8 @@ exec racket "$0" "$@" @... (default: skip links) > @break Error: Aborting... - sh> @i{ls -mF} - R/, bin/, mmm/, racket-5.2.0.1/ + sh> @i{LS} + R/, bin/, mmm/, racket@|N|/ sh> @i{sh @installer} @... Enter yes/no (default: no) > @i{} @@ -223,13 +234,13 @@ exec racket "$0" "$@" "/usr/local" is not writable, skipping links. @|| Installation complete. - sh> @i{ls -mF} + sh> @i{LS} sh> @i{cd /} sh> @i{cd @testdir} - sh> @i{ls -mF} + sh> @i{LS} README, bin/, collects/, doc/, include/, lib/, man/ sh> @i{rm -rf [a-zR]*} - sh> @i{ls -mF} + sh> @i{LS} sh> @i{sh @installer} @... Do you want a Unix-style distribution? @@ -261,11 +272,11 @@ exec racket "$0" "$@" @|| Target Directories: [e] Executables @|testdir|/bin (will be created) - [r] Racket Code @|testdir|/lib/racket-@|N|/collects (will be created) - [d] Core Docs @|testdir|/share/racket-@|N|/doc (will be created) + [r] Racket Code @|testdir|/lib/racket@|N|/collects (will be created) + [d] Core Docs @|testdir|/share/racket@|N|/doc (will be created) [l] C Libraries @|testdir|/lib (will be created) - [h] C headers @|testdir|/include/racket-@|N| (will be created) - [o] Extra C Objs @|testdir|/lib/racket-@|N| (will be created) + [h] C headers @|testdir|/include/racket@|N| (will be created) + [o] Extra C Objs @|testdir|/lib/racket@|N| (will be created) [m] Man Pages @|testdir|/share/man (will be created) Enter a letter to change an entry, or enter to continue. > @i{z} @@ -273,43 +284,43 @@ exec racket "$0" "$@" > @i{} @|| Checking the integrity of the binary archive... ok. - Unpacking into "@|testdir|/racket-@|N|-tmp-install" (Ctrl+C to abort)... + Unpacking into "@|testdir|/racket@|N|-tmp-install" (Ctrl+C to abort)... Done. Moving bin -> @|testdir|/bin - Moving collects -> @|testdir|/lib/racket-@|N|/collects - Moving doc -> @|testdir|/share/racket-@|N|/doc - Moving include -> @|testdir|/include/racket-@|N| - Moving lib -> @|testdir|/lib/racket-@|N| + Moving collects -> @|testdir|/lib/racket@|N|/collects + Moving doc -> @|testdir|/share/racket@|N|/doc + Moving include -> @|testdir|/include/racket@|N| + Moving lib -> @|testdir|/lib/racket@|N| Moving man -> @|testdir|/share/man - Moving README -> @|testdir|/share/racket-@|N|/doc/README + Moving README -> @|testdir|/share/racket@|N|/doc/README Writing uninstaller at: @|testdir|/bin/racket-uninstall... - Rewriting configuration file at: @|testdir|/lib/racket-@|N|/@; + Rewriting configuration file at: @|testdir|/lib/racket@|N|/@; collects/config/config.rkt... - Recompiling to @|testdir|/lib/racket-@|N|/@; + Recompiling to @|testdir|/lib/racket@|N|/@; collects/config/compiled/config_rkt.zo... @|| Installation complete. - sh> @i{ls -mF} + sh> @i{LS} bin/, include/, lib/, share/ - sh> @i{ls -mF bin} + sh> @i{LS bin} drracket*, gracket*, gracket-text*, mred*, mred-text*, mzc*, mzpp*, mzscheme*, mztext*, pdf-slatex*, planet*, plt-games*, plt-help*, plt-r5rs*, plt-r6rs*, plt-web-server*, racket*, racket-uninstall*, raco*, scribble*, setup-plt*, slatex*, slideshow*, swindle*, tex2page* - sh> @i{ls -mF include && ls -mF lib && ls -mF share} - racket-@|N|/ - racket-@|N|/ - man/, racket-@|N|/ - sh> @i{ls -mF include/r*} + sh> @i{LS include && LS lib && LS share} + racket@|N|/ + racket@|N|/ + man/, racket@|N|/ + sh> @i{LS include/r*} escheme.h, ext.exp, mzconfig.h, mzscheme3m.exp, scheme.h, schemef.h, schemegc2.h, schemex.h, schemexm.h, schexn.h, schgc2obj.h, schthread.h, schvers.h, sconfig.h, stypes.h, uconfig.h - sh> @i{ls -mF lib/r*} + sh> @i{LS lib/r*} buildinfo, collects/, libfit.so*, mzdyn3m.o, starter* - sh> @i{ls -mF share/r* && ls -mF share/r*/doc} + sh> @i{LS share/r* && LS share/r*/doc} doc/ README, @... xrepl/ - sh> @i{ls -mF share/man && ls -mF share/man/man1} + sh> @i{LS share/man && LS share/man/man1} man1/ drracket.1, gracket.1, mred.1, mzc.1, mzscheme.1, plt-help.1, racket.1, raco.1, setup-plt.1, tex2page.1 @@ -330,11 +341,11 @@ exec racket "$0" "$@" @|| Target Directories: [e] Executables @|testdir|/bin (exists) - [r] Racket Code @|testdir|/lib/racket-@|N|/collects (exists) - [d] Core Docs @|testdir|/share/racket-@|N|/doc (exists) + [r] Racket Code @|testdir|/lib/racket@|N|/collects (exists) + [d] Core Docs @|testdir|/share/racket@|N|/doc (exists) [l] C Libraries @|testdir|/lib (exists) - [h] C headers @|testdir|/include/racket-@|N| (exists) - [o] Extra C Objs @|testdir|/lib/racket-@|N| (exists) + [h] C headers @|testdir|/include/racket@|N| (exists) + [o] Extra C Objs @|testdir|/lib/racket@|N| (exists) [m] Man Pages @|testdir|/share/man (exists) Enter a letter to change an entry, or enter to continue. > @i{m} @@ -342,11 +353,11 @@ exec racket "$0" "$@" @|| Target Directories: [e] Executables @|testdir|/bin (exists) - [r] Racket Code @|testdir|/lib/racket-@|N|/collects (exists) - [d] Core Docs @|testdir|/share/racket-@|N|/doc (exists) + [r] Racket Code @|testdir|/lib/racket@|N|/collects (exists) + [d] Core Docs @|testdir|/share/racket@|N|/doc (exists) [l] C Libraries @|testdir|/lib (exists) - [h] C headers @|testdir|/include/racket-@|N| (exists) - [o] Extra C Objs @|testdir|/lib/racket-@|N| (exists) + [h] C headers @|testdir|/include/racket@|N| (exists) + [o] Extra C Objs @|testdir|/lib/racket@|N| (exists) [m] Man Pages @|testdir|/m (error: not a directory!) Enter a letter to change an entry, or enter to continue. > @i{} @@ -358,11 +369,11 @@ exec racket "$0" "$@" @|| Target Directories: [e] Executables @|testdir|/bin (exists) - [r] Racket Code @|testdir|/lib/racket-@|N|/collects (exists) - [d] Core Docs @|testdir|/share/racket-@|N|/doc (exists) + [r] Racket Code @|testdir|/lib/racket@|N|/collects (exists) + [d] Core Docs @|testdir|/share/racket@|N|/doc (exists) [l] C Libraries @|testdir|/lib (exists) - [h] C headers @|testdir|/include/racket-@|N| (exists) - [o] Extra C Objs @|testdir|/lib/racket-@|N| (exists) + [h] C headers @|testdir|/include/racket@|N| (exists) + [o] Extra C Objs @|testdir|/lib/racket@|N| (exists) [m] Man Pages @|testdir|/man (will be created) Enter a letter to change an entry, or enter to continue. > @i{} @@ -375,7 +386,7 @@ exec racket "$0" "$@" Checking the integrity of the binary archive... ok. @... Installation complete. - sh> @i{ls -mF} + sh> @i{LS} bin/, include/, lib/, m, man/, share/ sh> @i{sh @installer} @... @@ -400,7 +411,7 @@ exec racket "$0" "$@" Enter a letter to change an entry, or enter to continue. > @break Error: Aborting... - sh> @i{ls -mF} + sh> @i{LS} bin/, include/, lib/, m, man/ sh> @i{exit} @||}) From e3b8195afa170f6909e607ce349bb29bf3d8a65b Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Wed, 2 Nov 2011 17:40:04 -0400 Subject: [PATCH 435/441] Fix the default `sandbox-make-code-inspector'. It now creates an inspector based on the original code inspector instead of the (implicit) wrong default used by `make-inspector'. Change `sandbox-make-inspector' too, to make it explicit. (cherry picked from commit 90f7a98dd6d16686ce6874387536a6cf93671f8b) --- collects/racket/sandbox.rkt | 6 +++-- collects/scribblings/reference/sandbox.scrbl | 26 +++++++++++--------- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/collects/racket/sandbox.rkt b/collects/racket/sandbox.rkt index 62cfc6b27dd..02777130e5d 100644 --- a/collects/racket/sandbox.rkt +++ b/collects/racket/sandbox.rkt @@ -202,9 +202,11 @@ (define sandbox-exit-handler (make-parameter default-sandbox-exit-handler)) -(define sandbox-make-inspector (make-parameter make-inspector)) +(define sandbox-make-inspector + (make-parameter (lambda () (make-inspector (current-inspector))))) -(define sandbox-make-code-inspector (make-parameter make-inspector)) +(define sandbox-make-code-inspector + (make-parameter (lambda () (make-inspector (current-code-inspector))))) (define sandbox-make-logger (make-parameter current-logger)) diff --git a/collects/scribblings/reference/sandbox.scrbl b/collects/scribblings/reference/sandbox.scrbl index ac6efcc2852..3a3b6966afe 100644 --- a/collects/scribblings/reference/sandbox.scrbl +++ b/collects/scribblings/reference/sandbox.scrbl @@ -676,22 +676,24 @@ other resources intact.} @defparam[sandbox-make-inspector make (-> inspector?)]{ -A parameter that determines the procedure used to create the inspector -for sandboxed evaluation. The procedure is called when initializing -an evaluator, and the default parameter value is -@racket[make-inspector].} +A parameter that determines the (nullary) procedure that is used to +create the inspector for sandboxed evaluation. The procedure is called +when initializing an evaluator. The default parameter value is +@racket[(lambda () (make-inspector (current-inspector)))].} @defparam[sandbox-make-code-inspector make (-> inspector?)]{ -A parameter that determines the procedure used to create the code -inspector for sandboxed evaluation. The procedure is called when -initializing an evaluator, and the default parameter value is -@racket[make-inspector]. The @racket[current-load/use-compiled] -handler is setup to still allow loading of bytecode files under the -original code inspector when @racket[sandbox-path-permissions] allows -it through a @racket['read-bytecode] mode symbol, to make it possible -to load libraries.} +A parameter that determines the (nullary) procedure that is used to +create the code inspector for sandboxed evaluation. The procedure is +called when initializing an evaluator. The default parameter value is +@racket[(lambda () (make-inspector (current-code-inspector)))]. + +The @racket[current-load/use-compiled] handler is setup to allow loading +of bytecode files under the original code inspector when +@racket[sandbox-path-permissions] allows it through a +@racket['read-bytecode] mode symbol, which makes loading libraries +possible.} @defparam[sandbox-make-logger make (-> logger?)]{ From 4b79e53d652889c490eb71820c5f87bba4de9c92 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Thu, 3 Nov 2011 17:08:53 -0400 Subject: [PATCH 436/441] Add a history note on the lazy change, make the TR history specify 5.2. (cherry picked from commit cfc465932e0f240ac173590f59f781bc1739fc85) --- doc/release-notes/racket/HISTORY.txt | 2 ++ doc/release-notes/typed-racket/HISTORY.txt | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/release-notes/racket/HISTORY.txt b/doc/release-notes/racket/HISTORY.txt index 6d12b445774..707d3919389 100644 --- a/doc/release-notes/racket/HISTORY.txt +++ b/doc/release-notes/racket/HISTORY.txt @@ -52,6 +52,8 @@ Removed the Racket-to-C compiler: raco ctool -e/-c, mzc -e/-c, compile-extensions, compile-extensions-to-c, compile-c-extensions, compiler/cffi, compiler/comp-unit, compiler:inner^, and most options in compiler/option +The The `lazy' language is now based on `racket' instead of `mzscheme'. + Specifically, it now uses modern `require's and `provide's. Version 5.1.3, August 2011 No changes diff --git a/doc/release-notes/typed-racket/HISTORY.txt b/doc/release-notes/typed-racket/HISTORY.txt index 015d098446c..2ad33e34724 100644 --- a/doc/release-notes/typed-racket/HISTORY.txt +++ b/doc/release-notes/typed-racket/HISTORY.txt @@ -1,4 +1,4 @@ -5.1.3.* +5.2 - Performance work: delayed environment evaluation - Support `racket'-style optional arguments - Changes to support new-style keyword argument expansion From df779e69cb241857227a790d6019b858c4867d5d Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Thu, 3 Nov 2011 17:25:17 -0400 Subject: [PATCH 437/441] Update version number for the v5.2 release --- src/racket/src/schvers.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/racket/src/schvers.h b/src/racket/src/schvers.h index 288eb5b9a20..e1561cd2fdf 100644 --- a/src/racket/src/schvers.h +++ b/src/racket/src/schvers.h @@ -13,12 +13,12 @@ consistently.) */ -#define MZSCHEME_VERSION "5.1.900.1" +#define MZSCHEME_VERSION "5.2" #define MZSCHEME_VERSION_X 5 -#define MZSCHEME_VERSION_Y 1 -#define MZSCHEME_VERSION_Z 900 -#define MZSCHEME_VERSION_W 1 +#define MZSCHEME_VERSION_Y 2 +#define MZSCHEME_VERSION_Z 0 +#define MZSCHEME_VERSION_W 0 #define MZSCHEME_VERSION_MAJOR ((MZSCHEME_VERSION_X * 100) + MZSCHEME_VERSION_Y) #define MZSCHEME_VERSION_MINOR ((MZSCHEME_VERSION_Z * 1000) + MZSCHEME_VERSION_W) From 6a996b3eb7f76620a73f5970deb7d68dbace793e Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Thu, 3 Nov 2011 17:25:19 -0400 Subject: [PATCH 438/441] New Racket version 5.2. --- src/worksp/gracket/gracket.manifest | 2 +- src/worksp/gracket/gracket.rc | 8 ++++---- src/worksp/mzcom/mzcom.rc | 12 ++++++------ src/worksp/mzcom/mzobj.rgs | 6 +++--- src/worksp/racket/racket.manifest | 2 +- src/worksp/racket/racket.rc | 8 ++++---- src/worksp/starters/start.rc | 8 ++++---- 7 files changed, 23 insertions(+), 23 deletions(-) diff --git a/src/worksp/gracket/gracket.manifest b/src/worksp/gracket/gracket.manifest index 03c5ce0eaae..f3023fc2933 100644 --- a/src/worksp/gracket/gracket.manifest +++ b/src/worksp/gracket/gracket.manifest @@ -1,6 +1,6 @@ - diff --git a/src/worksp/gracket/gracket.rc b/src/worksp/gracket/gracket.rc index 6236d8fc688..919148f9c04 100644 --- a/src/worksp/gracket/gracket.rc +++ b/src/worksp/gracket/gracket.rc @@ -17,8 +17,8 @@ APPLICATION ICON DISCARDABLE "gracket.ico" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 5,1,900,1 - PRODUCTVERSION 5,1,900,1 + FILEVERSION 5,2,0,0 + PRODUCTVERSION 5,2,0,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -36,11 +36,11 @@ BEGIN VALUE "CompanyName", "PLT Scheme Inc.\0" VALUE "FileDescription", "Racket GUI application\0" VALUE "InternalName", "GRacket\0" - VALUE "FileVersion", "5, 1, 900, 1\0" + VALUE "FileVersion", "5, 2, 0, 0\0" VALUE "LegalCopyright", "Copyright © 1995-2011\0" VALUE "OriginalFilename", "GRacket.exe\0" VALUE "ProductName", "Racket\0" - VALUE "ProductVersion", "5, 1, 900, 1\0" + VALUE "ProductVersion", "5, 2, 0, 0\0" END END BLOCK "VarFileInfo" diff --git a/src/worksp/mzcom/mzcom.rc b/src/worksp/mzcom/mzcom.rc index 531fdf55db7..9ddfeb78954 100644 --- a/src/worksp/mzcom/mzcom.rc +++ b/src/worksp/mzcom/mzcom.rc @@ -53,8 +53,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 5,1,900,1 - PRODUCTVERSION 5,1,900,1 + FILEVERSION 5,2,0,0 + PRODUCTVERSION 5,2,0,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -70,12 +70,12 @@ BEGIN BLOCK "040904b0" BEGIN VALUE "FileDescription", "MzCOM Module" - VALUE "FileVersion", "5, 1, 900, 1" + VALUE "FileVersion", "5, 2, 0, 0" VALUE "InternalName", "MzCOM" VALUE "LegalCopyright", "Copyright 2000-2011 PLT (Paul Steckler)" VALUE "OriginalFilename", "MzCOM.EXE" VALUE "ProductName", "MzCOM Module" - VALUE "ProductVersion", "5, 1, 900, 1" + VALUE "ProductVersion", "5, 2, 0, 0" END END BLOCK "VarFileInfo" @@ -105,10 +105,10 @@ CAPTION "MzCOM" FONT 8, "MS Sans Serif", 0, 0, 0x0 BEGIN DEFPUSHBUTTON "OK",IDOK,76,69,50,14,BS_CENTER - CTEXT "MzCOM v. 5.1",IDC_STATIC,71,8,61,8 + CTEXT "MzCOM v. 5.2",IDC_STATIC,71,8,61,8 CTEXT "Copyright (c) 2000-2011 PLT (Paul Steckler)",IDC_STATIC, 41,20,146,9 - CTEXT "Racket v. 5.1",IDC_STATIC,64,35,75,8 + CTEXT "Racket v. 5.2",IDC_STATIC,64,35,75,8 CTEXT "Copyright (c) 1995-2011 PLT Inc.",IDC_STATIC, 30,47,143,8 ICON MZICON,IDC_STATIC,11,16,20,20 diff --git a/src/worksp/mzcom/mzobj.rgs b/src/worksp/mzcom/mzobj.rgs index c9eb625c8cb..734c40b4766 100644 --- a/src/worksp/mzcom/mzobj.rgs +++ b/src/worksp/mzcom/mzobj.rgs @@ -1,19 +1,19 @@ HKCR { - MzCOM.MzObj.5.1.900.1 = s 'MzObj Class' + MzCOM.MzObj.5.2.0.0 = s 'MzObj Class' { CLSID = s '{A3B0AF9E-2AB0-11D4-B6D2-0060089002FE}' } MzCOM.MzObj = s 'MzObj Class' { CLSID = s '{A3B0AF9E-2AB0-11D4-B6D2-0060089002FE}' - CurVer = s 'MzCOM.MzObj.5.1.900.1' + CurVer = s 'MzCOM.MzObj.5.2.0.0' } NoRemove CLSID { ForceRemove {A3B0AF9E-2AB0-11D4-B6D2-0060089002FE} = s 'MzObj Class' { - ProgID = s 'MzCOM.MzObj.5.1.900.1' + ProgID = s 'MzCOM.MzObj.5.2.0.0' VersionIndependentProgID = s 'MzCOM.MzObj' ForceRemove 'Programmable' LocalServer32 = s '%MODULE%' diff --git a/src/worksp/racket/racket.manifest b/src/worksp/racket/racket.manifest index f9180cc43b9..bf4c1c38545 100644 --- a/src/worksp/racket/racket.manifest +++ b/src/worksp/racket/racket.manifest @@ -1,6 +1,6 @@ - diff --git a/src/worksp/racket/racket.rc b/src/worksp/racket/racket.rc index 75b9dfe52f7..16040b3695e 100644 --- a/src/worksp/racket/racket.rc +++ b/src/worksp/racket/racket.rc @@ -29,8 +29,8 @@ APPLICATION ICON DISCARDABLE "racket.ico" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 5,1,900,1 - PRODUCTVERSION 5,1,900,1 + FILEVERSION 5,2,0,0 + PRODUCTVERSION 5,2,0,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -48,11 +48,11 @@ BEGIN VALUE "CompanyName", "PLT Scheme Inc.\0" VALUE "FileDescription", "Racket application\0" VALUE "InternalName", "Racket\0" - VALUE "FileVersion", "5, 1, 900, 1\0" + VALUE "FileVersion", "5, 2, 0, 0\0" VALUE "LegalCopyright", "Copyright © 1995-2011\0" VALUE "OriginalFilename", "racket.exe\0" VALUE "ProductName", "Racket\0" - VALUE "ProductVersion", "5, 1, 900, 1\0" + VALUE "ProductVersion", "5, 2, 0, 0\0" END END BLOCK "VarFileInfo" diff --git a/src/worksp/starters/start.rc b/src/worksp/starters/start.rc index 9c7e5f6182c..ba10fa212f8 100644 --- a/src/worksp/starters/start.rc +++ b/src/worksp/starters/start.rc @@ -22,8 +22,8 @@ APPLICATION ICON DISCARDABLE "mzstart.ico" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 5,1,900,1 - PRODUCTVERSION 5,1,900,1 + FILEVERSION 5,2,0,0 + PRODUCTVERSION 5,2,0,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -45,7 +45,7 @@ BEGIN #ifdef MZSTART VALUE "FileDescription", "Racket Launcher\0" #endif - VALUE "FileVersion", "5, 1, 900, 1\0" + VALUE "FileVersion", "5, 2, 0, 0\0" #ifdef MRSTART VALUE "InternalName", "mrstart\0" #endif @@ -60,7 +60,7 @@ BEGIN VALUE "OriginalFilename", "MzStart.exe\0" #endif VALUE "ProductName", "Racket\0" - VALUE "ProductVersion", "5, 1, 900, 1\0" + VALUE "ProductVersion", "5, 2, 0, 0\0" END END BLOCK "VarFileInfo" From 8cbb867811809e2cf133c09e5f98b25df102ac5b Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Fri, 4 Nov 2011 19:24:38 -0400 Subject: [PATCH 439/441] Fixed version of b9bd1db5. --- collects/racket/sandbox.rkt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/collects/racket/sandbox.rkt b/collects/racket/sandbox.rkt index 02777130e5d..1e5745199fe 100644 --- a/collects/racket/sandbox.rkt +++ b/collects/racket/sandbox.rkt @@ -878,7 +878,6 @@ (;; create a sandbox context first [current-custodian user-cust] [current-thread-group (make-thread-group)] - [current-namespace (make-evaluation-namespace)] ;; set up the IO context [current-input-port (let ([inp (sandbox-input)]) @@ -917,6 +916,8 @@ [current-logger ((sandbox-make-logger))] [current-inspector ((sandbox-make-inspector))] [current-code-inspector ((sandbox-make-code-inspector))] + ;; Create the namespace under the restricted code inspector + [current-namespace (make-evaluation-namespace)] ;; The code inspector serves two purposes -- making sure that only trusted ;; byte-code is loaded, and avoiding using protected module bindings, like ;; the foreign library's `unsafe!'. We control the first through the path From 6797a444478139dd48c7b106595bbe365534b8c6 Mon Sep 17 00:00:00 2001 From: Ryan Culpepper Date: Tue, 8 Nov 2011 12:39:16 -0800 Subject: [PATCH 440/441] Revert "Fixed version of b9bd1db5." This reverts commit 8cbb867811809e2cf133c09e5f98b25df102ac5b. --- collects/racket/sandbox.rkt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/collects/racket/sandbox.rkt b/collects/racket/sandbox.rkt index 1e5745199fe..02777130e5d 100644 --- a/collects/racket/sandbox.rkt +++ b/collects/racket/sandbox.rkt @@ -878,6 +878,7 @@ (;; create a sandbox context first [current-custodian user-cust] [current-thread-group (make-thread-group)] + [current-namespace (make-evaluation-namespace)] ;; set up the IO context [current-input-port (let ([inp (sandbox-input)]) @@ -916,8 +917,6 @@ [current-logger ((sandbox-make-logger))] [current-inspector ((sandbox-make-inspector))] [current-code-inspector ((sandbox-make-code-inspector))] - ;; Create the namespace under the restricted code inspector - [current-namespace (make-evaluation-namespace)] ;; The code inspector serves two purposes -- making sure that only trusted ;; byte-code is loaded, and avoiding using protected module bindings, like ;; the foreign library's `unsafe!'. We control the first through the path From e42bfe361c33bb8f770d0e3c536013d7a122006d Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Wed, 9 Nov 2011 21:55:42 -0500 Subject: [PATCH 441/441] v5.2 stuff (cherry picked from commit 794779b997589c1a951cdba0a656cb2798a3b4e3) --- collects/meta/web/download/installers.txt | 28 +++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/collects/meta/web/download/installers.txt b/collects/meta/web/download/installers.txt index be8d1c7853c..3724d45402a 100644 --- a/collects/meta/web/download/installers.txt +++ b/collects/meta/web/download/installers.txt @@ -160,3 +160,31 @@ 16095941 5.1/racket/racket-5.1-src-mac.dmg 15759982 5.1/racket/racket-5.1-src-unix.tgz 17987080 5.1/racket/racket-5.1-src-win.zip +10072568 5.2/racket-textual/racket-textual-5.2-bin-i386-linux-f12.sh +10087724 5.2/racket-textual/racket-textual-5.2-bin-i386-linux-ubuntu-karmic.sh +10419223 5.2/racket-textual/racket-textual-5.2-bin-i386-osx-mac.dmg +7639819 5.2/racket-textual/racket-textual-5.2-bin-i386-win32.exe +10001213 5.2/racket-textual/racket-textual-5.2-bin-ppc-darwin.sh +10368884 5.2/racket-textual/racket-textual-5.2-bin-ppc-osx-mac.dmg +10243046 5.2/racket-textual/racket-textual-5.2-bin-x86_64-linux-debian-lenny.sh +10256265 5.2/racket-textual/racket-textual-5.2-bin-x86_64-linux-debian-squeeze.sh +10259861 5.2/racket-textual/racket-textual-5.2-bin-x86_64-linux-f14.sh +10631349 5.2/racket-textual/racket-textual-5.2-bin-x86_64-osx-mac.dmg +7965785 5.2/racket-textual/racket-textual-5.2-bin-x86_64-win32.exe +5926754 5.2/racket-textual/racket-textual-5.2-src-mac.dmg +5806691 5.2/racket-textual/racket-textual-5.2-src-unix.tgz +6846137 5.2/racket-textual/racket-textual-5.2-src-win.zip +54306960 5.2/racket/racket-5.2-bin-i386-linux-f12.sh +54333056 5.2/racket/racket-5.2-bin-i386-linux-ubuntu-karmic.sh +56070009 5.2/racket/racket-5.2-bin-i386-osx-mac.dmg +36205596 5.2/racket/racket-5.2-bin-i386-win32.exe +54161422 5.2/racket/racket-5.2-bin-ppc-darwin.sh +57109008 5.2/racket/racket-5.2-bin-ppc-osx-mac.dmg +54654394 5.2/racket/racket-5.2-bin-x86_64-linux-debian-lenny.sh +54678069 5.2/racket/racket-5.2-bin-x86_64-linux-debian-squeeze.sh +54685565 5.2/racket/racket-5.2-bin-x86_64-linux-f14.sh +56380421 5.2/racket/racket-5.2-bin-x86_64-osx-mac.dmg +36902485 5.2/racket/racket-5.2-bin-x86_64-win32.exe +16601808 5.2/racket/racket-5.2-src-mac.dmg +16260740 5.2/racket/racket-5.2-src-unix.tgz +19575041 5.2/racket/racket-5.2-src-win.zip