A lot of "DrScheme" -> "DrRacket"s.
This commit is contained in:
parent
aa7090fb25
commit
de0cc7771b
|
@ -1,2 +1,2 @@
|
|||
This directory hold defaults for the DrScheme preferences. Search in
|
||||
Help Desk for "site-specific" for more information.
|
||||
This directory hold defaults for the DrRacket preferences.
|
||||
For more information, search the documentation for "site-specific".
|
||||
|
|
|
@ -836,8 +836,8 @@
|
|||
(define/override (get-reader-module) reader-module)
|
||||
(define/override (get-metadata modname settings)
|
||||
(string-append
|
||||
";; Die ersten drei Zeilen dieser Datei wurden von DrScheme eingefügt. Sie enthalten Metadaten\n"
|
||||
";; über die Sprachebene dieser Datei in einer Form, die DrScheme verarbeiten kann.\n"
|
||||
";; Die ersten drei Zeilen dieser Datei wurden von DrRacket eingefügt. Sie enthalten Metadaten\n"
|
||||
";; über die Sprachebene dieser Datei in einer Form, die DrRacket verarbeiten kann.\n"
|
||||
(format "#reader~s~s\n"
|
||||
reader-module
|
||||
`((modname ,modname)
|
||||
|
|
|
@ -27,7 +27,7 @@ Befehle bewegt werden:
|
|||
@item{@scheme[(turn n)] Dreht die Schildkröte um n Grad im Uhrzeigersinn.}
|
||||
]
|
||||
|
||||
Wir stellen jetzt ein Teachpack für DrScheme vor, mit dessen Hilfe
|
||||
Wir stellen jetzt ein Teachpack für DrRacket vor, mit dessen Hilfe
|
||||
solche Turtle-Grafiken erstellt werden können.
|
||||
|
||||
@section{Tutorial}
|
||||
|
|
|
@ -109,7 +109,7 @@
|
|||
;; shut down the timer when the window is destroyed
|
||||
(send the-time stop)
|
||||
(inner (void) on-close)))
|
||||
(label "DrScheme")
|
||||
(label "DrRacket")
|
||||
(stretchable-width #f)
|
||||
(stretchable-height #f)
|
||||
(style '(no-resize-border metal))))
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
;; NOTE: this module instantiates stacktrace itself, so we have
|
||||
;; to be careful to not mix that instantiation with the one
|
||||
;; drracket/private/debug.rkt does. errortrace-lib's is for the
|
||||
;; compilation handling, DrScheme's is for profiling and test coverage
|
||||
;; compilation handling, DrRacket's is for profiling and test coverage
|
||||
;; (which do not do compilation)
|
||||
(prefix-in el: errortrace/errortrace-lib)
|
||||
|
||||
|
|
|
@ -116,7 +116,7 @@
|
|||
(vector (read-language (open-input-string "#lang racket"))))))])
|
||||
|
||||
; sometimes I get eof here, but I don't know why and can't seem to
|
||||
;; make it happen outside of DrScheme
|
||||
;; make it happen outside of DrRacket
|
||||
(when (eof-object? info-result)
|
||||
(fprintf (current-error-port) "file ~s produces eof from read-language\n"
|
||||
(send this get-filename))
|
||||
|
|
|
@ -8,7 +8,7 @@ TODO
|
|||
|
||||
|
||||
|#
|
||||
; =Kernel= means in DrScheme's thread and parameterization
|
||||
; =Kernel= means in DrRacket's thread and parameterization
|
||||
;
|
||||
; =User= means the user's thread and parameterization
|
||||
;
|
||||
|
@ -1255,7 +1255,7 @@ TODO
|
|||
|
||||
; setup standard parameters
|
||||
(let ([snip-classes
|
||||
; the snip-classes in the DrScheme eventspace's snip-class-list
|
||||
; the snip-classes in the DrRacket eventspace's snip-class-list
|
||||
(drracket:eval:get-snip-classes)]
|
||||
[drs-eventspace (current-eventspace)])
|
||||
(queue-user/wait
|
||||
|
|
|
@ -69,7 +69,7 @@
|
|||
(fprintf sp ")")
|
||||
(let ([sema (make-semaphore)])
|
||||
;; Disable breaks, so an exn handler can't
|
||||
;; grab the DrScheme eventspacae:
|
||||
;; grab the DrRacket eventspacae:
|
||||
(parameterize-break #f
|
||||
;; Queue callback to write trace line ---
|
||||
;; low priority, so that infinite loops don't stop the user
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
|
||||
@title{@italic{Essentials of Programming Languages} Language}
|
||||
|
||||
The @italic{Essentials of Programming Languages} language in DrScheme
|
||||
The @italic{Essentials of Programming Languages} language in DrRacket
|
||||
provides a subset of functions and syntactic forms of
|
||||
@schememodname[mzscheme]---mostly the ones that correspond to
|
||||
@scheme[r5rs] forms. See below for a complete list. The
|
||||
|
@ -150,7 +150,7 @@ The following bindings are re-@scheme[provide]d from
|
|||
@defidform[sllgen:list-define-datatypes])]{
|
||||
|
||||
Defined in the textbook's Appendix B @cite["EoPL"]. However, the
|
||||
DrScheme versions are syntactic forms, instead of procedures, and
|
||||
DrRacket versions are syntactic forms, instead of procedures, and
|
||||
the arguments must be either quoted literal tables or identifiers
|
||||
that are defined (at the top level) to quoted literal tables.}
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
(define fresh-anim
|
||||
(let ([first #t])
|
||||
(opt-lambda ([x 400] [y 400] [title "Animation - DrScheme"])
|
||||
(opt-lambda ([x 400] [y 400] [title "Animation - DrRacket"])
|
||||
(if first
|
||||
(set! first #f)
|
||||
(begin
|
||||
|
@ -43,7 +43,7 @@
|
|||
(set! right-clicks ((viewport-mouse-events window) . =#> . (lambda (ev) (send ev button-down? 'right)))))))))
|
||||
|
||||
(define window
|
||||
(open-viewport "Animation - DrScheme" 400 400))
|
||||
(open-viewport "Animation - DrRacket" 400 400))
|
||||
|
||||
(define pixmap
|
||||
(open-pixmap "" 400 400))
|
||||
|
|
|
@ -596,7 +596,7 @@ display the current image in the viewport. (Subsequent drawing to the
|
|||
viewport does not affect the snip's image.)
|
||||
|
||||
When snips are the results of computations in the interactions window,
|
||||
DrScheme shows the snip in the interactions window.}
|
||||
DrRacket shows the snip in the interactions window.}
|
||||
|
||||
@defproc[(viewport-dc [viewport viewport?]) (is-a?/c dc<%>)]{
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
CHANGES TO MAKE-----------------------------------------------------------------------------
|
||||
Ability to add named anchors into code using Special menu in DRS -- use those anchors as tracepoints.
|
||||
|
||||
Demo monitoring DrScheme for Robby?
|
||||
Demo monitoring DrRacket for Robby?
|
||||
|
||||
Bind Stop button to kill-all.
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
_GUI builder_
|
||||
|
||||
To run the GUI builder, use DrScheme and select "Insert GUI"
|
||||
To run the GUI builder, use DrRacket and select "Insert GUI"
|
||||
from the "Special" menu.
|
||||
|
||||
Though less recommended, you can also run
|
||||
|
|
|
@ -488,7 +488,7 @@
|
|||
(format "The ~a tool has been uninstalled. ~a~a"
|
||||
handin-name
|
||||
"The Handin button and associated menu items will"
|
||||
" not appear after you restart DrScheme.")
|
||||
" not appear after you restart DrRacket.")
|
||||
this)
|
||||
(send this show #f)))]))
|
||||
(send uninstall-button enable (not uninstalled?))
|
||||
|
|
|
@ -177,7 +177,7 @@
|
|||
markup-prefix bad-re)
|
||||
(define magic #rx#"^(?:#reader[(]lib\"read.ss\"\"wxme\"[)])?WXME")
|
||||
(unless (regexp-match? magic submission)
|
||||
(error* "bad submission format, expecting a single DrScheme submission"))
|
||||
(error* "bad submission format, expecting a single DrRacket submission"))
|
||||
(let-values ([(defs inters) (unpack-submission submission)])
|
||||
(parameterize ([current-input-port
|
||||
(if textualize?
|
||||
|
|
|
@ -104,7 +104,7 @@ Keywords for configuring @scheme[check:]:
|
|||
run student code.}
|
||||
@item{@scheme[:create-text?] is off --- allowing submissions that
|
||||
contain non-textual objects, but no text file is created so
|
||||
grading and testing must be done using DrScheme (because the saved
|
||||
grading and testing must be done using DrRacket (because the saved
|
||||
submission is always in binary format).}
|
||||
@item{Both flags are on --- allowing submission with non-textual
|
||||
objects and generating text files, but these files will not be
|
||||
|
@ -114,7 +114,7 @@ Keywords for configuring @scheme[check:]:
|
|||
@item{@indexed-scheme[:untabify?]---if true, then tabs are converted
|
||||
to spaces, assuming a standard tab width of 8 places. This is
|
||||
needed for a correct computation of line lengths, but note that
|
||||
DrScheme does not insert tabs in Scheme mode. Defaults to
|
||||
DrRacket does not insert tabs in Scheme mode. Defaults to
|
||||
@scheme[#t]. @textoption}
|
||||
|
||||
@item{@indexed-scheme[:maxwidth]---a number that specifies maximum
|
||||
|
@ -130,7 +130,7 @@ Keywords for configuring @scheme[check:]:
|
|||
file is always stored in GRacket's binary format.}
|
||||
|
||||
@item{@indexed-scheme[:multi-file]---by default, this is set to
|
||||
@scheme[#f], which means that only DrScheme is used to send
|
||||
@scheme[#f], which means that only DrRacket is used to send
|
||||
submissions as usual. See @secref{multi-file} for setting up
|
||||
multi-file submissions.}
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ uniquely. For example, @filepath{uu-cpsc2010} is a good name for CPSC
|
|||
renamed client collection:
|
||||
@itemize[
|
||||
@item{For @scheme[name], choose a name for the handin tool as it
|
||||
will appear in DrScheme's interface (e.g., the @onscreen{XXX} for
|
||||
will appear in DrRacket's interface (e.g., the @onscreen{XXX} for
|
||||
the @onscreen{Manage XXX Handin Account...} menu item). Again,
|
||||
make the name specific to the course, in case a student installs
|
||||
multiple handin tools. Do not use @onscreen{Handin} as the last
|
||||
|
@ -33,7 +33,7 @@ uniquely. For example, @filepath{uu-cpsc2010} is a good name for CPSC
|
|||
the @onscreen{Help} menu that opens a (course-specific) web page.}
|
||||
|
||||
@item{Replace @filepath{icon.png} in your renamed directory with a new
|
||||
32x32 icon. This icon is displayed on startup with DrScheme's
|
||||
32x32 icon. This icon is displayed on startup with DrRacket's
|
||||
splash screen, and it is included at half size on the
|
||||
@onscreen{Handin} button. A school logo is typically useful, as it
|
||||
provides a recognizably local visual cue. If students might use
|
||||
|
@ -69,8 +69,8 @@ uniquely. For example, @filepath{uu-cpsc2010} is a good name for CPSC
|
|||
existing files instead of throwing an error.}
|
||||
|
||||
@item{Distribute @filepath{<name>.plt} to students for installation
|
||||
into their copies of DrScheme. The students need not have access to
|
||||
the DrScheme installation directory; the tool will be installed on
|
||||
into their copies of DrRacket. The students need not have access to
|
||||
the DrRacket installation directory; the tool will be installed on
|
||||
the filesystem in the student's personal space. If you want to
|
||||
install it once on a shared installation, use setup-plt with the
|
||||
@DFlag{all-users} flag.}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
@title[#:tag "multi-file"]{Multiple-File Submissions}
|
||||
|
||||
By default, the system is set up for submissions of single a single
|
||||
file, straight fom DrScheme using the handin-client. There is some
|
||||
file, straight fom DrRacket using the handin-client. There is some
|
||||
limited support for multi-file submissions in
|
||||
@schememodname[handin-server/checker] and in the handin-client. It is
|
||||
possible to submit multiple files, and have the system generate a
|
||||
|
@ -53,10 +53,10 @@ to submit multiple files. In this dialog, students choose their
|
|||
working directory, and the @scheme[selection-default] entry from the
|
||||
@filepath{handin-client/info.ss} file specifies a few patterns that
|
||||
can be used to automatically select files. The dialog provides all
|
||||
handin-related functionality that is available in DrScheme. For
|
||||
handin-related functionality that is available in DrRacket. For
|
||||
further convenience, it can be used as a standalone application: in
|
||||
the account management dialog, the @onscreen{Un/Install} tab has a
|
||||
button that will ask for a directory where it will create an
|
||||
executable for the multi-file submission utility---the resulting
|
||||
executable can be used outside of DrScheme (but PLT Scheme is still
|
||||
executable can be used outside of DrRacket (but Racket is still
|
||||
required, so it cannot be uninstalled).
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
NOTE: The command line arguments are optional, it restricts the
|
||||
setup work to the specified collection.}
|
||||
|
||||
@item{Start DrScheme, click @onscreen{Handin} to run the client,
|
||||
@item{Start DrRacket, click @onscreen{Handin} to run the client,
|
||||
submit with username ``@tt{tester}'' and password ``@tt{pw}''.
|
||||
|
||||
The submitted file will be @filepath{.../test/tester/handin.scm}.}
|
||||
|
|
|
@ -19,7 +19,7 @@ certificates. A student can install any number of clients at once
|
|||
below).
|
||||
|
||||
The result, on the student's side, is a @onscreen{Handin} button in
|
||||
DrScheme's toolbar. Clicking the @onscreen{Handin} button allows the
|
||||
DrRacket's toolbar. Clicking the @onscreen{Handin} button allows the
|
||||
student to type a password and upload the current content of the
|
||||
definitions and interactions window to the course instructor's server.
|
||||
The @onscreen{File} menu is also extended with a @onscreen{Manage...}
|
||||
|
|
|
@ -324,10 +324,10 @@ This directory contains the following files and sub-directories:
|
|||
@filepath{ATTEMPT} directory (to be copied by the cleanup process);
|
||||
see below for more details on @schememodname[handin-server/checker].
|
||||
|
||||
For submissions from a normal DrScheme frame, a submission file
|
||||
For submissions from a normal DrRacket frame, a submission file
|
||||
contains a copy of the student's definitions and interactions
|
||||
windows. The file is in a binary format (to support non-text code),
|
||||
and opening the file directly in DrScheme shows the definitions
|
||||
and opening the file directly in DrRacket shows the definitions
|
||||
part. To get both the definitions and interactions parts, the file
|
||||
can be parsed with @scheme[unpack-submission] from
|
||||
@schememodname[handin-server/utils].
|
||||
|
|
|
@ -20,7 +20,7 @@ include in your client collection a @filepath{version} file that
|
|||
contains a single number that is its version. Use a big integer that
|
||||
holds the time of this collection in a @tt{YYYYMMDDHHMM} format.
|
||||
|
||||
When students install the client, every time DrScheme starts, it will
|
||||
When students install the client, every time DrRacket starts, it will
|
||||
automatically check the version from the web page (as specified by the
|
||||
@scheme[web-address] and @scheme[version-filename] keys), and if that
|
||||
contains a bigger number, it will offer the students to download and
|
||||
|
|
|
@ -175,7 +175,7 @@ Every exception or result mismatch during the call to
|
|||
Controls how values are printed. The @scheme[proc] must be a
|
||||
procedure that expects a Scheme value and returns a string
|
||||
representation for it. The default value printer uses
|
||||
@scheme[pretty-print], with DrScheme-like settings.}
|
||||
@scheme[pretty-print], with DrRacket-like settings.}
|
||||
|
||||
@defproc[(reraise-exn-as-submission-problem [thunk (-> any)]) any]{
|
||||
|
||||
|
|
|
@ -596,7 +596,7 @@ Matthew
|
|||
(define/augment (on-close)
|
||||
(callback-stop!)
|
||||
(custodian-shutdown-all the-play-back-custodian)))
|
||||
(label "DrScheme")
|
||||
(label "DrRacket")
|
||||
(stretchable-width #f)
|
||||
(stretchable-height #f)
|
||||
(style '(no-resize-border metal))))
|
||||
|
|
|
@ -15,7 +15,7 @@ languages for other modules (i.e., as the initial import):
|
|||
|
||||
* _plt-pretty-big.ss_ - provides plt-pretty-big-text.ss
|
||||
plus the GRacket classes. This corresponds to the
|
||||
_Pretty Big Scheme_ language in DrScheme.
|
||||
_Pretty Big Scheme_ language in DrRacket.
|
||||
|
||||
* _htdp-beginner.ss_ - provides Beginning Student
|
||||
|
||||
|
|
|
@ -604,7 +604,7 @@
|
|||
(define/override (get-reader-module) reader-module)
|
||||
(define/override (get-metadata modname settings)
|
||||
(string-append
|
||||
";; The first three lines of this file were inserted by DrScheme. They record metadata\n"
|
||||
";; The first three lines of this file were inserted by DrRacket. They record metadata\n"
|
||||
";; about the language level of this file in a form that our tools can easily process.\n"
|
||||
(format "#reader~s~s\n"
|
||||
reader-module
|
||||
|
|
|
@ -115,7 +115,7 @@
|
|||
(begin
|
||||
(emit 'top-non-begin)
|
||||
(let ([e (expand-syntax e1)])
|
||||
;; Must set to void to avoid catching DrScheme's annotations...
|
||||
;; Must set to void to avoid catching DrRacket's annotations...
|
||||
(parameterize ((current-expand-observe void))
|
||||
(eval-compile-time-part e))
|
||||
e))]))
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
@defmodule[mrlib/cache-image-snip]{
|
||||
|
||||
The @schememodname[mrlib/cache-image-snip] library provides the core
|
||||
data structure for DrScheme's @filepath{image.ss} teachpack. Images in
|
||||
data structure for DrRacket's @filepath{image.ss} teachpack. Images in
|
||||
the @filepath{image.ss} teachpack are instances of the
|
||||
@scheme[cache-image-snip%] class.}
|
||||
|
||||
|
|
|
@ -120,7 +120,7 @@ and height. The @scheme[dc] argument is used for sizing.}
|
|||
void?]{
|
||||
|
||||
Draws a button label like the one for the @onscreen{(define ...)} and
|
||||
filename buttons in the top-left corner of the DrScheme frame. Use
|
||||
filename buttons in the top-left corner of the DrRacket frame. Use
|
||||
this function to draw similar buttons.
|
||||
|
||||
The basic idea is to create a canvas object whose on-paint method is
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
1)))))]{
|
||||
|
||||
This is an assocation list mapping the shortcut strings that
|
||||
DrScheme uses with its @tt{control-\} (or @tt{command-\}) strings to
|
||||
DrRacket uses with its @tt{control-\} (or @tt{command-\}) strings to
|
||||
their corresponding unicode characters. For example, it contains
|
||||
this mapping:
|
||||
@schemeblock[
|
||||
|
|
|
@ -276,7 +276,7 @@ error.}
|
|||
|
||||
A parameter that the lexer uses as the source location if it
|
||||
raises a @scheme[exn:fail:rad] error. Setting this parameter allows
|
||||
DrScheme, for example, to open the file containing the error.}
|
||||
DrRacket, for example, to open the file containing the error.}
|
||||
|
||||
|
||||
@; ----------------------------------------
|
||||
|
|
|
@ -556,7 +556,7 @@ The @WEB-LANG language allows you to write server-side Web applications for the
|
|||
For more information about writing Web applications, see:
|
||||
@other-manual['(lib "web-server/scribblings/web-server.scrbl")].
|
||||
|
||||
When you click on the @onscreen{Run} button in DrScheme, your Web application is launched in the Web server.
|
||||
When you click on the @onscreen{Run} button in DrRacket, your Web application is launched in the Web server.
|
||||
|
||||
The application is available at @italic{http://localhost:8000/servlets/standalone.ss}.
|
||||
|
||||
|
@ -575,4 +575,4 @@ A Web application must define a procedure @scheme[start]:
|
|||
|
||||
The initial request to a Web application is serviced by this procedure.
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ This module contains code that implements the `planet' command-line tool.
|
|||
|
||||
PLANNED FEATURES:
|
||||
* Disable a package without removing it (disabling meaning
|
||||
that if it's a tool it won't start w/ DrScheme, etc)
|
||||
that if it's a tool it won't start w/ DrRacket, etc)
|
||||
|#
|
||||
(require mzlib/string
|
||||
mzlib/file
|
||||
|
|
|
@ -22,7 +22,7 @@ differences from v3:
|
|||
;; ======================================================================
|
||||
;; The alternate implementation disables contracts. Its useful mainly to
|
||||
;; measure the cost of contracts. It's not necessarily complete, but it
|
||||
;; works well enough for starting DrScheme.
|
||||
;; works well enough for starting DrRacket.
|
||||
;; (last used pre v4)
|
||||
|
||||
#;
|
||||
|
|
|
@ -116,7 +116,7 @@
|
|||
[read-accept-quasiquote #t]
|
||||
[read-accept-reader #f]
|
||||
[print-struct #f]
|
||||
[print-graph #f] ; <--- FIXME: temporary solution to DrScheme-pref problem
|
||||
[print-graph #f] ; <--- FIXME: temporary solution to DrRacket-pref problem
|
||||
[print-box #t]
|
||||
[print-vector-length #t]
|
||||
[current-readtable #f])
|
||||
|
|
|
@ -982,14 +982,14 @@ Each grammar, reduction relation, and metafunction can be
|
|||
saved in a .ps file (as encapsulated postscript), or can be
|
||||
turned into a pict.
|
||||
|
||||
Picts are more useful for debugging since DrScheme REPL will
|
||||
Picts are more useful for debugging since DrRacket REPL will
|
||||
show you the pict directly (albeit with slightly different
|
||||
fonts than you'd see in the .ps file). You can also use the
|
||||
picts with Slideshow's pict library to build more complex
|
||||
arrangements of the figures and add other picts. See
|
||||
Slideshow for details.
|
||||
|
||||
If you are only using the picts to experiment in DrScheme's
|
||||
If you are only using the picts to experiment in DrRacket's
|
||||
REPL, be sure your program is in the GUI library, and
|
||||
contains this header:
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#|
|
||||
|
||||
This is the semantics of Beginner Scheme, one of the
|
||||
languages in DrScheme.
|
||||
languages in DrRacket.
|
||||
|
||||
The first test case fails because the beginner spec
|
||||
is broken for that program (ie, the model faithfully
|
||||
|
|
|
@ -17,7 +17,7 @@ semantics.
|
|||
|
||||
== show-examples.ss: use this file to explore particular
|
||||
examples in a GUI. Its content shows how to use it and
|
||||
gives a few examples. Either run it in DrScheme's module
|
||||
gives a few examples. Either run it in DrRacket's module
|
||||
language, or like this from the commandline:
|
||||
|
||||
mred show-examples.ss
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
This collection is used only for the repository. It is not included
|
||||
in normal releases. (It's existence indicates a checked out tree.)
|
||||
|
||||
The stamp.ss module provides one definition: `stamp' that is bound to
|
||||
a string representing the current day. The time-stamp.ss file is a
|
||||
tool, used by DrScheme to set the version based on the time stamp.
|
||||
The "stamp.rkt" module provides one definition: `stamp' that is bound to
|
||||
a string representing the current day. The "time-stamp.rkt" file is a
|
||||
tool, used by DrRacket to set the version based on the time stamp.
|
||||
|
|
|
@ -155,7 +155,7 @@ text from the "@;" to the end of the line *and* all following spaces
|
|||
baz@;
|
||||
blah}
|
||||
|
||||
Tip: if you're editing in a Scheme-aware editor (like DrScheme or
|
||||
Tip: if you're editing in a Scheme-aware editor (like DrRacket or
|
||||
Emacs), it is useful to comment out blocks like this:
|
||||
|
||||
@;{
|
||||
|
|
|
@ -17,7 +17,7 @@ new languages can be added through DrRacket plug-ins.
|
|||
@section[#:tag "module"]{Language Declared in Source}
|
||||
|
||||
The @as-index{@drlang{Use the language declared in the source} mode}
|
||||
in DrScheme is a kind of meta-language, where the program itself
|
||||
in DrRacket is a kind of meta-language, where the program itself
|
||||
specifies its language, usually through a @hash-lang[] line.
|
||||
|
||||
More generally, when using the declared-in-source mode, the
|
||||
|
|
|
@ -4,11 +4,11 @@
|
|||
|
||||
@title{@italic{How to Design Programs} Languages}
|
||||
|
||||
The languages documented in this manual are provided by DrScheme to be
|
||||
The languages documented in this manual are provided by DrRacket to be
|
||||
used with the @italic{@link["http://www.htdp.org/"]{How to Design
|
||||
Programs}} book.
|
||||
|
||||
When programs in these languages are run in DrScheme, any part of the
|
||||
When programs in these languages are run in DrRacket, any part of the
|
||||
program that was not run is highlighted in orange and black. These
|
||||
colors are intended to give the programmer feedback about the parts of
|
||||
the program that have not been tested. To avoid seeing these colors,
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
;; This is a port of the infamous "gears" demo to straight GLX (i.e. no
|
||||
;; GLUT). Port by Brian Paul 23 March 2001.
|
||||
;;
|
||||
;; To run, evaluate this file in DrScheme in the "module" language level,
|
||||
;; To run, evaluate this file in DrRacket in the "module" language level,
|
||||
;; or execute "mred -qu gears.ss" from your OS shell.
|
||||
;;
|
||||
;; Scheme port by Neil W. Van Dyke <neil@neilvandyke.org>, 23 November 2002.
|
||||
|
|
|
@ -9,23 +9,23 @@ Stand-alone:
|
|||
|
||||
2. Click the "Tutorial" button.
|
||||
|
||||
On in DrScheme:
|
||||
In DrRacket:
|
||||
|
||||
1. Open "tutorial-show.rkt", which is in the "slideshow" collection.
|
||||
|
||||
1. Open "tutorial-show.ss", which is in the "slideshow" collection.
|
||||
|
||||
The path depends on your PLT install directory:
|
||||
<plt install dir>/collects/slideshow/tutorial-show.ss
|
||||
<plt install dir>/collects/slideshow/tutorial-show.rkt
|
||||
|
||||
2. Set DrRacket's language to "(module ...)".
|
||||
|
||||
2. Set DrScheme's language to "(module ...)".
|
||||
|
||||
Use the "Choose Language" menu item in the "Language" menu.
|
||||
|
||||
3. Click DrScheme's "Execute" button.
|
||||
3. Click DrRacket's "Execute" button.
|
||||
|
||||
|
||||
---------- !! IMPORTANT SECURITY INFORMATION !! ----------
|
||||
|
||||
Do not run any Slideshow program in DrScheme unless you know the
|
||||
Do not run any Slideshow program in DrRacket unless you know the
|
||||
creator of the slide program and/or trust the slide
|
||||
program. Instead, run untrusted programs with the "Slideshow"
|
||||
executable or "slideshow" command-line program.
|
||||
|
@ -58,7 +58,7 @@ collection's utilities for constructing images. More specifically,
|
|||
all of the functions provided by `texpict/mrpict'
|
||||
are available for creating images.
|
||||
|
||||
In addition to the "mrpict.ss" functions, Slideshow provides functions
|
||||
In addition to the "mrpict.rkt" functions, Slideshow provides functions
|
||||
for constructing paragraphs and bulleted lists, staging parts of a
|
||||
slide, managing fonts, viewing the slides, and scaling slides for a
|
||||
particular display.
|
||||
|
@ -71,27 +71,27 @@ functions in "texpict".
|
|||
Slideshow Modules
|
||||
=================
|
||||
|
||||
The _slideshow.ss_ module acts as a language that includes:
|
||||
The _slideshow.rkt_ module acts as a language that includes:
|
||||
|
||||
- the Slideshow function for creating slides (defined here)
|
||||
- all of Racket
|
||||
- texpict/mrpict
|
||||
- texpict/utils
|
||||
|
||||
The _slide.ss_ module is like "slideshow.ss", but it does not
|
||||
re-provide Racket. Thus, "slide.ss" is a non-language version of
|
||||
"slideshow.ss", and it can be imported with `require' into a module in
|
||||
The _slide.rkt_ module is like "slideshow.rkt", but it does not
|
||||
re-provide Racket. Thus, "slide.rkt" is a non-language version of
|
||||
"slideshow.rkt", and it can be imported with `require' into a module in
|
||||
any language.
|
||||
|
||||
The _run.ss_ module is the same as "slideshow.ss" for backward
|
||||
The _run.rkt_ module is the same as "slideshow.rkt" for backward
|
||||
compatibility.
|
||||
|
||||
[The "slideshow.ss" and "slide.ss" modules also check the Racket
|
||||
[The "slideshow.rkt" and "slide.rkt" modules also check the Racket
|
||||
parameter `current-command-line-arguments' to configure the slide
|
||||
mode.]
|
||||
|
||||
The rest of this section repeats much of the information that is in
|
||||
"tutorial-show.ss" (see "Quick Start" at the top of this
|
||||
"tutorial-show.rkt" (see "Quick Start" at the top of this
|
||||
documentation).
|
||||
|
||||
The main Slideshow function is `slide/title', which adds a slide to
|
||||
|
@ -271,14 +271,14 @@ or moving backward through the slide set.
|
|||
Command-line Options
|
||||
====================
|
||||
|
||||
The _start.ss_ module can be invoked directly, in which case a module
|
||||
The _start.rkt_ module can be invoked directly, in which case a module
|
||||
file name should be provided on the command line to provide the slide
|
||||
content. Setup PLT creates a "Slideshow" executable that runs
|
||||
"start.ss".
|
||||
"start.rkt".
|
||||
|
||||
Thus, if the above example is in multi-step.ss, then
|
||||
Thus, if the above example is in multi-step.rkt, then
|
||||
|
||||
slideshow multi-step.ss
|
||||
slideshow multi-step.rkt
|
||||
|
||||
runs the slides.
|
||||
|
||||
|
@ -566,27 +566,27 @@ Procedure Reference
|
|||
as a result of a mouse click.
|
||||
|
||||
------------------------------------------------------------
|
||||
_code.ss_
|
||||
_code.rkt_
|
||||
------------------------------------------------------------
|
||||
|
||||
The "code.ss" module provides functions and syntax for typesetting
|
||||
Scheme code a la SlaTeX. It instantiates `code@' from `(lib "code.ss"
|
||||
The "code.rkt" module provides functions and syntax for typesetting
|
||||
Scheme code a la SlaTeX. It instantiates `code@' from `(lib "code.rkt"
|
||||
"typeset")', providing Slideshow's `current-font-size' and `line-sep'
|
||||
to the unit, and re-exporting the unit's exports from the module.
|
||||
|
||||
The "code.ss" module also exports a `code' macro generated by
|
||||
`define-code' from `(lib "code.ss" "typeset")':
|
||||
The "code.rkt" module also exports a `code' macro generated by
|
||||
`define-code' from `(lib "code.rkt" "typeset")':
|
||||
|
||||
> (code datum ...) - typesets the `datum' sequence to produce a pict;
|
||||
see `define-code' from "code.s"" in the "texpict"
|
||||
collection for more information; `unsyntax' is
|
||||
the escape identifier.
|
||||
|
||||
See documentation for "code.ss" in the "texpict" collection for more
|
||||
See documentation for "code.rkt" in the "texpict" collection for more
|
||||
information.
|
||||
|
||||
|
||||
Finally, "code.ss" exports a `define-code/string/scale' macro:
|
||||
Finally, "code.rkt" exports a `define-code/string/scale' macro:
|
||||
|
||||
> (define-exec-code (pict-id runnable-id string-id)
|
||||
datum ...)
|
||||
|
@ -616,16 +616,16 @@ pict.
|
|||
|
||||
|
||||
------------------------------------------------------------
|
||||
_step.ss_
|
||||
_step.rkt_
|
||||
------------------------------------------------------------
|
||||
|
||||
The "step.ss" module provides syntax for breaking a complex slide into
|
||||
The "step.rkt" module provides syntax for breaking a complex slide into
|
||||
steps (that are more complex than can be handled with 'next and 'alts
|
||||
in a `slide' sequence).
|
||||
|
||||
> (with-steps (id ...) expr) - evaluates `expr' once for each `id',
|
||||
skipping an `id' if it ends with "~" and `condense?' from
|
||||
"slideshow.ss" is true
|
||||
"slideshow.rkt" is true
|
||||
|
||||
Within `expr', several keywords are bound:
|
||||
|
||||
|
@ -667,12 +667,12 @@ in a `slide' sequence).
|
|||
`then-expr' after step `a-id' and before step `b-id', ...
|
||||
|
||||
> (with-steps~ (id ...) expr) - like `with-steps', but when
|
||||
`condense?' from "slideshow.ss" is true, then `expr' is evaluated
|
||||
`condense?' from "slideshow.rkt" is true, then `expr' is evaluated
|
||||
only for the last `id' (independent of whether its name ends in "~")
|
||||
|
||||
|
||||
------------------------------------------------------------
|
||||
_slides-to-picts.ss_
|
||||
_slides-to-picts.rkt_
|
||||
------------------------------------------------------------
|
||||
|
||||
> (get-slides-as-picts path width height condense?) - executes the
|
||||
|
|
|
@ -73,9 +73,9 @@
|
|||
(comment "This window shows comments for each slide. "
|
||||
"The comments are typically fill in the details of what "
|
||||
"the slide presenter says when giving the talk."))
|
||||
|
||||
|
||||
(define mytalk.scm (tt "mytalk.ss"))
|
||||
|
||||
(define mytalk.rkt (tt "mytalk.rkt"))
|
||||
|
||||
|
||||
(slide
|
||||
|
@ -91,33 +91,33 @@
|
|||
(item "Double-click the" (bt "Slideshow") "executable or run"
|
||||
(tt "slideshow") "on the command line")
|
||||
(item "Click the" (bt "Open File...") "link and select the"
|
||||
"Slideshow program file, such as" mytalk.scm))
|
||||
(list (para "Alternately, run a Slideshow program in DrScheme:")
|
||||
(item "Open" mytalk.scm "in DrScheme")
|
||||
"Slideshow program file, such as" mytalk.rkt))
|
||||
(list (para "Alternately, run a Slideshow program in DrRacket:")
|
||||
(item "Open" mytalk.rkt "in DrRacket")
|
||||
(item #:bullet (blank (+ (pict-width bullet) gap-size) 0)
|
||||
"DrScheme's language should change automatically to"
|
||||
"DrRacket's language should change automatically to"
|
||||
(bt "Module"))
|
||||
(item "Click" (bt "Run") "in DrScheme")
|
||||
(colorize (bt "Use DrScheme only if you trust the program") "red"))
|
||||
(item "Click" (bt "Run") "in DrRacket")
|
||||
(colorize (bt "Use DrRacket only if you trust the program") "red"))
|
||||
(parameterize ([current-para-width client-w])
|
||||
(list (para (colorize (bt "Important security information:") "red"))
|
||||
(para "A slideshow program has access to the"
|
||||
(it "full") (it "Scheme") (it "language"))
|
||||
(it "full") (it "Racket") (it "language"))
|
||||
(para "If you don't know the creator of a slide program"
|
||||
"(or if you don't trust them), run the slides through the"
|
||||
(bt "Slideshow") "executable or"
|
||||
(tt "slideshow") "command line")
|
||||
(colorize
|
||||
(para
|
||||
"When run in" (bt "Slideshow") "instead of DrScheme,"
|
||||
"When run in" (bt "Slideshow") "instead of DrRacket,"
|
||||
"a slide program cannot write files"
|
||||
"or make network connections")
|
||||
"blue")))
|
||||
(list (para "When using a command line, you can specify the program directly:")
|
||||
(hbl-append (tt "slideshow ") mytalk.scm)
|
||||
(hbl-append (tt "slideshow ") mytalk.rkt)
|
||||
(blank)
|
||||
(para "To print the talk:")
|
||||
(hbl-append (tt "slideshow --print ") mytalk.scm)
|
||||
(hbl-append (tt "slideshow --print ") mytalk.rkt)
|
||||
(blank)
|
||||
(colorize
|
||||
(para #:align 'right (it "Run") (tt "slideshow --help") (it "for more options"))
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
What is the _Stepper_?
|
||||
|
||||
DrScheme includes an "algebraic stepper," a tool which proceeds
|
||||
DrRacket includes an "algebraic stepper," a tool which proceeds
|
||||
through the evaluation of a set of definitions and expressions,
|
||||
one step at a time. This evaluation shows the user how DrScheme
|
||||
one step at a time. This evaluation shows the user how DrRacket
|
||||
evaluates expressions and definitions, and can help in debugging
|
||||
programs. Currently, the Stepper is available in the "Beginning
|
||||
Student" and "Intermediate Student" language levels.
|
||||
|
||||
How do I use the Stepper?
|
||||
|
||||
The Stepper operates on the contents of the frontmost DrScheme
|
||||
The Stepper operates on the contents of the frontmost DrRacket
|
||||
window. A click on the "Step" button brings up the stepper
|
||||
window. The stepper window has four panes, arranged as follows:
|
||||
|
||||
|
@ -48,7 +48,7 @@ is, no expressions have yet been evaluated. The "Previous"
|
|||
button returns to the prior step of the evaluation. The "Next"
|
||||
step shows the next step in the evaluation.
|
||||
|
||||
For more information on how DrScheme selects a "redex" and how
|
||||
For more information on how DrRacket selects a "redex" and how
|
||||
the expressions are reduced, please see <A>The Beginner Language
|
||||
Semantics</A> which formally specify the set of rules governing
|
||||
the language's evaluation.
|
||||
|
@ -58,5 +58,3 @@ in the definitions window, and does not allow the user to enter
|
|||
additional expressions. So, for instance, a definitions buffer
|
||||
which contains only procedure definitions will not result in
|
||||
any reductions.
|
||||
|
||||
|
||||
|
|
|
@ -118,7 +118,7 @@
|
|||
(send (get-the-snip-class-list) add xml-snipclass)
|
||||
|
||||
;; this snipclass overrides the actual one in xml/xml-snipclass
|
||||
;; as a full-fledged snipclass, for use in DrScheme.
|
||||
;; as a full-fledged snipclass, for use in DrRacket.
|
||||
|
||||
(define lib-xml-snipclass%
|
||||
(class snip-class%
|
||||
|
@ -228,7 +228,7 @@
|
|||
(send (get-the-snip-class-list) add scheme-snipclass)
|
||||
|
||||
;; this snipclass overrides the one in xml/scheme-snipclass
|
||||
;; as a full-fledged snipclass, for use in DrScheme.
|
||||
;; as a full-fledged snipclass, for use in DrRacket.
|
||||
(define lib-scheme-snipclass (make-object scheme-snipclass%))
|
||||
(send lib-scheme-snipclass set-version 1)
|
||||
(send lib-scheme-snipclass set-classname (format "~s" '(lib "scheme-snipclass.ss" "xml")))
|
||||
|
|
|
@ -67,7 +67,7 @@ only a subset of the system is needed.
|
|||
* A language that can easily create HTML, where the result is
|
||||
human-editable. ("html.ss")
|
||||
|
||||
* Customizable syntax: easy to add customized languages to DrScheme.
|
||||
* Customizable syntax: easy to add customized languages to DrRacket.
|
||||
("custom.ss")
|
||||
|
||||
|
||||
|
@ -113,8 +113,8 @@ Swindle environment.
|
|||
Compilation definitions.
|
||||
|
||||
* tool.ss (module)
|
||||
Setup for Swindle in DrScheme -- makes some languages available in
|
||||
DrScheme, including custom Swindle-based languages.
|
||||
Setup for Swindle in DrRacket -- makes some languages available in
|
||||
DrRacket, including custom Swindle-based languages.
|
||||
|
||||
* custom.ss (module)
|
||||
A sample file that demonstrates how to create a Swindle-based
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;; Written by Eli Barzilay: Maze is Life! (eli@barzilay.org)
|
||||
|
||||
;; Add the Swindle languages to DrScheme
|
||||
;; Add the Swindle languages to DrRacket
|
||||
#lang mzscheme
|
||||
|
||||
(require mzlib/unit
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
The image teachpack provides a number of basic image construction functions, along with
|
||||
combinators for building more complex images out of existing images. Basic images include
|
||||
various polygons, ellipses and circles, and text, as well as bitmaps (typically bitmaps
|
||||
come about via the @onscreen{Insert Image...} menu item in DrScheme).
|
||||
come about via the @onscreen{Insert Image...} menu item in DrRacket).
|
||||
Existing images can be rotated, scaled, and overlaid on top of each other.
|
||||
|
||||
@section{Basic Images}
|
||||
|
@ -886,7 +886,7 @@ This section lists predicates for the basic structures provided by the image lib
|
|||
like @scheme[ellipse] and @scheme[rectangle] and
|
||||
accepted by functions like @scheme[overlay] and @scheme[beside].
|
||||
|
||||
Additionally, images inserted into a DrScheme window are treated as
|
||||
Additionally, images inserted into a DrRacket window are treated as
|
||||
bitmap images, as are instances of @scheme[image-snip%] and @scheme[bitmap%].
|
||||
}
|
||||
|
||||
|
|
|
@ -78,10 +78,10 @@ The simplest kind of animated @tech{world} program is a time-based
|
|||
true]{
|
||||
|
||||
opens a canvas and starts a clock that tick 28 times per second. Every
|
||||
time the clock ticks, DrScheme applies @scheme[create-image] to the
|
||||
time the clock ticks, DrRacket applies @scheme[create-image] to the
|
||||
number of ticks passed since this function call. The results of these
|
||||
function calls are displayed in the canvas. The simulation runs until you
|
||||
click the @tt{Stop} button in DrScheme or close the window. At that
|
||||
click the @tt{Stop} button in DrRacket or close the window. At that
|
||||
point, @scheme[animate] returns the number of ticks that have
|
||||
passed.
|
||||
}
|
||||
|
@ -196,7 +196,7 @@ The design of a world program demands that you come up with a data
|
|||
#:contracts
|
||||
([tick-expr (-> (unsyntax @tech{WorldState}) (unsyntax @tech{WorldState}))])]{
|
||||
|
||||
tell DrScheme to call the @scheme[tick-expr] function on the current
|
||||
tell DrRacket to call the @scheme[tick-expr] function on the current
|
||||
world every time the clock ticks. The result of the call becomes the
|
||||
current world. The clock ticks at the rate of 28 times per second.}}
|
||||
|
||||
|
@ -206,7 +206,7 @@ current world. The clock ticks at the rate of 28 times per second.}}
|
|||
#:contracts
|
||||
([tick-expr (-> (unsyntax @tech{WorldState}) (unsyntax @tech{WorldState}))]
|
||||
[rate-expr (and/c real? positive?)])]{
|
||||
tell DrScheme to call the @scheme[tick-expr] function on the current
|
||||
tell DrRacket to call the @scheme[tick-expr] function on the current
|
||||
world every time the clock ticks. The result of the call becomes the
|
||||
current world. The clock ticks at the rate of @scheme[rate-expr].}}
|
||||
|
||||
|
@ -313,7 +313,7 @@ Second, some keys have multiple-character string representations. Strings
|
|||
@defform[(on-key key-expr)
|
||||
#:contracts
|
||||
([key-expr (-> (unsyntax @tech{WorldState}) key-event? (unsyntax @tech{WorldState}))])]{
|
||||
tell DrScheme to call the @scheme[key-expr] function on the current world and a
|
||||
tell DrRacket to call the @scheme[key-expr] function on the current world and a
|
||||
@tech{KeyEvent} for every keystroke the user of the computer makes. The result
|
||||
of the call becomes the current world.
|
||||
|
||||
|
@ -335,7 +335,7 @@ Second, some keys have multiple-character string representations. Strings
|
|||
@defform[(on-release release-expr)
|
||||
#:contracts
|
||||
([release-expr (-> (unsyntax @tech{WorldState}) key-event? (unsyntax @tech{WorldState}))])]{
|
||||
tell DrScheme to call the @scheme[release-expr] function on the current world and a
|
||||
tell DrRacket to call the @scheme[release-expr] function on the current world and a
|
||||
@tech{KeyEvent} for every release event on the keyboard. A release event
|
||||
occurs when a user presses the key and then releases it. The second argument
|
||||
indicates which key has been released. The result of the function call
|
||||
|
@ -377,7 +377,7 @@ All @tech{MouseEvent}s are represented via strings:
|
|||
(-> (unsyntax @tech{WorldState})
|
||||
natural-number/c natural-number/c (unsyntax @tech{MouseEvent})
|
||||
(unsyntax @tech{WorldState}))])]{
|
||||
tell DrScheme to call @scheme[clack-expr] on the current world, the current
|
||||
tell DrRacket to call @scheme[clack-expr] on the current world, the current
|
||||
@scheme[x] and @scheme[y] coordinates of the mouse, and and a
|
||||
@tech{MouseEvent} for every (noticeable) action of the mouse by the
|
||||
computer user. The result of the call becomes the current world.
|
||||
|
@ -393,8 +393,8 @@ All @tech{MouseEvent}s are represented via strings:
|
|||
#:contracts
|
||||
([render-expr (-> (unsyntax @tech{WorldState}) scene?)])]{
|
||||
|
||||
tell DrScheme to call the function @scheme[render-expr] whenever the
|
||||
canvas must be drawn. The external canvas is usually re-drawn after DrScheme has
|
||||
tell DrRacket to call the function @scheme[render-expr] whenever the
|
||||
canvas must be drawn. The external canvas is usually re-drawn after DrRacket has
|
||||
dealt with an event. Its size is determined by the size of the first
|
||||
generated @tech{scene}.}
|
||||
|
||||
|
@ -405,7 +405,7 @@ All @tech{MouseEvent}s are represented via strings:
|
|||
[width-expr natural-number/c]
|
||||
[height-expr natural-number/c])]{
|
||||
|
||||
tell DrScheme to use a @scheme[width-expr] by @scheme[height-expr]
|
||||
tell DrRacket to use a @scheme[width-expr] by @scheme[height-expr]
|
||||
canvas instead of one determine by the first generated @tech{scene}.
|
||||
}
|
||||
|
||||
|
@ -419,7 +419,7 @@ now.
|
|||
@defform[(stop-when last-world?)
|
||||
#:contracts
|
||||
([last-world? (-> (unsyntax @tech{WorldState}) boolean?)])]{
|
||||
tell DrScheme to call the @scheme[last-world?] function whenever the canvas is
|
||||
tell DrRacket to call the @scheme[last-world?] function whenever the canvas is
|
||||
drawn. If this call produces @scheme[true], the world program is shut
|
||||
down. Specifically, the clock is stopped; no more
|
||||
tick events, @tech{KeyEvent}s, or @tech{MouseEvent}s are forwarded to
|
||||
|
@ -432,7 +432,7 @@ now.
|
|||
#:contracts
|
||||
([last-world? (-> (unsyntax @tech{WorldState}) boolean?)]
|
||||
[last-picture (-> (unsyntax @tech{WorldState}) scene?)])]{
|
||||
tell DrScheme to call the @scheme[last-world?] function whenever the canvas is
|
||||
tell DrRacket to call the @scheme[last-world?] function whenever the canvas is
|
||||
drawn. If this call produces @scheme[true], the world program is shut
|
||||
down after displaying the world one last time, this time using the scene
|
||||
rendered with @scheme[last-picture]. Specifically, the clock is stopped; no more
|
||||
|
@ -445,7 +445,7 @@ now.
|
|||
@item{
|
||||
|
||||
@defstruct[stop-with ([w (unsyntax @tech{WorldState})])]{signals to
|
||||
DrScheme that the world program should shut down. That is, any
|
||||
DrRacket that the world program should shut down. That is, any
|
||||
handler may return @scheme[(stop-with w)] provided @scheme[w] is a
|
||||
@tech{WorldState}. If it does, the state of the world becomes @scheme[w]
|
||||
and @scheme[big-bang] will close down all event handling.}
|
||||
|
@ -457,7 +457,7 @@ and @scheme[big-bang] will close down all event handling.}
|
|||
@defform[(check-with world-expr?)
|
||||
#:contracts
|
||||
([world-expr? (-> Any boolean?)])]{
|
||||
tell DrScheme to call the @scheme[world-expr?] function on the result of
|
||||
tell DrRacket to call the @scheme[world-expr?] function on the result of
|
||||
every world handler call. If this call produces @scheme[true], the result
|
||||
is considered a world; otherwise the world program signals an error.
|
||||
}}
|
||||
|
@ -467,7 +467,7 @@ and @scheme[big-bang] will close down all event handling.}
|
|||
@defform[(record? boolean-expr)
|
||||
#:contracts
|
||||
([boolean-expr boolean?])]{
|
||||
tell DrScheme to record all events and to enable a replay of the entire
|
||||
tell 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.
|
||||
}}
|
||||
|
@ -477,7 +477,7 @@ and @scheme[big-bang] will close down all event handling.}
|
|||
@defform[(state boolean-expr)
|
||||
#:contracts
|
||||
([boolean-expr boolean?])]{
|
||||
tell DrScheme to display a separate window in which the current
|
||||
tell DrRacket to display a separate window in which the current
|
||||
state is rendered each time it is updated. This is useful for beginners
|
||||
who wish to see how their world evolves---without having to design a
|
||||
rendering function---plus for the debugging of world programs.
|
||||
|
@ -757,7 +757,7 @@ stops working, the world program stops working, too.
|
|||
|
||||
Finally, the receipt of a message from the server is an event, just like
|
||||
tick events, keyboard events, and mouse events. Dealing with the receipt of a
|
||||
message works exactly like dealing with any other event. DrScheme
|
||||
message works exactly like dealing with any other event. DrRacket
|
||||
applies the event handler that the world program specifies; if there is no
|
||||
clause, the message is discarded.
|
||||
|
||||
|
@ -767,7 +767,7 @@ The @scheme[on-receive] clause of a @scheme[big-bang] specifies the event handle
|
|||
@defform[(on-receive receive-expr)
|
||||
#:contracts
|
||||
([receive-expr (-> (unsyntax @tech{WorldState}) sexp? (or/c (unsyntax @tech{WorldState}) package?))])]{
|
||||
tell DrScheme to call @scheme[receive-expr] for every message receipt, on the current
|
||||
tell DrRacket to call @scheme[receive-expr] for every message receipt, on the current
|
||||
@tech{WorldState} and the received message. The result of the call becomes the current
|
||||
@tech{WorldState}.
|
||||
|
||||
|
@ -958,7 +958,7 @@ The mandatory clauses of a @scheme[universe] server description are
|
|||
@defform[(on-new new-expr)
|
||||
#:contracts
|
||||
([new-expr (-> (unsyntax @tech{UniverseState}) iworld? bundle?)])]{
|
||||
tell DrScheme to call the function @scheme[new-expr] every time another world joins the
|
||||
tell DrRacket to call the function @scheme[new-expr] every time another world joins the
|
||||
universe. The event handler is called with the current state and the
|
||||
joining iworld, which isn't on the list yet. In particular, the handler may
|
||||
reject a @tech{world} program from participating in a @tech{universe},
|
||||
|
@ -969,7 +969,7 @@ The mandatory clauses of a @scheme[universe] server description are
|
|||
@defform[(on-msg msg-expr)
|
||||
#:contracts
|
||||
([msg-expr (-> (unsyntax @tech{UniverseState}) iworld? sexp? bundle?)])]{
|
||||
tell DrScheme to apply @scheme[msg-expr] to the current state of the
|
||||
tell DrRacket to apply @scheme[msg-expr] to the current state of the
|
||||
universe, the world
|
||||
@scheme[w] that sent the message, and the message itself.
|
||||
}
|
||||
|
@ -998,14 +998,14 @@ optional handlers:
|
|||
(on-tick tick-expr)
|
||||
#:contracts
|
||||
([tick-expr (-> (unsyntax @tech{UniverseState}) bundle?)])]{
|
||||
tell DrScheme to apply @scheme[tick-expr] to the current state of the universe.}
|
||||
tell DrRacket to apply @scheme[tick-expr] to the current state of the universe.}
|
||||
|
||||
@defform/none[#:literals (on-tick)
|
||||
(on-tick tick-expr rate-expr)
|
||||
#:contracts
|
||||
([tick-expr (-> (unsyntax @tech{UniverseState}) bundle?)]
|
||||
[rate-expr (and/c real? positive?)])]{
|
||||
tell DrScheme to apply @scheme[tick-expr] as above but use the specified
|
||||
tell DrRacket to apply @scheme[tick-expr] as above but use the specified
|
||||
clock tick rate instead of the default.}
|
||||
}
|
||||
|
||||
|
@ -1013,7 +1013,7 @@ optional handlers:
|
|||
@defform[(on-disconnect dis-expr)
|
||||
#:contracts
|
||||
([dis-expr (-> (unsyntax @tech{UniverseState}) iworld? bundle?)])]{
|
||||
tell DrScheme to invoke @scheme[dis-expr] every time a participating
|
||||
tell DrRacket to invoke @scheme[dis-expr] every time a participating
|
||||
@tech{world} drops its connection to the server. The first argument
|
||||
is the current state of the universe server, while the second argument is
|
||||
the (representation of the) world that got disconnected. The resulting
|
||||
|
@ -1025,7 +1025,7 @@ optional handlers:
|
|||
@defform[(to-string render-expr)
|
||||
#:contracts
|
||||
([render-expr (-> (unsyntax @tech{UniverseState}) string?)])]{
|
||||
tell DrScheme to render the state of the universe after each event and to
|
||||
tell DrRacket to render the state of the universe after each event and to
|
||||
display this string in the universe console.
|
||||
}
|
||||
}
|
||||
|
@ -1043,7 +1043,7 @@ optional handlers:
|
|||
@defform/none[(state boolean-expr)
|
||||
#:contracts
|
||||
([boolean-expr boolean?])]{
|
||||
tell DrScheme to display a separate window in which the current
|
||||
tell DrRacket to display a separate window in which the current
|
||||
state is rendered each time it is updated. This is mostly useful for
|
||||
debugging server programs.
|
||||
}}
|
||||
|
@ -1054,7 +1054,7 @@ optional handlers:
|
|||
|
||||
In order to explore the workings of a universe, it is necessary to launch a
|
||||
server and several world programs on one and the same computer. We
|
||||
recommend launching one server out of one DrScheme tab and as many worlds
|
||||
recommend launching one server out of one DrRacket tab and as many worlds
|
||||
as necessary out of a second tab. For the latter, the teachpack provides a
|
||||
special form.
|
||||
|
||||
|
@ -1073,7 +1073,7 @@ Once you have designed a world program, add a function definition
|
|||
(define (main n)
|
||||
(big-bang ... (name n) ...))
|
||||
))
|
||||
Then in DrScheme's Interactions area, use @scheme[launch-many-worlds]
|
||||
Then in DrRacket's Interactions area, use @scheme[launch-many-worlds]
|
||||
to create several distinctively named worlds:
|
||||
@(begin
|
||||
#reader scribble/comment-reader
|
||||
|
|
|
@ -47,7 +47,7 @@ A @tech{Color} is a color-symbol (e.g., @scheme['blue]) or a color-string
|
|||
@;-----------------------------------------------------------------------------
|
||||
@section[#:tag "creational"]{Creating Basic Shapes}
|
||||
|
||||
In DrScheme, you can insert images from your file system. Use PNG images
|
||||
In DrRacket, you can insert images from your file system. Use PNG images
|
||||
instead whenever possible for insertions. In addition, you can create basic
|
||||
shapes with the following functions.
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ constrained as follows:
|
|||
|
||||
<li><code>{(idx send/finish)} : Response -> Void</code> <br />
|
||||
sends the response to the browser and terminates the servlet (and the
|
||||
REPL, when used inside of DrScheme).
|
||||
REPL, when used inside of DrRacket).
|
||||
|
||||
<li><code>{(idx initial-request)} : Request</code> <br /> a fictitious request
|
||||
that looks like a browser initially requested the servlet's URL.
|
||||
|
|
|
@ -116,7 +116,7 @@ The following picture provides an intuitive overview of the workings of
|
|||
generation of images from the animation, including an animated GIF image. }
|
||||
|
||||
@defproc[(on-tick-event [tock (-> (unsyntax @tech{World}) (unsyntax @tech{World}))]) true]{
|
||||
Tell DrScheme to call @scheme[tock] on the current world every time the
|
||||
Tell DrRacket to call @scheme[tock] on the current world every time the
|
||||
clock ticks. The result of the call becomes the current world.}
|
||||
|
||||
@deftech{KeyEvent} @scheme[(or/c char? symbol?)]
|
||||
|
@ -135,7 +135,7 @@ A @tech{KeyEvent} represents key board events, e.g., keys pressed or
|
|||
compares two @tech{KeyEvent} for equality}
|
||||
|
||||
@defproc[(on-key-event [change (-> (unsyntax @tech{World}) key-event? (unsyntax @tech{World}))]) true]{
|
||||
Tell DrScheme to call @scheme[change] on the current world and a
|
||||
Tell DrRacket to call @scheme[change] on the current world and a
|
||||
@tech{KeyEvent} for every keystroke the user of the computer makes. The result
|
||||
of the call becomes the current world.
|
||||
|
||||
|
@ -161,17 +161,17 @@ A @tech{KeyEvent} represents key board events, e.g., keys pressed or
|
|||
computer's user.
|
||||
|
||||
@defproc[(on-mouse-event [clack (-> (unsyntax @tech{World}) natural-number/c natural-number/c (unsyntax @tech{MouseEvent}) (unsyntax @tech{World}))]) true]{
|
||||
Tell DrScheme to call @scheme[clack] on the current world, the current
|
||||
Tell DrRacket to call @scheme[clack] on the current world, the current
|
||||
@scheme[x] and @scheme[y] coordinates of the mouse, and and a
|
||||
@tech{MouseEvent} for every action of the mouse by the user of the
|
||||
computer. The result of the call becomes the current world.}
|
||||
|
||||
@defproc[(on-redraw [to-scene (-> (unsyntax @tech{World}) (unsyntax @tech{Scene}))]) true]{ Tell DrScheme to call @scheme[to-scene]
|
||||
@defproc[(on-redraw [to-scene (-> (unsyntax @tech{World}) (unsyntax @tech{Scene}))]) true]{ Tell DrRacket to call @scheme[to-scene]
|
||||
whenever the canvas must be redrawn. The canvas is usually re-drawn after a tick event, a keyboard
|
||||
event, or a mouse event has occurred. The generated scene is displayed in the world's canvas.}
|
||||
|
||||
@defproc[(stop-when [last-world? (-> (unsyntax @tech{World}) boolean?)]) true]{
|
||||
Tell DrScheme to call @scheme[last-world?] whenever the canvas is
|
||||
Tell DrRacket to call @scheme[last-world?] whenever the canvas is
|
||||
drawn. If this call produces @scheme[true], the clock is stopped; no more
|
||||
tick events, @tech{KeyEvent}s, or @tech{MouseEvent}s are forwarded to
|
||||
the respective handlers. As a result, the canvas isn't updated either.}
|
||||
|
@ -479,5 +479,5 @@ which function takes care of tick events, key events, and redraws:
|
|||
(on-redraw render)
|
||||
))
|
||||
|
||||
Now it's time for you to collect the pieces and run them in DrScheme to see
|
||||
Now it's time for you to collect the pieces and run them in DrRacket to see
|
||||
whether it all works.
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
@title{Test Box Recovery Tool}
|
||||
|
||||
The text-box recovery tool allows DrScheme v370 and later to read
|
||||
The text-box recovery tool allows DrRacket or DrScheme v370 and later to read
|
||||
programs created using v360 and earlier that include test-case boxes.
|
||||
|
||||
When opened using this tool, test-case boxes are turned into
|
||||
|
@ -16,4 +16,4 @@ plain-text @scheme[check-expect] forms.
|
|||
If either the test or expected-result expression contains non-text
|
||||
(e.g., an image), the converted form is a comment box containing a
|
||||
@scheme[check-expect] form. The box should be easy to remove using the
|
||||
@menuitem["Scheme" "Uncomment"] menu item in DrScheme.
|
||||
@menuitem["Scheme" "Uncomment"] menu item in DrRacket.
|
||||
|
|
|
@ -105,7 +105,7 @@
|
|||
(or (wait-for-drscheme-frame-pred)
|
||||
(begin
|
||||
(when print-message?
|
||||
(printf "Select DrScheme frame~n"))
|
||||
(printf "Select DrRacket frame~n"))
|
||||
(poll-until wait-for-drscheme-frame-pred)))))
|
||||
|
||||
;; wait-for-new-frame : frame [(listof eventspace) = null] -> frame
|
||||
|
@ -309,7 +309,7 @@
|
|||
(wait-for-button button))
|
||||
|
||||
;; set-language-level! : (cons (union regexp string) (listof (union regexp string))) boolean -> void
|
||||
;; set language level in the frontmost DrScheme frame (resets settings to defaults)
|
||||
;; set language level in the frontmost DrRacket frame (resets settings to defaults)
|
||||
;; If `close-dialog?' it #t,
|
||||
(define set-language-level!
|
||||
(lambda (in-language-spec [close-dialog? #t])
|
||||
|
|
|
@ -369,7 +369,7 @@
|
|||
((failure-escape)))
|
||||
|
||||
;; check-steps : program-spec (listof step) -> void
|
||||
;; executes each of the steps in DrScheme and raises
|
||||
;; executes each of the steps in DrRacket and raises
|
||||
;; an exception if something doesn't match up.
|
||||
(define (check-steps program steps)
|
||||
(let* ([drs-frame (wait-for-drscheme-frame)]
|
||||
|
|
|
@ -264,7 +264,7 @@ The "MrEd XOR" menu selects a icon:
|
|||
- "MrEd XOR" : initial icon, as described above
|
||||
|
||||
- "PLT Middle" : middle area of the PLT logo (used when starting
|
||||
DrScheme), same size as the MrEd icon. Make sure scaling works
|
||||
DrRacket), same size as the MrEd icon. Make sure scaling works
|
||||
right (i.e., same section shown and scaled).
|
||||
|
||||
- "PLT ^ MrEd" : "PLT Middle" masked by the MrEd icon.
|
||||
|
|
|
@ -128,7 +128,7 @@
|
|||
(run-save/load-tests pasteboard% pb-insert reset?))
|
||||
'(#t #f))
|
||||
|
||||
;; Test DrScheme-style format change in `on-save':
|
||||
;; Test DrRacket-style format change in `on-save':
|
||||
(define (run-on-save-tests editor% insert)
|
||||
(let* ([editor+% (if (eq? editor% text%)
|
||||
(class editor%
|
||||
|
|
|
@ -29,5 +29,5 @@ Here are some manual tests to run on MysterX:
|
|||
|
||||
- run mxdemo.ss (in the collection) under IE4, IE5, IE5.5
|
||||
- check for no context menu in browsers
|
||||
- load mxdemo.ss into DrScheme; hit Execute a second time,
|
||||
- load mxdemo.ss into DrRacket; hit Run a second time,
|
||||
the browser windows should disappear
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -49,7 +49,7 @@
|
|||
(define show-all-steps (make-parameter #f))
|
||||
|
||||
;; use this parameter to prevent the stepper from capturing errors
|
||||
;; (so that you can take advantage of DrScheme's error reporting)
|
||||
;; (so that you can take advantage of DrRacket's error reporting)
|
||||
(define disable-stepper-error-handling (make-parameter #f))
|
||||
|
||||
|
||||
|
@ -142,7 +142,7 @@
|
|||
|
||||
;; test-sequence/core : render-settings? boolean? syntax? steps?
|
||||
;; this is a front end for calling the stepper's "go"; the main
|
||||
;; responsibility here is to fake the behavior of DrScheme and collect the
|
||||
;; responsibility here is to fake the behavior of DrRacket and collect the
|
||||
;; resulting steps.
|
||||
(define (test-sequence/core render-settings show-lambdas-as-lambdas? expanded-thunk expected-steps error-box)
|
||||
(let* ([current-error-display-handler (error-display-handler)]
|
||||
|
|
|
@ -1213,8 +1213,8 @@ The following four are for backward compatibility:
|
|||
coloring; the default is #t
|
||||
|
||||
> code-colorize-quote-enabled - a parameter to control whether everything
|
||||
under a quote is colorized as a literal (like DrScheme's Check Syntax,
|
||||
and unlike DrScheme's interactive text coloring); the default is #t
|
||||
under a quote is colorized as a literal (like DrRacket's Check Syntax,
|
||||
and unlike DrRacket's interactive text coloring); the default is #t
|
||||
|
||||
> code-italic-underscore-enabled - a boolean parameter to control
|
||||
whether underscore-prefixed identifiers are italicized (dropping
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
_version_: PLT version checking
|
||||
===============================
|
||||
_version_: Racket version checking
|
||||
==================================
|
||||
|
||||
The version collection contains several version-related pieces that
|
||||
are used by PLT Scheme. First, the "check.ss" module provides a
|
||||
single function:
|
||||
are used by Racket. First, the "check.ss" module provides a single
|
||||
function:
|
||||
|
||||
> (check-version)
|
||||
|
||||
This procedure checks the currently available version on the PLT
|
||||
This procedure checks the currently available version on the Racket
|
||||
website (doanload.racket-lang.org), and returns a value that indicates
|
||||
your current state -- one of these:
|
||||
|
||||
|
@ -35,13 +35,13 @@ _patchlevel_ module. This module provides a single value:
|
|||
> patchlevel
|
||||
|
||||
which is an integer that indicates the current patch level. This is
|
||||
normally zero, but may be updated by patches to DrScheme.
|
||||
normally zero, but may be updated by patches to DrRacket.
|
||||
|
||||
|
||||
Finally, the "tool.ss" makes DrScheme use both features:
|
||||
Finally, the "tool.rkt" makes DrRacket use both features:
|
||||
|
||||
* the patchlevel appears as a version `pN' suffix in DrScheme (but the
|
||||
* the patchlevel appears as a version `pN' suffix in DrRacket (but the
|
||||
binary version as reported by `(version)' is not changed);
|
||||
|
||||
* it is possible to periodically check whether a new PLT Scheme
|
||||
* it is possible to periodically check whether a new Racket
|
||||
distribution is available for download.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
;; this file contains the current patch level of DrScheme
|
||||
;; it is usually `0' in the repository, and changed only when a patch is made.
|
||||
;; This file contains the current patch level of Racket.
|
||||
;; It is usually `0' in the repository, changes only when a patch is made.
|
||||
#lang scheme/base
|
||||
(define patchlevel 0)
|
||||
(provide patchlevel)
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
Under Windows, Mac OS X, and Linux x86_64, malloc() returns 16-byte
|
||||
aligned data. And, actually, VecLib says that it requires
|
||||
16-byte-aligned data. So, in those cases, GC_ALIGN_SIXTEEN might be
|
||||
better --- but that's a lot more expensive, increasing DrScheme's
|
||||
better --- but that's a lot more expensive, increasing DrRacket's
|
||||
initial footprint by almost 10%. */
|
||||
#ifndef GC_ALIGN_EIGHT
|
||||
# define GC_ALIGN_EIGHT
|
||||
|
|
Loading…
Reference in New Issue
Block a user