[plug] supressing JUST newline echo

Craig Ringer craig at postnewspapers.com.au
Thu Jul 15 01:02:51 WST 2004


Bernd Felsche wrote:

> stty -opost
> 
> will prevent output post-processing, including echoing of carriage
> returns. 

Excellent. I think that's pretty much what I was after.

> There are basically 3 modes of terminal control; raw, cooked and
> pickled. :-)

How very UNIX...

> I gather that this is some sort of interactive process where input
> mostly gets echoed to the user, but you don't want the cursor to
> move off the line when enter is pressed. Can't remember exactly how
> I did that at the time... seemed trivial after I figured it out. :-)

Yep. What I actually need it for is the 'INPUT' command of an 
interpreter for an ancient (1983) programming language called Plain 
English. I'm writing a new interpreter for it - in Python, because I 
know it and it'd take forever in far too many other languages. Why? 
Because we have a production system written in the language, and it 
looks like at least in the short term we're better off re-implementing 
the language environment than the program written in that language.

It's already 50% done - the "files" the language works with are now 
backed by PostgreSQL tables, with full support for transactions etc. Of 
course, that's not used to much advantage by the app, but that can be 
changed because I'll also be able to add new language commands once the 
interpreter is done. It'll just be nice to know, for now, that a client 
disconnect won't corrupt the database :-) like it can with the current one.

That way, we can blow the dust off the old app and keep it kicking for 
long enough to seriously look at the best options for re-implementing 
it. It's just getting too hariy running in it's current environment 
(this the Microsoft Xenix app I keep talking about).

Anyway, that's probably TMI really but it's so /fun/. It's also scary 
that its easier to reimplement the language than the app.

The new version is, unfortunately, 1/10 the speed on a machine three 
times as fast... but that's w/o Psyco, any effort to cache literals, or 
any optimisation at all. I suspect it'll be good enough in the end.

--
Craig Ringer




More information about the plug mailing list