Skip to search.

Breaking News Visit Yahoo! News for the latest.

×Close this window

tcl_announce · comp.lang.tcl.announce

The Yahoo! Groups Product Blog

Check it out!

Group Information

  • Members: 204
  • Category: Tcl Tk
  • Founded: May 19, 1998
  • Language: English
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Messages

Advanced
Messages Help
Messages 1927 - 1956 of 6538   Oldest  |  < Older  |  Newer >  |  Newest Start Topic
Messages: Show Message Summaries Sort by Date ^  
#1927 From: Jean-Luc FONTAINE <jfontain@...>
Date: Tue Oct 26, 2004 12:07 am
Subject: ANNOUNCE: tclperl-3.0
jfontain@...
Send Email Send Email
 
### CHANGES ###

--- version 3.0 ---

allowed evaluation of Tcl code in parent Tcl interpreter from Perl
    interpreters
initialize Perl system when loading extension
made code thread aware in the Perl sense (allows Perl threads)
allowed Tcl interpreter access from C code so tclperl can be extended

### README ###

tclperl version 3.0: a Perl package for Tcl

This package allows the execution of Perl code from a Tcl interpreter,
as in:

      package require tclperl
      set interpreter [perl::interp new]
      $interpreter eval {print "Hello World\n"}
      perl::interp delete $interpreter

You can actually create several Perl interpreters this way, if the
tclperl package was linked against a Perl library compiled with
-DMULTIPLICITY, otherwise only 1 Perl interpreter can exist at a time.

Starting with version 3.0, you can also access and use the parent Tcl
interpreter from a Perl interpreter:

      package require tclperl
      set interpreter [perl::interp new]
      puts [$interpreter eval {
          $Tcl::parent->eval('clock format [clock seconds]');
      }]
      perl::interp delete $interpreter

This package works on UNIX machines (Redhat Linux rpms available at
http://jfontain.free.fr/) and Windows (thanks to David Gravereaux,
DLL also available). See INSTALL file for more information.

This library is free software; you can redistribute it and/or modify
it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

###

you may find it at the following locations:

http://jfontain.free.fr/tclperl-3.0.tar.bz2
http://jfontain.free.fr/tclperl-3.0-0.fdr.1.i386.rpm
http://jfontain.free.fr/tclperl-3.0-0.fdr.1.spec
http://jfontain.free.fr/tclperl.htm

--
Jean-Luc Fontaine  mailto:jfontain@...  http://jfontain.free.fr/

[[Send Tcl/Tk announcements to tcl-announce@...
   Announcements archived at http://groups.yahoo.com/group/tcl_announce/
   Send administrivia to tcl-announce-request@...
   Tcl/Tk at http://tcl.tk/ ]]

#1928 From: Jean-Luc FONTAINE <jfontain@...>
Date: Tue Oct 26, 2004 12:20 am
Subject: ANNOUNCE: tclperl-3.1
jfontain@...
Send Email Send Email
 
### CHANGES ###

--- version 3.1 ---
Perl interpreters can now evaluate Tcl code even from Perl threads
    (requires at least a 5.6.0 Perl core)
added tclperl.h file for possible use in extensions to tclperl

### README ###

tclperl version 3.1: a Perl package for Tcl

This package allows the execution of Perl code from a Tcl interpreter,
as in:

      package require tclperl
      set interpreter [perl::interp new]
      $interpreter eval {print "Hello World\n"}
      perl::interp delete $interpreter

You can actually create several Perl interpreters this way, if the
tclperl package was linked against a Perl library compiled with
-DMULTIPLICITY, otherwise only 1 Perl interpreter can exist at a time.

Starting with version 3.1, you can also access and use the parent Tcl
interpreter from a Perl interpreter (and even from Perl threads):

      package require tclperl
      set interpreter [perl::interp new]
      puts [$interpreter eval {
          $Tcl::parent->eval('clock format [clock seconds]');
      }]
      perl::interp delete $interpreter

This package works on UNIX machines (Redhat Linux rpms available at
http://jfontain.free.fr/) and Windows (thanks to David Gravereaux,
DLL also available). See INSTALL file for more information.

This library is free software; you can redistribute it and/or modify
it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

###

you may find it at the following locations:

http://jfontain.free.fr/tclperl-3.1.tar.bz2
http://jfontain.free.fr/tclperl-3.1-0.fdr.1.i386.rpm
http://jfontain.free.fr/tclperl-3.1-0.fdr.1.spec
http://jfontain.free.fr/tclperl.htm

--
Jean-Luc Fontaine  mailto:jfontain@...  http://jfontain.free.fr/

[[Send Tcl/Tk announcements to tcl-announce@...
   Announcements archived at http://groups.yahoo.com/group/tcl_announce/
   Send administrivia to tcl-announce-request@...
   Tcl/Tk at http://tcl.tk/ ]]

#1929 From: Jean-Luc FONTAINE <jfontain@...>
Date: Tue Oct 26, 2004 12:35 am
Subject: ANNOUNCE: moodss-19.1 and moomps-4.1
jfontain@...
Send Email Send Email
 
### CHANGES ###

--- moodss 19.1 and moomps 4.1 ---
- in moodss GUI:
    - added sub-menu in popup menu for graphs and bar charts viewers to
      choose which side the data cells labels should be placed relative
      to the graphics
    - in preferences and dashboard configuration, in viewers graphs
      section, added default choice for side of data cells labels
    - unexpected command line options could result in a source code
      trace printout instead of a more elegant error message
    - in configuration dialog box, in application background section,
      tabs of pages, when placed at bottom were clipped: fixed using
      BWidget bug fix
    - in Windows zip distribution, forgot to include formulas module
      sub-directory
    - on UNIX platforms, slightly improved looks of dialog boxes by
      using white backgrounds in entry fields and spin boxes
    - removed a small memory leak in all scrollable objects
    - eliminated infinite oscillations in rare cases where some
      displayed tables were resized too small
    - successfully tested with Tktable 2.9
    - Japanese help updated
- a module failing to load due to a fatal error could disturb the
    configuration of thresholds or database storage on cells belonging
    to other modules, if the module in error had itself cells set in
    thresholds or in database storage (note: fixed using additional data
    in dashboard file, so save over existing dashboard if in doubt)
- formulas documentation and help was translated in Japanese, thanks
    to KITAHARA Kosei
- for Perl modules programmers:
    - added support for tclperl version 3 library (used in Perl modules)
    - support threaded Perl modules if tclperl version 3.1 library is
      available
    - implemented message utility functions:
      flashMessage(), pushMessage(), popMessage() and traceMessage()
    - in development HTML documentation, documented new message, timer
      and threads functions available from Perl
- added Threaded sample Perl module using threads
- in Perl Random module, added -a (--asynchronous) option as in
    original random module
- in snmp and smithy modules:
    - big tables could make internal hashing code fail
    - when monitoring identifiers (not tables), displayed tables
      remained empty after network failure followed by recovery
- in myhealth, mystatus and myvars modules for MySQL, added support
    for 4.1 servers versions
- updated myerrorlog module for MySQL 4.0.21 server support
- no longer support dashboard files created with moodss prior to
    version 17.7
- includes md5, uri, base64, smtp and mime source from new tcllib 1.7
    release
### README ###

This is moodss (Modular Object Oriented Dynamic SpreadSheet) version
19.1 and moomps (Modular Object Oriented Multi-Purpose Service)
version 4.1.

For Unix Review, moodss is "a must-have application for today's
network and systems administrators", and for Eric S. Raymond, in "The
Art of UNIX Programming" book: "the code is polished, mature, and
considered an exemplar in the Tcl community."
Linux Magazine calls it a "lifesaver".
Tucows gives it 5 stars (cows or penguins :-).

Moodss is a modular application. It displays data described and
updated in one or more modules, which can be specified in the command
line or dynamically loaded or unloaded while the application is
running. Data is originally displayed in tables. Graphical viewers
(graph, bar, 3D pie charts, ...), summary tables (with current,
average, minimum and maximum values), tables of mathematical formulas
and free text viewers can be created from any number of table cells,
originating from any of the displayed tables or viewers. The display
area can be extended by adding pages with notebook tabs. Thresholds
can be set on any number of cells.

Moomps (shipped with moodss) is a monitoring daemon which works using
configuration files created by moodss. Thresholds, when crossed,
create messages in the system log, and eventually trigger the sending
of email alert messages and the execution of user defined scripts.

For both moodss and moomps, it is also possible to use a database as a
storage mean, so that data history is recorder and later made
available, for example, in presentations and graphs, via commonly
available spreadsheet software.

Specific modules can easily be developed in the Tcl, Perl and Python
scripting languages or in C.

A thorough and intuitive drag'n'drop scheme is used for most viewer
editing tasks: creation, modification, type mutation, destruction,
... and thresholds creation. Table rows can be sorted in increasing or
decreasing order by clicking on column titles. The current
configuration (modules, tables and viewers geometry, ...) can be saved
in a file at any time, and later loaded at the user's convenience,
thus achieving a dashboard functionality.

The module code is the link between the moodss core and the data to be
displayed. All the specific code is kept in the module package. Since
module data access is entir
Thorough help is provided through menus, widget tips, a message area,
a module help window and a global help window with a complete HTML
documentation.

Moodss is multi-lingual thanks to Tcl internationalization
capabilities. English, Japanese and French are supported. Help with
other languages will be very warmly welcomed.

Development of moodss is continuing and as more features are added in
future versions, backward module code compatibility will be maintained.

###

you may find it now at the following locations:

http://download.sourceforge.net/moodss/moodss-19.1.tar.bz2
http://jfontain.free.fr/moodss-19.1.zip
http://jfontain.free.fr/moodss-19.1.i386.tar.bz2
http://jfontain.free.fr/moodss-19.1-0.fdr.1.i386.rpm
http://jfontain.free.fr/moodss-19.1-0.fdr.1.spec
http://download.sourceforge.net/moodss/moomps-4.1.tar.bz2
http://jfontain.free.fr/moomps-4.1-0.fdr.1.noarch.rpm
http://jfontain.free.fr/moomps-4.1-0.fdr.1.spec

--
Jean-Luc Fontaine  mailto:jfontain@...  http://jfontain.free.fr/

[[Send Tcl/Tk announcements to tcl-announce@...
   Announcements archived at http://groups.yahoo.com/group/tcl_announce/
   Send administrivia to tcl-announce-request@...
   Tcl/Tk at http://tcl.tk/ ]]

#1930 From: rapp@...
Date: Tue Oct 26, 2004 12:08 am
Subject: [ANN] SMC - State Machine Compiler v. 3.1.1
rapp@...
Send Email Send Email
 
SMC - The State Machine Compiler v. 3.1.1


Requires:  Java 1.4.1 SE (Standard Edition) or better.
Download:  http://sourceforge.net/projects/smc
Home Page: http://smc.sourceforge.net


=================================================================
What's New?
=================================================================

(No new features.)


=================================================================
Bug fixes
=================================================================

+ Fixed error when reading in .sm files larger than 4,096 bytes.
   SMC reads in 4,096 bytes at a time into an internal buffer,
   overwritting the buffer's previous contents.
   SMC will "back up" its buffer index when it decides a character
   does not belong to the current lexical token. The bug occurrs
   when SMC backs up past index 0. This has been corrected by
   keeping the previous buffer's last two bytes available when
   reading the next 4,096 bytes (SMC backs up at most 2 bytes.)

+ (-c++) Removed "using namespace std" from the "-g" generated
   .cpp file. All generated references to the std namespace are
   now fully-qualified with "std::".

   Note: This means any std namespace references in your SMC
         code must be fully-qualified as well. SMC will not
         add the "std::" scoping for you.


=================================================================
What is SMC?
=================================================================

SMC takes a state machine description (stored in a .sm file) and
generates State pattern classes in a target language (C++, Java,
Tcl, VB.Net and C# are currently supported). SMC is a
console-based app written in Java which means SMC can run
anywhere Java (1.4.1 or better) can run. The download package
includes an example directory showing how SMC can used with C++,
Java, Tcl (requires [incr Tcl] package), VB.Net and C#. The
examples range from trivial to GUI apps.


=================================================================
How can I learn more?
=================================================================

At http://smc.sourceforge.net. You can access the SMC
Programmer's Manual there as well. While you're there,  check out
the SMC demo applet at http://smc.sourceforge.net/SmcDemo.htm.


=================================================================
Where can I get it?
=================================================================

SMC and the Programmer's Manual can be downloaded from
http://sourceforge.net/projects/smc. You can also use this
website to:

     + Ask questions (via the Public Forum's Help discussion)
     + Submit a bug.
     + Join a mailing list.
     + Access SMC documentation.
     + Access SMC's source code in the CVS repository.

(Note: in order to make full use of SourceForge capabilities,
  you must be a SourceForge member. If you are not a member,
  head over to http://sourceforge.net/account/register.php
  and sign up. SourceForge membership is free - no money, no
  requirements and NO SPAM! Membership has its benefits.)

If you have any problems, surf over to
http://sourceforge.net/forum/forum.php?forum_id=27865 and report
the problem. I will try and answer you via the Help forum as
quickly as I can.


                               Enjoy!

                            Charles Rapp
                        mailto:rapp@...

[[Send Tcl/Tk announcements to tcl-announce@...
   Announcements archived at http://groups.yahoo.com/group/tcl_announce/
   Send administrivia to tcl-announce-request@...
   Tcl/Tk at http://tcl.tk/ ]]

#1931 From: Jean-Luc FONTAINE <jfontain@...>
Date: Tue Oct 26, 2004 12:26 am
Subject: ANNOUNCE: tcllib-1.7 rpm
jfontain@...
Send Email Send Email
 
It can be found at:

http://jfontain.free.fr/tcllib-1.7-1.noarch.rpm
http://jfontain.free.fr/tcllib-1.7-1.spec

It was generated on an up-to-date Red Hat Fedora 2 i386 system.
It installs under /usr by default and is relocatable (see rpm manual).

Please report any problems to me and in comp.lang.tcl.

Have fun!

--
Jean-Luc Fontaine  mailto:jfontain@...  http://jfontain.free.fr/

[[Send Tcl/Tk announcements to tcl-announce@...
   Announcements archived at http://groups.yahoo.com/group/tcl_announce/
   Send administrivia to tcl-announce-request@...
   Tcl/Tk at http://tcl.tk/ ]]

#1932 From: Pascal Scheffers <tcl-url@...>
Date: Tue Oct 26, 2004 12:22 am
Subject: Dr. Dobb's Tcl-URL! - weekly Tcl news and links (Oct 11)
tcl-url@...
Send Email Send Email
 
QOTW:  "Either you fight against the differences or you embrace them."
                                 Bryan Oakley, on Tcl's character

"Don't guess, measure."
                                 Donal K. Fellows


POTW:  "Kiwi is a graphic application which displays ... trace logs."
Keywords:  real-time, portable, pure-Tk, ...
     http://rtportal.upv.es/apps/kiwi/


     If you want an HTTP client connection with keep-alive, you need
     http version 1.1. The core http package doesn't support this, but
     tclsoap does.
         http://groups.google.nl/groups?th=2cb811b38af89ede

     If you want to compile a Tcl application, that is turning
     readable Tcl code into bytecodes, your best bet is Tcl Dev
     Kit. If you don't mind using Tcl 8.3 the older TclPro may still
     be servicable for you.
         http://groups.google.nl/groups?th=ba3356f7b80ecadd

     Although Tcl is thread-safe, using it always seems to reveal the
     subtle ways threading can go wrong.
         http://groups.google.nl/groups?th=48e036477d4784ba

     Who said comp.lang.tcl is restricted to Tcl? It is also a fine
     place to learn a bit about C and why Tcl is more convenient than
     C.
         http://groups.google.nl/groups?th=da1397e0f5d3c5a0

     Discovering the location of 'My Documents' is not very hard. It
     is important to get it right however, as it may not even be called 'My
     Documents' but something like 'Mijn Documenten' or 'Mes Documents'.
         http://groups.google.nl/groups?th=12241daf19129128

     A lot of commands have interesting, but mostly harmless
     peculiarities. [array] is one of them.
         http://groups.google.nl/groups?th=a40f9c1ea229af41

     Want to save to save the contents of a [canvas] in an image file?
         http://groups.google.nl/groups?th=7e264aee307da289

     Run a python script from Tcl? It is probably simpler than you thought.
         http://groups.google.nl/groups?th=e86c366ee0c11b53

     How do you convert a user entered string into a correct call to [exec]?
         http://groups.google.nl/groups?th=75c33835aac525aa

     And finaly, using [tk_messageBox] right before an [entry] widget
     has a subtle buglet, with a simple work around.
         http://groups.google.nl/groups?hl=nl&lr=&th=8e569a5e06506314

Thanks to Arjen Markus for his report from the Wiki:
   Awesome, the variety in subjects of the pages that are created, updated and
   corrected each week! You Wiki chronicler tries, as always, to do his best
   to sieve out a handful of them on the basis of a completely arbitrary
   decision process ...

   Record whatever you can
   - No time to listen to the radio? Just record the programme with Snack:
     <http://wiki.tcl.tk/8583>

   - Ever wonder what you are doing all the time behind your keyboard, just
     wasting that time? Find out by taking snapshots: <http://wiki.tcl.tk/12576>

   - So your log files grow endlessly? No problem - just rotate them!
     <http://wiki.tcl.tk/12612> shows how

   People pages
   - The French Wiki has an interesting discussion going on -
     <http://wfr.tcl.tk/746>: how to teach children how to program and what
     programming environment would be appropriate. It is akin to the
     English page <http://wiki.tcl.tk/9058, but even more practical.

   - If you go abroad, maybe these fellow Tclers can help:
     <http://wiki.tcl.tk/12591>

   - Here is a little memory game with the amuzing feature that you play
     with the photos of some well-known Tclers: <http://wiki.tcl.tk/9279>

   Faits divers
   - This interesting idea deserves more attention: <http://wiki.tcl.tk/12523>
     discusses an alternative way to distribute Tcl-only extensions. If only
     there was a reasonable solution for the docs ....

   - What a nice idea, building your own wee little window manager ...
     <http://wiki.tcl.tk/12608>

   - In the summary of a week that saw so many mathematically-oriented pages
     added, at least one should be mentioned: <http://wiki.tcl.tk/12616>
     Quaternions are the four-dimensional cousins to complex numbers. It is
     up to you to see if they are really useful, but there are some surprising
     areas ...


Everything Tcl-related you want is probably one or two clicks away in these
pages:
     The "Welcome to comp.lang.tcl" message by Andreas Kupries
         http://www.purl.org/net/tcl-welcome

     The Tcl Developer Site is Tcl's "home base".
	 http://www.tcl.tk

     The Eleventh Mostly-Annual Tcl Conference will be this October.
	 http://www.tcl.tk/community/tcl2004/

     Larry Virden maintains a comp.lang.tcl FAQ launcher
         http://www.purl.org/NET/Tcl-FAQ/

     The Tcl Developer Xchange is a highly organized resource center
     of documents and software with provisions for individuals to
     maintain references to their own software:
         http://www.tcl.tk/resource/
     The TDX sponsor, ActiveState, also keeps info to convince your
     boss Tcl is a good thing
         http://www.tcl.tk/scripting/

     The Tcl'ers Wiki is a huge, dynamic, collaboratively edited repository
     of documentation, examples, tutorials and pontifications on all things
     Tcl.
         http://wiki.tcl.tk/0
     For the ideal overview of the topics about Tcl most likely to
     interest a newcomer, see "Arts and Crafts ..."
         http://wiki.tcl.tk/969

     ActiveState maintains binaries distribution and development tools
         http://www.activestate.com/Tcl
     along with a Cookbook of Tcl recipes
         http://aspn.activestate.com/ASPN/Cookbook/Tcl

     Cameron Laird tracks several Tcl/Tk references of interest
         http://phaseit.net/claird/comp.lang.tcl/

     Cetus Links maintains a Tcl/Tk page with verified links
         http://www.cetus-links.org/oo_tcl_tk.html

     Google Groups archives comp.lang.tcl.announce posts
         http://groups.yahoo.com/group/tcl_announce/

Previous - (U)se the (R)esource, (L)uke! - messages are listed here:
   http://www.ddj.com/topics/tclurl/
An alternative is
   http://groups.google.com/groups?oi=djq&as_q=+Tcl-URL&as_ugroup=comp.lang.tcl

Suggestions/corrections for next week's posting are always welcome.

To receive a new issue of this posting in e-mail each Monday, ask
<claird@...> to subscribe.  Be sure to mention "Tcl-URL!".
--
Dr. Dobb's Journal (http://www.ddj.com) is pleased to participate in and
sponsor the "Tcl-URL!" project.

[[Send Tcl/Tk announcements to tcl-announce@...
   Announcements archived at http://groups.yahoo.com/group/tcl_announce/
   Send administrivia to tcl-announce-request@...
   Tcl/Tk at http://tcl.tk/ ]]

#1933 From: Pascal Scheffers <tcl-url@...>
Date: Tue Oct 26, 2004 12:10 am
Subject: Dr. Dobb's Tcl-URL! - weekly Tcl news and links (Oct 5)
tcl-url@...
Send Email Send Email
 
Thanks to John Seal for his help preparing this week's digest.

QOTW: "creating new control structures via [uplevel] or [eval] is all
sorts of fun"
      -- Neil Madden

"Tcl is both insanely easy to learn and very difficult to learn for
different people"
      -- Bryan Oakley


POTW: Tcl/Tk Language Tutorial by Binny V A.
This is not actually a program, but rather an HTML-based Tcl/Tk
tutorial.  It was mentioned recently in a lengthy discussion on
comp.lang.tcl about the relative ease of learning Tcl/Tk compared
to other languages.
         http://www.geocities.com/binnyva/code/tcl/tutorial/index.html


     Is Tcl easy to learn? Yes, but you might need to unlearn a bit.
         http://groups.google.com/groups?th=a264fc1802d240c3
         http://groups.google.com/groups?th=4abd3afd19df6b9e

     [split] is a very useful when you want to turn a comma separated string
     into a list, but how do you split on a group of characters?
         http://groups.google.com/groups?th=41e8de64806d4f91

     If you compare 60.9 with 69.9 - 9.0, [expr] will tell you they are not
     the same. This may seem unexpected, but is easy to explain when you
     understand a tiny bit about floating point math.
         http://groups.google.com/groups?th=b0e052723a9bfd22

     Threading can be a useful tool if you need to do a lot of computations
     and need keep your user interface responsive, but there are simpler ways
     to get it done in Tcl.
         http://groups.google.com/groups?th=c281b10b99cabb1c

     Want do display an image from a website with just five lines of code?
         http://groups.google.com/groups?th=ac389112997ff336

      Seems like people are often asking how Tcl can use the full screen.
      TIP #223 to  the rescue!
          http://groups.google.com/groups?th=17614cb515122bfd

      The upcoming Tcl-2004 conference: So many tutorials, sessions,
      and papers... so little time!
          http://groups.google.com/groups?th=6c54787da1befb16

      If you want to bind things to a single-click, then you might also
      want to ignore double-clicks:
          http://groups.google.com/groups?th=4b81585a613076f8

Thanks to Arjen Markus for his report from the Wiki:
   This week, let us just list the pages that your Wiki chronicler found
   interesting for whatever reason: otherwise we would have as many categories
   as pages - it must be the leaves falling in this time of year on the
   northern hemisphere.
   - Make your Internet browser listen to you: <http://wiki.tcl.tk/2135>
     has the receipes for a popular one.

   - Chat and be heard (well, read): tkabber is a nice tool, as
     <http://wfr.tcl.tk/309> on the French Wiki witnesses

   - Ah, lists, almost as fundamental to Tcl as strings ... another shot
     at "list comprehension" at <http://wiki.tcl.tk/12574>

   - Now you see me, now you don't? No more hide-and-seek for icons in
     a Windows executable - <http://wiki.tcl.tk/12569>

   - Well, you may not identify the (natural) language for 100% certainty
     but try it anyway. If you are not satisfied with the result, you can
     always go the computational way (just follow the URL ...)
     - <http://wiki.tcl.tk/10261>

   - Here are two shots at that awesome XML stuff (note the double meaning
     of the word "awesome"):
     - <http://wiki.tcl.tk/12550> is a further elaboration of a wonderful
       little XML browser/editor
     - <http://wiki.tcl.tk/12529> is a fearless endeavour to achieve
       validation of an XML file

   - Just to keep the balance straight - the above is all too serious -
     here is a little toy: <http://wiki.tcl.tk/12558>


Everything Tcl-related you want is probably one or two clicks away in these
pages:
     The "Welcome to comp.lang.tcl" message by Andreas Kupries
         http://www.purl.org/net/tcl-welcome

     The Tcl Developer Site is Tcl's "home base".
	 http://www.tcl.tk

     The Eleventh Mostly-Annual Tcl Conference will be this October.
	 http://www.tcl.tk/community/tcl2004/

     Larry Virden maintains a comp.lang.tcl FAQ launcher
         http://www.purl.org/NET/Tcl-FAQ/

     The Tcl Developer Xchange is a highly organized resource center
     of documents and software with provisions for individuals to
     maintain references to their own software:
         http://www.tcl.tk/resource/
     The TDX sponsor, ActiveState, also keeps info to convince your
     boss Tcl is a good thing
         http://www.tcl.tk/scripting/

     The Tcl'ers Wiki is a huge, dynamic, collaboratively edited repository
     of documentation, examples, tutorials and pontifications on all things
     Tcl.
         http://wiki.tcl.tk/0
     For the ideal overview of the topics about Tcl most likely to
     interest a newcomer, see "Arts and Crafts ..."
         http://wiki.tcl.tk/969

     ActiveState maintains binaries distribution and development tools
         http://www.activestate.com/Tcl
     along with a Cookbook of Tcl recipes
         http://aspn.activestate.com/ASPN/Cookbook/Tcl

     Cameron Laird tracks several Tcl/Tk references of interest
         http://phaseit.net/claird/comp.lang.tcl/

     Cetus Links maintains a Tcl/Tk page with verified links
         http://www.cetus-links.org/oo_tcl_tk.html

     Google Groups archives comp.lang.tcl.announce posts
         http://groups.yahoo.com/group/tcl_announce/

Previous - (U)se the (R)esource, (L)uke! - messages are listed here:
   http://www.ddj.com/topics/tclurl/
An alternative is
   http://groups.google.com/groups?oi=djq&as_q=+Tcl-URL&as_ugroup=comp.lang.tcl

Suggestions/corrections for next week's posting are always welcome.

To receive a new issue of this posting in e-mail each Monday, ask
<claird@...> to subscribe.  Be sure to mention "Tcl-URL!".
--
Dr. Dobb's Journal (http://www.ddj.com) is pleased to participate in and
sponsor the "Tcl-URL!" project.

[[Send Tcl/Tk announcements to tcl-announce@...
   Announcements archived at http://groups.yahoo.com/group/tcl_announce/
   Send administrivia to tcl-announce-request@...
   Tcl/Tk at http://tcl.tk/ ]]

#1934 From: Pascal Scheffers <tcl-url@...>
Date: Tue Oct 26, 2004 12:36 am
Subject: Dr. Dobb's Tcl-URL! - weekly Tcl news and links (Oct 19)
tcl-url@...
Send Email Send Email
 
QOTW:  "Isn't Tcl just a cross-platform portability library written in C
that has a builtin facility for parsing config files?" -- rmax

"Hello...just wanted to say I am using Tile on TkAqua and it
  rules." -- wordtech


POTW:  The chatroom has lately given a lot of attention to Coccinella
and friends.
     http://wiki.tcl.tk/coccinella


     Want to pop up a tk_messageBox to your user, but not have a 'tk'
     window? Easy!
         http://groups.google.com/groups?th=7906d7e1ff47b637

     If you [exec someProgram], you might need both the exit code and the
     output from stdout. You can either use [bgexec], or combine [exec]
     and [catch]
         http://groups.google.com/groups?th=a17c543d738b574e

     Looking for the Nth occurrence of a word in a string is quite
     straightforward, but you have to do it right. You should not use the
     list commands, but rather the [string] command!
         http://groups.google.com/groups?th=4b22d0ad11c9eb23

     Using COM objects from a starkit? Yes you can, tcom is stubs
     enabled.
         http://groups.google.com/groups?th=554942a874fe9b0e

     More and more things can be done with pure Tcl, making your code
     ultimately portable. This week sees the addition of LZW GIF
     compression.
         http://groups.google.com/groups?&th=3cc69d27e7ae0ed2

     Backslashes. \\ or \ or \\\\? Always confusing.
         http://groups.google.com/groups?th=92c1d27c9edc101f

     Did you know you can [bind] multiple event handler to one event?
         http://groups.google.com/groups?th=cf3f973b535e1201

     There are several ways of learning Tcl, and although the conference
     tutorials might not be available for free, excellent material is
     available online. This one will get you started in no time at all,
     for free!
         http://groups.google.com/groups?th=7cc7e5cf016d0df8

Thanks to Arjen Markus for his report from the Wiki:
   Last week's conference generated its own Wiki pages, so that deserves its
   own section. But all is not conference-related, so read on!

   The conference
   - First of all, several slide shows are already available:
     <http://wiki.tcl.tk/12649>

   - The conference stirred a lot of interest in ways to "be there without
     actually being there". So:
     - an audio channel was set up - <http://wiki.tcl.tk/12643>
     - webcams were polled - <http://wiki.tcl.tk/12683>
     (and we will not detail the chat facilities ...)

   - Curious about the winner of the GUI contest? <http://wiki.tcl.tk/4005>
     leads you to this wonderful piece of software ...

   - Sometimes one talk leads to a new idea - <http://wiki.tcl.tk/12694>
     discusses the merits of "virtual framebuffers".

   Techniques
   - Watch those global variables come into existence - they can bite, you
   know:  <http://wiki.tcl.tk/12688>

   - Whatever you may think of CVS, it is a widely used version control
     system. And now you even embed into your Tcl application, for instance
     for automatic updating! <http://wiki.tcl.tk/12676>

   Murphy's law
   - "Murphy's law" is ubiquitous enough to justify this page:
     <http://wiki.tcl.tk/12645>. Add your anecdotes for the benefit of
     others.

   - Here is one application that may have suffered from it:
     <http://wiki.tcl.tk/6277> used to retrieve a nice map from whatever
     place on earth you asked for. Now it does not work anymore, apparently,
     due to external changes.


Everything Tcl-related you want is probably one or two clicks away in these
pages:
     The "Welcome to comp.lang.tcl" message by Andreas Kupries
         http://www.purl.org/net/tcl-welcome

     The Tcl Developer Site is Tcl's "home base".
	 http://www.tcl.tk

     The Eleventh Mostly-Annual Tcl Conference will be this October.
	 http://www.tcl.tk/community/tcl2004/

     Larry Virden maintains a comp.lang.tcl FAQ launcher
         http://www.purl.org/NET/Tcl-FAQ/

     The Tcl Developer Xchange is a highly organized resource center
     of documents and software with provisions for individuals to
     maintain references to their own software:
         http://www.tcl.tk/resource/
     The TDX sponsor, ActiveState, also keeps info to convince your
     boss Tcl is a good thing
         http://www.tcl.tk/scripting/

     The Tcl'ers Wiki is a huge, dynamic, collaboratively edited repository
     of documentation, examples, tutorials and pontifications on all things
     Tcl.
         http://wiki.tcl.tk/0
     For the ideal overview of the topics about Tcl most likely to
     interest a newcomer, see "Arts and Crafts ..."
         http://wiki.tcl.tk/969

     ActiveState maintains binaries distribution and development tools
         http://www.activestate.com/Tcl
     along with a Cookbook of Tcl recipes
         http://aspn.activestate.com/ASPN/Cookbook/Tcl

     Cameron Laird tracks several Tcl/Tk references of interest
         http://phaseit.net/claird/comp.lang.tcl/

     Cetus Links maintains a Tcl/Tk page with verified links
         http://www.cetus-links.org/oo_tcl_tk.html

     Google Groups archives comp.lang.tcl.announce posts
         http://groups.yahoo.com/group/tcl_announce/

Previous - (U)se the (R)esource, (L)uke! - messages are listed here:
   http://www.ddj.com/topics/tclurl/
An alternative is
   http://groups.google.com/groups?oi=djq&as_q=+Tcl-URL&as_ugroup=comp.lang.tcl

Suggestions/corrections for next week's posting are always welcome.

To receive a new issue of this posting in e-mail each Monday, ask
<claird@...> to subscribe.  Be sure to mention "Tcl-URL!".
--
Dr. Dobb's Journal (http://www.ddj.com) is pleased to participate in and
sponsor the "Tcl-URL!" project.

[[Send Tcl/Tk announcements to tcl-announce@...
   Announcements archived at http://groups.yahoo.com/group/tcl_announce/
   Send administrivia to tcl-announce-request@...
   Tcl/Tk at http://tcl.tk/ ]]

#1935 From: Pascal Scheffers <tcl-url@...>
Date: Tue Oct 26, 2004 12:44 am
Subject: Dr. Dobb's Tcl-URL! - weekly Tcl news and links (Oct 25)
tcl-url@...
Send Email Send Email
 
QOTW:  "The main thing about the TCT/maintainers is that we try to ensure
that engineering quality is maintained." -- Donal K. Fellows

antirez: "the Tcl core is very cool to modify, I feel at home without the
   usual 'ohh.. source code from other people' paranoia"
max: "antirez: that's a common experience of people looking into the Tcl
   core for the first time."
dkf: "There is a definite 'core style' which is verbose and clear. I do
   my best to enforce it strictly." -- Chatroom conversation


POTW:  aMSN is a nicely polished clone of "MSN Messenger" in functionality,
but one which far exceeds the original in portability and flexibility.
     http://amsn.sourceforge.net/


      Does Tk support a 'native look and feel'? Yes it does! With the
      latest Tile in place, Tk-based applications look exactly like
      "native apps".
          http://groups.google.com/groups?th=858d72ca5da6d720

      Metakit provides a simple, fast and robust way to store
      application data in a platform independant way. Viewing data
      inside a metakit file is simple too.
          http://groups.google.com/groups?th=256a7f397d53f452

      The capability for sending and receiving signals, like Control-C,
      is not in the 'core', but available in several easy to use
      extensions, should you need them.
          http://groups.google.com/groups?th=64be88ea85f20ec

      Need to call a 'C' function from a Tcl script? There are several
      ways, depending on your definition of a C function.
          http://groups.google.com/groups?th=182e072aa6805477

      Need to know your test coverage? Which code paths were executed by
      your test suite?
          http://groups.google.com/groups?th=e01942e828341fea

      If you need to convert IEEE floating point numbers to a string,
      but your cpu cannot do it, Tcl can do it for you.
          http://groups.google.com/groups?th=7bb7aee01ba7fc81

      Considering MacOSX? Tcl is available of course and Tk looks just
      as good as a native Aqua application.
          http://groups.google.com/groups?th=97c9064ca237a767

Thanks to Arjen Markus for his report from the Wiki:
   Sometimes the various Tcl communication media that your Wiki chronicler
   uses magically converge: one and the same subject pops up as, say, a
   Wiki page, a TIP and a topic in the chatroom. The [range] command is such
   a subject. Just see <http://wiki.tcl.tk/10797> for the Wiki part...

   Questions and answers
   - Do you know the page "Ask and it shall be given?" Well, it is really
     lengthy. But now it has been split up, so that the answers are
     easier to find: <http://wiki.tcl.tk/12754>

   - Curious about Tcl/Tk 8.5? here is the roadmap -
     <http://wiki.tcl.tk/12753> - for the curious and the volunteers

   - Having trouble building a starpack? It ought not be too difficult:
     <http://wiki.tcl.tk/10558>

   - Here you can find the answer to a frequent medical question:
     when to expect the baby? <http://wiki.tcl.tk/12708>

   Faits divers
   - Constructing mathematical formulas: an emerging application of Bwise
     - <http://wiki.tcl.tk/12737>

   - Tired of those complicated commands to configure your IP tables?
     <http://wiki.tcl.tk/12735> wraps them up for you, but no warranty,
     mind you!

   - So, here you are, with an electronic stream of interesting sounds,
     and how do you make acoustic waves from that? Apart from the
     required hardware, here is a simple script to take care of the
     software: <http://wiki.tcl.tk/12619>


Everything Tcl-related you want is probably one or two clicks away in these
pages:
     The "Welcome to comp.lang.tcl" message by Andreas Kupries
         http://www.purl.org/net/tcl-welcome

     The Tcl Developer Site is Tcl's "home base".
	 http://www.tcl.tk

     The Eleventh Mostly-Annual Tcl Conference will be this October.
	 http://www.tcl.tk/community/tcl2004/

     Larry Virden maintains a comp.lang.tcl FAQ launcher
         http://www.purl.org/NET/Tcl-FAQ/

     The Tcl Developer Xchange is a highly organized resource center
     of documents and software with provisions for individuals to
     maintain references to their own software:
         http://www.tcl.tk/resource/
     The TDX sponsor, ActiveState, also keeps info to convince your
     boss Tcl is a good thing
         http://www.tcl.tk/scripting/

     The Tcl'ers Wiki is a huge, dynamic, collaboratively edited repository
     of documentation, examples, tutorials and pontifications on all things
     Tcl.
         http://wiki.tcl.tk/0
     For the ideal overview of the topics about Tcl most likely to
     interest a newcomer, see "Arts and Crafts ..."
         http://wiki.tcl.tk/969

     ActiveState maintains binaries distribution and development tools
         http://www.activestate.com/Tcl
     along with a Cookbook of Tcl recipes
         http://aspn.activestate.com/ASPN/Cookbook/Tcl

     Cameron Laird tracks several Tcl/Tk references of interest
         http://phaseit.net/claird/comp.lang.tcl/

     Cetus Links maintains a Tcl/Tk page with verified links
         http://www.cetus-links.org/oo_tcl_tk.html

     Google Groups archives comp.lang.tcl.announce posts
         http://groups.yahoo.com/group/tcl_announce/

Previous - (U)se the (R)esource, (L)uke! - messages are listed here:
   http://www.ddj.com/topics/tclurl/
An alternative is
   http://groups.google.com/groups?oi=djq&as_q=+Tcl-URL&as_ugroup=comp.lang.tcl

Suggestions/corrections for next week's posting are always welcome.

To receive a new issue of this posting in e-mail each Monday, ask
<claird@...> to subscribe.  Be sure to mention "Tcl-URL!".
--
Dr. Dobb's Journal (http://www.ddj.com) is pleased to participate in and
sponsor the "Tcl-URL!" project.

[[Send Tcl/Tk announcements to tcl-announce@...
   Announcements archived at http://groups.yahoo.com/group/tcl_announce/
   Send administrivia to tcl-announce-request@...
   Tcl/Tk at http://tcl.tk/ ]]

#1936 From: adrian@...
Date: Tue Oct 26, 2004 12:17 am
Subject: ANNOUNCE: GRIDPLUS 1.1 - A Grid Based Screen Building Tool For TCL/TK
adrian@...
Send Email Send Email
 
GRIDPLUS 1.1 has been released and is available from:

http://www.satisoft.com/tcltk/gridplus

ENHANCEMENTS:
====================
*) The "text" widget now has an "HTML style" tags processing mode. The
tags can be used to set attributes (font, font size,
foreground/background colours, underline and bold), set text
indenting, create links (To move the display to other parts of the
text or to invoke TCL procedures), embed images or ICONS package icons
(Which may also be links or invoke TCL procedures).

*) New GRIDPLUS "goto" command/mode to allow the "text" widget to be
moved to a label tag under script control.

*) Support for cascading menus.

*) New "-linkcursor" option to set style of mouse pointer when over
GRIDPLUS"link" or "text" links.

*) The tablelist now supports the "-selectmode" option. When
"extended" or "multiple" modes are used, the value returned is always
a list where each element is a row. This is NOT the default behaviour
where the value, when only one row is selected, is a list in which
each element is a column.

*) The "Phonebook" example application has had on-line help text added
using "tagged" text.

*) New Example Application which makes use of the GRIDPLUS text tags
facility, the Tablelist "-action single" option, uses the GRIDPLUS
"link" to create a toolbar, and is also another demonstration which
uses GRIDPLUS styles and the Tcl/Tk option database.

CHANGES:
====================
*) GRIDPLUS now sets "wm resizable .window 0 0" for all windows.

BUG FIXES:
====================
*) The "*Gridplus.pad" option database setting now works.

*) Tablelist "-exportselection" is now set to zero to fix problem when
making selections from multiple tablelists.

WHAT IS GRIDPLUS:
====================
GRIDPLUS is a package intended to simplify GUI screen layout
development for TCL/TK programmers. GRIDPLUS is the second in a series
of packages aimed at producing a framework for
development/distribution of "database" applications written in TCL/TK,
but I feel that some of the packages may also be of more general
interest. The first package ICONS, released 2002
(http://www.satisoft.com/tcltk/icons), was originally developed to be
used with GRIDPLUS.

Firstly: GRIDPLUS is not a "Visual" design tool.

GRIDPLUS is a "Grid" based layout system which builds on, simplifies
and extends the existing grid manager. GRIDPLUS layouts are defined as
a hierarchy of grids. Each cell in a grid consists of two elements.
These  will usually be a text label and some other widget such as an
entry. It is also allowed to have just one element in a cell, or a
cell which is empty. GRIDPLUS grids can also be stretched to neatly
fill the cells in which they are positioned. While the GRIDPLUS grid
can be used "native", GRIDPLUS commands exist to create grids of
Buttons, Checkbuttons, Entries, Links and Radiobuttons. All places
where text can be displayed make use of the TCL message catalogue
facility.

In effect GRIDPLUS is much more than an alternative to the grid
geometry manager, it provides most, if not all, of the facilities
required to build complete screens/windows. Although aimed at
producing data entry/update/display form screens for database
applications, it may be useful for other tasks.

GRIDPLUS also includes the following features:-

*) Scrollable text widget.
*) Scrollable tablelist .
*) Basic notebook type widget.
*) Simple drop-down menus.
*) Simple method to specify widget traversal order when using the TAB
    key to navigate the screen.
*) A group facility to enable/disable groups of widgets and menu
    options.
*) Facility to include non-GRIDPLUS widgets in groups.
*) Simple pattern/procedure based entry validations.
*) Works with toplevel windows.

Best Regards,
    =Adrian=

[[Send Tcl/Tk announcements to tcl-announce@...
   Announcements archived at http://groups.yahoo.com/group/tcl_announce/
   Send administrivia to tcl-announce-request@...
   Tcl/Tk at http://tcl.tk/ ]]

#1937 From: Michael Kirkham <mikek@...>
Date: Tue Oct 26, 2004 12:30 am
Subject: ANNOUNCE: MIB Smithy SDK 3.1 with MacOS X support
mikek@...
Send Email Send Email
 
I'm pleased to announce the availability of version 3.1 beta of MIB
Smithy SDK.

MIB Smithy SDK is a dynamic extension to Tcl/Tk (8.1+) that allows
development of custom scripts for controlling SNMP agents
and manipulating and converting MIB and PIB module specifications to
arbitrary formats.  It is based on the core of Muonics' MIB Smithy
visual MIB/PIB editor/compiler environment and supports SMI versions 1
and 2, COPS-PR-SPPI, and SNMP versions 1 through 3 with authentication
and privacy, support for multiple discrete SMI databases and SNMP
sessions and all the built-in validation capabilities of MIB Smithy.

MIB Smithy SDK is supported on Windows, Linux, FreeBSD, Solaris and, with
this release, MacOS X.

Other significant changes in this release include:

- New memory management in the MIB parser and database that requires less
memory and fewer allocations/copies, improving MIB loading speed by
15 - 20%.

- Support for Scotty's nmtrapd/straps daemon for receiving traps on port
162 without requiring root privileges.  An optional replacement for the
daemon is included that provides more configurability and is compatible
with both.

- Better suppression of some redundant compiler messages and additional
details and clarifications to others.

- Minor bug fixes.

Further details and a 15-day limited evaluation can be found at:

http://www.muonics.com/Products/MIBSmithySDK/

--
Michael Kirkham
Muonics
http://www.muonics.com/

[[Send Tcl/Tk announcements to tcl-announce@...
   Announcements archived at http://groups.yahoo.com/group/tcl_announce/
   Send administrivia to tcl-announce-request@...
   Tcl/Tk at http://tcl.tk/ ]]

#1938 From: Andrés García <fandom@...>
Date: Tue Oct 26, 2004 12:32 am
Subject: Ann TclCurl 0.12.2
fandom@...
Send Email Send Email
 
Hi,

I have just released a new version of TclCurl updated for libcurl 7.12.2,
with TclCurl you can download and upload files using protocols like
ftp, http, https, ldap, telnet, dict, gopher and file.

     * New features:

         * You can now share dns and cookie information among TclCurl
           handles, please check the docs for details.

         * New configure option: 'ftpsslauth', you may need this option
           because of servers like BSDFTPD-SSL from won't work properly
           when "AUTH SSL" is issued but require "AUTH TLS" instead.

         * Added three new commands to the 'curl' namespace:

             * curl::easystrerror    errorCode

             * curl::sharestrerror  errorCode

             * curl::multistrerror   errorCode

           All three will return a string explaining what the given error
           number means.

     * Bug fix:

         * Ralph Mitchell reported that the 'cookiejar' option wouldn't
           work in the latest version, it should now.

Since the last TclCurl, there has been many bugfixes in libcurl which
you can check:

http://curl.haxx.se/changes.html

For more information, please visit:

http://personal1.iddeo.es/andresgarci/tclcurl/english/index.html

Share the wonders,
Andres

[[Send Tcl/Tk announcements to tcl-announce@...
   Announcements archived at http://groups.yahoo.com/group/tcl_announce/
   Send administrivia to tcl-announce-request@...
   Tcl/Tk at http://tcl.tk/ ]]

#1939 From: Andreas Kupries <akupries@...>
Date: Tue Oct 26, 2004 12:14 am
Subject: Tcllib 1.7 released
akupries@...
Send Email Send Email
 
tcllib is a Tcl-only library of standard routines for Tcl (no
compiling required). This release is a minor version change which
fixes numerous bugs and provides enhancements as well.


Tcllib 1.7 release notes
========================

Hello World, welcome to Tcllib 1.7.

This release is a minor version change which fixes numerous bugs and
provides enhancements as well, to existing modules, and via newly
added modules.


Availability
------------

The released distributions can be downloaded from

<http://sourceforge.net/project/showfiles.php?group_id=12883&package_id=24585&re\
lease_id=273359>

Available are gzipped, zipped, and bzipped tarballs, and a starkit.


Installation
------------

* For the starkit and starpack just execute the file and a GUI
based installer will pop up. Fill out the paths, then run
the installation.

* For the tarballs unpack them in some directory /foo, then run
the file "/foo/installer.tcl". This will invoke the same
installer used in the starkit and starpack.

Note: While the installer will open up a GUI by default (and if
possible), a command line based installation is provided too. Run the
installer with the option "-help" to see what is available.


Acknowledgments
---------------

Many thanks to

Aaron Faupell <afaupell at users dot sourceforge dot net>
Andreas Kupries <andreas_kupries at users dot sourceforge dot net>
Arjen Markus <arjenmarkus at users dot sourceforge dot net>
Brent Welch <welch at ajubasolutions dot com>
Brett Schwarz <schwarzkopf at users dot sourceforge dot net>
Colin McCormack <coldstore at users dot sourceforge dot net>
Dan Kuchler <kuchler at ajubasolutions dot com>
David N. Welton <davidw at dedasys dot com>
Don Porter <dgp at users dot sourceforge dot net>
Donal K. Fellows <fellowsd at cs dot man dot ac dot uk>
Eric Melski <ericm at scriptics dot com>
Gerald Lester <gwlester at users dot sourceforge dot net>
Jeff Hobbs <jeffh at ActiveState dot com>
Joe English <jenglish at users dot sourceforge dot net>
Johannes-Heinrich Vogeler <vogeler at sourceforge dot net>
Kevin Kenny <kennykb at users dot sourceforge dot net>
Melissa Chawla <hershey at scriptics dot com>
Michael Schlenker <mic42 at users dot sourceforge dot net>
Miguel Sofer <mig at utdt dot edu>
Pat Thoyts <patthoyts at users dot sourceforge dot net>
Peter MacDonald <peter at pdqi dot com>
Reinhard Max <max at suse dot de>
Ross Mohn <rpmohn at panix dot com>
Sandeep Tamhankar <sandeep at scriptics dot com>
Scott Redman <redman at scriptics dot com>
Scott Stanton <stanton at scriptics dot com>
Steffen Traeger <Steffen dot Traeger at t-online dot de>
Steve Ball <Steve dot Ball at zveno dot com>
Will Duquette <will at wjduquette dot com>


and all the people who submitted bug reports and patches.


Bug reports, patches, requests for enhancements (RFEs)
-----------------------------------------------------

Please submit bug reports, patches and RFEs at

[Bugs] <http://sourceforge.net/tracker/?group_id=12883&atid=112883>
[Patches] <http://sourceforge.net/tracker/?group_id=12883&atid=312883>
[RFEs] <http://sourceforge.net/tracker/?group_id=12883&atid=362883>


New in Tcllib 1.7
=================
                                         Tcllib 1.7
Module          Package                 New Version     Comments
------          -------                 -----------
-------------------------------
asn                                     0.1             Partial ASN de- &
encoder.
bee                                     0.1             B de- & encoder
(BitTorrent Serialization)
------          -------                 -----------
-------------------------------
dns             ip                      1.0.0           IP address manipulation
                 spf                     1.1.0           Sender Policy Framework
------          -------                 -----------
-------------------------------
grammar_fa      grammar::fa             0.1             Finite Automaton
Container
                 grammar::fa::dacceptor  0.1             FA acceptor
                 grammar::fa::dexec      0.1             FA interpreter
                 grammar::fa::op         0.1             FA operations
------          -------                 -----------
-------------------------------
http            autoproxy               1.2.0           Http proxy
------          -------                 -----------
-------------------------------
ident                                   0.42            RFC 1413 IDENT client
jpeg                                    0.1             JPEG images, meta data
manipulation
ldap                                    1.2             RFC 2251 LDAP client
------          -------                 -----------
-------------------------------
math            math::complexnumbers    1.0             Complex number
arithmetics
                 math::constants         1.0             Important mathematical
constants
                 math::interpolate       1.0             Interpolation for
n-dimensional data
                 math::polynomials       1.0             Polynomial arithmetics
                 math::rationalfunctions 1.0             Arithmetics on
rationals over polynomials
                 math::special           0.1             Bessel functions,
Elliptics, ...
                 math::fourier           1.0             Fourier Transform
------          -------                 -----------
-------------------------------
png                                     0.1             PNG images, meta data
manipulation
rc4                                     1.0.0           RC4 stream cipher
------          -------                 -----------
-------------------------------
ripemd          ripemd128               1.0.0           RIPEMD Hash algorithm
                 ripemd160               1.0.0
------          -------                 -----------
-------------------------------
tar                                     0.1             Tar file creation &
manipulation
------          -------                 -----------
-------------------------------
tie             tie                     1.0             Persistence for Tcl
arrays.
                 tie::std::array         1.0             Various data sources
for the
                 tie::std::dsource       1.0             persistence.
                 tie::std::file          1.0
                 tie::std::log           1.0
                 tie::std::rarray        1.0
------          -------                 -----------
-------------------------------
treeql                                  1.1             Tree Query Language,
CoST inspired
------          -------                 -----------
-------------------------------
uuid                                    1.0.0           Generation of
universally unique identifiers
------          -------                 -----------
-------------------------------


Changes from Tcllib 1.6 to 1.7
==============================

Legend
         API:    ** incompatible ** API changes. > Implies change of major
version.
         EF :    Extended functionality, API.    > Implies change of minor
verson.
         B  :    Bug fixes.                     \
         D  :    Documentation updates.          > Implies change of patchlevel.
         EX :    New examples.                   >
         P  :    Performance enhancement.       /
         TS :    Test suite fix                 /

                                 Tcllib 1.6.1    Tcllib 1.7
Module          Package         Old version     New Version     Comments
------          -------         -----------     -----------
-------------------------------
base64          base64          2.3             2.3.1           D
                 uuencode        1.1.1           1.1.2           B
                 yencode         1.1             1.1.1           D
------          -------         -----------     -----------
-------------------------------
crc             crc32           1.1.1           1.2             BF
------          -------         -----------     -----------
-------------------------------
cmdline                         1.2.2           1.2.3           D, TS
comm                            4.2             4.2.1           D
counter                         2.0.2           2.0.3           B, P
des                             0.8.1           0.8.2           P
------          -------         -----------     -----------
-------------------------------
dns             dns             1.1             1.2.0           B, EF (ipv6)
------          -------         -----------     -----------
-------------------------------
doctools        doctools        1.0.2           1.1             D, B, P, EF
                 - changelog     0.1             0.1.1           D
                 - cvs           0.1             0.1.1           D
                 - idx           0.1             0.2             D, B, EF
                 - toc           0.1             0.2             D, B, EF
------          -------         -----------     -----------
-------------------------------
exif                            1.1.1           1.1.2           B
fileutil                        1.6.1           1.7             EF, D, TS
ftpd                            1.2.1           1.2.2           B
html                            1.2.2           1.2.3           D
htmlparse                       1.0             1.1             B, EF (empty
tags)
irc                             0.4             0.5             P, EF (logger)
------          -------         -----------     -----------
-------------------------------
log             log             1.1.1           1.2             D, EF
                 logger          0.3             0.5             B, EF
------          -------         -----------     -----------
-------------------------------
math            - calculus      0.5.1           0.6             EF (regula
falsi)
                 - optimize      0.1             0.2             EF
                 - statistics    0.1.1           0.1.2           P
                 - geometry      1.0.1           1.0.2           D
------          -------         -----------     -----------
-------------------------------
mime            mime            1.3.6           1.4             Sync
                 smtp            1.3.6           1.4             D, EF (auth,
sasl)
------          -------         -----------     -----------
-------------------------------
ntp             time            1.0.3           1.1             B
------          -------         -----------     -----------
-------------------------------
pop3                            1.6.1           1.6.2           TS
------          -------         -----------     -----------
-------------------------------
pop3d           pop3d           1.0.2           1.0.3           B (md5 switch)
                 - dbox          1.0.1           1.0.2           TS
------          -------         -----------     -----------
-------------------------------
smtpd                           1.2.1           1.3.0           B, EF (secure)
------          -------         -----------     -----------
-------------------------------
snit                            0.93            0.97            API, EF
(macros, pragmas, hierarchical)
------          -------         -----------     -----------
-------------------------------
struct                          2.0             2.1             Exploded into
many packages
                 - graph                         2.0             B
                 - list                          1.4              --
                 - matrix                        2.0             B
                 - pool                          1.2.1            --
                 - prioqueue                     1.3              --
                 - queue                         1.3             B
                 - record                        1.2.1           B
                 - set                           2.1             B
                 - skiplist                      1.3             P
                 - stack                         1.3             B
                 - tree                          2.0             B, EF
------          -------         -----------     -----------
-------------------------------
textutil        textutil        0.6.1           0.6.2           B
                 - expander      1.2.1           1.3             TS, D, B, EF
(location)
------          -------         -----------     -----------
-------------------------------
uri             uri::urn        1.0.1           1.0.2           B
------          -------         -----------     -----------
-------------------------------

Unchanged Modules/Packages
==========================

calendar, crc (cksum, crc16, sum), control, csv, dns (resolv),
ftp (ftp, ftp::geturl), inifile, javascript, math (math::fuzzy), md4,
md5, md5crypt, multiplexer, ncgi, nntp, profiler, report, sha1,
soundex, stoop (stooop, switched), pop3d (pop3d::udb), uri


--
So long,
	 Andreas Kupries <akupries@...>
			 <http://www.purl.org/NET/akupries/>
	 Developer @ <http://www.activestate.com/>
---------------------------------------------------------------------------

[[Send Tcl/Tk announcements to tcl-announce@...
   Announcements archived at http://groups.yahoo.com/group/tcl_announce/
   Send administrivia to tcl-announce-request@...
   Tcl/Tk at http://tcl.tk/ ]]

#1940 From: Salvatore Sanfilippo <antirez@...>
Date: Tue Oct 26, 2004 12:43 am
Subject: TIP #225: Arithmetic Series with Optimized Space Complexity
antirez@...
Send Email Send Email
 
TIP #225: ARITHMETIC SERIES WITH OPTIMIZED SPACE COMPLEXITY
=============================================================
  Version:      $Revision: 1.1 $
  Author:       Salvatore Sanfilippo <antirez_at_invece.org>
  State:        Draft
  Type:         Project
  Tcl-Version:  8.5
  Vote:         Pending
  Created:      Monday, 25 October 2004
  URL:          http://purl.org/tcl/tip/225.html
  WebEdit:      http://purl.org/tcl/tip/edit/225
  Post-History:

-------------------------------------------------------------------------

  ABSTRACT
==========

  This TIP proposes to add a new command to generate arithmetic sequences
  as Tcl lists that may be stored in constant space in many practical
  situations. The only change from the point of view of the Tcl
  programmer is the addition of a new command named *range*.

  RATIONALE
===========

  An idiomatic way to assign successive elements of an arithmetic series
  to a variable is to use the *for* command. Usually the loop variable is
  initialized to the first element of the sequence, and incremented at
  every iteration of a given step using *incr*. The *for* test condition
  is used to limit the sequence generation to a given element, like in
  the following example:

    for {set i 0} {$i < 10} {incr i} {
        puts $i
    }

  The Tcl programming language is at higher level than the C language,
  where this idiom firstly appeared, so it may be desiderable to be able
  to generate arithmetic sequences of integer numbers in a more
  comfortable way. Being the Tcl list a central data structure of the Tcl
  language, it apperas natural to generate a Tcl list of integers, and
  possibly use the *foreach* command to loop over every element, so that
  the above *for* loop can be translated into the following fragment of
  code:

    foreach i [range 0 10] {
        puts $i
    }

  The *range* command can be also conveniently used in different
  contexts. The following code generates a list of squares of 0, 1, 2, 3,
  ... 9.

    proc map {varname script mylist} {
        upvar $varname var
        set res {}
        foreach var $mylist {
            lappend res [uplevel 1 $script]
        }
        return $res
    }

    puts [map x {expr {$x*$x}} [range 0 10]]

    # Will output "0 1 4 9 16 25 36 49 64 81"

  The *range* command can be implemented in a way that makes it possible
  to internally store the arithmetic sequences genereated in constant
  space if they are only accessed using *foreach*, *llength* and *lindex*
  commands (*lrange* may also be handled in a special way). When needed,
  the object will be converted into a List object automatically. From the
  Tcl programmer point of view this optimization is transparent.

  SPECIFICATION OF THE BEHAVIOUR
================================

  The *range* command takes three arguments in the complete format, named
  /start/, /end/ and /step/, and generates a sequence of integers
  accordingly to the following algorithm in pseudo code:

    RangeLen(start, end, step)
    1. if step = 0
    2.     then ERROR
    3. if start = end
    4.     then return 0
    5. if step > 0 AND start > end
    6.     then ERROR
    7. if setp < 0 AND end > start
    8.     then ERROR
    9. return 1+((ABS(end-start)-1)/ABS(step))

    Range(start, end, step)
    1. result <- EMPTY LIST
    2. len <- RangeLen(start, end, step)
    3. for i <- 0 to len - 1
    4.     result.append(start+(i*step))
    6. return result

  The /step/ argument can be omitted, and default to the value of 1, so
  [*range* 0 10 1] is the same as [*range* 0 10]. It's also possible to
  call the *range* command with a single argument, omitting both the
  /start/ and /step/ argument that will default respectively to 0 and 1,
  so that the following three commands will generate the same sequence of
  integers:

    range 0 10 1
    range 0 10
    range 10

  The following are examples of outputs.

    [range 0 10 1] => 0 1 2 3 4 5 6 7 8 9
    [range 10 0 -2] => 10 8 6 4 2
    [range 10 10] => empty list
    [range 10 20 -3] => ERROR
    [range 5] -> 0 1 2 3 4

  Infinite series and series resulting in lists bigger than the maximum
  list length that the Tcl code can handle are detected and reported as
  an error. /start/, /end/, and /step/ can be anything can fit into a Tcl
  wide integer.

  Note that there is a practical justification for the fact that the
  elements generated never reach the value of the End argument, with the
  effect of [*range* 0 10 1] generating the sequence 0, 1, 2, ..., 9 and
  a range with the same value of /start/ and /step/ always generating an
  emtpy list. This is needed in order to make it comfortable to use
  *range* and *foreach* instead of *for* loops like in the following
  example:

    foreach i [range [llength $mylist]] {
        foobar [lindex $mylist $i]
    }

  Because Tcl indexes are mostly zero-based, and it is often useful to
  access every element of a sequence given it's length, this appears to
  be the more sensible behaviour (this semantic is very similar to the
  range() function of the Python programming language, where range() is
  fully used to replace C-like /for/ loops.)

  Unfortunately this behaviour is not as comfortable to run the indexes
  in reverse order:

    foreach i [range [expr {[llength $mylist]-1}] -1 -1] {
        foobar [lindex $mylist $i]
    }

  But the access from the first to the last element is far more common in
  programs, and the range command needs to be consistent when the step is
  negative.

  An alternative syntax for reverse-indexing is:

    foreach i [range [llength $mylist]] {
       foobar [lindex $mylist end-$i]
    }

  PROPOSED CHANGE
=================

  The change proposed is to modify the Tcl core in order to handle a new
  object type called ArithSeries, that is recongnized and handled as a
  special case by at least the *llength*, *lindex* and *foreach*
  commands. Syntactically, the ArithSeries object will have the string
  representation that is exactly that that would be produced by creating
  a list with the elements that would be iterated over by *foreach* as
  previously described. This TIP also proposes to add logic into
  /SetListFromAny/ method of the List type in order to convert an
  Arithmetic Series object into a List directly without to pass from the
  string representation.

  This TIP proposes to add a *range* command to the Tcl core having the
  semantics specified above, and returning an Arithmetic Series object.
  Formally, the syntax is:

        *range* ?/start/? /end/ ?/step/?

  The proposed changes are available as a Patch against HEAD that can be
  found in the SourceForge Tcl patch 1052584
 
[<URL:http://sf.net/tracker/?func=detail&aid=1052584&group_id=10894&atid=310894>\
]

  COPYRIGHT
===========

  This document has been placed in the public domain.

-------------------------------------------------------------------------

  APPENDIX: REFERENCE PURE-TCL IMPLEMENTATION
=============================================

  It may be useful to test the behaviour of the *range* command without
  having to apply the Patch, so the following is a pure Tcl
  implementation that should be exactly equivalent in the semantic to the
  specification in this TIP, but of course not able to store ranges in
  O(1) space.

    # RangeLen(start, end, step)
    # 1. if step = 0
    # 2.     then ERROR
    # 3. if start = end
    # 4.     then return 0
    # 5. if step > 0 AND start > end
    # 6.     then ERROR
    # 7. if setp < 0 AND end > start
    # 8.     then ERROR
    # 9. return 1+((ABS(end-start)-1)/ABS(step))
    proc rangeLen {start end step} {
        if {$step == 0} {return -1}
        if {$start == $end} {return 0}
        if {$step > 0 && $start > $end} {return -1}
        if {$step < 0 && $end > $start} {return -1}
        expr {1+((abs($end-$start)-1)/abs($step))}
    }

    # Range(start, end, step)
    # 1. result <- EMPTY LIST
    # 2. len <- RangeLen(start, end, step)
    # 3. for i <- 0 to len - 1
    # 4.     result.append(start+(i*step))
    # 6. return result
    proc range args {
        # Check arity
        set l [llength $args]
        if {$l == 1} {
            set start 0
            set step 1
            set end [lindex $args 0]
        } elseif {$l == 2} {
            set step 1
            foreach {start end} $args break
        } elseif {$l == 3} {
            foreach {start end step} $args break
        } else {
            error {wrong # of args: should be "range ?start? end ?step?"}
        }

        # Generate the range
        set rlen [rangeLen $start $end $step]
        if {$rlen == -1} {
            error {invalid (infinite?) range specified}
        }
        set result {}
        for {set i 0} {$i < $rlen} {incr i} {
            lappend result [expr {$start+($i*$step)}]
        }
        return $result
    }

-------------------------------------------------------------------------

  TIP AutoGenerator - written by Donal K. Fellows

[[Send Tcl/Tk announcements to tcl-announce@...
   Announcements archived at http://groups.yahoo.com/group/tcl_announce/
   Send administrivia to tcl-announce-request@...
   Tcl/Tk at http://tcl.tk/ ]]

#1941 From: Pat Thoyts <cng@...>
Date: Tue Oct 26, 2004 12:39 am
Subject: ANNOUNCE: tclstorage and stgvfs
cng@...
Send Email Send Email
 
-----BEGIN PGP SIGNED MESSAGE-----


The Storage package is Tcl extension that adds a 'storage' command to
Tcl and provides access to Microsoft's "Structured Storage" file
format.  Structured storages are used extensively to provide
persistence for OLE or COM components. The format presents a
filesystem-like hierarchy of storages and streams that maps well into
Tcl's virtual filesystem model.

Notable users of structured storages are Microsoft Word and Excel.

See http://www.patthoyts.tk/index.html#tclstorage for files and
documentation.

A virtual filesystem based upon the Storage extension is also provided
which makes it possible for Tcl to mount storage files (.doc, .xls,
..ppt and others) as a directory and to handle the content streams as
files.

- --
Pat Thoyts          http://www.zsplat.freeserve.co.uk/resume.html
To reply, rot13 the return address or read the X-Address header.
PGP fingerprint 2C 6E 98 07 2C 59 C8 97  10 CE 11 E6 04 E0 B9 DD

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3ia
Charset: noconv

iQCVAwUBQXgNamB90JXwhOSJAQH08AP+KxFn6EOVEOkGmtx7WFmdPESDkCU9xloz
3kgXvwrJx0IUb6rJ0y2Dcu5KiSo5R3GTOfzOD5w748/fC4ggncN+UVWx+5LVZPkU
hJvSzzTWEMydReHHMw6nQEx4qXW93PIBt/kewzliL0LfaIDY/8os4f3FhZZSrmfF
iCdiWYXDv/k=
=HtTZ
-----END PGP SIGNATURE-----

[[Send Tcl/Tk announcements to tcl-announce@...
   Announcements archived at http://groups.yahoo.com/group/tcl_announce/
   Send administrivia to tcl-announce-request@...
   Tcl/Tk at http://tcl.tk/ ]]

#1942 From: csaba.nemethi@...
Date: Tue Oct 26, 2004 5:35 pm
Subject: ANNOUNCE: Multi-column listbox package Tablelist 3.6
csaba.nemethi@...
Send Email Send Email
 
I am pleased to announce Version 3.6 of the multi-column listbox
package Tablelist.

What is new in Tablelist 3.6?
-----------------------------

1.  Support for embedded windows, with the aid of the new cell
      configuration option "-window" (thanks to Wolf Grossi, Glenn
      Herteg, Takeshi Sakamoto, and Keesang Song for proposing this
      option).

2.  New demo script "embeddedWindows.tcl" illustrating the use of
      embedded windows in tablelist widgets; this is discussed in a new
      section of the tutorial "tablelist.html".

3.  Significantly improved and optimized the handling of embedded
      images.

4.  Simplified the support for user-defined binding scripts with the
      aid of the new commands "tablelist::getTablelistPath" and
      "tablelist::convEventFields", as well as of a new binding tag whose
      name is returned by the new "bodytag" subcommand (which is now used
      in the demo script "browse.tcl").

5.  Support for the new virtual events <<TablelistRowMoved>>,
      <<TablelistColumnMoved>>, <<TablelistColumnSorted>> and
      <<TablelistCellUpdated>> (thanks to John Vidolich for his
      proposal).  In addition, the new virtual event <<TablelistSelect>>
      can now be used instead of <<ListboxSelect>> (which is supported
      for compatibility reasons).

6.  New subcommand "itemlistvar", for accessing the tablelist widget's
      internal list (thanks to Patrick Fradin for his valuable input).

7.  Fixed a bug related to the "-listvariable" option, introduced in
      the previous Tablelist release (thanks to Torsten Reincke for his
      bug report).

8.  Fixed two bugs related to the "cellselection" subcommand (thanks to
      John Vidolich for his bug report).

9.  Fixed a few typos and minor bugs in the default binding scripts
      (thanks to Patrick Fradin, Tore Morkemo, and Torsten Reincke for
      their bug reports).

10. Numerous further improvements and minor bug fixes.

What is Tablelist?
------------------

Tablelist is a library package for Tcl/Tk version 8.0 or higher,
written in pure Tcl/Tk code.  It contains:

    - the implementation of the "tablelist" mega-widget, including a
      general utility module for mega-widgets;
    - a demo script containing a useful procedure that displays the
      configuration options of an arbitrary widget in a tablelist and
      enables you to edit their values interactively;
    - a second demo script, implementing a simple widget browser based on
      a tablelist;
    - a third demo script, showing several ways to improve the appearance
      of a tablelist widget;
    - three further demo scripts, illustrating the interactive cell
      editing with the aid of various widgets from the Tk core and from
      the packages BWidget, Iwidgets, combobox (by Bryan Oakley), and
      Mentry;
    - one further demo script, with a tablelist widget containing
      embedded windows;
    - a tutorial in HTML format;
    - reference pages in HTML format.

A tablelist widget is a multi-column listbox.  The width of each column
can be dynamic (i.e., just large enough to hold all its elements,
including the header) or static (specified in characters or pixels).
The columns are, per default, resizable.  The alignment of each column
can be specified as "left", "right", or "center".

The columns, rows, and cells can be configured individually.  Several
of the global and column-specific options refer to the headers,
implemented as label widgets.  For instance, the "-labelcommand" option
specifies a Tcl command to be invoked when mouse button 1 is released
over a label.  The most common value of this option is
"tablelist::sortByColumn", which sorts the items based on the
respective column.

Interactive editing of the elements of a tablelist widget can be
enabled for individual cells and for entire columns.  A great variety
of widgets from the Tk core and from the packages BWidget, Iwidgets,
combobox, and Mentry is supported for being used as embedded edit
window.  In addition, a rich set of keyboard bindings is provided for a
comfortable navigation between the editable cells.

The Tcl command corresponding to a tablelist widget is very similar to
the one associated with a normal listbox.  There are column-, row-, and
cell-specific counterparts of the "configure" and "cget" subcommands
("columnconfigure", "rowconfigure", "cellconfigure", ...).  They can be
used, among others, to insert images into the cells and the header
labels, or to insert embedded windows into the cells.  The "index",
"nearest", and "see" command options refer to the rows, but similar
subcommands are provided for the columns and cells ("columnindex",
"cellindex", ...).  The items can be sorted with the "sort" and
"sortbycolumn" command options.

The bindings defined for the body of a tablelist widget make it behave
just like a normal listbox.  This includes the support for the virtual
event <<ListboxSelect>> (which is equivalent to <<TablelistSelect>>).
In addition, version 2.3 or higher of the widget callback package Wcb
(written in pure Tcl/Tk code as well) can be used to define callbacks
for the "activate", "selection set", and "selection clear" commands,
and Wcb version 3.0 or higher also supports callbacks for the
"activatecell", "cellselection set", and "cellselection clear"
commands.  The download location of Wcb is

      http://www.nemethi.de

How to get it?
--------------

Tablelist is available for free download from the same URL as Wcb.  The
distribution file is "tablelist3.6.tar.gz" for UNIX and
"tablelist3_6.zip" for Windows.  These files contain the same
information, except for the additional carriage return character
preceding the linefeed at the end of each line in the text files for
Windows.

How to install it?
------------------

Install the package as a subdirectory of one of the directories given
by the "auto_path" variable.  For example, you can install it as a
directory at the same level as the Tcl and Tk script libraries.  The
locations of these library directories are given by the "tcl_library"
and "tk_library" variables, respectively.

To install Tablelist on UNIX, "cd" to the desired directory and unpack
the distribution file "tablelist3.6.tar.gz":

      gunzip -c tablelist3.6.tar.gz | tar -xf -

This command will create a directory named "tablelist3.6", with the
subdirectories "demos", "doc", "images", and "scripts".

On Windows, use WinZip or some other program capable of unpacking the
distribution file "tablelist3_6.zip" into the directory "tablelist3.6",
with the subdirectories "demos", "doc", "images", and "scripts".

Note that the directory "images" and the file "tablelistEdit.tcl" in
the "scripts" directory are only needed for applications making use of
interactive cell editing.  Similarly, the file "tablelistMove.tcl" in
the same directory is only needed for applications invoking the "move"
or "movecolumn" tablelist command.

Next, you should check the exact version number of your Tcl/Tk
distribution, given by the "tcl_patchLevel" and "tk_patchLevel"
variables.  If you are using Tcl/Tk version 8.2.X, 8.3.0 - 8.3.2, or
8.4a1, then you should proceed as described in the "How to install it?"
section of the file "tablelist.html", located in the "doc" directory.

How to use it?
--------------

To be able to use the commands and variables implemented in the package
Tablelist, your scripts must contain one of the lines

      package require Tablelist
      package require tablelist

Since the package Tablelist is implemented in its own namespace called
"tablelist", you must either import the procedures you need, or use
qualified names like "tablelist::tablelist".

For a detailed description of the commands and variables provided by
Tablelist and of the examples contained in the "demos" directory, see
the tutorial "tablelist.html" and the reference pages, all located in
the "doc" directory.

--
Csaba Nemethi   http://www.nemethi.de   mailto:csaba.nemethi@...

[[Send Tcl/Tk announcements to tcl-announce@...
   Announcements archived at http://groups.yahoo.com/group/tcl_announce/
   Send administrivia to tcl-announce-request@...
   Tcl/Tk at http://tcl.tk/ ]]

#1943 From: Graeme Cross <graeme@...>
Date: Fri Oct 29, 2004 8:07 pm
Subject: ANNOUNCE: Earlybird entries are about to close for OSDC
graeme@...
Send Email Send Email
 
G'day folks,

This is a quick note to let you know that registrations for the Australian
Open Source Developers' Conference are now open. This conference will be
run on the 1st - 3rd of December 2004 at Monash University, Caulfield in
Melbourne, Australia.

The cost is AUD $230 and if you register before 31st October 2004, you will
receive a conference t-shirt and financial discount. The t-shirts look
fantastic:)

You can register at http://www.osdc.com.au/

OSDC is a grassroots-style conference designed by developers for developers,
covering open source languages, tools, libraries, operating systems,
licences and business models. We're booking 3 lecture rooms each day for
the 3 days and every single slot is filled with a talk. There are 60
different talks by 45 different speakers, not including the keynotes.

Talks topics range from dealing with hardware in Perl, to designing cochlear
implants with Python, to writing large-scale PHP.  We also have talks on
the Firebird Database, Mozilla XUL, Lego Micromouse (and maze solving),
MySQL, CVS, Make, DocBook and writing games with Javascript.

You can find the list of speakers and talk titles at http://www.osdc.com.au
papers/index.html. Speaker names listed as "unavailable" means that that
speaker opted to have their paper refereed. Their names will appear once
the refereeing process is over.

Because there are so many good talks, you can be certain that there will be
something that interests you in every talk session. In our initial
timetable, it was impossible to put the most interesting talks into
sequential timeslots as we had too many "most interesting" talks for the
time available. Each day will start with a 1.5 hour keynote by our
excellent keynote speakers. These include Damian Conway, Nathan Torkington,
Anthony Baxter, Luke Welling and Con Zymaris. The rest of the day will be
filled with 5 hours of talks and plentiful food breaks.
Our catering choices should result in you being extraordinarily well fed
throughout the days of the conference.

There will also be a key-signing, several BOFs (yet to be organised), lots
of opportunities to socialise, a semi-formal dinner, a partners' programme
and other usual conference stuff.

If you have any other questions about what is happening, please don't
hesitate to ask: mailto:osdc-help@...

Regards
Graeme Cross, on behalf of the OSDC organising committee

--
Graeme Cross <graeme@...>
http://www.osdc.com.au - Open Source Developers Conference

[[Send Tcl/Tk announcements to tcl-announce@...
   Announcements archived at http://groups.yahoo.com/group/tcl_announce/
   Send administrivia to tcl-announce-request@...
   Tcl/Tk at http://tcl.tk/ ]]

#1944 From: "Mac A. Cody" <maccody@...>
Date: Fri Oct 29, 2004 8:07 pm
Subject: ANNOUNCE: TclDES: Munitions-grade Tcl scripting! (Version 0.8)
maccody@...
Send Email Send Email
 
ANNOUNCE: TclDES: Munitions-grade Tcl scripting! (Version 0.8)

What is it?

TclDES is a pure-Tcl implementation of the NIST Data Encryption
Standard (DES).  The package can perform encryption and decryption
using either the standard DES algorithm or the triple-DES (3DES)
algorithm.  All four DES modes are supported: Electronic Code
Block (ECB), Cipher Block Chaining (CBC), Cipher Feedback (CFB),
and Output Feedback (OFB).  TclDES is a port of a Javascript
implementation of DES/3DES (ECB and CBC modes) by Paul Tero, of
Shoppable in the United Kingdom.

With TclDES 0.8, the initialization vector used in DES CBC, OFB,
and CFB modes is now passed by reference (i.e. variable name)
rather than by value.  This allows for the CBC mode to supports
ciphertext block feed-forward from procedure call to procedure
call.  The encryption of a message can now be split between
multiple invocations of the procedure.  This also applies for the
OFB and CFB modes with the feedback block.  The feedback facility
provided in TclDES 0.7 has been removed and is now deprecated. As
a result, the programming interface has changed slightly for
TclDES 0.8.  In addition the des::createKeys procedure now checks
for DES weak keys, forcing an error if the submitted key matches
one of them.

The TclDES distribution now contains the document "A Guide To
TclDES".  This document provides an overview of the DES and 3DES
algorithms, the various modes of operation for DES/3DES, and
installation and usage instructions for the TclDES library.


Why is TclDES a munition?

Under the International Traffic in Arms Regulations (ITARs),
encryption software and hardware are considered munitions along
with guns, tanks, nuclear, biological, and chemical weapons.
Encryption can potentially be used by adversaries to conceal
their communications from the United States government.  As a
result, export of encryption software and hardware requires
licensing and approval by the U.S. government.

Fortunately, export restrictions have been eased significantly in
recent years.  This is due to several reasons.  For one, the large
amount of commerce now occuring on the Internet requires that
encryption be widely available.  With commerce equating to money,
there is a strong desire by the U.S. government for American
companies to remain competitive.  Another reason is that it has
become virtually impossible to control the flow of cryptographic
software into and out of the United States.  Many books on
encryption, containing source code, are readily available.
Ironically, these books have no restrictions on export due to the
1st Ammendment of the U.S. Constitution.  Also, the availablility
of many encryption packages (such as OpenSSL and PGP) make the
entire effort of controlling encryption export rather moot.


How is TclDES being made available then?

This source code is being made publicly available and has been
registered with the U.S. Dept. of Commerce Bureau of Industry
and Security (BIS) under export license exception TSU (Technology
and Software Unrestricted) for export out of the United States. To
qualify for this exception, the sources to TclDES must be made
available with minimial or no cost.  To satisfy this requirement,
the TclDES sources are licensed under the same Open Source license
as Tcl (BSD).  Details can be found in the TclDES source code.

While license exception TSU allows for the export of TclDES out of
the United States, the import of the strong encryption (3DES)
contained within TclDES into other countries could be an issue.
The BIS Export Administration Regulations (EARs) and the Wassenaar
Arrangement allow for the unrestricted export (no licensing
required) of symmetric key encryption with key lengths of 56 or
fewer bits.  The Wassenaar Arrangement is signed by 33 founding
countries, which includes most of the major industrialized nations.
To satisfy this restriction and make a pure-Tcl implementation of
DES as widely available as possible, I have created a version of
the source code with the 3DES capabilities stripped out. This
version is called TclDESjr.  It is available as a separate
package.

The source code of TclDES is platform independent, though
current development is on a Slackware Linux 9.1 system with
Tcl/Tk 8.4.6.  Documentation is in the form of man pages
(tcldes.n and tcldesjr, respectively) and HTML documents
(tcldes.html and tcldesjr.html, respectively). The HTML documents
were generated from the man pages using the man2html utility.


Future goals and Feedback

TclDES is now considered to be feature complete with a stable
interface. Suggestion for feature additions or enhancements are
still welcome, though. After a trial period of testing and
feedback on the code and/or documentation, it is anticipated
that the package will be pushed to version 1.0 and further
development will cease.  It is hoped that this complete
implementation of the DES standard will become part of the
tcllib distribution at that time.

For comment and suggestions, I can be contacted at
mcody <at> users.sourceforge.net.

Availablity

TclDES and TclDESjr are available in gziped tar file format for
the Unix environment and zip file format for the Microsoft
Windows environment.  They can be obtained from the TclDES home
page and SourceForge Summary page:

Home page: http://tcldes.sourceforge.net
SourceForge Summary page: http://www.sourceforge.net/projects/tcldes

Enjoy!

Mac A. Cody

[[Send Tcl/Tk announcements to tcl-announce@...
   Announcements archived at http://groups.yahoo.com/group/tcl_announce/
   Send administrivia to tcl-announce-request@...
   Tcl/Tk at http://tcl.tk/ ]]

#1945 From: Don Porter <dgp@...>
Date: Thu Nov 4, 2004 7:07 pm
Subject: TIP #227: Interface to Get and Set the Return Options of an Interpreter
dgp@...
Send Email Send Email
 
TIP #227: INTERFACE TO GET AND SET THE RETURN OPTIONS OF AN INTERPRETER
=========================================================================
  Version:      $Revision: 1.1 $
  Author:       Don Porter <dgp_at_users.sf.net>
  State:        Draft
  Type:         Project
  Tcl-Version:  8.5
  Vote:         Pending
  Created:      Saturday, 30 October 2004
  URL:          http://purl.org/tcl/tip/227.html
  WebEdit:      http://purl.org/tcl/tip/edit/227
  Post-History:

-------------------------------------------------------------------------

  ABSTRACT
==========

  This TIP proposes new public C routines to allow the same access to
  interpreter return options [TIP #90] as are provided at the script
  level by the *catch* and *return* commands.

  BACKGROUND
============

  In Tcl 8.5, the *return* command has aready been extended to accept all
  option value pairs passed to it as arguments, to permit extensions to
  augment any custom return code values with whatever additional data
  values are appropriate. The *errorInfo* and *errorCode* values
  associated with the *TCL_ERROR* return code are already converted to
  this mechanism.

  The ability to set custom return options in the interp has been limited
  to the script level though. For extension commands implemented entirely
  in C, it is inconvenient and somewhat unreliable to perform a
  /Tcl_Eval("return ...")/ to be able to access this capability.

  Likewise, the *catch* command is able to capture the current set of
  return options in the interp, but doing so requires both a script level
  command, and use of a variable. Extension commands implemented in C are
  better served with a direct interface to fetch the dictionary value.

  PROPOSAL
==========

  Two new routines will be added to Tcl's public stub table:

        int *Tcl_SetReturnOptions*(Tcl_Interp */interp/, Tcl_Obj
        */options/)

        Tcl_Obj **Tcl_GetReturnOptions*(Tcl_Interp */interp/, int
        /result/)

  These routines already exist in the HEAD of Tcl's development sources,
  but as private routines. The Tcl source code itself already makes calls
  to these routines where appropriate, and their functioning is tested by
  the test suite. This TIP merely proposes making these routines
  available as part of the public interface.

  The /Tcl_SetReturnOptions/ routine is essentially equivalent to the
  *return -options* command. The /int/ value returned is the return code
  that the *return* command would return given the same options. In fact,
  a valid implementation for the *return* command would be:

     int Tcl_ReturnObjCmd(ClientData cd, Tcl_Interp *interp,
                            int objc, Tcl_Obj *const objv[])
     {
         int explicitResult = (0 == (objc %2));
         int numOptions = objc - 1 - explicitResult;
         if (explicitResult) Tcl_SetObjResult(interp, objv[objc-1]);
         return Tcl_SetReturnOptions(interp, Tcl_NewListObj(numOptions, objv+1));
     }

  Note that /Tcl_SetReturnOptions/ is like /Tcl_SetObjResult/ and
  /Tcl_SetVar2Ex/ in that you can pass it a newly created Tcl_Obj
  confident that it will be freed later. No refCount manipulation is
  required.

  The /Tcl_GetReturnOptions/ routine is used by *catch* to fetch the
  value to be stored in the /optionsVarName/ variable, if any. The
  /result/ argument should be whatever return code was returned by the
  script evaluation, or other /interp/ activity whose return options you
  wish to retrieve.

  The /(Tcl_Obj *)/ returned by /Tcl_GetReturnOptions/ points to a newly
  created, unshared *Tcl_Obj*. It can be written to as returned; no need
  to implement copy-on-write checks. In particular, new key value pairs
  can be added to the dictionary, or existing ones changed or removed. As
  noted above, such a value is also suitable for passing right back to
  /Tcl_SetReturnOptions/.

  COMPATIBILITY
===============

  Some extensions provide commands that offer the ability to evaluate a
  Tcl script in some other context, and return the complete result of
  that evaluation. For example, the *Thread* package provides the
  *thread::send* command that evaluates a script in another interp in a
  different thread. The *thread::send* command ultimately has a return
  code and a result that matches those produced by the script evaluation
  in the other thread. Furthermore, the *::errorInfo* and *::errorCode*
  variables are set according to the script evaluation outcome in the
  other thread as well. Extensions that accomplish such passing of full
  evaluation results achieve it now with copies of all portions of the
  full evaluation results: the return code, the interp result, and when
  appropriate, the values of *::errorInfo* and *::errorCode*.

  Such mechanisms will continue to work unchanged in Tcl 8.5. However,
  they will no longer represent the /complete/ evaluation results of the
  script. In order to continue to communicate back the full outcome of
  script evaluation, these extensions will want to call
  /Tcl_GetReturnOptions/ after the script completes, transport that value
  back, and call /Tcl_SetReturnOptions/ in the original interp. Note that
  use of these routines will automatically take care of *::errorInfo* and
  *::errorCode*, so the complete outcome of script evaluation will be
  able to be communicated by the return code, the interp result, and the
  dictionary of return options. Because the return options dictionary is
  itself extensible, this interface will not need to change again.

  REFERENCE IMPLEMENTATION
==========================

  Pending...

  COMMENTS
==========

  Please make any comments here.

  COPYRIGHT
===========

  This document has been placed in the public domain.

-------------------------------------------------------------------------

  TIP AutoGenerator - written by Donal K. Fellows

[[Send Tcl/Tk announcements to tcl-announce@...
   Announcements archived at http://groups.yahoo.com/group/tcl_announce/
   Send administrivia to tcl-announce-request@...
   Tcl/Tk at http://tcl.tk/ ]]

#1946 From: sheila miguez herndon <tcl-url@...>
Date: Thu Nov 4, 2004 7:10 pm
Subject: Dr. Dobb's Tcl-URL! - weekly Tcl news and links (Nov 1)
tcl-url@...
Send Email Send Email
 
QOTW: "The presence of a Troubleshooting section in any manual is a red
flag that there is brokenated terribility. If the software isn't
sufficiently transparent that you can diagnose a problem by interacting
with it, how is a manual going to help?"  -- Kevin Kenny

"An interactive tclsh is often faster than the man pages."
"Tcl's unusual in having pretty clean failure semantics.  Typically we
don't *document* the failure semantics, but we do define it."  -- Richard
Suchenwirth and Donal K. Fellows, counseling a newcomer on Tcl's Tao


POTW:  If you're familiar enough with Starkits to relish their
convenience, the menu the Starkit Distribution Archive presents
will make your mouth water.  Highlights include a binary (!)
cross-platform graph editor, the Coccinella chat client, a
23-language dictionary, a detailed star map, and much more.
     http://mini.net/sdarchive/


     A quest for an introduction to GUI design leads to a discussion on the
     philosophy of deployment
        
http://groups.google.com/groups?threadm=f982o05g8qrusecqqf9e68qj7gv75vnjot%404ax\
.com

     Version 0.8 of TclDES is released with new features and new
     documentation. "A Guide to TclDES" provides examples of TclDES
     and an introduction to DES modes of operation.
        
http://groups.google.com/groups?threadm=7Eygd.544619%248_6.174998%40attbi_s04

     A complicated scrolling question
        
http://groups.google.com/groups?threadm=IKAfd.11%24dK2.8%40dfw-service2.ext.ray.\
com

     Help build a better tcl tutorial
        
http://groups.google.com/groups?threadm=68cd8f94.0410291004.546f01d9%40posting.g\
oogle.com

     Algorithm needed
        
http://groups.google.com/groups?threadm=slrncnv8d3.g0f.avl%40gamma.logic.tuwien.\
ac.at#link1

     Spying on a USB port
        
http://groups.google.com/groups?threadm=wJPgd.36814%24QJ3.591%40newssvr21.news.p\
rodigy.com


Thanks to Arjen Markus for his report from the Wiki:
   Quite unusual: this week's summary will have a high C content -
   but fear not, it all has to do with Tcl and there are plenty of
   other goodies!

   The lower levels of Tcl/Tk
   - Ever tried to include a Tcl interpreter in a program? Well,
     here are a few pointers for the linking stage ...
     <http;//wiki.tcl.tk/6262>

   - It does not exist yet, but wouldn't it be great?
     <http://wiki.tcl.tk/12846>

   - It is almost there! A version of Critcl with a compiler included:
     <http://wiki.tcl.tk/12796>

   The slightly higher levels of Tcl/Tk
   - Dealing with binary data? You may want to contribute to
     <http://wiki.tcl.tk/1180>.

   - The subtle art of marking a rectangle on the canvas -
     <http://wiki.tcl.tk/8479>.

   The down-to-earth levels of Tcl/Tk
   - Fetching a file from the Internet? You do not need "wget" ...
     10 lines of Tcl suffice for this (minimal) replacement -
     <http://wiki.tcl.tk/12871>

   - Functional programming is not at all elusive to the diligent
     Tcl programmer. Here is a worked-out example for the "filter"
     functionality - <http://wiki.tcl.tk/12850>

   The illusionary levels of Tcl/Tk
   - You have to watch out for this one: <http://wiki.tcl.tk/12797>
     is a classic optical illusion

   - All but illusion, a framework for handling huge amounts of
     data, using Perl/Tk - <http://wiki.tcl.tk/12799>


Everything Tcl-related you want is probably one or two clicks away in these
pages:
     The "Welcome to comp.lang.tcl" message by Andreas Kupries
         http://www.purl.org/net/tcl-welcome

     The Tcl Developer Site is Tcl's "home base".
	 http://www.tcl.tk

     Larry Virden maintains a comp.lang.tcl FAQ launcher.
         http://www.purl.org/NET/Tcl-FAQ/

     The Tcl Developer Xchange is a highly organized resource center
     of documents and software with provisions for individuals to
     maintain references to their own software:
         http://www.tcl.tk/resource/
     The TDX sponsor, ActiveState, also keeps info to convince your
     boss Tcl is a good thing
         http://www.tcl.tk/scripting/

     The Tcl'ers Wiki is a huge, dynamic, collaboratively edited repository
     of documentation, examples, tutorials and pontifications on all things
     Tcl.
         http://wiki.tcl.tk/0
     For the ideal overview of the topics about Tcl most likely to
     interest a newcomer, see "Arts and Crafts ..."
         http://wiki.tcl.tk/969

     ActiveState maintains binaries distribution and development tools
         http://www.activestate.com/Tcl
     along with a Cookbook of Tcl recipes
         http://aspn.activestate.com/ASPN/Cookbook/Tcl

     Cameron Laird tracks several Tcl/Tk references of interest
         http://phaseit.net/claird/comp.lang.tcl/

     Cetus Links maintains a Tcl/Tk page with verified links
         http://www.cetus-links.org/oo_tcl_tk.html

     Google Groups archives comp.lang.tcl.announce posts
         http://groups.yahoo.com/group/tcl_announce/

Previous - (U)se the (R)esource, (L)uke! - messages are listed here:
   http://www.ddj.com/topics/tclurl/
An alternative is
   http://groups.google.com/groups?oi=djq&as_q=+Tcl-URL&as_ugroup=comp.lang.tcl

Suggestions/corrections for next week's posting are always welcome.

To receive a new issue of this posting in e-mail each Monday, ask
<claird@...> to subscribe.  Be sure to mention "Tcl-URL!".
--
Dr. Dobb's Journal (http://www.ddj.com) is pleased to participate in and
sponsor the "Tcl-URL!" project.

[[Send Tcl/Tk announcements to tcl-announce@...
   Announcements archived at http://groups.yahoo.com/group/tcl_announce/
   Send administrivia to tcl-announce-request@...
   Tcl/Tk at http://tcl.tk/ ]]

#1947 From: Don Porter <dgp@...>
Date: Thu Nov 4, 2004 7:08 pm
Subject: TIP #226: Interface to Save and Restore Interpreter State
dgp@...
Send Email Send Email
 
TIP #226: INTERFACE TO SAVE AND RESTORE INTERPRETER STATE
===========================================================
  Version:      $Revision: 1.1 $
  Author:       Don Porter <dgp_at_users.sf.net>
  State:        Draft
  Type:         Project
  Tcl-Version:  8.5
  Vote:         Pending
  Created:      Saturday, 30 October 2004
  URL:          http://purl.org/tcl/tip/226.html
  WebEdit:      http://purl.org/tcl/tip/edit/226
  Post-History:

-------------------------------------------------------------------------

  ABSTRACT
==========

  This TIP proposes new public C routines to allow the dynamic state of
  an interp, including the return options, and error logging in progress
  as well as the interp result, to be saved and later restored.

  BACKGROUND
============

  The Tcl C library has long recognized the need for some routines to be
  able to make use of a /Tcl_Interp/ without leaving any lasting
  footprints behind, and without interfering with whatever operations
  that /Tcl_Interp/ might be in the midst of performing. The longstanding
  routines used to address this need have been /Tcl_SaveResult/,
  /Tcl_RestoreResult/, and /Tcl_DiscardResult/.

  These existing routines also have known limitations. The documentation
  warns that they should not be used when an error is in progress,
  because they are not able to preserve the extra error information in
  the /Tcl_Interp/, only the result.

  The existing routines are also showing their age. Because they focus on
  the result of the /Tcl_Interp/, and because they date from at least the
  Tcl 7 days, they spend an inordinate amount of effort tending to the
  needs of the long-deprecated /interp->result/ field. Also, they make
  use of the transparent definition of a public struct,
  /Tcl_SavedResult/, and expect the caller to allocate such structs
  itself, a practice now frowned upon, and replaced with the use of
  opaque structs.

  The Itcl extension has long worked around the limitations of
  /Tcl_SaveResult/, etc. by defining its own set of routines that more
  completely save and restore the state of a /Tcl_Interp/. These routines
  are /Itcl_SaveInterpState/, /Itcl_RestoreInterpState/, and
  /Itcl_DiscardInterpState/. These routines are able to handle the case
  of an error in progress, and have an interface making use of an opaque
  struct, /Itcl_InterpState/. In order to create these routines, however,
  the Itcl extension makes direct access to some of the private fields of
  Tcl's /Interp/ struct.

  In Tcl 8.5, the proposal of [TIP #90] have already extended further the
  values that make up the state of a /Tcl_Interp/, including a return
  level, and a dictionary of return options. Also, some of the internal
  fields of the /Interp/ struct have been reworked, so that the Itcl
  routines no longer function without modification.

  It it time for Tcl to provide public interfaces that perform the
  functions of the /Itcl_*InterpState/ routines, and in fact, Tcl should
  provide exactly those routines.

  PROPOSAL
==========

  Three new routines will be added to Tcl's public stub table:

        Tcl_InterpState *Tcl_SaveInterpState*(Tcl_Interp */interp/, int
        /status/)

        int *Tcl_RestoreInterpState*(Tcl_Interp */interp/,
        Tcl_InterpState /state/)

        void *Tcl_DiscardInterpState*(Tcl_InterpState /state/)

  Also an opaque struct will be declared in *tcl.h*:

        typedef struct Tcl_InterpState_ **Tcl_InterpState*;

  These routines are to have the same function as their existing Itcl
  counterparts.

  These declarations and routines already exist in the HEAD of Tcl's
  development sources, but as private routines. The Tcl source code
  itself has already had an upgrade to replace all uses of the old
  /Tcl_SaveResult/ calls with these new routines. This TIP merely
  proposes making these routines available as part of the public
  interface.

  COMPATIBILITY
===============

  Strictly speaking, there are no compatibility issues, since these are
  new additions to the public interface.

  Callers of the /Tcl_SaveResult/ family of routines should be encouraged
  to update to use the new routines, as they perform the same function
  and more. The /Tcl_SaveResult/ family of routines should be kept in the
  public interface at least through the Tcl 8 series of releases, though.
  Consideration of their removal for Tcl 9 is left for another proposal.

  Itcl will have compatibility issues with Tcl 8.5 because of the changes
  to the internal fields of Tcl's /Interp/ struct. Itcl should make use
  of these new routines as the implementation of its corresponding
  routines whenever compiling against a Tcl 8.5 set of headers. When
  doing that, of course, version 8.5 of the Tcl stubs table will need to
  be required.

  REFERENCE IMPLEMENTATION
==========================

  Pending...

  COMMENTS
==========

  Please make any comments here.

  COPYRIGHT
===========

  This document has been placed in the public domain.

-------------------------------------------------------------------------

  TIP AutoGenerator - written by Donal K. Fellows

[[Send Tcl/Tk announcements to tcl-announce@...
   Announcements archived at http://groups.yahoo.com/group/tcl_announce/
   Send administrivia to tcl-announce-request@...
   Tcl/Tk at http://tcl.tk/ ]]

#1948 From: "Donal K. Fellows" <donal.k.fellows@...>
Date: Thu Nov 4, 2004 7:14 pm
Subject: TIP #229: Scripted Control of Name Resolution in Namespaces
donal.k.fellows@...
Send Email Send Email
 
TIP #229: SCRIPTED CONTROL OF NAME RESOLUTION IN NAMESPACES
=============================================================
  Version:      $Revision: 1.1 $
  Author:       Donal K. Fellows <donal.k.fellows_at_man.ac.uk>
  State:        Draft
  Type:         Project
  Tcl-Version:  8.5
  Vote:         Pending
  Created:      Wednesday, 03 November 2004
  URL:          http://purl.org/tcl/tip/229.html
  WebEdit:      http://purl.org/tcl/tip/edit/229
  Post-History:

-------------------------------------------------------------------------

  ABSTRACT
==========

  This TIP proposes extensions to the *namespace* command to allow
  scripts to control how individual namespaces map names to commands and
  variables.

  RATIONALE
===========

  Tcl has, for historic reasons, attracted many different styles of
  object system, and a favoured mechanism for implementing objects is on
  top of namespaces (which were introduced in Tcl 8.0 based on work done
  previously in [incr Tcl]). However, a common problem that these OO
  systems face is the inability to make namespaces efficiently map names
  of entities within classes etc. into the object instances. This TIP
  provides a simple mechanism for doing this.

  PROPOSED CHANGE
=================

  The *namespace* command will gain a new subcommand, *path*, with the
  following syntax:

        *namespace path* /type/ ?*-append*/*-prepend*? ?/list/?

  The /type/ argument specifies which name resolution path will be
  manipulated. Two types will be supported: *command* (which describes
  how commands in the namespace are looked up) and *variable* (which does
  the same for variables).

  If the /list/ argument is missing, the result of the command will be
  the current path for the given type. No update will be performed.
  Neither option argument will be allowed.

  If the /list/ argument is present, it will be a list of namespaces to
  search when looking up an a named entity of the given type. The current
  namespace will always be searched first. By default, the path will be
  set, but if the *-prepend* option is passed, the given /list/ of
  namespaces will be inserted at the front of the path, and similarly if
  the *-append* option is passed, the /list/ will be appended to the
  path. The result of the command will be the resulting path.

  The default path for both commands and variables will be "::" (the root
  namespace) only.

  COPYRIGHT
===========

  This document has been placed in the public domain.

-------------------------------------------------------------------------

  TIP AutoGenerator - written by Donal K. Fellows

[[Send Tcl/Tk announcements to tcl-announce@...
   Announcements archived at http://groups.yahoo.com/group/tcl_announce/
   Send administrivia to tcl-announce-request@...
   Tcl/Tk at http://tcl.tk/ ]]

#1949 From: Andreas Kupries <andreas_kupries@...>
Date: Thu Nov 4, 2004 7:13 pm
Subject: TIP #228: Tcl Filesystem Reflection API
andreas_kupries@...
Send Email Send Email
 
TIP #228: TCL FILESYSTEM REFLECTION API
=========================================
  Version:      $Revision: 1.1 $
  Author:       Andreas Kupries <andreas_kupries_at_users.sf.net>
  State:        Draft
  Type:         Project
  Tcl-Version:  8.5
  Vote:         Pending
  Created:      Tuesday, 02 November 2004
  URL:          http://purl.org/tcl/tip/228.html
  WebEdit:      http://purl.org/tcl/tip/edit/228
  Post-History:

-------------------------------------------------------------------------

  ABSTRACT
==========

  This document describes an API which reflects the Filesystem Driver API
  of the core Virtual Filesystem Layer up into the Tcl level, for the
  implementation of filesystems in Tcl. It is built on top of [TIP #208]
  ('Add a chan command') and is also an independent companion to [TIP
  #219] ('Tcl Channel Reflection API') and the forthcoming TIP on a 'Tcl
  Channel Transformation Reflection API'. As the latter TIPs bring the
  ability of writing channel drivers and transformations in Tcl itself
  into the core so this TIP provides the facilities for the
  implementation of filesystems in Tcl. This document specifies version
  /1/ of the filesystem reflection API.

  MOTIVATION / RATIONALE
========================

  The purpose of this and the other reflection TIPs is to provide all the
  facilities required for the creation and usage of wrapped files (=
  virtual filesystems attached to executables and binary libraries)
  within the core.

  While it is possible to implement and place all the proposed
  reflectivity in separate and external packages, this however means that
  the core itself cannot make use of wrapping technology and virtual
  filesystems to encapsulate and attach its own data and library files to
  itself. Something which is desirable as it can make the deployment and
  embedding of the core easier, due to having less files to deal with,
  and a higher degree of self-containment.

  One possible application of a completely self-contained core library
  would be, for example, the Tcl browser plugin.

  While it is also possible to create a special purpose filesystem and
  channel driver in the core for this type of thing, it is however my
  belief that the general purpose framework specified here is a better
  solution as it will also give users of the core the freedom to
  experiment with their own ideas, instead of constraining them to what
  we managed to envision.

  Another use for reflected filesystems is as a helper for testing the
  generic filesystem layer of Tcl, by creating filesystems which forcibly
  return errors, bogus data, and the like.

  An implementation of this TIP exists already as a package, *TclVfs*.
  This TIP asks to make that mechanism publicly available to script and
  package authors, with a bit of cleanup regarding the Tcl level API.

  SPECIFICATION OF TCL-LEVEL API
================================

  The Tcl level API consists of a single new command, *filesystem*, and
  one change to the existing command *file*. The new command is an
  ensemble command providing five subcommands. These subcommands are
  *mount*, *unmount*, *info*, *posixerror*, and *internalerror*.

  (Note that this TIP does not introduce a new C API, but rather exposes
  an existing C API to Tcl scripts.)

  THE MOUNT SUBCOMMAND
----------------------

        *filesystem mount* ?/-volume/? /path cmdprefix/

  This subcommand creates a new filesystem using the command prefix
  /cmdprefix/ as its handler. The API this handler has to provide is
  specified below, in the section "Command Handler API".

  The new filesystem is immediately mounted at /path/. After completion
  of the call any access to a subdirectory of /path/ will be handled by
  that filesystem, through its handler. The filesystem is represented
  here by the command prefix which will be executed whenever an operation
  on a file or directory within path has to be performed.

  If the option *-volume* is specified then the new mount point is also
  registered with Tcl as a new volume and will therefore from then on
  appear in the output of the command *file volumes*.

  This is useful (and actually required for reasonable operation) when
  mounting paths like *<URL:ftp://>*. It should not be used for paths
  mounted inside the native filesystem.

  The new filesystem will be immediately accessible in /all/ interpreters
  executed by the current process.

  The command returns the empty string as its result. Returning a handle
  or token is not required despite the fact that the handler command can
  be used in more than one mount operation. The different instances can
  be clearly distinguished through the /root/ argument given to each
  called method. This /root/ is identical to the /path/ specified here.
  In other words, the chosen /path/ (= mount point) is the handle as
  well.

  We have chosen to use /early binding/ of the handler command. See the
  section "Early versus late binding of the handler command" for more
  detailed explanations.

  *Important note*: The handler command for the filesystem resides in the
  interpreter performing the mount operation. This interpreter is the
  *filesystem interpreter* mentioned in the section "Interaction with
  threads and other interpreters".

  THE UNMOUNT SUBCOMMAND
------------------------

        *filesystem unmount* /path/

  This methods unmounts the reflected filesystem which was mounted at
  /path/. An error is thrown if no reflected filesystem was mounted at
  that location. After the completion of the operation the filesystem
  which was mounted at that location is not visible anymore, and any
  previous filesystem accessible through this path becomes accessible
  again.

  The command returns the empty string as its result.

  THE INFO SUBCOMMAND
---------------------

        *filesystem info* ?/path/?

  This method will return a list of all filesystems mounted in all
  interpreters, if it was called without arguments.

  When called with a /path/ the reflected filesystem responsible for that
  path is examined and the command prefix used to handle all filesystem
  operations is returned. An error is thrown if no reflected filesystem
  is mounted for that path.

  There is currently no facility to determine the *filesystem
  interpreter* (nor its thread).

  THE POSIZERROR SUBCOMMAND
---------------------------

        *posixerror* /error/

  This command can be called by a handler command during the execution of
  a filesystem operation to signal the POSIX error code of a failure.
  This also aborts execution immediately, behaving like *return -code
  -1*.

  The argument /error/ is either the integer number of the POSIX error to
  signal, or its symbolic name, like "EEXIST", "ENOENT", etc.

  THE INTERNALERROR SUBCOMMAND
------------------------------

        *internalerror* /cmdprefix/

  This method registers the provided command prefix as the command to
  call when the core has to report internal errors thrown by a handler
  command for a reflected filesystem.

  If no such command is registered, then internal errors will stay
  invisible, as the core currently does not provide a way for reporting
  them through the regular VFS layer.

  We have chosen to use /early binding/ of the handler command. See the
  section "Early versus late binding of the handler command" for more
  detailed explanations.

  MODIFICATIONS TO THE FILE COMMAND
-----------------------------------

  The existing command *file/ is modified. Its method *normalize* is
  extended to recognize a new switch, /-full/. When this switch is
  specified the method performs a normal expansion of /path/ first ,
  followed by an expansion of any links in the last element of /path/. It
  returns the result of the expansion as its own result.

  The new signature of the method is

      * *file normalize* ?/-full/? /path/

  COMMAND HANDLER API
=====================

  The Tcl-level handler command for a reflected filesystem has to support
  the following subcommands, as listed below. Note that the term
  /ensemble/ is used to generically describe all command (prefixes) which
  are able to process subcommands. This TIP is /not/ tied to the recently
  introduced 'namespace ensemble's.

  There are three arguments whose meaning does not change across the
  methods. They are explained now, and left out of the specifications of
  the various methods.

  root: This is always the path the filesystem is mounted at, i.e. the
        handle of the filesystem. In other words, it is the part of the
        absolute path we are operating upon which is 'outside' of the
        control of this filesystem.

  relative: This is always the full path to the file or directory the
        operation has to work on, relative to /root/ (s.a.). In other
        words, it is the part of the absolute path we are operating upon
        which is 'inside' of the control of the reflected filesystem.

  actualpath: This is the exact path which was given to the file command
        which caused the invocation of the handler command. This path can
        be absolute or relative. If it is absolute then /actualpath/ is
        identical to "root/relative". Otherwise it can be a sub- or
        super-path of /relative/, depending on the current working
        directory.

  And finally the list of methods and their detailed specification.

  THE INITIALIZE METHOD
-----------------------

        *initalize* /root/

  This method is called first, and then never again (for the given
  /root/). Its responsibility is to initialize all parts of the
  filesystem at the Tcl level.

  The return value of the method has to be a list containing two
  elements, the version of the reflection API, and a list containing the
  names of all methods which are supported by this handler. Any error
  thrown by the method will prevent the creation of the filesystem and
  aborts the mount operation which caused the call. The thrown error will
  appear as error thrown by *filesystem mount*.

  The current version is /1/.

  THE FINALIZE METHOD
---------------------

        *finalize* /root/

  The method is called when the filesystem was *unmount*ed, and is the
  last call a handler can receive for a specific /root/. This happens
  just before the destruction of the C level data structures. Still, the
  command handler must not access the filesystem anymore in no way. It is
  now his responsibility to clean up any internal resources it allocated
  to this filesystem.

  The return value of the method is ignored. Any error thrown by the
  method is returned as the error of the *unmount* command.

  THE ACCESS METHOD
-------------------

      * *access* /root relative actualpath mode/

  This method is called to determine the "access" permissions for the
  file (/relative/).

  It has to either return successfully, or signal a POSIX error (See
  *filesystem posixerror*. The latter means that the permissions asked
  for via /mode/ are not compatible with the file.

  Any result returned by the method is ignored.

  Regular errors thrown by the method are reported through the registered
  handler for internal errors, if there is any. They are ignored if no
  such handler is present.

  The argument /mode/ is a list containing any of the strings *read*,
  *write*, and *exe*, the permissions the file has to have for the
  request to succeed.

      * *write* contained in /mode/ implies "writable".

      * *read* contained in /mode/ implies "readable".

      * *exe* contained in /mode/ implies "executable".

  THE CREATEDIRECTORY METHOD
----------------------------

        *createdirectory* /root relative actualpath/

  This method has to create a directory with the given name (/relative/).
  The command can assume that /relative/ does not exist yet, but the
  directory /relative/ is in does. The C level of the reflection takes
  care of this.

  Any result returned by the method is ignored.

  Errors thrown by the method are reported through the registered handler
  for internal errors, if there is any. They are ignored if no such
  handler is present.

  THE DELETEFILE METHOD
-----------------------

        *deletefile* /root relative actualpath/

  This method has to delete the file /relative/.

  Any result returned by the method is ignored.

  Errors thrown by the method are reported through the registered handler
  for internal errors, if there is any. They are ignored if no such
  handler is present.

  THE FILEATTRIBUTES METHOD
---------------------------

        *fileattributes* /root relative actualpath/ ?/index/? ?/value/?

  The command has to return a list containing the names of all acceptable
  attributes, if neither /index/ nor /value/ were specified.

  The command has to return the value of the /index*th attribute if the
  /index/ is specified, but not the /value/. The attributes are counted
  in the same order as their names appear in the list returned by a call
  where neither /index/ nor /value/ were specified. The first attribute
  is has the index 0.

  The command has to set the value of the /index*th attribute to /value/
  if both /index/ and /value/ were specified for the call. Any result
  returned by the method is ignored for this case.

  Errors thrown by the method are reported through the registered handler
  for internal errors, if there is any. They are ignored if no such
  handler is present.

  THE MATCHINDIRECTORY METHOD
-----------------------------

        /matchindirectory* /root relative actualpath pattern types perm
        mac/

  This method has to return the list of files or directories in the path
  /relative/ which match the glob /pattern/, are compatible with the
  specified list of /types/, have the given /perm/issions and /mac/
  creator/type data. The specified path is always the name of an existing
  directory.

  *Note*: As the core VFS layer generates requests for directory-only
  matches from the filesystems involved when performing any type of
  recursive globbing this subcommand absolutely has to handle such (and
  file-only) requests correctly or bad things (TM) will happen.

  Errors thrown by the method are reported through the registered handler
  for internal errors, if there is any. They are ignored if no such
  handler is present.

  /types/ is a list of strings, interpreted as set. The strings are the
  names of the types of files the caller is looking for. Allowed strings
  are: *files*, and *dirs*. The command has to return all files which
  match *at least one* of the types. If /types/ is empty then all types
  are valid.

  /perm/ is a list of permission strings (i.e. a set), i.e. *read*,
  *write*, and *exe*. The command has to return all files which have *at
  least all* the given permissions. If /perm/ is empty then no
  permissions are required.

  /mac/ is a list containing 2 strings, for Macintosh creator and type.
  If /mac/ is empty then the data is irrelevant.

  THE OPEN METHOD
-----------------

        *open* /root relative actualpath mode permissions/

  This command has to return a list describing the successfully opened
  file /relative/, or throw an error describing how the operation failed.
  The thrown error will appear as error thrown by the /open/ command
  which caused the invocation of the handler.

  The list returned upon success contains at least one and at most two
  elements. The first element is obligatory and is always the handle of
  the channel which was created to allow access to the contents of the
  file.

  If the second element is present it will be interpreted as a callback,
  i.e. a command prefix. This prefix will always be executed as is, i.e.
  without additional arguments. Any required arguments have to be
  returned as part of the result of the call to *open*. This callback is
  fully specified in section "The channel close callback".

  The argument /mode/ specifies if the file is opened for read, write,
  both, appending, etc. Its value is a string in the set *r*, *w*, *a*,
  *w+*, or *a+*.

  The argument /permissions/ determines the native mode the opened file
  is created with. This is relevant only if the /mode/ actually requests
  the creation of a non-existing file, i.e. is not *r*.

  *Note*: it is possible to return a channel implemented through
  reflection here. See also section "The channel close callback" for
  more.

  THE REMOVEDIRECTORY METHOD
----------------------------

        *removedirectory* /root relative actualpath recursive/

  This method has to delete the given directory. The argument /recursive/
  is a boolean value. The method has to signal the POSIX error "EEXIST"
  if /recursive/ is *false* and the directory is not empty. Otherwise it
  has to attempt to recursively delete the directory and its contents.

  Any result returned by the method is ignored.

  Regular errors thrown by the method are reported through the registered
  handler for internal errors, if there is any. They are ignored if no
  such handler is present.

  THE STAT METHOD
-----------------

        *stat* /root relative actualpath/

  This method has to return a dictionary containing the stat structure
  for the file /relative/.

  Errors thrown by the method are reported through the registered handler
  for internal errors, if there is any. They are ignored if no such
  handler is present.

  The following keys and their values have to be provided by the
  filesystem:

  dev:  A long integer number, the device number of the path stat was
        called for. This number is optional and always overwritten by the
        C level of the filesystem reflection.

  ino:  A long integer number, the inode number of the path stat was
        called for.

  mode: An integer number, the encoded access mode of the path. It is
        this mode which is checked by the method *access*.

  nlink: A long integer number, the number of hard links to the specified
        path.

  uid:  A long integer number, the id of the user owning the virtual
        path.

  gid:  A long integer number, the id of the user group the virtual path
        belongs to.

  size: A long integer number, the true size of the virtual path, in
        bytes.

  atime: A long integer number, the time of the latest access to the
        path, in seconds since the epoch. Convertible into a readable
        date/time by the command *clock format*.

  mtime: A long integer number, the time of the latest modification of
        the path, in seconds since the epoch. Convertible into a readable
        date/time by the command *clock format*.

  ctime: A long integer number, the time of the path was created, in
        seconds since the epoch. Convertible into a readable date/time by
        the command *clock format*.

  type: A string, either *directory*, or *file*, describing the type of
        the given path.

  Notes: The stat data is highly Unix-centric, especially device node,
  inode, and the various ids for file ownership.

  While the latter are not that important both device and inode number
  can be crucial to higher-level algorithms. An example would be a
  directory walker using the device/inode information to keep itself out
  of infinite loops generated by symbolic links referring to each other.
  Returning non-unique device/inode information will most likely cause
  such a walker to skip over paths under the wrong assumption of having
  them seen already.

  To prevent the various reflected filesystem from stomping over each
  other with regard to device ids this information will be generated by
  the common C level of the filesystem reflection.

  The inode numbers however have to be assigned by the filesystem itself.

  It is possible to make a higher-level algorithm depending on
  device/inode data aware of the problem with virtual filesystems (and
  has actually been done, see the Tcllib directory walker), this however
  is a kludgey solution and should be avoided.

  THE UTIME METHOD
------------------

        *utime* /root relative actualpath atime ctime mtime/

  This method has to set the access and modification times of the file
  /relative/. The access time is set to /atime/, creation time to
  /ctime/, and the modification time is set to /mtime/. The arguments are
  positive integer numbers, the number of seconds since the epoch.

  Any result returned by the method is ignored.

  Errors thrown by the method are reported through the registered handler
  for internal errors, if there is any. They are ignored if no such
  handler is present.

  THE COPYFILE METHOD
---------------------

        *copyfile* /root relative_src actualpath_src relative_dst
        actualpath_dst/

  This method is optional. It has to create a copy of a file in the
  filesystem under a different name, in the /same/ filesystem. This
  method is not for copying of files between different filesystems and
  won't be called for such.

  Any result returned by the method is ignored.

  Errors thrown by the method are reported through the registered handler
  for internal errors, if there is any. They are ignored if no such
  handler is present.

  If this method is not supported the core filesystem layer will fall
  back to a Tcl & channel based method of copying the file.

  The same fallback will happen if the method is available, but signals
  the POSIX error "EXDEV".

  THE COPYDIR METHOD
--------------------

        *copydir* /root relative_src actualpath_src relative_dst
        actualpath_dst/

  This method is optional. It has to create a recursive copy of a
  directory in the filesystem under a different name, in the *same*
  filesystem. This method is not for copying of directories between
  different filesystems and won't be called for such.

  Any result returned by the method is ignored.

  Errors thrown by the method are reported through the registered handler
  for internal errors, if there is any. They are ignored if no such
  handler is present.

  If this method is not supported the core filesystem layer will fall
  back to a Tcl based method of copying the directory file by file..

  The same fallback will happen if the method is available, but signals
  the POSIX error "EXDEV".

  THE RENAME METHOD
-------------------

        *rename* /root relative_src actualpath_src relative_dst
        actualpath_dst/

  This method is optional. It has to rename a file in the filesystem,
  giving it a different name in the *same* filesystem. This method is not
  for the renaming of files between different filesystems and won't be
  called for such.

  Any result returned by the method is ignored.

  Errors thrown by the method are reported through the registered handler
  for internal errors, if there is any. They are ignored if no such
  handler is present.

  If this method is not supported the core filesystem layer will fall
  back to a Tcl & channel based method of renaming the file.

  The same fallback will happen if the method is available, but signals
  the POSIX error "EXDEV".

  INTERACTION WITH THREADS AND OTHER INTERPRETERS.
==================================================

  Virtual filesystems in Tcl are process global structures. In other
  words, they are seen and accessible by all interpreters, and all
  threads in the current process. For filesystems implemented completely
  at the C-level this is not that big a problem.

  However a filesystem implemented based on the reflection here will
  always be associated with a Tcl interpreter, the interpreter executing
  the requested filesystem operations. This cannot be avoided as only the
  interpreter containing the handler command also has all the state
  required by it.

  The filesystem/interpreter association also implies that any such
  filesystem is associated with a particular thread, the thread
  containing that interpreter.

  Filesystem requests coming from a different interpreter are handled by
  executing the driver functionality in the filesystem interpreter
  instead. In the case of requests coming from a different thread the C
  level part of the reflection will post specialized events to the
  filesystem thread, essentially forwarding the invocations of the
  driver.

  When a thread or interpreter is deleted all filesystems mounted with
  the *filesystem mount* command using this thread/interpreter as their
  computing base will be automatically unmounted and deleted as well.
  This pulls the rug out under the other thread(s) and/or interpreter(s),
  this however cannot be avoided. Future accesses will either fail
  because the virtual files are now missing, or will access different
  files provided by a different filesystem now owning the path.

  INTERACTION WITH SAFE INTERPRETERS
====================================

  The command *filesystem* is unsafe and safe interpreters are not
  allowed to use it. The reason behind this restriction: The ability of
  mounting filesystems gives a safe interpreter the ability to inject
  code into a trusted interpreter. The mechanism is as follows:

      * An application using a trusted master interpreter and safe slaves
        for plugins reads and evaluates a file *foo* directly in the
        trusted interpreter.

      * A malicious plugin loaded into one of the safe slaves knows about
        this file *foo*, and its actual location. It mounts a virtual
        filesystem using a driver which is part of its own code, over the
        directory *foo* is in.

      * When the trusted interpreter reads *foo*, it does not go to the
        native filesystem anymore, but the mounted filesystem. In other
        words the driver in the slave provides the contents, the code
        which is executed in the trusted environment. From here on the
        slave can do anything it wishes in the trusted environment.

      * Access to any other file in the directory can be passed through
        unchanged to the filesystem originally owning the path.

  THE CHANNEL CLOSE CALLBACK
============================

  The channel close callback is an optional callback which can be set up
  by the Tcl layer when a file is opened. This is done in the *open*
  method, by returning a 2-element list. The first element is the channel
  handle as usual and the second element the command prefix of the
  callback.

  The command prefix is early-bound, i.e. the command will be resolved
  when the callback is set up. The resolution happens in the current
  context, and thus can be anywhere in the application. Because of this
  it is strongly recommended to use a fully-qualified command name in the
  callback.

  The callback is executed in the current context of the operation which
  caused the channel to close. It is executed just before the channel is
  closed *by the generic filesystem layer*. The callback itself *must
  not* call *close*. It will always be executed as is, i.e. without
  additional arguments. Any required arguments have to be made part of
  the prefix when it is set up.

  The channel is still live enough at the time of the call to allow
  *seek* and *read* operations. In addition all available data will have
  been flushed into it already. This means, for example, that the
  callback can seek to the beginning of the said channel, read its
  contents and then store the gathered data elsewhere. In other words,
  this callback is not only crucial to the cleanup of any resources
  associated with an opened file, but also for the ability to implement a
  filesystem which can be written to. This does assume that the
  filesystem does not use a reflected channel to access the contents of
  the virtual file. If a reflected channel is used however, the close
  callback is not required, as the /finalize/ method of the channel can
  be used for the same purpose.

  Under normal circumstances return code and any errors thrown by the
  callback itself are ignored. In that case errors have to be signaled
  asynchronously, for example by calling /bgerror/.

  Any result returned by the callback is ignored.

  Errors thrown by the callback are reported through the registered
  handler for internal errors, if there is any. They are ignored if no
  such handler is present.

  *Note* that it is possible that the channel we are working with here is
  implemented through reflection.

  The order in which the various callbacks are called during closing is
  this:

      * The channel for the file is closed via /close/ by the VFS.

      * The channel close callback has been set up as a regular close
        handler, and is called now.

      * The close function of the channel driver is called, reflected
        into the Tcl level and cleans it up.

      * The close operation completes.

  The important point here is that the channel close callback set up by
  the filesystem is definitely called before the reflected channel cleans
  up its Tcl layer, so the assertion above about the channel being live
  enough to be read and saved from the filesystem Tcl layer holds even if
  both filesystem and channel are reflected. It also holds if reflected
  transformations are involved.

  EARLY VERSUS LATE BINDING OF THE HANDLER COMMAND
==================================================

  We have two principal methods for using the handler command. These are
  called early and late binding.

  Early binding means that the command implementation to use is
  determined at the time of the creation of the channel, i.e. when /chan
  create/ is executed, before any methods are called. Afterward it cannot
  change. The result of the command resolution is stored internally and
  used until the channel is destroyed. Renaming the handler command has
  no effect. In other words, the system will automatically call the
  command under the new name. The destruction of the handler command is
  intercepted and causes the channel to close as well.

  Late binding means that the handler command is stored internally
  essentially as a string, and this string is mapped to the
  implementation to use for each and every call to a method of the
  handler. Renaming the command, or destroying it means that the next
  call of a handler method will fail, causing the higher level channel
  command to fail as well. Depending on the method the error message may
  not be able to explain the reason of that failure.

  Another problem with this approach is that the context for the
  resolution of the command name has to be specified explicitly to avoid
  problems with relative names. Early binding resolves once, in the
  context of the /chan create/. Late binding performs resolution anywhere
  where channel commands like *puts*, *gets*, etc. are called, i.e. in a
  random context. To prevent problems with different commands of the same
  name in several namespaces it becomes necessary to force the usage of a
  specific fixed context for the resolution.

  Note that moving a different command into place after renaming the
  original handler allows the Tcl level to change the implementation
  dynamically at runtime. This however is not really an advantage over
  early binding as the early bound command can be written such that it
  delegates to the actual implementation, and that can then be changed
  dynamically as well.

  LIMITATIONS
=============

  For now this section documents the existing limitations of the
  reflection.

  The code of the package *TclVfs* has only a few limitations.

      * One subtlety one has to be aware of is that mixing
        case-(in)sensitive filesystems and application code may yield
        unexpected results.

        For example mounting a case-sensitive virtual filesystem into a
        case-insensitive system (like the standard Windows or MacOS
        filesystems) and then using this with code relying on
        case-insensitivity problems will appear when accessing the
        virtual filesystem.

        Note that application code relying on case-insensitivity will not
        under Unix either, i.e. is inherently non-portable, and should be
        fixed.

      * The C-API's for the methods *link* and *lstat* are currently not
        exposed to the Tcl level. This may be done in the future to allow
        virtual filesystems implemented in Tcl to support the reading and
        writing of links.

        *Note* - Exposure of links may require path normalization and
        native path generation, something the TclVfs implementation does
        not support. This limitation regarding any type of link, hard or
        or soft, is quite deeply entrenched in the TclVfs code.

      * The public C-API filesystem function *Tcl_FSUtime* is
        Unix-centric, its main data argument is a /struct utimbuf */.
        This structure contains only a single value for both /atime/ and
        /ctime/. The method *utime* of the handler command was
        nevertheless defined to take separate values for access and
        creation times, in case that this changes in the future.

      * The Tcl core VFS layer was written very near to regular
        filesystems and has no way to transport regular Tcl error
        messages through it. This is the reason for the introduction of
        the internal error callback. This problem cannot be fixed within
        the 8.5 line as it requires more extensive changes to the public
        API. Note that when such changes are done the reflection API has
        to change as well, as it then allows the direct passing of
        errors. At that point the C layer of the reflection will have to
        support both this and the new version of the API.

  EXAMPLES OF FILESYSTEMS
=========================

  The filesystems provided by *TclVfs* are all examples.

      * webdav

      * ftp sites

      * http sites

      * zip archive

      * tar archive

      * metakit database

      * namespace/procedures as filesystem

      * widget fs

  Some examples can be found on the Tcler's Wiki, see pages referring to
  <URL:http://wiki.tcl.tk/11851>

      * Encryption

      * Compression

      * Jails

      * Quotas

  REFERENCE IMPLEMENTATION
==========================

  The package *TclVfs*[<URL:http://sourceforge.net/projects/tclvfs/>] can
  serve as the basis for a reference implementation. The final reference
  implementation will be provided at SourceForge, as an entry in the Tcl
  Patch Tracker. The exact url will be added here when it becomes
  available.

  COMMENTS
==========

   [ Add comments on the document here ]

  COPYRIGHT
===========

  This document has been placed in the public domain.

-------------------------------------------------------------------------

  TIP AutoGenerator - written by Donal K. Fellows

[[Send Tcl/Tk announcements to tcl-announce@...
   Announcements archived at http://groups.yahoo.com/group/tcl_announce/
   Send administrivia to tcl-announce-request@...
   Tcl/Tk at http://tcl.tk/ ]]

#1950 From: tang@...
Date: Thu Nov 4, 2004 7:04 pm
Subject: ANNOUNCE: fickle 2.03 and taccle 1.0
tang@...
Send Email Send Email
 
For all of your text parsing needs, fickle 2.03 and taccle 1.0 are at
your service.

fickle is a Tcl utility that generates Tcl code, much like lex/flex do
for C code.  It reads a fickle specification file whose format is
extremely similar to lex/flex.  Features include start states (with
%option stack), debugging (%option debug), line numbering (%option
yylineno), and most other lex/flex capabilities.  The included examples
illustrate all of the abilities of fickle.

taccle is another compiler compiler that generates Tcl code implementing
an LALR(1) parser, much like yacc/bison do for C.  It reads a taccle
specification file whose format is (surprise!) similar to yacc/bison.
Features include epsilon transitions, operator precedence (%left,
%right, %nonassoc, %prec), error recovery, and synthesized attributes.
The included examples illustrate all of taccle's abilities.

fickle and taccle are designed to work together much like lex & yacc.
Unlike all of the other scanner and parser generators, fickle and taccle
are the ONLY ones that are written in pure Tcl 8.4 and generate pure Tcl
code.  They are written with cross-platform in mind and has been tested
under Win32, Linux/x86, and MacOS X.

Downloads and further details are published on the Wiki:

http://mini.net/tcl/fickle
http://mini.net/tcl/taccle

--
Jason Tang  /  tang@...  /  http://www.jtang.org/~tang

[[Send Tcl/Tk announcements to tcl-announce@...
   Announcements archived at http://groups.yahoo.com/group/tcl_announce/
   Send administrivia to tcl-announce-request@...
   Tcl/Tk at http://tcl.tk/ ]]

#1951 From: Andreas Kupries <andreas_kupries@...>
Date: Thu Nov 4, 2004 7:17 pm
Subject: TIP #230: Tcl Channel Transformation Reflection API
andreas_kupries@...
Send Email Send Email
 
TIP #230: TCL CHANNEL TRANSFORMATION REFLECTION API
=====================================================
  Version:      $Revision: 1.2 $
  Author:       Andreas Kupries <andreas_kupries_at_users.sf.net>
  State:        Draft
  Type:         Project
  Tcl-Version:  8.5
  Vote:         Pending
  Created:      Tuesday, 02 November 2004
  URL:          http://purl.org/tcl/tip/230.html
  WebEdit:      http://purl.org/tcl/tip/edit/230
  Post-History:

-------------------------------------------------------------------------

  ABSTRACT
==========

  This document describes an API which reflects the Channel
  Transformation API of the core I/O system up into the Tcl level, for
  the implementation of channel transformations in Tcl. It is built on
  top of [TIP #208] ('Add a chan command') and also an independent
  companion to [TIP #218] ('Tcl Channel Reflection API') and [TIP #228]
  ('Tcl Filesystem Reflection API'). As the latter TIPs bring the ability
  of writing channel drivers and filesystems in Tcl itself so this TIP
  provides the facilities for the implementation of new channel
  transformations in Tcl. This document specifies version /1/ of the
  transformation reflection API.

  BACKGROUND AND MOTIVATION
===========================

  The purpose of this and the other reflection TIPs is to provide all the
  facilities required for the creation and usage of wrapped files (i.e.
  virtual filesystems attached to executables and binary libraries)
  within the core.

  While it is possible to implement and place all the proposed
  reflectivity in separate and external packages, this however means that
  the core itself cannot make use of wrapping technology and virtual
  filesystems to encapsulate and attach its own data and library files to
  itself. Something which is desirable as it can make the deployment and
  embedding of the core easier, due to having less files to deal with,
  and a higher degree of self-containment.

  One possible application of a completely self-contained core library
  would be, for example, the Tcl browser plugin.

  It is also possible to create a special purpose filesystem and channel
  driver in the core for this type of thing, but it is my belief that the
  general purpose framework specified here is a better solution as it
  will also give users of the core the freedom to experiment with their
  own ideas, instead of constraining them to what we managed to envision.

  Another use for reflected transformations is as a helper for testing
  the generic I/O layer of Tcl, by creating transformations which
  forcibly return errors, bogus data, and the like.

  An implementation of this TIP is already present in the core, as part
  of the special test commands for exercising the various internal of the
  Tcl core during test. This TIP asks to make that mechanism publicly
  available to script and package authors, with a bit of cleanup
  regarding the Tcl level API. The roots of that mechanism can be traced
  back to the Trf package which implemented channel transformations first
  and provides a similar command.

  TRANSFORM MANAGEMENT API SPECIFICATION
========================================

  The Tcl level API consists of two new subcommands added to the ensemble
  command *chan*' specified by [TIP #208]. Both subcommands are
  completely generic, i.e. they can be applied to any type of channel,
  without restrictions. There is no C API to specify. The Tcl core
  already has a standard API for the creation of channel transformations
  from the C level.

  THE PUSH SUBCOMMAND
---------------------

        *chan push* /channel cmdprefix/

  This subcommand creates a new script level transformation using the
  command prefix /cmdprefix/ as its handler and attaches it to the
  specified channel. The new transformation is always added on top of any
  other transformations which may be present.

  The handle of the new transformation is returned as the result of the
  command. This handle is the first argument given to all handler
  methods, to allow the code to distinguish between the various instances
  of the same transformation, if necessary.

  Use the new *chan pop* command to remove the transformation. See below.

  The API this handler has to provide is specified below, in the section
  "Command Handler API Specification".

  We have chosen to use /early-binding/ of the handler command. See the
  section "Early- versus Late-Binding of the Handler Command" for more
  detailed explanations.

  The command invokes the handler method *initialize* to determine the
  supported methods before it pushes the transformation. It will throw an
  error if a read-only transformation is pushed on a write-only channel,
  or vice versa. In general if the r/w-mode of transformation and channel
  together cause the result to be neither readable nor writable.

  THE POP SUBCOMMAND
--------------------

        *chan pop* /channel/

  This subcommand removes the topmost transformation from the /channel/,
  if there is any. This command is equivalent to the builtin command
  /close/ if the channel had no transformations added to it.

  Note: If the removal of the topmost transformation uncovers inactive
  transformations (See section "Interaction with Threads and Other
  Interpreters"), then these will be removed now as well.

  COMMAND HANDLER API SPECIFICATION
===================================

  The Tcl-level handler command for a reflected channel transformation is
  an ensemble that has to support the following subcommands, as listed
  below. Note that the term /ensemble/ is used to generically describe
  all command (prefixes) which are able to process subcommands. This TIP
  is *not* tied to the recently introduced 'namespace ensemble's (though
  they may be used to implement such handlers.)

  THE INITIALIZE SUBCOMMAND
---------------------------

        /handler/ *initialize* /handle mode/

  This method is called first, and then never again (for the given
  /handle/). Its responsibility is to initialize all parts of the
  transformation at the Tcl level. The MODE is a list containing any of
  *read* and *write*.

      * *write* contained in /mode/ implies that the channel is writable.

      * *read* contained in /mode/ implies that the channel is readable.

  The return value of the method has to be a list containing two
  elements, the version of the reflection API, and a list containing the
  names of all methods which are supported by this handler. Any error
  thrown by the method will prevent the creation of the transformation.
  The thrown error will appear as error thrown by *chan push*.

  The current version is /1/.

  This method has no equivalent at the C level.

  THE FINALIZE SUBCOMMAND
-------------------------

        /handler/ *finalize* /handle/

  This method is called last for the given /handle/, just before the
  destruction of the C level data structures. It is now its
  responsibility to clean up all parts of the transformation at the Tcl
  level.

  Any result returned by the method will be ignored. The same is true for
  errors thrown by the method.

  This method has no equivalent at the C level.

  THE FLUSH SUBCOMMAND
----------------------

        /handler/ *flush* /handle/

  This method is called whenever data in the transformation 'write'
  buffer has to be forced downward, i.e. towards the base channel. The
  result returned by the method is taken as the /binary/ data to write to
  the transformation below the current transformation. This can be the
  base channel as well.

  In other words, when this method is called the transformation cannot
  defer the actual transformation operation anymore and has to transform
  all data waiting in its internal write buffers and return the result of
  that action.

  The method is optional. However if this method is supported then
  *write* has to be supported as well. The reverse is not true.

  THE WRITE SUBCOMMAND
----------------------

        /handler/ *write* /handle buffer/

  This method is optional. If it is not present it means that the
  transformation does not support writing, and the channel it was pushed
  on becomes non-writable as well.

  It will be called whenever the user, or a transformation above this
  transformation writes data downward. The /buffer/ contains the *binary*
  data which has been written to us. It is the responsibility of this
  method to actually transform the data.

  The result returned by the method is taken as the *binary* data to
  write to the transformation below this transformation. This can be the
  base channel as well. Note that the result is allowed to be empty, or
  less than the data we got. The transformation is not required to
  transform everything which was written to it right now. It is allowed
  to store this data in internal buffers and to defer the actual
  transformation until it has more data.

  THE DRAIN SUBCOMMAND
----------------------

        /handler/ *drain* /handle/

  This method is called whenever data in the transformation input (i.e.
  read) buffer has to be forced upward, i.e. towards the user, i.e. the
  script. The result returned by the method is taken as the *binary* data
  to push upward to the transformation above this transformation. This
  can be the script as well.

  In other words, when this method is called the transformation cannot
  defer the actual transformation operation anymore and has to transform
  all data waiting in its internal read buffers and return the result of
  that action.

  The method is optional. However if this method is supported then *read*
  has to be supported as well. The reverse is not true.

  THE READ SUBCOMMAND
---------------------

        /handler/ *read/ /handle buffer/

  This method is optional. If it is not present it means that the
  transformation does not support reading, and the channel it was pushed
  on becomes non-readable as well.

  It is called whenever the base channel, or a transformation below this
  transformation pushes data upward. The /buffer/ contains the *binary*
  data which has been given to us from below. It is the responsibility of
  this method to actually transform data. The result returned by the
  method is taken as the *binary* data to push further upward to the
  transformation above this transformation. This can be the user, i.e.
  the script as well.

  Note that the result is allowed to be empty, or even less than the data
  we got. The transformation is not required to transform everything
  given to it right now. It is allowed to store incoming data in internal
  buffers and to defer the actual transformation until it has more data.

  THE LIMIT? SUBCOMMAND
-----------------------

        /handler/ *limit?* /handle/

  This method is optional. If it is not present it means that the
  transformation is allowed to read ahead as much as it likes.

  This method is called during input processing and allows the Tcl level
  part of the transformation to restrict the number of characters read
  from the downward transformation or base channel before its method
  *read* is called with the resulting buffer.

  The result of the method has to be an integer number not equal to zero.
  A negative result signals that the transformation allows the I/O system
  to read an unlimited number of characters. A positive number on the
  other hand is interpreted as the maximum number of characters the I/O
  system is allowed to read from the downward transformation or base
  channel.

  This method is necessary for transformations where the data is bounded
  at the end in some way. In that case the transformation has to prevent
  the system from reading beyond the boundary as otherwise data behind it
  will be given to the transformation and then lost when the
  transformation is removed. *This is a limitation of the current I/O
  core* as it does not allow a transformation to push unused data back
  into the I/O core when the transformation is removed from the channel.

  Fixing this *limitation* requires a separate TIP, as either the public
  API of the I/O core has to be extended, or the public structure of
  channel drivers.

  THE CLEAR SUBCOMMAND
----------------------

        /handler/ *clear* /handle/

  This method is called to clear any data stored in the internal input
  buffers of the transformation. This happens only when the user seeks
  the channel the transformation is attached to.

  Any result returned by the method is ignored.

  The method is optional. I.e. a transformation not having any internal
  buffers to clear can leave out its implementation.

  THE EVENT SUBCOMMAND
----------------------

        /handler/ *event* /handle eventspec/

  This method is called from the C level when events arrive for which the
  transformation did register interest in. The argument /eventspec/ is a
  list containing any of *read*, *write*, and their unique abbreviations,
  detailing the incoming events. It will not contain any events the
  transformation has no interest in.

  Any result returned by the method is ignored.

  This method is optional. If it is not supported then the C-level of the
  reflection will assume that the transformation is not handling any
  events. If this method is supported then the method *watch* has to be
  supported as well.

  THE WATCH SUBCOMMAND
----------------------

        /handler/ *watch* /handle/

  This method is called from the C level whenever the I/O core is
  establishing an interest mask, to allow the transformation to register
  its own interest in events.

  The return value of the method has to be a list containing any of
  *read* or *write*, or any of their unique abbreviations, i.e. the names
  of the events the transformation is interested in. The empty list is
  allowed as well and signals that the transformation does not wish to be
  notified of any events.

  This method is optional. If it is not supported then the C-level of the
  reflection will assume that the transformation is not registering
  interest in any events. If this method is supported then the method
  *event* has to be supported as well.

  HARDWIRED BEHAVIOR OF REFLECTED TRANSFORMATIONS
=================================================

  Not all functions of the channel driver implementing the reflected
  transformation are directly reflected into the Tcl level. Their
  behavior is hardwired in the C level implementing the reflection and
  specified now.

  BlockModeProc:
        Records the chosen blocking mode in the C-level data structures.
        This influences the low-level write and read behavior. However
        the Tcl level is shielded from this, so a handler method is not
        required.

  CloseProc: Invokes the methods *drain* and *flush* to clean up any
        buffers managed by the Tcl level of the transformation, and then
        *finalize*. *drain* is not called if a previous call to it has
        not been invalidated yet.

  InputProc: Tries to satisfies the incoming read request from the input
        result buffer first. If that is not enough it invokes the
        *limit?* method to establish the current read limit, reads data
        from the downward transformation or base channel per the limit
        and feeds the data it got to the Tcl level of the transformation,
        via an invocation of the method *read*. The result of that call
        is added to the input result buffer and used to further satisfy
        the read request.

        If the channel is blocking the system will iterate until the
        request is fulfilled completely or EOF has been signaled from
        below.

        In non-blocking mode however the loop will stop if either the
        request was fulfilled completely, or if we would block. Note that
        reaching EOF in this situation causes a flush of the Tcl side
        input buffers via an invocation of the method *drain*. Otherwise
        the data stored in them would be lost when the transformation is
        removed or the channel closed completely.

  OutputProc: Simply forwards the written buffer to the method *write*
        for processing and then writes any returned result to the
        transformation or base channel below.

  SeekProc: Recognizes requests made by *tell* and passes them down
        without doing anything else. The result generated by the base
        channel is then passed back up unchanged.

        Any other request causes it to flush all write buffers on the Tcl
        side via an invocation of the method *flush*, and clear all input
        buffers on the Tcl side via an invocation of the method *clear*
        before passing the request down. Note that the calls mentioned
        above are not made if the channel is not writable, or not
        readable.

        This is implements the most simple seek behavior as it was found
        in the very earliest incarnation of the transform reflection
        functionality, i.e. passing down any seek request unchanged until
        the base channel is reached. This also means that the internal
        state of transformations is not adjusted after a seek and may
        generate bogus results.

        The reflection (actually any transformation) provided by the
        package /Trf/ has much more complex seek behavior. This was left
        out for now to keep the scope of this TIP relatively focused. A
        follow-up TIP can be written for a deeper discussion of the
        interaction between seeking and any type of transformation, not
        only reflected ones.

        See <URL:http://www.oche.de/~akupries/soft/trf/trf_seek.html> for
        the description of the complex seeking model used by the
        transformation reflection in Trf.

  SetOptionProc, GetOptionProc, GetFileHandleProc:
        The calls are passed down without change, any results are passed
        back to the caller, again without any changes.

        Transformations have no options which can be configured when they
        are attached to a channel, hence the pass-through and no handler
        method at the Tcl level.

  WatchProc: Remembers the interest mask provided by the caller and uses
        this to manage the internal timer used to generate fake file
        events when data is buffered.

        Uses the method *watch* (if available) to ask the Tcl level for
        its interest mask before passing the data down to the next
        transformation or base channel. This allows a transformation to
        register interest in events the higher levels might not be
        interested in.

        An example, albeit C based, is the TLS transformation. During the
        initial negotiation phase it has to perform a complex exchange of
        data with the other side, an exchange which is not seen by the
        higher levels. Extended interest and handling of additional
        notifications (see below) are prerequisites for this.

  NotifyProc: Manages the internal timer, and uses the method *event* to
        handle incoming triggered events. If *event* is not supported by
        the transformation the system will pass the incoming mask of
        triggered events upward without change.

        The method *event* allows the Tcl level to intercept and handle
        events on its own, invisible to the higher layers. See
        *WatchProc* above for an example of why this is useful.

        The events handled by the transformation are removed from the
        mask and the changed mask is passed upward, if not empty.

  INTERACTION WITH THREADS AND OTHER INTERPRETERS
=================================================

  Adding a reflected transformation to a channel does not create any
  restrictions on the sharing of the channel with other interpreters, nor
  with moving the channel to different interpreters or threads.

  Like for reflected channels (See [TIP #219] ('Tcl Channel Reflection
  API')), the implementation ensures that the handler command is always
  executed in the original interpreter and thread. The latter is done by
  posting specialized events to the original thread, essentially
  forwarding driver invocations to the correct thread.

  When a thread or interpreter is deleted all channels having a
  transformation attached to them which uses this thread/interpreter as
  their computing base are not deleted, but the transformation is removed
  from them. Depending on the complexity of removing the structure
  describing the transformation from the channel (middle of the stack)
  the implementation may choose to not remove the structure at all but to
  simply revert it to a sideeffect-free identity transformation
  implemented in C and not calling out to Tcl at all anymore. If the
  latter is done it will be removed automatically by the next *chan pop*
  operation which uncovers the inactive transformation.

  INTERACTION WITH SAFE INTERPRETERS
====================================

  The new subcommands *push* and *pop* of *chan* are both safe and
  therefore made accessible to safe interpreters.

  While *push*ing a transformation arranges for the execution of code
  this code is always executed within the safe interpreter, even if the
  channel was moved (See previous section).

  That the data flowing through the channel is modified by the
  transformation is no problem either, because to attach the
  transformation to the channel it has to have been given to the safe
  interpreter in the beginning, in other words, the interpreter doing
  this already trusted the safe interpreter in some way, and the fact
  that we can now add a transformation does not change this.

  Equivalent reasoning applies if the channel was created by the safe
  interpreter and then shared/moved into the trusted interpreter. The
  transformation has no effect on the trust already given to the safe
  interpreter through the share/move operation.

  The same holds for the subcommand *pop*. If the safe interpreter can
  execute it on a channel it has the channel already in its possession,
  either because it created the channel, or because the channel was
  shared/moved into it.

  EARLY- VERSUS LATE-BINDING OF THE HANDLER COMMAND
===================================================

  We have two principal methods for using the handler command. These are
  called early- and late-binding.

  *Early-binding* means that the command implementation to use is
  determined at the time of the creation of the channel, i.e. when /chan
  push/ is executed, before any methods are called. Afterward it cannot
  change. The result of the command resolution is stored internally and
  used until the channel is destroyed. Renaming the handler command has
  no effect. In other words, the system will automatically call the
  command under the new name. The destruction of the handler command is
  intercepted and causes the channel to close as well.

  *Late-binding* means that the handler command is stored internally
  essentially as a string, and this string is mapped to the
  implementation to use for each and every call to a method of the
  handler. Renaming the command, or destroying it means that the next
  call of a handler method will fail, causing the higher level channel
  command to fail as well. Depending on the method the error message may
  not be able to explain the reason of that failure.

  Another problem with the late-binding approach is that the context for
  the resolution of the command name has to be specified explicitly to
  avoid problems with relative names. Early-binding resolves once, in the
  context of the /chan create/. Late-binding performs resolution anywhere
  where channel commands like /puts/, /gets/, etc. are called, i.e. in a
  random context. To prevent problems with different commands of the same
  name in several namespace it becomes necessary to force the usage of a
  specific fixed context for the resolution.

  Note that moving a different command into place after renaming the
  original handler allows the Tcl level to change the implementation
  dynamically at runtime. This however is not really an advantage over
  early-binding as the early-bound command can be written such that it
  delegates to the actual implementation, and that can then be changed
  dynamically as well.

  LIMITATIONS
=============

  The method *limit?* is required to limit reading from below to prevent
  reading over transformation specific boundaries. This is a direct
  consequence of not being able to push unused data back into the I/O
  core when a transformation is removed.

  The reflection implements the very simple seek behavior found in the
  earliest incarnation of this functionality, i.e. passing down any seek
  request unchanged until the base channel is reached. This also means
  that the internal state of transformations is not adjusted after a seek
  and may generate bogus results. The reflection (actually any
  transformation) provided by the package /Trf/ has much more complex
  seek behavior. This was left out for now to keep the scope of this TIP
  relatively focused. A follow-up TIP can be written for a deeper
  discussion of the interaction between seeking and any type of
  transformation, not only reflected ones.

  See <URL:http://www.oche.de/~akupries/soft/trf/trf_seek.html> for the
  description of the complex seeking model used by the transformation
  reflection in Trf.

  MISCELLANEA
=============

  The transform reflection API reserves the driver type "tclrtransform"
  for itself, and uses it to detect its own transformations. Usage of
  this driver type by other transformations is not allowed.

  EXAMPLES
==========

  TRANSFORMATION IMPLEMENTATIONS
--------------------------------

  A simple way of implementing new transformations is to use any of the
  various object systems for Tcl. Create a class for the transformation.
  *chan push* the transformation in the constructor for new objects and
  store the transformation handle. Make the new object the command
  handler for the transformation. This automatically translates the sub
  commands for the command handler into object methods. Implement the
  various methods required. When the object is deleted deactivate the
  transformation, and delete the object when the channel announces that
  the transformation has been *chan pop*ped. This part is a bit tricky,
  flags have to be used to break the potential cycle.

  Another possibility is to implement the command handler as a regular
  command, together with a creation command wrapping around /chan push/
  and a backend which keeps track of all handles created by it and their
  state, associated data, etc.

  POSSIBLE TRANSFORMATIONS
--------------------------

      * Identity

      * Gathering statistics about the channel. The simplest would be to
        count bytes, for example.

      * Divert a copy of all data to a separate channel. In other words,
        spying on the channel.

      * Give a channel which normally cannot seek backward the ability to
        do so through buffering (a limited amount of) the data read from
        it.

      * Limit reading from a channel to a specific finite number of
        characters (This can be done via a suitable implementation of the
        method "limit?" in the transformation handler).

  REFERENCE IMPLEMENTATION
==========================

  A variant implementation of this TIP is already present in the core, as
  part of the special test commands for exercising the various internal
  of the Tcl core during test.

  The relevant files are

      * "tclIOGT.c" (base implementation) and

      * "tclTest.c" (command interface).

  The command interface specified here is different from the current
  interface.

     test transform channel -command command

  versus

     chan push channel cmdprefix
     chan pop

  The handler methods are different as well. This TIP consolidated a
  number of methods, gave them better names and removed unnecessary
  arguments. It also removed some limitations.

  The actual reference implementation will be provided at SourceForge, as
  an entry in the Tcl Patch Tracker. The exact url will be added here
  when it becomes available.

  COMMENTS
==========

  [ Add comments on the document here ]

  COPYRIGHT
===========

  This document has been placed in the public domain.

-------------------------------------------------------------------------

  TIP AutoGenerator - written by Donal K. Fellows

[[Send Tcl/Tk announcements to tcl-announce@...
   Announcements archived at http://groups.yahoo.com/group/tcl_announce/
   Send administrivia to tcl-announce-request@...
   Tcl/Tk at http://tcl.tk/ ]]

#1952 From: Joe English <jenglish@...>
Date: Tue Nov 9, 2004 9:52 pm
Subject: TIP #231: Support for [wm attributes] on X11
jenglish@...
Send Email Send Email
 
TIP #231: SUPPORT FOR [WM ATTRIBUTES] ON X11
==============================================
  Version:      $Revision: 1.4 $
  Author:       Joe English <jenglish_at_flightlab.com>
  State:        Draft
  Type:         Project
  Tcl-Version:  8.5
  Vote:         Pending
  Created:      Saturday, 06 November 2004
  URL:          http://purl.org/tcl/tip/231.html
  WebEdit:      http://purl.org/tcl/tip/edit/231
  Post-History:

-------------------------------------------------------------------------

  ABSTRACT
==========

  This TIP adds three UNIX/X11-specific attributes to the *wm attributes*
  command to take advantage of features newer Unix window manager control
  standards.

  SPECIFICATION
===============

  This TIP proposes to add support for the following window attributes
  under X11 in the *wm attributes* command:

      * *-fullscreen*

        This attribute has the same meaning as the equivalent option for
        Windows (see [TIP #223]) with one restriction (outlined below).

      * *-topmost*

        This attribute has the same meaning as the equivalent option for
        Windows (see [TIP #95]) with one restriction (outlined below).

      * *-zoomed*

        This attribute requests that the window be maximized; it is the
        same as [*wm state* /win/ *zoomed*] on Windows, subject to the
        restriction outlined below.

  RESTRICTIONS
==============

  Under X11, the *-fullscreen*, *-topmost*, and *-zoomed* attributes
  require cooperation from the window manager. If the window manager does
  not support these attributes, setting them will have no effect. In
  particular, they are not supported by older window managers like MWM
  and DTWM.

  Under X11, the *wm attributes* command operates asynchronously: [*wm
  attributes* /-attribute/] returns the current value of the attribute,
  which will not be the same as the value most recently set if the window
  manager has not yet processed the request or if it does not support the
  attribute.

  REFERENCE IMPLEMENTATION
==========================

  See patch #1062022
  [<URL:http://sf.net/support/tracker.php?aid=1062022>] which is based on
  the freedesktop.org Extended Window Manager Hints specification
  [<URL:http://www.freedesktop.org/Standards/wm-spec>].

  COPYRIGHT
===========

  This document has been placed in the public domain.

-------------------------------------------------------------------------

  TIP AutoGenerator - written by Donal K. Fellows

[[Send Tcl/Tk announcements to tcl-announce@...
   Announcements archived at http://groups.yahoo.com/group/tcl_announce/
   Send administrivia to tcl-announce-request@...
   Tcl/Tk at http://tcl.tk/ ]]

#1953 From: sheila miguez herndon <tcl-url@...>
Date: Tue Nov 9, 2004 9:53 pm
Subject: Dr. Dobb's Tcl-URL! - weekly Tcl news and links (Nov 8)
tcl-url@...
Send Email Send Email
 
QOTW: "While you can do these things to make a single-threaded program more
responsive, there's something to be said for allowing the OS to do some of
the work" -- Melissa Schrumpf

"Good question. I don't have a good answer though. Instead, I'd start by
focussing on the issue of what equality of lists actually means. After all,
you want to have the right type of equality, yes? :^)" -- Donal K Fellows


POTW:  hping is a "packet assembler" with enough interesting capabilities
to support its own mailing list and Wiki.  This is fascinating stuff for
those who get "grubby" with networks.  All praise to Salvatore Sanfilippo.
     http://www.hping.org/


     GUI delays--is threading the right solution? Maybe you can tweak your
     calls to update instead.
        
http://groups.google.com/groups?selm=Pine.GSO.4.33.0410072238160.11350-100000%40\
aludra.usc.edu

     What features of a language facilitate productivity on large projects?
         http://groups.google.com/groups?selm=m66s52-91c.ln1%40lairds.us

     Yes, it is possible to precompile regexps. Tcl does it for you.
        
http://groups.google.com/groups?threadm=cmdcf2%246hr%241%40athen03.muc.infineon.\
com

     Use tcom to drive Excel from your tcl script.
        
http://groups.google.com/groups?selm=1099589129.sUq8NNQy%2BqDna96kwJayrA%40teran\
ews

     Which equality is right for you? Comparing a list of strings is speedy
     compared to comparing a list of numbers.
        
http://groups.google.com/groups?selm=cm7pt8%2413tt%241%40godfrey.mcc.ac.uk

Thanks to Arjen Markus for his report from the Wiki:
   The center of gravity of activity on the Wiki last week was
   "documentation". Just see for yourself: what packages were updated from
   one version of Tcl to the next, a "Hello, world" extension and so on.

   Documentation
   - A very informative page on what will be in version 8.5 -
     <http://wiki.tcl.tk/10630>. (The patch releases for Tcl 8.4.x are
     described in their own pages: <http://wiki.tcl.tk/12074> for instance)

   - Creating your own extensions - <http://wiki.tcl.tk/11158> presents the
     basics.

   - Ever wondered about the Iwidgets extension and never got around to
     learning it? Monitor the progress of the author of
     <http://wiki.tcl.tk/12898>

   Sharing thoughts
   - The ever growing list of articles about Tcl and its use:
     <http://wiki.tcl.tk/1016> holds several new ones

   - The design of chips (yes, those silicon thingies inside a computer for
     instance) bares an intimate relation to Tcl - <http://wiki.tcl.tk/12897>
     muses over this ...

   - Is it a trick? Is it a well-designed feature? Well,
     <http://wiki.tcl.tk/9967> discusses a little-known (sub)command

   The high and low ends of user-interfaces
   - Tile is making progress, thanks to the hard work of many people -
     <http://wiki.tcl.tk/11075>

   - Not everybody needs highly polished skins on their user-interfaces,
     a minimal amount of interactivity can be enough ... and that is
     when you need curses - <http://wiki.tcl.tk/10877>


Everything Tcl-related you want is probably one or two clicks away in these
pages:
     The "Welcome to comp.lang.tcl" message by Andreas Kupries
         http://www.purl.org/net/tcl-welcome

     The Tcl Developer Site is Tcl's "home base".
	 http://www.tcl.tk

     Larry Virden maintains a comp.lang.tcl FAQ launcher.
         http://www.purl.org/NET/Tcl-FAQ/

     The Tcl Developer Xchange is a highly organized resource center
     of documents and software with provisions for individuals to
     maintain references to their own software:
         http://www.tcl.tk/resource/
     The TDX sponsor, ActiveState, also keeps info to convince your
     boss Tcl is a good thing
         http://www.tcl.tk/scripting/

     The Tcl'ers Wiki is a huge, dynamic, collaboratively edited repository
     of documentation, examples, tutorials and pontifications on all things
     Tcl.
         http://wiki.tcl.tk/0
     For the ideal overview of the topics about Tcl most likely to
     interest a newcomer, see "Arts and Crafts ..."
         http://wiki.tcl.tk/969

     ActiveState maintains binaries distribution and development tools
         http://www.activestate.com/Tcl
     along with a Cookbook of Tcl recipes
         http://aspn.activestate.com/ASPN/Cookbook/Tcl

     Cameron Laird tracks several Tcl/Tk references of interest
         http://phaseit.net/claird/comp.lang.tcl/

     Cetus Links maintains a Tcl/Tk page with verified links
         http://www.cetus-links.org/oo_tcl_tk.html

     Google Groups archives comp.lang.tcl.announce posts
         http://groups.yahoo.com/group/tcl_announce/

Previous - (U)se the (R)esource, (L)uke! - messages are listed here:
   http://www.ddj.com/topics/tclurl/
An alternative is
   http://groups.google.com/groups?oi=djq&as_q=+Tcl-URL&as_ugroup=comp.lang.tcl

Suggestions/corrections for next week's posting are always welcome.

To receive a new issue of this posting in e-mail each Monday, ask
<claird@...> to subscribe.  Be sure to mention "Tcl-URL!".
--
Dr. Dobb's Journal (http://www.ddj.com) is pleased to participate in and
sponsor the "Tcl-URL!" project.

[[Send Tcl/Tk announcements to tcl-announce@...
   Announcements archived at http://groups.yahoo.com/group/tcl_announce/
   Send administrivia to tcl-announce-request@...
   Tcl/Tk at http://tcl.tk/ ]]

#1954 From: binnyva@...
Date: Mon Nov 29, 2004 10:14 pm
Subject: Tutorial Version 2 is released
binnyva@...
Send Email Send Email
 
Hello Everyone,

The second version of my Tutorial is released. It is available at
http://www.geocities.com/binnyva/code/tcl/tutorial/index.html

This is a tutorial for Tcl/Tk language aimed at beginners. Teaches
how to  make GUI(Graphical User Interface) programes for Windows,
Linux and Mac OS with Tcl/Tk.

To see what's new, go to
http://www.geocities.com/binnyva/code/tcl/tutorial/appendix.html#g

Thanking You,
Binny V A
http://www.geocities.com/binnyva

[[Send Tcl/Tk announcements to tcl-announce@...
   Announcements archived at http://groups.yahoo.com/group/tcl_announce/
   Send administrivia to tcl-announce-request@...
   Tcl/Tk at http://tcl.tk/ ]]

#1955 From: Jean-Luc FONTAINE <jfontain@...>
Date: Mon Nov 29, 2004 10:10 pm
Subject: ANNOUNCE: Tcl/Tk 8.4.8 rpm specification with thread 2.5.2 extension
jfontain@...
Send Email Send Email
 
http://jfontain.free.fr/tcltk-8.4.8-1.spec

Generated and tested on an up-to-date Red Hat Fedora Core 3 i386 system.
The rpms can install under /opt/tcltk (see notes below) in order not to
conflict and peacefully coexist with the stock Redhat Tcl and Tk rpms.

To build the rpms, download the Tcl/Tk 8.4.8 and Thread 2.5.2 sources
from http://download.sourceforge.net/tcl/ into the
/usr/src/redhat/SOURCES/ directory, place the specification file in the
/usr/src/redhat/SPECS/ directory, then from that directory, type:
     # rpmbuild -bb --clean tcltk-8.4.8-1.spec

Notes:
- You may change the installation directory and turn on the thread
extension at the beginning of the specification file.

--
Jean-Luc Fontaine  mailto:jfontain@...  http://jfontain.free.fr/

[[Send Tcl/Tk announcements to tcl-announce@...
   Announcements archived at http://groups.yahoo.com/group/tcl_announce/
   Send administrivia to tcl-announce-request@...
   Tcl/Tk at http://tcl.tk/ ]]

#1956 From: sheila miguez herndon <tcl-url@...>
Date: Mon Nov 29, 2004 10:08 pm
Subject: Dr. Dobb's Tcl-URL! - weekly Tcl news and links (Nov 23)
tcl-url@...
Send Email Send Email
 
QOTW: "But still - I think, about 98% of the outside world Tcl programmers
use Tcl because of its capabilities to solve real world problems, not as a
language to do computer science."  Eckhard Lehmann

"Tcl, as implemented, tries very hard to fail (and in a [catch]able way) in
all cases where it is not documented to work."  Donal K. Fellows


POTW:  GRASS is an impressive Tcl-based open-source alternative to ArcView
(*if* you pay for extra modules of the latter).
     http://www.openosx.com/grass/


     Mac Cody supplies a new extension for generating a PDF from a Tk canvas.
        
http://groups.google.com/groups?selm=vbaod.650886%248_6.281446%40attbi_s04

     It's fun to watch the different ways tcl can be used to solve a
     problem. A basic question on parsing a file leads to four different
     solutions.
         http://snipurl.com/atsq

     Arjen Marcus explains to an enthusiastic poster how to bind to 'a'
     character.
         http://groups.google.com/groups?selm=419C845F.985CB06A%40wldelft.nl

     A survey of source documentation tools.
        
http://groups.google.com/groups?threadm=ITZmd.120%24f5.3662%40newsread.de.ignite\
.net

     Encourage wiki authors to submit interesting code to tcllib.
         http://groups.google.com/groups?selm=cncprk%24aqc%242%40srv38.cas.org

     Should test configuration and test execution be separated?
         http://snipurl.com/att3

     Use the unknown command to define a new operator.
        
http://groups.google.com/groups?selm=S85md.1%24A35.0%40dfw-service2.ext.ray.com

Thanks to Arjen Markus for his report from the Wiki:
   The end of the year draws nigh: gray, cloudy days now and dark and short
   dark days ahead - at least on the geographical location your humble
   chronicler calls his home. One could easily get depressed if it were not
   for the sparkles of joy that brings the Wiki.

   Among such sparkles is - of course! - this one:
   <http://wiki.tcl.tk/12977>. An elegant little piece of maths and
   graphics.

   Okay, back to a more systematic approach ...

   Big items:
   - Running the software behind the Wiki yourself, say, via Tclhttpd:
     <http://wiki.tcl.tk/11121> tells you how.

   - Plenty of data on interacting with databases - all you need now is
     a couple of decisions ... which one, what do I want? Questions for
     which <http://wiki.tcl.tk/620> has lots of possible answers.

   - Not as simple as it looks and yet a user will want your GUI to be
     exactly that - maybe <http://wiki.tcl.tk/9762> holds the golden tip you
     were looking for.

   Playful items:
   - A chat script: 350 lines is all it takes for something that looks
     fairly complete - <http://wiki.tcl.tk/13020>

   - How useless these scripts are, I will leave to your discretion,
     but Marco Maggi published a few playthings to experiment with
     3D visualisation, such as <http://wiki.tcl.tk/12984>

   Technical items:
   - An explanation of UDP and how you can use it in Tcl -
     <http://wiki.tcl.tk/4038>

   - Move the cursor in a text widget: not by a logical line but by a line
     as seen by the user. Tricky! But Tcl 8.5 will repair this. Until then:
     <http://wiki.tcl.tk/3082> is there!

   - Sometimes you may want to better control what goes into a variable.
     Tcl's write traces put to the rescue - <http://wiki.tcl.tk/1907>

   - And at other times you may want to better control how many previous
     results you want to keep in the cache (memory is limited after all!)
      - <http://wiki.tcl.tk/13004>


Everything Tcl-related you want is probably one or two clicks away in these
pages:
     The "Welcome to comp.lang.tcl" message by Andreas Kupries
         http://www.purl.org/net/tcl-welcome

     The Tcl Developer Site is Tcl's "home base".
	 http://www.tcl.tk

     Larry Virden maintains a comp.lang.tcl FAQ launcher.
         http://www.purl.org/NET/Tcl-FAQ/

     The Tcl Developer Xchange is a highly organized resource center
     of documents and software with provisions for individuals to
     maintain references to their own software:
         http://www.tcl.tk/resource/
     The TDX sponsor, ActiveState, also keeps info to convince your
     boss Tcl is a good thing
         http://www.tcl.tk/scripting/

     The Tcl'ers Wiki is a huge, dynamic, collaboratively edited repository
     of documentation, examples, tutorials and pontifications on all things
     Tcl.
         http://wiki.tcl.tk/0
     For the ideal overview of the topics about Tcl most likely to
     interest a newcomer, see "Arts and Crafts ..."
         http://wiki.tcl.tk/969

     ActiveState maintains binaries distribution and development tools
         http://www.activestate.com/Tcl
     along with a Cookbook of Tcl recipes
         http://aspn.activestate.com/ASPN/Cookbook/Tcl

     Cameron Laird tracks several Tcl/Tk references of interest
         http://phaseit.net/claird/comp.lang.tcl/

     Cetus Links maintains a Tcl/Tk page with verified links
         http://www.cetus-links.org/oo_tcl_tk.html

     "Yahoo! Groups" archives comp.lang.tcl.announce posts
         http://groups.yahoo.com/group/tcl_announce/

Previous - (U)se the (R)esource, (L)uke! - messages are listed here:
   http://www.ddj.com/topics/tclurl/
An alternative is
   http://groups.google.com/groups?oi=djq&as_q=+Tcl-URL&as_ugroup=comp.lang.tcl

Suggestions/corrections for next week's posting are always welcome.

To receive a new issue of this posting in e-mail each Monday, ask
<claird@...> to subscribe.  Be sure to mention "Tcl-URL!".
--
Dr. Dobb's Journal (http://www.ddj.com) is pleased to participate in and
sponsor the "Tcl-URL!" project.

[[Send Tcl/Tk announcements to tcl-announce@...
   Announcements archived at http://groups.yahoo.com/group/tcl_announce/
   Send administrivia to tcl-announce-request@...
   Tcl/Tk at http://tcl.tk/ ]]

Messages 1927 - 1956 of 6538   Oldest  |  < Older  |  Newer >  |  Newest Start Topic
Add to My Yahoo!      XML What's This?

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines NEW - Help