4 Oct 2004 davidw   » (Master)

apenwarr: if I were writing a program like that I would:

1) Create the whole thing in Tcl.

2) Check for bottlenecks.

3) Rewrite in C.

4) Go back to #2 and continue iterating as needed.

Tcl (and Python) have nice C API's that let you easily (IMO at least) communicate between C and Tcl. So what you could end up with is Tcl as the language that commands the fast bits, which are all in C. That way, you can easily switch around details of how things work (do this now, then this), and keep things fast.

At least that's the theory... I've seen it work pretty well in practice, too. Tcl is pretty reliable... I know people who are using it for industrial control systems that need to run for months at a time. It's not as fancy as some languages out there, but it's written very well and a lot of effort goes into making sure nothing breaks.

As far as Erlang, after having worked with it - what I don't like about it is that it has a tendency to want to be "the world", whereas something like Tcl plays very well with C or other languages, and the outside world in general. Very few languages can get away with this attitude, in my opinion. C and C++.... Java is seemingly making a go of it. Lisp tried (think Lisp machines) and failed, although the language itself is not a failure.

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!