[plt-scheme] complile-file and debugging
----- Original Message -----
From: Robby Findler
To: jos koot
Cc: PLT-list
Sent: Tuesday, April 10, 2007 6:28 PM
Subject: Re: [plt-scheme] complile-file and debugging
On 4/10/07, jos koot <jos.koot at telefonica.net> wrote:
> 3: Open a program I want to run, select the right language, turn debugging
> off if necessary and press the run button. In this program and my own zo
> files my own modules are required with
> (require (lib "compiled/file.zo" "my own collection")).
You don't want to do that. Instead, do this:
(require (lib "file.ss" "my own collection"))
Require is smart enough to look int the compiled directory, and will
use the compiled file if it is there, and if it is newer than the .ss
file.
I know, but requiring the zo file assures me that the module has indeed be compiled and that its debugging setting will not be affected.
Otherwise, it sounds like you've got everything just right.
> One more remark about DrScheme's "cleverness" looking at the beginning
> of a file being opened and setting the language level based on it:
>
> File one.ss:
> (module one mzscheme)
> Selects language module, alright, very nice indeed, although it would even
> be nicer if the debugging and other detail option settings would not be
> affected (as far as possible, for different languages may have different
> sets of detail options)
>
> File one+two.scm:
> (module one mzscheme)
> (module two mzscheme (require module one))
> (require two)
> Selects language module too, which is not right. Correcting this would
> require DrScheme to look somewhat further than the beginning of the file.
> Perhaps you dont want to do that because it may significantly slow down
> opening the file.
That is not the behavior that I see. In my DrScheme, it leaves the
language setting along unless there is just a single module in the
file.
Can you try this experiment? Set your language to something other than
the module language. Open that file. Do you get the module language?
You are right. I must have intermixed some observations when I noticed this feature for the first few times. Sorry. Results of my experiments are as follows. When the language is module, everything is opened with language module, even if the file does not consist of a single module. When the language is not module, it is set to module only if the opened file consists of one single module form. I also observe that the language settings of tabs that are already open, are not affected, which is very nice of course. (I did not check the behaviour for files that are opened in separate windows in stead of tabs, for I always use the tabs setting.)
I rarely use the interactions window for other purposes than inspecting standard output, but observe that the interactions window allows other expressions than module forms, even if the language is module. This is convenient and logical (imho)
It would be convenient if DrScheme would open non single module files in a non module language, but there may be a problem which language and which settings to choose. Anyway, the little pop up menu at the left bottom allows quick adjustment of the language and its settings. Nice. It took me some time, but now I have the adopted the habit of dropping the cursor down left as though automatically.
Perhaps there is some other state that affects your interactions
window drscheme that is missing from your explanation? That would be
helpful to me if you could figure out what it is, but the above
descriptoin doesn't seem to match what happens for me.
Chongkai: same for your earlier message. Can you provide some more
information that would help me understand what's happening?
Thanks,
Robby
Thanks to you!
Jos Koot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20070410/631841be/attachment.html>