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

I tried learning Motif to write X11 graphical programs in 1994. Another student in the computer lab told me about Tcl / Tk. It was far easier. Then I got a job in the semiconductor design industry in 1997. The next year the leading EDA companies Cadence and Synopsys started using Tcl as the internal scripting language for the tools. So now it is 2024 and our CAD flows are tens of thousands of lines of Tcl code. Every week I still write Tcl code to generate reports or automate something.


What have been the pros and cons of Tcl for you, compared with other scripting languages if you have experience with them?


the big thing that's changed is that now we have html5, and enough ram to run it


Here's a transcript of a keynote I gave to the Toronto Usenix symposium, where I talked about the pros and cons of TCL/Tk, from developing multi-player SimCity with it around 1993.

A lot has changed since then, but in 1993 it was so much better than Motif and every other alternative in so many ways.

https://www.donhopkins.com/home/catalog/simcity/keynote.html

>Hello, my name is Don Hopkins, and I ported SimCity to Unix on top of X11 using the TCL/Tk toolkit, and also on top of the NeWS window system using HyperLook. Unfortunately I can't be in Toronto to demonstrate this stuff to you, but fortunately I have some video tapes that you can see that demonstrate the whole system.

>The X11 version of SimCity is multi player, and several people can join the game, and cooperate, and people draw roads, and put down buildings in different places, and then when you do something important, like change the tax rate, or build an airport, you have to get everybody else who's playing to agree where to put it, and which thing to put down. So it makes you slow down and rationalize what you're doing, and explain to people why it is you want to put it there. It's a really interesting addition to SimCity because it adds politics.

>I'm going to show first the X11 version, which is on top of TCL/Tk, and that's a free toolkit that's available, written by John Ousterhaut at Berkeley. There's a book that's coming out describing it, and you can just get TCL/Tk and use it to make products for free. You don't have to pay anything for it, and it's actually very good code. It really beats the pants off of Motif, and we were able to modify it in order to support things like colormaps and multiple displays the way we needed to, and add things to it like a sound server to make sound effects, and pie menus for quickly selecting city editing tools. TCL/Tk made alot of sense for SimCity.

[...]

>HyperLook has this scripting language in it, and TCL/Tk has the TCL scripting language in it, so I was able to translate the things I had written in PostScript into TCL, and have a very similar structure. It makes it much easier to develop a thing as complex as SimCity if you have an interpretive programming language there, so you can just fiddle around, and paste new function definitions into the running system.

>There are some user interface editors that have been developed for TCL/Tk, but I just wrote code by hand because I was doing some more specialized things, like multiple views and putting up views on different X11 displays over the net, that the user interface editors didn't support. HyperLook has a built in user interface editor, and I'll demonstrate HyperLook SimCity and the HyperLook environment in the following video tape.

[...]

>One of the things I developed for TCL/Tk and for HyperLook was this sound mixer server. And then we got an NCD X-Terminal, and just layered my sound mixer on top of their sound server. It can either use the built-in audio device and be a TCL sound server, or it can use the sound server that's in your X-Terminal or your Sun or SGI or whatever, if you're running NetAudio.

[...]

>For the pie menus and the multi player interaction stuff, like putting up windows on different screens and letting people have a shared view of this one environment, it was really nice to have the source code to the TCL/Tk toolkit, in order to support that kind of stuff.

>It wouldn't have been possible to port SimCity to X11 using Open Software Foundation's Motif toolkit. It just absolutely sucks. It's not open, and you have to pay for the source code, and it's not being maintained.

>But there's a really wonderful community that's grown around TCL/Tk, and people are allowed to use it in their products for free, and get the source code. I implemented pie menus with TCL/Tk for SimCity, and out of gratitude, I put the source code for the pie menu module out for other people to use, just to help to community. It's a nice positive feedback situation, as opposed to the cold war situation you have with COSE, Motif, and Open Software Foundation.

>We bundled the HyperLook runtime system with the NeWS version of SimCity. If you're running OpenWindows 3.0, you can get it and try it out.

[...]




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

Search: