Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

secrets of tcl/tk

742 views
Skip to first unread message

bsall...@yahoo.com

unread,
Feb 7, 2014, 8:36:04 PM2/7/14
to
Been using tcl/tk for 15 years and still finding secrets. Wish there were better books on tcl/tk.

Found out about using debug trace variables to have software handle the state of a buttons to be disable or normal dependent on a variable. No sense having the search button enabled when no keyword in an entry window has been entered.

Appears that trace variables can also be used on changes to list variable. I find this very interesting for use in an application.

Just found out that with tcl you can use ; to indicate end of line of a command.
This allows you do
[ any command ] ; # inline command about what you are doing
Have not tried it out with an if yet.

This is useful for when you need a menu entry where you want a variable or even multiple variables in the command. In these cases you do not use the { and } but uses quotes.
for example
-command " set var $mystring ; a command ; a command;
a comand "

Before finding about ; I limited the actions to a single command.
This is used when I need to create a menu entry with the label of a variable such as $mystring. I use a variable for the label of a menu item when I am generating menu items for a list. I need a menu item for the name field of each item of the list. The command code for the menu item is always dependent upon the name field in the list.

Gerry Snyder

unread,
Feb 8, 2014, 12:51:24 AM2/8/14
to
On 2/7/2014 6:36 PM, bsall...@yahoo.com wrote:
> Been using tcl/tk for 15 years and still finding secrets. Wish there were better books on tcl/tk.
>
> ....
>
> Just found out that with tcl you can use ; to indicate end of line of a command.

Hmmm, the dodecalogue ( e.g., http://wiki.tcl.tk/10259 ) is considered
the standard documentation for Tcl. The use of the semicolon as a
command separator is in the second sentence of rule 1.

Maybe there are some other secrets hiding in there.

Gerry

Rani Ahmad

unread,
Feb 8, 2014, 3:30:55 AM2/8/14
to
I hope you don't mind. I am going to translate your words to Arabic to the LinuxAC.org (Linux Arab community) just to show the importance of Tcl/Tk to this part of the world.

Christian Gollwitzer

unread,
Feb 8, 2014, 5:34:09 AM2/8/14
to
Am 08.02.14 09:30, schrieb Rani Ahmad:
> On Saturday, February 8, 2014 3:36:04 AM UTC+2, bsall...@yahoo.com
> wrote:
>>
>> Just found out that with tcl you can use ; to indicate end of line
>> of a command.
>>
>> This allows you do
>>
>> [ any command ] ; # inline command about what you are doing
>>
>>
>> This is useful for when you need a menu entry where you want a
>> variable or even multiple variables in the command. In these cases
>> you do not use the { and } but uses quotes.
>>
>> for example
>>
>> -command " set var $mystring ; a command ; a command;
>>
>> a comand "
>>
>> Before finding about ; I limited the actions to a single command.
>>
>
> I hope you don't mind. I am going to translate your words to Arabic
> to the LinuxAC.org (Linux Arab community) just to show the importance
> of Tcl/Tk to this part of the world.

Well, do as you wish, but I do not consider the above description a good
style of coding. IMHO everything passed to -command switches should be a
single command (proc/method invocation), and the data connected with the
command should be stored alongside the proc. The easiest way to achieve
this is by using an OO extension and passing a method to the -command.

It's a sad thing in the Tcl world, that we now have a bunch of beautiful
tools to really tidy up large programs, but still I see a lot of
unstructured mess everywhere. I think we are missing a good book which
uses OO style from day 1 and teaches good practice to beginners.

Christian


bsall...@yahoo.com

unread,
Feb 8, 2014, 12:32:42 PM2/8/14
to
Gerry Snyder

Hmmm, the dodecalogue ( e.g., http://wiki.tcl.tk/10259 ) is considered
the standard documentation for Tcl.
.....................................
I am old school and prefer documentation of vendors which is currently ActiveState instead of hobbyists. I also prefer programming books which are in short supply when it comes to tcl/tk.

The problem with tcl/tk is that most of those that use it do not understand it is a higher level language and not a toy with informal information from the hobbyists.

I have written code with assembly language, fortran, pl1, c, c++, vc++, motif, java and java swing, etc. Tcl/tk is a better higher level language but this will not be seen since it is being viewed as a toy.

bsall...@yahoo.com

unread,
Feb 8, 2014, 1:00:52 PM2/8/14
to
Christian Gollwitzer


Well, do as you wish, but I do not consider the above description a good
style of coding. IMHO everything passed to -command switches should be a
single command (proc/method invocation),
................................................
Sorry but I live in a different world where the idea is to get the work done. In this world there are no police rules and you do what makes sense and works.

Creating a proc that will be only called by a single place in a program is poor coding if instead the work could be done by a few lines of code.

You use a proc if there is the possibility of reuse and might have other places in your program where you can call the proc. Another reason to use a proc even when there will be only one call of the proc is if the code is complex and/or long.

I once knew some one who would write class functions for code that could be done with a single line of code.

The rules for real software developers is KISS which is Keep It Simple Stupid. You write code that is easy to maintain and understand since someday someone will say "it is not working" and expect you to fix it.

Rich

unread,
Feb 8, 2014, 3:43:25 PM2/8/14
to
bsall...@yahoo.com wrote:
: Christian Gollwitzer

:
: Well, do as you wish, but I do not consider the above description a
: good style of coding. IMHO everything passed to -command switches
: should be a single command (proc/method invocation),
: ................................................

: Sorry but I live in a different world where the idea is to get the
: work done. In this world there are no police rules and you do what
: makes sense and works.

: Creating a proc that will be only called by a single place in a
: program is poor coding if instead the work could be done by a few
: lines of code.

There are a couple very valid reason in Tcl for creating a proc that
will only be called from one place, a "-command" option for a GUI
widget.

One is it frees you from having to worry about quoting hell:
http://wiki.tcl.tk/1726

The second is that it allows you to better control your state variable
locations and avoid over-reliance upon global variables. This one is
because the scripts attached to -command options execute at global
scope.


miguel.sofer

unread,
Feb 8, 2014, 4:09:22 PM2/8/14
to
On 08/02/14 17:43, Rich wrote:
> There are a couple very valid reason in Tcl for creating a proc that
> will only be called from one place, a "-command" option for a GUI
> widget.

Not a valid reason since Tcl8.5:
http://tcl.tk/man/tcl8.5/TclCmd/apply.htm
http://wiki.tcl.tk/4884

Rich

unread,
Feb 8, 2014, 4:56:41 PM2/8/14
to
miguel.sofer <miguel.s...@gmail.com> wrote:
Valid point, but technically you are still creating a proc that is only
called from one place, it is just an anonymous proc instead of a named
proc.

Gerry Snyder

unread,
Feb 8, 2014, 6:04:16 PM2/8/14
to
On 2/8/2014 10:32 AM, bsall...@yahoo.com wrote:
> Gerry Snyder
>
> Hmmm, the dodecalogue ( e.g., http://wiki.tcl.tk/10259 ) is considered
> the standard documentation for Tcl.
> .....................................
> I am old school and prefer documentation of vendors which is currently ActiveState instead of hobbyists.


Okay, http://docs.activestate.com/activetcl/8.5/tcl/TclCmd/Tcl.htm

Still second sentence of rule 1.

Gerry

bsall...@yahoo.com

unread,
Feb 8, 2014, 7:04:17 PM2/8/14
to
Rich

There are a couple very valid reason in Tcl for creating a proc that
will only be called from one place, a "-command" option for a GUI
widget.

One is it frees you from having to worry about quoting hell:
http://wiki.tcl.tk/1726

The second is that it allows you to better control your state variable
locations and avoid over-reliance upon global variables. This one is
because the scripts attached to -command options execute at global
scope.
........................................
Before I used the quoting for the -command I had to send the index of the item of the list to a proc. I did not like this since I had to test for bounds.

As for multiple lines with ; in a -command with quotes I sometime do multiple commnands with the ; and then call a proc.

I have an application with over 1600 procs so I think police rules for when you supposedly have to use a proc are stupid.

As for global I use them and I have never used upvar and never want to. Most people are totally unaware of the capabilities of current inexpensive computers and are still writing programs based on these computers in the 1980's.

I also do not want procs with large number of args since I had enough of that when I did fortran and saw the problems if you made a mistake in the args you are sending.

Most individuals do not understand that globals can be viewed as the clue of programs and that a global is an indicator or the state of a program. No need to be cheap with globals as they can interconnect large numbers of procs and functions. Everyone raves about objects, well globals can be seen as components of objects for pure tcl/tk which does not have objects.

I keep my programs simple to understand so it is easy to reuse code. I hate it when I can not find in my program code that I can reuse for writing new code. A very junior programmer could read my code and understand it. I hate elegant code since I do not want to spend time on figuring it out. I also use significant names for variables. I use plenty of comments in my code.

I like code that even if I have a severe headache I can review and understand. The presence of elegant code gives me a headache.

You could view working with program as an expenditure of brain energy and you do not want to waste this energy on elegance or programming standards that are totally out of touch with the capabilities of inexpensive computer.

By the way I first posted secrets of tcl/tk because people with tcl/tk do not share. I figured if I shared others would share. In fact is one post I found some one who gave me an answer to a question that I could use.


Christian Gollwitzer

unread,
Feb 9, 2014, 4:31:05 AM2/9/14
to
Dear bsallamack,

I'm unsure if you are just trolling; nevertheless I'll respond one more
last time in this thread in the hope to give some useful information.

Am 09.02.14 01:04, schrieb bsall...@yahoo.com:
>> There are a couple very valid reason in Tcl for creating a proc that
>> will only be called from one place, a "-command" option for a GUI
>> widget.
>>
>> One is it frees you from having to worry about quoting hell:
>> http://wiki.tcl.tk/1726
>
>> The second is that it allows you to better control your state variable
>> locations and avoid over-reliance upon global variables. This one is
>> because the scripts attached to -command options execute at global
>> scope.
> ........................................
> Before I used the quoting for the -command I had to send the index of
> the item of the list to a proc. I did not like this since I had to
> test for bounds.
>
> As for multiple lines with ; in a -command with quotes I sometime do
> multiple commnands with the ; and then call a proc.
>
> I have an application with over 1600 procs so I think police rules
> for when you supposedly have to use a proc are stupid.

You obviously don't like rules, since you don't respect the usual
quoting in Usenet. You responded to your own message instead of the one
you actually respond to, and you didn't quote with the standard quoting
characters. All of this makes your posts hard to follow. Even Google
Groups should be able to do most of this automatically for you.

Back to the technical discussion:
It is not clear what your real problem is with calling a single proc;
There might be a valid reason for having more than one statement in a
-command, but usually it's better to hand it off to a separate command.

There is a number of reasons for that
1) -commands evaluate in the global scope, as said by Rich

2) In bind scripts, there is textual substitution going on for every
invocation. You might end up in quoting hell, and procs are
byte-compiled which is also more efficient.

3) If you only bind short commands, you have better separation of GUI
layout and functionality. Moving around 100 lines of bind scripts when
you want to change the button layout is not going to help maintaining
your code

> As for global I use them and I have never used upvar and never want
> to. Most people are totally unaware of the capabilities of current
> inexpensive computers and are still writing programs based on these
> computers in the 1980's.
>
> I also do not want procs with large number of args since I had enough
> of that when I did fortran and saw the problems if you made a mistake
> in the args you are sending.

It is wrong to pass 100 args to a proc, fully agreed. But globals are
only a too short step in the right direction and a long one in the wrong
direction. See below for a better solution.

> Most individuals do not understand that globals can be viewed as the
> clue of programs and that a global is an indicator or the state of a
> program. No need to be cheap with globals as they can interconnect
> large numbers of procs and functions. Everyone raves about objects,
> well globals can be seen as components of objects for pure tcl/tk
> which does not have objects.

This is plain wrong. There have been OO extensions for Tcl around for 20
years (incr Tcl, though obsolete today IMHO), and since 8.6 there is
native support with tcloo. Many extensions (including Tk itself) use an
object system to present their API to Tcl. You can choose from a variety
of object systems (snit, stooop, XOTCL, ...), some of them written in
plain Tcl (no dependency).

> I keep my programs simple to understand so it is easy to reuse code.
> I hate it when I can not find in my program code that I can reuse for
> writing new code.

I can't see how you achieve this with loose procs and globals.

> A very junior programmer could read my code and
> understand it.

You say "could"; have you actually tried this? It is a good measure of
code quality to ask a fellow programmer who hasn't seen the code before
to change something in your program. The more desperate his expression,
the worse is the code quality.

In a large program with 1600 procs, you surely must have more than a
thousand globals. How do you know, when you change a global in one proc,
which other procs are also affected?

The real secret behind OO and all this stuff is that you can group your
data in smaller units together with the procs that handle them. I hope
you don't import every global in every proc. Therefore, there will be a
natural sub-structure of the program. The simplest way (extension-free)
to express this is via namespaces. The below example shows how I'd do it
for a thing which exists only once in the program.

=========================================================
package require Tk
namespace eval FooDialog {
# sample popup dialog box
# to enter a line of text
variable ns [namespace current]
variable input {}
variable w

proc InitGUI {win} {
variable ns
variable w
# make frame and three widgets
set w(top) $win
set w(main) [ttk::frame $win.mainframe]
pack $w(main) -expand yes -fill both

set w(lbl) [ttk::label $w(main).lbl -text "Please enter your name"]
set w(ent) [ttk::entry $w(main).ent -textvariable ${ns}::input]
set w(ok) [ttk::button $w(main).ok -text "OK" -command ${ns}::ok]

grid $w(lbl) -sticky nsw
grid $w(ent) -sticky nsew
grid $w(ok)

grid columnconfigure $w(main) 0 -weight 1
}

proc ok {} {
variable w
destroy $w(top)
}

proc ask {} {
variable input
set tlname .foodialog
toplevel $tlname
InitGUI $tlname
tkwait window $tlname
return $input
}
}

package provide FooDialog 1.0

# usage
set name [FooDialog::ask] ;# this pops up a dialog and asks for name
puts "Hello, $name"

=======================================================================

Several things are noteworthy, when comparing this to the ancient books
you recommended:

1) It was very easy to call up the dialog; it looks no different from,
say, tk_getOpenFile.

2) The variables w (containing the widget pathnames) and input are
confined in the namespace; the rest of the program doesn't know of their
existence. This relation is very clear from the code, because it is
wrapped in a {} block and indented. To pass the procs and vars to Tk,
you must prefix them by ${ns}::, which expands to the real path thanks
to the very first line.

3) Because of the encapsulation, I could choose very short names like
ask, input etc. If those were real globals, in a big program I'd need to
have "inputForName", "inputForBirthday", etc... in order to not mix the
variables up. Still, my little dialog can be reused very, very easily.
If you add a pkgIndex file, you can even use it in the future just by
"package require FooDialog" in your programs.

4) I've used ttk widgets all over to get the most native impression

5) I've spelled every literal (like the toplevel widget pathname) only
once in the code. That makes it very easy to wrap another frame around,
move the widgets around and so on.


> By the way I first posted secrets of tcl/tk because people with
> tcl/tk do not share.

Your secret is documented in the shortest possible language description
of Tcl, the dodecalogue. How hard can this be to find?

A sadly better kept secret is the coding style you need to write
maintainable code in modern Tcl. I've written a couple of tools with
several thousand lines, and a large beast with 20kLOC together with two
other colleagues. During that we figured out most of what is needed to
keep the code maintainable and clean. Snit was one of the ingredients,
it's still my favourite OO system in Tcl.

However I fear that most of the Tcl out there still looks like 1990s and
proves Richard Stallman true, who ditched Tcl back then. Took a look at
gitk recently, and it was awful. There are procs in there importing
more than 50 (sic!) globals.

I had to defend Tcl in a Python newsgroup, where they said "Yeah, used
Tcl 15 years ago, it has no aggregate structures, no modules, no
objects... how can you program with that crap???" Every single point
they made is not valid any longer (for a couple of years already!), but
it's hard to convince people once they burnt their fingers in such a
mess of code.

HTH,
Christian


Uwe Klein

unread,
Feb 9, 2014, 4:56:14 AM2/9/14
to
bsall...@yahoo.com wrote:
> Gerry Snyder
>
> Hmmm, the dodecalogue ( e.g., http://wiki.tcl.tk/10259 ) is considered the standard documentation
> for Tcl. ..................................... I am old school and prefer documentation of
> vendors which is currently ActiveState instead of hobbyists. I also prefer programming books
> which are in short supply when it comes to tcl/tk.
>
> The problem with tcl/tk is that most of those that use it do not understand it is a higher level
> language and not a toy with informal information from the hobbyists.

This imho is the wrong divide.
You have capable and ineffective programmers.
There is a lot of nonhobbyist software from ineffective/fumbling programmers around.
But the code is not open and is used in an intellectually closed environment.
(i.e. you have a bunch of people active on it that all tell each other how great they are : Adobe
and Microsoft come to mind. Adobe is incapable of fixing platform specific UI problems that nobody
else on that platform has )

>
> I have written code with assembly language, fortran, pl1, c, c++, vc++, motif, java and java
> swing, etc. Tcl/tk is a better higher level language but this will not be seen since it is being
> viewed as a toy.

Done all that and also sung cumbaya ;-)

Most good ideas/concepts haemorrhage on the intellectual limitations of the user.

Stallmann trashing Tcl was a political move for promoting scheme/guile.
Whatever the theorectical brilliance apps that embed guile as a scripting tool
are a pita to use ( imho a useability and a community mindset problem )

uwe

Uwe Klein

unread,
Feb 9, 2014, 5:07:47 AM2/9/14
to
bsall...@yahoo.com wrote:
> By the way I first posted secrets of tcl/tk because people with tcl/tk do not share.

This imho is a rather uncalled for critique.

Whatever shortcomings tcl allegedly has
"lack of a sharing community" is not one of its faults.
( Actually my experience is that the tcl/tk community
is at the very top of being most helpfully friendly )

uwe

LH

unread,
Feb 9, 2014, 6:38:53 AM2/9/14
to
On Saturday, 8 February 2014 02:36:04 UTC+1, bsall...@yahoo.com wrote:
> Been using tcl/tk for 15 years and still finding secrets. ...

I find your post quite confusing and full of flawed logic. For the sake of casual readers who may get wrong impressions about Tcl, some corrections are in order.

First, as Gerry Snyder has already pointed out twice, the use of the semicolon as a command separator is hardly a secret, deeply held by Tcl hobbyists. It is well documented in all official intros to Tcl syntax.

Second, the in-line comment pattern "command ;# comment" owns not only to the semicolon but also to a bit unusual concept of comment in Tcl (as a command whose name starts with # character). This has further consequences, for comment formatting styles in particular. To give just one example, before you spend the next 15 years on discovering this, you can continue a comment with backslash, just like any other command. For example,

set a 1 ;# a long multiline \
comment can go here

Third, your sudden discovery of how to write longer scripts as callbacks, such as in your example

-command " set var $mystring ; a command ; a command;
a comand "

has nothing to do with the semicolon separator, but rather with the general Tcl substitution mechanism. In the past, before you discovered the semicolon, you could have equally well used the following pattern instead:

-command "
set var $mystring
a command
a command
a comand
"

LH

Uwe Klein

unread,
Feb 9, 2014, 7:33:13 AM2/9/14
to
LH wrote:
> has nothing to do with the semicolon separator, but rather with the general Tcl substitution mechanism. In the past, before you discovered the semicolon, you could have equally well used the following pattern instead:
>
> -command "
> set var $mystring
> a command
> a command
> a comand
> "
>
> LH

There is one "thing" in this context that is nonobvious for "nonnative" tcl users:
syntax for tracing is

trace add variable $varname $op $command

where command is appended by 3 items ( varname arrayelem op )
and then evaluated.

The alleged "trick" here is that command can be more than a proc name.

( a bit of semantic didling imho.
The man pages for [bind]ings mention "script" as argument
and widget -command arg is also of type "script"
while the manpage for trace just says command is executed. )
i.e. all the following examples are OK args to trace add:

trace add variable write "trc_hdl"
trace add variable write "trc_hdl $specialinfoA $specialinfoB"
trace add variable write "puts \"doing my trace\"; trc_hdl"

uwe

Rich

unread,
Feb 9, 2014, 12:20:52 PM2/9/14
to
Christian Gollwitzer <auri...@gmx.de> wrote:
: Dear bsallamack,

: I'm unsure if you are just trolling; nevertheless I'll respond one
: more last time in this thread in the hope to give some useful
: information.

Given this from his very first post:

> Been using tcl/tk for 15 years and still finding secrets. ...
> ...
> Just found out that with tcl you can use ; to indicate end of line of
> a command.

Plus what he has added to further posts, leads me to the conclusion
that he is indeed trolling.

He is only a post or two away from landing in my Tin killfile alongside
"johannes falcone".

oc_forums

unread,
Feb 9, 2014, 2:01:10 PM2/9/14
to
I'm not for controversy, but I'm using Tcl/Tk as well for 15 years and I've recently discovered functions that are not well documented (lmap) or not so widely used ( argument expension ) ... Not to write about coroutine or advanced regular expressions. I bet we will discover new secrets when we are no more dashing technician ;-) !

In my opinion, this good trolling to write "Tcl/tk is a better higher level language but this will not be seen since it is being viewed as a toy. " :-) !

I wrote this because I think Tcl/Tk is the best language to reunite people with so many skills and horizons.

Regards,

Olivier


PS: And when I get old, I wish I can find such a place where I can write things that may appear silly for many , but I would like to share to stay alive :D .

bsall...@yahoo.com

unread,
Feb 9, 2014, 2:41:33 PM2/9/14
to
To Christian Gollwitzer

You obviously don't like rules, since you don't respect the usual
quoting in Usenet.

I wonder about you and your obsession with rules.

As for me, when I work for someone that pays me I follow their rules. If I do not like their rules, their ethics, or how they treat me, I give two weeks notice and say good bye.

As for programming rules when I am not working for someone that pays me, I decide the rules. I have plenty of rules that I follow, but these are rules that make my work easier.

As for your technical idea you really have to stop being so stiff. What may be true in one case may be totally false in other cases.

As for tk_getOpenFile I do not use and wrote my own code. I did this since this program is different on Windows and Linux. Also it is poorly written since it has files displayed across. My version shows the file system in the same way as operating system file systems. The only difference is that sub directories are not mixed with files.


> A very junior programmer could read my code and
> understand it.

"You say "could"; have you actually tried this?"

As for my claim that even a very junior programmer can understand my code this has been actually seen when I am being paid to write code.

I learned Object-oriented programming when I wanted to learn C+. The value of objects is when you have already objects like the Standard Template Library.

The real strength of Tcl/Tk is the ability to write GUI's and GUI's do not do that well with objects since the widget are already like objects. There is not much sense or advantage in taking the Tk widgets and wrapping them so that you can say you have object oriented programming. It is far easier to understand the existing TK widgets than have to understand a made up object orient programming language that wraps them.

I do not think much of programmers that think they have added anything new when they simply wrap Tk widgets.

When I am writing my own code I do not use packages. I know my code since I have written it and test it. I do not have to worry that are bombs in the code which I might have to with a package. I once worked with a package and saw a problem that I was able to fix with the source code. But this would have required fixing the problem with every release.

If someone pays me I will work with any "package" or interface that is necessary since that is my job, but when I am working with my own code I simply do not want to be dependent upon unknown code of someone else.

To be honest when I see someone who is so rigid in what is the acceptable ideas about programming I see someone that I have to wonder about.

I am of the old school where I see the most important ability in software development work is flexibility. It is difficult to be flexible when you are loaded with ideas and rules that you do not question.

By the way I always respond to starting item of a discussion and not added items.

bsall...@yahoo.com

unread,
Feb 9, 2014, 2:54:05 PM2/9/14
to
To Uwe Klein
.........................
Sharing is actually providing real information.

When I look for information on C++ I will find detailed information.

With Tcl/Tk I have even seen posting to questions where the writer says you should download the source code of a product and review it.

By the way I looked on the web and see that imho is "In My Humble (Honest) Opinion".

bsall...@yahoo.com

unread,
Feb 9, 2014, 3:33:52 PM2/9/14
to
Christian Gollwitzer

I find the code you have given for an example of the rules you follow as horrible.

There are not catches around all destroys.

Your code lacks comments. Comments improve readability but I see you are not interested in readability for others.

Using a single letter for a variable went out a long time ago and is very poor for readability. You also do not understand when you use single letters or short names for variables you totally hinder the use of tools that can do text searching on source code, since you will get many irrelevant results.

When I am looking for work I bring my laptop so I can show programs I have written on my free time, and also the source code for technical interviews.

If I was doing a technical review and you showed me this as an example of your coding I would not hire you.

Your coding reminds me of a junior programmer in PL1 that worked for me. In working he would use unneeded features of PL1 to simply improve is learning of PL1. He did this even though he was being paid to get the job done.

Do not show your code example on a technical review.

bsall...@yahoo.com

unread,
Feb 9, 2014, 4:08:50 PM2/9/14
to
To LH

Yes it is no secret but I have never seen a reason given for using ; to end a command line.

With ; I can finally write comments on the same line of a command instead of having to write the comment before or after the command.

I just tried out:
if { test } { #comment for test
}

This works which is great for me since I like to do a lot of comments that help me in reviewing code or reusing code.

I also did not find any mention of the ; for -command with quotes which is useful.

Yes there are documents that give some details but very little information on use. The man of trace variables does not even mention that a trace variable can be used with a list variable.

The secret is not feature but the advantages that can be obtained by using the feature.

In C++ there are plenty of books in the capabilities that can be obtained from what is offered by features of a language but this is not the case with tcl/tk. The few tcl/tk books that are available are simply in most cases just repeats of the information that can be obtained by reading tcl/tk man pages.

This is why Graphical Applications with Tcl & Tk by Eric Foster-Johnson written in the late 1990's is still the best and only book for someone wanting to learn tcl/tk.

I am just glad this book was available and I did not have to deal with the poorly written books about tcl/tk. I have bought these books as references but I would never suggest these books to someone for learning tcl/tk.



Christian Gollwitzer

unread,
Feb 9, 2014, 4:18:16 PM2/9/14
to
Am 09.02.14 21:33, schrieb bsall...@yahoo.com:
> Christian Gollwitzer
>
> I find the code you have given for an example of the rules you follow
> as horrible.

Well, show your equivalent beast littered with globals and explain why
it should be better.

> [...]
> There are not catches around all destroys.

Haha, explain to me how that destroy is called when the window is down:)

> Your code lacks comments. Comments improve readability but I see you
> are not interested in readability for others.
>
> Using a single letter for a variable went out a long time ago and is
> very poor for readability. You also do not understand when you use
> single letters or short names for variables you totally hinder the
> use of tools that can do text searching on source code, since you
> will get many irrelevant results.
>
>[....]
>
> Do not show your code example on a technical review.
>

ROFL!! Thanks for your jokes:)

> By the way I always respond to starting item of a discussion and not
added items.

And this is just one of the reasons I won't answer to your posts
anymore. It's simply too annoying to follow what you want. Welcome to
the killfile.

Christian

DrS

unread,
Feb 9, 2014, 4:31:49 PM2/9/14
to
On 2/9/2014 2:54 PM, bsall...@yahoo.com wrote:
> To Uwe Klein
>
>> By the way I first posted secrets of tcl/tk because people with tcl/tk do not share.
>
> This imho is a rather uncalled for critique.
...
>
> By the way I looked on the web and see that imho is "In My Humble (Honest) Opinion".


It's the EOTWAWKI! YDEK that Uwe is one of the more helpful around
here. AFAIK, his post was valid.

PS. IDKWYM by PL1. JTUSK, it is PL/1.


:-)

bsall...@yahoo.com

unread,
Feb 9, 2014, 4:39:16 PM2/9/14
to
To LH

has nothing to do with the semicolon separator, but rather with the general Tcl substitution mechanism. In the past, before you discovered the semicolon, you could have equally well used the following pattern instead:

-command "
set var $mystring
a command
a command
a comand
"

...........................................................
You are hoisted by your own petard.

I doubt that in all the documentation about tcl/tk that you mention and others say exists you will find an incident of information regarding using [ -command " instead of -command { ], and the reasons for why one might want to do this.

I believe I found -command " from looking at someone's code. That code probably was for a single command line so I did not think of having multiple lines of code. If it was explained as a feature there would have been an explanation that there could be more than single lines.

Looks like in fact there are cases where there is not even mentions of the use of curly quotes. The below description from the man page for menu indicates that someone can not simply depends on documentation information about tcl/tk,

-command value
Specifies a Tcl command to execute when the menu entry is invoked.

This does not mention the use of curly braces and at first appearance could be interpreted that only a single command is allowed for a menu item. At least in other books " -command script " appears.

Those who want to use tcl/tk would be far better off if there was more than simply the currently available very questionable documentation.

DrS

unread,
Feb 9, 2014, 4:42:55 PM2/9/14
to
On 2/8/2014 7:04 PM, bsall...@yahoo.com wrote:
> By the way I first posted secrets of tcl/tk because people with tcl/tk do not share.
> I figured if I shared others would share. In fact is one post I found some one who
> gave me an answer to a question that I could use.
>
>

Just curious: what questions have you asked that have gone unanswered?


DrS

DrS

unread,
Feb 9, 2014, 5:01:57 PM2/9/14
to
On 2/9/2014 4:39 PM, bsall...@yahoo.com wrote:
> To LH
>
> I doubt that in all the documentation about tcl/tk that you mention and others say exists
> you will find an incident of information regarding using [ -command " instead of -command { ],
> and the reasons for why one might want to do this.

Trust me, you are wrong on this account. I don't have all of the books
on Tcl/Tk, but I have quite a few. This is covered in Tk chapters.


>
> I believe I found -command " from looking at someone's code. That code probably was for a single
> command line so I did not think of having multiple lines of code. If it was explained as a feature
> there would have been an explanation that there could be more than single lines.

Do you see why your perception may have been clouded by this? Looking
at code is fine and useful but is not a particularly effective way to
learn a new programming language. By your own standards (from your
previous posts admonishing the lack of comments), why would any user put
in sections explaining every command? They used a command in a way that
suited them. Why would they describe what other options or switches or
what not the command could take? And why would you take that and
associate it as the authoritative usage pattern for that command?

I suspect this is the crucial key that led to this long thread. Use of
a semicolon as a command separator is covered in the first few pages of
any semi-decent review of the language. It is a command terminator,
after all! Without knowing this, how would anyone try to write a
command, without knowing when or where the command will end?


> Those who want to use tcl/tk would be far better off if there was more
> than simply the currently available very questionable documentation.

Someone else's code and their comments, or lack of it, can not be
considered the official documentation of the language they used.


DrS

bsall...@yahoo.com

unread,
Feb 9, 2014, 5:24:59 PM2/9/14
to
.....................................

"seeking solution to have tcl package built with vc++ work with with freewrap"
"Has anyone built a dll with vc++ 6.0 to work with tcl/tk wrapped by TclApp"
There appears to be a problem which I describe in the first one.

Instead of a package I see I can just wrap an executable.

I will be going over to TclDev as it has features that I like. The cost is not high and I am trying to market a product. Free is nice but there are usually advantages in paying for a product.



I asked a question if there was anyway to change the font and font size for tkmessage box. Also asked about change the font size of the arrowhead for cascades.

My program lets a user set all the fonts and font sizes and this includes program elements.

"question regarding cascades"
"seeking information to set font and font size for tk messagebox"

"seeking information to use -inactiveselectbackground"
I got an answer for this one. This is a attributes of the text widget while I thought it was a attribute of the sel tag.



Eric

unread,
Feb 9, 2014, 5:38:20 PM2/9/14
to
On 2014-02-09, bsall...@yahoo.com <bsall...@yahoo.com> wrote:
> Christian Gollwitzer
>
> I find the code you have given for an example of the rules you follow
> as horrible.

What code? Where? If you were to follow the normal Usenet (or email for
that matter) convention of replying to the message you are going to talk
about, all I would have to do is look at the parent message and there I
would find the code. Instead you reply to your own original message so
if I want to review what you are talking about I have to search through
the whole thread. You are being as unhelpful to someone reading your
message as anyone else could possibly be in writing code that is not
readable.

> There are not catches around all destroys.

Why should there be? The whole thing is simple enough to see what is
going on, and, even if it weren't, a destroy failure would be a BUG
which I would hope to have found before any user got near the program,
and if it was still there for a user to find I would want it to be a
conspicuous error so I would get to hear about it and be able to fix it.

> Your code lacks comments. Comments improve readability but I see you
> are not interested in readability for others.

As an experienced Tcl/Tk programmer I find the code perfectly readable
and not in need of any more comments.

> Using a single letter for a variable went out a long time ago and is
> very poor for readability. You also do not understand when you use
> single letters or short names for variables you totally hinder the use
> of tools that can do text searching on source code, since you will get
> many irrelevant results.

"went out a long time ago"?? Good programming is not a matter of fashion
or having to be new, it is about being correct and maintainable. You do
not understand that in a suitably specific module, which this is, short
variable names are perfectly acceptable, especially when there is only
one or the names are slightly mnemonic ("w" for "window"). No one will
ever search for this "w", it only matters within this module. Global
variables (you should have as few as possible), namespaces and global
procedures, yes a meaningful and findable name is useful.

> When I am looking for work I bring my laptop so I can show programs I
> have written on my free time, and also the source code for technical
> interviews.
>
> If I was doing a technical review and you showed me this as an example
> of your coding I would not hire you.

Then you would probably be making a mistake.

> Your coding reminds me of a junior programmer in PL1 that worked for me.
> In working he would use unneeded features of PL1 to simply improve is
> learning of PL1. He did this even though he was being paid to get the
> job done.

And of course you don't want your junior programmers to learn, they
might turn into senior programmers and threaten your position :-). More
seriously, if he used something inappropriate that should be spotted in
the code review, and the reasons for its inappropriateness explained, so
he can learn from that too (and have a chance to defend it).

> Do not show your code example on a technical review.

Maybe he wouldn't want to work for anyone who didn't like the code and
any accompanying explanation.

Eric
--
ms fnd in a lbry

DrS

unread,
Feb 9, 2014, 5:52:37 PM2/9/14
to
On 2/9/2014 5:24 PM, bsall...@yahoo.com wrote:
> .....................................
>
> "seeking solution to have tcl package built with vc++ work with with freewrap"
> "Has anyone built a dll with vc++ 6.0 to work with tcl/tk wrapped by TclApp"
> There appears to be a problem which I describe in the first one.
>
> Instead of a package I see I can just wrap an executable.
>
> I will be going over to TclDev as it has features that I like. The cost is not
> high and I am trying to market a product. Free is nice but there are usually
> advantages in paying for a product.
>
>
>
> I asked a question if there was anyway to change the font and font size for tkmessage box.
> Also asked about change the font size of the arrowhead for cascades.
>
> My program lets a user set all the fonts and font sizes and this includes program elements.
>
> "question regarding cascades"
> "seeking information to set font and font size for tk messagebox"
>
> "seeking information to use -inactiveselectbackground"
> I got an answer for this one. This is a attributes of the text widget while I thought it was a attribute of the sel tag.
>
>
>

OK; thanks. I see that you have just recently started posting. Looks
like you have several replies already for most of them. A few comments
that may make your posts receive more replies:

1) Include a snippet of the code you are having problems with. People
are busy, and even if it may only take a few minutes to reply and solve
your problems, it is hard to find the time and write an approximation of
the situation you are in, and solve your problem. If they can copy and
paste your code sample, they can be more effective.

2) Be open to suggestions on doing things differently. Regardless of
your experience level, there is always a different way of doing things.
For example, your questions on freewrap, dll, and TclApp are
confusing. If your code is in Tcl scripts (which I string suspect),
there is no dll to speak of, and TclApp does something entirely different.

3) People are busy and may reply a few days later than you might like.

4) Learn to use the wiki at http://wiki.tcl.tk. It has a ton of code
plus good discussion around each point.


DrS






bsall...@yahoo.com

unread,
Feb 9, 2014, 5:55:30 PM2/9/14
to
..........................................................
Yes I remember once seeing in a book multiple line on a single line with the semicolons. At the time I thought this was hideous programming and could see no reason for using semicolons unless someone wanted to write spaghetti code.

The point I was trying to make is that in books there is not enough examples of code that shows the use of the features. I never came across a semi colon being used so you could have a comment on the same line following a command. My comments would have been better and easy if I would have known this.

The use of [ list ... ] is also something that could be better explained in books with an explanation where it could be used and where it can not be used.

I think tcl/tk is great but there is too much secrecy on using the features.

Many of the books simply duplicate the man pages and the sample code is usually page upon page instead of simple examples that explain the features.

I was wrong and I see the idea of trying sharing any information is something that should not be done.

Kevin Walzer

unread,
Feb 9, 2014, 6:01:01 PM2/9/14
to
On 2/9/14, 5:24 PM, bsall...@yahoo.com wrote:
>
> "seeking solution to have tcl package built with vc++ work with with freewrap"

Freewrap has few users these days, so it's not surprising that you
didn't get an answer here.

> "Has anyone built a dll with vc++ 6.0 to work with tcl/tk wrapped by TclApp"

I would guess the answer is no.

> I asked a question if there was anyway to change the font and font size for tkmessage box. Also asked about change the font size of the arrowhead for cascades.

No and no, I suspect. On Windows and Mac the native dialogs are used
and aren't configurable. Not sure on X11, but I would think no.
>
> My program lets a user set all the fonts and font sizes and this includes program elements.
>
> "question regarding cascades"
> "seeking information to set font and font size for tk messagebox"
>
> "seeking information to use -inactiveselectbackground"
> I got an answer for this one. This is a attributes of the text widget while I thought it was a attribute of the sel tag.

I saw your questions but as they don't concern my platform (Mac) I
assumed others would answer them.

--Kevin

--
Kevin Walzer
Code by Kevin/Mobile Code by Kevin
http://www.codebykevin.com
http://www.wtmobilesoftware.com

bsall...@yahoo.com

unread,
Feb 9, 2014, 6:16:40 PM2/9/14
to

> Kevin Walzer
> Code by Kevin/Mobile Code by Kevin
> http://www.codebykevin.com
> http://www.wtmobilesoftware.com

Thanks for your answers. I took down your contact information since I might someday want to port my product to apple.

bsall...@yahoo.com

unread,
Feb 9, 2014, 6:24:12 PM2/9/14
to
seeking solution to have tcl package built with vc++ work with with freewrap"
The above has all the code and you might want to review it.

Eric

unread,
Feb 9, 2014, 6:46:05 PM2/9/14
to
On 2014-02-09, bsall...@yahoo.com <bsall...@yahoo.com> wrote:
<><mostly snipped!
> I think tcl/tk is great but there is too much secrecy on using the
> features.

There is no secrecy. To be honest I cannot comprehend how you can think
that there is!

> Many of the books simply duplicate the man pages and the sample code
> is usually page upon page instead of simple examples that explain the
> features.

A book like that is really not a good book to learn from. I don't have
a recommendation here because I didn't learn from a book but from the
wiki, some other code that I had access to at the time, the man pages
and asking a few questions here and elsewhere, and (mainly) lots of
experimenting. Mostly the books I have I treat as background reading and
as an occasional source of useful code (or reminders of methods to avoid).

> I was wrong and I see the idea of trying sharing any information is
> something that should not be done.

Again, I have no idea how you can possibly think that.

DrS

unread,
Feb 9, 2014, 8:12:07 PM2/9/14
to
On 2/9/2014 6:24 PM, bsall...@yahoo.com wrote:
> seeking solution to have tcl package built with vc++ work with with freewrap"
> The above has all the code and you might want to review it.
>
>

Sorry if my message was confusing or implied that you did not post code
samples. The message was something else.

DrS



Uwe Klein

unread,
Feb 9, 2014, 5:19:23 PM2/9/14
to
bsall...@yahoo.com wrote:
> To LH
>
> has nothing to do with the semicolon separator, but rather with the general Tcl substitution
> mechanism. In the past, before you discovered the semicolon, you could have equally well used the
> following pattern instead:
>
> -command " set var $mystring a command a command a comand "
>
> ........................................................... You are hoisted by your own petard.
>
> I doubt that in all the documentation about tcl/tk that you mention and others say exists you
> will find an incident of information regarding using [ -command " instead of -command { ], and
> the reasons for why one might want to do this.
>
> I believe I found -command " from looking at someone's code. That code probably was for a single
> command line so I did not think of having multiple lines of code. If it was explained as a
> feature there would have been an explanation that there could be more than single lines.

with widgets the -command named option has one single argument. a script.

How you create this script is left to your personal style and requirements.
You might even generate this script ( or any other code used in tcl )
by another tcl ( or $language of your liking ) programme.
Store it in variable, manipulate it with tcl commands, append to it , ..

set timeout 666
set mycmdscript {puts "Wonna do no Perl anymore" ;}
append mycmdscript {set timeout 999;}
append mycmdscript "puts stderr \"warp core dropped in $timeout seconds \" ;"
append mycmdscript {puts stderr "warp core dropped in $timeout seconds " ;}
set mycmdscript [ string map {{warp core} {WARP CORE}} $mycmdscript ]


# then hand it to the -command option:
pack [ button .b -text "Give Up!" -command $mycmdscript ]


tracing.
How in Ousterhout's name is a list variable not a variable?
Whatever secret information forced you to think that there is a limitation?
( There is one big storage type limitation around for tcl. But not this ;-)

The cognitive problems you have do not jibe with your professed widely scoped expertise.

uwe



Gerald W. Lester

unread,
Feb 10, 2014, 4:46:08 PM2/10/14
to
On 2/9/14, 3:31 AM, Christian Gollwitzer wrote:> ...
> In a large program with 1600 procs, you surely must have more than a
> thousand globals. How do you know, when you change a global in one proc,
> which other procs are also affected?
> ...

While not being a big fan of lots of globals, 1,600 procs does not strike me
as a large program, more like on the small side of medium. After all, we
are only talking about something like 160,000 lines of code.

While quite manageable without OO techniques, what frightened me more about
the one of the OP's post was "A very junior programmer could read my code
and understand it" -- I find I can't read my own code and understand it (at
least without a lot of comments).


--
+------------------------------------------------------------------------+
| Gerald W. Lester, President, KNG Consulting LLC |
| Email: Gerald...@kng-consulting.net |
+------------------------------------------------------------------------+

Christian Gollwitzer

unread,
Feb 10, 2014, 5:20:05 PM2/10/14
to
Am 10.02.14 22:46, schrieb Gerald W. Lester:
> On 2/9/14, 3:31 AM, Christian Gollwitzer wrote:> ...
> > In a large program with 1600 procs, you surely must have more than a
> > thousand globals. How do you know, when you change a global in one proc,
> > which other procs are also affected?
> > ...
>
> While not being a big fan of lots of globals, 1,600 procs does not
> strike me as a large program, more like on the small side of medium.
> After all, we are only talking about something like 160,000 lines of code.

Well, size is in the eye of the beholder. Compared to the Linux kernel,
160kLOC is not much, compared to a calculator app it seems giant. And
160kLOC in C is a lot different from 160kLOC in Tcl.

I still can't believe that the human mind can grasp 1600 procs at once,
so for sure there must be some substructure. Whether you use an
"official" OO technique or just good coding conventions (like prefixes),
is up to you. A good OO engine just simplifies the task and spares a lot
of typing.

> While quite manageable without OO techniques, what frightened me more
> about the one of the OP's post was "A very junior programmer could read
> my code and understand it" -- I find I can't read my own code and
> understand it (at least without a lot of comments).

http://www.osnews.com/story/19266/WTFs_m

Christian

Rich

unread,
Feb 10, 2014, 10:42:32 PM2/10/14
to
bsall...@yahoo.com wrote:
: To LH

: I doubt that in all the documentation about tcl/tk that you mention and
: others say exists you will find an incident of information regarding using
: [ -command " instead of -command { ], and the reasons for why one might
: want to do this.

"Practical Programming in Tcl and Tk"
By Brent B. Welch
Published 1995 by Prentice Hall

Pg. 146 shows a button definition of the following form:

button $f.$b -text $val \
-command "set x \[expr \$x * $val\]"

The surrounding text of pg. 146 and 147 discuss the -command "" (with
quotes) format, the disadvantages of doing such, and methods to work around
the disadvantages.

Specifically, this paragraph, on pg. 147, is on point:

"Double quotes are used in the button command to allow $val to be
substituted. Whenever you use quotes like this, you have to be aware
of the possible values for the substitutions. If you are not careful,
the command you create may not be parsed correctly. The safest way to
generate the command is with the list procedure:"


Rich

unread,
Feb 10, 2014, 11:05:09 PM2/10/14
to
bsall...@yahoo.com wrote:

: The point I was trying to make is that in books there is not enough
: examples of code that shows the use of the features. I never came
: across a semi colon being used so you could have a comment on the
: same line following a command. My comments would have been better
: and easy if I would have known this.

Practical Programming in Tcl and Tk
By Brent B. Welch
Published 1995 by Prentice Hall

pg. 12 - "Comments" section:

Tcl uses the pound character, #, for comments. Unlike many
languages, the # must occur at the beginning of a command. An
easy trick to append a comment to the end of a command is to
proceed the # with a semicolon to terminate the previous command:

# Here are some parameters
set rate 7.0 ;# The interest rate
set months 60 ;# The loan term


: The use of [ list ... ] is also something that could be better
: explained in books with an explanation where it could be used and
: where it can not be used.

Same book, page 58, Example 6-1 Using list to construct commands

: I think tcl/tk is great but there is too much secrecy on using the features.

Hardly secret, the Welch book is now 19 years old, so these "secrets"
have been known for 19 years.

bsall...@yahoo.com

unread,
Feb 20, 2014, 9:53:19 PM2/20/14
to
You really miss the point on this one.

The various forms that can be used after -command should be explained in a man page and not hidden in a book with 822 pages. In the book the various forms for after -command should have been explained the first time -command was written about.

As for comments and the use of semicolons the book is really poor.

The fact that a semicolon can be used to indicate a command should have been mentioned earlier, and not hidden in information about comments that many will skip. In fact it should have probably be mention that text of a command is terminated by a line feed or a semicolon at the start of the first chapter after the first example of a command was shown. Also the use of a slash to continue a command should have been explained.

Like it or not tcl/tk needs better books and not from those that created tcl/tk. Having the creator of new technology write a manual of the technology is a mistake.

Writing a book about computer technology is for writers of technology.

Every book I read from the creator of a computer technology is poor. The creator does not understand they are writing a manual, and writing a manual is boring and not a test of intellect.

By the way my edition says "Unlike in many other languages, the # must occur at the beginning of a command."

This implies a comment is a command which is really questionable since comments are simply discarded where a command would require some code to be generated that the processor would have to act upon.

If it makes you happy Rich I will agree and say these are NOT secrets but instead just hard to find information because the writers of tcl/tk do such a poor job.

Uwe Klein

unread,
Feb 21, 2014, 2:38:19 AM2/21/14
to
bsall...@yahoo.com wrote:
> You really miss the point on this one.
>
> The fact that a semicolon can be used to indicate a command should have been mentioned earlier,
> and not hidden in information about comments that many will skip. In fact it should have
> probably be mention that text of a command is terminated by a line feed or a semicolon at the
> start of the first chapter after the first example of a command was shown. Also the use of a
> slash to continue a command should have been explained.
all this you can find explained in
man tcl
i.e. the basic manual page for tcl.

> The various forms that can be used after -command should be explained in a man page and not
> hidden in a book with 822 pages. In the book the various forms for after -command should have
> been explained the first time -command was written about.

There are no "various forms of -command syntax"
-command has exactly one argument : a tcl script.
and % substitution is explained in depth.

As tcl is much more flexible than you seem to grasp
_how_ you construct a workable script can be achieved
in a wide range of ways.
The thing to note with tcl is that it can run data as script
which can be used for trapping user and programmer but also
to programatically create code ( as a "direct" script or
as body to prog creation.

> Every book I read from the creator of a computer technology is poor. The creator does not
> understand they are writing a manual, and writing a manual is boring and not a test of intellect.

Your missunderstanding.
manual pages already exist. No writer would repeat that task.

"Tcl/Tk Books" or other computer books at that are "companion" literature.
Exception: K&R "The C language". that really is the manual ;-)

uwe

oc_forums

unread,
Feb 21, 2014, 6:16:39 AM2/21/14
to

> If it makes you happy Rich I will agree and say these are NOT secrets but instead just hard to find information because the writers of tcl/tk do such a poor job.

Maybe the opportunity to write a book as you progress ?

From the first page of the tutorial delivered with activeState installation we have :

puts "Hello, World - In quotes" ;# This is a comment after the command.
# This is a comment at beginning of a line
puts {Hello, World - In Braces}
puts {Bad comment syntax example} # *Error* - there is no semicolon!

puts "This is line 1"; puts "this is line 2"

puts "Hello, World; - With a semicolon inside the quotes"

# Words don't need to be quoted unless they contain white space:
puts HelloWorld

It couldn't be more simple and complete, curiosity is a good book as well.

Regards,

Olivier.

Rob

unread,
Feb 21, 2014, 7:25:04 AM2/21/14
to
A definitely more complete approach might be for OP to work through Cliff
Flynt's 'Tcl Tutor' and the examples available there.

See http://wiki.tcl.tk/1681 for further information and location of this
application. From what I've seen here, the OP's iddsues are often due to not
haven't looked through such exmaples and seen the rules which determine how
Tcl works.

Please, bsallamack, take a look through the work shown in this tutorial and
this may help you better understand how things work...

Rob.

bsall...@yahoo.com

unread,
Feb 21, 2014, 10:40:40 AM2/21/14
to
To Rob

I learned tcl/tk from Graphical Applications with Tcl&Tk, author Eric Foster-Johnson which so far is the best book for starting to learn tcl/tk.

By the way I have most of the books on tcl/tk and this is the problem. Most of these books are very poorly written.

What is needed is more books on tcl/tk and language manuals on tcl/tk. Simple examples can be contained in the language manual.

Tcl/Tk Programmer's Reference by Christopher Nelson is a good book but could definitely be improved and brought up to date.

Tcl/tk is a great programming language for creating applications but there are not that many books on tcl/tk that treat it as a programming language.




bsall...@yahoo.com

unread,
Feb 21, 2014, 11:17:13 AM2/21/14
to
To Oliver

I find tutorials of very little value.

I view tcl/tk as a computer language and I look for books and information that treat it as a computer language.

I remember fortran and in a description of fortran as a computer language it was explained the format that was needed when a fortran command had to extend over a single line. I remember the starting letters of the continue line has a specific format that the compiler could recognize. This was in the days when a computer line was limited to 80 characters.

I started in computers after learning about electricity and what could be done with electronic switches in comparison to mechanical switches. I then read a programming language book on IBM assembly language. This gave me a complete understanding of IBM assembly language and what could be done with the elements of the language.

The type of knowledge and understanding of a computer language does not come from a tutorial since no tutorial will give the detailed information that explains the elements of the computer language.

I know writing books on computer languages are boring but there is a market for these books since there are so few books of worth on tcl/tk.

See my post to Rob for the two good tcl/tk books I have found.

Rich

unread,
Feb 21, 2014, 1:11:12 PM2/21/14
to
bsall...@yahoo.com wrote:
: You really miss the point on this one.

: The various forms that can be used after -command should be explained in a
: man page and not hidden in a book with 822 pages. In the book the various
: forms for after -command should have been explained the first time
: -command was written about.

man n button:

-command command Specifies a Tcl command to associate with the
button. This command is typically invoked when mouse button 1 is
released over the button window.

man n Tcl:

[1] Commands.
A Tcl script is a string containing one or more commands. Semi-
colons and newlines are command separators unless quoted as
described below. Close brackets are command terminators during
command substitution (see below) unless quoted.

[2] Evaluation.
A command is evaluated in two steps. First, the Tcl interpreter
breaks the command into words and performs substitutions as
described below. These substitutions are performed in the same
way for all commands. The first word is used to locate a com-
mand procedure to carry out the command, then all of the words of
the command are passed to the command procedure. The command
procedure is free to interpret each of its words in any way it
likes, such as an integer, variable name, list, or Tcl script.
Different commands interpret their words differently.

[3] Words.
Words of a command are separated by white space (except for new-
lines, which are command separators).

It is all there in man pages. Just apparently not at a simple enough
level for you to follow.

: As for comments and the use of semicolons the book is really poor.

: The fact that a semicolon can be used to indicate a command should
: have been mentioned earlier, and not hidden in information about
: comments that many will skip.

The fact that a reader skips portions of a teaching book is not the
fault of the book. That is soley the fault of the reader and no one
else.

: In fact it should have probably be mention that text of a command is
: terminated by a line feed or a semicolon at the start of the first
: chapter after the first example of a command was shown. Also the use
: of a slash to continue a command should have been explained.

All of the above is in the "Tcl" manpage - had you bothered to actually
read (and understand) it.

: Like it or not tcl/tk needs better books and not from those that
: created tcl/tk. Having the creator of new technology write a manual
: of the technology is a mistake.

Brent Welch is not the creator of Tcl/Tk.

: By the way my edition says "Unlike in many other languages, the #
: must occur at the beginning of a command."

: This implies a comment is a command which is really questionable
: since comments are simply discarded where a command would require
: some code to be generated that the processor would have to act upon.

This is a factual statement on the part of the book, and a factually
incomplete statement on your part. Because of the way the Tcl parser
works, comments are parsed and recognized as if they were commands.
They just get dropped by the parser rather than actually running a proc
named "#". But the effect is identical to your having created this
proc in your program:

proc # { args } { }

: If it makes you happy Rich I will agree and say these are NOT secrets
: but instead just hard to find information because the writers of
: tcl/tk do such a poor job.

Then why don't you stop complaining about the quality of the work of
others and instead create that beautiful, easily understood, perfect
book that you say no one has created?

Rich

unread,
Feb 21, 2014, 1:14:28 PM2/21/14
to
bsall...@yahoo.com wrote:
: By the way I have most of the books on tcl/tk and this is the
: problem. Most of these books are very poorly written.

: What is needed is more books on tcl/tk and language manuals on
: tcl/tk. Simple examples can be contained in the language manual.

Then why not stop complaining and instead do something constructive.
Start writing that book that you complain does not exist.

: Tcl/tk is a great programming language for creating applications but
: there are not that many books on tcl/tk that treat it as a
: programming language.

Which sounds like an opportunity for you to correct that issue by
writing the book you think should exist.

Don Porter

unread,
Feb 21, 2014, 1:36:58 PM2/21/14
to
On 02/21/2014 01:11 PM, Rich wrote:
> But the effect is identical to your having created this
> proc in your program:
>
> proc # { args } { }

No, it's not.

Comments truly are comments, not no-op commands.

--
| Don Porter Applied and Computational Mathematics Division |
| donald...@nist.gov Information Technology Laboratory |
| http://math.nist.gov/~DPorter/ NIST |
|______________________________________________________________________|

Rich

unread,
Feb 21, 2014, 3:01:41 PM2/21/14
to
Don Porter <donald...@nist.gov> wrote:
: On 02/21/2014 01:11 PM, Rich wrote:
: > But the effect is identical to your having created this
: > proc in your program:
: >
: > proc # { args } { }

: No, it's not.

: Comments truly are comments, not no-op commands.

Yes. Note the words I used: "But _the effect_ is identical".

I.e., "the effect" meaning _it is as if you had that proc defined, but the
reality is not such_.

Note the sentence I had just before what you quoted:

'They [comments] just get dropped by the parser rather than actually
running a proc named "#".'

Christian Gollwitzer

unread,
Feb 21, 2014, 3:47:50 PM2/21/14
to
Am 21.02.14 21:01, schrieb Rich:
> Don Porter <donald...@nist.gov> wrote:
> : On 02/21/2014 01:11 PM, Rich wrote:
> : > But the effect is identical to your having created this
> : > proc in your program:
> : >
> : > proc # { args } { }
>
> : No, it's not.
>
> : Comments truly are comments, not no-op commands.
>
> Yes. Note the words I used: "But _the effect_ is identical".
>

It is not, because Tcl has eager evaluation.

Consider

proc mycomment {args} {}


Now, there is a difference between

# [puts Yes]

and
mycomment [puts Yes]

It is only similar if the procs have no side effects.

Christian


Eric

unread,
Feb 21, 2014, 6:05:12 PM2/21/14
to
On 2014-02-21, bsall...@yahoo.com <bsall...@yahoo.com> wrote:
> To Oliver

He signed his post Olivier. I don't know how important the difference is
to him, but your mistake does show a lack of attention to detail.

> I find tutorials of very little value.
>
> I view tcl/tk as a computer language and I look for books and information
> that treat it as a computer language.

Whatever that means.

> I remember fortran and in a description of fortran as a computer language
> it was explained the format that was needed when a fortran command had
> to extend over a single line. I remember the starting letters of the
> continue line has a specific format that the compiler could recognize.
> This was in the days when a computer line was limited to 80 characters.

Tcl is much more free-format than fortran, it's not a useful comparison.

> I started in computers after learning about electricity and what could
> be done with electronic switches in comparison to mechanical switches.
> I then read a programming language book on IBM assembly language.
> This gave me a complete understanding of IBM assembly language and what
> could be done with the elements of the language.

OK, another unhelpful comparison. Tcl is nothing like any assembly
language.

> The type of knowledge and understanding of a computer language does not
> come from a tutorial since no tutorial will give the detailed information
> that explains the elements of the computer language.

A good tutorial will cover everything in the manual (and formal
specification of there is one), with examples, which you are supposed to
try out, You don't have to like tutorials or find them useful, but you
are criticising them for the wrong things.

> I know writing books on computer languages are boring but there is a
> market for these books since there are so few books of worth on tcl/tk.
>
> See my post to Rob for the two good tcl/tk books I have found.

Is either of those books a very good example of the kind of book you think
should exist? I assume not, since you are still unsatisfied. Can you name
a book (about any computer language whatsoever) that is a good example?

Basically I (and others apparently) still have trouble seeing where you
are coming from with all this.

bsall...@yahoo.com

unread,
Feb 21, 2014, 7:56:06 PM2/21/14
to
To: Rich

Then why not stop complaining and instead do something constructive.
Start writing that book that you complain does not exist.

...............................
I am a developer of software with tcl/tk since I enjoy creating software. If I enjoyed writing books I would write books. Writing technical books about computer technology to me is as boring as writing tutorials or teaching in college a computer language.


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

To Eric:

> To Oliver

He signed his post Olivier. I don't know how important the difference is
to him, but your mistake does show a lack of attention to detail.
............................
oc_forums is Olivier and oc_forums was who I was responding to.

##############################################
To Eric:
Is either of those books a very good example of the kind of book you think
should exist? I assume not, since you are still unsatisfied. Can you name
a book (about any computer language whatsoever) that is a good example?
_____________________________________________________
Yes the two books I mentioned are good, but I like plenty of books with details. I have a container that has 50 pounds of books on Motif.

......................................
Personally I find most of the comments as weird. I really like details in books. I really enjoy looking over Design of Digital Computers by Gschwind and McCluskey. Maybe I am old fashion.
...............................
I like those who understand that comments are not no ops command as a reminder of IBM assembly language. I still have my green card and my yellow 370 card.

Wish all those that are so adverse to my posts would instead spend their time by providing a working example of a C DLL created with vc++ being used with freewrap or tclApp?

Rich

unread,
Feb 21, 2014, 9:01:57 PM2/21/14
to
Christian Gollwitzer <auri...@gmx.de> wrote:
: Am 21.02.14 21:01, schrieb Rich:
True. I stand corrected.

Christian Gollwitzer

unread,
Feb 22, 2014, 1:32:18 AM2/22/14
to
Am 22.02.14 00:05, schrieb Eric:
> Basically I (and others apparently) still have trouble seeing where you
> are coming from with all this.

I have two explanations; the better one is "he is just a troll", if you
consider the statements and insults he made in his posts:

1) I've experience of 15 years with Tcl, written 160kLOC, but still
can't grasp the basic command substitution rules

2) I've detected that you can use a semicolon to separate comands and
shared a big secret with you, but get nothing back:

> By the way I first posted secrets of tcl/tk because people with tcl/tk do not share.

3) The dodecalogue at http://wiki.tcl.tk/10259 doesn't count, because it
is written by hobbyists:
> I am old school and prefer documentation of vendors which is currently ActiveState instead of hobbyists.

4) All books on Tcl are poor

5) "A very junior programmer could read my code and
understand it."

I enjoy laughing at his posts, but we shouldn't waste the time answering
them. If he is not a troll, he must be a pretty nasty jerk.

Christian

Rob

unread,
Feb 22, 2014, 2:08:09 AM2/22/14
to
Christian Gollwitzer wrote:

> Am 22.02.14 00:05, schrieb Eric:
>> Basically I (and others apparently) still have trouble seeing where you
>> are coming from with all this.
>
> I have two explanations; the better one is "he is just a troll", if you
> consider the statements and insults he made in his posts:

In the interests of giving someone the benefit of the doubt, I wonder
whether what the OP is after is the Tcl/Tk documentation from ActiveState.

This can be found at http://downloads.activestate.com/ActiveTcl/releases/.
Look under the relevant release for the tarball containing html , eg.
ActiveTcl8.4.19.6.295590-html.tar.gz

FWIW, I found Brent Welch's 'Practical Programming in Tcl and Tk (4th
edition)' to be a brilliant introduction and continuing source of
information on many aspects of using this language to its fullest.

Documentation very rarely contains sufficient examples on language usage so
that's where text books are great. A new edition would, however, be most
welcome soon since there have been so many significant changes made since
the 4th edition was released (one can but hope...)

If the OP still complains about lack of adequate info after all these post,
then I must support your suggestion for troll status to be applied...

Rob.

Kevin Walzer

unread,
Feb 22, 2014, 9:38:05 AM2/22/14
to
On 2/21/14, 7:56 PM, bsall...@yahoo.com wrote:
> I am a developer of software with tcl/tk since I enjoy creating software. If I enjoyed writing books I would write books. Writing technical books about computer technology to me is as boring as writing tutorials or teaching in college a computer language.

You are complaining that all of the books on Tcl/Tk are lousy, yet you
also say writing books is boring, and you have no interest in doing so.

How, then, is this problem to be solved? Complaints without solutions
are just noise.

This is little different than complaining that some functionality isn't
present in the core library of an open-source language like Tcl, or an
extension to the language. "Someone" should implement this
functionality. But not me.

--Kevin

--

oc_forums

unread,
Feb 22, 2014, 10:48:46 AM2/22/14
to
Hi !
>
> I find tutorials of very little value.
>

It's different and a complement to a good book, just as we had different manners to learn a language. It was just to say that the primary information you looked for ( # and ; ) were not buried in an anonymous page.


> I remember fortran and in a description of fortran as a computer language it was explained the format that was needed when a fortran command had to extend over a single line. I remember the starting letters of the continue line has a specific format that the compiler could recognize. This was in the days when a computer line was limited to 80 characters.
>

And the day of punched cards, f77 ... and so on, yes I remember. And that is our weak point when programming language were not so complex. Today, starting with a brand new language is hard, and I'm glad that you have found books that I can help you. I know a good one but it's written in French, and it would not be of no help.

>
>
> I started in computers after learning about electricity and what could be done with electronic switches in comparison to mechanical switches. I then read a programming language book on IBM assembly language. This gave me a complete understanding of IBM assembly language and what could be done with the elements of the language.
> The type of knowledge and understanding of a computer language does not come from a tutorial since no tutorial will give the detailed information that explains the elements of the computer language.
>

Did you have a look at the book "Tcl and the Tk Toolkit" from John Ousterhout ? It's not new at all, but at least, you cannot say it's not written by a programmer ;-) ( I think you wrote this a bit further ? ). Like you, it was difficult to find what I sometimes wanted, but I'm still using Tcl/Tk because of it's simplicity and possibilities ( And re-yes : I started in computers after learning about electricity like you )

>
>
> I know writing books on computer languages are boring but there is a market for these books since there are so few books of worth on tcl/tk.
>

There are different level of programmers and so there is a book for each one. The problem, and you are true, there is so few books on Tcl/Tk, because the tendance is in PHP, Javascript ... It reduces the possibility to find a book that suit you for sure.


>
>
> See my post to Rob for the two good tcl/tk books I have found.

I wish I had " Tcl/Tk from Graphical Applications with Tcl&Tk", I don't have the other book you mentioned.

In the last resort, you may asked a question here, it seems that you have some "followers" here :D !

Have a nice day,

Olivier.

Rich

unread,
Feb 22, 2014, 1:07:57 PM2/22/14
to
Christian Gollwitzer <auri...@gmx.de> wrote:
: Am 22.02.14 00:05, schrieb Eric:
You omitted:

6) He complains endlessly about how bad the documentation/books about
Tcl/Tk are (and how everything is "kept a secret"), yet when challenged
to write that "one true book" that would reveal all the secrets to
everyone, he refuses:

> I am a developer of software with tcl/tk since I enjoy creating software.
> If I enjoyed writing books I would write books. Writing technical books
> about computer technology to me is as boring as writing tutorials or
> teaching in college a computer language.

I second giving him "troll status".

bsall...@yahoo.com

unread,
Feb 22, 2014, 2:33:14 PM2/22/14
to
To Olivier

I see "Tcl/Tk Programmer's Reference by Christopher Nelson" is only available as used. There was two editions Tcl/Tk 8.1 and Tcl/Tk 8.2. A good book since you could use it instead of looking up man pages. The pages had at the top the name of commands. These were in alphabetical orders so it was very easy to find what you were looking for. Far better than Tcl/Tk in a nutshell.

Graphical Applicatins with tcl & tk eric foster-johnson is still available on amazon and the last edition is the Second Edition. Good for starting but also for advanced features. It had information on sockets and I used this with Interprocess Communications In Unix John Shapley Gray to develope socket servers with tcl.

"Did you have a look at the book "Tcl and the Tk Toolkit" from John Ousterhout."
I am going to consider buying this book since I see it was published in 1992. I find many times that the older books are better since there is a tendency to explain in detail.

"I know a good one but it's written in French, and it would not be of no help."
I did a life time struggle to learn and speak French. Finally now I have to laugh at this effort since from childhood I have had a severe problem with hearing high frequencies. At ten years old I just thought I was not paying attention and not listening since at the time doctors could not identify these types of hearing problems very well. Maybe with my new hearing aids I may actually be able to learn and speak French.

In the old days I learned and taught WatFor and I agree it was less complex than today. But back then you had the complexity of having to write and understand hundreds of lines of code that now can be more easily written. More complexity to learn the language but less complexity to use the language.

The key is as you say finding the right books. This used to be easier since you could go to bookstores and read the books. There were also computer shows with large amounts of computer books and I remember a drug store chain would at times have large boxes with computer books that publishers wanted to get rid of.

One book I have is Web Development With Tcl/Tk 8.1, Steve Holzner. This might be of interest but too much of the book was on basics of tcl/tk. There might be some value of the chapters of the web if you are doing web work. I bought it since it only cost a dollar.



bsall...@yahoo.com

unread,
Feb 22, 2014, 2:51:39 PM2/22/14
to

To Olivier

I did not ask. What does oc_forums stand for?

oc_forums

unread,
Feb 22, 2014, 4:18:27 PM2/22/14
to
Le samedi 22 février 2014 20:51:39 UTC+1, bsall...@yahoo.com a écrit :
> To Olivier
>
>
>
> I did not ask. What does oc_forums stand for?

Oh !, it's simple oc are the initial of my first and last name. Olivier Colin, and I used to use an email address oc_forums@something... specific to forums in a time it was Usenet and more spammed than now. When subscribing to this group I used this "oc_forums" as an habit.

> Maybe with my new hearing aids I may actually be able to learn and speak French.

Then I may suggest this http://en.assimil.com/methodes/new-french-with-ease ( thought it's not the good forum and apologize to others ), I learned a few languages with this method...

Olivier.

bsall...@yahoo.com

unread,
Feb 22, 2014, 6:01:11 PM2/22/14
to
Hi Olivier
I looked at the website and stored the web site with
http://www.bbc.co.uk/schools/primarylanguages/french/sounds/

I really should give learning French another try. I would like to visit Paris again for a long stay even though it will not be like Paris in 1970.

Speaking French also helps in visits to Canada and someday I would like to go to Prince Edwards Island again for the inexpensive golf at the Rustico Resort.

I really wanted to learn French so I could read it. I can read it somewhat but I see to really read a language you need to hear and say the words. Trying to simply learn to read a language by visual memorizing of the symbols of the words as they appear just does not work. When I was in Paris I would speak as a robot one word at a time with an American accents.

I arrived in Paris by train and made the mistake of checking my bag. This meant I had my bag opened by customs. The custom officer saw my passport, smiled and said "BrookLean". I left my American Express checks in my bag and he showed me it was safer to put them in my pocket. I really liked Paris in 1970. A totally different time and place then. Viva La France!





bsall...@yahoo.com

unread,
Feb 22, 2014, 6:18:48 PM2/22/14
to
........................................................................
You guys are a laugh and remind me of the American high school movies I have seen with the cliques of middle class girls that think they are hot stuff.

OH I am really offended at being called a "jerk" and a "troll".

You guys really need to get a life!

bsall...@yahoo.com

unread,
Feb 22, 2014, 8:19:30 PM2/22/14
to

To Olivier

A question for you about something I have always wondered about programmers whose native language was not English.

Is there a French version of tcl/tk where programmers use "apres" instead of "after"?

The keywords of a computer language are simply a finite set of symbols for the computer and it would not be that great of a problem to have the set of symbols in whatever spoken language of the programmer.

Or do all programmers that are not native speakers of English have to deal with the keywords of a computer language in English?



Steve Havelka

unread,
Feb 23, 2014, 7:20:20 PM2/23/14
to
On 02/22/2014 06:38 AM, Kevin Walzer wrote:
> On 2/21/14, 7:56 PM, bsall...@yahoo.com wrote:
>> I am a developer of software with tcl/tk since I enjoy creating
>> software. If I enjoyed writing books I would write books. Writing
>> technical books about computer technology to me is as boring as
>> writing tutorials or teaching in college a computer language.
>
> You are complaining that all of the books on Tcl/Tk are lousy, yet you
> also say writing books is boring, and you have no interest in doing so.
>
> How, then, is this problem to be solved? Complaints without solutions
> are just noise.
>
> This is little different than complaining that some functionality isn't
> present in the core library of an open-source language like Tcl, or an
> extension to the language. "Someone" should implement this
> functionality. But not me.


Perhaps bsall...@yahoo.com would like to commission a new book on
Tcl/Tk? I'm sure for the right price, any number of people here would
take on the job of writing the technical manual he desires.

See? That's solution-oriented thinking! ;)





> --Kevin
>

DrS

unread,
Feb 23, 2014, 7:51:25 PM2/23/14
to
On 2/23/2014 7:20 PM, Steve Havelka wrote:
>
> Perhaps bsall...@yahoo.com would like to commission a new book on
> Tcl/Tk? I'm sure for the right price, any number of people here would
> take on the job of writing the technical manual he desires.
>
> See? That's solution-oriented thinking! ;)
>
>

OK - the title is on me though:

"Secrets of Tcl/Tk: Learn what no expert will share".

:-)


DrS




DrS

unread,
Feb 23, 2014, 8:51:43 PM2/23/14
to
On 2/22/2014 8:19 PM, bsall...@yahoo.com wrote:
>
> To Olivier
>
> A question for you about something I have always wondered about programmers
> whose native language was not English.
>
> Is there a French version of tcl/tk where programmers use "apres" instead
> of "after"?
>
> The keywords of a computer language are simply a finite set of symbols for
> the computer and it would not be that great of a problem to have the set of
> symbols in whatever spoken language of the programmer.
>

Really? For someone with so much professed experience with both natural
and computer languages, I must say your question is kind of naive: there
are natural languages where the amount comes after the word "after".
So, a simple keyword replacement is not going to do any good, at least
in the way you have in mind. You will need to change the syntax as well.



> Or do all programmers that are not native speakers of English have to deal
> with the keywords of a computer language in English?
>

Yes, they are just keywords. Every computer language has an appendix
under a title that goes something like "Reserved keywords." You could
say native speakers may be at a slight disadvantage because it is not
really proper English grammar per se, but familiar words used in an odd
programming language syntax. Note the absence of prepositions from
programming languages, for example. By the way, I have seen how this
unarming familiarity actually traps users from catching some bugs in
their code.

On a second note, I doubt any English speaker can look at Tcl, or Java,
or Fortran, and say, "Yes, this is English, I can follow it now." The
only language that claimed anything in this way was Cobol and I believe
they got away from that strict convention in its later versions as well.


DrS



bsall...@yahoo.com

unread,
Feb 24, 2014, 12:47:50 AM2/24/14
to
On Sunday, February 23, 2014 8:51:43 PM UTC-5, DrS wrote:
> On 2/22/2014 8:19 PM, bsall...@yahoo.com wrote:
>
> > To Olivier


A question for you about something I have always wondered about programmers
whose native language was not English.

Is there a French version of tcl/tk where programmers use "apres" instead
of "after"?

The keywords of a computer language are simply a finite set of symbols for
the computer and it would not be that great of a problem to have the set of
symbols in whatever spoken language of the programmer.

......................................
RESPONSE BY DrS
Really? For someone with so much professed experience with both natural
and computer languages, I must say your question is kind of naive: there
are natural languages where the amount comes after the word "after".

So, a simple keyword replacement is not going to do any good, at least
in the way you have in mind. You will need to change the syntax as well.

......................................
ORIGINAL POST
Or do all programmers that are not native speakers of English have to deal
with the keywords of a computer language in English?
............................
FURTHER RESPONSE BY DrS
Yes, they are just keywords. Every computer language has an appendix
under a title that goes something like "Reserved keywords." You could
say native speakers may be at a slight disadvantage because it is not
really proper English grammar per se, but familiar words used in an odd
programming language syntax. Note the absence of prepositions from
programming languages, for example. By the way, I have seen how this
unarming familiarity actually traps users from catching some bugs in
their code.

On a second note, I doubt any English speaker can look at Tcl, or Java,
or Fortran, and say, "Yes, this is English, I can follow it now." The
only language that claimed anything in this way was Cobol and I believe
they got away from that strict convention in its later versions as well.
DrS

...........................................................
REPLY TO DrS

I assume your answer is that programmers that are not native English speakers have to program using the symbols that are English.

The keywords are actually symbols and in reality the word syntax is inappropriate. We call it a computer language but that is also inappropriate.

Instead of language we are dealing with very defined sets of symbols that have very restricted format. This is not much different from the symbols used for assembly language code with a first symbol for the operation and a defined set of following symbols to be used with the operation. Over time for what we call higher level computer languages the sets of symbols have changed where operation instead of having a single ordering can have multiple orderings of symbols.

Natural language really does not enter into this unless you consider computers have and use natural language because switches can be manipulated with the bit settings of symbols.

Native speakers of English have an advantage if the symbols are recognizable English words. It is easier to recognize and have associations when seeing the symbol "after" instead of seeing the symbol bxyzw.

I really see no major problem in changing the symbols used for programming to words of a different language of human beings. But from your post I see that you are saying this has not been done. I wonder if this is from actual knowledge or simply your opinion.

Christian Gollwitzer

unread,
Feb 24, 2014, 2:17:33 AM2/24/14
to
Am 24.02.14 06:47, schrieb bsall...@yahoo.com:
>
> The keywords are actually symbols and in reality the word syntax is inappropriate.

Note that Tcl does not have keywords. The Tcl syntax consists entirely
of brackets and punctuation symbols, as you can see in the dodecalogue.
The rest is just commands, and it would be easy to perform a mapping,
for example from english to czech:

foreach {english cesky} {
after po
if když
foreach každý
while dokud
set nechť
expr vypočitej
puts vytiskni
} {
rename $english $cesky
}

nechť i 0
vytiskni "Musím nakoupit:"
každý x {cukr chleba brambory "knedlíkové těsto" "kyselé zelí" pivo } {
nechť i [vypočitej {$i+1}]
vytiskni "$i. $x"
když {$i % 3 == 0} {
vytiskni "--- raz dva tři"
}
}


Christian

bsall...@yahoo.com

unread,
Feb 24, 2014, 2:23:00 AM2/24/14
to
On Saturday, February 22, 2014 10:48:46 AM UTC-5, oc_forums wrote:

> Did you have a look at the book "Tcl and the Tk Toolkit" from John Ousterhout ? It's not new at all, but at least, you cannot say it's not written by a programmer ;-) ( I think you wrote this a bit further ? ). Like you, it was difficult to find what I sometimes wanted, but I'm still using Tcl/Tk because of it's simplicity and possibilities ( And re-yes : I started in computers after learning about electricity like you )


Hi Olivier

Just looked at Tcl and the Tk Toolkit (2nd Edition) [Paperback]
John K. Ousterhout (Author), Ken Jones (Author) on google and I will be ordering it from Amazon.

Thanks for mentioning it.

Ralf Fassel

unread,
Feb 24, 2014, 4:50:53 AM2/24/14
to
* Christian Gollwitzer <auri...@gmx.de>
| nechť i 0
| vytiskni "Musím nakoupit:"
| každý x {cukr chleba brambory "knedlíkové těsto" "kyselé zelí" pivo } {
| nechť i [vypočitej {$i+1}]
| vytiskni "$i. $x"
| když {$i % 3 == 0} {
| vytiskni "--- raz dva tři"
| }
| }

Finally: the one true solution for source code obfuscation ;-)

SCNR
R'

DrS

unread,
Feb 24, 2014, 8:47:08 AM2/24/14
to
On 2/24/2014 12:47 AM, bsall...@yahoo.com wrote:
> ...........................................................
> REPLY TO DrS
...
> The keywords are actually symbols and in reality the word syntax is inappropriate.
> We call it a computer language but that is also inappropriate.
>


No, it is quite appropriate. You concede there are symbols. Syntax is
simply particular ways they can be combined. Semantics is the way they
then are interpreted. This is language. True for human as well as
computer languages. Braille is a language. Pig Latin is a language.


> Instead of language we are dealing with very defined sets of symbols that have
> very restricted format. This is not much different from the symbols used for
> assembly language code

So, why would assembly code be language but not Tcl or Java or Fortran?
Again, you are replacing the words syntax/grammar/language with your
own (similar, but not formal) definitions but they still exist.



> Natural language really does not enter into this unless you consider computers
> have and use natural language because switches can be manipulated with the bit
> settings of symbols.

???

>
> Native speakers of English have an advantage if the symbols are recognizable
> English words. It is easier to recognize and have associations when seeing the
> symbol "after" instead of seeing the symbol bxyzw.
>

Again, see my earlier post. The advantage by a keyword seeming familiar
is minimal, the mistakes on the other hand are costly as users may stop
treating it as English vs. a computer language.


> I really see no major problem in changing the symbols used for programming to
> words of a different language of human beings. But from your post I see that
> you are saying this has not been done. I wonder if this is from actual knowledge
> or simply your opinion.

"after $n" is at best broken English. Human languages are sometimes
categorized by their order of components: SVO, SOV, etc. So, in some
human languages, the proper order is also different and the proper
replacement should be: "$n after". But try doing this in a computer
language and see what happens. The keyword replacement strategy fails.


DrS


PS. Your posts are really hard to reply to. There are no line breaks
for some reason.

Don Porter

unread,
Feb 24, 2014, 9:28:30 AM2/24/14
to
Just gotta find the right "masked magician".

Donal K. Fellows

unread,
Feb 24, 2014, 9:30:10 AM2/24/14
to
On 24/02/2014 00:51, DrS wrote:
> Learn what no expert will share

Good luck finding an expert to share those secrets... ;-)

Donal.
--
Donal Fellows — Tcl user, Tcl maintainer, TIP editor.

Christian Gollwitzer

unread,
Feb 24, 2014, 1:19:59 PM2/24/14
to
Am 24.02.14 10:50, schrieb Ralf Fassel:
http://xkcd.com/257/

SCNR,

Christian

DrS

unread,
Feb 24, 2014, 3:18:36 PM2/24/14
to
On 2/24/2014 9:30 AM, Donal K. Fellows wrote:
> On 24/02/2014 00:51, DrS wrote:
>> Learn what no expert will share
>
> Good luck finding an expert to share those secrets... ;-)
>
> Donal.

:-) The most they could get out of me was the title.


DrS


bsall...@yahoo.com

unread,
Feb 24, 2014, 3:26:35 PM2/24/14
to
On 2/24/2014 12:47 AM, bsall...@yahoo.com wrote:
> ...........................................................
> REPLY TO DrS


No, it is quite appropriate. You concede there are symbols. Syntax is simply particular ways they can be combined. Semantics is the way they then are interpreted. This is language. True for human as well as computer languages. Braille is a language. Pig Latin is a language.

So, why would assembly code be language but not Tcl or Java or Fortran? Again, you are replacing the words syntax/grammar/language with your own (similar, but not formal) definitions but they still exist.

Again, see my earlier post. The advantage by a keyword seeming familiar is minimal, the mistakes on the other hand are costly as users may stop treating it as English vs. a computer language.

"after $n" is at best broken English. Human languages are sometimes categorized by their order of components: SVO, SOV, etc. So, in some human languages, the proper order is also different and the proper replacement should be: "$n after". But try doing this in a computer language and see what happens. The keyword replacement strategy fails.
................................................
"Computer language" is inappropriate since computers do not understand language.

"Syntax" is inappropriate since in a real language syntax will evolve and change over time. Computers do not have the ability to evolve over time and the defined form of the instructions will not change over time from a computer evolving.

"after $n" is at best broken English."

You have a problem.

"Computer language" is simply the commonly used choice for referring to an the set of instructions that can be converted into the operations that a computer can perform.

I do not believe that you actually believe that a "computer language" is equivalent to languages but that this is simply an attempt to show that you are clever.

If you pretend that a "computer language" is totally equivalent to a language, then you believe that you can use attributes of languages in regard to "computer languages".

This really a well known ploy and I wonder why individuals continue to believe they are demonstrating that they are clever in using it.

By the way I would find it very strange if a mathematician said that all of the symbols of mathematics were a language.

"The advantage by a keyword seeming familiar is minimal"

Based upon this I guess you would say if the sign "Men" for all public toilets was changed every day to different words such as "Dogs" or "Broom Closet" you would see no problem with this.

You may not see any advantage in symbols for the instruction set of computers that are English words for native English speakers but I certainly do.

bsall...@yahoo.com

unread,
Feb 24, 2014, 3:37:40 PM2/24/14
to
.......................................
My guess
Using google to look up the words would be cheating.

| nechť i 0 set i ?
| vytiskni "Musím nakoupit:" proc call ?
| každý x {cukr chleba brambory "knedlíkové těsto" "kyselé zelí" pivo } { foreach x ?
| nechť i [vypočitej {$i+1}] set i some proc call ?
| vytiskni "$i. $x" proc call ?
| když {$i % 3 == 0} { if statement
| vytiskni "--- raz dva tři" proc call
| }
| }

kjusiinn muoy

bsall...@yahoo.com

unread,
Feb 24, 2014, 3:47:18 PM2/24/14
to
nechť i [vypočitej {$i+1}] set i some proc call ?


Nmiod lkuyts blytks ksys mniouty {$i+1}
English translation for above:
"This was a bad guess for the line with {$i+1}"

>
> kjusiinn muoy

DrS

unread,
Feb 24, 2014, 4:11:41 PM2/24/14
to
On 2/24/2014 3:26 PM, bsall...@yahoo.com wrote:
> ................................................
> "Computer language" is inappropriate since computers do not understand language.
>

There are so many wrongs in your post that I will just give you the
benefit of the doubt one last time and reply as simply as I can:

Just because a person in China does not understand English, it does not
mean English is not a language.


> "Syntax" is inappropriate since in a real language syntax will evolve and change over
> time. Computers do not have the ability to evolve over time and the defined form of the
> instructions will not change over time from a computer evolving.
>

In words you are familiar with: Fortran, Fortran4, Fortran77, Fortran80, ...


> "after $n" is at best broken English."
>
> You have a problem.
>

After 5 million, sure. Also after 10.


> By the way I would find it very strange if a mathematician said that all of the symbols
> of mathematics were a language.
>

OK, then! Then you have not met a mathematician or taken any basic
math. Incidentally, this tells me everything about you. No reason any
more to reply to your nonsense about "ploys". No one is out to get you.
However, I for one am curious: there must be a point where even you
must realize that you are wrong, misinformed, lack the subject matter
knowledge, and spend no effort to remedy your situation.

DrS

DrS

unread,
Feb 24, 2014, 4:16:12 PM2/24/14
to
On 2/24/2014 4:11 PM, DrS wrote:
> On 2/24/2014 3:26 PM, bsall...@yahoo.com wrote:
>> ................................................
>> "Computer language" is inappropriate since computers do not understand
>> language.
>>
>

> Just because a person in China does not understand English, it does not
> mean English is not a language.
>
>

I tried to be as short as possible but one could say so much on the
topic of "understanding" (what it is, what it means, how to measure it,
etc.) that unfortunately would be wasted given the recipient.

DrS

bsall...@yahoo.com

unread,
Feb 24, 2014, 4:36:24 PM2/24/14
to
If the symbols used for computer operations were cocacola, pepsi, bestbuy, ipad, panasonic, blockbusters, lehmanBrothers, ... would you call this a language and equate this to the English language.

bsall...@yahoo.com

unread,
Feb 24, 2014, 5:05:12 PM2/24/14
to
On Monday, February 24, 2014 4:11:41 PM UTC-5, DrS wrote:
> On 2/24/2014 3:26 PM, bsall...@yahoo.com wrote:


> "Syntax" is inappropriate since in a real language syntax will evolve and change over time. Computers do not have the ability to evolve over time and the defined form of the instructions will not change over time from a computer evolving.
>

"In words you are familiar with: Fortran, Fortran4, Fortran77, Fortran80, ..."

I assume you are trying to say that these sets of instructions that changed over time. Yes they did, but it was human beings that made the changes and not computers.


> By the way I would find it very strange if a mathematician said that all of the symbols of mathematics were a language. OK, then! Then you have not met a mathematician or taken any basic math. Incidentally, this tells me everything about you.

Well I did meet Paul Erdős in 1978 or 1979, and my teachers were mathematicians, even the ones in the Computer Sciences classes.

I view logic as the language of mathematics and not the short hand symbols that mathematicians use. By the way the best book I found on Mathematics is "What Is Mathematics" by Richard Courant and Herbert Robbins. Luckily I have a copy of the hard bound book since the paper back version is not as readable.

We have now universal visual sign images for the Mens room,the Ladies room, and a whole slew of other things. If programmers had to use visual images for the set of instructions would you call this a language? Do you consider that the universal visual sign images are a language?

bsall...@yahoo.com

unread,
Feb 24, 2014, 5:39:23 PM2/24/14
to
On Monday, February 24, 2014 4:11:41 PM UTC-5, DrS wrote:
> On 2/24/2014 3:26 PM, bsall...@yahoo.com wrote:
>

"No reason any more to reply to your nonsense about "ploys"."
I really do not see your replies as ploys but simply as really very poor logic and thought.

"No one is out to get you."
That is good to know.

"However, I for one am curious: there must be a point where even you
must realize that you are wrong..."
I do not worry about being wrong. Being right or being wrong are just transient states that change with new thought and new knowledge.

When I see that my conceived logic of thought is incorrect I simply change it.

I feel no shame in my thoughts or ideas being wrong just as I feel no shame is asking what may appear to be a stupid or naive question.

I really feel sorry for those that feel that they need the approval of others for their ideas and knowledge, and that they must be in lockstep with popular opinion and thought.

I am comfortable with my intelligence and flexibility in thought.

I do admit that in trying to improve my golf swing so that I can hit straight and long balls there is continuous doubt in regard to whether my grip is correct. But even in golf I go my own way and take a full swing. Other golfer may be satisfied with only partial swings but I want the distance that will only come with a full swing.


DrS

unread,
Feb 24, 2014, 7:18:02 PM2/24/14
to
On 2/24/2014 5:05 PM, bsall...@yahoo.com wrote:
> On Monday, February 24, 2014 4:11:41 PM UTC-5, DrS wrote:
>> On 2/24/2014 3:26 PM, bsall...@yahoo.com wrote:
>

<< gibberish deleted >>

You keep saying "language", but I don't think it means what you think it
means. And as I have indicated already, your insistence on highlighting
your shortcomings as legendary accomplishments, your refusal to take
corrective actions, and digging yourself deeper in your waste, is infamous.


From Websters:

lan·guage
[lang-gwij]
noun
1. a body of words and the systems for their use common to a people who
are of the same community or nation, the same geographical area, or the
same cultural tradition: the two languages of Belgium; a Bantu language;
the French language; the Yiddish language.
2. communication by voice in the distinctively human manner, using
arbitrary sounds in conventional ways with conventional meanings; speech.
3. the system of linguistic signs or symbols considered in the abstract
(opposed to speech ).
4. any set or system of such symbols as used in a more or less uniform
fashion by a number of people, who are thus enabled to communicate
intelligibly with one another.
5. any system of formalized symbols, signs, sounds, gestures, or the
like used or conceived as a means of communicating thought, emotion,
etc.: the language of mathematics; sign language.




DrS


DrS

unread,
Feb 24, 2014, 7:39:42 PM2/24/14
to
On 2/24/2014 5:39 PM, bsall...@yahoo.com wrote:
> On Monday, February 24, 2014 4:11:41 PM UTC-5, DrS wrote:
>> On 2/24/2014 3:26 PM, bsall...@yahoo.com wrote:
>>
>
> "No reason any more to reply to your nonsense about "ploys"."
> I really do not see your replies as ploys but simply as really very poor logic and thought.
>
> "No one is out to get you."
> That is good to know.
>

<< more gibberish deleted >>

Have you heard of something called projection?

http://en.wikipedia.org/wiki/Psychological_projection:

Psychological projection was conceptualized by Sigmund Freud (6 May 1856
– 23 September 1939) in the 1900s as a defense mechanism in which a
person unconsciously rejects his or her own unacceptable attributes by
ascribing them to objects or persons in the outside world.[1] For
example, a person who is rude may accuse other people of being rude.


You come here accusing everyone that they are secretive and that they
keep information to themselves. It turns out you were not the guru you
thought you were because you missed one very basic rule of a language
with almost no rules. Then you insist that it was not described
anywhere. When you learn that it is in numerous tutorials, references
and what not, you say you would never look at them anyway and that you
prefer books in the first place. When books are proven to mention it in
their first chapters, you insist that you only have one book you like.
Then you twist the conversation into why nobody can write a good book;
and the only person who can (i.e., yourself) doesn't because he finds it
boring. Then you somehow manage to extend it into an ignorant
interpretation of what a language is. I wonder what Freud would have
done with you.


All you had to do on day one was a simple apology.


DrS

bsall...@yahoo.com

unread,
Feb 24, 2014, 7:44:44 PM2/24/14
to
Well each to their own.

If you feel like you are communicating with your computer who am I to criticize.

I used to know people that believed that they were communicating with pin ball machines with body moves.

bsall...@yahoo.com

unread,
Feb 24, 2014, 8:15:21 PM2/24/14
to
On Monday, February 24, 2014 7:39:42 PM UTC-5, DrS wrote:
> On 2/24/2014 5:39 PM, bsall...@yahoo.com wrote:
>
> > On Monday, February 24, 2014 4:11:41 PM UTC-5, DrS wrote:
>
> >> On 2/24/2014 3:26 PM, bsall...@yahoo.com wrote:
>

>
>>"No reason any more to reply to your nonsense about "ploys"."

I really do not see your replies as ploys but simply as really very poor logic and thought.
>

> > "No one is out to get you."

That is good to know.
>

> << more gibberish deleted >>
>

> Have you heard of something called projection?
http://en.wikipedia.org/wiki/Psychological_projection:

>
> Psychological projection was conceptualized by Sigmund Freud (6 May 1856
- 23 September 1939) in the 1900s as a defense mechanism in which a
person unconsciously rejects his or her own unacceptable attributes by
ascribing them to objects or persons in the outside world.[1] For
example, a person who is rude may accuse other people of being rude.
>
>

You come here accusing everyone that they are secretive and that they
keep information to themselves. It turns out you were not the guru you
thought you were because you missed one very basic rule of a language
with almost no rules. Then you insist that it was not described
anywhere. When you learn that it is in numerous tutorials, references
and what not, you say you would never look at them anyway and that you
prefer books in the first place. When books are proven to mention it in
their first chapters, you insist that you only have one book you like.

Then you twist the conversation into why nobody can write a good book;
and the only person who can (i.e., yourself) doesn't because he finds it
boring. Then you somehow manage to extend it into an ignorant
interpretation of what a language is. I wonder what Freud would have
done with you.
>

All you had to do on day one was a simple apology.
> DrS

Is projection what a movie projector does? Was Sigmund Freud one of the early inventors of movie projectors?

I did not think you were rude just up tight, and someone that feels they have to prove themselves by following the party line. Do you talk about football games with others even though you have no interest in football?

"All you had to do on day one was a simple apology."

So would you be happy if I said how intelligent you are, and that you are so right. One of my old bosses used to always say Mea Culpa. By the way since you communicate with your computer does your computer say Mea Culpa when you feel it should apologize to you.

Why don't we have a truce. I will never look at a post by DrS and you will never look at a post of mine.

This reminds me of the old moose joke.

There are two Eskimos who spend day together in the wilderness saying nothing.
One day they come across droppings. One says Moose and the other says Elk. They say nothing else. At dawn of the next day one Eskimo is up early and has his pack ready. He says to the other "I go, we argue too much."

How about a truce?

Rich

unread,
Feb 24, 2014, 8:22:42 PM2/24/14
to
DrS <drsc...@gmail.com> wrote:
: On 2/24/2014 5:39 PM, bsall...@yahoo.com wrote:
: > On Monday, February 24, 2014 4:11:41 PM UTC-5, DrS wrote:
: >> On 2/24/2014 3:26 PM, bsall...@yahoo.com wrote:
: >>
: >
: > "No reason any more to reply to your nonsense about "ploys"."
: > I really do not see your replies as ploys but simply as really very poor logic and thought.
: >
: > "No one is out to get you."
: > That is good to know.
: >

: << more gibberish deleted >>

: Have you heard of something called projection?

: http://en.wikipedia.org/wiki/Psychological_projection:

: Psychological projection was conceptualized by Sigmund Freud (6 May 1856
: ? 23 September 1939) in the 1900s as a defense mechanism in which a
: person unconsciously rejects his or her own unacceptable attributes
: by ascribing them to objects or persons in the outside world.[1] For
: example, a person who is rude may accuse other people of being rude.

: You come here accusing everyone that they are secretive and that they
: keep information to themselves. It turns out you were not the guru
: you thought you were because you missed one very basic rule of a
: language with almost no rules. Then you insist that it was not
: described anywhere. When you learn that it is in numerous tutorials,
: references and what not, you say you would never look at them anyway
: and that you prefer books in the first place. When books are proven
: to mention it in their first chapters, you insist that you only have
: one book you like. Then you twist the conversation into why nobody
: can write a good book; and the only person who can (i.e., yourself)
: doesn't because he finds it boring. Then you somehow manage to
: extend it into an ignorant interpretation of what a language is. I
: wonder what Freud would have done with you.


: All you had to do on day one was a simple apology.

A usenet troll never apologizes. Your above paragraph describes
trolling quite well. No matter the evidence provided, the troll will
simply twist the evidence, or their intent, and continue onward
trolling. The best thing to do is to stop feeding the troll, add the
troll to your kill file, and continue on.

Kill files make trolls disappear.... And that is a good thing.

bsall...@yahoo.com

unread,
Feb 24, 2014, 9:05:05 PM2/24/14
to
On Monday, February 24, 2014 8:22:42 PM UTC-5, Rich wrote:
> DrS <drsc...@gmail.com> wrote:
>

> : All you had to do on day one was a simple apology.

> A usenet troll never apologizes. Your above paragraph describes
trolling quite well. No matter the evidence provided, the troll will
simply twist the evidence, or their intent, and continue onward
trolling. The best thing to do is to stop feeding the troll, add the
troll to your kill file, and continue on.

>
> Kill files make trolls disappear.... And that is a good thing.
.......................................................
Here is food for thought.

I got from this topic the name of a good tcl tk book from someone who was intelligent and I was able to buy this book on Amazon for $41. So this topic was of some value to me.

Meanwhile you and other who have posted on this topic have not received anything of value.

If I see a posting of someone else that is of absolutely no value to me I do not post. I see no reason to post a response to a post that I see of no value. Perhaps those who believe they are the troll police might want to consider this.

Christian Gollwitzer

unread,
Feb 25, 2014, 12:55:46 AM2/25/14
to
Am 25.02.14 03:05, schrieb bsall...@yahoo.com:
>
> Meanwhile you and other who have posted on this topic have not received anything of value.
>

Ah! So you admit it! But you are wrong, you entertained me:) Still I
prefer that this group maintains the outstanding quality it has had for
a long time and will ttry to not answer again (got me:)

Christian


bsall...@yahoo.com

unread,
Feb 25, 2014, 5:49:03 AM2/25/14
to
A closed mind often finds little of value.

Steve Havelka

unread,
Feb 25, 2014, 11:57:51 AM2/25/14
to
And a washed pot never boils.

Les Cargill

unread,
Feb 25, 2014, 1:27:38 PM2/25/14
to
Nucleation?

--
Les Cargill

bsall...@yahoo.com

unread,
Feb 25, 2014, 2:28:35 PM2/25/14
to
Nucleation?

--
To Les Cargill

Thanks for the word "nucleation". I looked it up and see it was what I was seeing years ago with crystals on strings formed from a large amount of salt in water. I see you can get crystals with sugar. I wonder what you would get if you dyed sugar with different food coloring, combined the different colored sugar and then tried to have crystals form in water. My daughter is all grown up now but this would have been a great project when she was younger.

gavino_himself

unread,
Mar 1, 2014, 10:21:54 AM3/1/14
to
On Friday, February 7, 2014 9:51:24 PM UTC-8, Gerry Snyder wrote:
> On 2/7/2014 6:36 PM, bsall...@yahoo.com wrote:
>
> > Been using tcl/tk for 15 years and still finding secrets. Wish there were better books on tcl/tk.
>
> >
>
> > ....
>
> >
>
> > Just found out that with tcl you can use ; to indicate end of line of a command.
>
>
>
> Hmmm, the dodecalogue ( e.g., http://wiki.tcl.tk/10259 ) is considered
>
> the standard documentation for Tcl. The use of the semicolon as a
>
> command separator is in the second sentence of rule 1.
>
>
>
> Maybe there are some other secrets hiding in there.
>
>
>
> Gerry

maybe holhocaust never happened

bsall...@yahoo.com

unread,
Mar 1, 2014, 12:31:39 PM3/1/14
to
gavino_himself
10:21 AM (1 hour ago)
On Friday, February 7, 2014 9:51:24 PM UTC-8, Gerry Snyder wrote:
> On 2/7/2014 6:36 PM, bsall...@yahoo.com wrote:

Been using tcl/tk for 15 years and still finding secrets. Wish there were better books on tcl/tk.

Found out about using debug trace variables to have software handle the state of a buttons to be disable or normal dependent on a variable. No sense having the search button enabled when no keyword in an entry window has been entered.

Appears that trace variables can also be used on changes to list variable. I find this very interesting for use in an application.
......................................................
Hmmm, the dodecalogue ( e.g., http://wiki.tcl.tk/10259 ) is considered the standard documentation for Tcl. The use of the semicolon as a command separator is in the second sentence of rule 1.

> Maybe there are some other secrets hiding in there.
> Gerry

maybe holhocaust never happened

gavino_himself
.........................................


Another profound thinker, gavino_himself.

I am sure that gavino_himself already knew that trace variable could be used with lists. And of course he fully understands that depending upon the web for information is not very effective when you have no web connection.

Also gavino_himself is also aware that a search for tcl/tk programming on Amazon brings up very few books on tcl/tk, while python programming brings up many books on python.

Also yes the holhocaust happened if gavino_himself actually meant to write the word "Holocaust".

By the way I have received my copy of "Tcl and the Tk Toolkit (2nd Edition) by John K. Ousterhout and Ken Jones" and I am happy with this purchase. I would like to thank again the intelligent individual that posted and made me aware of this book.

I really wish this topic could be put to rest without any more new posts from profound thinkers.

Eric

unread,
Mar 1, 2014, 1:24:10 PM3/1/14
to
On 2014-03-01, bsall...@yahoo.com <bsall...@yahoo.com> wrote:
>On 2014-03-01, gavino_himself <visplo...@gmail.com> wrote:
>>On Friday, February 7, 2014 9:51:24 PM UTC-8, Gerry Snyder wrote:
>>>On 2/7/2014 6:36 PM, bsall...@yahoo.com wrote:
>>>> Been using tcl/tk for 15 years and still finding secrets. Wish
>>>> there were better books on tcl/tk.
>>>>
>>>> ....
>>>>
>>>> Just found out that with tcl you can use ; to indicate end of line
>>>> of a command.
>>>
>>> Hmmm, the dodecalogue ( e.g., http://wiki.tcl.tk/10259 ) is
>>> considered
>>> the standard documentation for Tcl. The use of the semicolon as a
>>> command separator is in the second sentence of rule 1.
>>>
>>> Maybe there are some other secrets hiding in there.
>>>
>>> Gerry
>>
>> maybe holhocaust never happened
>>
>> gavino_himself
> .........................................

Firstly, in the above I have attempted to straighten out the combined
mess made of Usenet posting conventions by the Google Groups interface
and your own efforts to specify what you are replying to.

> Another profound thinker, gavino_himself.
>
> I am sure that gavino_himself already knew that trace variable could
> be used with lists. And of course he fully understands that depending
> upon the web for information is not very effective when you have no
> web connection.
>
> Also gavino_himself is also aware that a search for tcl/tk programming
> on Amazon brings up very few books on tcl/tk, while python programming
> brings up many books on python.
>
> Also yes the holhocaust happened if gavino_himself actually meant to
> write the word "Holocaust".

Secondly, it is usually not worth trying to talk to or argue with
gavino_himself.

> By the way I have received my copy of "Tcl and the Tk Toolkit (2nd
> Edition) by John K. Ousterhout and Ken Jones" and I am happy with this
> purchase. I would like to thank again the intelligent individual that
> posted and made me aware of this book.
>
> I really wish this topic could be put to rest without any more new posts
> from profound thinkers.

Thirdly, you are not the only one!

Eric
--
ms fnd in a lbry
It is loading more messages.
0 new messages