<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6159470847873828659</id><updated>2011-09-17T05:59:56.345-05:00</updated><category term='rubyconf'/><category term='linux'/><category term='ruby'/><category term='activerecord'/><category term='oss'/><category term='hotmail'/><category term='java'/><category term='cygwin'/><category term='drb'/><category term='erlang'/><category term='tux'/><category term='metaprogramming'/><category term='camping'/><category term='fedora'/><category term='gnu'/><category term='raleigh.rb'/><category term='open source'/><category term='kino'/><category term='hpricot'/><category term='vnc'/><category term='freedom'/><category term='ruby curb hpricot'/><category term='meta programming'/><category term='mutt'/><category term='pitivi'/><category term='denver'/><category term='git'/><category term='FUDcon'/><category term='unix'/><category term='kernel'/><category term='GEB'/><category term='dsl'/><category term='windows'/><category term='vim'/><category term='machanize'/><category term='jruby'/><category term='ubuntu'/><category term='slashdot'/><category term='closures'/><category term='erlounge'/><category term='laptop'/><category term='svn'/><category term='gstreamer'/><title type='text'>exawkuser</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://exawkuser.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://exawkuser.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>brenton</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://bp1.blogger.com/_E73ULx6FtrY/R9KuyOvV9wI/AAAAAAAAAoM/RsCk5Agp1Fc/S220/n500029382_9615.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>43</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6159470847873828659.post-6094196602038995725</id><published>2008-11-11T08:47:00.011-05:00</published><updated>2008-11-11T09:58:24.204-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='slashdot'/><category scheme='http://www.blogger.com/atom/ns#' term='rubyconf'/><title type='text'>The Slashdot faithful and loving languages</title><content type='html'>Lately I'd say I've been reading roughly 1 out of every 20 Slashdot articles that come through my feedreader.  And when I say "reading" I mean reading _all_ the comments.  As any other Slashdot aficionado can tell you, there are often hidden diamonds of anonymous nerdiness buried within the rough of fanboy excrement that can be found in no other place.  That's what keeps me&lt;br /&gt;coming back I guess.&lt;br /&gt;&lt;br /&gt;Yesterday an article mentioned Ioke which caught my attention mostly for being a brainchild of Ola Bini. To no surprise of my own, the best part of this post was the comments.&lt;br /&gt;&lt;br /&gt;In one corner you have Ola Bini, a prolific self-trained hacker, author and speaker, talking about what he does in his spare time and how he has a a roughly working new language that has some interesting features (for some definition of "interesting").  In the other you have a sea of nerds who Just Don't Get It.  Ola is not trying to create yet another language whose documentaion will clutter blogs and a bookstore near you.  He's just having fun.&lt;br /&gt;&lt;br /&gt;While he is a promenent member of the Ruby community, I definitely wouldn't label him as a Ruby programmer any more than I would label him a Blub programmer.  He, like most of the people I know in the Ruby community, loves computer languages.  I started to understand this at RubyConf last year when &lt;a href="http://www.flickr.com/photos/john_lam/1910968816/"&gt;Matz showed off his Python shirt&lt;/a&gt; during the keynote.  This year he spoke again of his love for (almost) all computer languages while Dave Thomas proclaimed that now is the time to fork ruby (for reasons no Slashdot pundit would understand).  I highly recommend Dave's keynote to anyone who's interested in why we program computers.  I suspect it will eventually be available at this link: http://rubyconf2008.confreaks.com/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6159470847873828659-6094196602038995725?l=exawkuser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://exawkuser.blogspot.com/feeds/6094196602038995725/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6159470847873828659&amp;postID=6094196602038995725' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/6094196602038995725'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/6094196602038995725'/><link rel='alternate' type='text/html' href='http://exawkuser.blogspot.com/2008/11/slashdot-faithful-and-loving-languages.html' title='The Slashdot faithful and loving languages'/><author><name>brenton</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://bp1.blogger.com/_E73ULx6FtrY/R9KuyOvV9wI/AAAAAAAAAoM/RsCk5Agp1Fc/S220/n500029382_9615.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6159470847873828659.post-8737471953551131903</id><published>2008-08-12T09:38:00.013-05:00</published><updated>2008-08-13T16:38:28.877-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='fedora'/><title type='text'>Ruby 1.8.7</title><content type='html'>I  must say I'm a bit worried by the 1.8.7 release.  The only reason I even care out about it is because I recently was bitten by &lt;a href="https://bugzilla.redhat.com/show_bug.cgi?id=458475"&gt;a bug&lt;/a&gt; in 1.8.6p230 that, as of the time of this blog entry, is the latest version in Fedora.  Quite frankly I am surprised whenever Fedora decides not to ship the latest "stable" upstream package which is why I took the time to understand &lt;a href="http://groups.google.com/group/comp.lang.ruby/browse_thread/thread/6f7d91193fe1c06a"&gt;the state of 1.8.6&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I think the main problem is that the goal for 1.8.7 is unclear, at least from the community's perspective.  Contrast this situation with 1.9--a release I'm actually excited about.  There are plenty of people telling you &lt;a href="http://www.intertwingly.net/blog/2008/07/24/Ruby-1-9-What-to-Expect"&gt;what to expect&lt;/a&gt; from 1.9.   Matz talked about  it at RubyConf last year.   There's even a &lt;a href="http://www.pragprog.com/titles/ruby3/programming-ruby-3"&gt;beta book&lt;/a&gt; out about it now.&lt;br /&gt;&lt;br /&gt;In short, 1.9 represents the correct way to work with the community to move a platform forward.  Namely, coupling core changes that likely break the &lt;span style="font-style: italic;"&gt;killer apps&lt;/span&gt; with features that entice developers to go through the effort of porting their code.  1.8.7 needs as many eyes looking over it as possible and it's just not attracting them in my opinion simply because the community doesn't see a reason to &lt;span style="font-style: italic;"&gt;upgrade&lt;/span&gt;.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;while(burn :me)&lt;br /&gt;desire_to_upgrade = ignore(:version =&gt; :latest_stable)&lt;br /&gt;raise if desire_to_upgrade.nil?&lt;br /&gt;end&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6159470847873828659-8737471953551131903?l=exawkuser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://exawkuser.blogspot.com/feeds/8737471953551131903/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6159470847873828659&amp;postID=8737471953551131903' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/8737471953551131903'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/8737471953551131903'/><link rel='alternate' type='text/html' href='http://exawkuser.blogspot.com/2008/08/ruby-187.html' title='Ruby 1.8.7'/><author><name>brenton</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://bp1.blogger.com/_E73ULx6FtrY/R9KuyOvV9wI/AAAAAAAAAoM/RsCk5Agp1Fc/S220/n500029382_9615.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6159470847873828659.post-4080798390573900663</id><published>2008-04-09T19:05:00.004-05:00</published><updated>2008-04-09T19:11:45.983-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='fedora'/><title type='text'>Shell History Meme</title><content type='html'>&lt;pre&gt;/me is thrilled svn isn't anywhere on this list.&lt;br /&gt;&lt;br /&gt;[bleanhar@tumbolia ~]$ history | awk '{a[$2]++ } END{for(i in a){print a[i] " " i}}'|sort -rn|head&lt;br /&gt;418 git&lt;br /&gt;166 ls&lt;br /&gt;95 cd&lt;br /&gt;72 exit&lt;br /&gt;58 vim&lt;br /&gt;19 screen&lt;br /&gt;19 rm&lt;br /&gt;16 pwd&lt;br /&gt;14 tig&lt;br /&gt;13 sudo&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6159470847873828659-4080798390573900663?l=exawkuser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://exawkuser.blogspot.com/feeds/4080798390573900663/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6159470847873828659&amp;postID=4080798390573900663' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/4080798390573900663'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/4080798390573900663'/><link rel='alternate' type='text/html' href='http://exawkuser.blogspot.com/2008/04/shell-history-meme.html' title='Shell History Meme'/><author><name>brenton</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://bp1.blogger.com/_E73ULx6FtrY/R9KuyOvV9wI/AAAAAAAAAoM/RsCk5Agp1Fc/S220/n500029382_9615.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6159470847873828659.post-2756167439981378747</id><published>2008-03-25T11:35:00.007-05:00</published><updated>2008-03-26T07:38:40.225-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='raleigh.rb'/><title type='text'>My ctags lightning talk</title><content type='html'>Last week at the Raleigh.rb we had an evening of lightning talks.  I presented&lt;br /&gt;a handy utility called &lt;span style="font-weight: bold;"&gt;exuberant ctags &lt;/span&gt;for indexing source code and showed&lt;br /&gt;how nicely it plays with Ruby and Vim.  Here's a recap of my 5 minute lightning&lt;br /&gt;talk (along with a few points I failed to mention).&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;Setup:&lt;br /&gt;&lt;/span&gt;# From the top level of your project&lt;br /&gt;ctags --recurse&lt;br /&gt;&lt;br /&gt;Once it finishes there will be a file called 'tags' in your working directory.&lt;br /&gt;In my case vim loads tag files automatically if it finds them in the same&lt;br /&gt;directory from which it was launched.  If for some reason your version does not&lt;br /&gt;do this for Ruby files you can type the following in command mode:&lt;br /&gt;&lt;br /&gt;set tags=[path to your tags file]&lt;br /&gt;&lt;br /&gt;To make the change permanent add the following to your vimrc:&lt;br /&gt;&lt;br /&gt;# Look for a tags file in vim's working directory.&lt;br /&gt;au BufRead,BufNewFile *.rb set tags=tags&lt;br /&gt;&lt;br /&gt;In both cases a comma separated list is accepted.  This is nice if you are&lt;br /&gt;working on multiple projects.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;Usage:&lt;/span&gt;&lt;br /&gt;ctags works with most real text editors though I'm only experienced with the vim&lt;br /&gt;integration.  Basically, once vim has loaded the tags file you can place&lt;br /&gt;the cursor on top of  any word and press &lt;span style="font-weight: bold;"&gt;cntrl - ]&lt;/span&gt; to jump to the&lt;br /&gt;declaration.  In some cases users will notice their terminal also has that&lt;br /&gt;specific key combination bound.  Under gnome-terminal I have to press &lt;span style="font-weight: bold;"&gt;cntl-shift - ]&lt;/span&gt; to&lt;br /&gt;access my tags.  In the case where more than one tag matches a selection&lt;br /&gt;mode will be displayed.  Usually it's fairly obvious which one you want.&lt;br /&gt;&lt;br /&gt;Also worth mentioning is vim's tagstack.  It works pretty much as expected.  You push down as far as you&lt;br /&gt;want and then use &lt;span style="font-weight: bold;"&gt;cntrl - t&lt;/span&gt; to pop back.&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;br /&gt;Limitations:&lt;/span&gt;&lt;br /&gt;Obviously this sort of indexing faces challenges when working with a language&lt;br /&gt;as dynamic as Ruby.  Things that trip it up are method aliases and any fancy&lt;br /&gt;metaprogramming.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;ctags vs rtags&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;There is a Ruby ctags alternative called &lt;a href="http://rubyforge.org/projects/rtags/"&gt;rtags&lt;/a&gt;.  In my opinion ctags works better:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;ctags is several orders of magnitude faster that rtags.  On my laptop a 100,000 SLOC project is indexed in less than one second.  rtags takes about a minute to do the same.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;ctags supports dozens of languages.  Run &lt;span style="font-weight: bold;"&gt;ctags --list-languages&lt;/span&gt; to see them all.&lt;/li&gt;&lt;li&gt;rtags has trouble parsing files on most Ruby projects I work on.  This is what led me to switch back to ctags in the first place.&lt;/li&gt;&lt;li&gt;rtags claims to be more aware of Ruby syntax though in practice I find it indexes many things I just don't care about.&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6159470847873828659-2756167439981378747?l=exawkuser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://exawkuser.blogspot.com/feeds/2756167439981378747/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6159470847873828659&amp;postID=2756167439981378747' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/2756167439981378747'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/2756167439981378747'/><link rel='alternate' type='text/html' href='http://exawkuser.blogspot.com/2008/03/my-ctags-lightning-talk.html' title='My ctags lightning talk'/><author><name>brenton</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://bp1.blogger.com/_E73ULx6FtrY/R9KuyOvV9wI/AAAAAAAAAoM/RsCk5Agp1Fc/S220/n500029382_9615.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6159470847873828659.post-3412195783511925633</id><published>2008-03-08T09:16:00.007-05:00</published><updated>2008-03-08T10:15:17.384-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='GEB'/><title type='text'>GEB part two</title><content type='html'>I finished the second (and final) part of "Godel, Escher, Bach" last weekend.  Originally I was thinking about all the clever things that could be said about the book but now I don't think there is much value in doing so.  The one thing I can say is that this book was vital in luring me out of my mental rut of technical reading.  In short, I recommend this book to everyone.&lt;br /&gt;&lt;br /&gt;It's hard to express in words exactly why I believe this book is such an important read.  Ironically, that is one of the major themes from the book.  It deals greatly with &lt;a href="http://en.wikipedia.org/wiki/Holism"&gt;holism&lt;/a&gt; vs. &lt;a href="http://en.wikipedia.org/wiki/Reductionism"&gt;reductionism&lt;/a&gt;. I can see quite patently that the whole of GEB is greater than the sum of it's chapters.&lt;br /&gt;&lt;br /&gt;Should you decide to read GEB I suggest that you read the entire work.  Due to its length it's probably one of the most half-read books of our time.  Many of the people that recommended the book to me said things like, "It's a great book! Though I only read the first (x) pages".  Strangely enough I did meet one person who said they read the entire work in 18 hours straight.&lt;br /&gt;&lt;br /&gt;No matter how long it takes if you stick with it you will be rewarded many times over.  It took me 3 months and I confess there were indeed times in which I felt I was understanding very little.  However, time after time, I would reach a point where things started weaving together in the sort of "Eternal Golden Braid" that I believe Hofstadter intended.  I venture to say that, while you may indeed walk away with completely different insights about the book's "meaning", your experience will be quite similar.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&amp;lt;obligatory_Reading_Rainbow_quote&amp;gt;&lt;br /&gt;&lt;a href="http://www.google.com/search?q=Godel%2C+escher%2C+bach+reviews&amp;amp;btnG=Search"&gt;"But you don't have to take my word for it..."&lt;/a&gt;&lt;br /&gt;&amp;lt;/obligatory_Reading_Rainbow_quote&amp;gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6159470847873828659-3412195783511925633?l=exawkuser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://exawkuser.blogspot.com/feeds/3412195783511925633/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6159470847873828659&amp;postID=3412195783511925633' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/3412195783511925633'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/3412195783511925633'/><link rel='alternate' type='text/html' href='http://exawkuser.blogspot.com/2008/03/geb-part-2.html' title='GEB part two'/><author><name>brenton</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://bp1.blogger.com/_E73ULx6FtrY/R9KuyOvV9wI/AAAAAAAAAoM/RsCk5Agp1Fc/S220/n500029382_9615.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6159470847873828659.post-2285585957624693559</id><published>2008-02-27T22:54:00.005-05:00</published><updated>2008-02-27T23:19:26.238-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='kino'/><category scheme='http://www.blogger.com/atom/ns#' term='gstreamer'/><category scheme='http://www.blogger.com/atom/ns#' term='fedora'/><category scheme='http://www.blogger.com/atom/ns#' term='pitivi'/><title type='text'>Success with gstreamer</title><content type='html'>A few weeks ago I nearly threw my laptop down the hallway at work out of frustration with Kino and Pitivi.  All I wished to do was create a simple screencast using open source software.  I later tried some tips I found on the Fedora Screencasting wiki only to find the recommended splice script out of date. &lt;br /&gt;&lt;br /&gt;Though the script was broken on F8 it did give me insight into the power of the gstreamer framework.  I knew that whenever I had the time I should dig in a little deeper.  With the help of this &lt;a href="http://linux.conf.au/programme/detail?TalkID=146"&gt;Linux Conf Austrailia&lt;/a&gt; talk I was able to figure out what needed to be changed in order to get the splice script working again on F8.&lt;br /&gt;&lt;br /&gt;Here's how I spliced my theora video (made with istanbul) with a wav file recorded in audacity:&lt;br /&gt;&lt;blockquote&gt;&lt;/blockquote&gt;gst-launch oggmux name=mux ! filesink location=ldap-gst.ogg { filesrc location=ldap.ogg ! decodebin name=v } { filesrc location=ldap-audio.wav ! decodebin name=a } { v. ! queue ! ffmpegcolorspace ! theoraenc ! queue ! mux. } { a. ! queue ! audioconvert ! vorbisenc ! queue ! mux. }&lt;br /&gt;&lt;br /&gt;As a big fan of golfing on the command line I can appreciate convoluted oneliners.  The big trick to getting the fedora-av-splice.sh script running was:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Remove the version number from the 'gst-launch' executable (why hard-code that anyway?)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Corrected syntax (honestly, I mostly cargo-culted this from examples I found on the interweb)&lt;/li&gt;&lt;li&gt;Changed 'rawvorbisenc' to plain old 'vorbisenc'.  The talk mentioned 'gst-inspect' which for me was the key to finding out what my system could do.&lt;/li&gt;&lt;/ol&gt;Now what I would like to do is update the Fedora wiki.  Sadly, I can't figure out how to edit http://fedoraproject.org/wiki/ScreenCasting.  It appears to be an '&lt;span class="disabled"&gt;Immutable Page'.  How should this get updated?  Do I email the mailling list?  There's probably a doc explaining this on the wiki somewhere so I'll just have to dig for it sometime (unless some knowledgeable reader can enlighten me).&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6159470847873828659-2285585957624693559?l=exawkuser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://exawkuser.blogspot.com/feeds/2285585957624693559/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6159470847873828659&amp;postID=2285585957624693559' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/2285585957624693559'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/2285585957624693559'/><link rel='alternate' type='text/html' href='http://exawkuser.blogspot.com/2008/02/success-with-gstreamer.html' title='Success with gstreamer'/><author><name>brenton</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://bp1.blogger.com/_E73ULx6FtrY/R9KuyOvV9wI/AAAAAAAAAoM/RsCk5Agp1Fc/S220/n500029382_9615.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6159470847873828659.post-1059846656809800224</id><published>2008-02-10T18:46:00.000-05:00</published><updated>2008-02-12T19:55:29.799-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='fedora'/><category scheme='http://www.blogger.com/atom/ns#' term='FUDcon'/><title type='text'>Getting your parents to run Fedora: Challenge 1</title><content type='html'>&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;Problem 1: Remote system administration&lt;/span&gt;&lt;br /&gt;As other people in the session shared their similar philanthropic tech support stories we soon discovered our first problem.  A problem which has led to much headache for all involved and marred the name of open source.   The issue we speak of in this entry is that of remote system administration.&lt;br /&gt;&lt;br /&gt; &lt;span style="font-weight: bold;"&gt;You can't be serious&lt;/span&gt;&lt;br /&gt;It definitely seems odd that a group of people consisting of either developers or system administrators would face challenges with remote administration.  I mean, just about every machine I work on is "remote".  It's typically a Xen guest whose physical host location is both unknown and unimportant to me.  But the fact of the matter is that, when dealing with our family, we're often thrown into a world (almost) completely unfamiliar to us; the world of people who do not attend FUDcons.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;"Oh, but I am serious" or Phone support for the inlaws&lt;br /&gt;&lt;/span&gt;To make things a little more concrete I'll share a little about a strange tradition in our household.  Each year my wife and I fly out to visit her relatives.  With impeccable regularity, during our vacation one of their Windows machines goes up in flames due to some mixture of bugs and malware and, with similar predictability, I install Fedora on their machine. The sad part to the story is that every year they end up having to remove Fedora and switch back to Windows simply because we fly back home and they don't have anyone else nearby that can help them. The truth is they have equally as many problems with Windows. It just happens to be the case that they have had years of experience with 'workarounds'. I can't tell you how many times we've had conversations on the phone like this:&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;blockquote&gt;&lt;span style="font-weight: bold;"&gt;mother-in-law:&lt;/span&gt; The internet is broken on my laptop&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;me:&lt;/span&gt; Opps, that was probably my fault. Remember that thing I mentioned to about Ogg Vorbis? Well when I ssh'd into your machine this morning to make it so that you could view our family videos I accidentally upgraded your kern...&lt;br /&gt;&lt;br /&gt;*mother-in-law* interupts,&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;mother-in-law:&lt;/span&gt; Uhh... what can I type to fix this?  I need to check my email.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;me:&lt;/span&gt; Press alteff too. Then type 'nome terminal'.  Then type 'pseudo sue dash enter'.  Then type 'yum update eye dubya...'&lt;br /&gt;&lt;br /&gt;(I'm trying my best to faithfully represent the role poor mobile phone connectivity plays in to these scenarios.)&lt;/blockquote&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;Current recommendation for my inlaws:&lt;br /&gt;&lt;/span&gt;&lt;span&gt;I was quite surprised when several people from the Fedora project actually suggested not installing Fedora in this particular case.  After talking a bit more what they really meant was, "don't install Fedora, yet".&lt;/span&gt; In certain cases it can be almost traumatic to have their entire digital world flipped on them. &lt;span style="font-weight: bold;"&gt;Find _good_ open source solutions to the areas where they are locked in.&lt;/span&gt;  Once  successful the switch to Fedora will be a lot smoother.  After all, it's typically the case that a person only uses a handful of rather basic apps and they only have one or two apps where they are truely 'locked in'. In my mother-in-law's case it's Sibelious. Sadly, &lt;a href="http://www.gnu.org/software/denemo/denemo.html"&gt;GNU Denemo&lt;/a&gt; didn't work well for her.&lt;br /&gt;&lt;br /&gt;For remote support we really need something better than&lt;br /&gt;&lt;ol&gt;&lt;li&gt;explain how to activate desktop sharing&lt;br /&gt;&lt;/li&gt;&lt;li&gt;reverse an ssh connection&lt;/li&gt;&lt;li&gt;port forward to their vino server&lt;/li&gt;&lt;li&gt;launch vnc viewer over lousy internet connection and try to couch family member on what button to click on to fix their problem&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;The above steps usually take 20-30 minutes for me to setup and, nine times out of ten, the fix involves something as simple as, "oh, you forgot to type hotmail.com in the browser. That's why your email isn't working".&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:180%;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-size:100%;"&gt;Wish list for remote tech support&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;ul&gt;&lt;li&gt;An effective way to securely establish connections with nontechnical users and their trusted, penguin-loving friends. When connecting two people that are both on networks with some form of NAT you are frequently forced to use a third, internet addressable, machine in order to establish a connection. Obviously you can get around the use of a third party if you control the router on your end, but that's not always the case. Say my mom calls from home and I'm at coffee shop or at work.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;A disaster recovery strategy that protects our family members from being forced to return closed source alternatives. With my inlaws some unrecoverable (at least over the phone) situation always comes up and they are forced to do the only thing they know how to--pay someone to install Windows.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;font-size:100%;" &gt;Possible solutions&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;ul&gt;&lt;li&gt; Use a service to spin up secured Fedora virtual machines over the internet. From there have an applet on their dock to request a connection from their trusted friend. Some form of remote desktop connection is then made over a tunnel ssh connection that is brokered by the VM. Of course using such a service would always require money. In the case of the EC2 it's pretty cheap in comparison to the cost of paying some Geek Squader to fix things. With Amazon's DevPay (A service that allows people to pay for usage of VMs) it would be possible to even have a system for Fedora community members to raise support for the Fedora project by volunteering to fix people's machines.&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Koan/Cobbler to allow remote provisioning. Profiles could be created for sundry machine configurations that would lay down a working machine.&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Customized LiveCDs or recovery DVDs.  This shouldn't be too hard with the Fedora tooling and fits quite well with Koan/Cobbler. &lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Another interesting use case for a live CD would be to have an automated method to back up their data before wiping everything and starting over.  In the post installation their data could be restored.&lt;/li&gt;&lt;/ul&gt;Up Next&lt;br /&gt;The second challenge: Usability&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6159470847873828659-1059846656809800224?l=exawkuser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://exawkuser.blogspot.com/feeds/1059846656809800224/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6159470847873828659&amp;postID=1059846656809800224' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/1059846656809800224'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/1059846656809800224'/><link rel='alternate' type='text/html' href='http://exawkuser.blogspot.com/2008/02/getting-your-parents-to-run-fedora_10.html' title='Getting your parents to run Fedora: Challenge 1'/><author><name>brenton</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://bp1.blogger.com/_E73ULx6FtrY/R9KuyOvV9wI/AAAAAAAAAoM/RsCk5Agp1Fc/S220/n500029382_9615.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6159470847873828659.post-4009097242957806897</id><published>2008-02-06T19:47:00.000-05:00</published><updated>2008-02-10T19:20:29.913-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='fedora'/><title type='text'>Getting your parents to run Fedora: Intro</title><content type='html'>A few weeks ago at FUDcon I spawned a session entitled "Getting your parents to run Fedora". We had 20 people or so show show up that day and it's high time I posted some of the topics that were discussed.  My first attempt in writing this proved far too verbose so I'm going to break it into parts and try and make things a little more concise.  To put it best:&lt;br /&gt;&lt;blockquote&gt;"If I had more time, I would have written a shorter letter."&lt;br /&gt;--Hemingway, Cicero, Voltaire, Mark Twain, or maybe T.S. Elliot&lt;/blockquote&gt;&lt;span style="font-weight: bold;"&gt;Intro&lt;br /&gt;&lt;/span&gt;Open source computing appears to be at a veritable tipping point for mass adoption.  Dell actively promotes machines with Ubuntu preinstalled, Wal-mart has a hot selling Linux-based desktop, the OLPC project is getting commodity laptops in the hands of the third-world and Asus is getting them to the rest.  Though this mass adoption might very well be nothing more than a footnote in the minds of many open source aficionados I view it of utmost importance regarding the topic of file formats and true digital freedom.  Unless formats like odf, ogg vorbis/theora and the like are actually used in the wild they will be ignored by the online services that we use daily. &lt;br /&gt;&lt;br /&gt;How can we assist this mass adoption?  Well, like many of my friends at FUDcon, I install Fedora on every machine whose owner will allow it and, at least in my case, there is a clear dual motive.  On one hand, as stated previously, I desire open source to be adopted by the masses, on the other I want my family to have machines that meet their needs.  Since they are family I would be their tech support regardless of what OS they choose to run.  I merely urge them to let me install Fedora since that's what I use and it's the only way I can test things out for them.  &lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Up Next&lt;br /&gt;&lt;/span&gt;The first challenge: Remote administration&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6159470847873828659-4009097242957806897?l=exawkuser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://exawkuser.blogspot.com/feeds/4009097242957806897/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6159470847873828659&amp;postID=4009097242957806897' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/4009097242957806897'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/4009097242957806897'/><link rel='alternate' type='text/html' href='http://exawkuser.blogspot.com/2008/02/getting-your-parents-to-run-fedora.html' title='Getting your parents to run Fedora: Intro'/><author><name>brenton</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://bp1.blogger.com/_E73ULx6FtrY/R9KuyOvV9wI/AAAAAAAAAoM/RsCk5Agp1Fc/S220/n500029382_9615.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6159470847873828659.post-3582820701872454946</id><published>2008-01-06T17:18:00.000-05:00</published><updated>2008-01-06T21:40:31.286-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='open source'/><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='fedora'/><title type='text'>home Sweet Home 3D</title><content type='html'>Last night my wife was feeling particularly creative.  While I usually approve of her creative inclinations I was simply not in the mood to move our large objects (some call it furniture) around our apartment.  Thinking aloud I said to my wife, "there &lt;span style="font-style: italic;"&gt;must&lt;/span&gt; be some great open source software for interior design".&lt;br /&gt;&lt;br /&gt;When someone says such as phrase there a few common outcomes:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;It is the case that such a project exists therefore the problem is solved&lt;/li&gt;&lt;li&gt;It is &lt;span style="font-weight: bold;"&gt;not&lt;/span&gt; the case that such a project exists therefore it is the case that either&lt;br /&gt;&lt;/li&gt;&lt;ol&gt;&lt;li&gt;You create the great project yourself therefore your weekend is shot &lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;OR&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;You do not create the great project yourself therefore you are forced to move heavy objects (your weekend is probably still shot)&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/ol&gt;In my case I was fortunate enough that a great project already exists.  Oddly enough, googling around didn't yield much fruit.  I had foreknowledge of several good open source CAD programs though I knew that they were probably not well suited for the simple task we were trying to accomplish.  I quickly turned to SourceForge and stumbled across &lt;a href="http://sweethome3d.sourceforge.net/index.html"&gt;Sweet Home 3D&lt;/a&gt;.  It's your typical java project that comes with binary tarball complete with a bundled version of Sun's java (though Fedora's Iced Tea works just fine).  Once unpacked my wife was free to let her loftiest of ideas loose on our virtual apartment.  It really was quite simple to use.  She cranked out 3 layouts in no time--one of which we &lt;span style="font-style: italic;"&gt;might&lt;/span&gt; actually implement.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6159470847873828659-3582820701872454946?l=exawkuser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://exawkuser.blogspot.com/feeds/3582820701872454946/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6159470847873828659&amp;postID=3582820701872454946' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/3582820701872454946'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/3582820701872454946'/><link rel='alternate' type='text/html' href='http://exawkuser.blogspot.com/2008/01/home-sweet-home-3d.html' title='home Sweet Home 3D'/><author><name>brenton</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://bp1.blogger.com/_E73ULx6FtrY/R9KuyOvV9wI/AAAAAAAAAoM/RsCk5Agp1Fc/S220/n500029382_9615.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6159470847873828659.post-7396338365405133137</id><published>2008-01-01T18:34:00.000-05:00</published><updated>2008-01-01T20:53:04.559-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='open source'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='GEB'/><title type='text'>Lanier's Well-Tested Conjecture</title><content type='html'>Something has been eating at me for the last few days since Jaron Lanier's article &lt;a href="http://discovermagazine.com/2007/dec/long-live-closed-source-software/"&gt;Long Live Closed-Source Software!&lt;/a&gt; first came through my feed reader.  I couldn't put my finger on it at first but maybe after letting the thoughts percolate a bit through my mind I'll be able to dig it out by the time I'm done here.&lt;br /&gt;&lt;br /&gt;On the surface I guess the reason I was initially bothered by the article was the fact that I came across it while thumbing through my slashdot feed.  Honestly, it's probably more my fault for reading /. in the first place (I get really annoyed when I see articles that seem as if they are begging for attention).&lt;br /&gt;&lt;br /&gt;It wasn't until I finally got around to reading it that I realized it was something I needed to consider.  If you make exception for phrases like "&lt;span style="font-style: italic;"&gt;there's a reason the iPhone doesn't come with Linux&lt;/span&gt;" it seems as if Lanier makes several valid points.  Later in the article he even  makes statements that make him appear sympathetic with the open source movement.  So he can't be all bad, right?  Though, again, that wasn't what has been itching me as I don't tend to get too stirred up by those sorts of issues.&lt;br /&gt;&lt;br /&gt;What really gave me a sour taste was the idea that he would be in any position to judge innovation based by his "evidence".   Personally, examples like the iPhone seem ridiculous when its basic functionality is comprised of nothing more than things that I have wanted on my phone since the late 90s.  The trick that will make billions for Apple is that they have done it a fashionable way.  To say that it doesn't come with Linux wouldn't even be true if you consider many of the web applications on which the iPhone experience relies are are indeed running on Linux and open source.  Though it wouldn't have been as catchy, Lanier should have directed his statement towards the Linux community if that was indeed what he was hinting at, "the iPhone doesn't come with [the ideals commonly expressed by the Linux community]".  I guess I was wrong--that does sound catchy!&lt;br /&gt;&lt;br /&gt;But how do communities innovate?  How does &lt;span style="font-style: italic;"&gt;one&lt;/span&gt; even recognize that innovation?  I'll tell you how--&lt;span style="font-style: italic;"&gt;&lt;span style="font-weight: bold;"&gt;not very easily&lt;/span&gt;.  &lt;/span&gt;Let me continue along those lines and explain that I'm more accustomed to hearing people talk about innovation long after the particular innovation in question has actually been innovated.  I studied Spanish golden age literature in College.  For some strange reason though it wasn't called golden age literature at the time of it's writing.  I even see a parallel in the field of music strangely enough.  I played in several bands whose prime preceded the dawn of YouTube and MySpace, that is to say their existence is presently only in my mind (and a few other minds).  I wouldn't even say our music was innovative but I do feel that in the hundreds of shows we played I was exposed to innovation through the people we encountered.  Few of those bands are still around today in any form yet these underground cultures are alive all over the country.  They share with each other through tours and festivals and now more than ever with the advent of communities such as Last.FM.  I don't want to spend much more time on this particular topic so suffice it to say: &lt;blockquote&gt;When people call the iPhone innovative it gives me much the same feeling as when one of my hip-hop aficionado friends from Spain considers Coolio to be innovative.&lt;br /&gt;&lt;/blockquote&gt;I only mention Spain because I lived there for a year and a half and those situations came up far too often.  The idea is simply that the majority of Spanish teens are too far removed from hip-hop culture to make any judgement on west coast music from across the ocean (they would be, however, more knowledgeable on hip-hop from Iberia).  The only thing they ever experience from the US, in my opinion, is culture that happens to be profitable.  I believe Lanier's definition of innovation borders dangerously close with "it's popular ergo it matters".&lt;br /&gt;&lt;br /&gt;I just don't buy the any statement that claims the open source movement doesn't innovate.  People innovate, period.  Closed source projects fail as commonly (and for many of the same reasons) as open source projects.  The vast majority of closed source software is miserable in much the same manner as the sundry projects on [Insert your favorite repository here] are.  It's just too simple to think of examples and counter examples for any theorem that aims to prove a function of Open/Closed sourcedness to innovation.  Surely things are more complex than that.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6159470847873828659-7396338365405133137?l=exawkuser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://exawkuser.blogspot.com/feeds/7396338365405133137/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6159470847873828659&amp;postID=7396338365405133137' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/7396338365405133137'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/7396338365405133137'/><link rel='alternate' type='text/html' href='http://exawkuser.blogspot.com/2008/01/laniers-well-tested-conjecture.html' title='Lanier&apos;s Well-Tested Conjecture'/><author><name>brenton</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://bp1.blogger.com/_E73ULx6FtrY/R9KuyOvV9wI/AAAAAAAAAoM/RsCk5Agp1Fc/S220/n500029382_9615.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6159470847873828659.post-7160561620825099249</id><published>2007-12-28T09:38:00.000-05:00</published><updated>2007-12-28T10:27:42.332-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='GEB'/><title type='text'>GEB part one</title><content type='html'>I just finished part one of Godel, Escher, Bach and I can honestly say it's been an exciting experience.  I was first introduced to GEB by some friends at RubyConf.  A week later at the local erlounge again it was commended.  Since I had been reading a lot of pure tech books lately so I decided I would give GEB a shot.  It's true that it's a book that 10 people could read it and each come to 10 different (valid) conclusions as to the purpose of the book. &lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Highlights for me thus far&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;The carollian dialogues between the Tortoise and Achilles.  Especially the one which demonstrates the difficulty of trying to use logic and reasoning to defend itself.&lt;/li&gt;&lt;li&gt;The chapter on recursion.  I think it's safe to say that most people that enjoy hacking on code would find this particular chapter enjoyable.  &lt;/li&gt;&lt;li&gt;The numerous correlations between seemingly disjoint subjects.  Obviously the book treats the relationship between G, E and B with special consideration but there are correlations on many more levels.  You find yourself on the same page dealing with the intrinsic meaning of symbols and abortion, for example.&lt;/li&gt;&lt;/ul&gt;It's been some of the most challenging pages I've read in a while.  I typically only have a few hours a week to spend with GEB and it's taken me several weeks to get 275 pages into the book.  Ironically the most challenging part of the book thus far has been the Preface.  I guess it shouldn't be that surprising when you consider the task of describing GEB holistically. &lt;br /&gt;&lt;br /&gt;I would recommend this book to anyone who feels like they have been too intensely focus on one mental task too long.  Often I find myself doing just that since it seems to be my forte.  The various puzzles have been a nice trip outside the mental box (Strange Loop) I've placed myself in. &lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Recommendations for reading GEB&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Attempt all puzzles.  The completion of many of the puzzles is not of much importance in the scope of GEB.  The mental exercise is of far greater value.&lt;/li&gt;&lt;li&gt;When you find yourself breaking out of a Strange Loop try and explain it to someone else.  Here's something I came up with last night as I explained the Dual Nature of Formal Systems:&lt;/li&gt;&lt;/ul&gt;Imagine a chess board.  Legal moves can be represented in algebraic chess notation (illegal moves could be represented as well).  For example &lt;a href="http://en.wikipedia.org/wiki/Scholar%27s_mate"&gt;Scholar's Mate&lt;/a&gt; could be represented as:&lt;br /&gt;&lt;ol style="font-weight: bold;"&gt;&lt;li&gt;e4 e5&lt;/li&gt;&lt;li&gt;Qh5?! Nc6&lt;/li&gt;&lt;li&gt;Bc4 Nf6??&lt;/li&gt;&lt;li&gt;Qxf7# 1-0&lt;/li&gt;&lt;/ol&gt;Now since Godel showed us that formal systems (in this case the allowed moves in Chess) can be mapped onto Number Theory you could imagine being able to create equations for entire chess matches that could be derived mathematically.  What if something so simple as converting all the numbers in the various expressions were converted to base 26 and represented by the English alphabet.  Since I'm already in the state of imagining atrocious coincidences I might as well imagine that upon transposing the numbers the letters reveals an entire book about the legal chess moves.  Better yet, what if the book was not about legal chess moves but illegal!  That would indeed be a Strange Loop.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6159470847873828659-7160561620825099249?l=exawkuser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://exawkuser.blogspot.com/feeds/7160561620825099249/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6159470847873828659&amp;postID=7160561620825099249' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/7160561620825099249'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/7160561620825099249'/><link rel='alternate' type='text/html' href='http://exawkuser.blogspot.com/2007/12/geb-part-one.html' title='GEB part one'/><author><name>brenton</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://bp1.blogger.com/_E73ULx6FtrY/R9KuyOvV9wI/AAAAAAAAAoM/RsCk5Agp1Fc/S220/n500029382_9615.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6159470847873828659.post-1804247465966447123</id><published>2007-12-27T16:03:00.000-05:00</published><updated>2007-12-27T16:07:58.631-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='kino'/><category scheme='http://www.blogger.com/atom/ns#' term='fedora'/><category scheme='http://www.blogger.com/atom/ns#' term='pitivi'/><title type='text'>Kino 1.2.0: great on F8</title><content type='html'>Today I spent some time figuring out why I couldn't get Kino's transitions working on Fedora 8.  Previously I was using version 1.1.1 from the livna repository and I noticed today that a tarball for 1.2.0 existed.  Building and installing it to my home dir worked like a charm.  All audio and video FX are working.  During FUDcon I might seen if I could update the livna package for kino so that others could benefit.  I'll test it out a bit more in the meantime.&lt;br /&gt;&lt;br /&gt;On a side note I also gave pitivi a shot.  It's far from it's first 1.0 release but I must I like the interface a bit more than kino.  Plus, being written in Python makes it a little more hackable.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6159470847873828659-1804247465966447123?l=exawkuser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://exawkuser.blogspot.com/feeds/1804247465966447123/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6159470847873828659&amp;postID=1804247465966447123' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/1804247465966447123'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/1804247465966447123'/><link rel='alternate' type='text/html' href='http://exawkuser.blogspot.com/2007/12/kino-120-great-on-f8.html' title='Kino 1.2.0: great on F8'/><author><name>brenton</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://bp1.blogger.com/_E73ULx6FtrY/R9KuyOvV9wI/AAAAAAAAAoM/RsCk5Agp1Fc/S220/n500029382_9615.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6159470847873828659.post-4211169799315078693</id><published>2007-12-26T21:26:00.000-05:00</published><updated>2007-12-26T22:29:52.559-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='kino'/><title type='text'>My first attempt at video editing on linux</title><content type='html'>&lt;center&gt;               &lt;script type="text/javascript" src="http://blip.tv/scripts/pokkariPlayer.js?ver=2007111701"&gt;&lt;/script&gt;&lt;script type="text/javascript" src="http://blip.tv/syndication/write_player?skin=js&amp;amp;posts_id=568226&amp;amp;source=3&amp;amp;autoplay=true&amp;amp;file_type=flv&amp;amp;player_width=&amp;amp;player_height="&gt;&lt;/script&gt;&lt;div id="blip_movie_content_568226"&gt;&lt;a rel="enclosure" href="http://blip.tv/file/get/Brentonson-weekendInTopsail309.ogg" onclick="play_blip_movie_568226(); return false;"&gt;&lt;img alt="Video thumbnail. Click to play" src="http://blip.tv/file/get/Brentonson-weekendInTopsail309.ogg.jpg" title="Click to play" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a rel="enclosure" href="http://blip.tv/file/get/Brentonson-weekendInTopsail309.ogg" onclick="play_blip_movie_568226(); return false;"&gt;Click To Play&lt;/a&gt;&lt;/div&gt;          &lt;/center&gt;&lt;br /&gt;It's been a while now since I sold my iMac.  The one thing I've missed the most since that day has been the video editing (I haven't touched my mini-dv since).  Tonight I decided I would give kino a shot.  It's pretty good but it's definitely not iMovie.  For some reason I was not able to get the transitions working on my system.  I'll try and figure that out tomorrow.  In the meantime I've uploaded a sample video of some clips of me and my wife on Topsail Beach, NC.&lt;br /&gt;&lt;br /&gt;On a side note, people should give blip.tv try.  It's the first video service I've found that has first class support for ogg theora (big thumbs up).  If you create an account be sure not to re-use a password as everything is done over HTTP (that's a big thumbs down).&lt;br /&gt;&lt;br /&gt;*UPDATE* At least on my machine I wasn't able to get the aforementioned embedded video to play.  I don't know anything about the cortado applet but apparently that's what is being used.  Anyway, it plays on my machine with mplayer and at the moment that's the only thing that matters.&lt;br /&gt;&lt;br /&gt;*UPDATE* I think the only thing I needed was the gstreamer-plugin rpm installed.  Now it's working for me.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6159470847873828659-4211169799315078693?l=exawkuser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://exawkuser.blogspot.com/feeds/4211169799315078693/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6159470847873828659&amp;postID=4211169799315078693' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/4211169799315078693'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/4211169799315078693'/><link rel='alternate' type='text/html' href='http://exawkuser.blogspot.com/2007/12/my-first-attempt-at-video-editing-on.html' title='My first attempt at video editing on linux'/><author><name>brenton</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://bp1.blogger.com/_E73ULx6FtrY/R9KuyOvV9wI/AAAAAAAAAoM/RsCk5Agp1Fc/S220/n500029382_9615.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6159470847873828659.post-1765407465085344580</id><published>2007-11-25T15:41:00.000-05:00</published><updated>2007-11-25T15:53:46.156-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='hotmail'/><title type='text'>Hotmail silently blocked my Amazon giftcard</title><content type='html'>I received an Amazon giftcard this year for my birthday.  Actually, I didn't receive it.  Let me explain.&lt;br /&gt;&lt;br /&gt;I have a old hotmail account I give out if I suspect someone is going to give out my address (sometimes I just use &lt;a href="http://mailinator.com/"&gt;mailinator&lt;/a&gt;).  My mother-in-law was trying to be courteous since she didn't know if Amazon would give out my address so she sent the gift card to my hotmail account.  When I logged in I noticed it wasn't in my inbox nor my spam folder.  Forty-eight hours later it still hadn't arrived.  I emailed Amazon and they told me the gift card could be reissued so we logged in and resent the card to my primary account.  The email showed up instantly. &lt;br /&gt;&lt;br /&gt;If hotmail really is &lt;a href="http://www.iis-aid.com/articles/iis_aid_news/are_hotmail_cutting_their_own_throat"&gt;cutting their own throat&lt;/a&gt; I hope the knife is sharp.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6159470847873828659-1765407465085344580?l=exawkuser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://exawkuser.blogspot.com/feeds/1765407465085344580/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6159470847873828659&amp;postID=1765407465085344580' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/1765407465085344580'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/1765407465085344580'/><link rel='alternate' type='text/html' href='http://exawkuser.blogspot.com/2007/11/hotmail-silently-blocked-my-amazon.html' title='Hotmail silently blocked my Amazon giftcard'/><author><name>brenton</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://bp1.blogger.com/_E73ULx6FtrY/R9KuyOvV9wI/AAAAAAAAAoM/RsCk5Agp1Fc/S220/n500029382_9615.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6159470847873828659.post-4386491854013190249</id><published>2007-11-24T19:25:00.000-05:00</published><updated>2007-11-24T22:12:37.069-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='laptop'/><category scheme='http://www.blogger.com/atom/ns#' term='gnu'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><title type='text'>Windows Tithe Day 2007</title><content type='html'>I just got back from a two week trip to Denver.  My wife's family lives there so it made for a great place to take the &lt;a href="http://pragmaticstudio.com/ruby/"&gt;Advanced Ruby Studio&lt;/a&gt; as well as spend the holidays.  The second week I was officially on vacation and got to spend a lot of time simply relaxing and doing things I enjoy.  One of those things is spread the open source love.&lt;br /&gt;&lt;br /&gt;My mother-in-law has two year old Sony Vaio that originally came with Window XP Home Edition.  For some unexplainable reason the wireless stopped working all of a sudden and by the time I was able to investigate the CD drive was no longer working.  XP couldn't even mount my usb thumb drive.  When I logged in as the admin user and looked under Device Manager it showed nothing there.   While I don't claim to be an expert in Windows internals I felt quite certain something had compromised her system.  It was indeed &lt;a href="http://www.joelonsoftware.com/items/2007/10/26.html"&gt;Windows Tithe Day&lt;/a&gt;. &lt;br /&gt;&lt;br /&gt;Instead of repeating the vicious cycle I decided to fix the problem.  Since I usually carry some form of a Linux live CD with me when I travel I decided to install Fedora on her laptop.  Initially I installed 8 since it's the latest and greatest from the Fedora camp but I immediately hit some strange lockups that I believe were related to Xorg 7.3 and the radeon driver.  I spent a few hours reading &lt;span style="font-weight: bold;"&gt;Every Single Post&lt;/span&gt; on an extremely long thread on Ubuntu's Launchpad that reported similar problems for some users with Gutsy.  Since I had lots of success with Fedora 7 I put in my Live DVD and within 30 minutes had the basic system install and running.  About 8 hours later (spread over a few days) there was one less Windows user in the world.  My main goals for her system were:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Wireless connectivity (auto connecting to the correct networks, etc)&lt;/li&gt;&lt;li&gt;Dead simple picture importing from her Kodak camera&lt;/li&gt;&lt;li&gt;An office suite&lt;/li&gt;&lt;li&gt;Web browser with all plugins for using her favorite sites.&lt;/li&gt;&lt;li&gt;Software for music notation&lt;/li&gt;&lt;li&gt;Printing&lt;/li&gt;&lt;/ol&gt;One reason it took so long is that the configuration had to be flawless.  Everything had to work perfectly or it was going to be a waste of everyone's time.  That being sad most of my time was spent on numbers 2 and 5.  On my laptop the second I plug in my Canon everything just works.  A dialogue box pops up and asks me if I want to import the pictures.  However the permissions weren't getting set correctly on her machine for some reason.  I decided to create an /etc/security/console.perms.d/52-kodak.perms file that gave the console user write access to all usb devices.  As for #5, I spent a lot of time evaluating the various open source programs available.  Previously she had used Sibelius.  Paying for Sibelius when all you need is a program to print out and archive musical notation is about like buying Photoshop just to resize pictures.  GNU Denemo fit the bill nicely.  It's a gtk frontend to lilypond and it worked like a charm.  The best part is that if she really ends up liking it she can recommend it to her students and they won't have to shell out a few hundred dollars for No Good Reason.  Denemo coupled with the free (as in freedom) music education curriculum from &lt;a href="http://cnx.org/content/col10363/latest/"&gt;Connexions&lt;/a&gt; can take a grassroots piano school  to a new heights.&lt;br /&gt;&lt;br /&gt;So I guess if you are still reading this one of several thoughts have probably come to your mind:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Why would this guy would spend so much time setting up this laptop and then ranting on his blog? &lt;br /&gt;&lt;/li&gt;&lt;li&gt;I would have just installed a pirated copy of Windows XP Extreme Awesome Edition--it's suppose to be more stable, right?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;She should just by any mac.  And when the day comes when it can't do everything she wants I would just tell her to by another one. Period.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;Hopefully I'll address each of these issues, we'll see.&lt;br /&gt;&lt;br /&gt;Basically I get extremely upset when software randomly stops working for people that 1) don't know how to fix the problem and 2) just don't have the time to worry about things like operating systems deciding to Just Not Work. &lt;span style="font-weight: bold;"&gt; &lt;/span&gt;I believe companies that engrain software like this into our culture are doing humanity a grave disservice.  I actively try to correct the problem in anyway I can, whether by writing software myself or by finding something that will work for them that someone else has already written.&lt;br /&gt;&lt;br /&gt;When I was in college I helped dozens of elderly people in my community learn to use technology to improve their quality of life.  However many situations arose which forced me to step back and wonder if I was really helping them at all?  Yes, on one level they are now capable of emailing pictures of their grandchildren to their relatives but the time they waste trying to figure out how ClickToGamble.exe got installed on their system when all they wanted was to install a plugin to view their sons video on YouTube, typically negates all time saved.  Personally I don't want to waste an elderly persons time.  Every moment is valuable.  When I finally had to move for work I basically started giving them different advice: &lt;span style="font-weight: bold;"&gt;Buy a Mac&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;That conclusion was reached prior to my realization that open source is the best solution to their problem, though I still partly agree with my original advice.   You could replace "Buy a Mac" with "Get something that is going to work for the rest of your life no matter what it costs".  Cost could be measure in a $3000 Macbook Pro or it could be 3 days of your life configuring an open source desktop environment.  Either way make sure it's a one time cost.  Anything else just isn't sustainable.  Either your money or your time will run out.  If there is one thing I can say about the Linux systems I setup it's that they will run until the hardware goes up to that big tech shop in the sky.  I have been using Linux as my sole computing environment for the last 3 years and that's just been my experience.  On a side note I consider the 3 days spent during initial setup to be valuable knowledge gained while at the same time I believe performing a postmortem on a Windows machine twice a year to be a complete waste of a person's life. &lt;br /&gt;&lt;br /&gt;Hopefully I don't sound like a complete open source bigot.  The truth is you can choose whatever computing environment works best for you (and I think you should), &lt;span style="font-style: italic;"&gt;but as for me and my household we will use GNU/Linux&lt;/span&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6159470847873828659-4386491854013190249?l=exawkuser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://exawkuser.blogspot.com/feeds/4386491854013190249/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6159470847873828659&amp;postID=4386491854013190249' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/4386491854013190249'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/4386491854013190249'/><link rel='alternate' type='text/html' href='http://exawkuser.blogspot.com/2007/11/windows-tithe-day-2007.html' title='Windows Tithe Day 2007'/><author><name>brenton</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://bp1.blogger.com/_E73ULx6FtrY/R9KuyOvV9wI/AAAAAAAAAoM/RsCk5Agp1Fc/S220/n500029382_9615.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6159470847873828659.post-6221870676648895707</id><published>2007-10-28T15:15:00.000-05:00</published><updated>2007-10-28T15:21:39.073-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='metaprogramming'/><title type='text'>DSLs made easy</title><content type='html'>XOAP recently hosted the first Belgian Ruby User Group meeting and Peter Vanbroekhoven gave &lt;a href="http://www.xaop.com/articles/2007/10/07/metaprogramming"&gt;a great talk&lt;/a&gt; on metaprogramming in Ruby.  I would recommend this to any of your Blub programming friends.  For some reason the last 5  minutes or so of audio seems like it was cut out.  The speaker gets through all the slides though.  Perhaps they edited out the audience's questions.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6159470847873828659-6221870676648895707?l=exawkuser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://exawkuser.blogspot.com/feeds/6221870676648895707/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6159470847873828659&amp;postID=6221870676648895707' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/6221870676648895707'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/6221870676648895707'/><link rel='alternate' type='text/html' href='http://exawkuser.blogspot.com/2007/10/dsls-made-easy.html' title='DSLs made easy'/><author><name>brenton</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://bp1.blogger.com/_E73ULx6FtrY/R9KuyOvV9wI/AAAAAAAAAoM/RsCk5Agp1Fc/S220/n500029382_9615.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6159470847873828659.post-2497862149597681074</id><published>2007-09-20T17:25:00.000-05:00</published><updated>2007-09-20T20:08:58.490-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='vnc'/><category scheme='http://www.blogger.com/atom/ns#' term='erlounge'/><title type='text'>Sharing Xvnc sessions</title><content type='html'>We're a pretty diverse group at the RDU erlouge even though we haven't reached the point where we actually need a formal venue for our meetups.  We're still bumming it out in cafes with free WiFi.  Likewise we don't have a projector or anything for presenting our code.  The easiest and most cross platform way to achieve pretty much the same result as a projector was to use VNC.&lt;br /&gt;&lt;br /&gt;Here's what I do on Fedora 7:&lt;br /&gt;#'s denotes root shell&lt;br /&gt;$ means your normal unprivileged user&lt;br /&gt;&lt;br /&gt;# yum install vnc-server vnc&lt;br /&gt;$ vncserver :1 -depth 24 -geometry 1024x768 -AlwaysShared&lt;br /&gt;&lt;br /&gt;Most of those arguments do not need any further explanation so I'll be brief.  That command starts a server on display :1 (port 5901) and sets all the connections to shared.  That's a nice flag to set (read the Xvnc manpage for more options) since we were having problems with people forgetting to specify a shared connection on the client side and thus disconnecting everything.&lt;br /&gt;&lt;br /&gt;VNC is not the most efficient remote desktop protocol but it gets the job done.  If a large group of people are connecting and bandwidth is limited you may try a few things to reduce the amount of bits that have to fly around.  I like to use a lighter weight window manager.  You can edit your ~/.vnc/xstartup and put in something like this:&lt;br /&gt;&lt;br /&gt;[ -x /etc/vnc/xstartup ] &amp;amp;&amp;amp; exec /etc/vnc/xstartup&lt;br /&gt;[ -r $HOME/.Xresources ] &amp;amp;&amp;amp; xrdb $HOME/.Xresources&lt;br /&gt;fluxbox &amp;amp;&lt;br /&gt;&lt;br /&gt;Obviously the first to lines are boilerplate.&lt;br /&gt;&lt;br /&gt;If you are ever in a situation where you don't feel like the wireless network you are on is safe I would recommend tunneling your VNC traffic through SSH.  I don't think any VNC servers advertise their security and the traffic definitely isn't encrypted.  Just give everyone who you want allow access to your machine an account then have them log in as follows:&lt;br /&gt;&lt;br /&gt;$ ssh -N -T -L 5901:[VNC server ip address]:5901 &amp;amp;&lt;br /&gt;&lt;br /&gt;That creates the tunnel.  Then just tell the users to connect to their local point (which forwards to the host)&lt;br /&gt;&lt;br /&gt;$ vncviewer -ViewOnly -Shared localhost:5901&lt;br /&gt;&lt;br /&gt;NOTE: The '-Shared' option is only really needed if you are connecting to a server that doesn't enforce sharing.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6159470847873828659-2497862149597681074?l=exawkuser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://exawkuser.blogspot.com/feeds/2497862149597681074/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6159470847873828659&amp;postID=2497862149597681074' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/2497862149597681074'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/2497862149597681074'/><link rel='alternate' type='text/html' href='http://exawkuser.blogspot.com/2007/09/sharing-xvnc-sessions.html' title='Sharing Xvnc sessions'/><author><name>brenton</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://bp1.blogger.com/_E73ULx6FtrY/R9KuyOvV9wI/AAAAAAAAAoM/RsCk5Agp1Fc/S220/n500029382_9615.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6159470847873828659.post-7777095244504489912</id><published>2007-09-19T13:14:00.000-05:00</published><updated>2007-09-19T13:45:00.140-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='git'/><category scheme='http://www.blogger.com/atom/ns#' term='svn'/><title type='text'>Using git to cope with crazed svn repositories</title><content type='html'>If you ever find yourself working with a gnarly svn repo you may want to give &lt;span style="font-weight: bold;"&gt;git-svn&lt;/span&gt; a try.  You will be able to do your collaboration with git and then dump your changes back to svn.  The truth is many large projects are not yet ready to ditch svn completely and there may exist tooling already for svn that your team needs (and doesn't have time to rewrite).  For this reason exists &lt;span style="font-weight: bold;"&gt;git-svn&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;Initialize your svn aware git repository:&lt;br /&gt;mkdir mywork; cd mywork&lt;br /&gt;git svn init http://workserver.com/path/to/the/code/you/care/about&lt;br /&gt;git svn fetch -r [revision you care about]&lt;revision&gt;&lt;revision&gt;&lt;br /&gt;&lt;br /&gt;The reason I'm encouraging you to only grab the code you care about is because if you are working with a truly crazed svn repository things can get unnecessarily complex.  When I did a full svn import of the root on the svn repo where I work it took over 3 days to finish on a good connection.  The truth is there was only one branch that I really cared about.&lt;br /&gt;&lt;br /&gt;If you are working on a more complex project and having to deal with other groups that are using svn you may have to do a slightly more sophisticated initialization:&lt;br /&gt;&lt;br /&gt;git svn init https://workserver.com -T path/to/the/repo/you/want/to/commit/to -b dir/that/has/branches/of/other/teams&lt;br /&gt;&lt;br /&gt;The main thing to understand is that git-svn provides two-way communication between git and &lt;span style="font-weight: bold;"&gt;only one branch&lt;/span&gt; in svn.  The path you specify for '-T' needs to be that one branch.  It doesn't actually need to be the real trunk from svn's point on view--it's just the particular path you care about.&lt;br /&gt;&lt;br /&gt;Once you have initialized your repo you will need to do some fetching.  Again, you don't want to fetch more than you need.  One thing that was not intuitive for me was how the fetch works.  I immediately tried to check the latest revision and nothing was getting pulled down.  &lt;span style="font-weight: bold;"&gt;The trick is to pull down revision that actually have commits&lt;/span&gt;.  Use 'svn info' to find out the last revision where a particular path was changed.  You will need to do this for your 'trunk' and any other branch you care about.&lt;/revision&gt;&lt;/revision&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6159470847873828659-7777095244504489912?l=exawkuser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://exawkuser.blogspot.com/feeds/7777095244504489912/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6159470847873828659&amp;postID=7777095244504489912' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/7777095244504489912'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/7777095244504489912'/><link rel='alternate' type='text/html' href='http://exawkuser.blogspot.com/2007/09/using-git-to-cope-with-crazed-svn.html' title='Using git to cope with crazed svn repositories'/><author><name>brenton</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://bp1.blogger.com/_E73ULx6FtrY/R9KuyOvV9wI/AAAAAAAAAoM/RsCk5Agp1Fc/S220/n500029382_9615.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6159470847873828659.post-5007113566756760030</id><published>2007-08-27T20:41:00.001-05:00</published><updated>2007-08-27T20:43:00.049-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='erlang'/><title type='text'>Erlang Bit Syntax II</title><content type='html'>Since my previous post on the subject was so lame you should take a look at &lt;a href="http://community.livejournal.com/en_dmitriid/5806.html"&gt;a better article&lt;/a&gt; on the subject.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6159470847873828659-5007113566756760030?l=exawkuser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://exawkuser.blogspot.com/feeds/5007113566756760030/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6159470847873828659&amp;postID=5007113566756760030' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/5007113566756760030'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/5007113566756760030'/><link rel='alternate' type='text/html' href='http://exawkuser.blogspot.com/2007/08/erlang-bit-syntax-ii.html' title='Erlang Bit Syntax II'/><author><name>brenton</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://bp1.blogger.com/_E73ULx6FtrY/R9KuyOvV9wI/AAAAAAAAAoM/RsCk5Agp1Fc/S220/n500029382_9615.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6159470847873828659.post-1450210669669559619</id><published>2007-08-11T09:17:00.001-05:00</published><updated>2007-08-11T12:02:42.846-05:00</updated><title type='text'>Erlang bit syntax</title><content type='html'>I've been hacking around with Erlang off and on the last few weeks because I think it will be immediately useful for a few problems I'd like to solve.  When people are first exposed to Erlang they are often impressed by its support for massive concurrency and crazy "assign once" variables.  Aside from that I've found Erlang's bit syntax to be a pleasant surprise.&lt;br /&gt;&lt;br /&gt;What would someone want to do with a bunch of nasty bits?  Well the example in the PragProg book shows how to create a SHOUTcast server for streaming MP3s.  Using the bit syntax you can elegantly chop up the binary blobs to read the metadata.&lt;br /&gt;&lt;br /&gt;Here's an (unrelated) example taken from erlange.se:&lt;br /&gt;&lt;br /&gt;DgramSize = size(Dgram),&lt;br /&gt;      case Dgram of&lt;br /&gt;      &amp;lt;&amp;lt;?IP_VERSION:4, HLen:4, SrvcType:8, TotLen:16,&lt;br /&gt;      ID:16, Flgs:3, FragOff:13,&lt;br /&gt;      TTL:8, Proto:8, HdrChkSum:16,&lt;br /&gt;      SrcIP:32,&lt;br /&gt;      DestIP:32, RestDgram/binary&amp;gt;&amp;gt; when HLen &amp;gt;= 5, 4*HLen =&amp;lt; DgramSize -&amp;gt;&lt;br /&gt;      OptsLen = 4*(HLen - ?IP_MIN_HDR_LEN),&lt;br /&gt;      &amp;lt;&amp;lt;Opts:OptsLen/binary,Data/binary&amp;gt;&amp;gt; = RestDgram,&lt;br /&gt;      ...&lt;br /&gt;      end.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;opts:optslen data="" binary=""&gt;&lt;/opts:optslen&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;I appologize for the lack of indentation.  The method I have used previously for escaping code didn't like Erlang's use of '&lt;&lt;' instead of blogger's PRE tag.  It's that specific syntax, however, that is used for Erlang's bit packing and unpacking.  Equivalent code written in most languages would get a little nasty.    If you would like to see documentation on the syntax be sure to check out &lt;a href="http://www.erlang.se/euc/00/bit_syntax.html"&gt;this&lt;/a&gt; site.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6159470847873828659-1450210669669559619?l=exawkuser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://exawkuser.blogspot.com/feeds/1450210669669559619/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6159470847873828659&amp;postID=1450210669669559619' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/1450210669669559619'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/1450210669669559619'/><link rel='alternate' type='text/html' href='http://exawkuser.blogspot.com/2007/08/erlang-bit-syntax.html' title='Erlang bit syntax'/><author><name>brenton</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://bp1.blogger.com/_E73ULx6FtrY/R9KuyOvV9wI/AAAAAAAAAoM/RsCk5Agp1Fc/S220/n500029382_9615.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6159470847873828659.post-7391054464952106151</id><published>2007-06-14T08:31:00.000-05:00</published><updated>2007-06-14T08:45:12.100-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='closures'/><title type='text'>Ruby closure shootout</title><content type='html'>Ok, so I too have been bitten by the arity differences between Proc.new and lambda so a few months ago I tried to find the Ruby spec to get a better understand.  It was then I came to realize that the only true Ruby spec is defined by the C implementation.  While such a spec may allow for rapid improvements to the language it comes at the cost of warts--and Ruby is not without it's fair share.  I stumbled across &lt;a href="http://innig.net/software/ruby/closures-in-ruby.rb"&gt;this&lt;/a&gt; site today that is possibly the best 'research' compiled on Ruby's closures that I have seen to date.  It does a great job of exposing Ruby's warts while at the same time demonstrating the power of closures in Ruby.&lt;br /&gt;&lt;br /&gt;The article (it's really just a script you can feed the interpreter!) was encouraging in that it showed me I really should spend a little time in the MRI perusing the source for these sorts of tidbits.  I can really appreciate all the work that the groups heading up the various Ruby implementations are doing to &lt;a href="http://www.headius.com/rubyspec/index.php/Main_Page"&gt;formalize a Ruby spec&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6159470847873828659-7391054464952106151?l=exawkuser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://exawkuser.blogspot.com/feeds/7391054464952106151/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6159470847873828659&amp;postID=7391054464952106151' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/7391054464952106151'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/7391054464952106151'/><link rel='alternate' type='text/html' href='http://exawkuser.blogspot.com/2007/06/ruby-closure-shootout.html' title='Ruby closure shootout'/><author><name>brenton</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://bp1.blogger.com/_E73ULx6FtrY/R9KuyOvV9wI/AAAAAAAAAoM/RsCk5Agp1Fc/S220/n500029382_9615.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6159470847873828659.post-1112597720662614977</id><published>2007-06-02T22:26:00.000-05:00</published><updated>2007-06-03T16:55:28.542-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='hpricot'/><category scheme='http://www.blogger.com/atom/ns#' term='machanize'/><title type='text'>Black-boxing Google Translate</title><content type='html'>It seems like the more I watch the Mountain West sessions the more I stumble across solutions to itches I've had recently.  Just yesterday at work I was hacking with a friend on a simple CLI  for Google Translate and we were struggling a bit getting 'curb' to do exactly what we wanted.  After watching James Britt's session on &lt;a href="http://mtnwestrubyconf2007.confreaks.com/session06.html"&gt;Black-boxing with Ruby&lt;/a&gt; I realized that mechanize would probably be a better choice for what we were trying to do.  &lt;span style="font-weight: bold;"&gt;10 Minutes later&lt;/span&gt;:&lt;br /&gt;&lt;br /&gt;require 'rubygems'&lt;br /&gt;require 'mechanize'&lt;br /&gt;&lt;br /&gt;agent = WWW::Mechanize.new&lt;br /&gt;agent.user_agent_alias = 'Linux Mozilla'&lt;br /&gt;page = agent.get("http://translate.google.com/translate_t?langpair=en|#{ARGV.shift}")&lt;br /&gt;translate_form = page.forms[0]&lt;br /&gt;translate_form.text = ARGV.join(' ')&lt;br /&gt;translate_form.ie = "UTF8"&lt;br /&gt;translate_form.hl = "en"&lt;br /&gt;results = agent.submit(translate_form)&lt;br /&gt;puts Hpricot(results.body).search("//div[@id='result_box']")[0].to_plain_text&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;# Examples&lt;br /&gt;ruby translate.rb zh-CN "I love to eat tacos on Tuesdays" =&gt; 我爱吃tacos周二&lt;br /&gt;ruby translate.rb es "I love to eat tacos on Tuesdays" =&gt; Amo comer el tacos el martes&lt;br /&gt;&lt;br /&gt;While these may not be accurate translations, this script definitely works for testing out i18n functionality until the real translations come in.  If and whenever Google decides to release an API for their site it will be painless to throw this script away.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6159470847873828659-1112597720662614977?l=exawkuser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://exawkuser.blogspot.com/feeds/1112597720662614977/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6159470847873828659&amp;postID=1112597720662614977' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/1112597720662614977'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/1112597720662614977'/><link rel='alternate' type='text/html' href='http://exawkuser.blogspot.com/2007/06/black-boxing-google-translate.html' title='Black-boxing Google Translate'/><author><name>brenton</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://bp1.blogger.com/_E73ULx6FtrY/R9KuyOvV9wI/AAAAAAAAAoM/RsCk5Agp1Fc/S220/n500029382_9615.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6159470847873828659.post-922653668195063024</id><published>2007-06-02T21:58:00.000-05:00</published><updated>2007-06-02T22:26:37.062-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><title type='text'>Programming Rule #42</title><content type='html'>"Every problem has already been solved.  It is Open Source.  And it is the first result on Google"&lt;br /&gt;--&lt;span class="caption"&gt;Ara T. Howard (I don't know if he's actually the one who said that first, someone correct me if I'm wrong)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I spent some time this weekend watching the &lt;a href="http://mtnwestrubyconf2007.confreaks.com/"&gt;Mountain West Ruby Conf's videos&lt;/a&gt; and I must say what I've seen so far has been great (now I'm really exited about the Ruby Hoedown).   The session on Ruby Queue is going to be immediately useful to me in my effort to distribute selenium tests over a linux cluster.  It's actually quite amazing that the solution I had cooked up approached the task of clustering from almost the same way--simply using a queue to feed shell tasks to an array of nodes.  It's quite ironic in light of Ara's quote on Rule #42 and his project that basically sent mine to the grave. &lt;br /&gt;&lt;br /&gt;Luckily my solution was only the product of a few weeks of work off and on.  In &lt; style="font-weight: bold;"&gt;it's that simple&lt;/span&gt;.  So, I'm going to take my project off rubyforge and stick it somewhere else.  The one thing that I really need that RQ doesn't handle is clustering with Windows machines.  Since I need to run tests with IE I'll have to spend some time to see if this is something that could be worked into RQ.  I have absolutely zero experience with Windows and NFS so I don't have any idea how much work would be needed at this point.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6159470847873828659-922653668195063024?l=exawkuser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://exawkuser.blogspot.com/feeds/922653668195063024/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6159470847873828659&amp;postID=922653668195063024' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/922653668195063024'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/922653668195063024'/><link rel='alternate' type='text/html' href='http://exawkuser.blogspot.com/2007/06/programming-rule-42.html' title='Programming Rule #42'/><author><name>brenton</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://bp1.blogger.com/_E73ULx6FtrY/R9KuyOvV9wI/AAAAAAAAAoM/RsCk5Agp1Fc/S220/n500029382_9615.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6159470847873828659.post-8754860560678906654</id><published>2007-05-08T11:20:00.000-05:00</published><updated>2007-05-08T11:29:00.614-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><category scheme='http://www.blogger.com/atom/ns#' term='unix'/><title type='text'>": No such file or directory" error from bash</title><content type='html'>I hit a strange problem this morning that I hadn't seen before.  I tried to run a ruby script and bash kept telling me ': No such file or directory'.  I then tried feeding the script to the interpreter directly and things worked as expected.  After double and triple checking my shebang line everything seemed correct.  It then occurred to me to think about where I had gotten the particular script in question from.  It was generated by the Selenium IDE while I was on a windows test machine a few weeks before.   As many already know line breaks in the windows world end with simply a carriage return and not a carriage return linefeed pair.  I used the wonderful dos2unix utility to sanitize my script and then everything worked as expected.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6159470847873828659-8754860560678906654?l=exawkuser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://exawkuser.blogspot.com/feeds/8754860560678906654/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6159470847873828659&amp;postID=8754860560678906654' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/8754860560678906654'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/8754860560678906654'/><link rel='alternate' type='text/html' href='http://exawkuser.blogspot.com/2007/05/no-such-file-or-directory-error-from.html' title='&quot;: No such file or directory&quot; error from bash'/><author><name>brenton</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://bp1.blogger.com/_E73ULx6FtrY/R9KuyOvV9wI/AAAAAAAAAoM/RsCk5Agp1Fc/S220/n500029382_9615.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6159470847873828659.post-2682445967852572739</id><published>2007-04-27T20:44:00.000-05:00</published><updated>2007-04-27T21:08:12.762-05:00</updated><title type='text'>Get to know your inner eigenclass</title><content type='html'>I spent some more time looking for interesting articles on ruby metaprogramming.   After deciding upon my method of search I quickly fired off an amazing google query for (hold your breath...) "ruby metaprogramming".  I came across &lt;a href="http://practicalruby.blogspot.com/2007/02/ruby-metaprogramming-introduction.html"&gt;this article &lt;/a&gt;in no time and when I saw how horrible the site looked I quickly closed the page and begged my eyes for forgiveness.  A little while later I came across another blog that was praising that particular article so  I figured I should at least read a bit.  It turned out to be a very well written article that helped me understand the concept of class vs. metaclass (aka eigenclass).  I recommend viewing that page in elinks.&lt;br /&gt;&lt;br /&gt;* Observant readers will note that the theme used in the aforementioned site is the exaxt same as the author of this blog.  It's now become patent to me how hard it is to read.  You should probably be reading this site in a feed reader anyway.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6159470847873828659-2682445967852572739?l=exawkuser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://exawkuser.blogspot.com/feeds/2682445967852572739/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6159470847873828659&amp;postID=2682445967852572739' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/2682445967852572739'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/2682445967852572739'/><link rel='alternate' type='text/html' href='http://exawkuser.blogspot.com/2007/04/get-to-know-your-inner-eigenclass.html' title='Get to know your inner eigenclass'/><author><name>brenton</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://bp1.blogger.com/_E73ULx6FtrY/R9KuyOvV9wI/AAAAAAAAAoM/RsCk5Agp1Fc/S220/n500029382_9615.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6159470847873828659.post-4240686693892386543</id><published>2007-04-25T19:02:00.000-05:00</published><updated>2007-04-25T19:21:07.703-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='meta programming'/><category scheme='http://www.blogger.com/atom/ns#' term='dsl'/><title type='text'>If you can read this you are too big to play here.</title><content type='html'>I remember when I was in preschool I used to climb on a huge tree in the middle of the playground.  My friend David and I would catch caterpillars and then squish them on the steps of the school to see what color they were inside.  That tree is barely standing now and I've long since realized that squishing things for mere novelty is a little strange.  Another thing I discovered later in life was a sign that was hanging from the surrounding fence stating, "If you can read this you are too big to play here".&lt;br /&gt;&lt;br /&gt;After my first pass reading &lt;a href="http://www.infoq.com/articles/eval-options-in-ruby"&gt;this article on InfoQ&lt;/a&gt; I had the an all too familiar feeling as if there was something going on that missing me entirely.  I read through it a second time and the uses of eval, class/module_eval and instance_eval are starting to become more apparent.  Read the code and pay close attention to the use of eval.  It might not be so evil after all.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6159470847873828659-4240686693892386543?l=exawkuser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://exawkuser.blogspot.com/feeds/4240686693892386543/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6159470847873828659&amp;postID=4240686693892386543' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/4240686693892386543'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/4240686693892386543'/><link rel='alternate' type='text/html' href='http://exawkuser.blogspot.com/2007/04/if-you-can-read-this-you-are-too-big-to.html' title='If you can read this you are too big to play here.'/><author><name>brenton</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://bp1.blogger.com/_E73ULx6FtrY/R9KuyOvV9wI/AAAAAAAAAoM/RsCk5Agp1Fc/S220/n500029382_9615.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6159470847873828659.post-620929577265442958</id><published>2007-04-24T18:41:00.000-05:00</published><updated>2007-04-24T18:46:14.816-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='jruby'/><title type='text'>JRuby 0.9.9 is out in the wild</title><content type='html'>If JRuby isn't on your radar it should be--especially with today's announcement of JRuby 0.9.9.  The investments in optimization are starting to pay dividends.  I think one of the most impressive aspects of this project is the momentum.&lt;br /&gt;&lt;br /&gt;Aren't familiar with JRuby?  Watch this video of a presentation by Ola Bini last month on JRuby 0.9.8:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;embed style="width: 400px; height: 326px;" id="VideoPlayback" type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docId=1443646504333552360&amp;amp;hl=en" flashvars=""&gt;&lt;/embed&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6159470847873828659-620929577265442958?l=exawkuser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://exawkuser.blogspot.com/feeds/620929577265442958/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6159470847873828659&amp;postID=620929577265442958' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/620929577265442958'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/620929577265442958'/><link rel='alternate' type='text/html' href='http://exawkuser.blogspot.com/2007/04/jruby-099-is-out-in-wild.html' title='JRuby 0.9.9 is out in the wild'/><author><name>brenton</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://bp1.blogger.com/_E73ULx6FtrY/R9KuyOvV9wI/AAAAAAAAAoM/RsCk5Agp1Fc/S220/n500029382_9615.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6159470847873828659.post-2709623472035997484</id><published>2007-04-24T16:06:00.000-05:00</published><updated>2007-04-24T16:12:05.602-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='activerecord'/><category scheme='http://www.blogger.com/atom/ns#' term='camping'/><title type='text'>Migration gotcha</title><content type='html'>Apparently sqlite3 is more forgiving than mysql when it comes to migrations.  I found out today that there is no need to specify the ':id' column and if you try it with mysql5 you will get an error similar to:&lt;br /&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;blockquote&gt;Mysql::Error: &lt;span class="er"&gt;#&lt;/span&gt;&lt;span class="i"&gt;42000&lt;/span&gt;You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near &lt;span class="s"&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="k"&gt;(11), `suite_id` int(11) DEFAULT NULL, `text` varchar(128) DEFAULT NULL) ENGINE=&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;/span&gt; at line &lt;span class="i"&gt;1&lt;/span&gt;: &lt;span class="r"&gt;CREATE&lt;/span&gt; &lt;span class="r"&gt;TABLE&lt;/span&gt; surefire_notes (&lt;span class="s"&gt;&lt;span class="dl"&gt;`&lt;/span&gt;&lt;span class="k"&gt;id&lt;/span&gt;&lt;span class="dl"&gt;`&lt;/span&gt;&lt;/span&gt; &lt;span class="pt"&gt;int&lt;/span&gt;(&lt;span class="i"&gt;11&lt;/span&gt;) DEFAULT &lt;span class="pc"&gt;NULL&lt;/span&gt; auto_increment &lt;span class="r"&gt;PRIMARY&lt;/span&gt; &lt;span class="r"&gt;KEY&lt;/span&gt;(&lt;span class="i"&gt;11&lt;/span&gt;), &lt;span class="s"&gt;&lt;span class="dl"&gt;`&lt;/span&gt;&lt;span class="k"&gt;suite_id&lt;/span&gt;&lt;span class="dl"&gt;`&lt;/span&gt;&lt;/span&gt; &lt;span class="pt"&gt;int&lt;/span&gt;(&lt;span class="i"&gt;11&lt;/span&gt;) DEFAULT &lt;span class="pc"&gt;NULL&lt;/span&gt;, &lt;span class="s"&gt;&lt;span class="dl"&gt;`&lt;/span&gt;&lt;span class="k"&gt;text&lt;/span&gt;&lt;span class="dl"&gt;`&lt;/span&gt;&lt;/span&gt; &lt;span class="pt"&gt;varchar&lt;/span&gt;(&lt;span class="i"&gt;128&lt;/span&gt;) DEFAULT &lt;span class="pc"&gt;NULL&lt;/span&gt;) ENGINE=InnoDB&lt;/blockquote&gt;The problem has to do with the '&lt;span class="r"&gt;PRIMARY&lt;/span&gt; &lt;span class="r"&gt;KEY&lt;/span&gt;(&lt;span class="i"&gt;11&lt;/span&gt;)'.  I pasted the above command directly into mysql and removed the '(11)' and everything worked just fine.  With some more googling I came across &lt;a href="http://codefix.jusx.net/2007/03/29/rails-migrations-gotcha/"&gt;this site&lt;/a&gt; which further confirmed my discovery.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6159470847873828659-2709623472035997484?l=exawkuser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://exawkuser.blogspot.com/feeds/2709623472035997484/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6159470847873828659&amp;postID=2709623472035997484' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/2709623472035997484'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/2709623472035997484'/><link rel='alternate' type='text/html' href='http://exawkuser.blogspot.com/2007/04/migration-gotcha.html' title='Migration gotcha'/><author><name>brenton</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://bp1.blogger.com/_E73ULx6FtrY/R9KuyOvV9wI/AAAAAAAAAoM/RsCk5Agp1Fc/S220/n500029382_9615.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6159470847873828659.post-3653936076626978840</id><published>2007-04-23T14:49:00.000-05:00</published><updated>2007-04-24T18:37:22.068-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='meta programming'/><title type='text'>The best explanation of metaclasses in Ruby I've found</title><content type='html'>I stumbled across "&lt;a href="http://whytheluckystiff.net/articles/seeingMetaclassesClearly.html"&gt;seeingMetaclassesClearly.html&lt;/a&gt;    " today.  I don't know how I never came across it.  It's definately the best explanation of metaclasses in Ruby I've ever read.  Now the whole "class &lt;&lt; obj; def meth; puts "hello from the metaclass"; end; end;" syntax makes sense.  Previously I had used "obj.extend(module)" before but the former is obviously more convenient if you are in a class definition.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6159470847873828659-3653936076626978840?l=exawkuser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://exawkuser.blogspot.com/feeds/3653936076626978840/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6159470847873828659&amp;postID=3653936076626978840' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/3653936076626978840'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/3653936076626978840'/><link rel='alternate' type='text/html' href='http://exawkuser.blogspot.com/2007/04/best-explanation-of-metaclasses-in-ruby.html' title='The best explanation of metaclasses in Ruby I&apos;ve found'/><author><name>brenton</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://bp1.blogger.com/_E73ULx6FtrY/R9KuyOvV9wI/AAAAAAAAAoM/RsCk5Agp1Fc/S220/n500029382_9615.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6159470847873828659.post-6411753264420074883</id><published>2007-04-04T08:33:00.000-05:00</published><updated>2007-04-04T08:52:53.943-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='drb'/><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><category scheme='http://www.blogger.com/atom/ns#' term='cygwin'/><title type='text'>getaddrinfo: name or service not known</title><content type='html'>Once again I find myself trying to get a ruby app working on a windows machine.  I can hardly express bad I feel for anyone who is plagued to work in such an environment full time.  The last time I was struggling to understand how Ruby's in-process threads on win32 are not concurrent.  This time around it's trying to understand why getaddrinfo() was failing.&lt;br /&gt;&lt;br /&gt;Basically I'm working with DRb which by default uses TCPSocket as the default protocol.  Socket.getaddrinfo() was telling me 'name or service not known' when it was trying to connect to the DRb server on my unix host.  After hours of googling around learning about getaddrinfo() on windows and cygwin I came to realize that my problem was probably not related to what most of the google (and yahoo) results were returning.  Apparently there was a time when that call would simply fail or was not implemented in cygwin. It turned out my problem was actually related to the hostname of the machine it was working on: 'LENOVO-A0EFF48'.  I can't say I totally understand the relationship between cygwin and windows understand of a machine's hostname but I eventually changed the hostname to 'localhost'.  I rebooted I got a different error because my VPN was choking (and I suspected it to be related to the hostname change).  I then changed the hostname to 'laptop' and rebooted.  Voila, my VPN and getaddrinfo() worked.  Now I think I'm back to fighting Ruby threading issues on windows.&lt;br /&gt;&lt;br /&gt;When I get around to it I'll look microsoft's getaddrinfo() source and figure out why it was choking on 'LENOVO-A0EFF48', oh wait....&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6159470847873828659-6411753264420074883?l=exawkuser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://exawkuser.blogspot.com/feeds/6411753264420074883/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6159470847873828659&amp;postID=6411753264420074883' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/6411753264420074883'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/6411753264420074883'/><link rel='alternate' type='text/html' href='http://exawkuser.blogspot.com/2007/04/getaddrinfo-name-or-service-not-known.html' title='getaddrinfo: name or service not known'/><author><name>brenton</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://bp1.blogger.com/_E73ULx6FtrY/R9KuyOvV9wI/AAAAAAAAAoM/RsCk5Agp1Fc/S220/n500029382_9615.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6159470847873828659.post-4856040233214714</id><published>2007-03-14T07:21:00.000-05:00</published><updated>2007-03-14T08:19:17.684-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='open source'/><category scheme='http://www.blogger.com/atom/ns#' term='fedora'/><title type='text'>FC6</title><content type='html'>I installed FC6 on my friend's PC.  He had been wanted to try out linux for a long time so when I came to visit him in Bilbao we sat down and I gave him a crash course in unix.&lt;br /&gt;&lt;br /&gt;The things he was most impressed about:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;OpenOffice (he really just need a nice way to make PDFs and presentations)&lt;/li&gt;&lt;li&gt;He could use skype (he calls home to Brazil a lot)&lt;/li&gt;&lt;li&gt;He could use all his other messengers&lt;/li&gt;&lt;li&gt;Lots of software he was already familiar with is open source (he just didn't know it)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;It ran on his old computer extremely well and his hardware Just Worked(TM)&lt;/li&gt;&lt;li&gt;He could learn the basics in an afternoon.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;He doesn't really have time to play around with all of the other open source software I installed and I obviously didn't teach him anything about the commandline or anything of that nature.  He really just wanted a machine in his living room for his family and visitors to use and not have to be worried about viruses and endless maintenance.  For those switching to linux from lesser operating environments the hard part is just picking a distro and getting it setup initially.  Many users use so few programs that once everything is setup they are set for a few years.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://picasaweb.google.com/brenton.leanhardt/Spain2007/photo#5040837018898197618"&gt;&lt;img src="http://lh4.google.com/image/brenton.leanhardt/RfSmj6oQ7HI/AAAAAAAAAHs/ub_sP-WB9MA/s144/IMG_0228.JPG" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6159470847873828659-4856040233214714?l=exawkuser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://exawkuser.blogspot.com/feeds/4856040233214714/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6159470847873828659&amp;postID=4856040233214714' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/4856040233214714'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/4856040233214714'/><link rel='alternate' type='text/html' href='http://exawkuser.blogspot.com/2007/03/fc6.html' title='FC6'/><author><name>brenton</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://bp1.blogger.com/_E73ULx6FtrY/R9KuyOvV9wI/AAAAAAAAAoM/RsCk5Agp1Fc/S220/n500029382_9615.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6159470847873828659.post-6242425230000321826</id><published>2007-03-13T10:20:00.000-05:00</published><updated>2007-03-13T10:28:34.527-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mutt'/><title type='text'>mutt header caching</title><content type='html'>I was wondering why when I built mutt 1.5.13 I only noticed a slight performance boost over 1.4.x when headers were being loaded.  I finally realized I never configured header caching!!  Here are my newly revised compile time options:&lt;br /&gt;&lt;br /&gt;./configure --enable-pop --enable-imap --with-gss --with-ssl --with-sasl --enable-hcache&lt;br /&gt;&lt;br /&gt;From there it's just a matter of adding 'set header_cache=/path/to/cache' to your muttrc.  Go ahead, try it out for yourself!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6159470847873828659-6242425230000321826?l=exawkuser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://exawkuser.blogspot.com/feeds/6242425230000321826/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6159470847873828659&amp;postID=6242425230000321826' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/6242425230000321826'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/6242425230000321826'/><link rel='alternate' type='text/html' href='http://exawkuser.blogspot.com/2007/03/mutt-header-caching.html' title='mutt header caching'/><author><name>brenton</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://bp1.blogger.com/_E73ULx6FtrY/R9KuyOvV9wI/AAAAAAAAAoM/RsCk5Agp1Fc/S220/n500029382_9615.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6159470847873828659.post-1396328941405753829</id><published>2007-03-13T08:18:00.000-05:00</published><updated>2007-03-13T08:26:47.715-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mutt'/><title type='text'>Getting mutt to autocomplete multiple email addresses</title><content type='html'>I have a query command specified in my muttrc.  Basically it's perl script that searches the corporate ldap server.  It works just fine whenever I type 'Q' from the pager and  I can even type 'A' to append to the query.  My problem is that I couldn't figure out how to select multiple entries.  I googled for a while and the best thing out found was typing '^T' while entering text in the To: field.  That allowed me to use my query command for sending emails to multiple people.  My guess is that it will also work for any other fields as well.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6159470847873828659-1396328941405753829?l=exawkuser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://exawkuser.blogspot.com/feeds/1396328941405753829/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6159470847873828659&amp;postID=1396328941405753829' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/1396328941405753829'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/1396328941405753829'/><link rel='alternate' type='text/html' href='http://exawkuser.blogspot.com/2007/03/getting-mutt-to-autocomplete-multiple.html' title='Getting mutt to autocomplete multiple email addresses'/><author><name>brenton</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://bp1.blogger.com/_E73ULx6FtrY/R9KuyOvV9wI/AAAAAAAAAoM/RsCk5Agp1Fc/S220/n500029382_9615.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6159470847873828659.post-6093153339420413767</id><published>2007-02-25T21:57:00.001-05:00</published><updated>2007-02-25T21:57:31.175-05:00</updated><title type='text'>7 Habits For Effective Text Editing 2.0</title><content type='html'>&lt;table cellpadding="0" cellspacing="0" border="0"&gt;&lt;tr&gt;&lt;td colspan="2"&gt;&lt;embed style="width:400px; height:326px;" id="VideoPlayback" type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docId=2538831956647446078&amp;hl=en" flashvars=""&gt; &lt;/embed&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;I&amp;#39;ve been watching videos on Google lately.  Here&amp;#39;s one that I really enjoyed and it&amp;#39;s inspiring me to do a talk at my work on vim.  It seems like every vim hacker has their own bag of tricks that help their productivity and cross-pollination is a good thing.  &lt;br /&gt;&lt;br /&gt;Seriously, find time to watch a little bit of this video.  Actually, more importantly--find time to learn more about your text editor and then hack!  This video encouraged me to find ways to leverage my vim knowledge in other areas.  I&amp;#39;ve finally started using mutt for email (for some reason I thought it was going to be hard to get working and had been putting it off for a long time).  &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6159470847873828659-6093153339420413767?l=exawkuser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://exawkuser.blogspot.com/feeds/6093153339420413767/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6159470847873828659&amp;postID=6093153339420413767' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/6093153339420413767'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/6093153339420413767'/><link rel='alternate' type='text/html' href='http://exawkuser.blogspot.com/2007/02/7-habits-for-effective-text-editing-20.html' title='7 Habits For Effective Text Editing 2.0'/><author><name>brenton</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://bp1.blogger.com/_E73ULx6FtrY/R9KuyOvV9wI/AAAAAAAAAoM/RsCk5Agp1Fc/S220/n500029382_9615.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6159470847873828659.post-2159687307001373295</id><published>2007-02-18T14:40:00.000-05:00</published><updated>2007-05-06T11:29:08.170-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby curb hpricot'/><title type='text'>Stickittodamanitis</title><content type='html'>&lt;div style="text-align: left;"&gt;I stumbled across &lt;a href="http://www.watchmycell.com/download.php"&gt;this program&lt;/a&gt; last night and figured I hack it out for those of us who don't met the installation requirements.  It's been something that has annoyed me about every cell phone carrier I've ever had--not having an easy way to know my monthly usage.  Actually, I can't complain too much, I remember when I had SunCom years ago and I couldn't even get that information from a website. The truth is Verizon's site isn't that much fun to use and I never check it more than once a month.  Enter saldo.rb:&lt;br /&gt;&lt;br /&gt;(I don't have enscript configured on this machine, please forgive me for how blogger displays this)&lt;br /&gt;&lt;br /&gt;#!/usr/bin/env ruby&lt;br /&gt;require 'rubygems'&lt;br /&gt;require 'curb'&lt;br /&gt;require 'hpricot'&lt;br /&gt;&lt;br /&gt;username = Curl::PostField.content('IDToken1', ARGV[0])&lt;br /&gt;password = Curl::PostField.content('IDToken2', ARGV[1])&lt;br /&gt;realm = Curl::PostField.content('realm', 'vzw')&lt;br /&gt;charset = Curl::PostField.content('gx_charset', 'UTF-8')&lt;br /&gt;&lt;br /&gt;c = Curl::Easy.new&lt;br /&gt;c.url = "https://login.verizonwireless.com:443/amserver/UI/Login"&lt;br /&gt;c.enable_cookies = true&lt;br /&gt;c.http_post(username, password, realm, charset)&lt;br /&gt;&lt;br /&gt;c.url = "https://ebillpay.verizonwireless.com/vzw/overview/unbilled-usage-minutes.do"&lt;br /&gt;c.perform&lt;br /&gt;Hpricot(c.body_str).search("//table[@class='modStdTbl']").each do |table|&lt;br /&gt;(table/"//tr").each do |row|&lt;br /&gt;     #I couldn't get the CGI library to unescape ;&lt;br /&gt;     (row/"//td").each {|c| print c.to_plain_text.gsub(/;? /, "") + "\t\t"}&lt;br /&gt;  puts&lt;br /&gt; end&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;Saldo is a term used in Spain to refer the the remaining balance on your phone.  Since most people over tend to use the 'pay as you go' plan it's important to always know how much you have left.  All the providers I know of in Europe make that fairly painless to find out from your phone.  Until I get that from Verizon I'm going to be running this as a cronjob and mailing it out to myself and my wife.&lt;br /&gt;&lt;br /&gt;I'm not sure how watchmycell is implemented but my guess is it's something similar.  I couldn't find any sort of web services provided by Verizon so I had to use curb and hpricot.&lt;br /&gt;&lt;span style="text-decoration: underline;"&gt;&lt;/span&gt;&lt;a href="http://www.watchmycell.com/download.php"&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="text-decoration: underline;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6159470847873828659-2159687307001373295?l=exawkuser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://exawkuser.blogspot.com/feeds/2159687307001373295/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6159470847873828659&amp;postID=2159687307001373295' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/2159687307001373295'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/2159687307001373295'/><link rel='alternate' type='text/html' href='http://exawkuser.blogspot.com/2007/02/stickittodamanitis.html' title='Stickittodamanitis'/><author><name>brenton</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://bp1.blogger.com/_E73ULx6FtrY/R9KuyOvV9wI/AAAAAAAAAoM/RsCk5Agp1Fc/S220/n500029382_9615.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6159470847873828659.post-2132728920698130703</id><published>2007-01-27T20:20:00.000-05:00</published><updated>2007-01-27T20:52:13.471-05:00</updated><title type='text'>Windows is driving me to the bleeding edge...</title><content type='html'>of my sanity.  Did you know that Ruby's green threads on windows are worthless?  Ok, they aren't completely trash, I mean, they do indeed work but the problem is that they don't run in parallel.   Kind of a bummer, eh?&lt;br /&gt;&lt;br /&gt;It's especially frustrating when I hacked up a dsl and a RESTful service for executing commands on remote clients in a few hours and I have spent an entire day of my life trying to get it to work properly in windows.  I guess this is where Ruby's unix prejudice really starts to show (personally, that's fine with me). &lt;br /&gt;&lt;br /&gt;So, after finally figuring out why my DRb server was unresponsive after spawning a new thread I figured I would try using JRuby since it uses Java Threads.  Let me first say that I'm quite impressed with the work that the JRuby team is doing.  However, due to a bug that exists in the 0.9.x branch I was still unable to get DRb to spawn the thread properly either (for totally different reasons).  On a sidenote my friend ruby-debug doesn't currently work under JRuby either.  I will dig deeper into that problem later, but after spending and 2 hours and getting 'no where' I have moved on.&lt;br /&gt;&lt;br /&gt;So I'm switching to edge YARV.  That's the bytecode interpreter that's shipping with Ruby 2.0.  I read that there are more threading options available in YARV and I'm interested to see if it helps me out at all.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6159470847873828659-2132728920698130703?l=exawkuser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://exawkuser.blogspot.com/feeds/2132728920698130703/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6159470847873828659&amp;postID=2132728920698130703' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/2132728920698130703'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/2132728920698130703'/><link rel='alternate' type='text/html' href='http://exawkuser.blogspot.com/2007/01/windows-is-driving-me-to-bleeding-edge.html' title='Windows is driving me to the bleeding edge...'/><author><name>brenton</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://bp1.blogger.com/_E73ULx6FtrY/R9KuyOvV9wI/AAAAAAAAAoM/RsCk5Agp1Fc/S220/n500029382_9615.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6159470847873828659.post-782101256123785358</id><published>2007-01-18T12:31:00.000-05:00</published><updated>2007-01-18T13:36:14.663-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='oss'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><category scheme='http://www.blogger.com/atom/ns#' term='freedom'/><title type='text'>Mark, we need arrive at a clearer definition of the word free...</title><content type='html'>Because it's really starting to bother me that you say the word 'free' as if you don't know there are two distinct meanings in the open source ecosystem.  &lt;span style="font-weight: bold;"&gt;I will choose freedom before I choose free beer.&lt;/span&gt;  Let's call your definition of free 'FREE' and we'll call mine 'free'.&lt;br /&gt;&lt;br /&gt;While I think it's important to many people that things are FREE I believe the greater good is freedom.  Freedom to tinker, break, improve and understand.  I'm worried you think that if everyone just starts using FREE software the world will be a better place.  I posit that if the world (for some definition of 'world') understood the freedoms that come with free software and used it to it's full potential the world would indeed be a better place.  From what I've seen on the net recently the EU might be starting to understand this.&lt;br /&gt;&lt;br /&gt;Let's put our motives aside and not label companies that have made great contributions to freedom as not 'FREE'.  The truth is Mark the freedom is in the source.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.markshuttleworth.com/archives/77"&gt;http://www.markshuttleworth.com/archives/77&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6159470847873828659-782101256123785358?l=exawkuser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://exawkuser.blogspot.com/feeds/782101256123785358/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6159470847873828659&amp;postID=782101256123785358' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/782101256123785358'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/782101256123785358'/><link rel='alternate' type='text/html' href='http://exawkuser.blogspot.com/2007/01/mark-we-need-arrive-at-clearer.html' title='Mark, we need arrive at a clearer definition of the word free...'/><author><name>brenton</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://bp1.blogger.com/_E73ULx6FtrY/R9KuyOvV9wI/AAAAAAAAAoM/RsCk5Agp1Fc/S220/n500029382_9615.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6159470847873828659.post-3235496757914211798</id><published>2007-01-12T18:28:00.000-05:00</published><updated>2007-01-12T19:01:01.511-05:00</updated><title type='text'>Overloading a method within a class.</title><content type='html'>I came to an interesting realization today what I came home from work and started to look through what had been posted to comp.lang.ruby.  The language I program in has drastic effects on my design.  Actually, I guess I've always thought to that be true.   That's probably why I prefer to do certain things in one language over another.  Anyway, enough of my being theoretical.  Read &lt;a href="http://groups.google.com/group/comp.lang.ruby/browse_thread/thread/18773cfbf16ac59b?hl=en"&gt;this&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;What I find fascinating is that in over two years of hacking ruby it has never even once occurred to me that I couldn't overload a method within a class.  Why?  Because Matz and the other Ruby commiters have found it to be a Bad Thing(TM) and Ruby encourages you to do good things.  Yeah, yeah, if you read the whole thread another reason for not implementing it is because it would be hard to do.  With that aside I've already started to loathe seeing multiple constructor signatures in a class and that's pretty much the same thing.  Just make a static constructor and give it a name that actually means something.  None of this 'new Foo(x); new Foo(x,y); new Foo(x,y,z)' trash.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6159470847873828659-3235496757914211798?l=exawkuser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://exawkuser.blogspot.com/feeds/3235496757914211798/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6159470847873828659&amp;postID=3235496757914211798' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/3235496757914211798'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/3235496757914211798'/><link rel='alternate' type='text/html' href='http://exawkuser.blogspot.com/2007/01/overloading-method-with-class.html' title='Overloading a method within a class.'/><author><name>brenton</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://bp1.blogger.com/_E73ULx6FtrY/R9KuyOvV9wI/AAAAAAAAAoM/RsCk5Agp1Fc/S220/n500029382_9615.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6159470847873828659.post-4638699879582716059</id><published>2007-01-10T21:34:00.000-05:00</published><updated>2007-01-10T21:48:11.800-05:00</updated><title type='text'>Kernel#gets vs. IO#gets</title><content type='html'>I made an interesting discovery tonight while hacking on widi (it's actually quite embarrassing that I never came across this before).  Whenever you are trying to read from stdin in ruby you typically just type 'gets' and don't think twice.  I found out there are actually two different 'gets' methods, Kernel#gets and IO#gets.&lt;br /&gt;&lt;br /&gt;Usually you don't notice the difference simply because if ARGV doesn't exist Kernel#gets simply reads from stdin.  However,  tonight I started building out some of the scm wrapper functionality of widi and naturally I was adding command line arguments.  This caused widi to die a painful death.  It's last words were:&lt;br /&gt;&lt;blockquote&gt;kill #: widi.rb:27:in `gets': No such file or directory - kill (Errno::ENOENT)&lt;br /&gt;      from widi.rb:27&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;To fix the problem I googled a bit and realized I needed to explicitly tell ruby to check stdin using the global variable $stdin (IO#gets is private so don't even bother trying to call it!).  Not exactly intuitive but I guess I can't complain too much.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6159470847873828659-4638699879582716059?l=exawkuser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://exawkuser.blogspot.com/feeds/4638699879582716059/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6159470847873828659&amp;postID=4638699879582716059' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/4638699879582716059'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/4638699879582716059'/><link rel='alternate' type='text/html' href='http://exawkuser.blogspot.com/2007/01/kernelgets-vs-iogets.html' title='Kernel#gets vs. IO#gets'/><author><name>brenton</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://bp1.blogger.com/_E73ULx6FtrY/R9KuyOvV9wI/AAAAAAAAAoM/RsCk5Agp1Fc/S220/n500029382_9615.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6159470847873828659.post-3153416188667511557</id><published>2007-01-07T12:37:00.000-05:00</published><updated>2007-01-07T12:55:32.969-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='vim'/><title type='text'>I will learn something new about vim every day of my life until I die.</title><content type='html'>I never cease to be amazed by the raw power of vim.  Over the last year it has become my editor of choice for ruby code.  I even find myself closing my IDE and using vim to edit java code from time to time when things get serious (I swear I could write a web app using only vim macros).&lt;br /&gt;&lt;br /&gt;So, I suggest you take some time and read &lt;a href="http://jmcpherson.org/editing.html"&gt;Jonathan's McPherson's blog entry &lt;/a&gt; on efficiently using vim.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6159470847873828659-3153416188667511557?l=exawkuser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://exawkuser.blogspot.com/feeds/3153416188667511557/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6159470847873828659&amp;postID=3153416188667511557' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/3153416188667511557'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/3153416188667511557'/><link rel='alternate' type='text/html' href='http://exawkuser.blogspot.com/2007/01/i-will-learn-something-new-about-vim.html' title='I will learn something new about vim every day of my life until I die.'/><author><name>brenton</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://bp1.blogger.com/_E73ULx6FtrY/R9KuyOvV9wI/AAAAAAAAAoM/RsCk5Agp1Fc/S220/n500029382_9615.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6159470847873828659.post-2711354182692185774</id><published>2007-01-02T22:17:00.000-05:00</published><updated>2007-01-02T22:20:11.224-05:00</updated><title type='text'>ruby-breakpoint</title><content type='html'>Apparently no one uses ruby-breakpoint anymore.  For some strange reason it just stopping working for me all together (that's what really disturbs me).  I would hit a breakpoint and it was as if the proper binding simply wasn't being set.  I didn't have access to the scope in which the breakpoint was executed (that's not very helpful).&lt;br /&gt;&lt;br /&gt;Luckily  I came  across 'ruby-debug'.  Everyone on #ruby-lang says it's cooler anyway.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6159470847873828659-2711354182692185774?l=exawkuser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://exawkuser.blogspot.com/feeds/2711354182692185774/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6159470847873828659&amp;postID=2711354182692185774' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/2711354182692185774'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/2711354182692185774'/><link rel='alternate' type='text/html' href='http://exawkuser.blogspot.com/2007/01/ruby-breakpoint.html' title='ruby-breakpoint'/><author><name>brenton</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://bp1.blogger.com/_E73ULx6FtrY/R9KuyOvV9wI/AAAAAAAAAoM/RsCk5Agp1Fc/S220/n500029382_9615.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6159470847873828659.post-1421606445752484924</id><published>2007-01-01T20:51:00.000-05:00</published><updated>2007-01-01T21:41:08.380-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='meta programming'/><title type='text'>define_method</title><content type='html'>I frequently find myself writing the exact same method over and over with only minor differences between them (I'm sure there are plenty of &lt;span style="font-style: italic;"&gt;design patterns&lt;/span&gt; to get around this in every language).   One way of getting around this in ruby without much fuss is 'define_method'.  Here's a snippet from Widi:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;br /&gt;[&lt;b&gt;&lt;span style="color: rgb(188, 143, 143);"&gt;'header'&lt;/span&gt;&lt;/b&gt;, &lt;b&gt;&lt;span style="color: rgb(188, 143, 143);"&gt;'footer'&lt;/span&gt;&lt;/b&gt;].each &lt;b&gt;&lt;span style="color: rgb(160, 32, 240);"&gt;do&lt;/span&gt;&lt;/b&gt; |m|&lt;br /&gt;define_method(&lt;b&gt;&lt;span style="color: rgb(188, 143, 143);"&gt;'generate_'&lt;/span&gt;&lt;/b&gt; + m) {&lt;br /&gt;&lt;span style="color: rgb(184, 134, 11);"&gt;  @widi_config&lt;/span&gt; = WEBrick::Config::Widi&lt;br /&gt; file = &lt;span style="color: rgb(184, 134, 11);"&gt;@widi_config&lt;/span&gt;[m.capitalize.to_sym]        &lt;b&gt;&lt;span style="color: rgb(160, 32, 240);"&gt;&lt;br /&gt; if&lt;/span&gt;&lt;/b&gt; file =~ /rhtml/ &amp;&amp;amp; File.exists?(file)&lt;br /&gt;   data = open(file) {|io| io.read}          &lt;b&gt;&lt;span style="color: rgb(160, 32, 240);"&gt;&lt;br /&gt;   return&lt;/span&gt;&lt;/b&gt; ERB.new(data).result(binding)&lt;br /&gt;&lt;b&gt;&lt;span style="color: rgb(160, 32, 240);"&gt;  elsif&lt;/span&gt;&lt;/b&gt; file.&lt;b&gt;&lt;span style="color: rgb(160, 32, 240);"&gt;nil&lt;/span&gt;&lt;/b&gt;?&lt;br /&gt;   constant = &lt;b&gt;&lt;span style="color: rgb(218, 112, 214);"&gt;self&lt;/span&gt;&lt;/b&gt;.&lt;b&gt;&lt;span style="color: rgb(160, 32, 240);"&gt;class&lt;/span&gt;&lt;/b&gt;.to_s + &lt;b&gt;&lt;span style="color: rgb(188, 143, 143);"&gt;'::DEFAULT_'&lt;/span&gt;&lt;/b&gt; + m.upcase          &lt;b&gt;&lt;span style="color: rgb(160, 32, 240);"&gt;&lt;br /&gt;   return&lt;/span&gt;&lt;/b&gt; constant.split(&lt;b&gt;&lt;span style="color: rgb(188, 143, 143);"&gt;'::'&lt;/span&gt;&lt;/b&gt;).inject(Object) &lt;span style="color: rgb(160, 32, 240);"&gt;do&lt;/span&gt; |x,y|&lt;br /&gt;     x.const_get(y)&lt;br /&gt;&lt;b&gt;&lt;span style="color: rgb(160, 32, 240);"&gt;    end&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;span style="color: rgb(160, 32, 240);"&gt;  end&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;  }&lt;br /&gt;&lt;b&gt;&lt;span style="color: rgb(160, 32, 240);"&gt;end&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/pre&gt;Once that code is run the encompassing class will have two methods called 'generate_header' and 'generate_footer'.  This approach would be more justifiable if I needed more than just two methods so I may end up ripping it out.&lt;br /&gt;&lt;br /&gt;One thing that did not behave how I expected was &lt;a href="http://www.rubycentral.com/book/ref_c_module.html#Module.const_get"&gt;Module#const_get&lt;/a&gt;.  It doesn't handle the ::'s nicely and I had to use an idiom I found in The Ruby Way.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6159470847873828659-1421606445752484924?l=exawkuser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://exawkuser.blogspot.com/feeds/1421606445752484924/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6159470847873828659&amp;postID=1421606445752484924' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/1421606445752484924'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/1421606445752484924'/><link rel='alternate' type='text/html' href='http://exawkuser.blogspot.com/2007/01/definemethod.html' title='define_method'/><author><name>brenton</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://bp1.blogger.com/_E73ULx6FtrY/R9KuyOvV9wI/AAAAAAAAAoM/RsCk5Agp1Fc/S220/n500029382_9615.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6159470847873828659.post-8237374581383041006</id><published>2007-01-01T20:04:00.000-05:00</published><updated>2007-01-01T20:10:58.859-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='tux'/><category scheme='http://www.blogger.com/atom/ns#' term='denver'/><category scheme='http://www.blogger.com/atom/ns#' term='kernel'/><title type='text'>snowtux</title><content type='html'>Santa brought Denver a lot of snow for Christmas this year.  I guess this is what happens when you get snowed in and decide to read a book on the linux kernel.&lt;br /&gt;&lt;br /&gt;&lt;table style="width:auto;"&gt;&lt;tr&gt;&lt;td&gt;&lt;a href="http://picasaweb.google.com/brenton.leanhardt/Snowtux/photo#5015230782927323298"&gt;&lt;img src="http://lh5.google.com/image/brenton.leanhardt/RZmt00L8wKI/AAAAAAAAAAo/QAnHgKDwdY4/s288/IMG_0102.JPG"&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="font-family:arial,sans-serif; font-size:66%; text-align:right"&gt;From &lt;a href="http://picasaweb.google.com/brenton.leanhardt/Snowtux"&gt;snowtux&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6159470847873828659-8237374581383041006?l=exawkuser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://exawkuser.blogspot.com/feeds/8237374581383041006/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6159470847873828659&amp;postID=8237374581383041006' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/8237374581383041006'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6159470847873828659/posts/default/8237374581383041006'/><link rel='alternate' type='text/html' href='http://exawkuser.blogspot.com/2007/01/snowtux.html' title='snowtux'/><author><name>brenton</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='http://bp1.blogger.com/_E73ULx6FtrY/R9KuyOvV9wI/AAAAAAAAAoM/RsCk5Agp1Fc/S220/n500029382_9615.jpg'/></author><thr:total>0</thr:total></entry></feed>
