FF a.k.a. Federico Ferri About me: I am an Italian guy, student in Computer Science Engineering, programmer, newcomer tcl addict, [[...]]. I like to play piano. You can find me on IRC, I identify as ''federico__'' on Freenode. When posting to the wiki (from home) my IP is 83.1xx.x.x (netname is IT-TELE2-ADSL) ---- My projects: * [ResistorFinder]: an utility to quickly find resistors of a specified value, by trying singles, series and parallel combinations, highlighting the better matching one * [MimeTexPreview]: embedding [TeX] formulas into Tcl canvas * [MimeTexBuffer]: as above, plus interactive editing [[''experimental!'']] * [Periodic Table of Chemical Elements] with clickable elements. A tiny example of tDOM/XPath usage. * [TrackerWidget]: a grid/table/spreadsheet like widget * [TemplaTcl: a Tcl template engine] suitable and designed for web page generation (it embeds nicely (and inline!) into HTML/XML documents; WYSIWYG-editor friendly). Really has unlimited uses: I use it also for code generation. * [KeyboardChords]: a simple keyboard chords generator * [PhysicsPlayground]: playing with physics (mechanics)... a little demo * [GetOpt-ish]: my GetOpt'ish library for parsing command line options in GNU style * [TheTwine]: a little game where a bunch of dots are connected by a continous line, and you have to tidy up the mess * [MazeSolver]: the simplest maze-solving algorithm. how a better algorithm could work? * [TclPipes]: the (in)famous game :P My snippets: Since I keep re-coding and re-coding, and asking on #tcl things I (once) know how to do... I'll begin putting here my code snippets, in the hope they will be useful again to me (ah, and to others of course! ;P) * [Canvas moving objects and toggle tags] is a very minimal example on how to make interactive objects in canvas with few code. Relevant features: moveable canvas objects, mouse hover changes style, middle click toggle (moveable) tag. * [Widget Hiding as opposed to Widget Overloading] started as a simple widget with a Tk-like programming interface (would you call that '''gadget'''?) but now it's seriously taking the form of a real useful widget. Stay tuned * [Operations research - Simplex Algorithm] is about linear programming problems * [(buggy) iris animation] -- how to solve such a z-index problem?? It's like the ''Escher's Infinite Staircase'' Random stuff: * '''XChat Plugins''' -- I use XChat and occasionally I write plugins -- (how to: simply put pluginname.tcl into $HOME/.xchat2/ and restart xchat or type /reload) KeepNick.tcl: recovers your nick and re-identifies you after server disconnection. you can now have a list of linked nicknames and freely switch from one to another: set ::nicks_to_keep {FEDE31C0 federico__} set ::nickserv_pw "xxxxxxxxxxxxxx" timer -repeat 30 { if {[lsearch -exact $::nicks_to_keep [me]] == -1} { set nick_to_keep [lindex $::nicks_to_keep 0] /msg NickServ RECOVER $::nick_to_keep $::nickserv_pw /msg NickServ RELEASE $::nick_to_keep $::nickserv_pw /nick $::nick_to_keep /msg NickServ IDENTIFY $::nickserv_pw print "keepnick.tcl: recovered your nickname" } } ChatMap.tcl: list all channels people are in, in addition to current channel set chatmap_chanlist [list] set chatmap_whoisf 0 set chatmap_timerid -1 on 319 channel_list { if {$::chatmap_whoisf} { if {[timerexists $::chatmap_timerid]} { killtimer $::chatmap_timerid } set ::chatmap_timerid [timer 5 { set ::chatmap_whoisf 0; process_chans_end }] process_chans [lindex [split $_rest :] 1] } } proc process_chans_begin {ul} { set ::chatmap_chanlist [list] set ::chatmap_whoisf 1 foreach u $ul {/whois $u} } proc process_chans {l} { foreach chan $l { if {[lsearch -exact $::chatmap_chanlist $chan] == -1} { lappend ::chatmap_chanlist $chan } } } proc process_chans_end {} { print "channels found: $::chatmap_chanlist" } alias channelspy { set fields [lindex [users] 0] foreach record [users] { if {$record == $fields} {continue} lassign $record {*}$fields lappend r $nick } process_chans_begin $r complete } ---- Quote: ''There are never any bugs you haven't found yet.'' ---- I thought, when I first saw the title of this page, it was going to be about Marvel's "Fantastic Four"... sigh. Wonder if Reed Richards embeds Tcl into his devices to beat Doom, etc. ''[escargo]'' - Wouldn't an extension of a different existing language be more likely, namely Fantastic [Forth]? ---- [Category Person]