[L1 ] [L2 ] [L3 ] (no longer access to this second personal site!)
I'm here because I like Tcl! :)
Other languages I like are: C, Scheme, SmallTalk, FORTH, Joy.
Tclwise
I'm writing a book about Tcl programming. Many chapters are online for free, you can find it at http://www.invece.org/tclwise/ .
Random Stuff Advantages of Tcl over Lisp
cfile - object based file I/O for Tcl.
The Tcl IRCd is a little IRC server I wrote in Tcl, the home page and source code are at [L4 ].
The regmap function may be more secure (against malicious user input) and clean than the usual regsub+subst way, at least some time. Please tell me if something like this is already in some well known library.
A different design for Tcl-like languages, with first-class functions: Functions As Values
A let for Tcl: let2 (the let wiki page was already used).
References for Tcl: Tcl References in Tcl (updated version, and C implementation under development)
A Joy stackless/tailrecursive compiler/VM written in Tcl: A Joy implementation in Tcl
lsplit is a useful command ripped from the Joy programming language.
Arity corner cases in math commands (about TIP 174).
Tk code to handle the keyboard in a raw mode. Useful for games or to control real hardware. Uses a trick, don't know if it will work in future or past version of Tcl.
namespace eval RawKeys {} set ::RawKeys::Flag 0 set ::RawKeys::LastEvent {-1 0 -1} set ::RawKeys::Delay 50 proc ::RawKeys::Init {userPressHandler userReleaseHandler} { bind . <KeyPress> [list ::RawKeys::pressHandler %k $userPressHandler] bind . <KeyRelease> [list ::RawKeys::releaseHandler %k $userReleaseHandler] } proc ::RawKeys::pressHandler {keycode userHandler} { variable LastEvent variable Delay variable Flag set Flag 1 set deliver 1 if {[lindex $LastEvent 0] == $keycode && \ ([clock clicks -milliseconds] - [lindex $LastEvent 2]) < $Delay} { set deliver 0 } set LastEvent [list $keycode 1 [clock clicks -milliseconds]] if {$deliver} { $userHandler $keycode } } proc ::RawKeys::releaseHandler {keycode userHandler} { variable LastEvent variable Delay variable Flag set deliver 1 set Flag 0 set LastEvent [list $keycode 0 [clock clicks -milliseconds]] update if {$Flag} { set deliver 0 } if {$deliver} { $userHandler $keycode } } #################################### Example ################################### puts "Enter the blank window and press/release random keys" array set ::pressed {} proc press keycode { set ::pressed($keycode) {} puts "=== pressed $keycode! === ([lsort [array names ::pressed]])" } proc release keycode { catch {unset ::pressed($keycode)} puts "=== release $keycode! === ([lsort [array names ::pressed]])" } ::RawKeys::Init press release