Live data from Hacker News

The Birth of Tcl

tcl.tk

61–70 of 105 posts

Re: The Birth of Tcl

#61
A lot of semiconductor EDA / CAD tools use Tcl as the built in scripting language. Our CAD flows are thousands of lines of Tcl code that are both wrappers around the tools and scripts for the tools to execute that set options and run various commands generate reports

Re: The Birth of Tcl

#62

I really like Tcl the language and some of the tooling, but certainly not all of it. I kind of wish there was a single reputable website that I could go to for all versions. I don't want something from Source Forge or ActiveState or some random person's website. I'm sure they're all fine, but I'm a lot less sketched out with running Anaconda Python or Java than Tcl. Funny enough, some Python systems include Tcl for t…

TCL has a feature which to me qualifies as a total "What the hell were they thinking?", not unlike the COME FROM command from Brainfuck, except, in a real language.

That statement is upvar [1]. Read its description and despair.

[1] https://www.tcl.tk/man/tcl/TclCmd/upvar.html

Re: The Birth of Tcl

#63
post #9
post #7

Tcl is insane. The language is straight out of The Book (Anathem). By that I mean, the semantics are not just wrong, they're so wrong they risk warping your brain. But the language somehow remains useful, powerful, and flexible. And there is still no faster way to get from zero to working GUI in the 2020s on a conventional computing environment (Windows or some Unix). So it's fantastic for prototyping at the very lea…

What drives you the most nuts about the syntax?

See my comment above about "upvar".

Re: The Birth of Tcl

#64
I wonder in what context the language comes up for others. I remember having to use it to accomplish something maybe once over the last 25 years(?) and it was so long ago I don’t even remember what it was.

Re: The Birth of Tcl

#65
post #12

Earlier quoted context omitted.

1) I realize that Tcl isn't technically stringly typed on the inside anymore, but extensionally it still appears so. 2) Attempting to understand how variable scoping works in Tcl is like attempting to stare into the maw of some eldritch horror, deeper than the earth itself by some trick of other-space, and lined with infinite rows of writhing, fang-tipped cilia. The central tenet of lexical scoping -- that bindings v…

I just guess there are two kinds of people in the world. I think scope leakage across logical boundaries is dangerous and really hurts maintainability and code readability, and I think Tcl's tight restriction of variable scope by default is one of its most valuable properties. I'm so old I remember many conversations among perl and JavaScript programmers talking about the bug that drove them craziest, and it always s…

I don't think that downward capture of bindings from an enclosing scope counts as "leakage" and I've never seen it lead to the maintainability issues you describe. In Perl and JavaScript, under certain conditions variable scope can leak upward, and that opens up its own can of fresh hell.

Lexical scope also allows the lambda calculus to work, and with it powerful constructs like parameterized functions over values, and fine-grained restriction of variable access through lexical closures. An eager young Scheme programmer can write a module or object system for Scheme in an afternoon.

Tcl allows those things to be written, but they're a bit more involved. And you have to exercise caution, as which bindings are live when a particular Tcl script gets executed is not clear from the program text. (I believe Tcl with upvar actually has dynamic scope semantics which, yet again, can of hell.) But hey, it's a wonderful thing that Tcl admits as much metaprogramming as it does, that puts it well ahead of many popular languages.

Re: The Birth of Tcl

#66

I wonder in what context the language comes up for others. I remember having to use it to accomplish something maybe once over the last 25 years(?) and it was so long ago I don’t even remember what it was.

It pops up in a bunch of different areas. If you used the Orbix Corba ORB, it was there. It's the scripting language for F5 load balancers. A one-time popular monitoring tool called NetCool/Omnibus used it for script extensions. It's also in a few different Electronics Design Automation (EDA) tools. It was also in a few different tools that dealth with Healthcare-specific IT, like HL7 protocol bridging. Just the ones I ran into. Prior to lua it was really the only dead-easy way to link a known, mainstream-ish, scripting language into an existing tool.

Re: The Birth of Tcl

#67

The article doesn't discuss how Sun turned away from Tcl and embraced Java instead (understandable since it focuses on Tcl). It's interesting because Sun had the same goals for Tcl as they did for Java (or vice-versa!): " evolve Tcl into a universal scripting language for the Internet ", " allows untrusted scripts to be evaluated safely ", " Tcl plugin, so that Tcl scripts can be evaluated in a Web browser ". Ousterh…

I only watched this from the outside, but my impression was that it was an overreaction. Sun had a nice research operating system based on Java called SpringOS, but when clients heard about that they revolted. The transition from SunOS to Solaris had been traumatic and they threatened to jump ship if there would be any more changes ahead.

Sun's reaction was to adopt "only Sparc, only Solaris, only Java forever and ever" as their roadmap, publicly killing SpringOS, Tcl, Self (programming language) and so on. That did make the clients happy.

Re: The Birth of Tcl

#68

I really like Tcl the language and some of the tooling, but certainly not all of it. I kind of wish there was a single reputable website that I could go to for all versions. I don't want something from Source Forge or ActiveState or some random person's website. I'm sure they're all fine, but I'm a lot less sketched out with running Anaconda Python or Java than Tcl. Funny enough, some Python systems include Tcl for t…

TCL has a feature which to me qualifies as a total "What the hell were they thinking?", not unlike the COME FROM command from Brainfuck, except, in a real language. That statement is upvar [1]. Read its description and despair. [1] https://www.tcl.tk/man/tcl/TclCmd/upvar.html

As a fan of immutability (edit: I suppose I should say rather referential transparency is more relevant here), that horrifies me, but at the same time I have to commend the ingenuity.

Re: The Birth of Tcl

#69

The article doesn't discuss how Sun turned away from Tcl and embraced Java instead (understandable since it focuses on Tcl). It's interesting because Sun had the same goals for Tcl as they did for Java (or vice-versa!): " evolve Tcl into a universal scripting language for the Internet ", " allows untrusted scripts to be evaluated safely ", " Tcl plugin, so that Tcl scripts can be evaluated in a Web browser ". Ousterh…

The Tcl War (1994) (vanderburg.org)

https://news.ycombinator.com/item?id=12025218

https://vanderburg.org/old_pages/Tcl/war/

https://news.ycombinator.com/item?id=17060181

pwg on May 13, 2018 | parent | context | favorite | on: Extending Tcl

Why you should not use Tcl

https://wiki.tcl.tk/16730

DonHopkins on May 14, 2018 [–]

And with that diplomatically worded message, RMS kicked of The Infamous TCL War.

That was Stallman's response to Sun bombastically pushing TCL as the official scripting language of the web, BEFORE Live Oak / Java was a widely known (or evangelized) thing.

At the point anybody started talking about a Java/TCL bridge, it was already all over for TCL becoming the "ubiquitous scripting language of the Internet".

Sun's unilateral anointment of TCL as the official Internet scripting language trigged RMS's "Why you should not use Tcl" message, which triggered the TCL War, which triggered Sun to switch to Java.

After the TCL war finally subsided, Sun quietly pushed TCL aside and loudly evangelize Java instead. The TCL community was quite flustered and disappointed after first winning the title "ubiquitous scripting language of the Internet" and then having the title yanked away and given to Java.

Any talk of bridges were just table scraps for TCL, the redheaded bastard stepchild sitting outside on the back porch in the rain, smoking a cigarette and commiserating with NeWS and Self.

Tom Lord's description of what happened is insightful and accurate:

https://web.archive.org/web/20110102015130/http://basiscraft...

>The Infamous Tcl War

>[...] Mr. Ousterhout had, a few years prior, developed Tcl while on the faculty of UC Berkeley - mainly, I think, to have a handy tool for other research and only secondarily as an experiment in language design. And he topped it off with Tk. Tcl/Tk took off in a huge way. It was easy to understand. The source code, written in Mr. Ousterhout's methodical and lucid style, was a joy to read. At the time, about the most convenient option for developing a GUI to run on a unix system was to write C code against the Motif toolkit - an ugly, expensive, and frequently disappointing process. With Tcl/Tk in hand, people started handing out new "mini-GUIs" for this and that, like candy. Tcl/Tk started to find application in some rather intense areas, like, for example, the "control station" software for some oil rigs. It was a smash hit.

>Meanwhile, I don't think I'm letting too many cats out of the bag here, the informal Silicon Valley social network of well placed hackers were quietly and unofficially circulating some very interesting confidential whitepapers from Sun Microsystems. One of their researchers, a fellow called Mr. Gosling, had dusted off a language he'd once led the design of called "Oak". Oak was originally intended for use in embedded systems. Its basic premise was that devices ought to be Turing complete and hackable, whenever possible. Oak's approach to statically verifiable byte-code comes from that origin. Mr. Gosling came out of Carnegie Mellon University and the attiude behind Oak was popular there. As one grad student had quipped a few years earlier: "If a light switch isn't Turing Complete I don't even want to touch it."

>In light of the rising star of web browsers, the folks at Sun conceived the notion of offering up a derivative of Oak to serve as the extension language for browsers. (It is probably worth mentioning here that Mr. Gosling was earlier well known for making one of the very first unix versions of Emacs.) Oak was re-named "Java" and the rest of its history is fairly well known.

>I've read, since then, that up to around that point Brendan Eich had been working on a Scheme-based extension language for Netscape Navigator. Such was the power of the hegemony of the high level folks at Sun that the word came down on Mr. Eich: "Get it done. And make it look like Java." Staying true to his sense of Self, he quickly knocked out the first implementation of Mocha, later renamed Javascript. This phenomenon of Sun's hegemony influencing other firms turns out to be a small pattern, as you'll see.

>Mr. Ousterhout was hired by Sun (later he would spin off a Tcl-centric start-up). The R&D; team there developed a vision:

>Java would be the heavy-lifting extension language for browsers. The earliest notions of the "browser as platform" and "browser as Microsoft-killer" date back to this time. Tcl, Sun announced, was to become the "ubiquitous scripting language of the Internet". Yes, they really pimped that vision for a while. And it was "the buzz" in the Valley. It was that pronouncement from the then-intimidating Sun that led to the Tcl wars.

>Mr. Eich, bless his soul, brute-forced passed them, abandoning Scheme and inventing Javascript. [...]

Re: The Birth of Tcl

#70

25 years ago, I worked on a team that built a full online retail brokerage in Tcl (including web page generation). It made me love the language as a developer, but the runtime performance on late 1990s hardware (especially pre-Tcl8) was pretty poor. I've since reached for Tcl several times per year and enjoy it each time.

My first industry job was almost on Aolserver: https://github.com/aolserver/aolserver#readme but I didn't have the discipline at the time to make it through the tech screen. In retrospect, I dodged a bullet, but I'm still glad I tried it cause it was for sure horizon-broadening
Post reply on HN