[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Specialized input parsing for code/REPL in DrScheme?



Robby-

Here is an update on trying to use the raw-reader stuff under 103.

First, thanks to the DrScheme team for getting 103 out so soon. I just
downloaded and installed. That went smoothly -- the only unexpected
thing was that I didn't get any sort of finished dialog when
uninstalling 102 (although it did seem to finish). Cut and paste works
great under Win NT by the way, although didn't find the cut-and-paste
fix mentioned in the release notes (although maybe it is listed as
something else I missed.) DrScheme seemed to load faster the first time
too -- although maybe that's just subjective.

I did download the 103 source from CVS a few weeks ago back (6 hours on
my slow connection, luckily it all went in one go) to try to get this
REPL feature earlier, but the VC++ 5.0 compiler I have is too antiquated
to easily compile the sources (some TCP/IP interfaces and the definition
of event loop functions changed). I've just been living with the
bootstrap loader approach for processing indented Scheme code. But I
would like to have better integration -- most of all so I can maybe
generate better error messages.

I tried the good unit you sent earlier as a tool under the just released
103 (by creating under c:/plt/collects/drscheme/tools" an "indentation"
directory with a "unit.ss" file  in it from renaming "good-unit.ss"). I
got this error message when I tried to execute any code:

read: expects argument of type <input-port>; given    
#<procedure:read-snips/chars-from-text-thunk>

(I'm using Windows NT SP 3 if it matters).

I then tried the bad unit renamed to "unit.ss" (exiting DrScheme and
restarting), and evaluation worked, but there was no pop up. I had also
got this same nothing different behavior for bad unit under 102.

One value I now see for having this functionality you added for making
it easier to change REPL is that it becomes easier to add more language
levels to DrScheme. This obviously isn't a typical end user application,
but it does make it easier to use DrScheme for research into various
things. I'm realizing that ultimately what I want to do in DrScheme
might best be represented as a new language level choice.

Anyway, my question is does this good-unit.ss still work for you under
103 or does it need to be changed somehow?

-Paul Fernhout
Kurtz-Fernhout Software 
=========================================================
Developers of custom software and educational simulations
Creators of the Garden with Insight(TM) garden simulator
http://www.kurtz-fernhout.com

Robert Bruce Findler wrote:
> 
> Okay, I went ahead and wrote the tool that lets you substitute in
> your own reader for DrScheme's. It turns out that the tool is awkward
> with the current tools interface. So, I extended the tools interface
> with two new parameter procedures:
> 
>    drscheme:basis:raw-reader
> 
> and
> 
>    drscheme:basis:zodiac-reader
> 
> DrScheme (the version released to CVS) now uses the values of these
> parameters as the readers. You can set them to your own reader. I am
> including two files with this post, good-unit.ss that uses the new
> DrScheme interface and sets the reader and bad-unit.ss that uses the
> old DrScheme interface to set the reader (probably works with 102).
> The documentation has been rebuilt, too. See
> http://www.cs.utah.edu/plt/anoncvs/ for instructions on downloading
> it.
> 
> Hope that helps,
> Robby
> 
>   ------------------------------------------------------------------------
> 
>    good-unit.ssName: good-unit.ss
>                Type: NOTEPAD File (text/plain)
> 
>    bad-unit.ssName: bad-unit.ss
>               Type: NOTEPAD File (text/plain)