[plt-scheme] language levels in drscheme

From: Corey Sweeney (corey.sweeney at gmail.com)
Date: Thu Jan 18 13:47:38 EST 2007

On 1/18/07, John Clements <clements at brinckerhoff.org> wrote:
> On Jan 17, 2007, at 4:56 PM, Corey Sweeney wrote:
> > Hey danny.  That must not have come across right.  I'll try a
> > differnt way.
> Your initial e-mail suggested having language levels associated with
> files.  I believe that the principal difficulty in implementing this
> is the fact that there's not an obvious cross-platform file metadata
> format.  Also, some users might be surprised when they open a new
> file and it behaves in a "weird" way. Finally, I think it's not an
> incredibly high-priority item; I just counted, and I count six
> keystrokes in going from (module...) to pretty big, and four
> keystrokes to go back again. Of course, this doesn't include the
> irritation of forgetting to switch, and running the program only to
> be told that you have more than one expression (or worse, simply
> evaluating the module without opening it).

Since I my average drscheme window opens with about 10 tabs (I have no idea
if everyone else is doing this or not), and 8 or 9 of the tabs would be
"pretty big", that makes the operation 8*6 = 48 keystrokes every other time
i load drscheme.  either that or load drscheme, set "pretty big", close
drscheme, and reload drscheme, then do the 2*4 = 8 keystrokes to fix the 2
module tabs."  However the time to launch drscheme is quite large,
expecially for those of us running "plt-full".  (i.e. all the collects from
the svn, not just the bare minimum from the standard distribution).  Also, I
tend to run 3 instances of drscheme at a time (i wrote a script to open
multiple tabs with multiple windows), which increases shutdown and restart

A thought....  The thing that prevents me from writing a fix for this myself
is that i cannot effect things from the interactions window.  I.E.  if from
the interactions window i could type '(set-language (tab 4) "(module
...)")', i would probably find my own solution to this, and integrate it
into my "project manager".  (my "project manager" runs other instances of
drscheme from the command shell via "system" when you want to edit a
file.).  I.E. I can't do it from the interactions area manually, so I won't
be able to figure out how to write a program to do it without launching a
major "research project".

Now i'm actually going somewhere with this...  Is it possible to load
drscheme, and then from the drscheme interactions window, load drscheme?
Then from the interactions window of drscheme instance #1 be able to
manipulate in some way drscheme instance #2, with something like
'(set-language (tab 4) "(module ...)")' perhaps?  (i'm sure I have the
syntax wrong, but you get the idea)

This is probably more of an issue for you than for most, because most
> of your code is in the "pretty big" language; I suspect that for many
> PLT users, nearly all of their code is in modules.
> I think that Danny was suggesting that you throw _all_ of your code
> in modules, wrapping the "pretty big" ones with (module <module-name>
> (lib "pretty-big.ss" "lang") ...) (that's from memory, apologies for
> any errors there).  Of course, there may be some reason why this
> isn't possible for you.

Yes, unfortunately most of my libraries, call libraries, that calls a
library that needs to call eval.  however, if i use modules, the namespace
of the intermediate library dissapears, and the call to eval will not work,
because it happens at the top level namespace.  Since it needs access to the
namespace of the library that called it, and not the top level namespace, I
must put all my libraries in the top level namespace.  Of course I can still
use closure based modules, but that dosn't let me use the neat module tools
that i'm hoping to discover as i start using modules more often. :)
{note, it's been over a year since I tried, so i may be off in some of the

Hope this helps ... to clarify the problem, at least.
> Corrections Cheerfully Accepted (CCA),
> John Clements

((lambda (y) (y y)) (lambda (y) (y y)))
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20070118/ec338d2a/attachment.html>

Posted on the users mailing list.