display vs write

Per Bothner per@bothner.com
Sat Feb 4 08:20:00 GMT 2012


On 02/03/2012 01:58 PM, Helmut Eller wrote:
>> * An HTML/XML obj can be insert into the output in visual
>> form if the console understands HTML.  (I have a prototype
>> of this based on the JavaFX webnode component I'm working on
>> in my Day Job.)
>
> Those don't seem particularly feasible/useful on a text terminal.

I don't want to design for lowest-common-denominator 1970s technology
- even if we all use it a lot.

>> * My idea for "Kawa-shell" functionality is to have expressions
>> that evaluate to process objects, which would be lazy strings.
>> This string would be the data from standard output.  Thus the
>> effect of displaying a process object would be to print out
>> the standard output - just like a regular shell.  Users would
>> find it confusing/annoying if shell output used quotes.
>
> Well, I find it confusing/annoying when it turns out that (a b c) is not
> a list with three symbols but a list with strings ("a" "b" "c").

I guess one could use display for top-level strings and not for
nested strings, but that seems even more awkward.

> Regular shells also have job control commands.  A shell without job
> control that doesn't let me background/stop/kill processes is very
> annoying.

I agree Kawa should handle ctrl/c (interrupt) smarter.  We need to be
able to kill run-away processes or infinite output, without killing the
entire Kawa process.  I've been thinking a bit about this.  It would seem
to require separating the UI tread from the compile+eval thread.
Using JVMDI may be reasonable.

General csh-style job-control seems inappropriate.  I'm mostly thinking
about using Kawa to replace shell scripts.  A little like scsh but higher
level, like a shell, rather than as a general Posix API.  Using a REPL
to run Unix commands would be possible, but it would be more verbose than sh
(though not as verbose as scsh).

On 02/03/2012 03:50 PM, Charles Turner wrote:
> We could just default to WRITE in text mode console, and
> DISPLAY in graphical ones.

I don't like that.  I don't think we want that big a difference depending
on the console type.  For one thing, consider the issue in terms of
documentation: The Kawa manual has some REPL examples.
-- 
	--Per Bothner
per@bothner.com   http://per.bothner.com/



More information about the Kawa mailing list