THE MAGAZINE OF USENIX & SAGE August 2003 • volume 28 • number 4

inside: CONFERENCE REPORTS 2003 European /Tk User Meeting

& The Advanced Computing Systems Association & The System Administrators Guild 2003 European Tcl/Tk User Witt described Infopark’s content man- well adapted to fill-out-a-form style Meeting agement system, NPS, and why and how applications. This makes it easy to auto- they decided to use Tcl as the applica- matically create a “Poor Man’s GUI” NÜRNBERG, GERMANY tion scripting language. from a description of the data in a form. MAY 30 AND 31, 2003 Summarized by Clif Flynt The NPS package is written in Objective He also demonstrated an application of C. They extend the application’s func- Knuth’s “Literate Programming” para- THE STATE OF TCL tionality by embedding the Tcl inter- digm by mixing text and code in the text Andreas Kupries, ActiveState preter because: widget. His example uses the text wid- get’s bind command to trigger actions Kupries described the status of the cur- Tcl is open source, using the BSD based on the text being inserted into the rent Tcl release as well as ActiveState’s license, and so is free for commer- widget. current offerings. He reported that the cial use. use of Tcl (based on downloads) is still The same Tcl code runs on all plat- ORASTATE (ORACLE STRUCTURE TOOL growing, with several major manufac- forms. AND TABLE EDITOR) turers joining the Tcl ranks. Tcl is a normal glue language, with Martin Fickert The 8.4 series is now officially closed to no surprises for the casual pro- ORASTATE is an application that gener- new features, though still open for grammer. ates a graphical representation of Oracle It’s easy to learn. This is particularly maintenance. (New features are being tables from a database or user interac- important when teaching Tcl to added to the 8.5 release.) The 8.4 release tion. Martin Fickert described how this nonprogrammers. included support for the Virtual File package allows the user to perform data- System, which allows a zip or tar file to Witt described the basics of integrating base queries or edit tables, fields, and be used as a file system, and supports new commands into the Tcl interpreter relations via a simple GUI. mounting an HTTP or FTP site, several and demonstrated how the new com- This application is designed to allow new high-level widgets (including paned mands are accessed from a Tcl script. windows, labeled frames, and a spin- users to interact with an Oracle database box), support for 64-bit integers and file One extremely useful feature of Tcl is without needing to learn SQL and data- systems (even on 32-bit systems), and the trace command, which allows NPS base commands. to support dynamic callbacks based on many performance improvements. The This application represents a table as a changes to a document. This is equiva- Tcl core has been Unicode compliant drop-down list in which the top element lent to using a database trigger. and thread safe since the 8.1 release. Per- is the name of the table and lower ele- formance was improved with the 8.4 ments are the names of fields. During CREATIVE USE OF THE TEXT WIDGET release. default display, the list is rolled up, and Arjen Markus only the table name is displayed. Upon The Tcl maintainers are continuing to Arjen Markus described techniques for receiving an (cursor over) improve the Tcl core, and several TIPS using the text widget for more than dis- event, the label “unrolls,”displaying the are scheduled for inclusion in 8.5. The playing text, highlighting the versatility table fields, which can be queried and new dict data structure has been added of the text widget by using it to generate modified via pop-up dialog windows. already, and more options for the expr the PowerPoint-like slides for his presen- Relations between fields are displayed command and more high-level widgets tation. are planned. with lines, and can be added by the user The text widget is one of the more drawing lines in the display. ActiveState has continued to support Tcl sophisticated and powerful widgets in Database queries can be created and with the introduction of a Tcl Cook- Tk. Not only can a script insert text into evaluated via a set of pop-up windows book series of code snippets, with the the widget, using a variety of fonts, fore- that allow the user to select fields, opera- Tcl Dev Kit software development tools, ground and background colors, and tions between fields, and values for the and by continuing to extend the Tcl sup- event bindings connected to the text, a operations. port in the Komodo IDE, including script can also insert images and other incorporating a new GUI builder. Tk widgets. UIE: CREATING A GENERIC INTERFACE BETWEEN TCL/TK AND OTHER LANGUAGES NPS PORTAL MANAGER AND NPS CONTENT Markus pointed out that the ability to MANAGER put other widgets onto the text widget Veronica Loell Thomas Witt, Infopark provides another technique for geome- Veronica Loell described the User Inter- try management which is particularly face Engine (UIE), which uses Tcl as an

84 Vol. 28, No. 4 ;login: engine rather than as glue. This frame- ronments. The name dbWidget is a mis- making the edit/test/debug sequence work supports multiple software agents, nomer, given that the package is more more integrated. EPORTS cooperating to provide a natural lan- than an interface to databases, and more R The Version Control is based on a rela- guage interface with other applications. than a widget. This package allows a tional database (MySQL, Postgres, developer to define an application with a The UIE framework has several cooper- SQLite, ODBC) that works in the back-

template file that is used to generate the ONFERENCE

ating processes, including a data man- ground, rather than requiring explicit C GUI and database interactions. The ager, translators, and applications which check-in/check-out sequences. This par- applications inherit base functionality operate by passing messages to each adigm supports a team-programming from the dbWidget package, including other via the translators. style, allowing a user to check at any audio cues, online help, and support for time, via a code browser, to find out The translation engines allow different printing. what modules are in sync with the applications to communicate cleanly by The dbWidget package interfaces with repository. converting application-specific com- Open Office to provide platform- mands into a generic intermediate lan- independent printing, and uses a C data- I18N: TCL FOR THE WORLD guage and back. base extension to interface to the Richard Suchenwirth

TCL USED FOR TESTING IN THE MOBILE Berkeley db, Faircom’s Ctree, or other Richard Suchenwirth described Tcl’s WORLD database engines. support for internationalization and localization of applications. He Hans Banken This package was developed to upgrade explained the evolution of Unicode, SIGOS GmbH uses a Tcl application to their clients’ applications. It’s been in use from the early Baudot code, through test mobile networks. Hans Banken for several years and is robust and effec- ASCII, EBCDIC, JIS, and UTF-8, and, described how the application is con- tive. structed and how it works. finally, to the modern four-byte Unicode XOTCLIDE that can represent all known glyphs. The requirement was to simulate user behavior using real mobile equipment. Artur Trzewik Suchenwirth demonstrated Tcl/Tk’s The application needed to be able to Artur Trzewik described XOTclIDE, an facility with non-European fonts with a exercise all the functions a user could integrated development environment display from his iPAQ that showed simi- request, utilize all available hardware, for XOTcl (Extended Objective Tcl). lar phrases in several languages, includ- and be easily configurable. This IDE has a strong small-talk orienta- ing Chinese, Japanese, Korean, Greek, tion and includes support for building and Russian. Banken described the SITE system, a components and version control. database-backed test engine capable of Since version 8.1, Tcl/Tk has used UTF- running 180 distributed test systems. Trzewik introduced XOTcl to the audi- 8, with support for up to three bytes per This system uses Tcl for the GUI, glue, ence and noted that XOTcl uses a character, for internal character repre- and database interactions. The tests are method-chaining style of inheritance sentation. Thus, a character may be a described in a Tcl-style configuration and provides more support for intro- single or multiple bytes in the internal file that allows the Test Definition Lan- spection than []. XOTcl also representation, but to a Tcl script each guage to be easily converted to Tcl supports assertions, /Filters, and character is a single entity. He described scripts for execution. classes that contain metadata. using the msgcat package to support code localization and also how the text The XOTclIDE application allows the Banken noted that with no previous Tcl widget will automatically load fonts as user to build an application in an inter- experience the team was able to con- required to display various glyphs. struct a large, robust, and successful active manner, constructing classes and commercial application in only two methods bit by bit and testing them in a He finished by discussing techniques for weeks. bottom up manner until the final top- entering non-ASCII data from a stan- level class (the application) is com- dard keyboard. Combinations of shift DBWIDGET: A RAPID APPLICATION DEVELOP- pleted. and a letter can be mapped to other MENT SYSTEM FOR THE TCL COMMUNITY glyphs, or one could type the name of The XOTclIDE debugger is based on the Franco Violi the character until the application rec- atkdebugger, which allows the user to set ognizes the pattern and provides a menu Franco Violi described the dbWidget breakpoints and step into/over proce- of possible glyphs. Another option is to package developed to easily port legacy dures and modify the original source, COBOL applications to modern envi- use a variant on greeklish, a style in which two character combinations are

August 2003 ;login: EUROPEAN TCL/TK USER MEETING 85 used to represent non-ASCII characters. Developing a Tcl solution from scratch For example, a’ would be used to repre- took two days. sent the accented a character. Scheffers finished his talk by noting that

GENERATION R while Tcl has easy support for many dif- Pascal Scheffers ferent database engines, the binary library support is not always easy to Pascal Scheffers reported on the uses of acquire. The assumption is that anyone Tcl by the Generation R project at the who needs to use a database engine has Erasmus University Medical Center in the required libraries and C compiler for Rotterdam. Five university departments the platform they are using. In a multi- and over 20 external organizations are disciplinary project like this, that’s often working together to track the lives of not the case. 10,000 children from pre-birth to young

adulthood. This task involves many EMBEDDING THE TCL INTERPRETER FOR questionnaires and a great deal of infor- PORTABLE APPLICATIONS mation in many different databases Clif Flynt maintained by the different groups The ease with which Tcl can be extended working on the project. using other libraries and C code is well The project is using AOLServer and the known and documented. Clif Flynt pre- OpenACS package for much of the sented a tutorial talk describing how to logistics and data management services. embed the Tcl interpreter within a C AOLServer is an HTTP server that uses application. Tcl as the scripting language for server- He described the Tcl library API that side processing. OpenACS is a package supports this, and demonstrated a short of tools for creating database-backed C/Tcl application that uses a C language Web sites using AOLServer. main() function for the primary entry AOLServer provides a platform for point and calculation function, and Tcl building easy-to-use interfaces between scripts for the GUI and data representa- the non-computer scientists using the tion. data and the different database engines Flynt noted that this provides a “best of and data formats. all worlds” development environment. One continuing problem that the group The mission-critical, stable, platform- faces is the need to generate customized independent code is maintained in C, form letters. After trying LaTex, Page- while the customer-experience, most- Maker, and MS-Word, they decided the likely-to-be-changed, platform-depend- optimal solution was to save the basic ent code is written in Tcl, where it can form letter as a PostScript file and then easily be modified to fit customer massage the text with a Tcl script. This requirements. Because the user interface solution provides the fastest mail-merge code is written in Tcl, it takes advantage and print options. of Tcl’s multi-platform support, and what would otherwise be platform Tcl’s string and list manipulation fea- dependent becomes platform indepen tures are also used to parse a set of dent as well. Health Level 7 data. The ISO Level 7 data format is a sequence of character- This ability to embed the interpreter separated, nested lists with different sep- makes the Tcl/Tk libraries a good alter- aration characters for each level of native to using the Xt, Athena, or MS nesting. The Tcl split command makes libraries for project development. parsing this data easy. The commercial parsing packages cost about $6500.

86 Vol. 28, No. 4 ;login: