tcl and editor

"John D. Mitchell" <johnm@cory.EECS.Berkeley.EDU>
Errors-To: brian@grot.starconn.com
Date: Thu, 3 Feb 94 15:20 PST
Message-id: <199402031912.LAA01852@cory.EECS.Berkeley.EDU>
X-Comment: Zoomer PDA List
Originator: zoomer-list@grot.starconn.com
Errors-To: brian@grot.starconn.com
Reply-To: <zoomer-list@grot.starconn.com>
Sender: zoomer-list@grot.starconn.com
X-Listserv-Version: 5.5 -- Copyright (c) 1991/92, Anastasios Kotsikonas
From: "John D. Mitchell" <johnm@cory.EECS.Berkeley.EDU>
To: Multiple recipients of list <zoomer-list@grot.starconn.com>
Subject: tcl and editor
Status: OR
Re: Tcl
>On the CDROM there are two Swat's, one is 600kb
>and the other is 100kb. Knowing that the tclTest compiles on the
>Sun to 368kb, I suspect the smaller swat is tcl-less.

Well, you're correct that there are two 'swat.exe's on the CD-ROM.  You're
also correct that the smaller one doesn't incorporate a Tcl interpreter.
Your implication that they are in whatever sense the same program is
incorrect.   The 'large' one is the Swat debugger that runs on the Host
machine and that you, the user, interacts with.  The 'small' one is the so
called 'swat stub' that runs on the Target machine (it runs GEOS and
controls the machine and system on behalf of the Swat debugger running on
the host by communicating over an RS232 serial cable).


>The good news is that tcl has been compiled for the geos OS by
>the good folks at geos, and the tcl.a library might be on the
>sdk disk or at least available from geosworks.

Nope.  You're mistaken.  The Swat stub is a regular old DOS program.  The
Swat debugger is a DOS-extended program (i.e., the program is built with
and runs under a 386 DOS extender in protected mode (to get access to
a lot of 'flat' memory).

As far as building a port of Tcl to run under GEOS, you pretty much need to
take everything in the Tcl core (which is pretty much everything except
some Unix specific shme).  Unfortunately, as I've stated before, given the
way that Tcl uses strings (and often very large strings), there's no simple
way to get Tcl to run under the segmented architecture.  Tcl expects to be
able to make and use very large strings and until Geoworks comes out with a
32-bit offset memory model ('flat' to most people) I just don't see a port
being worth anywhere near the effort it would take. :-(

Note that the UC Berkeley source's to Tcl is under the standard UC Regents
copyright.  It's free to be used pretty much any way one want's (i.e., it's
not like the GNU copyleft :-).  So whether it's used in a commercial
product or not is up to you.

There's an interesting discussion going on over in comp.lang.tcl about
making a truly awesome editor based on Tk (which is a package also written
by Prof. Ousterhout) that provides a GUI interface on top of Tcl.  You
might want to pick up on that discussion to get some ideas.

Hope this helps,
		John