ruby-lang
March 9th, 2006, 02:50 PM
I saw the link floating around for the <span class="caps">IRC</span> client written in <a href="http://wiki.tcl.tk/13129">38 lines of Tcl</a> and I just wondered. Obfuscation is so lackluster this season, so here’s a clone in nice, clean 70-something lines instead.
The code is here: <a href="http://whytheluckystiff.net/ruby/smircer.rb">smircer.rb</a>.
It uses the <span class="caps">FOX</span> bindings by Lyle Johnson. It’s a great library, but I couldn’t figgr how to italicize only portions of the blamin text.
The Tcl example is much more interesting than this one, though, because Tk fits Tcl so well. Ours will be much better once:
<pre>
class SmIrcer < FXMainWindow
dimensions 600, 400
add_vertical_frame :layout => :fill do
add_text :text => [:readonly, :wordwrap], :layout => :fill
add_text_field :frame => [:sunken, :thick], :layout => :fill_x
end
end
</pre>
<a href="http://redhanded.hobix.com/bits/smircerCloneOfTheLittleTclIrcClient.html" target="_blank">http://redhanded.hobix.com/bits/smircerCloneOfTheLittleTclIrcClient.html</a>
The code is here: <a href="http://whytheluckystiff.net/ruby/smircer.rb">smircer.rb</a>.
It uses the <span class="caps">FOX</span> bindings by Lyle Johnson. It’s a great library, but I couldn’t figgr how to italicize only portions of the blamin text.
The Tcl example is much more interesting than this one, though, because Tk fits Tcl so well. Ours will be much better once:
<pre>
class SmIrcer < FXMainWindow
dimensions 600, 400
add_vertical_frame :layout => :fill do
add_text :text => [:readonly, :wordwrap], :layout => :fill
add_text_field :frame => [:sunken, :thick], :layout => :fill_x
end
end
</pre>
<a href="http://redhanded.hobix.com/bits/smircerCloneOfTheLittleTclIrcClient.html" target="_blank">http://redhanded.hobix.com/bits/smircerCloneOfTheLittleTclIrcClient.html</a>