[plt-scheme] Re: how to specify the language "PLAI Scheme" in PLT Scheme in Emacs

From: Benjamin L.Russell (DekuDekuplex at Yahoo.com)
Date: Wed Mar 4 07:34:35 EST 2009

Yes; it seems that the following specification for the Scheme program
name in Emacs works:

  mzscheme -i plai -l errortrace

I haven't yet verified whether the language is indeed "PLAI Scheme,"
though; I'll do that at the next available opportunity.  If something
else comes up in relation to this issue, I'll post a follow-up.

Thank you very much for your detailed explanation!

-- Benjamin L. Russell

On Wed, 4 Mar 2009 11:32:57 +0000, Noel Welsh
<noelwelsh at gmail.com> wrote:

>I think you've become rather confused, but that this confusion can be
>rather simply cleared up.
>PLT Scheme supports multiple languages. You specify the language you
>are using (in v4 PLT) with the line
>  #lang whatever
>at the top of your file. E.g.
>  #lang scheme         => I'm using scheme (lots of stuff included)
>  #lang scheme/base => I'm using the scheme/base language (like scheme
>but less stuff)
>  #lang web-server    => I'm using the stateless web server language
>There are two things called mzscheme:
>1. The command line interpreter
>2. A language the mimics the v3 scheme language
>  #lang mzscheme  => I'm a dinosaur, using the v3 compatibility language
>The PLAI docs say:
> "These languages are also available as the module languages plai,
>plai/collector, plai/mutator and plai/web respectively."
>  #lang plai               => I'm using PLAI
>  #lang plai/collector => I'm using the PLAI GC language
>This is how you use these languages in your code. Now to use the
>languages in the REPL you have to do something a little bit different.
>Basically, you run mzscheme with the -I switch, specifying the module
>that implements the language you want to use. E.g.:
>  noel at Quixotic~> mzscheme -I lang/htdp-beginner.ss
>This runs mzscheme with the HtDP beginner language. Notice how the
>interactions are constrained:
>  Welcome to MzScheme v4.1.3.8 [3m], Copyright (c) 2004-2008 PLT Scheme Inc.
>  > (define (foo x) (x 1))
>  stdin::8: define: function definitions are not allowed in the
>interactions window; they must be in the definitions window in:
>(define (foo x) (x 1))
>Not all languages can be run this way; some only work with DrScheme. I
>don't know what the deal for the PLAI languages is, but probably
>  mzscheme -I plai/lang.ss
>will work.
>On Wed, Mar 4, 2009 at 9:54 AM, Benjamin L. Russell
><DekuDekuplex at yahoo.com> wrote:
>> According to the online documentation for MzScheme for the CS173
>> course associated with PLAI (see "MzScheme: Legacy Module Language" at
>> http://www.cs.brown.edu/courses/cs173/2008/Manual/mzscheme/index.html),
>> the documentation refers to "the mzscheme language," implying that
>> MzScheme is a separate language from "PLAI Scheme," and not just a
>> command-line tool equipped with the same languages.
>> Furthermore, according to the online documentation for the software
>> accompanying PLAI (see the "Programming Languages: Application and
>> Interpretation" section of the "PLT Scheme (installation)" manual at
>> http://www.cs.brown.edu/courses/cs173/2008/Manual/manual/index.html),
>> choosing the language in DrScheme is described, but choosing the
>> language in MzScheme in Emacs is not.
>> Is there any way to specify the language "PLAI Scheme" when working
>> with a PLT Scheme REPL in Emacs?
>> -- Benjamin L. Russell
Benjamin L. Russell  /   DekuDekuplex at Yahoo dot com
Translator/Interpreter / Mobile:  +011 81 80-3603-6725
"Furuike ya, kawazu tobikomu mizu no oto." 
-- Matsuo Basho^ 

Posted on the users mailing list.