[plt-scheme] headless mred on OS X? Or, way to decode (lib"read.ss""wxme") reader in mz?

From: John Clements (clements at brinckerhoff.org)
Date: Wed Sep 26 17:17:46 EDT 2007

On Sep 26, 2007, at 1:23 PM, Eli Barzilay wrote:

> On Sep 26, John Clements wrote:
>> I'm trying to set up a "checker.ss" module to verify that student
>> handins (using the handin-server) are syntactically well-formed.
>> However, I'm running the handin-server on an OS X machine.  This
>> causes the following problem chain:
>> 1) In order to analyze the input, I need to read it from the handin
>> file.
>> 2) this file is stored in #reader (lib "read.ss" "wxme") format.
>> 3) I don't believe I can read such a file in mzscheme.  I got as far
>> as requiring (lib "read.ss" "wxme") and calling its read procedure on
>> an input port with the submission chars after the reader spec, but I
>> then got an error
>>> (read (open-input-file "foo.scm"))
>> foo.scm::1324: read: illegal use of "."
> Right -- IIRC, Matthew made it do something similar to the
> wxme-to-text hack I wrote, and just read graphical objects as "."s.
> This means that you could probably use mzscheme to run the server, but
> only if you don't do any graphical stuff.  (I need to look into making
> it easier to use it with mzscheme.)

Give me another breadcrumb; you seem to be suggesting that the read  
method of the wxme reader is already doing the right thing by parsing  
a graphical thing as a ".", but I'm not sure how to avoid the read  
error given above.

>> 4) I can't run mred as a cron job, or (more specifically) any time
>> that I'm not logged in.
> Besides what I'm going to say below, this sounds wrong.  Why would you
> run this in a cron job?  The handin server is designed to check
> submissions as they come in, not off-line in some cron job.

Forgive me; of course, I'm running it as a daemon.  My reference to a  
cron job occurs because the easiest way for me to test whether these  
things work is to set up a cron job on another account, log out, and  
then see whether it worked.

>> Trying this produces the error INIT_Processeses(), could not
>> establish the default connection to the WindowServer.
>> So, the possible solutions that I see are:
>> 1) never log out, allowing a mred process to run all the time,
>> 2) forget about running a checker, or
>> 3) run the X windows version of mred; I haven't really messed with
>> this, perhaps it's the best route?
> I'm not sure about what you're trying to do because of that cron job
> remark, but the usual thing that I do, given that mred cannot run
> without a display even if it doesn't actually do any GUI, is run it in
> a VNC session.  This way there is no problems running mred.

So, you have a VNC connection to a machine that ... has an X server  
running?  Where you're logged in?  Both of the above?  My ignorance  
of the X Windows world is currently woefully complete.

> (But note that if you have students submit GUI code, like world-based
> stuff, then you need to add a stub library that will avoid doing
> that.  I'll commit one to the handin-server's overridden-collections
> directory if I get one.)

Right, of course.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2223 bytes
Desc: not available
URL: <http://lists.racket-lang.org/users/archive/attachments/20070926/db59ff97/attachment.p7s>

Posted on the users mailing list.