[plt-scheme] basic question about display + read + threads

From: john m (jptm70 at whoever.com)
Date: Tue Feb 15 03:58:42 EST 2005

I have a similar problem in a mud I am developing. A simple solution is to use a mud client which handles splitting input and output for you. There 
are several free mud clients available. This kind of client could be used for a chat program also.

----- Original Message -----
From: "Eli Barzilay" <eli at barzilay.org>
To: "Psy-Kosh" <psykosh at earthlink.net>
Subject: Re: [plt-scheme] basic question about display + read + threads
Date: Tue, 15 Feb 2005 00:17:48 -0500

>    For list-related administrative tasks:
>    http://list.cs.brown.edu/mailman/listinfo/plt-scheme
> On Feb 15, Psy-Kosh wrote:
> > is there any way to do something like that, but in such a way that
> > instead of, say, when typing text on the read line, ending up with
> > "ThHI!is is the teHI!xt I aHI!m enteHI!ring", all the text entry
> > line and all the text already on it gets "pushed down" a line each
> > time text is displayed, so that instead the text in the display
> > thread will always display above the input line, as opposed to in
> > the middle of it?
> This is not a problem of MzScheme, but a problem of the terminal.  The
> same will happen if you use any program that spits out stuff in the
> background.  One solution for this is to not use a terminal, but some
> program that will do things properly.  DrScheme looks a little
> confusing but it gets the job done.  If you want a more `raw'
> interface, you can use shell mode in Emacs.  In both of these cases,
> typing does not actually go to the program untill you hit enter, and
> in the meanwhile the program (DrScheme or Emacs) knows to show the
> output in the same place while collecting your input afterwards.
> Another possible solution is to redirect the error output someplace
> else and look at that using some other tool -- you can actually do
> that with any file, not just the error output.  For example, when
> debugging complex programs, I sometimes do something like this --
> define a debug printf function:
>    (define (dprintf fmt . args)
>      (with-output-to-file "/tmp/debug"
>        (lambda () (apply printf fmt args))
>        'append))
> Then I'll start one `debug' terminal and run "tail -f /tmp/debug" in
> it.  Finally, I run my program in the original window and all
> debugging output is shown in the debug terminal.
> --
>            ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
>                    http://www.barzilay.org/                 Maze is Life!
Sign-up for Ads Free at Mail.com

Posted on the users mailing list.