Live data from Hacker News

Tcl 9.0

tcl-lang.org

41–50 of 247 posts

Re: Tcl 9.0

#41
post #8

The only time I’ve dealt with Tcl in recent memory was for some MacPorts portfile stuff. Anybody using it for something else and can speak to why you’d use it today? Genuinely curious; I don’t hate the language but can never bring myself to enjoy it either.

I should also note that Richard Hipp, the creator of SQLite, says that SQLite is coded in Tcl. The database engine itself is coded in C, of course; but the vastly larger test suite is mostly coded in Tcl; and it's the test suite that makes SQLite the reliable engine that it is. The test suite persists; the engine's been re-written in whole and in part.

Indeed, SQLite started life as simply a Tcl extension[0] that “escaped into the wild”. Redis was initially prototyped in Tcl too, and ‘antirez has nice things[1] to say about Tcl.

[0] https://sqlite.org/tclsqlite.html

[1] http://antirez.com/articoli/tclmisunderstood.html

Re: Tcl 9.0

#42
post #8

The only time I’ve dealt with Tcl in recent memory was for some MacPorts portfile stuff. Anybody using it for something else and can speak to why you’d use it today? Genuinely curious; I don’t hate the language but can never bring myself to enjoy it either.

I used it a few times, mainly because of Freewrap. With very little code I was able to write a Windows app with GUI that I could distribute easily as an executable:

  - A backup app for an online sales application (inputs items and spits out a file);
  - An app to fix files in a buggy POS for a large retail chain (this might have been used in thousands of machines, I can't recall the details now);
  - A small app to copy Forms/Reports to the server, fire compilation, and push the new file to git;
  - A wrapper for gs to help a media department easily join many PDFs into one file.
All these have a page or maybe two of code.

Re: Tcl 9.0

#43
post #38

Earlier quoted context omitted.

The Tcl language is made up of commands ; a command has a name and takes an argument list, with which it can do literally anything. The standard commands are written in C; Tcl `procs` are commands that are written in Tcl. The control structures, like `if` and `foreach` and `while` is just a Tcl command. The `proc` command that defines a proc is just a Tcl command. I think of it as Lisp for C programmers. So: is the l…

> Is there a minimal amount of magic? No; the amount of magic you can do is effectively unlimited. I might be mistaken, but I think the OP was asking if there is surprising magic (I.e. special cases/considerations) built into the language, in which case I’d say, “No, Tcl is not “magical”, but surprisingly simple and regular.” That said, indeed it’s powerful in its application of its primitives, but you do still need…

In that sense, yes, very little magic...enabling vast conjurations. :-)

Re: Tcl 9.0

#44
post #8

The only time I’ve dealt with Tcl in recent memory was for some MacPorts portfile stuff. Anybody using it for something else and can speak to why you’d use it today? Genuinely curious; I don’t hate the language but can never bring myself to enjoy it either.

The only reason to use it today is because you're forced to by the EDA industry. Otherwise there are far far better options.

That also means this release is basically irrelevant for the next 10 years because that's about how long it takes the EDA vendors to update their bundled TCL versions.

Re: Tcl 9.0

#45
post #8

The only time I’ve dealt with Tcl in recent memory was for some MacPorts portfile stuff. Anybody using it for something else and can speak to why you’d use it today? Genuinely curious; I don’t hate the language but can never bring myself to enjoy it either.

I use it for "expect" because it just works.

Re: Tcl 9.0

#46
post #8

The only time I’ve dealt with Tcl in recent memory was for some MacPorts portfile stuff. Anybody using it for something else and can speak to why you’d use it today? Genuinely curious; I don’t hate the language but can never bring myself to enjoy it either.

I should also note that Richard Hipp, the creator of SQLite, says that SQLite is coded in Tcl. The database engine itself is coded in C, of course; but the vastly larger test suite is mostly coded in Tcl; and it's the test suite that makes SQLite the reliable engine that it is. The test suite persists; the engine's been re-written in whole and in part.

[deleted]

Re: Tcl 9.0

#47
post #8

The only time I’ve dealt with Tcl in recent memory was for some MacPorts portfile stuff. Anybody using it for something else and can speak to why you’d use it today? Genuinely curious; I don’t hate the language but can never bring myself to enjoy it either.

>Anybody using it for something else and can speak to why you’d use it today? Genuinely curious; I don’t hate the language but can never bring myself to enjoy it either.

For a long time it was the only way to get a decent IRC bot going, because eggdrop[0] was a Tcl wrapper around a small C core, but the only place I've seen it in the wild other than IRC bots was in the Xilinx toolchain and once when I was in undergrad some TA was using it to get telemetry from Tektronix oscilloscopes in the robotics lab.

[0] https://www.eggheads.org/

Re: Tcl 9.0

#48
post #8

The only time I’ve dealt with Tcl in recent memory was for some MacPorts portfile stuff. Anybody using it for something else and can speak to why you’d use it today? Genuinely curious; I don’t hate the language but can never bring myself to enjoy it either.

Last use I remember seeing for it was in scripting Intel FPGAs https://www.intel.com/content/www/us/en/docs/programmable/68...

Tcl is widely used in EDA automation in general - it's not just an Intel thing. Xilinx, Synopsys, Cadence, and Mentor all use Tcl extensively, for example.

Re: Tcl 9.0

#49
post #26

Earlier quoted context omitted.

Is Electron really considered a competitor to Tk based GUIs? In my (limited) experience, Tcl/Tk is great for basic stuff but I don't think you could do even a small part of what you can do with an html + css + javascript GUI.

It used to be the other way around. It’s been a while since I did much UI work, but the web always felt incredibly frustrating for layout compared to Tk. (I think CSS finally has something approaching Tk’s grid layout manager?) There are fewer frameworks for Tk, but I think it has most things you’d need. Maybe some of the finer control over fonts etc is lacking.

> most things you’d need

Say you wanted to write a CAD app like https://www.onshape.com. There’s no way you could do it Tcl/Tk, is there?

Re: Tcl 9.0

#50
post #17
post #8

The only time I’ve dealt with Tcl in recent memory was for some MacPorts portfile stuff. Anybody using it for something else and can speak to why you’d use it today? Genuinely curious; I don’t hate the language but can never bring myself to enjoy it either.

It's the scripting language of the EDA industry. If you're designing computer chips, you're using TCL. Cadence and Synopsys standardized on TCL 30+ years ago. It's strength is that you get to operate EDA tools as if they were shell script commands, like run_my_task -option_a -option_B If you aren't designing computer chips, you have no reason to use it. It's a horrible language. The sooner the EDA industry can get ri…

> If you aren't designing computer chips, you have no reason to use it. It's a horrible language.

What an unfair statement to make; by no means is it an horrible language. Just because it doesn't fit your tastes doesn't make it "horrible".

That's like me saying having to start a line of Python with three spaces is annoying design which makes it an horrible language. Take your statement elsewhere.

Post reply on HN