[plt-scheme] cutting and pasting snips

From: Robby Findler (robby at cs.uchicago.edu)
Date: Tue Oct 17 22:15:53 EDT 2006

At Tue, 17 Oct 2006 21:07:06 -0400, Prabhakar Ragde wrote:
> Robby Findler wrote:
> > I'm sure this has come up before, but can you remind me why you don't
> > want to use scripts that work with such graphics? (Note that writing
> > your scripts in drscheme and using `mred' to run them should make it
> > easy.)
> I don't object to doing this, but I asked about it earlier and got no 
> response. My earlier question was this: when I am in DrScheme and choose 
> "Print" from the menu, I get a fixed representation printed out (which, 
> for the sample code I chose, used too large a font, and the lines 
> wrapped around). Can I script this so that it can be done with 200+ 
> student submissions, and how much control do I have over the look?

I'm sorry. It must have fallen off of my radar screen. Life is getting
busy now :(.

Anyways, attached is a script that prints (to .ps) a student program.
It also runs the program and prints the transcript that would appear in
the interactions window. 

The script takes a bunch of student filenames on the commandline and
produces a bunch of .ps files (two per input file, one with the
program, one with the output).

It is still a work in progress -- I've only just written it. In fact,
writing it suggests to me that I should refactor drscheme to support
scripts like this better.

> Note that I have a solution which works when student submissions are 
> text files, and there's no reason for them not to be text files, given 
> the questions I am asking, which at this point do not involve images or 
> anything like that. More generally, if I want to post-process student 
> submissions in any way, it's usually pretty clear how to do it with a 
> text file, and not so clear when it is something more complicated. (I 
> have wxme-to-text, Eli, thank you. This is what my TAs are using when 
> they discover a problem.)

Seems easy enough to throw wxme-to-text into your script that does the
printing .... seems like it would work for your purposes. Why not do it?

> Finally, I just don't understand why beginning students (as opposed to 
> experienced Scheme programmers) would need the ability to paste snips 
> with a textual look but a non-textual representation into the 
> Definitions window. Lots of things are not present when one is running a 
> teaching language; why is the absence of this particular feature 
> considered "crippling", especially when they are not using it 
> deliberately? --PR

Disabling it globally seems bad. If you wanted to disable it for your
course, that's fine (and I gave you some tips in my last message -- but
I'm loathe to actually post that code, as you might guess!). My
students use images in the first assignment, and I think that probably
this is a good way to go for many classrooms. So, you can see I'm
hesitant to disable it even in the teaching languages.


(And again, let me apologize for the tone of my first reply. I feel
like a complete ass.)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: drs-to-ps
Type: application/octet-stream
Size: 10678 bytes
Desc: not available
URL: <http://lists.racket-lang.org/users/archive/attachments/20061017/1b9fda6b/attachment.obj>

Posted on the users mailing list.