Hacker News new | past | comments | ask | show | jobs | submit login

John Ousterhout realized that every single EDA tool at Berkeley wound up implementing a crappy extension language. So, he implemented a language so that there could be a single, not-so-crappy extension language for the Berkeley EDA tools. He made C integration particularly easy (something the lisps of the time didn't really do). As his students spread out, each company they hit had a shitty extension language and they lobbied to get it replaced with Tcl and thus Tcl spread.

The issue with languages is that memory, CPU, and disk in the early 1990s are still fairly expensive. You need a language that is small yet still complete. Even today, the only languages that really fit that bill are Scheme/Lisp, Tcl, and Forth.

The memory limitations releasing are why you see the "stringly-typed" scripting languages like Tcl, Perl, etc. from the late 1980s transition to "dynamically typed" languages in the 1990s like Python, VB, later Ruby, Javascript, etc.

Tk popped up because GUI development at the time was utter shit (web doesn't exist, VB6 doesn't exist, etc.). It is really hard to describe just how much better Tk was than anything else in the time frame.






> It is really hard to describe just how much better Tk was than anything else in the time frame.

This[0] vs (from memory w/o a computer atm…):

  #!/bin/env wish
  button .b
  .b configure -text “push me” -action {puts “don’t push me!”}
  pack .b

[0] https://users.cs.cf.ac.uk/Dave.Marshall/X_lecture/node5.html...

======

  #include <Xm/Xm.h> 
  #include <Xm/PushB.h>

  /* Prototype Callback function */

  void pushed_fn(Widget, XtPointer, XmPushButtonCallbackStruct *);


  main(int argc, char **argv) 

  {   Widget top_wid, button;
    XtAppContext  app;
   
    top_wid = XtVaAppInitialize(&app, "Push", NULL, 0, &argc, argv, NULL, NULL);

    button = XmCreatePushButton(top_wid, "Push_me", NULL, 0);
     /* tell Xt to manage button */
   XtManageChild(button);
         
  /* attach fn to widget */
    XtAddCallback(button, XmNactivateCallback, pushed_fn, NULL);

    XtRealizeWidget(top_wid);    /* display widget hierarchy */
    XtAppMainLoop(app); /* enter processing loop */ 

  }

  void pushed_fn(Widget w, XtPointer client_data, XmPushButtonCallbackStruct *cbs) 
  {   
     printf("Don't Push Me!!\n");
  }

-command instead of -action, but otherwise perfect! :)

I also used the wrong path for /usr/bin/env ;)

> You need a language that is small yet still complete. Even today, the only languages that really fit that bill are Scheme/Lisp, Tcl, and Forth.

Lua?

It's used in (and used for?) a lot of embedding:

* https://en.wikipedia.org/wiki/Lua_(programming_language)


Tcl was 1988. Lua was 1993.

Lua is quite a bit larger than Tcl. In addition, no two Lua installations can ever agree on which modules they require (which makes the actual Lua binary even bigger).


Larger? On my system libtcl8.6.so is 1.7 megabytes and liblua5.1.so is 192 kilobytes. It's not even close. Lua uses libraries / modules based on where you tell the interpreter they are located, so that's on you.

Set package.path and package.cpath correctly.


You are comparing 2024 versions.

Go find the original tarball versions from 1990 (maybe you have to go to Usenet sources!). Tcl was small.


Ah, you used "is" and not "was" in your original post.

I wonder if TCL 2.1 will compile with modern gcc?


That would probably be painful. It's old-style C.

Better to start with Jim Tcl or Picol.

Even something like Tiny Tcl would be a better start (I think it fit in 64K).


> You need a language that is small yet still complete. Even today, the only languages that really fit that bill are Scheme/Lisp, Tcl, and Forth.

Maybe Io or REBOL fall into this category as well...? Or Logo...


HyperCard existed.

Big missed opportunity for Tcl was the lack of a solid version of Tk for classic Mac (30 years ago). Would have made early Python less essential.


Tk was pretty usable for tcl/tk use cases on Mac by later 7.x releases, say 1996 or so. Still hard to get a really native UX on Windows or Mac though. HyperCard was already on its way out. 30 years ago is maybe closer than you think?



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

Search: