4 ms·
AOLServer is still valid but outdated and so NaviServer is the now the newly active maintained version of AOLServer, taking it back to it's roots. TCL is a fun
by doublerabbit 7y ago
AOLServer is still valid but outdated and so NaviServer is the now the newly active maintained version of AOLServer, taking it back to it's roots.
TCL is a fun language and integrates well with most including perl and python. To be able to call a procedure based on a URL adds none of the frustration that MVC brings that I've found.
If your looking to pick up a new language to toy with; I would recommend TCL as an language to take a poke at. It does have an old unixy feel to it, but I've found it's mature and very solid. OO is also possible.
Nothing could be simpler when everything is a string, it leads you down a path of voodoo and creativity.
proc displayHackerNews {} {
set hn "Hacker News" ;#Set the variable (hn) with "Hacker News"
puts $hn ;#Prints the variable ($hn) to terminal
} ;#end procedure
displayHackerNews ;#execute the procedure
% Hacker News
If statements are easy
set hn ""
if { $hn eq "Hacker News" } { puts $hn } else {
set hn "sad face"
puts $hn
} ;#end if
Loops are fun
set hn "Hacker News" ;#Set a variable
while { $hn eq "Hacker News" } {
puts "$hn" ;# print "Hacker News" to terminal in an infinite loop
} ;#end loop
Multi-threading is a breeze.
set MyThreadID [thread::create {
puts "Hello from my new thread"
thread::wait
} ;#end code-to-run
] ;#end thread
And finally, a if-switch-threaded-loop
set hn "Hacker News"
if { $hn eq "Hacker News" } {set switch "hn" } else { set switch "" }
switch $switch {
hn {
set MyThreadID [thread::create {
proc displayHackerNews {} {set hn "Hacker News" ; puts $hn} ;#end procedure
#set aCounter to zero, if aCounter is < 7 execute displayHackerNews procedure
for {set aCounter 0} {$aCounter < 7} {incr aCounter} { displayHackerNews }
thread::wait
} ;#end threaded-code
] ;#end thread
} ;#end switch-case
default {puts "sad face"}
} ;#end switch
Not a spokesperson, I just like TCL.
NaviServer: https://sourceforge.net/projects/naviserver/ https://sourceforge.net/projects/naviserver/ | https://wiki.tcl-lang.org/page/NaviServer https://wiki.tcl-lang.org/page/NaviServer
TCL/Tk: http://tcl.tk/ http://tcl.tk/ | https://wiki.tcl-lang.org/page/Tcl+Tutorial+Lesson+0 https://wiki.tcl-lang.org/page/Tcl+Tutorial+Lesson+0 | https://www.tutorialspoint.com/tcl-tk/index.htm https://www.tutorialspoint.com/tcl-tk/index.htm
- Pick-A-Hill2019 7y agoThanks for posting your comment, it lead me down a rabbit-hole that might help fill some current downtime. I only took a brief flick through https://www.tutorialspoint.com/tcl-tk/index.htm https://www.tutorialspoint.com/tcl-tk/index.htm but I found it more approachable as a total noob to TCL. As always, ymv & can't vouch for anything on there except it works/looks ok with JS disabled. Thanks, just might add TCL to the skill-set :-)
- arunix 7y agoAny thoughts on why TCL isn't more popular?
- mmcgaha 7y agoset reason [expr $feels + $weird]
- mhd 7y agoThe syntax is quite simple, with only a few rules of evaluation -- too simple for those used to the Algol family, too complex for smug lisp weenies. Then you had the RMS flame war, back when he was still considered influential for programmers. Then they kinda missed the boat when it came to packages. Never got something like CPAN going, whereas Python and Ruby did. I can't remember exactly, but I think there wer some corporate shenanigans, too, with the whole Sun/Scriptics situation and Java stealing its milkshake, weirdly enough. Speaking of siphoning off milkshakes, Lua did this for the scripting part. Syntax that was a bit more regular, implementation that was even easier to embed (and don't get me wrong, Tcl is/was pretty great there). And nowadays, you either get lucky with some specific niche, or it's hard for a dynamic scripting language. I still like it. Heck, I like my Tk bisque, too.
- teddyh 7y agoIt’s stringly typed.
- davidw 7y agoI wrote about that... wow, close to exactly 10 years ago: https://journal.dedasys.com/2010/03/30/where-tcl-and-tk-went-wrong/ https://journal.dedasys.com/2010/03/30/where-tcl-and-tk-went... Still worth a look if you like to learn new stuff though. Tk is neat, and Tcl's C API is still the bees knees in my opinion.
- cafard 7y agoAnd of course try/catch, and the very handy upvar and uplevel. I first encountered TCL via Expect, which was a very useful tool.
- sigzero 7y agoYeah, I think Tcl is a pretty fun language. I like that it is different. I also love the community. There used to be a compiled for Windows version but it doesn't look like it has kept up.
- pwg 7y agoYou can use a TclKit executable as a windows runtime if you like. That makes of a single .exe file 'install' to windows. You can obtain a custom built one here: http://kitcreator.rkeene.org/kitcreator http://kitcreator.rkeene.org/kitcreator