<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Some Assembly Required &#187; Ruby</title>
	<atom:link href="http://znark.com/blog/category/ruby/feed/" rel="self" type="application/rss+xml" />
	<link>http://znark.com/blog</link>
	<description></description>
	<lastBuildDate>Sun, 05 Jul 2009 22:23:56 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>OSCON: Wednesday Afternoon</title>
		<link>http://znark.com/blog/2007/07/oscon-wednesday-afternoon/</link>
		<comments>http://znark.com/blog/2007/07/oscon-wednesday-afternoon/#comments</comments>
		<pubDate>Thu, 26 Jul 2007 04:00:24 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Haskell]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[OSCON]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://znark.com/blog/2007/07/25/oscon-wednesday-afternoon</guid>
		<description><![CDATA[In the afternoon, I went to more OSCON sessions. First, I went to Nested Data Parallelism in Haskell by Simon Peyton-Jones, the same guy who gave the keynote talk I went to. This time, he was talking about extending the Haskell compiler to do data parallelism. Flat data parallelism is when a computation is split [...]]]></description>
			<content:encoded><![CDATA[<p>In the afternoon, I went to more OSCON sessions.  First, I went to <a href="http://conferences.oreillynet.com/cs/os2007/view/e_sess/14014">Nested Data Parallelism in Haskell</a> by Simon Peyton-Jones, the same guy who gave the keynote talk I went to.  This time, he was talking about extending the Haskell compiler to do data parallelism.  Flat data parallelism is when a computation is split into chunks and processing distributed across processor.  Nested data parallelism is where the depth and complexity of the algorithm depends on the data so it isn&#8217;t simple to split up.  Flattening transformation can turn these problems into flat ones that can be chunked.  Also, multiple steps can be fused together into single ones.  The special syntax and <a href="http://haskell.org/haskellwiki/GHC/Data_Parallel_Haskell">data parallel extensions</a> they wrote for the GHC allows the compiler to do these transformations.  He pointed out that this is only possible with purely functional languages.  He thinks that functional languages are the future for scaling to multiple cores.</p>

<p>Next, I went to <a href="http://conferences.oreillynet.com/cs/os2007/view/e_sess/14569">Hacking with (and on) Gears</a> by Andy Boodman from Google.  He talked about <a href="http://gears.google.com/">Google Gears</a> a browser extension that supports offline applications written in Java.  It adds a local server for caching files.  A database module with embeds SQLite in the browser for local database storage.  And a worker pool of threads for running background JavaScript tasks.  He showed how these could be used to write an application, like the new Google Reader offline mode, that downloads the files, stores data locally, and synchronizes the data to the live site.  The big problem left unanswered by the framework is the synchronization and conflict resolution problems.  I thought it was interesting that the pieces were generally useful JavaScript extensions that would be useful outside of offline apps.</p>

<p>Next, I went to <a href="http://conferences.oreillynet.com/cs/os2007/view/e_sess/12403">Hecl: Open Source Scripting for Mobile Phones</a> by David Welton. <a href="http://hecl.org">Hecl</a> is a dynamic scripting language for mobile phones.  It is interpreter, written in Java, and designed to run on J2ME.  It has a very simple syntax based on Tcl.  The interpreter runs in a tiny amount of space.  It has support for making widgets and basic GUIs.</p>

<p>Finally, I went to <a href="http://conferences.oreillynet.com/cs/os2007/view/e_sess/13081">Using Puppet to Manage Your Network</a> by Luke Kaines.  I went to a talk on <a href="http://reductivelabs.com/trac/puppet">Puppet</a> last year.  This talk was much better since he talked about how Puppet works and how it could be used instead of vaguely talking about why it was useful.  Puppet has definitely gotten some recognition since this talk was well attended.  Most of the content was familiar to me from working with Puppet but I learned a couple of things about reporting changes and modules.</p>
]]></content:encoded>
			<wfw:commentRss>http://znark.com/blog/2007/07/oscon-wednesday-afternoon/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Typo and Mongrel</title>
		<link>http://znark.com/blog/2006/08/typo-and-mongrel/</link>
		<comments>http://znark.com/blog/2006/08/typo-and-mongrel/#comments</comments>
		<pubDate>Fri, 18 Aug 2006 02:38:12 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[I got this blog working with Mongrel, a web server written in Ruby designed from running Rails applications. The main Textdrive Apache process is proxying the blog to the mongrel_rails process. This replaces the Apache to Lighttpd to Rails over FastCGI setup I was using before. In the previous post, I talked about how I [...]]]></description>
			<content:encoded><![CDATA[<p>I got this blog working with <a href="http://mongrel.rubyforge.org/">Mongrel</a>, a web server written in Ruby designed from running Rails applications.  The main Textdrive Apache process is proxying the blog to the mongrel_rails process.  This replaces the Apache to Lighttpd to Rails over FastCGI setup I was using before.  In the previous post, I talked about how I switched over to starting the Rails process independently. That kept the lighttpd server from being killed but the rails fastcgi process was still dying.  With Mongrel, there is only one thing to keep up.</p>

<p>The command was pretty simple:</p>

<pre><code>mongrel_rails start  -e production -d -p $PORT -c $DIR
</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://znark.com/blog/2006/08/typo-and-mongrel/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Typo on Textdrive</title>
		<link>http://znark.com/blog/2006/08/typo-on-textdrive/</link>
		<comments>http://znark.com/blog/2006/08/typo-on-textdrive/#comments</comments>
		<pubDate>Tue, 15 Aug 2006 05:01:11 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[I have recently been having problems with running Typo on Textdrive. The cause seems to be that the ruby grows too big and is killed by FreeBSD. Why it isn&#8217;t being restarted automatically by lighttpd, I don&#8217;t know. The solution is supposed to be to start the rails fastcgi program separately from the lighttpd process. [...]]]></description>
			<content:encoded><![CDATA[<p>I have recently been having problems with running Typo on Textdrive. The cause seems to be that the ruby grows too big and is killed by FreeBSD. Why it isn&#8217;t being restarted automatically by lighttpd, I don&#8217;t know.  The solution is supposed to be to start the rails fastcgi program separately from the lighttpd process.  I just finished switching my lighttpd config to the new recommendation in the <a href="http://help.textdrive.com/index.php?pg=kb.chapter&amp;id=71">Textdrive knowledge base</a>.</p>

<p>One thing which seems interesting for the future is <a href="http://mongrel.rubyforge.org/">mongrel</a>, a Ruby web server. It sounds like it could be proxied to and replace lighttpd.</p>
]]></content:encoded>
			<wfw:commentRss>http://znark.com/blog/2006/08/typo-on-textdrive/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Trackback Spam</title>
		<link>http://znark.com/blog/2006/07/trackback-spam/</link>
		<comments>http://znark.com/blog/2006/07/trackback-spam/#comments</comments>
		<pubDate>Wed, 12 Jul 2006 03:29:18 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[I foolishly had left trackbacks on by default on this blog. I just noticed that some of the articles had hundreds of trackbacks on them. I doubt this blog is that popular. I think I would have noticed if I got on slashdot. They all looked like link spam. Unfortunately, Typo does not have any [...]]]></description>
			<content:encoded><![CDATA[<p>I foolishly had left trackbacks on by default on this blog.  I just noticed that some of the articles had hundreds of trackbacks on them.  I doubt this blog is that popular.  I think I would have noticed if I got on slashdot.  They all looked like link spam.</p>

<p>Unfortunately, Typo does not have any mechanism for mass deleting trackbacks.  I had to go into the database and delete all of them.  I ended up deleting 2045 trackbacks on only 45 articles.  While I was at it, I changed all of the articles to not allow pings.</p>
]]></content:encoded>
			<wfw:commentRss>http://znark.com/blog/2006/07/trackback-spam/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Poker Bot</title>
		<link>http://znark.com/blog/2006/06/poker-bot/</link>
		<comments>http://znark.com/blog/2006/06/poker-bot/#comments</comments>
		<pubDate>Sat, 10 Jun 2006 05:47:39 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Today, I won a (small) tournament of poker bots against coworkers. The bots played one-card poker. One coworker wrote the server in Ocaml. We had the tournament/party has my coworker Aaron&#8217;s house. I wrote a client in Ruby which could be used to make bots with different strategies. I came up with four acceptable strategies. [...]]]></description>
			<content:encoded><![CDATA[<p>Today, I won a (small) tournament of poker bots against coworkers.  The bots played one-card poker.  One coworker wrote the server in <a href="http://caml.inria.fr/">Ocaml</a>.  We had the tournament/party has my coworker Aaron&#8217;s house.</p>

<p>I wrote a client in <a href="http://www.ruby-lang.org/">Ruby</a> which could be used to make bots with different strategies.  I came up with four acceptable strategies.  The one that I entered and won calculated the optimum bet from the pot odds.  The best strategy, which I didn&#8217;t enter, estimated the other bot&#8217;s card from its bet.  That bot beats one counter-strategy bot which the optimum had trouble with.</p>
]]></content:encoded>
			<wfw:commentRss>http://znark.com/blog/2006/06/poker-bot/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Got Typo Working</title>
		<link>http://znark.com/blog/2005/12/got-typo-working/</link>
		<comments>http://znark.com/blog/2005/12/got-typo-working/#comments</comments>
		<pubDate>Sun, 11 Dec 2005 21:13:00 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[I got Typo working as I want it. The solution was adding a line to config/environment.rb to tell it to make all the links relative. I didn&#8217;t need the new strip-request-uri parameter for lighttpd. ActionController::AbstractRequest.relative_url_root = "/blog" Then I setup up the proxying. This was done through webmin but the directives produced were: ProxyPass /blog [...]]]></description>
			<content:encoded><![CDATA[<p>I got Typo working as I want it.  The solution was adding a line to config/environment.rb to tell it to make all the links relative.  I didn&#8217;t need the new strip-request-uri parameter for lighttpd.</p>

<pre>
ActionController::AbstractRequest.relative_url_root = "/blog"
</pre>

<p>Then I setup up the proxying.  This was done through webmin but the directives produced were:</p>

<pre>
ProxyPass /blog http://znark.com:8090/blog
ProxyPassReverse /blog http://znark.com:8090/blog
</pre>
]]></content:encoded>
			<wfw:commentRss>http://znark.com/blog/2005/12/got-typo-working/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Switching to Typo</title>
		<link>http://znark.com/blog/2005/11/switching-to-typo/</link>
		<comments>http://znark.com/blog/2005/11/switching-to-typo/#comments</comments>
		<pubDate>Thu, 24 Nov 2005 18:20:00 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[I am switching the blog to Typo, blog software written in Ruby, using the Rails framework. The hard part is getting the software to run fast and run where I want it http://znark.com/blog/. FastCGI and Apache don&#8217;t seem to work with my hosting company. So I could run it through CGI which means the each [...]]]></description>
			<content:encoded><![CDATA[<p>I am switching the blog to <a href="http://typo.leetsoft.com/">Typo</a>, blog software written in <a href="http://rubylang.org">Ruby</a>, using the <a href="http://rubyonrails.com">Rails</a> framework.</p>

<p>The hard part is getting the software to run fast and run where I want it <a href="http://znark.com/blog/">http://znark.com/blog/</a>.  FastCGI and Apache don&#8217;t seem to work with my hosting company.  So I could run it through CGI which means the each page loads slowly as it compiles tons of Ruby libraries.</p>

<p>A popular solution at <a href="http://www.textdrive.com/">TextDrive</a> is to run a personal <a href="http://www.lighttpd.net/">Lighttpd</a> web server process on an assigned port. Then, Apache can proxy to lighttpd so nobody has to remember to go to <a href="http://blog.znark.com:8090/">http://blog.znark.com:8090/</a>. </p>

<p>However, I haven&#8217;t figured out how to get typo to go in a subdirectory while running under a subdirectory.  Lighttpd doesn&#8217;t yet have all the rewrite functionality needed.  Until I get this figured out, the blog may be broken or not have any style.</p>
]]></content:encoded>
			<wfw:commentRss>http://znark.com/blog/2005/11/switching-to-typo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FOSCON</title>
		<link>http://znark.com/blog/2005/08/foscon/</link>
		<comments>http://znark.com/blog/2005/08/foscon/#comments</comments>
		<pubDate>Mon, 08 Aug 2005 00:29:00 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[After OSCON on Wednesday, I met up with Michael Schwern and friends. We went to FOSCON, a Ruby gathering a Free Geek. We missed the Ruby on Rails talk which is probably the technical introduction I didn&#8217;t get at OSCON. I did get to see a Ruby Metaprogramming talk by Glenn Vanderburg. I knew Ruby [...]]]></description>
			<content:encoded><![CDATA[<p>After OSCON on Wednesday, I met up with Michael Schwern and friends.  We went to FOSCON, a Ruby gathering a <a href="http://www.freegeek.org/">Free Geek</a>.</p>

<p>We missed the Ruby on Rails talk which is probably the technical introduction I didn&#8217;t get at OSCON.  </p>

<p>I did get to see a Ruby Metaprogramming talk by <a href="http://www.vanderburg.org/Blog">Glenn Vanderburg</a>.  I knew Ruby used its dynamic nature to make it easy to do metaprogramming but hadn&#8217;t know how easy it was to write mini-languages.</p>

<p>Perl can also do metaprogramming but the syntax is not nearly as nice which makes it hard to define usable mini-languages.  I have had the idea for a while to write a system using a rule-based engine to configure systems.  I suspect a mini-language done in Ruby would be a good fit.</p>

<p>The performance by <a href="http://whytheluckystiff.net/">Why The Lucky Stiff</a> was entertaining.  Animation segments, songs about Ruby, distributed Ruby as performance art with audience participation.</p>
]]></content:encoded>
			<wfw:commentRss>http://znark.com/blog/2005/08/foscon/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OSCON 3</title>
		<link>http://znark.com/blog/2005/08/oscon-3/</link>
		<comments>http://znark.com/blog/2005/08/oscon-3/#comments</comments>
		<pubDate>Mon, 08 Aug 2005 00:07:00 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[I went to a day of sessions last Wednesday at OSCON. Here are the session I went to: Shtoom First, I went to talk by Anthony Baxter about shtoom, a SIP stack written in Python. As he explained multiple times, VOIP and SIP are complicated. Which makes writing a complete stack by himself even more [...]]]></description>
			<content:encoded><![CDATA[<p>I went to a day of sessions last Wednesday at OSCON.  Here are the session I went to:</p>

<h2>Shtoom</h2>

<p>First, I went to talk by Anthony Baxter about <a href="http://divmod.org/projects/shtoom">shtoom</a>, a SIP stack written in Python.  As he explained multiple times, VOIP and SIP are complicated.  Which makes writing a complete stack by himself even more amazing.  It also shows that Python and other interpreted languages are good enough (and much easier) to write demanding applications.</p>

<p>I definitely agree with his goal of having open source, interoperable VOIP so we can talk to anyone and do what we want.  On one hand, we have Skype which is free but proprietary.  On the other, we have the hardware phones which use SIP but can be locked down to certain providers and have proprietary extensions.</p>

<p>I saw Guido van Rossum, the creator of Python, at the talk.</p>

<h2>Big Databases</h2>

<p>The next session I went to was by Josh Berkus and Joe Conway talking about large data warehouses in PostgreSQL.  This is exactly what we do at work so the casen studies were quite useful.</p>

<p>The main thing I learned is that we should upgrade to Linux 2.6 and PostgreSQL 8.0 for x86_64.  It sounds like there is a big performance advantage.</p>

<p>I am really looking forward to PostgreSQL 8.1 which is going to have advances in table partitioning.</p>

<p>I was hoping for more useful stuff out of the talks I went to after lunch.  Especially since I learned later that there were other more interesting talks going on at the same time.</p>

<h2>Subversion</h2>

<p>I went to &#8220;From CVS to SVN&#8221; by Brian Fitzpatrick.  He mainly talked about the general issues of managing the migration.  He talked about the experiences of some projects, open source and commercial, in doing the migration.  I was hoping for more details about the technical aspects.  It did inspire me to move forward on getting my workplace to do the migration.  And what political issues to work on.</p>

<h2>Perl &amp; Unicode</h2>

<p>The next talk was Dan Kogai talking about Perl 5.8 and Unicode.  Unfortunately, it was a pretty boring talk.  It covered material which I had already gleaned from the documentation.  He did show some examples including actual code.  At work, we have been suffering doing Unicode with Perl 5.6.  Moving to Perl 5.8 sounds like the right solution.</p>

<h2>MapReduce</h2>

<p>Then I went to a talk by Doug Cutting talking about doing Scalable Computing with MapReduce.  The <a href="http://lucene.apache.org/nutch/">Nutch project</a>, is a search engine based on Lucene, written in Java.  They swiped the Gogogle File System and Map Reduce processing ideas to experiment with scalable indexing.  I originally though the presentation was going to be by someone from Google.  Seeing that an open source project had implemented Google&#8217;s ideas was just as interesting.  I was hoping to see more info on MapReduce but I guess I will have to read the Google papers.</p>

<h2>Rails History</h2>

<p>Finally, I went to a talk by the creator of Ruby on Rails talking about Extracting Rails from Basecamp.  It was mostly about the history of Rails and lessons learned about promoting and growing a project.  I was hoping for more technical details and a little humility about his limited experience.  Rails is exploding right now and it was useful to hear how he developed it as his first Ruby and open source project.</p>
]]></content:encoded>
			<wfw:commentRss>http://znark.com/blog/2005/08/oscon-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
