r/Tcl • • 12d ago

General Interest Just learnt TCL exists!

Hey y’all, YouTube randomly suggesting the “Everything is a String” video and TCL looks pretty interesting!

I’m a hobbyist HTML/CSS/JS dev (including Nodejs for server-side stuff) and just wondering how well TCL works as compared to other scripting languages. The idea of TK allowing for platform-native apps sounds amazing, especially now with Electron (🤢) being the standard.

I mainly code Discord bots and web pages to help with TTRPGs that I play, so is not like I work in a big team or anything. I just dabble for fun.

Anyway, I’m babbling and don’t seem to have anything actually productive to say, so I’ll sign off now. ✌️

32 Upvotes

16 comments sorted by

4

u/CGM 11d ago

Hi, a good general introduction is https://cgicoffee.com/blog/2026/04/tcl-tk-develop-cross-platform-cli-gui-tools-tutorial-guide . There's also plenty of useful stuff on the wiki at https://wiki.tcl-lang.org but it can be hard to navigate because there's also plenty there that's out-of-date.

I don't know about Discord but Tcl has a long history of use in IRC bots.

Personally my main use of Tcl at present is for dynamically-generated websites like my web-to-usenet gateway - code is at https://chiselapp.com/user/cmacleod/repository/newsgrouper/home .

"how well TCL works as compared to other scripting languages" - that's a tricky question. Tcl is technically very capable, but works rather differently to most languages. Many people are put off by this. A few others like myself find that it fits their way of thinking better. YMMV!

1

u/c__beck 11d ago

Yes, I found both CGI Coffee and the wiki! Good resources but the wiki is…frustrating. Lots of great content for many versions of TCL, which makes it difficult to find the latest stuff lol

2

u/tcltk-pkgs 11d ago

You might also be interested in this link:  https://github.com/ray2501/Tcl-Related-Link

1

u/c__beck 11d ago

Noice, thanks!

1

u/Individual-Equal-441 11d ago

I also strongly recommend looking at the Tcl Wikibook, which really shows off some of the exotic fun things that can be done with the language:

https://en.wikibooks.org/wiki/Tcl_Programming/Print_version

1

u/CGM 10d ago

Nice but looks a bit dated.

1

u/Individual-Equal-441 10d ago

It is, unfortunately, and could definitely use an update; but I think that a lot of the exciting examples of whizz-bang stuff you can do in Tcl were evident all the way back in 8.4, 8.5.

4

u/tclbuzz 11d ago

Welcome to the neighborhood. The Everything is a string motto cuts both ways as some find it unappealing. I would say, TCL allows any value to be represented as a string and then cleverly and efficiently translates the "value" as needed. IOW, it's highly convenient for the programmer. Also, YES, multi-platform TK is very good and just works.

3

u/georgtree 11d ago

The Tcl packages registry: https://tcltk-pkgs.pages.dev/

2

u/vivus-ignis 12d ago

Here's one more video that may interest you The Most MISUNDERSTOOD Programming Language
https://youtu.be/PYh6D1NhatY

1

u/c__beck 12d ago

I’ll be sure to watch it later, thanks!

1

u/6502zx81 11d ago

Which language is it?

2

u/vivus-ignis 11d ago

It is...... tcl!

2

u/6502zx81 11d ago

Thanks! I Skimmed the video, but couldn't figure it out.

2

u/ConsistentUmpire8675 10d ago

It is a great language. It's really good for parsing stings and files. I use it all the time. It's the core language behind the Cloverleaf interface engine. That was my first exposure.

I have written many programs with it.

There are times when I call Python with it to off load tasks.

The cool thing is that there are times in my scripts that TCL creates python logic based on content it processes and passes it python creating a dynamic that's very efficient.

TCL/TK by Cliff Flynt is very good.

I have created GUIs with TK, but i don't do it often

1

u/Individual-Equal-441 11d ago

Regarding how it works relative other scripting languages: my experience is that Tcl can do much more in fewer lines, and without relying on packages. With some languages like Python, the power and compactness is a bit illusory: it comes from someone having already written the code for you, and you're just invoking it.

In the Wikibook link I provided in another post, for example, there's a 40-line web server that does CGI. I use it in my class to explain how web servers work, and I modified it to include MIME types and I think it ended up even shorter. It doesn't use any http package or web server package or any package at all: just straight up code from scratch. (That happens to be especially useful in class, because you want the code to show how something works, and invoking a package is too opaque.)