Archive for March, 2011


Around 1997 I had did quite a bit of programming in the Tcl language, as part of an IDE project at Cygnus. The project failed, for several reasons, but here I’m going to write about Tcl.

I don’t hear much about Tcl these days, although it was fairly popular in its day. Tcl is a highly dynamic interpreted language. It is easy to embed the Tcl interpreter into a C program. The Tk system, which is written in Tcl but is logically independent of it, is a very clever way to easily write a GUI program. Unfortunately, despite these advantages, Tcl is a mess of a language.

In Tcl, everything is a string. Tcl has list and associative array operations, but they all operate on strings with a specific syntax. The program itself is a string: you could construct new procedures on the fly, and annotate variables. This makes the language very powerful. It also makes it very confusing.

When everything is a string, type checking is completely impossible. It’s very easy to have a list and accidentally use a string operator on it. Everything will work fine, except you won’t be able to pull out the list values as expected. You might think that is not so bad–after all, in Lisp everything is a list, and that works well. But in Lisp, atoms are not lists, and atoms have a type: you can’t apply a string operator to a number. In Tcl the atomic unit is the character, and that doesn’t have a type. Applying a string operator to a number works fine, because a number is just a string of characters which happen to be digits. So when I say that type checking is impossible, I don’t just mean the ordinary lack of static type checking for a dynamic language. I mean that even at runtime there is no type checking.

Because everything is a string, quoting becomes essential. Tcl has various quoting mechanisms: double quotes create a simple string, square brackets create a string formatted as a list which is then normally executed as code, curly braces create a string formatted as a list which is not executed. Within a string, square bracketed lists are executed and variables with a leading dollar sign are interpolated. I’m sure I’m forgetting some aspects. Within such an environment, a detailed understanding of quoting becomes essential. Unfortunately, the only comprehensible way to quote actually involves using square brackets to invoke the list function. In other words, although everything is a string and it should be very easy to stick things together when that is what you want to do, in any scenario which is even slightly complex you have to start writing list operations in order to build your strings. Even then I recently wrote some Tcl code with seven consecutive backslashes, admittedly in a complex use case. That’s too much for easy reasoning, and in practice requires trial and error to get right.

I believe that Tcl has namespaces these days, but when I used it did not. That made it a poor choice for programming in the large, because all functions and variables lived in the same namespace. Because everything is fully dynamic, redefining a procedure causes no error. You don’t discover a namespace collision when you load the program, you only discover it when trying to figure out what went wrong.

The Tk system, as I mentioned, is a very clever way to write a GUI. it lets you write very simple code with windows and buttons and text input and so forth. These days most people would write some HTML and run it in a web browser, but Tk is a more powerful environment, and you can write everything in the same language, unlike the browser’s mix of HTML, Javascript, and server-side PHP or whatever. Tk is cross-platform.

Unfortunately, Tk too has a fatal flaw: because your GUI is produced by a simple program, your programmers have to change your GUI. When a UI designer wants to move a button, the only way to do it is to change the program. And Tk’s layout procedure does a lot for you automatically, which in practice means that it’s a pain to do anything else. The effect is that a Tk program always looks OK but never looks good. This effect is exacerbated by the fact that a Tk program looks kind of the same on any platform, which means that it looks unusual on any platform. For our IDE work we spent a fair amount of time building Tk interfaces to standard Windows objects, so that the programs would look sort of OK on Windows. In other words, Tk winds up being a great prototyping system, but a terrible system to use for your final program.

Despite all these awful characteristics, I have to say that the actual Tcl implementation is great. It’s platform independent, has a nice event loop, the code is easy to read and easy to modify. The core library provides system independent facilities which are well designed and well implemented. Unfortunately a good implementation can not overcome a poorly designed language.

So there you have it: a brief overview of language design gone wrong.

Comments (8)

The Nice Guys (2016) Full Episodes Watch Online

The Nice Guys (2016) Free Latest Films, Full Movie Online Watch Free, Free Movies Streaming, English Subtitles Full HD.

‘The Nice Guys’ is great film tell story about A private eye investigates the apparent suicide of a fading porn star in 1970s Los Angeles and uncovers a conspiracy. This film have genre Action, Crime, Mystery, Comedy, Thriller and have 116 minutes runtime.

Yaya DaCosta as Tally, Ryan Gosling as Holland March, Russell Crowe as Jackson Healy, Angourie Rice as Holly March, Margaret Qualley as Amelia Kuttner, Matt Bomer as John Boy.

The Director of this film is Shane Black. The movie The Nice Guys is produced by Misty Mountains, Nice Guys, Silver Pictures, Bloom, Waypoint Entertainment and released in May 15, 2016

Similar Movie
The Nice Guys have some related movie, The Hunger Games: Catching Fire, The General’s Daughter, Se7en, Taken 3, Now You See Me, Sherlock Holmes

Watch Full Movie The Nice Guys (2016)

You can enjoy to watch movie in theater or by streaming in HD quality by following link on this page. If you don’t have account, you can register for FREE to make sure our visitor is human. After register you can Watch or download this movie with high quality video.

Incoming search term :

The Nice Guys Watch Online
The Nice Guys English Full Episodes Free Download
The Nice Guys Free Online
Watch The Nice Guys 123movies
Watch The Nice Guys Online Free megashare
Watch Stream Online The Nice Guys
The Nice Guys Free Download
The Nice Guys Watch Online
The Nice Guys Episodes Online
The Nice Guys Free Online
The Nice Guys For Free online
Watch The Nice Guys Online Putlocker
The Nice Guys English Episodes
Watch The Nice Guys Online Viooz
The Nice Guys HD English Full Episodes Download
Watch The Nice Guys Online Putlocker
Watch The Nice Guys Online Free Viooz
The Nice Guys Full Episode
The Nice Guys English Full Episode Online
The Nice Guys English Full Episodes
The Nice Guys English Episode
The Nice Guys English Full Episodes Watch Online
The Nice Guys English Full Episodes Online Free Download
The Nice Guys For Free Online
Watch The Nice Guys Online Free
The Nice Guys Full Episodes Online
The Nice Guys English Episodes Free Watch Online
The Nice Guys Online Free Megashare
The Nice Guys English Full Episodes Download
The Nice Guys Episodes Watch Online

Comments (9)

8 1/2

My favorite movie has long been Fellini’s 8 1/2. It’s a movie which seems designed to appeal to a computer programmer: it’s self-referential and recursive, a movie about the making of itself. It’s also about the difficulties of the creative process, and that is where it resonates most strongly with me. The director in the movie, Guido, is struggling to create something beautiful, and is winding up with a mish-mash of scenes, some of which mostly succeed and some of which mostly fail. Fellini, the real director, is struggling with the same thing, with the same results.Watch Full Movie Online Streaming Online and Download

It’s the same thing I feel when I write a computer program. I start out thinking that this program will be beautiful, will do what it needs to do cleanly and elegantly. In the end there are a few successes and many failures, and the whole thing is deeply compromised and unsatisfactory. I never really like revisiting my old programs, because although there is the occasional moment of appreciation for how smart I was for a short bit, there is mostly the recollection of how the whole thing never really pulled together the way I wanted.

Fellini, of course, does pull together 8 1/2 at the end, and the movie becomes something beautiful, if not perhaps quite what he or Guido set out to make. But then Fellini is a great artist, and I am not.

Comments (2)


It’s interesting that the U.S. economy has moved away from manufacturing at the same time as computers have made it very easy to copy digital goods. We see the U.S. pushing China hard to enforce their copyright laws, because much of what the U.S. has to sell is easily copied. The U.S. has developed great skill at creating complex software. That skill itself is not easily copied, based as it is on many years of experience, but the end result of applying that skill is is difficult to control. Similarly, the U.S. leads the world in developing entertaining movies, but those too can not be controlled once they have been distributed. You can enforce all the copyright laws you want, but if a digital product is both expensive and desirable, it will inevitably be copied.

Software developers have reacted by increasingly tying software to some sort of service. That is a significant business advantage for offering cloud computing: your software works without requiring distribution, which means that nobody can easily copy it. If you’re going to sell virtual goods rather than manufactured ones, it’s important to not distribute them as part of using them. In other words, you have to sell a service.

Right now the U.S. is trying to push other countries to honor the agreements it needs to sell virtual goods. I don’t see how that can work in the long run. Better to focus on selling real goods or selling services. A simple service is vulnerable to competition, but there is plenty of space for selling complex services which are difficult to develop. That seems to be the likeliest trend for successful software companies going forward. It’s even if a possible path for entertainment companies if you think in terms of games.

Comments (5)