[Newbie] Outsterhout Tcl book v7.6 and the Tcl of today

0 views
Skip to first unread message

Robin Laurén

unread,
Apr 18, 1999, 3:00:00 AM4/18/99
to
Hello all thee Tcl prohpets.

Just got me John K. Ousterhouts "Tcl and th Tk Toolkit" book from
Amazon.co.uk. However, i was rather disappointed to see that it covers
Tcl only to version 7.6 (as i recall it).

Now i ask thee, is the book still worth anything? Should i send it
back? Have drastic changes happened to Tcl since going to version 8?
(like Perl going object-oriented with version 5). I would think so. Is
there any other book on Tcl 8, perhaps even an updated Ousterhout out
there, that i as a newcomer (having just written one Tcl/Tk program as
an excercise to a cource i took -- it was a rather nifty calendar app,
but that's another story altogether) should be getting?

Thanks for any advice.

-llaurén

** If replying to me by email, change the .if in my email to .fi **

--
Problem with Marillion is that | http://www.tf.hut.fi/Nados
few know they still exist. | -the *nados web site
-Edward Braiter | (and have a better day)

llauren.vcf

Christopher Nelson

unread,
Apr 18, 1999, 3:00:00 AM4/18/99
to
Robin Laurén wrote:
> Just got me John K. Ousterhouts "Tcl and th Tk Toolkit" book from
> Amazon.co.uk. However, i was rather disappointed to see that it covers
> Tcl only to version 7.6 (as i recall it).
>
> Now i ask thee, is the book still worth anything? Should i send it
> back? Have drastic changes happened to Tcl since going to version 8?
> (like Perl going object-oriented with version 5). I would think so. Is
> there any other book on Tcl 8, perhaps even an updated Ousterhout out
> there, that i as a newcomer (having just written one Tcl/Tk program as
> an excercise to a cource i took -- it was a rather nifty calendar app,
> but that's another story altogether) should be getting?

I think that "Tcl and the Tk Toolkit" provides a fine foundation (and, I think,
more basic stuff than most other books out there). However, it's not good as
your only Tcl book. If you are an experienced programmer new to Tcl, you might
want to try "Tcl/Tk for Real Programmers" by Clif Flynt.

Chris
--
Rens-se-LEER is a county. RENS-se-ler is a city. R-P-I is a school!

Ron A. Zajac

unread,
Apr 18, 1999, 3:00:00 AM4/18/99
to

Robin Laurén wrote:

> Hello all thee Tcl prohpets.
>

> Just got me John K. Ousterhouts "Tcl and th Tk Toolkit" book from
> Amazon.co.uk. However, i was rather disappointed to see that it covers
> Tcl only to version 7.6 (as i recall it).
>
> Now i ask thee, is the book still worth anything? Should i send it
> back? Have drastic changes happened to Tcl since going to version 8?
> (like Perl going object-oriented with version 5). I would think so. Is
> there any other book on Tcl 8, perhaps even an updated Ousterhout out
> there, that i as a newcomer (having just written one Tcl/Tk program as
> an excercise to a cource i took -- it was a rather nifty calendar app,
> but that's another story altogether) should be getting?

I found it a great book for learning the language; thorough, yet concise. If
you start at the beginning and methodically make your way thru the first
section (on Tcl programming), you will then know how to program Tcl. After
that, scan the man pages of an up-to-date tcl install and/or other up-to-date
books to fill in the cracks re newer bound-in functionality, e.g., sockets.
The Tk section is also good, with the same proviso as w/ tcl.

That's my opinion. Another example of fine technical writing, like the 1st
edition K&R "The C Programming Language".


lvi...@cas.org

unread,
Apr 19, 1999, 3:00:00 AM4/19/99
to

According to Ron A. Zajac <za...@Snortelnetworks.com>:
:that, scan the man pages of an up-to-date tcl install and/or other up-to-date

:books to fill in the cracks re newer bound-in functionality, e.g., sockets.
:The Tk section is also good, with the same proviso as w/ tcl.


1. Has anyone gone thru the book recently to see if there is anything which
flat out doesn't work any longer in either 8.0 or 8.1?

2. Anyone have a list of Tcl and Tk commands that are discussed in the
book but which have newer functionality?

3. Anyone have a list of Tcl and Tk commands that first appeared after the
book?

With these 3 lists in hand, we could help people out who find theirselves
learning from the book.

--
<URL: mailto:lvi...@cas.org> Quote: Saving the world before bedtime.
<*> O- <URL: http://www.purl.org/NET/lvirden/>
Unless explicitly stated to the contrary, nothing in this posting
should be construed as representing my employer's opinions.

Don Porter

unread,
Apr 20, 1999, 3:00:00 AM4/20/99
to
In article <7ff4sv$hr3$1...@srv38s4u.cas.org>, <lvi...@cas.org> wrote:
> With these 3 lists in hand, we could help people out who find theirselves
> learning from the book.

The "3 lists" boil down to the question "What's changed in Tcl/Tk
since publication of the Ousterhout book?" Visit <URL:
http://purl.org/thecliff/tcl/wiki?changes> to see my start at
the answer.

--
| Don Porter, D.Sc. Mathematical and Computational Sciences Division |
| donald...@nist.gov Information Technology Laboratory |
| http://math.nist.gov/mcsd/Staff/DPorter/ NIST |
|______________________________________________________________________|

Scott Redman

unread,
Apr 20, 1999, 3:00:00 AM4/20/99
to
Don, the "Changes in Tcl/Tk 8.1" lists "send disabled on Windows". It was never supported
in any previous "final" release, only in 8.1a1 - 8.1b2, maybe the comment
should say "send STILL disabled on Windows".

-- Scott Redman

Don Porter

unread,
Apr 20, 1999, 3:00:00 AM4/20/99
to
Scott Redman <red...@scriptics.com> wrote:
> Don, the "Changes in Tcl/Tk 8.1" lists "send disabled on Windows".
> It was never supported
> in any previous "final" release, only in 8.1a1 - 8.1b2, maybe the comment
> should say "send STILL disabled on Windows".

OK, did you fix it? I think the idea of the Wiki is that anyone
can fix the mistakes they find. My permission is not required.

lvi...@cas.org

unread,
Apr 21, 1999, 3:00:00 AM4/21/99
to

According to Don Porter <d...@cam.nist.gov>:
:Scott Redman <red...@scriptics.com> wrote:
:> in any previous "final" release, only in 8.1a1 - 8.1b2, maybe the comment

:> should say "send STILL disabled on Windows".
:
:OK, did you fix it? I think the idea of the Wiki is that anyone
:can fix the mistakes they find. My permission is not required.

Yes, please do fix errors. If people find a different that they feel is
'controversial' , then just tack a note on at the bottom of the page
indicating the issue and a discussion can resolve things.

Don, thank you so much for starting those pages - it's a great idea!
I know Brent had some notes in his books on the differences, and of course
there are notes in the changes file as well. However, DejaNews will
show that there are occasionally things that have appeared but which
perhaps didn't get documented or need a bit more documentation than
is available in the changes notes.

Jeffrey Hobbs

unread,
Apr 21, 1999, 3:00:00 AM4/21/99
to lvi...@cas.org
lvi...@cas.org wrote:
> According to Ron A. Zajac <za...@Snortelnetworks.com>:
> :that, scan the man pages of an up-to-date tcl install and/or other up-to-date
> :books to fill in the cracks re newer bound-in functionality, e.g., sockets.
> :The Tk section is also good, with the same proviso as w/ tcl.
>
> 1. Has anyone gone thru the book recently to see if there is anything which
> flat out doesn't work any longer in either 8.0 or 8.1?
>
> 2. Anyone have a list of Tcl and Tk commands that are discussed in the
> book but which have newer functionality?
>
> 3. Anyone have a list of Tcl and Tk commands that first appeared after the
> book?
>
> With these 3 lists in hand, we could help people out who find theirselves
> learning from the book.

Ack, no. At first I thought about letting this go, but I just
encountered yet another aspect of Tk that won't be in ANY book,
and that is the new C API.

If you stick to just basic Tcl, then you can get the basics from
John's book. Most of what you learn straight from there will also
work in a newer Tcl.

HOWEVER, to get the most out of Tcl, or even to be aware of some
common things important for Tcl8+, that book is USELESS. It had
its time, but its time is gone (it'd be nice to see it updated
though...)

Aside from the basics, for which John's book still presents some
things the best, let's consider what it doesn't even allude to:

Objects, objects, objects, unicode, objects.

OK, so what? Well, we are talking about people who are learning
this stuff from scratch. Why not do it right the first time? Why
tell someone that these are sufficient points, when certain items
will have to be relearned to take advantage of the current Tcl?

For example, anyone considering working with the C side of Tcl
should view the Ousterhout book as a waste of time (sorry John,
I don't think it hurts royalties, because I'm sure we're only
talking about old copies getting passed around). Except for
where people really want nothing to do with Tcl objects, all
new users should step into that immediately. Otherwise they
are going to have to upgrade (not a painless process) later.

For stock Tcl, it isn't so bad, but I consider any intro to Tcl
that doesn't present the idea of Tcl's objects near the beginning
is only doing the user a misservice. Those basics _should_
affect a user's programming style, and the earlier learned the
better. Then you can take into account all the stuff that people
will overlook (new commands and such) just because they aren't
mentioned in that book.

Anyway, why such a tirade? Well, I decided that maybe it was time
to update some of my C widgets to the Tcl_Obj interface. I am very
familiar with almost all aspects of the old C widget APIs, even
some of the little nitty gritty things. I just went into tkEntry.c
(from 8.1b3), to poke my nose into the changes. Well, this involves
a LOT of lines of code. Considering the 8.1 jump also includes
Unicode, I am looking at going over literally thousands of lines of
code to do a full upgrade. This is a perfect case of, if I were
starting from mental scratch now, why I would like to work from the
newest stand, rather than what was, and then requiring the upgrade
anyway in the future. Unfortunately in my case, I have only the
sources and man pages to work from...

Please don't punish people with out of date info!

Scott Redman

unread,
Apr 21, 1999, 3:00:00 AM4/21/99
to
I didn't realize that I could...but it looks like someone has
already fixed it. Thanks.

-- Scott

Don Porter wrote:
>
> Scott Redman <red...@scriptics.com> wrote:
> > Don, the "Changes in Tcl/Tk 8.1" lists "send disabled on Windows".
> > It was never supported

> > in any previous "final" release, only in 8.1a1 - 8.1b2, maybe the comment
> > should say "send STILL disabled on Windows".
>
> OK, did you fix it? I think the idea of the Wiki is that anyone
> can fix the mistakes they find. My permission is not required.
>

lvi...@cas.org

unread,
Apr 21, 1999, 3:00:00 AM4/21/99
to

According to Jeffrey Hobbs <Jeffre...@icn.siemens.de>:
:Please don't punish people with out of date info!


So we should just tell people who have no other source of info other
than John's book they are out of luck? I don't think that's what you
mean. And telling them to go spend another $30-$50 for another book
may or may not work - it depends.

Another use for Don Porter's excellent guides will be for those attempting
to port older code to Tcl 8.x - having a community list of differences
may provide a programmer with something more than the changes file level
of info - it remains to be seen how much information appears on the
web pages.

Allen Flick

unread,
Apr 21, 1999, 3:00:00 AM4/21/99
to
Don Porter wrote:
>
> The "3 lists" boil down to the question "What's changed in Tcl/Tk
> since publication of the Ousterhout book?"
> Visit <http://purl.org/thecliff/tcl/wiki?changes>
> to see my start at the answer.
>
> | Don Porter, D.Sc. Mathematical and Computational Sciences Division |
> | donald...@nist.gov Information Technology Laboratory |
> | http://math.nist.gov/mcsd/Staff/DPorter/ NIST |
> |______________________________________________________________________|

Went there. Looks good, very informative. I have what I consider an
important question, though.

Under changes for 8.0.3 --> New Tcl Commands : "auto_mkindex_old"
Under changes for 8.0.3 --> Changed Behavior : automkindex is different,
use auto_mkindex_old for the old behavior.
OK

Q: Where is the documentation (man page) for auto_mkindex ? I can't
fine it in my 8.0.5 distribution. I found the actual proc inside
of .../lib/tcl8.0/init.tcl, but the code comments leave a lot to
be desired.

Q: What is the changed behavior from the old form ?? 'Course, if I
had some sort of documentation, like a man page, this question
could probably be left out.

Any answers can be emailed to me direct, if you determine that it's not
pertinent to do so in this newsgroup.

Thanks for any/all help in advance.

///// ||||| \\\\\
( . . ) ( . . ) ( . . )
+-----ooO--U--Ooo------ooO--U--Ooo-----ooO--V--Ooo-----+
| |
| Allen Flick, Alcatel USA, Inc. |
| I take full credit/blame for anything stated herein. |
| |
+-------ooO-Ooo---------oooO-Oooo-------oooO-Oooo------+

Donald G Porter

unread,
Apr 21, 1999, 3:00:00 AM4/21/99
to
Allen Flick <afl...@usa.alcatel.com> wrote:
> Q: Where is the documentation (man page) for auto_mkindex ?

library(n).

--

lvi...@cas.org

unread,
Apr 22, 1999, 3:00:00 AM4/22/99
to

According to Donald G Porter <d...@cam.nist.gov>:

:Allen Flick <afl...@usa.alcatel.com> wrote:
:> Q: Where is the documentation (man page) for auto_mkindex ?
:
:library(n).

Ugg - I hate it when I find pages like that.
In my opinion, it's a bug when there isn't a man page 'link' to library.n
for each of the functions in the man page. Otherwise, how is the user supposed
to find the page? Okay - the Windows users just search using the nifty
interface, and the unix sites which are lucky enough to have tkman with
full text glimpse use that. But what do others user?

Jeffrey Hobbs

unread,
Apr 22, 1999, 3:00:00 AM4/22/99
to lvi...@cas.org
lvi...@cas.org wrote:
> According to Jeffrey Hobbs <Jeffre...@icn.siemens.de>:
> :Please don't punish people with out of date info!
>
> So we should just tell people who have no other source of info other
> than John's book they are out of luck? I don't think that's what you
> mean. And telling them to go spend another $30-$50 for another book
> may or may not work - it depends.

People have to be on the moon to have no other source of info than
John's book (there's no internet there yet, right?). It is not fair
to assume that every rainy-day hacker should have to buy a new book,
but I just wanted to lay down the other extreme.

John's book can be useful for the very first days of getting into Tcl,
and as a reference for concepts of glob'ing and what expr functions
are around (although it won't say to brace them - a major plus point
now, and it won't have rand(), a FAQ item). Beginning regexps are
there, but 8.1's stuff is key for some complex parsing tasks.

My point is, if a person happens to have a copy of old yello' around,
or gets it for free, then let that be. However, if Welch's book and
old yello' are sitting next to each other for $10 each at the local
used book store, get Welch. If the person works for a company, and
that company can't/won't spring the paltry sum (in corporate terms)
for a book (educational material here), then I'd start looking for a
new job (I'm serious). People can order a newer book from
Amazon.(de|com|co.uk) to anywhere in the States, Canada or the EU without
paying S&H, very easily done (I'm a big fan - if you buy children's
books, they ship it with a pack of gummi bears).

And the final point is, if a person is left with the Ousterhout book
as their last resort, they better get familiar with the interenet
resources available to them (like the one Don is providing) to make
sure they don't step into any traps or bad (old-style) programming
paradigms that will affect their results with Tcl. Also, it is OUR
responsibility, when they ask, to give them the proper warnings and
further references.

> Another use for Don Porter's excellent guides will be for those attempting
> to port older code to Tcl 8.x - having a community list of differences
> may provide a programmer with something more than the changes file level
> of info - it remains to be seen how much information appears on the
> web pages.

There are already porting guides. I will assume (without having to
grep through Wiki) that there are in there (in substance, or as links).
A nice thing about a newer book like Welch, is that he includes sections
for these in the back, in the case that people are porting instead of
starting anew.

** Jeffrey Hobbs jeff.hobbs @SPAM acm.org **
** I'm really just a Tcl-bot My opinions are MY opinions **

Robin Laurén

unread,
Apr 29, 1999, 3:00:00 AM4/29/99
to
Jeffrey Hobbs wrote:

> John's book can be useful for the very first days of getting into Tcl,

A fact that has been proven right the last week or so. However, as you stated
earlier (ok, allow me to quote you)

> let's consider what it doesn't even allude to:
> Objects, objects, objects, unicode, objects.

I would now like to learn Tcl object-wise, as you say, from the beginning. I
believe it is a Good Thing. Also, another thing Ousterhout's book ("Old
Yellow"?! Seems mine isn't faded enough) doesn't mention are namespaces, what
they are and how they should be used exactly. They also seem like a Good Thing
to handle.

So, dear gurus, where should i be heading now?

~llauren

(more newbie questions rsn)

llauren.vcf

Jeffrey Hobbs

unread,
Apr 29, 1999, 3:00:00 AM4/29/99
to Robin Laurén
Robin Laurén (courtesy cc) wrote:
> Jeffrey Hobbs wrote:
>
> > John's book can be useful for the very first days of getting into Tcl,
>
> A fact that has been proven right the last week or so. However, as you stated
> earlier (ok, allow me to quote you)
>
> > let's consider what it doesn't even allude to:
> > Objects, objects, objects, unicode, objects.
>
> I would now like to learn Tcl object-wise, as you say, from the beginning. I
> believe it is a Good Thing. Also, another thing Ousterhout's book ("Old
> Yellow"?! Seems mine isn't faded enough) doesn't mention are namespaces, what
> they are and how they should be used exactly. They also seem like a Good Thing
> to handle.

To the first problem (objects), no book addresses that very well, and
some actually omit info that could bite you later (like side-effects
from converting a string to a list - you can lose whitespace info).
In general, what is missing is discussions on what to do for proper
coding style that will maximize speed or be more efficient. These kind
of things have been weel discussed on the newsgroup, and there are
bound to be good resources now documenting these (start at the Wiki,
and Laird has very good pages, just not always that easy to wafe through).
At the C API level, this is better addressed.

To the second (namespaces), the newer books cover this in general.
Overall, I would recommend Clif Flynt's book (ISBN 0-12-261205-1)
first, and then Welch's 2nd edition. Clif's is slightly broader and
more "accurate" on certain things, as it benefits from being written
later.

There are good Web resources to fill in the gaps, but sometimes they
aren't the easiest to work with, and a good book is irreplacable
(so far...).

Jeffrey.Hobbs.vcf
Reply all
Reply to author
Forward
0 new messages