Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
×
Technology Books Media Book Reviews

Review:Tcl/Tk in a Nutshell 44

Despite his long turnaround time, I still have not yet killed CowboyNeal for his long-delayed review of Jeff Tranter and Paul Raines' Tcl/Tk in a Nutshell. Part of the well known O'Reilly Nutshell series, this is a great book for those getting seriously into Tcl/Tk, or those who need a desktop reference. Click below for more information.
Tcl/Tk in a Nutshell
author Paul Raines & Jeff Tranter
pages ?
publisher O'Reilly and Associates
rating 7/10
reviewer CowboyNeal
ISBN
summary Not for beginners, this book makes a wonderful desktop reference.
Rating: 7/10

What's Good?

Being another book in the "nutshell" series, it's no surprise that this book contains all the commonly used commands in Tcl/Tk. Designed to sit on your desktop and help you look up those commands you forgot, this book is a weclome aid to any forgetful Tcl/Tk programmer. Each description has just enough to help one remember the command, without going too in-depth. Each section is devoted to the most oft-used Tcl/Tk tools, such as Expect and [incr Tcl]. The chapters covering the C interfaces use the same style as Java in a Nutshell's class reference, simply listing the function name, it's arguments, and the argument types. While not the best instructional aid, if you already know the function, it's just enough to remind you of how to use it. I really liked the compactness and simplicity of this in previous "nutshell" books, and I like it here as well. When covering some of the extentions of Tcl/Tk (Tix, for example), longer, more in-depth explanatations of each option and/or argument are given, as many people may not have used Tix before. Chapter 15, "Hints and Tips for the Tcl Programmer," is particularly useful, as it contains many "gotchas," the "Tcl way" of doing things, and things that might confuse beginning Tcl/Tk programmers (such as Tcl's parsing), and even a few things that Tcl/Tk gurus may want to brush up on.

What's Bad?

What I like about some "nutshell" books is that they often provide enough background for one to learn the language that is the subject of the book and begin programming in it. An example of this "Java in a Nutshell", one of my favorites. This book, however, assumes the reader is already a competent Tcl/Tk programmer, and makes no attempts to give an introduction to Tcl or Tk. I read this book in the hopes of picking up Tcl/Tk, but unfortunately it was not written to teach. When I do learn Tcl/Tk, however, I'll have a valuable resource handy to assist me in my coding. Some of the Tcl/Tk tools covered may not be used by everyone (such as Tclodbc), which may make some people as if some parts of the book will go unused. I found that if one uses only the core Tcl/Tk commands, then the majority of the book won't even aid you, as it is aimed at Tcl/Tk extensions. What else is bad? In all seriousness, I couldn't even nitpick further. For a desktop Tcl/Tk reference, this one is tough to beat. I even found myself liking the index.

Who should buy this book?

If you already know Tcl/Tk, then this book will be a great aid, especially of you use extensions, such as Oratcl or [incr Tcl], then this book will be a great help in remembering the commmands you don't use often, but need to get a quick synopsis of. If you're looking to learn Tcl/Tk, I wouldn't recommend this book, as it doesn't got into a great amount of detail. It would probably help one who hasn't written Tcl/Tk in a while, and is feeling a little rusty get back up to speed quickly.

You can pick it up at Amazon.

Table of Contents

Preface

  1. Introduction
  2. Tcl Core Commands
  3. Tk Core Commands
  4. The Tcl C Interface
  5. The Tk C Interface
  6. Expect
  7. [incr Tcl]
  8. [incr Tk]
  9. Tix
  10. TclX
  11. BLT
  12. Oratcl
  13. Sybtcl
  14. Tclodbc
  15. Hints and Tips for the Tcl Programmer

Appendix - Tcl Resources

Index

This discussion has been archived. No new comments can be posted.

Review:Tcl/Tk in a Nutshell

Comments Filter:
  • I have very little experience with TCL, however by relying on this book, my programming knowledge in other languages and just by browsing through some TCL scripts I got my hands on, I was able to teach myself a working knowledge of TCL. True, not everyone can learn like this, but for those who can, this is the perfect book to learn TCL.
  • Actually, TCL is not dead. I use it almost every day to script irc clients and bots.
  • You forget that there are still people giving first aid to the dead corpse. For example it is still the language for commercial programming. Refer to http://sunscript.sun.com for example.
  • Story Server uses tcl as their scripting language.
  • Hrmmm.....

    Frankly makes me want to go out and buy this
    book, just to keep an alternative to perl alive.

  • Expect Tcl to survive.

  • I found the review as well thought out as it could be under the circumstances. My suggestion is that slashhdot should have book reviews done by people who have experience with the language.

    As someone who is a very experienced Tcl/Tk programmer, I cannot trust a Tcl/Tk book review done by someone who admittedly has little or no experience with the language. Although the reviewer mentions that the book is not for the beginner, he lacks the understanding of the language to adequately comment on the ability of the book to address advanced issues.

    Please understand that this is not an attack. As I said, I found the review gave a good overview of what is covered, all things concidered.

  • The author of the review went in with incorrect thoughts about the series of books... The "Nutshell" series is (and always has been) the eqivalent of a man page for commands within the given system.

    Simply stated, it's a (very large and detailed) command reference card, not a howto.
  • I don't know. I really like PERL. I also really like Tcl/Tk, mainly because of Tk. But I don't like PERL/Tk. So for me at least, Tcl still lives.
  • by Anonymous Coward
    Actually, the correct URL(s) for Tcl related stuff are http://www.scriptics.com and http://www.tclconsortium.org. As for this "Tcl is dead" crap, I hate to break it to you but Tcl is used by a lot of "real" programmers. Tcl has a nice feature that Perl lacks. You will be able to understand what your Tcl code is doing a month or a year after you wrote it.
  • Ok, good enough. Until now, the best reference book is Practical Programming in Tcl/Tk. But that book is huge, and picking through to find the gems can be a pain.

    What revision does it cover?
  • The Nutshell series may be intended as merely a command reference, but a lot of us use them as tutorials as well and there are a number of good reasons for this:

    1) They're generally cheap. As a starving student, I was much more willing to spend $19.95 on Java in a Nutshell than one of the more expensive titles.

    2) Long term value. Once you get through the tutorial book, it's often not useful as a reference, you want shorter & more succint info instead of pages and pages of detail. If the book can be a reference AND teach you the language, you get more value for your dollar.

    3) Previous titles in the Nutshell series have been useful as learning aids. I picked up most of my Java knowledge from the Scribble example in Java in a Nutshell.

    The reviewer was simply anticipating how many of us would try to use the book and advising us accordingly.

    -dl



  • As an intermediate Tcl/Tk programmer with this book, I would tend to agree with parts of the original review. The core of Tcl/Tk is 136 pages. The rest of the 438 page book details stuff I really didn't use, but might want to someday. For example, I liked the 19 pages on expect, the 76 pages on tix, and 74 pages on using BLT.

    Another point: CowboyNeal wrote
    ...makes no attempts to give an introduction to Tcl or Tk.
    Well, to be fair this isn't what a Nutshell book is for. However, chapter 15 is exactly what he was looking for.

    A rundown on what I, a non-reviewer, liked.

    Tcl/Tk core language : 136 pages
    - Essential. This is what I bought it for. I can never remember if it's -bg or -fill, so I really like this section.
    The C interface : 37 pages
    - I doubt I will ever use this. But hey, it's nice to have.
    Expect : 19 pages
    - I have used this already. Expect rocks.
    [Incr Tcl] : 11 pages
    - I will never use this.
    Tix : 96 pages
    - I like this section, but wish there were pictures to go with the examples. This is a minor gripe.
    TclX : 33 pages
    - I will never use this.
    BLT : 74 pages
    - I like this section. I got stuck trying to install BLT one time, and gave up on it. Now I will give it another try.
    Oratcl : 8 pages
    Subtcl : 7 pages
    Tclodbc : 8 pages
    - I am not a database guy.
    "Hints and Tips for the Tcl Programmer" : 16 pages
    - Great section. Much of the material came from comp.lang.tcl FAQ's, but it is still great to have. Should it be up front?

    There is also a pocket ref for Tcl/Tk, at 90 pages, which is written by Paul Raines, one of the authors of the nutshell book.

    Final advice: it is usually cheaper to buy these books online. I bought this book online for $16.50, as opposed to the $24.95 list price.
  • what is the name of that option I pass to the listbox widget to get it to stop it from setting the X selection

    man listbox

    Seriously. I am a Tcl expert and have used many of the extensions, um, extensively. The man pages are all well written and concise. I use tkman to read them and tkman also lets me highlight important sections for future reference.

  • i understand the purpose of the nutshell books is not to teach, but to be a reference. in that light, could someone reccomend a good book for starting to pick up tcl/tk?
  • It's beyond me how you know that the author was anticipating what others would do when he wrote the article, since he never said that. Neat trick, though. *grin*

    However, if he had that purpose in mind, that is fine. It's still noteworthy that, though some books may be useful for learning from the "ground up", that is not their primary intention. I would never recommend that a newbie go out and purchase a "Nutshell" book to learn from, unless they had other sources. Of course, with the number of tutorials on the web these days, one can usually pick up the basics of a given topic and then grab a "Nutshell" book and augment their skills.
  • I bet you have not even tried Tcl as axtention language ever. "If RMS says I shouldnt use Tcl, then I wont use Tcl". bah.
  • I have read several books on the subject, and the best "howto' book for Tcl/Tk is Practical Programming in Tcl/Tk. It covers tcl/tk 8.0x, and is quite good for beginners and pros alike.
  • Couldn't have put it better myself?

    Toby
  • Perl serves an almost completely different purpose than Tcl. Perl makes a lot of things easier than any other language, if you are trying to do those things. What Tcl is great in, is embedding in a C program. You can add your own commands to the language which are actually handled by your C functions, and make a scripting language for you C program, either internally, or letting the users (or other developers) easily add their own scripts. disclaimer: some things are possible in some languages but easier in another language. Use what works. Knowledge is power.
    -- a Perl and Tcl programmer
  • I have read your book.

    It is also good starting point for people wanting to learn Tcl/tk, especially Tk.

    A good piece of work.
  • there are some posts here that say that TCL is dead.. I think not. THere are several companies that use tcl internally, SCO is one of them, as well as AOL, and I have heard that Cisco also uses TCL. Perl/Tk is also very much alive, as TK offeres a very nice and easy way of doing a GUI for Perl. Being someone who has used Tcl/Tk I have found that it is a quick way to bring a GUI alive, and also extremly good for prototyping an application. Once one masters Tcl/TK it can be a very powerful scripting language. Although I have not msatered it yet.
  • Not having read the other replies (possibly repeating someone's suggestion), here is my favorite: Practical Programming in Tcl/Tk, by B. Welch. Covers 8.0 fully, and introduces you step by step into tcl and then tcl/tk. However, it does not cover Tix and other extensions.
  • Amazon isn't the cheapest.

    http://www.addall.com;

    results:
    A1BOOKS: $16.25 + $3.95 s/h = $20.20
    BOOKPOOL: $16.50 + $3.80 s/h = $20.30
    FATBRAIN: $19.95 + $4.95 s/h = $24.90
    AMAZON: $19.96 + $7.95 s/h = $27.91
  • There are other good Tcl books, but most of them were too old, dating from 1996 or before.


    The book Tcl/Tk In a Nutshell is cryptic for beginners like me. For instance, the group listing of commands starting on page 11 contains three columns. The first seems to be a package type of some kind (file, info,array...) The second is the command, and the third explains what the command does.


    But the book never explains what the first column is, and at that point in the book (page 11!) it is by no means obvious to a beginner.


    Even so I am glad I got it. I wanted something reliable and up to date, and I have usually had good luck with O'Reilly books in the past. Plus, my wife enjoys it when I read her the descriptions of the animals on the cover. This one features an ibis.


  • Guile Scheme is a great language, however Tcl is the simplest way to extend an aplication, because all of us are familiarized with the imperative languages, and all you may want to do you can do it with Tcl
  • Amazon is almost NEVER the cheapest. Tell us something new.

    Amazon is just the spammest. Links in the face everywhere.
  • That's a valid comment; no disrespect to the review, reviewer, or commenter.

    Just to point out that I do a number of reviews on C++ and programming in general, and am quite a competent C++ programmer.

    My GIMP review should be posted shortly, and I'll admit I'm not a GIMP god but I do use it for graphics needs (whenever I have such needs).

    I'll probably review another UML book shortly, if anyone's up for that.
  • Prior to buying this book, I wasn't -really- impressed with any of the Tcl books I've read. Graphical Applications is a good intro, but is fairly slow moving-- I'd prefer a bunch of quick chapters to the few very long (often >50 pages) ones.

    Practical programming is an excellent reference, but it's not written as a tutorial. If you prefer to learn from a tutorial, you'll probably be better off with something different. That said, anyone who's serious about Tcl should probably have it for more advanced topics.

    While the Nutshell Book may not be a good -only- book for absolute beginners, it's definitely a great second book. My only complaint with it is a one of formatting-- on commands with subcommands (such as 'string length'), the subcommand should be bolded, or otherwise made to stand out a bit better. Otherwise, It's a great book, Personally, I'd give it 9 out of 10.
  • Comment removed based on user account deletion
  • As Little Richard once said of rock and roll:

    Tcl/Tk is dead but it won't lie down!

  • What Tcl is great in, is embedding in a C program.


    Do your comments apply to C++ programs as well?
  • I've found Tcl to be such an *ecch* method of creating an interface. I can't wait until SOME government brings out a law agaisnt it.

E = MC ** 2 +- 3db

Working...