Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Tcl in MacOS X, What's the Deal?

Tcl in MacOS X, What's the Deal?
Thread Tools
Senior User
Join Date: Oct 2000
Location: Lawrence, KS
Status: Offline
Reply With Quote
May 1, 2001, 08:08 AM
 
So I spotted a folder wich apparently contains Tcl (with no Tk). I guess this because the Tk part requires an X Windows installation.
My question is, what are the plus and minuses of using Tcl instead of say Perl or even a Unix shell language?

I would like to play with it further, does anyone know any cool things one can do with it? Also, how do you run a "Hello World" in Tcl?

Thanks,
-FB
iMac 17" G4 800MHZ & 768 SDRAM
     
Dedicated MacNNer
Join Date: Apr 2001
Location: Bethesda, MD
Status: Offline
Reply With Quote
May 1, 2001, 08:31 AM
 
Yeah, I think you're right about Tk. Without X windows it's be a major
pain to port Tk. I did get it running under Xfree.

I'm not much of a Tcl user, but the impression I got (from talking
to others) is that the Tk part is the cool part. I.e. being able
to build a GUI from scripts. In staring at some other people's Tcl,
I still haven't grokked the syntax.

Here is my hello world script:

#! /usr/bin/tcl

puts "Hello World"
     
Senior User
Join Date: Sep 2000
Location: Boston, MA
Status: Offline
Reply With Quote
May 3, 2001, 07:18 AM
 
Good language. Yes, you need X for Tk but it works w/ XAqua.
For pure data munging, Perl is better (IMO).

Best book is "Practical Programming in Tcl/Tk by Brent Welch".
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 09:41 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2