[racket] syntax, differently

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Sat Jul 31 11:38:04 EDT 2010

On Sat, Jul 31, 2010 at 10:30 AM, Matthias Felleisen
<matthias at ccs.neu.edu> wrote:
> On Jul 31, 2010, at 11:19 AM, Robby Findler wrote:
>> On Sat, Jul 31, 2010 at 10:00 AM, Matthias Felleisen
>> <matthias at ccs.neu.edu> wrote:
>>> Shriram's proposal and a private conversation with Mike suggested the following feature requests for the drracket teaching languages:
>>> 1. Could drracket limit the width of programs in the teaching language world to 80 columns?
>> This one seems doable (I'd probably make the text turn red when it
>> passes the 80th column or somethign instead of rejecting keystrokes).
> I wouldn't reject keystrokes, I'd just act as if the student had typed return.

You mean that, right as they cross into the 80th column you hit return?

Judging from my experience with pretty-print (which does similar
things sometimes), that could be bad news.

For example

 (+ 1 2 3 4 5 6 <slightly-less than columns of this> (+ <column80>

a return at that point isn't going to help much.

>>> 2. Could drracket reindent all every time a programmer hits {return | run | submission server request }?
>> I'd be worried about this that some edits one does (maybe opening a
>> string?) would cause strange things to happen to the editor based on
>> intermediate states of the program.
> I'd be happy with shifting everything on RUN and SUBMIT. At that point the student thinks that the program is complete.

I'd be nervous of just doing that. I think you probably want to gather
a bunch of Guilaume's traces and see how they fare under various

In any case, it should be easy to do the above, to get started
experimenting. The callback is called execute-callback and it is in
drracket/private/unit.rkt. You can call the indent-all method of the
definitions text (that's in the framework in the scheme.rkt file, I


Posted on the users mailing list.