6 ms·
Tcl is pragmatic. I still use it for one-off projects with simple GUIs via Tk. I get grief from co-workers for the language, but my projects are typically done
by kingmanaz 12y ago
Tcl is pragmatic. I still use it for one-off projects with simple GUIs via Tk. I get grief from co-workers for the language, but my projects are typically done and correctly functioning in a fraction of the time it takes our Java and C# devs to even prototype a utility.
Below is a walkthrough of Tk which compares identical implementations of examples in Pearl, Ruby, Python, and Tcl. See if you can spot which of the scripting languages are more concise. Hell, I'd even call Tcl more readable in most of the cases:
http://www.tkdocs.com/tutorial/ http://www.tkdocs.com/tutorial/
Kudos to the author of Tänzer for doing his part to keep the oft-overlooked Tcl alive.
- xantronix 12y agoHer part =) The problem with humble and beautiful people and things is that, being of such a disposition, one is often not wont to market and self-promote, something I find to be quite endemic of the ever decreasing Tcl community. However, since I've decided to crush my Impostor Syndrome with a pointy heel, I've determined that there's no reason to be shy any longer. Nothing good comes of faulty and detrimental meekness. Therefore I am creating this grandiose and megalomaniac caricature of myself and a web server framework to show the world that, just because a thing isn't well-marketed, that it doesn't deserve to exist, by, well, solving the bootstrapping problem of insufficient marketing. And maybe making some lovely software in the meantime. I think I could go on and on for hours about the technical benefits of Tcl, and even make a non-ironic shit-eating grin through an explanation and ownership of some of its flaws (for instance, lack of garbage collection in TclOO), but I'd like to think this whole hootenanny makes a good object lesson in uniting people and spirits in joyous community and technical excellence. TkDocs.com is a great resource, by the way, and is something I'm taking cues from for writing some more in-depth tutorials and "Getting Started" guides and cookbooks for tänzer. Speaking of which, if you or anyone else you know have any interest and time in helping me with my honey-do list (because "issue tracker" doesn't have that "je ne sais quois" I'm looking for here), that'd be absolutely bloody brilliant. Thanks for your love!
- helmut_hed 12y agoI tried to find you on Twitter, and it corrected my search to "mantronix". No joke. Anyway thanks for sharing your code!
- xantronix 12y agoHehe, wow. It's actually xan_tronix. I'll update my HN bio!
- jerf 12y agoThat's cheating a bit, since it's comparing the other three languages via their binding to Tk, and bindings always introduce impedance mismatch. Tk was built and designed to bind to Tcl. For instance, in one example I happened to look at, the article discusses how to create a text widget that binds to a string. Since Python strings are immutable, in Python you have to create an extra StringVariable and pass that in, whereas in Tcl it's just a single line that binds a variable. But the fact that Python is a bit klunkier on this specific task hardly says anything about the relative strengths of either language in general.
- draegtun 12y agoThis is a (near) duplicate of a comment you made 302 days ago! - https://news.ycombinator.com/item?id=7069311 https://news.ycombinator.com/item?id=7069311
- kingmanaz 12y agoYup. Still stands.
- draegtun 12y agoOK but if you copy/paste those lines again it might be worth fixing that "Pearl" typo :) Since we've gone off-topic I thought it might be good to post the same Rebol code from that old thread but updated to use the new R3-GUI dialect: Rebol [ title: "Feet to Metres" ] load-gui ;; needed while r3-gui is in beta convert-to-metres: func [in-feet] [ (round 0.3048 * in-feet * 10000.0) / 10000.0 ] default-feet: 1 stylize [ end-label: label [ facets: [align: 'left] ] ] view [ hpanel 3 [ pad feet: field 80 (to-string default-feet) end-label "feet" text "is equivalent to" in-metres: text (to-string convert-to-metres default-feet) end-label "metres" pad pad button "calculate" on-action [ set-face in-metres to-string convert-to-metres to-decimal get-face feet ] ] ]