Tcl Community Association
Current Activities: US Conference: Nov 12-16 2012 -- Google Summer of Code

Birds of a feather flock together

Tcl/Tk Conference: 2011

We returned to the Comfort Suites in Manassas, VA for the 18'th Tcl/Tk Conference.

Our keynote speaker was Alexandre Ferrieux, who had just made Tcl the first scripting language to be supported by Google's Native Client.

It became apparent during the conference that Tcl has moved from being an implementation of a scripting language to being a language specification. Tcl is now implemented in Java, Javascript, and .NET as well as Tcl variants coded in C or C++.

The post-conference event was a tour of the new Smithsonian Air and Space Museum.

As usual, the hospitality suite was full until late at night with folks discussing Tcl, books, Tk, movies, Tcl, politics, scripting languages, economics and Tcl/Tk. The Comfort Suites lobby was often occupied with the overflow, all-night BoFs, and more techie geekdom.


Alexandre Ferrieux
Tcl has announced the first scripting language to be supported by NaCl (Google's native client,) giving Tcl programs direct access to Chrome's DOM and marking the first such scripting language alternative to JavaScript. A demonstration of direct Tcl access to HTML5's Canvas is given. A variant of Tk for Native Client will soon follow. Web applications can right now be written completely in Tcl, as the original HTML specifications intended :)

Tcl and Browsers

Steve Landers
Running Tcl in A Browser. A Survey Of Approaches.
Tcl has been running in browsers since the early days of the Internet. And yet deployment model is still not mainstream in the Tcl world. With the dominance of the iPad in tablet computing, and the well known limitations on scripting languages in the iOS computing environment, the need for a browser-based Tcl solution is becoming greater. greater.

This talk will survey the various approaches to implementing Tcl in a browser, including historical solutions such as WebRouser and the venerable Tcl Plugin, Java-based solutions such as Jacl running as an applet, Javascript solutions such as Tcl.js and IncrTcl in JS, and native code solutions such as NaTcl. The pros and cons of each approach will be compared, along with other approaches such as implementing the TEBC in Javascript. Finally, the talk will introduce a new effort involving the use of LLVM and the Emscripten technology to translate a Tcl interpreter (in this case, Jim Tcl) to optimised Javascript.

Arnulf Wiedemann
[incr Tcl] in JavaScript
Incr Tcl in Javascript (also called: itcl in Javascript) is a work in progress, which started about February 2011. It's intention is to extend the existing Tcl in Javascript an interpreter for the Tcl language written in Javascript with a lot of additional features and commands as well as an implementation of itcl in javascript. During implementation there was the need for optimizing parsing and evaluation of Tcl statements, which resulted in a partial parsing strategy.

Arnulf Wiedemann
Implementation of Tk widgets in javascript based on DOM nodes/trees
Part of the incr Tcl in Javascript project is, which is intended to be one possible frontend/client part of ATWF and Reporting Tools with Tcl, is a sub project to implement Tk widget using javascript and DOM trees.

That includes a mapping of for example button/label/entry widgets to something which can be done with html parts in creating DOM trees and adding properties and attributes to the DOM nodes, that includes mapping of Tk option model to javascript style model and properties of DOM nodes.

Second goal is to map Tk event handling and bind functionality to the javascript event model and the javascript event listeners/handlers. There are also more complex widgets in work like Tree, Tktable, panedwindow etc.

The selection on which widgets are implemented first is driven by: what is needed for a reporting environment, that includes the decision on which options are implemented first.

Tcl Interpreters

Bruce Johnson, Tom Poindexter, Dan Bodoh
JTcl and Swank: What's new with Tcl and Tk on the JVM
JTcl is an implementation of the Tool Command Language (Tcl) written in Java and is derived from the Jacl project. The current release (2.0) of JTcl implements a large extent of Tcl 8.4 syntax and commands, limited only by the API restrictions of the Java Virtual Machine. Swank is an implementation of the TK GUI toolkit implemented using the Java Swing GUI API. Most Tk 8.4 widgets and commands have been implemented as well as additional ones based on Swing widgets. This paper describes the current state of these projects and gives examples of their use.

Steve Bennett
Jim Tcl - A Small Footprint Implementation of Tcl for Embedded Systems
Jim Tcl is an Small Footprint implementation of Tcl specifically targeted at embedded systems - both embedded devices and application embedding.

Jim Tcl has some unique advantages over other Tcl implementations: - Fast, highly portable C code with easy cross compilation - Small and modular - Largely compatible with Tcl 8.5 - Unique features, including: true lambda, garbage collection, OO I/O, isomorphic list/dict/array, signal handling

This presentation explains the current state of the Jim Tcl project, why it is particularly suited for embedded projects, and describes the unique features of Jim Tcl in detail.

A number of projects using Jim Tcl will also be highlighted, including: - OpenOCD - Open On Chip Debugging - autosetup - Tcl-based autoconf replacement - µWeb - Embedded Web Framework

Andres Buss
TyCL: an interpreter/compiler of a typed language implementation of Tcl/Tk
TyCL (Typed Command Language) is an implementation of the Tcl language written in TyCL itself. The language follows Tcl's syntax, but given that TyCL is meant to be a full compiler that generates machine code, a new set of features, expansions and cuts had to be applied to the Tcl's syntax that TyCL understand in order to help the compiler to produce better results. Included in those modifications are the concept of types (hence the name of the compiler), which are optional but when used makes TyCL behave more as an static language than a dynamic one.

Invited Talk

Ron Fox
Tcl at the NSCL: a 30year retrospective
The National Superconducting Cyclotron Laboroatory (NSCL) is an NSF funded laboratory that performs basic nuclear physics research on Systems that are far from stability. The operation of the NSCL has been Funded by the National Science Foundation since (1980).

The NSCL has developed and used several Tcl based applications in data Acquisition and analysis. This retrospective will examine the impact of presenting researchers at the NSCL with Tcl based tools and toolkits. A speculative look forward at the role of Tcl within the NSCL as construct the DOE funded Facility for Rare Isotope Research (FRIB)


Clifford Yapp
A CMake-Based Cross Platform Build System for Tcl/Tk
Defining build logic for a large software package in multiple software development environments entails a large up-front implementation cost and an ongoing maintenance burden. CMake is a cross-platform build tool that allows developers to define relatively abstract build logic that is automatically translated into a variety of build system formats, reducing the burden of supporting multiple development environments. BRL-CAD's integration of Tcl/Tk as a sub-build motivated the development of Tcl/Tk build logic compatible with BRL-CAD's new CMake logic. This paper presents a new CMake based build system for Tcl/Tk and a number of popular Tcl/Tk extensions.

Kyle Bateman
WyattERP - A Non-Sissy ERP Application Development Platform
Historically there have been two choices with ERP's, buy someone else's or develop your own. WyattERP solves this with an innovative approach that upends traditional systems. It leverages the strengths of Tcl/Tk and Postgresql to create a platform that allows quick development and quicker iterations of any new system. This is possible because the logic needed to access and manage the database, and the guts of widget creation are in the library allowing the front end modules to be exceptionally light. A fully functional application can be created with less than a 100 lines of code.

Ron Fox
Fluid Dynamics Data experiments with Tcl
Computer Automated Radioactive Tracking (CARPT) has emerged as a powerful Technique for mapping fluid flow under a variety of conditions. This paper describes the adaptation of a general purpose nuclear physics event-based data acquisition system to the needs of the CARPT apparatus at Missouri University of Science and Technology. The base software is a C++ multithreaded framework which communicates via events with a Tcl interpreter. The Tcl scripts run by the interpreter provide Experimental control, online-data analysis and data storage for later offline analysis.

Tcl Techniques

Sean Woods
Agent Based Modeling with Coroutines
Coroutines have been introduced into the Tcl/Tk core with version 8.6. And many developers ask "what on Earth would I do with them?"

This paper describes how coroutines are used to model human actors following complex, interdependent procedures. During the paper, we will develop a coroutine- based general use architecture for task management. We will also describe some of the common edge cases to look out for.

This paper is based on my experience developing the Integrated Recovery Model for T&E Solutions.

Stefan Sobernig, Gustaf Neumann
An Overview of the Next Scripting Toolkit for Tcl Programmers
Aiming at Tcl developers, we give a primer on the Next Scripting Framework (NSF) and the Next Scripting Language (NX). We look at features such as defining object systems, parametric objects, laying out object states, creating object behaviour, and designing object interfaces. Along the way, we review some syntactic additions and developer support tools for developing NSF/NX programs. Our goal is to provide a comprehensive overview of the NSF/NX features, including hands-on code examples.

Google Summer of Code 2011

Andreas Kupries
GSoC 2011 Post-Mortem
Like in the past years, this is a report on the Tcl communities' participation in Google's Summer Of Code.

Applications II

Stephen Huntely
A Novel Method for Representing Hierarchies in a Relational Database Using Bignums and Sqlite
I introduce a method of using a rapidly-converging infinite series to generate integer values which, when stored in relational database table rows, act as tags allowing each row to be interpreted and queried as a node in a hierarchy. To overcome integer precision limitations, I use Tcl 8.5's Bignum feature and tcllib's math::bigfloat package. I use Sqlite's ability to store arbitrary binary data in its BLOB data type to manage overflow precision digits. The resulting code provides a fast and efficient way to store and query tree-structure data of theoretically unlimited size.

Shyam Mishra
An efficient text mining application for log file analysis in an emulation environment using Tcl/Tk with C
Text mining refers to the process of deriving high quality information from text files. Hardware emulation is the preferred way for verification of multi-million gates SOC designs. Text mining can be applied for log file analysis of huge log files that get generated in an emulation based design verification flow .

Typically an emulation based verification flow consists of two discrete steps, namely compile and runtime. During the compile stage, a HDL design is prepared for emulation. The compile tools generate log files and other reports. Text mining can be applied to extract useful information from those log files and reports in order to help the user detect errors and warnings in compile that might affect the emulation. Logs and reports generated during emulation runtime can also be similarly analyzed.

Using Tcl/Tk, a GUI is developed to use text mining methods on very large emulation databases for log file analysis. Main considerations for design for such text mining application has been that interactive user response remains fast, the parent Emulation control and Debug GUI is able to interact and work with the text mining widget with fast response time, in unblocking manner, and with minimal overhead to the parent Emulation control and Debug GUI. Besides design ensures search operations are fast, the application memory image is low, and the application provides host of ease of debug utilities like GUI based linkages to user RTL source, informative help from the messages in log files. To achieve this intelligent partitioning of functionalities between C++ and TCL code is done. The application makes use of a C/C++ based shared object for efficient retrieval of information from the huge log files generated by the emulation tools. The application GUI makes use of the latest Tcl/Tk features to provide an easy to use interface to give the users a rich debugging experience.

Tarun Goyal
Maintainable, Shareable and Easily Creatable/Updateable toolbar/menubar/statusbar - pillars of any GUI application.
This paper presents a novel approach to efficiently manage, update and share the toolbar/menubar/statusbar widgets that are integral to any TCL/TK based GUI application. However, considering that any GUI would have different windows performing variety of tasks and be dependent on the overall tool state, the solution should effectively support context sensitivity with respect to windows, selected object in its constituent windows and tool status.

Multitasking Techniques

Kumar Gaurav, Tushar Gupta, Madhur Bhatia
Efficient Communication Strategy of Enterprise TCL/TK Application with Multi Process System:-A Study
The GUI tool of Veloce emulation system is a TCL/TK based application. The Veloce software has a complex multiple process architecture. The Inter-Process-Communication (IPC) within the software components involves frequent and bulky data transfer between the processes. The VeloceGUI on one hand needs to update its state very frequently based on responses from some of the software components and emulation runtime system, and on the other hand needs huge on demand data transfer from other set of servers.

There are two types of communication methods used by VeloceGUI:

(i) TCL Sockets (ii) Message passing library built over C-Sockets.

This paper discusses, how to use these two communication methods to get maximum speed and minimum memory usage, and also how the TCL/TK based GUI interacts with a larger client-server ecosystem, communicating with each other, using a sophisticated message passing system.

Patrick Dunnigan
Tcl And Cloud Computing Automation
The idea of using cloud computing to augment or replace traditional IT infrastructure is gaining more traction. This session will contrast the cloud with virtualization, explain the difference between private and public clouds and explore Tcls role to play in automating cloud based processes. The open source Tcl libraries Tclcloud and Tclwinrm (to be released) will be discussed.

Clif Flynt
Tcl application to control multiple blades in coarse and medium grained parallel processing.
CPU's and single-board computers are a cheap source of compute power. You can go to Dell or Sun and buy racks of blades, or go to any big-box store and buy a motherboard with on-board networking and more.

A small rack for these can be constructed with a handsaw and plywood, a trivial modification to a powersupply will powercycle them simultaenously, and they can be booted from a server using a PXE boot.

Once you've got a small server farm, you need to control what it's doing.

Dispatcher is an application for distributing tasks across multiple processors and collecting the results.