Readit News logoReadit News
shanemhansen · 2 months ago
Tcl was my first "general purpose" programming language (after TI-basic and Matlab).

When I started that job I didn't know the difference between Tcl and TCP. I spent a couple months studying Phillip Greenspuns books. It also made me a better engineer because unlike PHP I couldn't just Google how to do basic web server stuff so I had to learn from first principles. That's how I ended up building my first asset minification pipeline that served the "$file.gz" if it existed with content-encoding: gzip.

Nearly 20 years later and I'm basically a http specialist (well, CDN/Ingress/mesh/proxy/web performance).

Tcl is still kind of neat in a hacky way (no other language I've run across regularly uses upvars so creatively).

Shout-out to ad_proc and aolserver.

pjmlp · 2 months ago
AOLServer was the inspiration to the product I worked on, during my first experience working at a dotcom startup.

We had something similar, however it would plug into Apache and IIS, more configurable across several UNIXes and RDMS, and eventually even got an IDE coded in VB, for those folks not wanting to use the Emacs based tooling.

Eventually we also became a victim of the dotcom burst, however many of those ideas were the genesis of OutSytems platform, then rebooted on top of .NET, and still going strong on the market nowadays.

KasianFranks · 2 months ago
In 1996/7 I had a chance to use Tcl/Tk to build one of the first stock tickers on the web called DigitalTrader [1], after that we used it to build some of the first vector embeddings in 2005 for early biological language models at Lawrence Berkeley National Lab [2,3] for space biosciences. Still a fan.

[1] https://www.orafaq.com/usenet/comp.databases.oracle.misc/199...

[2] https://newscenter.lbl.gov/2005/03/31/a-search-engine-that-t...

[3] https://patents.google.com/patent/US7987191B2/en

doublerabbit · 2 months ago
I'm currently working on a PXE provisioning system with Tcl. This crafts a KickStart configuration hosted on a virtual URL.

LUks is a requirement and requires a random password on each workstation. Password generation with handmade web gui stored natively in sqlite all under 200 LoC so far.

Tcl gets flak, but it's battle tested. Still under active development and has a cool GUI, Tk, I love it as a language. In terms of simplicity it just works out of the box, execution in a single file, in a sanely manner.

Wrap a variable in brackets {} and you've secured yourself from injections or run the procedure in a lightening safe interpreter if your paranoid.

Threading is a breeze. It does make you think in a different methodology which folk may rebuttal, but once you get it, it's great.

NaviServer too, AOLs original webserver is awesome.

https://wiki.tcl-lang.org/page/NaviServer

https://github.com/naviserver-project/naviserver

mzi · 2 months ago
Nitpick: it's flak, not flack. It's a german abbreviation of Flugzeugabwehrkanone or anti-aircraft gun
justusthane · 2 months ago
I’ll do another nitpick: “rebuttal” is a noun. “Rebut” is the verb you’re looking for.
doublerabbit · 2 months ago
Missed the edit window. Noted for the future though, thanks.
dizzant · 2 months ago
I used Tcl at my very first internship for test automation. Coming from a self-taught Javascript/Java/C#/C++ background, Tcl really stretched my concept of what a programming language is, especially how it plays with stack frames and munges string values.

Coincidentally Tcl also inspired my first deep dive into Vim. The test automation framework at that company required meaty Tcl expressions packed into CSV cells. Tcl was mind-boggling enough when properly formatted, so hand-editing squashed 1800 character long expressions on a single line was way too much. I'm fairly certain the assignment was part hazing and the framework part "job security".

Jokes on them, I spent 2 weeks on a side quest to make a Vim plugin that could add line breaks and indent a Tcl expression into a split temporary buffer for editing and squash it back to the right cell when I was done. Halfway through the summer I had completed the entire backlog. The manager got a reprimand for being a jerk and I spent the rest of the summer making the framework less painful.

bitwize · 2 months ago
A lot of people on Hackernews get wistful for VB. But the VB of the Unix world is still here—Tcl/Tk. It's not for the faint of heart, but it's the fastest way I've seen to get from zero to functional GUI. Entire desktop environments have been built in it—before GNOME 1.0 even came out. It even has metaprogramming capabilities that approach Lisp in flexibility.
badsectoracula · 2 months ago
VB and Tcl/Tk are very different at a fundamental level. Nowadays the closest to VB would be Lazarus[0]. There is also Gambas[1] though personally i haven't tried that recently (it also cannot make binaries for Windows FWIW) and back when i did, it was very clunky.

Though there was an attempt[2] to make a Visual Tcl at some point. IIRC one neat aspect was that the program was actually live while you were designing it instead of having separate design / run modes.

[0] https://www.lazarus-ide.org/

[1] https://gambaswiki.org/website/en/main.html

[2] https://vtcl.sourceforge.net/

bitwize · 2 months ago
> VB and Tcl/Tk are very different at a fundamental level.

Well, yes, I get that—and I much prefer Tcl. What I meant was it filled the role of "tool you use to get a GUI together quickly", especially in the early 90s. Gambas and Lazarus were not around back then.

Lazarus is closer to Delphi than VB, and I've found it to be clunky also in practice if not in principle; Delphi took on a lot of production workload in the 90s, and having an open source workalike would be a boon to business. We seem to have trashed tools that enabled line-of-business apps to be built by single devs, only for AI companies to sell that ability back to us again in the form of LLM assistance. Sometimes I hate this civilization.

ternaryoperator · 2 months ago
JavaFX has a role here too.
IshKebab · 2 months ago
> but it's the fastest way I've seen to get from zero to functional GUI

I think Qt Creator is still the best option I've used there. It has a very good GUI form editor (probably the only one I've ever used that is good). You can have a basic GUI up and running in like 5 minutes tops. And C++ is a much better language than TCL, and Qt is a much better GUI toolkit than Tcl/Tk.

Just steer clear of QtQuick and QML. It's kind of trash. QtWidgets is still supported though.

rubymamis · 2 months ago
Why would you say QML is trash? QML is absolutely awesome for UI stuff (while still developing the models/logic in C++). I built my own block editor in QML and C++: https://rubymamistvalove.com/block-editor
pjmlp · 2 months ago
Except given the way JavaScript and Electron have gone, QtQuick and QML are pretty much the future, as far as Qt is concerned.

Especially because it opens the door to also have Rust in the mix, Slint style.

jhardcastle · 2 months ago
Tcl/Tk was used by the first open source project I ever contributed to 25 years ago – a client for AOL Instant Messenger called TiK. It was such a thrill to be able to hack on the client, see the changes in almost real time, and share with others. It's great to see Tcl still around and kicking!

https://tik.sourceforge.net/

treesknees · 2 months ago
There is an open source server that implements the protocols used by AIM including TOC and Oscar. You can run TiK like it’s 2001 again.

https://github.com/mk6i/retro-aim-server/

https://github.com/mk6i/retro-aim-server/blob/main/docs/CLIE...

doodpants · 2 months ago
"By clicking on the image, an interactive demonstration of the Tcl/Tk application is launched using CloudTk."

No it isn't; I just get an empty frame with a close button. This is consistent on multiple browsers/platforms.

zamadatix · 2 months ago
I'm guessing it works fine until there is load :). The design does seem to just proxy noVNC to a Linux host.
kragen · 2 months ago
I wonder if you could maybe just compile wish to Wasm with Emscripten?
hoppp · 2 months ago
Worked for me
nu11ptr · 2 months ago
same here
rickcarlino · 2 months ago
I wish more scripting languages (other than TCL and Python) had desktop GUI support out of the box. I don’t even need a good one, just having an OK GUI lib that isn’t a full blown third party webview frameworks would be nice for one off utilities.
gt0 · 2 months ago
I used REBOL about 20 years for something like this, an interesting TCL-like language with a GUI built in, I found it quite charming to look at, but it was dated even 20 years ago.

HyperCard was an interesting way to do this too. Perhaps with some work to make it a bit more user friendly and less alien feeling, Smalltalk/Pharo has potential.