<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://blog.gmane.org/gmane.comp.lang.tcl.core">
    <title>gmane.comp.lang.tcl.core</title>
    <link>http://blog.gmane.org/gmane.comp.lang.tcl.core</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.tcl.core/13988"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.tcl.core/13985"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.tcl.core/13981"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.tcl.core/13972"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.tcl.core/13955"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.tcl.core/13950"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.tcl.core/13923"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.tcl.core/13850"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.tcl.core/13849"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.tcl.core/13791"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.tcl.core/13771"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.tcl.core/13764"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.tcl.core/13747"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.tcl.core/13723"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.tcl.core/13718"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.tcl.core/13712"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.tcl.core/13711"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.tcl.core/13704"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.tcl.core/13701"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.lang.tcl.core/13655"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.tcl.core/13988">
    <title>CVF results: TIP #106: Add Encoding Abilities to the[dde] Command</title>
    <link>http://comments.gmane.org/gmane.comp.lang.tcl.core/13988</link>
    <description>&lt;pre&gt;The voting time expired, and the votes are
as follows:

   YES:         DKF, JN, JH
   NO:           nobody
   ABSTAIN:  nobody

So,, TIP#106 passes.

Thanks to all for voting.

Regards,
         Jan Nijtmans

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
&lt;/pre&gt;</description>
    <dc:creator>Jan Nijtmans</dc:creator>
    <dc:date>2012-05-21T11:10:37</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.tcl.core/13985">
    <title>compiling Tk support for python</title>
    <link>http://comments.gmane.org/gmane.comp.lang.tcl.core/13985</link>
    <description>&lt;pre&gt;I am trying to compile python but its keep missing Tk support (Tkinter
module).

Has anyone compiled this before? Are you using any special flags? Here is
what I am doing.


wget http://prdownloads.sourceforge.net/tcl/tcl8.5.11-src.tar.gz
wget http://prdownloads.sourceforge.net/tcl/tk8.5.11-src.tar.gz

tar -xzpf tcl8.5.11-src.tar.gz &amp;amp;&amp;amp; tar -xzpf tk8.5.11-src.tar.gz

#compile tcl
cd tcl8.5.11/unix/
./configure --prefix=/tmp/testdir --enable-64bit --enable-threads
make
make test
make install

#compile tk
cd tk8.5.11/unix/
./configure --prefix=/tmp/testdir --enable-threads --enable-64-bit
--with-tcl=/tmp/testdir/lib
make
make install

#compile python
wget http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tgz
tar -xzpvf Python-2.7.3.tgz
cd Python-2.7.3/
./configure --prefix=/tmp/testdir --enable-shared
LDFLAGS="-Wl,-rpath,/tmp/testdir/lib"


But, when I try to import it I get this

...
import _tkinter # if this fails your Python may not be configured for Tk
ImportError: No module named _tkinter


Is there anything special I need to do with TK?




&lt;/pre&gt;</description>
    <dc:creator>Rita</dc:creator>
    <dc:date>2012-05-16T10:28:59</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.tcl.core/13981">
    <title>CFV: TIP #106: Add Encoding Abilities to the [dde] Command</title>
    <link>http://comments.gmane.org/gmane.comp.lang.tcl.core/13981</link>
    <description>&lt;pre&gt;This is a Call For Votes on TIP #106. It allows
more control on how data is sent ([dde request]
or [dde poke]) to other applications which don't
use utf-8, as Tcl does.

Details at:
 http://www.tcl.tk/cgi-bin/tct/tip/106.html

Votes should be sent to this list in the usual format.
Close date will be midday UK time next Monday
(i.e., clock format 1337601600). My vote follows:

 TIP #106: YES

Regards,
     Jan Nijtmans

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
&lt;/pre&gt;</description>
    <dc:creator>Jan Nijtmans</dc:creator>
    <dc:date>2012-05-13T15:33:07</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.tcl.core/13972">
    <title>Tcl under cygwin platform changes</title>
    <link>http://comments.gmane.org/gmane.comp.lang.tcl.core/13972</link>
    <description>&lt;pre&gt;Is anyone in the CORE aware of this change?

[ANNOUNCEMENT] Updated: Tcl/Tk 8.5.11
. From: "Yaakov (Cygwin/X)" &amp;lt;yselkowitz at users dot sourceforge dot net&amp;gt;
. To: cygwin at cygwin dot com
. Date: Tue, 07 Feb 2012 03:07:23 -0600
. Subject: [ANNOUNCEMENT] Updated: Tcl/Tk 8.5.11
. Reply-to: cygwin at cygwin dot com
. Reply-to: The Cygwin Mailing List &amp;lt;cygwin at cygwin dot com&amp;gt;
________________________________________
Tcl/Tk has been updated to 8.5.11 with the following important changes:

* Tcl now uses *NIX APIs and will behave like other Cygwin programs with
regards to filename paths, etc.


The consequence is that tcl_platform(platform) == "unix"

(from: http://comments.gmane.org/gmane.os.cygwin/132371)

I hope this isn't a core sanctioned changed.

-Brian


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/_______________________________________________
Tcl-Core mailing list
Tcl-Core-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f&amp;lt; at &amp;gt;public.gmane.org
https://lists.sourceforge.net/lists/listinfo/tcl-core
&lt;/pre&gt;</description>
    <dc:creator>Brian Griffin</dc:creator>
    <dc:date>2012-05-10T16:59:14</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.tcl.core/13955">
    <title>TIP #399</title>
    <link>http://comments.gmane.org/gmane.comp.lang.tcl.core/13955</link>
    <description>&lt;pre&gt;I've been reviewing TIP #399 to see whether I thought it was reasonable
to call a vote on it yet, and I noticed that it did not state what the
default locale pattern would be, or what the matching rule for patterns
would be.

I'd hope that the default would be "current locale" and the matching
rule "like [string match]", but it does bear saying explicitly. :-)

Donal.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/_______________________________________________
Tcl-Core mailing list
Tcl-Core-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f&amp;lt; at &amp;gt;public.gmane.org
https://lists.sourceforge.net/lists/listinfo/tcl-core
&lt;/pre&gt;</description>
    <dc:creator>Donal K. Fellows</dc:creator>
    <dc:date>2012-05-04T13:36:24</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.tcl.core/13950">
    <title>Tk bug - ID 3515522: Crash when adding system menu toundocked window</title>
    <link>http://comments.gmane.org/gmane.comp.lang.tcl.core/13950</link>
    <description>&lt;pre&gt;I'd like to get closure on this bug as soon as possible.  The proposed solution doesn't seem to be correct, but I don't have enough knowledge of the changes made between 8.4 and 8.5 in this area to know how to craft a correct solution.  If someone familiar with TkFrameReleaseMenu changes (Todd? Pat?) could contact me I would appreciate it.

Thanks!
-Brian

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/_______________________________________________
Tcl-Core mailing list
Tcl-Core-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f&amp;lt; at &amp;gt;public.gmane.org
https://lists.sourceforge.net/lists/listinfo/tcl-core
&lt;/pre&gt;</description>
    <dc:creator>Brian Griffin</dc:creator>
    <dc:date>2012-05-03T22:56:51</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.tcl.core/13923">
    <title>TclOO question</title>
    <link>http://comments.gmane.org/gmane.comp.lang.tcl.core/13923</link>
    <description>&lt;pre&gt;Hi,

I'm currently writing a tcl only itk replacement.
For two tasks I could not find oo related functions.
May be there is a better solution available or
a new command could be implemented.

- Getting the class name of the current class definition like:
  class create myClass {
    puts [info name_of_current_class]
  }
  Currently I poke with uplevel in the calling command
  and extract the class name.

- Calling a method on an inherited class from outside like:
  class create A {
    public method do {} {puts A}
  }
  class create B {
    superclass A
    method do {} {puts B}
  }
  B create b
  some_magic b do
  --&amp;gt; A

Regards
rene
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/_______________________________________________
Tcl-Core mailing list
Tcl-Core-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f&amp;lt; at &amp;gt;public.gmane.org
https://lists.sourceforge.net/lists/listinfo/tcl-core
&lt;/pre&gt;</description>
    <dc:creator>Rene Zaumseil</dc:creator>
    <dc:date>2012-05-03T07:39:29</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.tcl.core/13850">
    <title>TIP #401: Comment Words with Leading {#}</title>
    <link>http://comments.gmane.org/gmane.comp.lang.tcl.core/13850</link>
    <description>&lt;pre&gt;
 TIP #401: COMMENT WORDS WITH LEADING {#} 
==========================================
 Version:      $Revision: 1.1 $
 Author:       Lars Hellström &amp;lt;Lars.Hellstrom_at_residenset.net&amp;gt;
 State:        Draft
 Type:         Project
 Tcl-Version:  8.7
 Vote:         Pending
 Created:      Sunday, 29 April 2012
 URL:          http://purl.org/tcl/tip/401.html
 WebEdit:      http://purl.org/tcl/tip/edit/401
 Post-History: 

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

 ABSTRACT 
==========

 The basic syntax rules of Tcl (the "dodekalogue") are modified to allow 
 words that are comments. In analogy with the argument expansion *{*}*, 
 such comment words will begin with *{#}* (left brace, hash sign, right 
 brace). 

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

 Tcl is special in that comments appear at the "statement" (command) 
 level of the language syntax rather than the "token" level (as is the 
 case in e.g. the ALGOL language family: C, Pascal, Java, etc.). This 
 means a Tcl program has fewer places in which a comment can be placed 
 than many other languages, but this has not been a serious problem in 
 traditional Tcl programming as commands tend to be short (except when 
 they have arguments that are themselves Tcl scripts) and places where a 
 comment can be inserted thus frequent enough. Recent developments in 
 the language have however changed this. 

 Various new features -- particularly dictionaries, ensembles, and 
 argument expansion (all of which were introduced with Tcl 8.5) -- have 
 encouraged a coding style where occasionally fairly large blocks of 
 code can be spent setting up data structures as explicit values. For 
 example, an ensemble that relies on the *-map* option typically has the 
 entire mapping dictionary as a braced word in the code, and this can 
 grow rather large if subcommands are being mapped to command prefixes 
 of length greater than one. *string map* mappings can grow very large 
 if there are many cases to deal with. Dictionaries have greatly 
 simplified the use of values with inner structure, and as a result the 
 complexity of the data that routinely gets passed to package commands 
 has increased; a controlling data structure (e.g. a grammar, in the 
 case of a parser) that once required an entire API of constructors to 
 build might now have been redesigned as a simple nested dictionary that 
 can be written raw in the code. And on top of it all, the various 
 examples given above are not excluding each other, but may rather nest 
 to form even larger blocks of code without any part that is a script. 
 Adding a class of comments that can begin anywhere a word can begin 
 undoes the forced "comment desert" status of such code blocks, because 
 words are syntactic units not just in commands but also in lists, and 
 all of the structured explicit values mentioned above are syntactically 
 either plain lists or lists with additional restrictions. 

 A parallel development is that the gap between what some piece of Tcl 
 looks like at coding time and at runtime has begun to widen, because an 
 increasing number of APIs call for fragments of commands (particularly 
 command prefixes) rather than full commands or scripts. This change is 
 often good from a correctness and efficiency point of view, but can 
 make code harder to maintain on account of being more obscure; the 
 evocation of runtime calls resulting from a particular piece of code 
 sometimes requires a considerable effort of imagination, even if all 
 APIs involved are well documented. Comment words that appear in the 
 position(s) where additional material is inserted at runtime can help 
 the mind here, by letting the eyes see in the code those things that 
 will be there when it is evaluated, e.g. rather than 

     socket -server [list ::some::handler $settings] $port

 one might write 

     socket -server [
         list ::some::handler $settings {#}chan {#}client {#}clientport
     ] $port

 to emphasize the fact that this *::some::handler* command takes those 
 four things as arguments, even though only one of them is present in 
 the command prefix. 

 For command words to not change the interpretation of any presently 
 legal syntactic construction, they must be something which is not valid 
 as a list element word. The brace-something-brace-something syntax 
 region where argument expansion was given a home is pretty much the 
 only possibility there is for this (if one rules out unbalanced words), 
 since there is very little that the Tcl parser finds outright wrong. 
 The *#* character is the normal way of starting a command-level 
 comment, so it is natural that it occurs also in the syntax of 
 word-level comments. 

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

 Clause 5 (argument expansion) of the Tcl.n manpage is to be amended 
 with the following conditions, and the language parser is to be 
 modified accordingly. 

       If a word starts with the string "{#}" followed by a 
       non-whitespace character, then the leading "{#}" is removed and 
       the rest of the word is parsed and substituted as any other word. 
       The result of this substitution is not used for anything, and no 
       word is added to the command being substituted. For instance, 
       "cmd a {#}{b c} d {#}e f" is equivalent to "cmd a d f". 

 Moreover, the analogous modification shall be made to the list parser; 
 a word with *{#}* proper prefix is recognised as a comment also in a 
 list, where the initial substitution phase only performs backslash 
 substitution. 

 /Note 1:/ The point of doing substitution is to stick as close to the 
 behaviour of *{*}* as possible. Of the three steps involved in argument 
 expansion - parse and substitute word, reparse result without 
 substitution as a list of words, and append those words to command 
 being built -- only the middle one need to be different for *{#}*, and 
 thus a lot of the code can be shared. 

 /Note 2:/ The comment prefix is typically most useful with words like 

    cmd {#}{some [text]} {#}bareword {#}"Comment goes here"

 but things like this are also legal: 

    cmd {#}$var {#}$x,\n {#}[foo bar]

 /Note 3:/ It is /very/ important for serveral use-cases that comment 
 words are recognised as such also in lists. One might (as I would) 
 argue that this should really follow automatically, since outside the 
 source itself the only (and not very explicit) documentation of the 
 string representation of lists is found in the lindex.n manpage which 
 merely says that: 

       In extracting the element, *lindex* observes the same rules 
       concerning braces and quotes and backslashes as the Tcl command 
       interpreter; however, variable substitution and command 
       substitution do not occur. 

 As only variable and command substitution are mentioned as things which 
 differ between lists and commands, they therefore must treat *{#}* the 
 same. However, presently the argument expansion *{*}* is not recognised 
 in lists, despite there not being a stated exception for that either. 
 (This state of affairs is reasonable, since it would be very 
 complicated to extend present mechanisms to support argument expansion 
 in lists and the benefit of doing so is smil at best, but it should be 
 more clearly documented.) 

 USE CASES 
===========

 MORE COMMENTS IN SWITCH 
-------------------------

 Beginning with an old issue, one may consider the placement of comments 
 to *switch* cases. The current advice is to place them first in the 
 bodies (which of course works), but it can often be exposition-wise 
 more natural to place them before the pattern, especially if there is 
 not a 1-1 correspondence between comments and bodies. 

     switch -regexp [string trimleft $number +-] {
    
         {#}"Integer formats"
         {^0$} - 
         {^[1-9][0-9]*$} {
              # ...
         }
         {^0o[0-7]+$} {
              # ...
         }
         {^0x[0-9A-Fa-f]+$} {
              # ...
         }
         
         {#}"Float formats"
         {^[0-9]*\.[0-9]+(e[+-][0-9]+)$} -
         {^[0-9]+\.[0-9]*(e[+-][0-9]+)$} -
         {^[0-9]+e[+-][0-9]+$}  {
              # ...
         }
         
     }

 INLINE COMMENTS IN LONG COMMANDS 
----------------------------------

 Some commands can be very long simply because they require a lot of 
 arguments to express what one wants, and then comments can help clarify 
 what a particular argument contributes to. 

     $canvas create polygon 0 0 {#}"left top" 30 0 {#}"bend down" 30 30 \
       {#}"concave part" 60 30 {#}"bend up" 60 0 {#}"right top" 90 0 \
       {#}"curving back" 90 30 45 67 0 30 {#}"done" -smooth true \
       -width 2 -fill orange -outline green {#}"Official colours" \
       -tags {button {#}"for clicking" buoyant {#}"affects movement"}

 If there are several ideas in such a command, it might be nice to put 
 the comments pertaining to each next to where that idea actually shows 
 up in the code. 

 INLINE ARGUMENT DESCRIPTIONS 
------------------------------

 The Tcl style guide for C code suggests that comments describing 
 function arguments appear inline with the argument declarations. 
 Comment words would permit the same style in Tcl code. 

    proc tcl::Pkg::CompareExtension {
       fileName      {#}"name of a file whose extension is compared"
       {ext {}}      {#}"The extension to compare against; you must
                         provide the starting dot. Defaults to the 
                         info sharedlibextension."
    } {
       # ...
    }

 (Whether that style would be regarded as an improvement or not probably 
 depends on one's taste.) 

 FILLING IN WORDS THAT WILL BE THERE AT RUNTIME 
------------------------------------------------

 At one point, I found myself wanting to do some calculations with 
 matrices whose elements were polynomials (with integer coefficients) of 
 four noncommuting variables /A/, /B/, /C/, and /D/. Having previously 
 implemented some basic algebraic constructions, I could quickly set up 
 a command that implemented arithmetic with such matrices through the 
 two *interp alias*es 

    interp alias {} Z&amp;lt;A,B,C,D&amp;gt; {} \
      ::mtmtcl::rings::semigroup_algebra ::mtmtcl::rings::integers::all\
        ::mtmtcl::groups::string_free_monoid
    interp alias {} matrices {} \
      ::mtmtcl::matprop::trivial dummy ::Z&amp;lt;A,B,C,D&amp;gt;

 This is however not a very readable definition even if one is familiar 
 with the commands it uses (and realises that there is nothing magical 
 about the command name *Z&amp;lt;A,B,C,D&amp;gt;*), because the way that things 
 appear in this piece of code is visually quite different from the 
 context in which they will appear when evaluated. If instead comment 
 words are inserted as visual placeholders for the missing material, 
 then the overall appearance becomes much closer to that of a script 
 calling these commands. 

    interp alias {} Z&amp;lt;A,B,C,D&amp;gt; {#}method {#}args {} \
      ::mtmtcl::rings::semigroup_algebra {
         ::mtmtcl::rings::integers::all {#}method {#}args
      } {
         ::mtmtcl::groups::string_free_monoid {#}method {#}args
      } {#}method {#}args
    interp alias {} matrices {#}method {#}args {} \
      ::mtmtcl::matprop::trivial dummy {
         ::Z&amp;lt;A,B,C,D&amp;gt; {#}method {#}args
      } {#}method {#}args

 "K COMBINATOR" 
----------------

 In the Tcl community, the /K combinator/ idiom is when you first 
 produce an argument for the main command (through variable or command 
 substitution), then evaluate some other command which has beneficial 
 side-effects but whose result is of no interest, and finally evaluate 
 the main command. (The original K combinator, as found combinatory 
 logic, is more about getting rid of unwanted arguments supplied to a 
 command prefix than about exploiting side-effects, but there is a 
 continuum connecting the two.) This is most often employed to have a 
 variable release its reference to a Tcl_Obj, so that the latter becomes 
 unshared and possible for a command to modify directly. *{#}* 
 introduces the new form 

    set stack [lreplace $stack {#}[set stack whatever] end end]

 of this, providing yet another alternative to such old forms as 

    set stack [lreplace $stack [set stack end] end]
    set stack [lreplace $stack[set stack ""] end end]
    set stack [lreplace $stack {*}[set stack ""] end end]

 Of course, any 

    foo $apa {#}[bar baz]

 can trivially be rewritten to achieve the same effect using argument 
 expansion instead: 

    foo $apa {*}[bar baz; list]

  COMMENTING OUT LIST ELEMENTS 
-------------------------------

 If a programmer needs to temporarily disable some functionality, then a 
 standard technique is to comment out the corresponding code. However, 
 if the code that needs to be commented out amounts to some elements in 
 a long list (e.g., a list of commands to [interp expose] in a slave 
 interpreter) then there is presently no way of commenting out less than 
 the whole command containing that list. Comment words provide a more 
 specific alternative. 

      set tclCommands {
          after append array binary break case catch cd clock close concat
          continue dde else elseif encoding eof error eval exec exit expr
          fblocked fcondict figure fcopy file fileevent flush for foreach 
          format gets glob global history if incr info interp join lappend
          lassign lindex linsert list llength load lrange lrepeat lreplace
          lsearch lset lsort namespace open package pid proc puts pwd read
          regexp regsub rename resource return scan seek set slave socket
          source split string subst switch tell time trace unknown
          unset update uplevel upvar variable vwait while
          {#}{ {#}"Auto-loaded commands"
          auto_execok auto_import auto_load auto_mkindex auto_mkindex_old
          auto_qualify auto_reset parray pkg::create pkg_mkIndex tcl_endOfWord
          tcl_findLibrary tcl_startOfNextWord tcl_startOfPreviousWord
          tcl_wordBreakAfter tcl_wordBreakBefore
          }
      }

 The same is true in dictionaries. 

    namespace eval ::tcl::info {
        namespace ensemble create -command ::info -map {
           exists             ::tcl::info::exists 
           globals            ::tcl::info::globals 
           locals             ::tcl::info::locals 
           vars               ::tcl::info::vars 
           args               ::tcl::info::args 
           body               ::tcl::info::body 
           default            ::tcl::info::default 
           commands           ::tcl::info::commands 
           procs              ::tcl::info::procs 
           functions          ::tcl::info::functions 
           cmdcount           ::tcl::info::cmdcount 
           complete           ::tcl::info::complete 
           script             ::tcl::info::script 
           level              ::tcl::info::level 
           frame              ::tcl::info::frame 
           errorstack         ::tcl::info::errorstack 
           patchlevel         ::tcl::info::patchlevel 
           tclversion         ::tcl::info::tclversion 
           {#}{ {#}"Commented out for bug #nnnnnn."
           hostname           ::tcl::info::hostname 
           sharedlibextension ::tcl::info::sharedlibextension 
           loaded             ::tcl::info::loaded 
           library            ::tcl::info::library 
           nameofexecutable   ::tcl::info::nameofexecutable 
           }
           coroutine          ::tcl::info::coroutine 
           object             ::oo::InfoObject 
           class              ::oo::InfoClass
        }
    }

 LINE CONTINUATION 
-------------------

 Comment words also provide an alternative to backslash--newline line 
 continuations, namely as in 

     a command which continues well beyond the normal line width {#}{
     } and which one therefore might want to split over two or more {#}{
     } lines of code

 Being several times longer than the simple backslash, this is unlikely 
 to replace it, but there could be cases where one wants to avoid the 
 backslash because that character would be intercepted by something 
 else. 

 ALTERNATIVES 
==============

 Using the author's *docstrip* package 
 [&amp;lt;URL:http://tcllib.sourceforge.net/doc/docstrip.html&amp;gt;], one can place 
 comments between any two lines of code (whether there is a command 
 separator there or not) and also comment out arbitrary code lines, even 
 if that comes at the price of working with sources that are not raw Tcl 
 code. However, such comments have a tendency to become more of a 
 separate commentary track than an integrated part of the program 
 narrative, and sometimes (for example to show things that are invisible 
 in the code) one specifically desires comments to be an integral part 
 of the Tcl code. 

 It is also possible to use *regsub* or something similar to the end of 
 removing comments from a block of code before it is evaluated or put in 
 a variable; instead of having the core language recognise some pieces 
 of code as comments, one preprocesses the code as a string before 
 telling the core that it actually is Tcl code. Thus instead of 
 (assuming comment words): 

      set tclCommands {
          after append array binary break case catch cd clock close concat
          continue dde else elseif encoding eof error eval exec exit expr
          fblocked fcondict figure fcopy file fileevent flush for foreach 
          format gets glob global history if incr info interp join lappend
          lassign lindex linsert list llength load lrange lrepeat lreplace
          lsearch lset lsort namespace open package pid proc puts pwd read
          regexp regsub rename resource return scan seek set slave socket
          source split string subst switch tell time trace unknown
          unset update uplevel upvar variable vwait while
          {#}{ {#}"Auto-loaded commands"
          auto_execok auto_import auto_load auto_mkindex auto_mkindex_old
          auto_qualify auto_reset parray pkg::create pkg_mkIndex tcl_endOfWord
          tcl_findLibrary tcl_startOfNextWord tcl_startOfPreviousWord
          tcl_wordBreakAfter tcl_wordBreakBefore
          }
      }

 one might write 

      set tclCommands [regsub -all {#[^\n]*\n} {
          after append array binary break case catch cd clock close concat
          continue dde else elseif encoding eof error eval exec exit expr
          fblocked fcondict figure fcopy file fileevent flush for foreach 
          format gets glob global history if incr info interp join lappend
          lassign lindex linsert list llength load lrange lrepeat lreplace
          lsearch lset lsort namespace open package pid proc puts pwd read
          regexp regsub rename resource return scan seek set slave socket
          source split string subst switch tell time trace unknown
          unset update uplevel upvar variable vwait while
          ## Auto-loaded commands
          # auto_execok auto_import auto_load auto_mkindex auto_mkindex_old
          # auto_qualify auto_reset parray pkg::create pkg_mkIndex tcl_endOfWord
          # tcl_findLibrary tcl_startOfNextWord tcl_startOfPreviousWord
          # tcl_wordBreakAfter tcl_wordBreakBefore
      } \n]

 A problem with the latter is that it destroys code line correspondences 
 for [TIP #280]. The boilerplate code for performing the preprocessing 
 may also need to be inserted far from the actual comment, which 
 discourages use of commenting using such a mechanism. But the main 
 problem with it is that quick fixes like this have a tendency to be 
 half-baked, and would break some otherwise legal code. (Everything 
 works fine in the example until the day someone needs to insert an 
 element which contains the # character into the list.) 

 Since the canonical list-quoting of *#* is precisely *{#}*, one could 
 (in analogy with the argument against *{}* as expansion prefix) argue 
 that *{#}something* is too likely to arise as a typo for *{#} 
 something*, which would suggest using some other character than *#* in 
 the comment prefix. *\#* is however a shorter way to list-quote *#*, so 
 it seems unlikely that *{#}* should be common in manually written code 
 (unlike *{}*, which is very common). 

 SUGGESTED STYLISTIC CONSIDERATIONS 
====================================

 Like ordinary words, comment words come in three varieties: 
 brace-delimited, quote-delimited, and barewords. A style rule which has 
 been used in the above examples is that: 

     * Natural language comment words are of the quote-delimited kind. 
       This is for consistency with the common practice of 
       quote-delimiting text strings within Tcl code, even if said 
       string does not require substitution. 

     * Comment words that serve as placeholders for actual program code 
       are of the bareword variety, e.g. *{#}method*. 

     * Comment words which serve a programmatic purpose, essentially 
       that of the "K combinator", are barewords too. 

     * Comment words which do not fall into any of the above categories, 
       for example those used to comment of a block of words, are 
       brace-delimited. 

 One reason for having a style rule about this is that prettyprinting 
 and syntax colouring utilities /might/ want to highlight these cases 
 differently. Arguably, syntax colouring of Tcl code tends to do /at 
 least as much harm/ as it does good since few engines are able to keep 
 track of enough context to found their claims about the code on 
 reasonably accurate interpretations thereof, but comment words is one 
 of the few things that they might actually manage to get right most of 
 the time, precisely because a comment word is a comment word throughout 
 so many contexts. 

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

 A reference implementation is available as SF Tcl patch #3522426 
 [&amp;lt;URL:https://sourceforge.net/support/tracker.php?aid=3522426&amp;gt;]. It 
 includes some tests, but more could be needed. 

 Implementing comment words in lists and the like could be achieved by 
 modifications only in TclFindElement. Comment words in scripts are 
 implemented as argument expansion that does not contribute any word. 

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

 This document has been placed in the public domain.  

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

 TIP AutoGenerator - written by Donal K. Fellows 

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
&lt;/pre&gt;</description>
    <dc:creator>Lars Hellström</dc:creator>
    <dc:date>2012-04-29T22:15:17</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.tcl.core/13849">
    <title>TIP status</title>
    <link>http://comments.gmane.org/gmane.comp.lang.tcl.core/13849</link>
    <description>&lt;pre&gt;In this message I'm trying to highlight those Draft TIPs that are
targeted at Tcl releases "in the near future".

This is the only TIP that claims to aim at 8.5. Alas, we can't make
progress on it yet; it lacks an implementation.

  TIP#392: Allow Bignums to be Disabled at Runtime on a Per-Interp Basis

These are the TIPs that target 8.6.

  TIP#376: Bundle sqlite3 and tdbc::sqlite3 Packages
  TIP#383: Injecting Code into Suspended Coroutines
  TIP#399: Dynamic Locale Changing for msgcat
  TIP#400: Setting the Compression Dictionary

Of these, #376 is blocked waiting for upstream, #383 is proposing an API
that is almost certainly too hard correctly to use in its current
implementation, #399 is about ready for a vote (there's a patch but I
think the TIP needs a little mostly-editorial polishing), and #400 has
an implementation under development.

There are no open Accepted TIPs. Thanks must go to Alexandre for dealing
with TIP #398.

Donal.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/_______________________________________________
Tcl-Core mailing list
Tcl-Core-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f&amp;lt; at &amp;gt;public.gmane.org
https://lists.sourceforge.net/lists/listinfo/tcl-core
&lt;/pre&gt;</description>
    <dc:creator>Donal K. Fellows</dc:creator>
    <dc:date>2012-04-29T07:51:17</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.tcl.core/13791">
    <title>Comments on TIP 351: 'add striding support for lsearch'</title>
    <link>http://comments.gmane.org/gmane.comp.lang.tcl.core/13791</link>
    <description>&lt;pre&gt;I am a fan of TIP 351: 'add striding support for lsearch'
Here are some propositions enhancing the tip:

1) The -index parameter should work with -stride the same way as with
lsort. This should be expressed clearly.

2) If 1) applies, the following sentence of the TIP gets non-redundand
for -index != 0:
"When lsearch is returning indices, it should return the indices of the
first element of the striding group(s) that is/are being indicated."

I am not shure if it is helpful to return the index of the group. There
might be cases, where the index of the item is required.
But anyway, this is the more general use-case, as the original index
might be calculated by: found index + index parameter value.

The other way around is more expensive.

I find it a bit odd how lsort acts here (tcl8.6).
% lsort -stride 2 -index 1 -indices {A B C D}
0 1 2 3
and not
1 3
or
0 2

The last would correspond to return the start of group index:
% lsearch -stride 2 -index 1 {A B C D} D
2

3) The given example is IMHO not so realistic.
It would give the same result*1) as "dict get $kvlist $key".

The lsearch -stride option is specially helpful, if the list is not a
dict, e.g. when keys may exist multiple times.
A second application is when the index is required which is not returned
by dict.

Proposed examples:
3.1) Check if key exists multiple times:
% lsearch -stride 2 -all -exact {arg 1 op + arg 2} arg
0 4
3.2) Extract a sub-key-value list starting from a given key "start":
% lrange $kvlist [lsearch -stride 2 $kvlist start] end

Thank you,
Harald

---
*1) not totally true, dict get would return the last occurence of key,
lsearch would return the first occurence of key.

---
I tried to send this message by a click on "peter" on
http://www.tcl.tk/cgi-bin/tct/tip/351.html
but got an internal server error

------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
&lt;/pre&gt;</description>
    <dc:creator>Harald Oehlmann</dc:creator>
    <dc:date>2012-04-20T09:53:37</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.tcl.core/13771">
    <title>tclconfig</title>
    <link>http://comments.gmane.org/gmane.comp.lang.tcl.core/13771</link>
    <description>&lt;pre&gt;Hi all,

is there a reason to have the TEA tcl.m4 and install.sh script separately
under tclconfig and not in the tcl sources in fossil? 

Regards
rene

------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second 
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev_______________________________________________
Tcl-Core mailing list
Tcl-Core-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f&amp;lt; at &amp;gt;public.gmane.org
https://lists.sourceforge.net/lists/listinfo/tcl-core
&lt;/pre&gt;</description>
    <dc:creator>Rene Zaumseil</dc:creator>
    <dc:date>2012-04-18T11:30:00</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.tcl.core/13764">
    <title>How to debug TclStackFree: incorrect freePtr ?</title>
    <link>http://comments.gmane.org/gmane.comp.lang.tcl.core/13764</link>
    <description>&lt;pre&gt;Hi...

I am using insight (GNU Debugger with tcl/tk frontend) together with 
tcl/tk 8.6 (most recent sources from fossil) on windows 7 64bit in 
64bit. Compiled using mingw-w64.

While it worked very well and stable for some weeks I am seeing now a 
reproducable Tcl_Panic() when stepping thru certain c++ code using 64bit 
insight (and so also 64bit tcl):

TclStackFree: incorrect freePtr (&amp;lt;some address&amp;gt; != &amp;lt;some other 
address&amp;gt;). Call out of sequence?

When searching the internet I found that this should most likely be 
related to multithreaded usage of the tcl interpreter. In my case this 
seems not to be the case. I added some code to TclStackFree() to dump 
the threadids and to alert when it changes. It is always the same 
threadid. So accessing the interpreter from multiple threads is not 
happening.

Moreover when debugging my application in 32bit mode (on the same 
system) using the very same 32bit version of insight with the very same 
tcl just compiled for 32bit it does not panic.

Has anyone any clue on how to isolate and fix that?

Thanks for your help,

Roland

------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second 
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
&lt;/pre&gt;</description>
    <dc:creator>Roland Schwingel</dc:creator>
    <dc:date>2012-04-17T10:15:47</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.tcl.core/13747">
    <title>Tclkit build failiure</title>
    <link>http://comments.gmane.org/gmane.comp.lang.tcl.core/13747</link>
    <description>&lt;pre&gt;You may have already noticed, but if not, I'm drawing your attention to
the fact that Tclkit is no longer building.  The latest successful build
was on 15 Feb 2012.  Today's build log, found at
http://patthoyts.tk/tclkit/win32-ix86/daily/ , ends with the error:

Creating library kit-gui.lib and object kit-gui.exp
tk86tsx.lib(xcolors.obj) : error LNK2001: unresolved external symbol
__strtoi64
kit-gui.exe : fatal error LNK1120: 1 unresolved externals

Also, did you get my previous email?  I never saw a reply.  It was a
long time ago.  I wrote:

"Today's (9 Dec 2010) tclkit-gui-win32 crashes for me, whereas the
latest (1 Jul 2010) prerelease works fine.  I'm using it to run a script
I wrote that uses Tcl3d and FTGL.  Upgrading to the latest Tcl3d didn't
help anything.  Sorry, I can't share the script with you, and this
computer has no debugging ability, so you might  not be able to do
anything with this report."

&lt;/pre&gt;</description>
    <dc:creator>andrew.m.goth-o70QjBUuf8rQT0dZR+AlfA&lt; at &gt;public.gmane.org</dc:creator>
    <dc:date>2012-04-12T23:13:30</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.tcl.core/13723">
    <title>CFV: TIP#398 Quickly Exit with Non-Blocking BlockedChannels</title>
    <link>http://comments.gmane.org/gmane.comp.lang.tcl.core/13723</link>
    <description>&lt;pre&gt;
Looks like discussion on TIP#398 has come to an end,
so Alex has asked me to issue the CFV.  So here it is:

Call For Votes:

    TIP#398 "Quickly Exit with Non-Blocking Blocked Channels"

    This TIP proposes that nonblocking channels shall no longer be
    switched to blocking mode when the process calls exit or Tcl_Exit(),
    reverting a longstanding undesirable behavior the ill effects of
    which cannot otherwise be circumvented.

End of votes Wednesday 18 Apr 2012ish.

My vote:


TIP#398: YES.


--Joe English

  jenglish-BD/dr091N2xF6kxbq+BtvQ&amp;lt; at &amp;gt;public.gmane.org

------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
&lt;/pre&gt;</description>
    <dc:creator>Joe English</dc:creator>
    <dc:date>2012-04-12T02:52:40</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.tcl.core/13718">
    <title>1st Call For Papers, 19th Annual Tcl/Tk Conference 2012</title>
    <link>http://comments.gmane.org/gmane.comp.lang.tcl.core/13718</link>
    <description>&lt;pre&gt;19th Annual Tcl/Tk Conference (Tcl'2012)
http://www.tcl.tk/community/tcl2012/

November 12 - 16, 2012
Holiday Inn Chicago Mart Plaza
350 West Mart Center Drive
Chicago, Illinois, USA

Important Dates:

Abstracts and proposals due   August    27, 2012
Notification to authors       September 10, 2012
WIP and BOF reservations open August     6, 2012
Author materials due          October   29, 2012
Tutorials Start               November  12, 2012
Conference starts             November  14, 2012

Email Contact:                tclconference-/JYPxA39Uh5TLH3MbocFFw&amp;lt; at &amp;gt;public.gmane.org

Submission of Summaries

Tcl/Tk 2012 will be held in Chicago, Illinois, USA from November 12 -
16, 2012. The program committee is asking for papers and presentation
proposals from anyone using or developing with Tcl/Tk (and
extensions). Past conferences have seen submissions covering a wide
variety of topics including:

* Scientific and engineering applications
* Industrial controls
* Distributed applications and Network Managment
* Object oriented extensions to Tcl/Tk
* New widgets for Tk
* Simulation and application steering with Tcl/Tk
* Tcl/Tk-centric operating environments
* Tcl/Tk on small and embedded devices
* Medical applications and visualization
* Use of different programming paradigms in Tcl/Tk and proposals for new
  directions.
* New areas of exploration for the Tcl/Tk language

Submissions should consist of an abstract of about 100 words and a
summary of not more than two pages, and should be sent as plain text
to &amp;lt;tclconference AT googlegroups DOT com&amp;gt; no later than August 27,
2012. Authors of accepted abstracts will have until October 29, 2012
to submit their final paper for the inclusion in the conference
proceedings. The proceedings will be made available on digital media,
so extra materials such as presentation slides, code examples, code
for extensions etc. are encouraged.

Printed proceedings will be produced as an on-demand book at lulu.com

The authors will have 25 minutes to present their paper at the
conference.

The program committee will review and evaluate papers according to the
following criteria:

* Quantity and quality of novel content
* Relevance and interest to the Tcl/Tk community
* Suitability of content for presentation at the conference

Proposals may report on commercial or non-commercial systems, but
those with only blatant marketing content will not be accepted.

Application and experience papers need to strike a balance between
background on the application domain and the relevance of Tcl/Tk to
the application. Application and experience papers should clearly
explain how the application or experience illustrates a novel use of
Tcl/Tk, and what lessons the Tcl/Tk community can derive from the
application or experience to apply to their own development efforts.

Papers accompanied by non-disclosure agreements will be returned to
the author(s) unread. All submissions are held in the highest
confidentiality prior to publication in the Proceedings, both as a
matter of policy and in accord with the U. S. Copyright Act of 1976.

The primary author for each accepted paper will receive registration
to the Technical Sessions portion of the conference at a reduced rate.

Other Forms of Participation

The program committee also welcomes proposals for panel discussions of
up to 90 minutes. Proposals should include a list of confirmed
panelists, a title and format, and a panel description with position
statements from each panelist. Panels should have no more than four
speakers, including the panel moderator, and should allow time for
substantial interaction with attendees. Panels are not presentations
of related research papers.

Slots for Works-in-Progress (WIP) presentations and Birds-of-a-Feather
sessions (BOFs) are available on a first-come, first-served basis
starting in August 6, 2012. Specific instructions for reserving WIP
and BOF time slots will be provided in the registration information
available in June 2012. Some WIP and BOF time slots will be held open
for on-site reservation. All attendees with an interesting work in
progress should consider reserving a WIP slot.

Registration Information

More information on the conference is available the conference Web
site (http://www.tcl.tk/community/tcl2012/) and will be published on
various Tcl/Tk-related information channels.

To keep in touch with news regarding the conference and Tcl events in
general, subscribe to the tcl-announce list. See:
http://code.activestate.com/lists/tcl-announce to subscribe to the
tcl-announce mailing list.


Conference Committee

Clif Flynt              Noumena CorpGeneral Chair, Website Admin
Andreas Kupries         ActiveState Software Inc.Program Chair
Cyndy Lilagan           Nat. Museum of Health &amp;amp; Medicine, ChicagoSite/Facilities Chair
Brian Griffin           Mentor Graphics
Ron Fox                 NSCL/FRIB Michigan State University
Arjen Markus            Deltares
Mike Doyle              National Museum of Health &amp;amp; Medicine, Chicago
Gerald Lester           KnG Consulting, LLC
Donal Fellows           University of Manchester
Jeffrey Hobbs           ActiveState Software Inc.
Steve Landers           Digital Smarties
Kevin Kenny             GE Global Research Center

Contact Information     tclconference-/JYPxA39Uh5TLH3MbocFFw&amp;lt; at &amp;gt;public.gmane.org


Tcl'2012 would like to thank those who are sponsoring the conference:

ActiveState Software Inc.
Buonacorsi Foundation
Mentor Graphics
Noumena Corp.
SR Technology
Tcl Community Association


------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
&lt;/pre&gt;</description>
    <dc:creator>Andreas Kupries</dc:creator>
    <dc:date>2012-04-02T18:52:23</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.tcl.core/13712">
    <title>TIP #400: Setting the Compression Dictionary</title>
    <link>http://comments.gmane.org/gmane.comp.lang.tcl.core/13712</link>
    <description>&lt;pre&gt;
 TIP #400: SETTING THE COMPRESSION DICTIONARY 
==============================================
 Version:      $Revision: 1.1 $
 Author:       Donal K. Fellows &amp;lt;dkf_at_users.sf.net&amp;gt;
 State:        Draft
 Type:         Project
 Tcl-Version:  8.6
 Vote:         Pending
 Created:      Friday, 30 March 2012
 URL:          http://purl.org/tcl/tip/400.html
 WebEdit:      http://purl.org/tcl/tip/edit/400
 Post-History: 

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

 ABSTRACT 
==========

 Sometimes it is necessary to set the compression dictionary so that a 
 sequence of bytes may be compressed more efficiently (and decompressed 
 as well). This TIP exposes that functionality. 

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

 The SPDY protocol extensions to HTTP require the seeding of the zlib 
 compression dictionary (which greatly improves the performance of 
 compression on small amounts of data, such as HTTP headers). In order 
 to allow a pure Tcl implementation of the SPDY protocol, it is 
 therefore necessary to provide a mechanism whereby the compression 
 dictionary (a byte-array up to 262 bytes long, according to the zlib 
 documentation). 

 There is to be no mechanism for retrieving the compression dictionary 
 generated by the compression engine; there is no API for doing that. 

 PROPOSED CHANGES: TCL 
=======================

 The *zlib push* command will gain an extra option: 

       *-dictionary* /bytes/ 

 This option will provide a compression dictionary to be used, which 
 will be supplied to the zlib compression engine at the correct moment 
 during compression or provided on request of the compression engine on 
 decompression. The /bytes/ argument will be interpreted as a Tcl 
 bytearray; it must be non-empty if given. 

 In addition, the *zlib stream* command will gain some complexity. All 
 the subcommands will gain the ability to take an extra *-dictionary* 
 /bytes/ pair of options (same interpretation as above), the *zlib 
 stream gzip* variety will also gain the ability to take *-header* 
 /dict/ (where /dict/ is a Tcl dictionary such as is passed to the 
 *-header* option to *zlib gzip*, not a compression dictionary), and the 
 *zlib stream gunzip* variety will also gain the ability to take 
 *-headerVar* /name/ (so that a Tcl dictionary describing the contents 
 of the gzip header can be reported). The omission of the last two were 
 an oversight in [TIP #234]. 

 PROPOSED CHANGE: C 
====================

 At the C level, one additional function will be provided: 

       void * *Tcl_ZlibStreamGetZstreamp*(Tcl_ZlibStream /zshandle/) 

 This returns the /z_streamp/ associated with a the given Tcl_ZlibStream 
 structure, which can then be used to directly call appropriate zlib 
 functions not directly exposed through Tcl's interface, notably 
 including deflateSetDictionary and inflateSetDictionary. Note that if a 
 function /is/ exposed through a public interface (e.g., deflate and 
 inflate) then it should not be called via this route or inconsistent 
 things may happen. The return type of Tcl_ZlibStreamGetZstreamp is 
 /void*/ so that there is no need for the zlib public types to form part 
 of Tcl's public API. 

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

 This document has been placed in the public domain. 

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

 TIP AutoGenerator - written by Donal K. Fellows 

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
&lt;/pre&gt;</description>
    <dc:creator>Donal K. Fellows</dc:creator>
    <dc:date>2012-03-30T14:19:46</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.tcl.core/13711">
    <title>TIP #399: Dynamic Locale Changing for msgcat</title>
    <link>http://comments.gmane.org/gmane.comp.lang.tcl.core/13711</link>
    <description>&lt;pre&gt;
 TIP #399: DYNAMIC LOCALE CHANGING FOR MSGCAT 
==============================================
 Version:      $Revision: 1.1 $
 Author:       Harald Oehlmann &amp;lt;Harald.Oehlmann_at_elmicron.de&amp;gt;
 State:        Draft
 Type:         Project
 Tcl-Version:  8.6
 Vote:         Pending
 Created:      Tuesday, 27 March 2012
 URL:          http://purl.org/tcl/tip/399.html
 WebEdit:      http://purl.org/tcl/tip/edit/399
 Post-History: 

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

 ABSTRACT 
==========

 This TIP adds dynamic locale switching to the msgcat package. 

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

 The msgcat package has a 3 stage processing model: 

    1. Set locale list: *mclocale* /locale/ 

    2. Load language files with other package load: *mcload* /catalog/ 

    3. Translate strings: *mc* /key args.../ 

 If the locale should be changed after other packages are loaded, one 
 must restart at step 2. 

 Within a multi-language application like a web-server, one may change 
 the language quite quickly, for example if users with different locales 
 are requesting pages. 

 The issue is that *mcload* only loads language files included in the 
 current locale (*mcpreferences*) and does not load any others. 

 The aim of this tip is to extend *mcload* to load additional language 
 files. Then *mclocale* may be called to change the language on runtime. 

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

 This TIP proposes to add a new command: 

       *msgcat::mcconfig -pattern* ?/patternlist/? 

 This command may get or set package options. There is currently one 
 option "*-pattern*". Options may be set using 

       *msgcat::mcconfig* /option value/ ?/option/? ?/value/? 

 Current option values may be read using: 

       *msgcat::mcconfig* /option/ 

 The option *-pattern/ consists of a list of language file name patterns 
 like fr*, *, fr_ch. 

 EXAMPLE USAGE 
===============

 Initialise msgcat within an application which supports the current user 
 language and french, german and english. 

   package require msgcat 1.5
   msgcat::mcconfig -pattern {fr.* de.* en.*}
   # require any other package
   package require BWidget
   
   # switch to french
   msgcat::mclocale fr

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

 See Tcl Feature Request 3511941. 
 [&amp;lt;URL:http://sourceforge.net/support/tracker.php/?aid=3511941&amp;gt;] 

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

 No incompatibilities are introduced 

 ALTERNATIVES 
==============

 This implementation requires the setting of the pattern before any 
 package with msgcat is loaded. To avoid this, msgcat must store all 
 paths passed by any *mcload* call. In case of a locale change, any 
 currently missing files are loaded. This requires much more 
 housekeeping and may lead to side effects, especially if packages are 
 not aware of the fact that their package files are loaded outside of 
 the *mcload* command. 

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

 This document has been placed in the public domain. 

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

 TIP AutoGenerator - written by Donal K. Fellows 

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
&lt;/pre&gt;</description>
    <dc:creator>Harald Oehlmann</dc:creator>
    <dc:date>2012-03-30T13:48:36</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.tcl.core/13704">
    <title>Initialize all vars or rely on info exists?</title>
    <link>http://comments.gmane.org/gmane.comp.lang.tcl.core/13704</link>
    <description>&lt;pre&gt;
Hi I posted this to comp.lang.tcl but haven't gotten any replies. Maybe this
list would be a better place to ask?

My question is is it better to initialize all variables in a script whether
they might be used or not or better to test with info exists?

I am scanning some text and variables only get created if specific patterns
match. I found out if I test a variable that didn't get created for the
empty string the script gets an error. Ok. I "solved" this by doing set for
all the possibly used variables to the empty string "". Looking a bit
further I see I could use info exists. Tcl noob as I am, I don't know
whether info exists is preferable or initializing lots of variables that may
not be used is better.

I don't mind the memory consumption of creating variables that might not be
used. The question is whether there's any benefit in Tcl to defining
variables that might not be used and if that is the right way to do this in
Tcl or should I use info exists? I would prefer to do it idiomatically, with
a priority on clarity and then performance and then storage consumption in
that order. Of course I want to do it like a Tcler.  In the last few days
since I posted I switched to using info exists I hope that is the better
way. Thanks guys.

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
&lt;/pre&gt;</description>
    <dc:creator>Anonymous Remailer (austria</dc:creator>
    <dc:date>2012-03-29T12:20:32</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.tcl.core/13701">
    <title>Tk and dual/multihead on windows (patch)</title>
    <link>http://comments.gmane.org/gmane.comp.lang.tcl.core/13701</link>
    <description>&lt;pre&gt;Hi...

I am relatively new to tcl/tk so don't judge me too hard if I am doing 
something wrong. And I hope I am here at the right location with my email.

My motivation to use tcl/tk is to make insight (GNU Debugger with Tcl/Tk 
UI) more nicely working on windows. Especially 64bit (mingw-w64). I am 
quite far with it, but found a little problem in tk's screen handling 
for windows (I am using current tk 8.6 sources from fossil).

While I am new to tcl/tk I am not new to C and programming on windows, 
linux and mac. As far as I understand tk supports multiple screens 
(monitors). The implementation on windows is made that way that it 
always presents one screen to the user, even when the system contains 
more than one screen (dual/multihead). When using tk's winfo 
screenwidth/height it always returns the widht/height of the primary 
monitor on windows. When there are applications (like insight) that use 
these informations to limit appearance of eg. tooltips and window 
positions this is little bad. Stored window positions can not be 
restored and tooltips are limited to the first screen.

The most ideal solution would be to also have the multiple screens on 
windows reflected in the internal structures of tk's screens. This would 
involve bigger changes in the windows code of tk. But why not (as a 
first simple shot) treat the whole (big) virtual working area spread 
over different physical screens as one big screen to tk.

This would just require a small 4 line patch to tk (which you can find 
attached to this email). This small change lets all multi/dualhead 
problems at least in insight pass away.

What do you think?

Roland
diff -ruN win_orig/tkWinWm.c win/tkWinWm.c
--- win_orig/tkWinWm.c2012-03-18 22:03:37.000000000 +0100
+++ win/tkWinWm.c2012-03-29 14:13:38.897676500 +0200
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -7821,8 +7821,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
     } else {
 HDC dc = GetDC(NULL);
 
-screen-&amp;gt;width = LOWORD(lParam);/* horizontal res */
-screen-&amp;gt;height = HIWORD(lParam);/* vertical res */
+screen-&amp;gt;width = GetSystemMetrics(SM_CXVIRTUALSCREEN);
+screen-&amp;gt;height = GetSystemMetrics(SM_CYVIRTUALSCREEN);
 screen-&amp;gt;mwidth = MulDiv(screen-&amp;gt;width, 254,
 GetDeviceCaps(dc, LOGPIXELSX) * 10);
 screen-&amp;gt;mheight = MulDiv(screen-&amp;gt;height, 254,
diff -ruN win_orig/tkWinX.c win/tkWinX.c
--- win_orig/tkWinX.c2012-03-18 22:03:37.000000000 +0100
+++ win/tkWinX.c2012-03-29 14:11:41.940879700 +0200
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -452,8 +452,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
     screen = display-&amp;gt;screens;
 
     dc = GetDC(NULL);
-    screen-&amp;gt;width = GetDeviceCaps(dc, HORZRES);
-    screen-&amp;gt;height = GetDeviceCaps(dc, VERTRES);
+    screen-&amp;gt;width = GetSystemMetrics(SM_CXVIRTUALSCREEN);
+    screen-&amp;gt;height = GetSystemMetrics(SM_CYVIRTUALSCREEN);
     screen-&amp;gt;mwidth = MulDiv(screen-&amp;gt;width, 254,
     GetDeviceCaps(dc, LOGPIXELSX) * 10);
     screen-&amp;gt;mheight = MulDiv(screen-&amp;gt;height, 254,
------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure_______________________________________________
Tcl-Core mailing list
Tcl-Core-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f&amp;lt; at &amp;gt;public.gmane.org
https://lists.sourceforge.net/lists/listinfo/tcl-core
&lt;/pre&gt;</description>
    <dc:creator>Roland Schwingel</dc:creator>
    <dc:date>2012-03-29T12:41:03</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.tcl.core/13655">
    <title>Last CFD: TIP#398 "Quickly Exit with Non-Blocking BlockedChannels"</title>
    <link>http://comments.gmane.org/gmane.comp.lang.tcl.core/13655</link>
    <description>&lt;pre&gt;
Alex has indicated that he considers TIP#398 ready to go
and would like to expedite the vote.  If anyone else has
any comments on this, please speak up now.

I have one note: the Specification section as written
(by, erm, me in fact :-) in revision 1.2 does not, I
don't think, accurately reflect the intent of the TIP.

It's also ambiguous: it refers to "finalization", but
doesn't say if that means interp-destruction time,
thread-destruction time, "normal" exit ([destroy .]
for wish, falling off the end of the script for tclsh,
or ^D for interactive shells), or explicitly calling
[exit] / Tcl_Exit().

Since the intent of the TIP (AIUI) is that [exit]
should exit, dammit, this is probably better:

| ~ SPECIFICATION
|
| Nonblocking channels shall no longer be switched to blocking mode
| when the process calls [exit] or Tcl_Exit().  Any buffered data
| for nonblocking channels will be discarded.
|
| ~ NOTES
|
| Blocking channels are unaffected by this TIP;  blocking channels shall
| still be flushed and closed at [exit]-time.
|

This is shorter and more to the point: only nonblocking channels
are affected, and only when the program explicitly calls [exit].


--Joe English

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
&lt;/pre&gt;</description>
    <dc:creator>Joe English</dc:creator>
    <dc:date>2012-03-21T19:55:36</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.lang.tcl.core/13641">
    <title>Incr Tcl-ng "info exists" fix</title>
    <link>http://comments.gmane.org/gmane.comp.lang.tcl.core/13641</link>
    <description>&lt;pre&gt;I made first experiments with tcl8.6 &amp;amp; Incr Tcl-ng (trunk from 2011-11).
Unfortunately, a "package require Itcl" breaks all Tcl by the bug:
"info exists" may errorneously return 0 if "info exists" is called
within a namespace or within a method:
http://core.tcl.tk/itcl/tktview?name=d4ee728817

Arnulf proposed to use "::info" instead "info" but this must be done in
all used packages which use namespaces...
Arnulf wrote that it is only partly an issue of "incr tcl-ng".

May I ask politely, if there is a possibility to fix this bug in a close
time frame ? It feels as a total show-stopper for me.

Thank you all,
Harald

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
&lt;/pre&gt;</description>
    <dc:creator>Harald Oehlmann</dc:creator>
    <dc:date>2012-03-21T09:25:23</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.comp.lang.tcl.core">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.comp.lang.tcl.core</link>
  </textinput>
</rdf:RDF>

