svn: r173
This commit is contained in:
parent
86647b01eb
commit
f0ecd2f0bc
|
@ -119,51 +119,57 @@ MzTake requires PLT Scheme v208 and higher.
|
||||||
|
|
||||||
Demos
|
Demos
|
||||||
|
|
||||||
If you installed MzTake using the .PLT distritubtion, you can
|
If you installed MzTake using the .PLT distribution, you can
|
||||||
find demos of a few different uses of MzTake in the
|
find the demos in the following directories:
|
||||||
following directories:
|
|
||||||
|
|
||||||
On Linux:
|
On Linux:
|
||||||
~/.plt-scheme/208/collects/mztake/demos
|
~/.plt-scheme/208/collects/mztake/demos
|
||||||
|
|
||||||
On Windows (typically):
|
On Windows (typically):
|
||||||
C:\Documents and Settings\Jono\Application Data\PLT Scheme\208\collects\mztake
|
C:\Documents and Settings\Jono\Application Data\PLT Scheme\208\collects\mztake\demos
|
||||||
|
|
||||||
Where "Jono" is your username, and "208" is the version of
|
where "Jono" is your username, and "208" is the version of
|
||||||
DrScheme you are running.
|
DrScheme you are running.
|
||||||
|
|
||||||
You should be able to run them in DrScheme by switching to the
|
The demos directory contains a sub-directory for each of the demos.
|
||||||
"MzTake" language from the "Experimental Languages" section
|
For instance, the highway directory contains "highway.ss" and
|
||||||
of DrScheme's language dialog, and then selecting "Run"
|
"highway-test.ss". To run this demo, switch to the "MzTake" language
|
||||||
(or "Execute") from the DrScheme tool bar.
|
level from the "Experimental Languages" section of DrScheme's language
|
||||||
|
dialog, load "highway-test.ss", and click "Run". What you see is
|
||||||
|
generated by the debugging script. Each demo directory contains
|
||||||
|
the following two files: one is the program being debugged
|
||||||
|
(named after the directory), and the other is a file ending
|
||||||
|
in "...-mztake.ss" (the MzTake script).
|
||||||
|
|
||||||
The demos are listed in order of complexity. When you open them
|
The demos are in order of increasing complexity. When you open
|
||||||
in DrScheme, don't let the amount of text overwhelm you -- the
|
them in DrScheme, don't let the amount of text overwhelm you --
|
||||||
scripts themselves are only a few lines of code. However, the
|
the scripts themselves are only a few lines of code. However, the
|
||||||
commenting is *exhaustive* so that a FrTime novice can still use
|
commenting is *extensive* to aid even a FrTime novice who has never
|
||||||
MzTake without ever having written a FrTime script before!
|
written a FrTime script before!
|
||||||
|
|
||||||
./highway/highway-test.ss - a small MzTake example, shown above
|
./highway/highway-mztake.ss - The program simulates a very simple
|
||||||
|
speedometer, and the MzTake script
|
||||||
|
monitors it.
|
||||||
|
|
||||||
./sine/sine-test.ss - plots values extracted from the
|
./sine/sine-mztake.ss - Plots values extracted from a program
|
||||||
running program
|
which generates coordinates for a
|
||||||
|
single sine wave.
|
||||||
|
|
||||||
./montecarlo/montecarlo-test.ss - visualizes the Monte Carlo
|
./montecarlo/montecarlo-mztake.ss - Visualizes the Monte Carlo integration
|
||||||
integration used to derive the
|
("throwing darts at a dartboard") used
|
||||||
value of pi
|
to derive the value of pi.
|
||||||
|
|
||||||
./random/random-test.ss - tests the quality of Scheme's random
|
./random/random-mztake.ss - Tests the quality of Scheme's random
|
||||||
number generator with a histogram
|
number generator with a histogram.
|
||||||
|
|
||||||
./exception/exception-test.ss - demonstrates how MzTake catches exceptions
|
./exception/exception-mztake.ss - Demonstrates how MzTake catches exceptions.
|
||||||
|
|
||||||
./first-class/first-class-test.ss - demonstrates how you can add multiple
|
./first-class/first-class-mztake.ss - Demonstrates how you can add multiple traces
|
||||||
traces to the same variable in a file
|
to the same variable in a file to `record'
|
||||||
to 'record' its evolution, and how you
|
its evolution, and how you can trace first-class
|
||||||
can trace first-class functions, such
|
functions, such as those passed to map.
|
||||||
as those passed to map.
|
|
||||||
|
|
||||||
./djikstra/dijkstra-test.ss - debugs a buggy implementation of
|
./djikstra/dijkstra-mztake.ss - Debugs a buggy implementation of
|
||||||
Dijkstra's algorithm
|
Dijkstra's algorithm
|
||||||
|
|
||||||
|
|
||||||
|
@ -642,7 +648,7 @@ Tips and Tricks
|
||||||
* You can trace the *same* file in different ways by using
|
* You can trace the *same* file in different ways by using
|
||||||
multiple processes on the same file, under different
|
multiple processes on the same file, under different
|
||||||
contexts, and compare results. For example, in
|
contexts, and compare results. For example, in
|
||||||
"demos/misc/first-class-test.ss":
|
"demos/misc/first-class-mztake.ss":
|
||||||
|
|
||||||
(define-mztake-process p ("first-class.ss" [x-before-let 3 29 bind 'x]
|
(define-mztake-process p ("first-class.ss" [x-before-let 3 29 bind 'x]
|
||||||
[x-in-let 4 25 bind 'x]
|
[x-in-let 4 25 bind 'x]
|
||||||
|
|
|
@ -13,8 +13,8 @@
|
||||||
|
|
||||||
|
|
||||||
;without frtime bundled:
|
;without frtime bundled:
|
||||||
(pack-collections "mztake-distro.plt" "MzTake Debugger"
|
(pack-collections "mztake-208.plt" "MzTake Debugger"
|
||||||
'(("mztake")) #t '(("frtime")("stepper")) my-filter #f)
|
'(("mztake")) #t '(("frtime")("stepper")) my-filter #f)
|
||||||
|
|
||||||
(pack-collections "mztake-frtime-distro.plt" "MzTake Debugger"
|
(pack-collections "mztake-frtime-pre-208.plt" "MzTake Debugger"
|
||||||
'(("mztake")("frtime")) #t '(("stepper")) my-filter #f))
|
'(("mztake")("frtime")) #t '(("stepper")) my-filter #f))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user