I read that gist today. I really enjoyed it. I think it really demonstrates how well Tcl is suited to making prototypes like that.
Some cool lines I really enjoyed
fileevent $fd readable [list readrequest $fd]
The few cmd_$cmd incantations, along with ::cmdtable, make for nice and clear separation of the request handling code, as well as specifying properties of each of the commands.
TCL is one language that even after all these years, I still love (I learned it in 2000). Combined with its two superpowers – TK and Expect, it is really hard to beat when you want a glue language that is cleaner than shell.
I learned Tcl through Expect, back in like 1998 when I had to manage a large number of serial-connected network devices. I didn’t even know there was a Tcl outside of Expect for the first year or so.
A company I worked at a while back was heavily invested in Tcl and thus I ended up writing a fair amount of it.
I have a habit of naming little experimental scripts “test”. I learned quickly that “test.tcl” was a mistake.
I want to return to Tcl. The most I did with Tcl was back in 2007 within some ns2 simulations. Exercism now has a Tcl track
I briefly flirted with learning Tcl a few months ago, but I struggled to find a concrete project to work on in order to motivate my learning.
Thanks for linking to the Exercism track! I’ll try that :)
Exercism is really nice and the mentors super supportive.
By the way, here is a small, yet concrete project in Tcl: the first version of Redis
You may want to expand on this and make your own caching thing.
I read that gist today. I really enjoyed it. I think it really demonstrates how well Tcl is suited to making prototypes like that.
Some cool lines I really enjoyed
fileevent $fd readable [list readrequest $fd]
cmd_$cmd
incantations, along with::cmdtable
, make for nice and clear separation of the request handling code, as well as specifying properties of each of the commands.Thank you for sharing!
TCL is one language that even after all these years, I still love (I learned it in 2000). Combined with its two superpowers – TK and Expect, it is really hard to beat when you want a glue language that is cleaner than shell.
I learned Tcl through Expect, back in like 1998 when I had to manage a large number of serial-connected network devices. I didn’t even know there was a Tcl outside of Expect for the first year or so.