Re:Tcl for Web Nerds (2011)
by 7373737373 on Wednesday October 28, 2020 @07:57AM
(#24917711)
I like Tcl for its sandboxing capabilities: "Tcl added sandboxed subinterpreters in a bid to become a safe web scripting language. The plan didn't work out but it is a killer feature for untrusted input."
Re:Tcl for Web Nerds (2011)
by VBprogrammer on Wednesday October 28, 2020 @10:30AM
(#24919113)
It was a long time ago but TCL was the only time in my career where I had to worry about nonsense like double substitution causing arbitrary code execution or numbers being passed with a 0 prefix being handled as octal. It was a pain in the backside.
Re:Tcl for Web Nerds (2011)
by phaedryx on Wednesday October 28, 2020 @10:59AM
(#24919498)
Wow, this takes me back. My first job used OpenACS and AOLServer. We ended up converting everything to Ruby on Rails (1.16) because development had slowed so much and it was hard to find new developers, documentation, and other resources.
Re:Tcl for Web Nerds (2011)
by ufo on Wednesday October 28, 2020 @10:23AM
(#24919026)
One thing that annoyed me a bit with Tcl is that tclsh doesn't come with readline support, meaning you can't go back to previous commands using the up arrow. However, you can work around that using rlwrap.
Re:Tcl for Web Nerds (2011)
by snazz on Wednesday October 28, 2020 @12:29PM
(#24920736)
I wish more permissively-licensed projects used libedit instead of requiring their users to use rlwrap. It could be a simple choice for package maintainers at compile-time.
Re:Tcl for Web Nerds (2011)
by dmux on Wednesday October 28, 2020 @11:30AM
(#24919894)
I would also highly recommend Greenspun's Software Engineering for Internet Application ("SEIA") [0] and in particular the metadata section of that book [1] wherein he goes over defining an ontology of a system, implementing a metadata model in SQL and then generating code based on that metadata model.
Re:Tcl for Web Nerds (2011)
by ovi256 on Wednesday October 28, 2020 @11:01AM
(#24919522)
For anyone not familiar with Philip Greenspun (he of Greenspun's Tenth Law fame) this is a good example of this writing and humor:
> e.g.,
(set! ten-factorial (factorial 10))
(set! checking-account-balance (+ 25 34 86))
(print "If you're so smart, why aren't you rich like Bill Gates?")
will set ten-factorial to the result of evaluating the factorial procedure with an argument of 10, then compute a graduate student's checking account balance, then print out some career advice to a computer science graduate student.
Re:Tcl for Web Nerds (2011)
by cmacleod4 on Thursday October 29, 2020 @09:47AM
(#24930416)
This is pretty old, but still has some useful introductory info. Be aware that the documentation links point to Tcl 8.4 which is now obsolete, the current version is Tcl 8.6.
- https://news.ycombinator.com/item?id=23145448
http://jim.tcl.tk/index.html/doc/www/www/
TCL was certainly an interesting language.
[0] https://philip.greenspun.com/seia/
[1] https://philip.greenspun.com/seia/metadata
> e.g., (set! ten-factorial (factorial 10)) (set! checking-account-balance (+ 25 34 86)) (print "If you're so smart, why aren't you rich like Bill Gates?") will set ten-factorial to the result of evaluating the factorial procedure with an argument of 10, then compute a graduate student's checking account balance, then print out some career advice to a computer science graduate student.
For a simple contemporary Tcl/web framework, take a look at Wapp - https://wapp.tcl.tk/home/doc/trunk/README.md