4 ms·
Is Tcl still relevant with the momentum that Lua has gained?
by phamilton 11y ago
Is Tcl still relevant with the momentum that Lua has gained?
- zaf 11y agoWell, Lua is moving fast and is lightweight and Tcl is a heavyweight and moving slow. So the momentum is about the same and therefore both are relevant.
- phamilton 11y agoBut isn't the whole point of Tcl to be a lightweight embedded scripting language? No doubt it's not going to be dethroned in any way from the numerous industry tools (most CAD systems support it for example) but if you want to embed a scripting language, is there any reason to use Tcl over Lua these days?
- Nashenas 11y agoTcl was never lightweight. If you know how it works internally, you know that it consumes more memory and more processing time than most other scripting languages. As an example, a few years back some coworkers and I were interviewing a candidate and he used a lookup take to avoid having to constantly calculate sin and cos. We wrote some tests to discover what the performance improvement was and found out there was none. It was slower to read a value out of an array than it was to calculate the sin or cos of a value. Tcl might have been a good option back in the day, but they just don't keep up with everyone else, both in terms of performance and feature set.
- sigzero 11y ago> a few years back Have you even looked at it recently? Just curious.
- a8da6b0c91d 11y agoI would assume caching calls to sin/cos wouldn't be performant in any language, including C.
- wrenky 11y agoThats simply not true. Tcl was pretty heavy in the 90s, but its always been comparable to Perl, and slightly better than python. I would be EXTREMELY curious to see what TCL version you were running, and for what values of sin/cos. EDIT: Here is a benchmark that shows TCL/Lua both in a good light for hash table lookups. http://playcontrol.net/opensource/LuaHashMap/benchmarks.html http://playcontrol.net/opensource/LuaHashMap/benchmarks.html
- michaelsbradley 11y agoExpect is still pretty nice: http://www.nist.gov/el/msid/expect.cfm http://www.nist.gov/el/msid/expect.cfm Exploring Expect by Don Libes, the principal author of Expect, is a classic among tech books: http://shop.oreilly.com/product/9781565920903.do http://shop.oreilly.com/product/9781565920903.do
- cafard 11y agoThat's why I learned Tcl. It's far from the only thing I used Tcl for...
- michaelsbradley 11y agoPerhaps it's a matter of "too little too late" to have a significant effect on Tcl's adoption rate, but in versions 8.5[1] and 8.6[2], Tcl gained a number of language-level features that, as a language, seem to put in on the same level as ES6 and other modern scripting languages. Highlights include lambdas, coroutines and stackless evaluation. [1] http://www.tcl.tk/software/tcltk/8.5.html http://www.tcl.tk/software/tcltk/8.5.html [2] http://www.tcl.tk/software/tcltk/8.6.html http://www.tcl.tk/software/tcltk/8.6.html
- mhd 11y agoFor what domain? In games, Lua was always dominant, and in the browser space JavaScript is about as entrenched as it can be... On the other hand, there are enough applications in enterprise and manufacturing where Tcl/Tk applications run happily along and there's no good reason to replace them. Your nuclear power plant might have a neat little charts GUI done with Tk's canvas and Tcl scripts to tie all kinds of sensors and gauges together. Your automotive supplier might still do CAD/CAM file conversion/distribution/deployment with a Tcl server. For new applications, it's probably a hard sell these days. Don't get me wrong, I personally think it's a great little system, especially when you're in an 'ivory tower' situation where you control the whole setup and don't need a lot of interop middleware and libraries. It's easy to create simple GUIs for all kinds of tasks and I've rarely seen systems that make it easier to leverage 'non-programmers', i.e. get some user scripting done. For ugly, dirty hack jobs like web programming, I'd rather go with something more standard or -- if I feel inclined to reinvent the wheel -- with something more powerful and/or rigid (whether that's CL, Haskell or Ada...). Although weirdly enough, web client programming is certainly something that checks both the 'ivory tower' and 'non-programmer' boxes...
- a8da6b0c91d 11y agoI think it's still superior for equipping tools with a REPL. Say you're making something that has smart users who won't freak out about typing commands and editing a complicated config file to achieve advanced results, then it makes great sense. Tk seems pretty pointless now. Wx obviates it, in my opinion.
- mhd 11y agoApart from maybe Shoes, I've yet to see something that approaches Tk's whipupitude, which is a great benefit for adding some small dialog or report window to a script. And its Canvas was great for data visualisation. It was hard to get something really good-looking out of it, but if you want to draw a picture of the machines in your manufacturing plant with a item count and on/off switch next to each... Dunno about Wx. Last time I looked at it, it was a horrible morass of classes and constants that actually made me long for Swing...