Check out the new USENIX Web site. USENIX - Summaries


6th Annual Tcl/Tk Conference

SAN DIEGO, CALIFORNIA
September 14-18, 1998

Overview

by Clif Flynt

This was Tcl/Tk's "coming of age" conference. While previous years' papers reported preliminary results and showed working prototypes, this year's described systems that are now in production. The presenters of previous years' papers tended to be interested in Tcl as a neat little language. This year, the presenters looked at several alternatives and chose Tcl as their development vehicle because it would let them devote their energies to solving a particular problem rather than fight with the language; in retrospect, they still believe that Tcl was the best choice.

The quality of the papers was very high. According to one of the members of the program committee, this was the first year that they had to reject good papers just because there was no time to present them.

Interaction with the attendees is always one of the reasons for attending this conference, and this year was no exception. Without a doubt this is the friendliest of the professional conventions I attend.

The Paradise Point Hotel was an excellent hotel, with a marvelous staff, though the swimming pools, saunas, and golf courses were somewhat wasted on our crew of techie geeks who were listening to papers all day and attending BOFs all night. The one thing the hotel lacked was a focal point. The rooms are spread around in little beach houses, and there is no central lobby/bar area where attendees can congregate. Since the Resort is not in a downtown area, we were limited to the one bar that was open late for socializing. The night the bar had a live band, I just gave up and went to bed.

My personal high points of the convention (aside from the papers and general intellectual stimulation) were meeting the folks I've been corresponding and working with for the past year face-to-face, and meeting folks who learned Tcl with my TclTutor package. It's a thrill to see folks that I virtually taught the language to attending the conferences. I'm really looking forward to the day when someone who learned Tcl with TclTutor delivers a paper at the conference.

KEYNOTE ADDRESS

Tcl/Tk, Agents, and Makin' Pictures:
A Whirlwind Tour

Michael B. Johnson, Pixar

Summary by Max Stevens

In a very entertaining talk, Michael Johnson told how Tcl has played a role in projects he has been involved in over the last few years. He began with his time as a student in the Media Lab at MIT and moved right through his years at Thinking Machines to his current work as a media arts technologist at Pixar, explaining in each case how Tcl has been a benefit.

Johnson began using Tcl back when it was almost still a gleam in Dr. Ousterhout's eye. After reading a first draft of the first paper on Tcl, Johnson picked up Tcl 3.0 and started using it. The first problem he encountered was very serious but in fact had little to do with Tcl itself: It wasn't Lisp, which is a big problem when you're working in the Lisp-dominated Media Lab at MIT. But he needed an embeddable language that would work, so he persevered with Tcl and gained the status of weird machine guy, since he was always able to get his projects working on new hardware quicker than anybody else, thanks to Tcl.

Johnson eventually moved on to the graphics group at Thinking Machines, where he was responsible for flashy demos for clients. Tcl proved once again to be incredibly useful. Demonstrating that "Tcl just worked, it did its job, and got out of the way," he used it for several smaller tasks such as controlling access to 16MB of memory shared between an SGI and a connection machine. Of course, Johnson was also "big on leveraging the work of people smarter than [him]" and thus used Tcl to create an interface builder in NextStep by subclassing objects of the NextStep interface. Tcl, through remote evaluation of commands, was also used to distribute computing load across several machines.

All of the user-interface elements in Johnson's work for his thesis had Tcl code behind them; this made working with rotational and translational matrices of an object, for example, very much easier. In this model, "behaviors" would be created for an object, causing Tcl code to be executed that updated the model appropriately. The result was very simple visual programming with Tcl -- each body part has a Tcl variable and value, and by dragging and dropping the right body part, you build a 3-D character that evaluates the Tcl code and renders the image.

When Johnson moved to Pixar, he of course brought Tcl with him and immediately began indoctrinating his coworkers by getting the hackers to start playing with it. The result is that Tcl/Tk has been used on just about everything that has been produced at Pixar in the last four years, including Toy Story and the academy-award-winning short Geri's Game, which he showed to the attendees. Indeed, Johnson had nothing but praise for Tcl, saying that he was a "pretty darn satisfied customer of Tcl/Tk." Besides, the user community beats that of Lisp any day.

Session: Applications

Summaries by Clif Flynt

NBC's GEnesis Broadcast Automation System: From Prototype to Production

Stephen J. Angelovich, NBC Broadcast and Network Operations; Kevin B. Kenny and Brion D. Sarachan, GE Corporate Research & Development

Kevin Kenny opened this talk with an NBC promotional video describing the new all-digital NBC Broadcasting Operations Center. Kenny then described the "proprietary user-friendly software" (mentioned in the video) that makes it all work.

This was the third paper delivered to the Tcl/Tk community as this project has progressed. The first paper described how Tcl/Tk was being used to prototype the user interface as people were trying to figure out what they could do with the new digital technology. The second paper described the continuing development as the group created prototypes with more and more functionality and gathered more and more feedback.

This year, the system is in place at NBC, handling almost all of the daily broadcasts to the U.S., and people are still learning what can be done and asking for new features. Fortunately, the design of the system and the facility with which new Tcl functionality can be created make the continuing evolution of the system relatively painless. The original plan had been to develop the prototype with Tcl/Tk and then build the real system from more traditional components. However, like other presenters, Kenny and his group found that Tcl "just worked," so they never needed to recode the system.

Kenny also discussed several of the problems his group ran into while developing a package designed for 7x24 operation with a language that was really designed for small scripts. These ranged from performance issues to memory leaks. The performance issues were easily solved with the traditional Tcl approach of recoding the compute-heavy functions in C (or in this case, C++) and creating a new Tcl command to access the fast code. The memory leaks were a bit trickier. For example, they found that the underlying data structures that are allocated when a tag is created in a text widget do not get deleted when the tag is no longer in use. To solve this memory leak, they created a pool of tag names and used names from that pool, rather than generate unique tag names.

Kenny concluded his talk by pointing out that the flexibility of Tcl/Tk was what made the project work.

An Extensible Remote Graphical Interface for an ATM Network Simulator

Michael D. Santos, P. M. Melliar-Smith, and L. E. Moser, University of California, Santa Barbara

Michael Santos discussed the Tcl/Tk-based display that he constructed for a network simulator. He briefly described the Thunder & Lightning 40 Gbit/sec ATM network. His project is defining protocols to best utilize this high-speed network. At this network's operating speeds, the time to send a signal across the country at light-speed represents a large chunk of network capacity. For example, reserving space for a message by generating a request for space and then waiting for an acknowledgment could take longer than simply transmitting the entire message, simply because of the time it takes for a signal to go from San Diego to Boston.

Like other presenters, Santos is interested in Tcl not simply for the sake of the language; he uses Tcl because it lets him concentrate on his actual problem -- getting data onto the wire -- instead of the language he's using to implement the solution.

He pointed out that machine resources on a network simulator are limited and should all be dedicated to the simulation. If you can avoid running X Windows and a GUI-based monitor, you have more resources for your simulation. But GUI-based monitors with charts and graphs are very useful tools for monitoring a system's behavior. He designed his system so that a small monitor lives on the simulator, and the user interface lives on a remote system and talks to the simulator via sockets. As a happy by-product of this design, the GUI monitor can also be used with the actual network switches.

One of the wins he got from Tcl and Tk was the extensions that would do what he needed. For example, by using BLT he got a chart recorder working much more quickly than would have been possible otherwise.

WinACIF: A Telecom IC Support Tool Using Tcl/Tk

David Karoly, Todd Copeland, and David Gardner, Advanced Micro Devices

David Karoly described how Tcl is used at AMD to support the SLAC (Subscriber Line Audio-Processing Circuit) family of programmable codec/filter IC chips that are used to build telephone linecards that interface between analog telephone and digitally switched networks. These chips perform A/D and D/A conversions, filter, compress, and expand the analog signals.

The chips can be programmed to control line power feed, ring, signalling and test functions. This gives hardware designers a great deal of flexibility, but with that comes complexity.

Tcl and Tk let the group of hardware engineers who best understood the chips design and construct a package for design engineers to use to configure and bench-test their boards. This package consists of three Tcl extensions to interface with the SLAC chips and the board being tested, and a data-driven GUI that configures itself to match the SLAC device being analyzed.

The users of this package are the silicon design team and AMD's customers. WinACIF provides them with a GUI for interacting with all the programmable features of the SLAC devices. However, running all the tests they need to do on the latest SLAC devices requires a command language. From WinACIF, the users can create and execute Tcl scripts to automate these tasks.

When Tcl was extended with the libraries that program the SLAC devices, it provided the ideal solution. There was no need to develop a command language when Tcl provides a complete interpreter. Tcl is acceptable to the users because of its resemblance to other shell languages.

The WinACIF developers chose Tcl/Tk because it was a development platform that let them devote their energies to the problem of programming SLAC chips, rather than dealing with the complexities of developing MS-Windows applications.

Charity Telethon Supported by Tcl/Tk

Dave Griffin, Compaq Computer Corporation

Dave Griffin works with his local high school to help run their annual charity telethon auction. Last year, they automated this process using Tcl and Tk, and he described how this worked. Two-word summary: quite well. Griffin's talk was aimed at the Tcl novices in the audience, showing how Tcl can be used "straight-out-of-the-box" to get from a problem to a solution in short order.

This high school, believe it or not, has two television studios, along with a network of PCs. The need was to coordinate the two studios, people taking bids over the phone, and Web interactions, and then to maintain the database of items, winners, and their bids, so that items could be delivered to the right recipients after the auction was complete.

The application was designed as a message-passing distributed system, with a master script that received and delivered messages, and various child scripts living on PC-class machines that sent their requests to the message-passing master script. The individual scripts were all small and simple. Griffin and his associate built a teleprompter using a simple wish script and large fonts, wrote a small memory-based database server (with journalling), and a message-passing controlling script. The database server, for example, required about 850 lines of code and generated reports in HTML to be read and printed with a browser. The Web interface was created using the Tcl Web server.

Griffin provided several tips to script writers, including: Design for dynamic reload -- scripts should check to see if a file is already open, etc., before attempting to open a file or create a window. This allows you to simply source a modified script and keep running. This is a great boon during debugging, and it lets you fix bugs on the fly. The Tcl namespace command makes it easy to create code modules.

INVITED TALK

Tcl/Tk Update

John Ousterhout, Scriptics Corporation

Summary by Eric Melski

Ousterhout discussed the current state of Tcl/Tk and future routes for the language. The talk was mixed with the popular "Ouster-votes," in which Ousterhout took rough polls from the audience on various topics.

He first examined what has happened with Tcl/Tk in the past year. At the top of the list was the move from SunScript to Scriptics Corporation and the release of Tcl/Tk 8.0 in August 1997. Ousterhout also discussed the new Tcl/Tk 8.1 core, which, he explained, was on hold until Scriptics could afford to develop it. New features include internationalization, thread safety, and improved regular expressions. An Oustervote revealed that about 10% of the attendees needed these new features.

The most interesting part of the talk was the statistical data on Tcl/Tk downloads, users, and applications. Over the past year, the number of Tcl/Tk downloads has roughly doubled. Most downloads were by Windows users; UNIX users were responsible for the next-largest portion; Macintosh downloads were the smallest of the three. Of the approximately 10,000 weekly downloads, 35% were by beginning users; 28% were by intermediate users; and 16% were by advanced users. 41% were for corporate use, and 24% were for hobby use.

Ousterhout noted that Tcl has become popular in "vertical" markets like dynamic Web content generation, finance, automated testing, and electronic design automation. A number of large companies use Tcl in these capacities, including AOL, CNet, Cisco, Motorola, and others.

Next, Ousterhout briefly described the Scriptics business model. He plans to balance open-source and commercial development. The core will remain free, but Scriptics will develop commercial Tcl/Tk development tools and provide Tcl/Tk support, training, and consultation. The first commercial product is TclPro, a step towards an IDE for Tcl. It features a debugger, syntax checker, and compiler. Future plans include adding a profiler, a GUI builder for Tk, and project-management tools.

Finally, Ousterhout discussed future plans for the Tcl/Tk core. He said that work was resuming on Tcl/Tk 8.1, and that he was already thinking about features for Tcl/Tk 8.2. A survey revealed that most users wanted drag-and-drop support and new widgets for Tk. Ousterhout said that many improvements to Tk were likely to come.

Ousterhout concluded that Tcl usage is continuing to grow rapidly. In an open forum attendees raised several issues, including the need to incorporate certain patches into the Tcl/Tk core, the need for printing support, and the need for better thread support.

Session: Object Technology

Summaries by Clif Flynt

The Tycho Slate: Complex Drawing and Editing in Tcl/Tk

H. John Reekie and Edward A. Lee, University of California, Berkeley

H. John Reekie described and demonstrated the Slate package, which extends the Tk canvas widget with objects better suited to implementing complex graphical editing and visualization than the standard primitive canvas objects. This package is written in pure Tcl (no C code) and allows a programmer to create complex canvas objects composed of several graphics primitives (mega-items). These mega-items support the concept of "shape" and may be associated with an "interactor." The "shape" facility allows an object's individual coordinates to be queried and modified (deforming the shape of an object) easily. The "interactors" provide a mechanism for linking higher-level event streams to an object. For example, the "follower" interactor follows the mouse cursor. This provides a simple mechanism for developing complex user interaction, such as graphical selection and drag-and-drop actions.

The Slate toolkit includes several new primitives such as 3-D boxes with labels and SmartLines. SmartLines are lines that know how to draw themselves from one object to another and can keep a label in an appropriate spot when the objects are moved and the lines need to redraw themselves.

This package looks like a very useful toolkit for developing graphical programming interfaces, flowcharting tools, network diagrams, etc. It's available at <https://ptolemy.eecs.berkeley.edu/~johnr/code/slate/>.

Iclient/Iserver: Distributed Objects using [incr Tcl]

Lee F. Bernhard, Bell Labs Innovations for Lucent Technologies

Lee F. Bernhard described a framework for sharing [incr Tcl] objects between remote processes in a client-server application. The Iclient/Iserver package allows a server written in [incr Tcl] to export [incr Tcl] objects. Clients written in [incr Tcl] can import these objects into their process and manipulate them as if they were local. In actual fact, the object continues to reside in the server process, and a stub is built in the client. The appearance of the stub, however, is identical to the parent, allowing the programmer to develop a client as a standalone application, and then easily convert it to a client.

This framework falls between the full-featured (complex) CORBA standard, and the low-level RPC primitives supported by Tcl-DP and the Tcl socket command. The Iclient/Iserver package handles low-level protocol problems like concurrency, locking, and watching variables (to trigger an event when a variable is modified by another task) in a way that is transparent to the application writer.

Data Objects

George A. Howlett, Bell Labs Innovations for Lucent Technologies

George Howlett presented a mechanism for allowing Tcl applications to construct high-speed special-purpose data objects that are more complex than the primitive Tcl data constructs, but with a more efficient implementation than writing a complex data object in pure Tcl.

Howlett described the performance problems with the BLT graph widget using lists to hold the graph vertices. These difficulties led led him to add vectors to the BLT package. The techniques he used to create the vector array and make it act like the traditional Tcl data constructs provide a good example of how data objects should be separated from display and calculation code. The vector array has a high-speed (native) interface to interact with the C graph code, and a Tcl API interface to expose to the scripts.

Separating the data interface from the display and calculation code makes both sets of code simpler, allows simpler interfaces to be written for the data and calculation APIs, and allows the data constructs to be used by other display/calculation modules. Written out in simple English, this is a simple concept. But it is a design consideration that is so often overlooked when you're designing a package and thinking of the package as a unit, instead of a collection of parts, that it bears repeating early and often.

Session: Testing and Debugging

Summaries by Clif Flynt

The extensible nature of Tcl and the ease with which Tcl applications can be modified make Tcl a good vehicle for developing test applications. The extensible nature of Tcl lets you add your custom driver code to the interpreter easily, while the available extensions provide analysis features. The number of papers in this session, and the number of testing- and simulation-related papers in other sessions, indicates that Tcl is being widely used in this area.

A Tcl-based Multithreaded Test Harness

Paul Amaranth, Aurora Group, Inc.

Paul Amaranth described a package developed by Aurora Group to perform load and regression testing on the Merit AAA Server, an authentication server based on the RADIUS protocol. Merit had a few low-level validation tools for use during development, but did not have a framework for testing the product under load or for long-term regression testing. Problems that needed to be addressed included: (1) The engineers are interested in developing RADIUS servers, not learning test tools and writing test scripts; (2) Test environments always need to be modified as new problems are discovered and new tools are developed. Tcl was chosen because it is so easily extensible and can be used to link the existing test packages. However, writing tests in pure Tcl violates requirement (1), and writing a test language violates requirement (2), since test languages tend to be rather rigid and nonextensible. The solution was to create templates that provide the setup and interfacing code. The engineer need only merge in required code to perform a given test. The 15,000 lines of RADIUS interface code were merged into the Tcl kernel as an extension. The multithreaded executive and template parser were written in pure Tcl code. Tcl is not the obvious language for these types of applications, but it has worked well, and the package is now being used in production.

Using Tcl/Tk for an Automatic Test Engine

C. Allen Flick, DSC Communications Corporation; James S. Dixson, Silicon Valley Networks Corporation

C. Allen Flick described a system developed at DSC to perform automatic testing via RS-232 and GPIB connections to the System Under Test (SUT). The immediate need was to upgrade an inhouse-written package that had been developed 10 years previously. Tcl and Expect allowed them to exceed the capabilities of that package with about two weeks' effort.

Tcl supports building procedures on the fly, and this feature provided the group with a mechanism for creating test objects as necessary. The test object provides a framework that a nonprogrammer can use to construct a test for the DSC products. In order to support both batch and attended operation, the test framework is designed to run with only stdin/stdout, and a GUI is wrapped around the package to run it within an attended mode. The extensibility of Tcl allowed them to add hardware-specific interface code easily.

Their implementation allows tests to be written in a modular fashion and evaluated within the "TestExpert" test management system from Silicon Valley Networks. Tcl's support for running scripts on multiple platforms means that the tests used in engineering can be used by the manufacturing group, and finally by field engineers.

wshdbg -- A Debugger for CGI Applications

Andrej Vckovski, Netcetera AG

Andrej Vckovski described some of the difficulties in debugging CGI applications and how the websh debugger can be used to debug Tcl-based CGI scripts such as those running within the websh framework or written with NeoWebScript or Don Libes's cgi.tcl.

The many mechanisms for generating dynamic Web content include CGI scripts, ISAPI and NSAPI modules for the Apache Web server, and Java servelets. CGI scripts are the original mechanism for generating dynamic Web pages. CGI scripts have some advantages, including stability, since each time a CGI script runs it runs as a separate process; the languages are vendor- and platform-independent; and CGI scripts behave the same when run interactively as when they are invoked from a Web server. Disadvantages of CGI scripts include the overhead of the fork/exec call, controlling the number of open IP ports, security concerns, and, of course, debugging the scripts.

The wshdbg debugger is a Tk-based remote debugging package with windows to display the environment variables, command-line parameters, and information about the current state of the script being debugged. The script being debugged must include a stub with the remote interface code, but otherwise behaves in a normal manner. The debugger allows you to set breakpoints and variable traces, at which point the debugger takes control of the script, and you can examine the state of the CGI script, evaluate Tcl commands in the CGI script environment, and view a log of events.

People familiar with xxgdb and dbxtool will find this a rather stripped-down debugger. People who have been struggling with "printf" debugging for their CGI scripts will appreciate having a debugger that gives them the basic interactive debugging tools.

One of the nice quotes from this talk was: "Software engineering in the context of Web applications is sometimes still far away from state of the art." This package starts to move CGI script debugging out of the distant past.

Session: Web Technology (Server-Side)

Summaries by Clif Flynt

NeoWebScript: Enabling Web Pages with Active Content Using Tcl

Karl Lehenbauer, NeoSoft, Inc.

Karl Lehenbauer has been active in the Tcl community for almost forever. In this talk he described how the NeoWebScript package makes creating active Web content fast and easy.

Since Apache is designed to be extended and Tcl is designed to be embedded, it was relatively easy for NeoWebScript to leverage the power of these platforms to provide a secure, efficient server-side scripting language. NeoWebScript supports normal server features like cookies and SSL, as well as features like parsing form data, sending mail from the server, posting news from the server, embedding rotating banner ads and counters, and accessing databases. NeoWebScript allows a programmer to create forms on the fly with a forms package that uses sets of key/value pairs, and can parse the filled-out form into an associative array using the keys as array indices.

NeoWebScript is in use at about 1,200 sites and is available from <https://www.neosoft.com/neowebscript>.

TclXML: XML Support for Tcl

Steve Ball, Zveno Pty Ltd

Steve Ball described his work creating an XML parser for the Tcl language. XML is gaining support as a text-description language. It can be considered (in a rough sense) as the good parts of HTML and SGML. An XML document can embed both display instructions (as HTML does) and data descriptions. With the wealth of data that can be in an XML document, there are multiple methods that one may wish to use to view the document. You may want to ignore the data descriptions and only use the display instructions (for a browser-type application), or ignore the display instructions and only evaluate the data descriptions (for instance, if you wished to make a database of all chapter headings).

TclXML uses James Clark's nonvalidating XML parser to add XML parsing to the Tcl language. Ball's previous projects (Plume, the Tcl Web Browser) parsed a document into a nested list. For the XML project he's abandoned that approach in favor of a Tcl-handle-based architecture. The problem with nested lists was that it is difficult to walk up and down a list, and the DOM (Document Object Model) requires that a list be dynamic, not static, as worked for his previous parsers.

TclXML is available at <https://www.zveno.com/zm.cgi/in-tclxml>. James Clark's Expat XMS Library is available at <https://www.jclark.com/xml>.

Creating High Performance Web Applications using Tcl, Display Templates, XML, and Database Content

Alex Shah and Tony Darugar, Binary Evolution, Inc.

Tony Darugar described Binary Evolution's Velocigen package for generating dynamic Web pages. The Velocigen package solves the problem of fork/exec overhead in CGI scripts with a client-server model. The Velocigen engine runs separately from the Web server to service CGI requests. Velocigen uses Tcl to link the database engine and Steve Ball's TclXML, allowing the system to extract an XML document from the database, parse the XML document into a tree, and finally map the XML-tagged information to HTML tags. One of the advantages of this technique is that by divorcing the content from the presentation you can modify the display without modifying the base data simply by changing the XML-to-HTML mapping functions.

Darugar demonstrated a technique that can be used to describe content with XML using a carrot cake recipe as the example. In this example, the ingredients are tagged as <ingredient>, making it easy for an automated engine to parse the page for content and index the content in a database. When the page is displayed, the <ingredient> tags are mapped to HTML tags.

Generating HTML pages on the fly with Velocigen is not as fast as having pre-generated HTML pages, but is much faster than generating pages with CGI scripts. More information on this package is available at <https://www.BinaryEvolution.com/>.

Session: Web Technology (Client-Side)

Summaries by Clif Flynt

The Tcl plug-in for Netscape was released a couple of years ago. There has been a need for more development in this area, and these papers show that people have been working to extend Tcl's capabilities in this area.

WebWiseTclTk: A Safe-Tcl/Tk-based Toolkit Enhanced for the World Wide Web

Hemang Lavana and Franc Brglez, North Carolina State University

Hemang Lavana described the WebWiseTcl and WebWiseTk packages that extend the Tcl/Tk plug-in to be
more useful for Web programming
applications.

The Tcl/Tk Netscape plug-in released by Sun Research Labs had some restrictions that were due to security concerns. The most limiting was that top-level windows and menus were not supported because (1) new top-level windows can fill up a user's screen; (2) a menu can be torn off to become a new top-level window; and (3) a menu does a global grab of events while it is displayed. Allowing the creation of new windows and allowing an application to grab all events provides mechanisms for denial-of-service attacks.

WebWiseTk solves the new-window problem by rerouting requests to create a new top-level window into a procedure that simulates creating a top-level window by creating a set of frames. This restricts the new top-level windows to the area of the original browser window and removes the possibility of filling a screen with new windows. The problem of the global grab is solved by restricting the grab function to local grabs. Grabbing only events destined for a Tclet does not provide a mechanism for disrupting any other tasks.

WebWiseTcl allows Tclets to be written into several smaller, manageable script files, by modifying the auto_load mechanism to "source" files from a URL (Tclet's host site). A few commands, such as exec, load, and send, cannot be implemented without compromising security of the plug-in. The goal of WebWiseTcl/Tk is to support the complete remainder of the Tcl/Tk command set while maintaining security. They have achieved this goal. Using WebWiseTclTk, developers can now also "wrap" existing multi-window Tcl-based applications for immediate Web access as Tclets -- providing full capabilities of the original application but without rewriting the existing Tcl code.

More information on this package is available at
<https://www.cbl.ncsu.edu/software/#WebWiseTclTk>.

Internet-based Desktops in Tcl/Tk: Collaborative and Recordable

Amit Khetawat, Hemang Lavana, and Franc Brglez, North Carolina State University

Amit Khetawat described and demonstrated the "ReubenDesktop," an application suite that allows several users on the Internet to share drawing and message windows, record the interaction, and later replay this session.

The collaborative desktop includes a primary drawing surface, which can only be accessed by a single user at a time, and message exchange boxes, which all users can use for broacasting a message to all other users. Access to the drawing surfaces is controlled by a token, which can be passed from user to user. The holder of a token can modify the drawing surfaces, at which point the master copy of the surface is updated. The session master then updates all the other instances of the surface.

These updates are performed by sending Tcl scripts to the participating desktops. The Tcl commands to update a surface are also saved to allow a session to be replayed. All users are allowed access to the message exchange box so that users can communicate with one another simultaneously.

Khetawat showed an example of how the ReubenDesktop can be used to design a custom IC chip. In this situation, the final customer, the IC design staff, and the manufacturing site are frequently separated by thousands of miles. The ReubenDesktop can allow these users to work together in realtime, or to review the actions of others by replaying a
session.

More details on this package are available at <https://www.cbl.ncsu.edu/software>.

Creating a Multimedia Extension for Tcl Using the Java Media Framework

Moses DeJong, Brian Bailey, and Joseph A. Konstan, University of Minnesota

Moses DeJong described techniques for merging Tcl and Java using the Java Media Framework as an example of what the Tcl community can gain from this merging of technologies. The Java Media Framework provides a robust multimedia engine, functionality the core Tcl interpreter lacks. Tcl users can leverage this support using TclBlend on Jacl.

The Tcl interface to the JMF allows a programmer to add multimedia support to a Tcl application with just a few lines of Tcl code. DeJong demonstrated a simple script which linked playing a sound to clicking a button.

Java extensions are more platform-independent and less prone to memory leakage than the traditional C-code extensions. However, the 1.0 Tcl/Java package from Sun has some deficiencies. The primary problem is that the object-type information is lost when a Java object is exported into the Tcl interpreter. This poses a problem for tracking inheritance and overloaded methods.

DeJong has developed code that overcomes these deficiencies. That code has now been merged into TclBlend and Jacl 1.1. The JMF extension is available from <https://www.cs.umn.edu/~dejong/tcl>, and the new TclBlend and Jacl are available from <https://www.scriptics.com/java>.

Visualizing Personal Web Caches
with Caubview

Charles L. Brooks, GTE Internetworking; Murray S. Mazer, Curl Corporation; Frederick J. Hirsch, The Open Group Research Institute

Charles Brooks described Caubview, a package for viewing the HTML page caches created by the CaubWeb system. The CaubWeb system is designed to provide disconnected Web access by pre-fetching and caching HTML pages. The CaubView package allows the developers and users to analyze how well CaubWeb is doing at predicting what pages will need to be fetched.

Tcl/Tk was chosen as the platform for this development partly because of the "Publish or Perish/Demo or Die" culture rampant in today's research and development departments. This choice has been a mixed blessing. On one hand, Tcl/Tk has enabled the group to leverage other people's work by using extensions to gain required functionality, instead of needing to write all the code from scratch. On the other hand, extensions lag the Tcl core, there is no library of critical analysis of the existing extensions, and sometimes an extension becomes orphaned when the original author moves on to other tasks.

Tcl/Tk met the need for a cross-platform development environment, and the code has ported easily across the UNIX and Windows platforms. But the Windows platform support is still growing and changing slightly, and ports between revisions of Tcl/Tk chewed up more time than the group would have liked. Overall, using Tcl/Tk has allowed the group to develop and test different methods of presenting the cache information to users, rather than worrying about

language issues, but Brooks feels that the Tcl environment could be better.

More information on the CaubWeb project is available at
<https://www.camb.opengroup.org/RI/secweb/dis_clients/oasis.html>.

Work-in-Progress Sessions

Summaries by Max Stevens

Demonstration of TclPro: Development Tools for Tcl

Ray Johnson, TclPro Engineering Manager

This was one of the most anticipated WIPs, since it included a demo of the debugger in the newly released TclPro product from Scriptics. It began with a short description of features for each of the products in the TclPro package, and moved into a well-received demo of the debugger on Windows NT.

tkTable v2

Jeffrey Hobbs, Siemens

tkTable is a complex mix of entry, text, and listbox widgets, and is a feature-packed powerful widget that works on all platforms that Tk does. Hobbs described some of the main features and limitations of the table, ending with a short discussion of some of the future directions for tkTable, including PostScript output.

Tclish

Michael McLennan, Bell Labs Innovations for Lucent Technologies

The Tcl Install Shell originated from the need for an integrated install program for the Tcl Blast CD, but it was designed to be very generic and powerful. Features include a configurable list of packages, dependencies noted among those packages, and the ability to patch both ASCII and binary files, all packaged in a user-friendly GUI.

New Features in BLT

George Howlett, Bell Labs Innovations for Lucent Technologies

The new features in BLT include a powerful new hierarchy widget, as well as new features for images, such as arbitrary scaling. A tabbed notebook widget was also added with a feature to tear a tab page out of the widget into a new top-level window and to put it back in later on; this was very well received by the audience. For future work, he mentioned in passing that he was working on a solution to one of the more frustrating aspects of Tk -- the lack of a printing widget.

Patching Tcl/Tk Activities

Leo Schubert, Brückner & Jarosch

Leo Schubert described some of the core patches used at Brückner & Jarosch. The most impressive of these include a patch for Tk 8.0 that speeds up most applications by a factor of 2 to 5, giving a big performance boost especially to canvas and BLT users. In addition, work was done on "winico," an extension for Tk 8.0 on Windows that allows users to set the top-level icon in the upper left corner of the window. He hoped to get these changes into the core. For more info, see <https://ftp.bj-ig.de/pub/tcltk>.

Birds-of-a-Feather Sessions

Summaries by Max Stevens

[incr Tcl] - Object Oriented Programming

The introduction of version 3.0 of [incr Tcl] figured prominently in this BoF, led by the creator of [incr Tcl], Michael McLennan. The main new feature that met with great approval is the ability to dynamically load [incr Tcl] as an extension into Tcl 8.0.3. And, with [incr Tcl] taking advantage of the byte code compiler and being distributed with the TclPro package from Scriptics, [incr Tcl] may soon become a standard part of all new Tcl programs. In the second half of the talk, McLennan went through some of the porting issues from previous versions of [incr Tcl] to the new version 3.0. Most of these involved modifying scripts to use the new namespace facilities in the Tcl core, since the namespaces were implemented slightly differently from how they were in [incr Tcl].

The BoF ended with a few ideas for the next major release of [incr Tcl], and then broke up to allow McLennan to replace his ever-present yet now empty bottle of Mountain Dew.

For more information on [incr Tcl], see <https://www.tcltk.com/itcl>. For information on porting issues to itcl 3.0, see <https://www.tcltk.com/itcl/itcl3-port.html>.

Scriptics BoF -- Jacl and Tcl Blend

Led by Bryan Surles from Scriptics, this BoF began with a short explanation of the differences between Jacl and Tcl Blend, and led into the motivation behind the products and where they are headed in the future. Jacl, a Tcl interpreter written entirely in Java, is perhaps three-quarters finished and is designed to give the predominantly Java programmer a scripting interface. Tcl Blend takes a slightly different approach by wrapping Java APIs, giving the more traditional Tcl programmer access to Java and allowing for easy integration between C and Java programs. Both were designed with the idea that Tcl scripts could leverage the cross-platform nature of Java and take advantage of Java's growing popularity.

The discussion focused on the ability of these products to run as applets, and in doing so perhaps replace the functionality of the Tcl plug-in for Netscape. Neither Jacl nor Tcl Blend works as an applet yet, since the restrictions imposed by the Java security safeguards make this a tricky prospect. Regardless, many participants emphasized that this problem must be solved, since the lack of applet support was keeping them from switching to Jacl and Tcl Blend from the plug-in. With the release of TclPro 1.0, it's expected that Scriptics will be able to spend more time on Jacl and TclBlend in the coming months to solve this and other issues.

For more information, see <https://www.scriptics.com/java>.

INVITED TALK

Yacc Meets Tk?

Steve Johnson, Transmeta Corporation

Summary by Eric Melski

Steve Johnson discussed the possibility of using a Yacc-like tool to rapidly develop graphical user interfaces in much the same way that Yacc is used to create command-line interfaces.

Ten years ago, most programs used text interfaces. Each interface had its own syntax, and little prompting or user help; errors drew "Syntax Error" messages from the program. Yacc was a powerful tool for creating these interfaces, but they were hard to use. By three years ago, most programs had a GUI. Menus and icons were easier to use, choices were prompted, and there were no "Syntax Error" messages. GUIs were clearly an advance.

Now, however, we are slipping. Menus and icons are becoming more complex, and many visible choices are in fact illegal. "Syntax Error" messages have been replaced by a loud "BEEP!" Modern interfaces have a more difficult task than earlier interfaces. They have to deal with different classes of users, from beginners to experts, and many interfaces have multiple screens and multi-level menus. Johnson proposed using a Yacc-like tool to create GUIs based on a grammar, allowing the easy design of properly functioning GUIs that can accommodate a wide range of users.

He made a convincing argument for the use of a grammar as the basis for the interface. There is a lot of theory about grammars, and the grammar can document the interface and enforce consistency. Unfortunately, traditional grammars are inadequate. Temporary events are difficult to model, as are state changes that affect the interface. Instead, Johnson suggested a token-based grammar, in which events such as key and button presses would be tokens. Widgets would produce events, and the grammar would allow legal events. The grammar would automatically take care of making only valid options visible.

A GUI grammar, therefore, would consist of five parts: TOKENS, symbols, <booleans>, {actions}, and rules. TOKENS correspond to events; symbols represent states or goals in the interaction; <booleans> are used to reflect state information such as the system state or the user experience level; {actions} are fragments of code that are executed when rules permit; and rules are similar to those in a traditional grammar.

His proposed tool, GUYACC, is now only an idea. However, its construction should be straightforward. Building rule sets is something with which many are familiar, and many of the ideas behind the new grammar are just extensions of the traditional grammar. Johnson is interested in taking on the challenge of writing GUYACC, but he wants help from others in the community.

Session: Language Issues

Summaries by Max Stevens

Using Content-Derived Names for Package Management in Tcl

Ethan L. Miller and Kennedy Akala, University of Maryland, Baltimore County; Jeffrey K. Hollingsworth, University of Maryland, College Park

Installation and distribution of programs are big problems. There is no easy way to perform these tasks, even though they are routinely done. Whether it's installing a new version of a program over an old one, thereby removing the old version before the new one even works yet, or changing the third-party software packages that are required for the product to work properly, there is no known easy solution. Ethan Miller presented a method of solving these problems through the use of content-derived names for package management in Tcl.

The idea is simple. Instead of human-readable names, packages are given a digital signature (or a cryptographic hash value) for their name. This way the integrity of the package can be assured, since upon receipt of the package you can simply run the file through the same hash function and compare the result to the file name. If they match, the package has not been tampered with. Once you have the root package (which must be trusted), it will contain references to other packages it requires. These references will again be in the form of digital signatures, so you know that if you get a package of the same name, it can be trusted as well. This allows you to distribute the root package of a program, and from that all of the dependent packages can be retrieved from the network automatically. The process is recursive, so even the new packages retrieved automatically can have their dependent packages automatically retrieved until all necessary packages are in place. In addition, since digital signatures are guaranteed to be unique, new versions of products can be installed in the same directory as old versions without fear of name clashes.

In order to distribute Tcl software using this technique, you need to follow only a few rules. First, you must use namespaces for all of the packages you write. Second, a package must be encapsulated entirely in one file. Third, you must be careful to avoid mutually recursive packages; the dependency graph must be a directed acyclic graph. Finally, use external packages as you need them. When it comes time to distribute your code, simply run a postprocessor over all your files that will generate the digital signatures, replace the embedded package names with these signatures, and then rename all the files with the appropriate signatures. Thereafter, distribute the root package and make sure all dependent packages are available.

Miller has this working for Tcl packages and is nearing completion on a system that works with Linux binaries. He hopes to extend these ideas to more languages in the future and to streamline the process of generating and distributing the files. For more information, see <https://www.csee.umbc.edu/~elm/Projects/CDN/>.

Using Tcl to Rapidly Develop a Scalable Engine for Processing Dynamic Application Logic

Greg Barish, Healtheon Corporation

Greg Barish described an Internet-based Tcl application in use at Healtheon Corporation that uses a rule-based system to manage health benefits for employers. The idea was to have a system that is oriented toward the individual, with rules executed on a per-individual basis (such as "if {$age > 21} {$eligible = 1}").

The requirements for this system were quite demanding. First, it had to be very fast, since it was expected that the application would undergo periods of extremely high use by many employers at once; with each employer having to update benefits for several employees -- each having potentially several rules to be evaluated -- a speed lag was not acceptable. Second, since benefit management could quickly change (e.g., through the addition of several new rules at once), an extensible and easily scalable solution was required. Finally, an interface to a database was required in order to access the necessary information.

The speed issue was addressed by writing speed-critical extensions in C and adding them to the Tcl interpreter. As always, there was a tradeoff here between the specific commands written in C, which would be much harder to maintain but faster, and the more generic commands written in Tcl, which are easier to understand and maintain but not as fast. The extensibility and scalability problems were primarily dealt with through a careful design and architecture of the overall program. This included the use of concurrent execution of rule evaluators, called "motors," in order to maximize the number of rules that can be evaluated at once. The database interface was already supplied through Tcl extensions such as OraTcl and SybTcl.

The end result was a rapidly developed rule engine that successfully met all criteria. The rapid development time allowed the company not only to quickly change the implementation to match changing design requirements, but also to reallocate resources quickly to other tasks such as system integration. The ease in extending Tcl was another benefit that aided in massaging the system toward the final design specifications. As for drawbacks of using Tcl, only one was noted, and it was expected: a slight hit in speed. However, the time to develop a unique system in a lower-level language such as C would have taken precious resources away from equally important tasks such as overall system integration.

Using Tcl to Script CORBA Interactions in a Distributed System

Michael L. Miller, Advanced Micro Devices; Srikumar Kareti, Honeywell Technology Center

Michael Miller gave a brief overview of the design process for a system to be used at Advanced Micro Devices, and how Tcl fits into that design. The company needed a system to reduce time, cost, and integration effort to deploy an Advanced Process Control (APC) solution into its semiconductor manufacturing facilities (fabs). This system would have to fit into the current framework, which consisted of distributed object-oriented components using CORBA messaging services.

It was determined that a scripting language was needed because the people using the system were control engineers, not programmers, and they needed the flexibility and functionality to implement any number of APC applications. The criteria for the language were that it must be easy to use, easily embeddable (since it was going to be embedded in a CORBA server), able to deal with CORBA to a degree, easily extensible, and cross-platform. Tcl, in comparison to Perl, Python, and Visual Basic, won easily.

In the APC framework, the Plan Execution Manager (PEM) acts as the choreographer component, performing "APC" at runtime for a particular process. Tcl was used by having the PEM create a new Tcl interpreter to evaluate "sub-scripts" for each "APC recipe" whenever a batch of silicon wafers was ready to be processed. The Tcl scripts defined not only what the APC framework did, but also in what order. Extensions were written for Tcl since the available extensions were deemed to be too general (and therefore harder to use), and some weren't available for all platforms. Here the extensibility of Tcl was a real bonus.

In general, the use of Tcl was seen as a great asset, and it meshed well with the CORBA environment. The only major concern Miller mentioned was the lack of thread support (this was overcome by using a crude mutex lock around the entire Tcl library), but he noted with satisfaction that thread safety is being addressed in Tcl 8.1.


?Need help? Use our Contacts page.
First posted: 16th February 1999 jr
Last changed: 16th February 1999 jr
Conference index
Proceedings index
USENIX home