ActiveState of Tcl 2008

Notes on Jeff Hobbs ActiveState of Tcl2008 talk. (MC's notes, but please add/enhance/correct ...)

Reviewed Tcl history...

As of Tcl'2007:

  • September 24-28 New Orleans
  • 8.4.16 was the standard stable version
  • 8.4 now base standard in all distros
  • 5 years since 8.4.0
  • Numerous enhancements and additions
  • Getting long in the tooth
  • 8.5b1 released
  • 8.6 vs 9.0
  • Primary topics: 8.5 finalization, food ...

Reviewed formation/history of the Tcl Core Team

Reviewed Tcl Improvement Proposal (TIPs)...

  • Currently 335 TIPs (divided into process, informational and project TIPs)
  • TIP page for Tcl: http://tip.tcl.tk/

Maintainers:

  • Separate from TCT (though substantial overlap)
  • Maintainers oversee a specific area of the core as defined in TIP #16 [L1 ] (Tcl) and TIP #26 [L2 ] (Tk)
  • Assist, but not solely responsible for fixing bugs, adding docs, etc.
  • Responsible for reviewing code and approving code changes to their area
  • Open to anyone willing to learn the core; New volunteers always welcome

Tcl at ActiveState:

  • Established 1997
  • Current tagline "Dynamic Tools for Dynamic Languages" (Jeff likes older tagline: "Programming for the people" but that doesn't fly as well in the enterprise)
  • Jeff Hobbs and Andreas Kupries hired in 2001
  • Wealth of scripting knowledge at ActiveState; besides Tcl, Perl, Python, XML/XSLT, etc.
  • Acquired by Sophos September 2003; freed in February 2006
  • ActiveState remains dedicated to dynamic languages--collectively a wealth of knowledge

ActiveState provides the Tcl community with:

Now easier to download ActiveTcl -- one single download page, no registration hoops to go through, etc. BOOK ActiveState Tcl Cookbook. Mailing list archives.

ActiveTcl 8.4.19:

ActiveTcl 8.5.5:

  • Based on the 8.5.5 Tcl core
  • Released October 2008--on the conference USB key
  • Distributed with fewer extensions (as compared to ActiveTcl 8.4); rest available via teacup
  • Considered the default download
  • Available for AIX, HP-UX, Linux, Mac OS X, Solaris and Windows (all builds are fully threaded)

ActiveTcl 8.6.0.0 Beta 1: (called Beta because ActiveState doesn't like to release things with Alpha names)

  • Based on Tcl 8.6a3 Tcl core
  • Not yet released--on conference USB key
  • Similar to ActiveTcl 8.5 extension set
  • More discussion on 8.6 to follow

The TEApot:

  • Binary code repository in the style of ActivePerl's PPM
  • Fully populated for ActiveTcl platforms
  • Make use of Tcl module system (allows zip archives with special teapot.txt)
  • Repository is web visible, but rough
  • Downloads index--local searches (against a SQLite database)
  • Integrated with TclApp package searching (TKD 5)

Tcl Dev Kit 5:

  • Released Monday (in time for the conference)
  • Enhanced static syntax analysis
  • Added 8.6 support
  • Supports multi-architecture starkits, x-platform starkpacks
  • Includes improved/revamped versions of the TclPro tools; checker is extensible, plus some additional new tools (that weren't in TclPro)

Komodo 5:

  • Professional IDE for dynamic languages
  • Cross platform (Windows, Linux, and OS X)
  • Deep support for Tcl, Perl, Python, PHP, Ruby and more
  • Added support for git, hg, and bazaar (beyond cvs, p4, svn support that was already in version 4)
  • Faster and slicker UI

Community resources:

  • Tcl Developer Xchange: https://www.tcl-lang.org aka http://tcl.activestate.com
  • Tcl'ers Wiki: now with ~22,000 pages (really most of it is good :-)
  • Tcl'ers Wiki Chat (HTTP-based with an IRC bridge)
  • Community contributed and maintained
  • Tcl-URL! continues to provide weekly news, posted weekly on comp.lang.tcl
  • SourceForge is for developers; core development managed there by TCT and Tcl/Tk maintainers (used by many other extensions and applications)

Tcl/Tk 8.4:

  • 8.4.19 released April 2008
  • At end of development life
  • 8.5 now considered the stable line
  • Had several enhancements: VFS, lset, lsearch, trace, 64-bit integer and file system support
  • Had significant work on performance (+20%) Near or better than 8.0, but now Unicode aware and thread-safe
  • New Tk widgets

What about 8.5?

  • 4 years in development (8.5a1 March 2004, 8.5.0 final December 2007)
  • 8.5.5 released October 2008
  • 8.6a1 development initiated April 2008
  • 99.99% backwards compatible with 8.4 at the Tcl level (exceptions are in error cases; bytecodes have changed -- watch version compatability)
  • Over 100 TIP'ed features included in 8.5
  • Coming soon: Tcl & Tk Toolkit, 2nd edition (ETA Spring 2009) by John Ousterhout and Ken Jones
  • New {*}$aList expansion operator--replacement for oft-misused eval (90% of evals are for list expansion; half of those were probably written in unsafe ways)
  • New dict data structure (order-preserving key/value pairs kept as Tcl_Objs); some operations byte-coded
  • 8.4 emulated version in ActiveTcl
  • New expr operators (**, min, max, isqrt, bool, entier, in, ni)
  • New ::tcl::mathfunc namespace for functions (define expr functions at the Tcl level)
  • New ::tcl::mathop namespace for operations (allows importing as procs for prefix math; all functions are byte-code compiled)
  • No more integer overflow because of bignums (every single bit hand-verified by Kevin Kenny)
  • Floating point handling improved to reduce rounding errors (roudn trip between IEEE floating point and strings is now lossless)
  • Added lrepeat, lassign, lreverse (good to have for programming language benchmarks); extended lsort, lsearch; List indices now support int[+-]int and end[+-]int syntax
  • namespace ensemble: [::carrot::foo] == [::carrot foo]
  • namespace unknown (per-namespace unknown control)
  • namespace path (name resolution control)
  • namespace upvar (namespace variable resolution efficiency)
  • Completely revamped clock command; no more Y2038 issues (even on 32-bit systems)
  • Resource limiting with interp limit command
  • Improved background error handling with interp bgerror
  • Enhanced debugging with info frame
  • New chan command to consolidate channel operations and to expose channel reflection at the Tcl level
  • Enhanced package versioning (understands a, b designation in version number (8.5a5)); allows for bounded ranges.
  • Tcl Modules (.tm) package handling
  • tclsh and source -encoding option
  • encoding dirs Tcl level control of where to find encodings
  • Enhanced catch and return (makes pure Tcl control structures more powerful)
  • New apply operator for anonymous procedures (lambda)
  • Several new binary format codes and improved unsigned value support
  • new tcl_platform(pointerSize) element
  • switch enhancements: -regexp can provide submatch info; added a -nocase option
  • New string is list|wideinteger classification; also a [string reverse] subcommand (added solely for benchmarks)

Tcl 8.5 gotchas:

  • global varName(elemName) raises an error now; also for upvar 0 x(1) y(1)
  • Don't rely on integer overflow (anymore)
  • list properly quotes the # char
  • tcl_precision now defaults to 0
  • Auto-initialize for incr (previously an undefined var would cause an error); gains semantic parity with append, lappend

Tk 8.5:

  • Themed widgets! Based on tile 0.7.8 work by Joe English; identifies itself as tile 0.8.0
  • Complements most of the classic Tk widgets
  • Some new widgets: notebook, combobox, progressbar, separator, treeview
  • Peering and smooth-scrolling text widgets
  • Standardized font names
  • Xft support in X11 (requires a recent Linux distro)
  • Enhanced wm commands
  • Cubic Bezier curves on the canvas
  • Improved grid geometry management (row|columnconfigure by widget name; overall grid anchoring)
  • Virtual event user data (%d)
  • Control over idle (activity) timer
  • Enhanced demos
  • Classic widgets got some cleanup; restorable with tk::classic::restore (only an issue for X11 users)
  • Themed Tk widgets (non-default alternative in 8.5); likely to become the default in 9.0
  • Classic Tk in tk::* (i.e., tk::button)
  • Ttk in ttk::* (ttk::button)
  • Tk and Ttk are complementary, not mutually exclusive

Question from Will Duquette regarding future documentation of the Ttk style command. Jeff said it is still semi-private, subject to change. Will get better over time. Also needs additional introspection ability into styles.

Tk Revitalization at ActiveState

  • ActiveState Perl Dev Kit 6.0
  • First commercial use of Tile
  • Embeds tcl/tk as a .dll

Tcl/Tk 8.6:

  • Currently in very active development
  • 8.6a3 released October 2008
  • Schedule: 8.6b1 (feature freeze) for early December 2008
  • 8.6.0 targeted for March 2009
  • Numerous TIPs already targeting 8.6: 21 TIPs final, 71 in draft state (most unlikely to make 8.6 final)
  • Community input is important

Tcl 8.6 Highlights:

  • Core OO!! (TIP #257 [L3 ], TIP #320 [L4 ]), major foundational effort by Donal Fellows, inspired by XOTcl and snit
  • New non-recursive bytecode engine by Miguel Sofer: enables coroutines/generators (TIP #328), Proper tailcalls (TIP #327)
  • New binary encode|decode with base64 (TIP #317)
  • Simplified Tcl and C option parsing (TIP #195, TIP #265)
  • Ability to cancel script evaluation: interp cancel (TIP #285)
  • Enhanced chan command: Anonymous pipes (TIP #304), channel transformations (TIP #230)
  • Find insertion point in sorted list (TIP #313)
  • Add tcl_platform(pathSeparator) key
  • Unicode aware string trim* (TIP #318)
  • Grouped sort with lsort -stride (TIP #326)
  • No more interp->result (TIP #330); use Tcl_GetStringResult(interp) instead; may require some extensions to be updated
  • Allow lset to extend lists (TIP #331)

Tk 8.6 Highlights:

  • New tk busy adapted from BLT's busy (TIP #321)
  • Absolute position of canvas items (TIP #236)
  • Lots of open TIPs targeting TK; need volunteers...

Tcl/Tk 9.0:

  • Still in the wishlist stage
  • Rationalize C APIs
  • Possible restructuring of Tcl level commands and global data
  • Remove octal support
  • Tcl_Obj improvements (hydra vs stork, improvements?)
  • Avoid Perl 6 experience

Various ideas in the pipeline. See http://tip.tcl.tk

User Pool, Versions used:

  • Pre 8.0 (none present)
  • 8.0-8.3 (~15%)
  • 8.4 (~90%)
  • 8.5 (~75%)
  • 8.6 alpha (just one person raised their hands)

User Pool, Versions in use, develop & deploy:

  • Windows (1/3rd, 75%)
  • OS X (quarter, quarter)
  • Linux (50%, 90%)
  • HP-UX other big iron (2 or 3)
  • Solaris (4 or 5 people)
  • Windows CE (4 people)

Future Directions:

  • Anyone can write a TIP
  • Anyone can be a core maintainer
  • ActiveState remains committed to working with the Tcl community and focusing on Tk revitalization

Will make the TEApot a WIP-session tomorrow night in the interest of time.

Q&A:

 Q: ActiveState licensing; per platform or per person (OS X at home, Windows at work)?
 A: Per-brain.

 Q: Status of the plugin?
 A: Well, uh ... lot of work that can be done, just requires someone with time and/or money to encourage the development...
Q: Question about open source TclPro
A: No one seems to be giving it time/love - it probably supports some level of Tcl 8.5...

Now its time for lunch...