[racket] REPL and read-line

From: Hendrik Boom (hendrik at topoi.pooq.com)
Date: Fri Jan 7 10:48:47 EST 2011

On Fri, Jan 07, 2011 at 12:57:22PM -0200, Alexandre Moreira wrote:
> Noel, it's just that a few of my commands ask for more input.
> It's not the correct domain, but it's something like the difference,
> in a linux system of useradd to adduser. I have those that receive a
> lot of arguments, and other commands that do the same but build the
> arguments by asking the user some questions (with read-line).
> Problem is, when I call the command, the first (read-line) inside it
> will return always "" because of the newline I used to call the
> command itself.
> 
> I wonder if it'd be easy (and not break anything) to make the REPL
> consume whitespaces between datums.
> 
> As of now I they are working with the hack I posted before: The only
> problem is that at times, if the user truly wants to give a blank
> line, he needs to press enter twice.

It sounds to me that the big problem is that the behaviour is different 
on different systems.  If it were consistent either way, you could 
adapt?

-- hendrik


Posted on the users mailing list.