Is there some similar file for drscheme? (~/.drschemerc doesn't seem to
work).
I know I can load a list of files from the command line, but there are
some things I'd like to not worry about each time.
Thanks,
Russell.
I'm not a PLT expert, but I would expect it to be the same
file. DrScheme is a MrEd application, IIRC.
david rush
--
They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety.
-- Benjamin Franklin
>
> I'm not a PLT expert, but I would expect it to be the same
> file. DrScheme is a MrEd application, IIRC.
>
> david rush
As you say, DrScheme is a MrEd application (and when I start MrEd, it
recommends I use DrScheme). And I expected it to use the same file.
But it doesn't. Or at least if it does use the same file, it handles it
differently; if I define something in .mredrc, I can reference it in the
MrEd window. But I don't see that definition in DrScheme unless I
explicitly load ".mredrc".
Russell.
Among the PLT Scheme tools, MzScheme and MrEd are intended to act
somewhat like shells, so the .mzschemerc and .mredrc files make sense.
DrScheme is intended to provide a more controlled development
environment. Loading a .drschemerc file would be analogous to having
gcc prefix every program it compiles with the content of a .gccrc
file. All the same, DrScheme is designed to support multiple Scheme
dialects, and you might view a .drschemerc file as configuring the
dialect. For that, DrScheme v200 lets you define your own Scheme
dialect to be selected in the language dialog.
Defining a language is more complex than a .drschemerc file would be,
but not much. There are many advantages to defining a language: you
can define multiple languages, you can easily switch languages when
someone else gives you code that won't work in your dialect, and all
PLT tools (such as the Scheme-to-C compiler and the byte-code
embedder) can understand the language.
The following steps illustrate how to create your own dialect of
Scheme:
* In the "collects" directory of your PLT installation, create a
new "myscheme" directory.
* In the "myscheme" directory, create a file named "myscheme.scm".
The file should contain a module definition that exports
all of the initial bindings for your language. For example:
(module myscheme mzscheme
;; Make everything in MzScheme available in My Scheme:
(provide (all-from mzscheme))
;; Add `first' and `rest' as synonyms for `car' and `cdr':
(define first car)
(define rest car)
(provide first rest))
* Add an "info.ss" file to the "myscheme" directory. This tells
DrScheme that "myscheme.scm" should be listed as a language with
the name "My Scheme":
(module info (lib "infotab.ss" "setup")
(define drscheme-language-modules '(("myscheme.scm" "myscheme")))
(define drscheme-language-positions '(("My Scheme"))))
* Start DrScheme, and choose "My Scheme" from the "Choose Language..."
dialog.
Matthew
P.S. - The final v200 still hasn't been released yet, but 200alpha1 is
available from