"antirez" on the chat
[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.
I'm the author of The Jim Interpreter. A small footprint implementation of the Tcl programming languages with more support for functional programming and other differences. You can find more information about Jim in the Jim page of this wiki or in the Jim home page at http://jim.tcl.tk/
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
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 ################################### catch {console show} 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