Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

What's the use case of TCL nowadays? I thought the language was fading out due to emergence of alternatives like Lua and Python, despite how much I love it.


Because of the inherent "everything is s String" mantra tcl/tk is to this day by far the best language to rapidly build GUI front ends for CLI applications (which generally spit out strings to stdout).

In our company I recently ported some of the MS Access databases to sqlite + tcl/tk as a side project which turned out to be a great decision. Much higher reliability, productivity and finally versioning with git. I was impressed how quickly you can put together a GUI with tcl/tk. And they look really great on Windows and Mac. The default "Motiv" style look on Linux looks kind of dated though.


It's still lighter and easier to embed than Python. Lua has sort of displaced it for "script" files but not so much for "config" files, as artificial as that distinction is; also I'm not sure how much Lua has caught on as an interactive embedded prompt. And in any case a lot of existing systems feel no need to migrate.

And honestly it's still a pretty nice language, as much as I've mostly lost interest in untyped languages. I've been thinking about trying to implement it (or a cut-down version) on GraalVM.


So actually this is one thing I found when embedding Lua recently in a project was that it doesn't really have a REPL. There's projects to add one, but it is not as eval-loop friendly as a scheme or a Tcl.


> implement it (or a cut-down version) on GraalVM

I encourage you to do this.


I think almost every FPGA vendor development tool has integrated tcl support which is basically the standard for scripting in that industry. Vender lock-in exasperates the trend.


It might exasperate the users, but it exacerbates the trend.


If you need to create a performant gui app for something very fast, it is no match.

It is unfortunate that it has not been embraced by the scientific community.

The only benefit of Python + (random) gui layer is that you write something in python and you need to also provide gui.

You need to write it with what python provides to stay unified.

But that is the only benefit.


> You need to write it with what python provides to stay unified.

Like TkInter, which uses tcl/tk?


HUGE use in really niche spaces. FPGA development uses it because of really embedable/flexible syntax, and a lot of software integration testing uses it for things like Expect (whose Tcl implementation is still far and away the best).


In science, NAMD, one of the most popular molecular dynamics simulation packages, and VMD, a molecular visualization tool are scripted in TCL.


MacPorts is all Tcl.


My accounting system is written in Tk/TCL. Works well.


what is it?


It works just fine for web-backend development.


TCL was the language used with F5's BigIP for writing custom rules on their load balancer. I' haven't used BigIP in years, so I'm not sure if they still do.

This was the last big thing I wrote in TCL and I still use it to this day:

https://battlepenguin.com/tech/scripts/lnsponge/

TCL is a neat language, but these days if I need scripts, I'll usually turn to python or ruby, plus they have a lot of libraries and packages. Like others have said, it's used in a lot of stuff where you need to embed a scripting language for extensions, similar to Lua.


Does the OS shipped with Cisco networking equipment still have a tcl interpreter?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: