Personally, I know Lua and Python very well but I still used TCL a few years ago for something very specific: using ODBC on Windows. I gave more details on the Lua mailing list here: http://lua-users.org/lists/lua-l/2021-01/msg00067.html
Why? Please elaborate. I've heard others say this, but would like to know more.
>Besides that, in the past I used it in production for intranet database entry applications.
GUI apps?
CLI applications typically read text from stdin and write text to stdout. The tcl model of "everything is a string" makes exactly the right abstraction to create GUI frontends for CLI applications rapidly and keep them simple at the same time.
Tk's GUI object model is sitting at a reasonable maxima between trivial to make use of vs. triggering the events necessary to make the GUI active.
Small example. You want a button on your GUI that triggers a procedure called "process" when it is clicked, this is the code you need (if you are fine with the remaining defaults) (and assuming you used 'pack' as the geometry manager):
button .process -text "Process Entries" -command process
pack .process -side top
And a fully active GUI button will now appear at the bottom of your Tk window, with a label of "Process Entries" and when you click it, a Tcl procedure named "process" will be executed.I was looking into this for v9 and gave up on finding a binary which was:
- easily found
- agreed upon as the one to use
- available for and easy to install on all three platforms
Should I look again?
For jimtcl (the production-ready minimalistic tcl implementation which antires started (with full closures & gc'able lambdas) - probably an outgrowth of picol), you can get static "(some) batteries included" binaries at:
https://github.com/dbohdan/jimsh-static
For full tcl with the kitchen sink, bathtub & shower included, for android (hence the name) & regular Linux:
I think it's slowly being replaced there by Python, but it's very slow.
The process of replacing Tcl, or Python itself?
And its coroutines + built in event loop makes for really nice seamless async style programming.
> https://github.com/HexFiend/HexFiend/blob/master/templates/T...
f # first word in TCL command line is a command
rather than
f ();
if there was also a function called g, i like to do things like
set a f
$a # calls f
so i can now
set a g
$a # calls g
cool i think.