<?xml version="1.0" encoding="iso-8859-1"?>

<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
<title type="text">Cyll.org</title>
<subtitle type="html"><![CDATA[
I'm not too worried about it.
]]></subtitle>
<id>http://cyll.org/blog/tech</id>
<link rel="alternate" type="text/html" href="http://cyll.org/blog" />
<link rel="self" type="text/xml" href="http://cyll.org/blog/tech" />

<author>
<name>Topher Cyll</name>
<uri>http://cyll.org/blog/tech</uri>
<email>christophercyll at gmail dot com</email>
</author>
<rights>Copyright 2006 Topher Cyll</rights>
<generator uri="http://pyblosxom.sourceforge.net/" version="1.3.2 2/13/2006">
PyBlosxom http://pyblosxom.sourceforge.net/ 1.3.2 2/13/2006
</generator>

<updated>2008-01-04T05:00:00Z</updated>
<!-- icon?  logo?  -->

<entry>
<title type="html">Practical Ruby Projects</title>
<category term="" />
<id>http://cyll.org/blog/2008/01/04/2008-01-04-practicalrubyprojects</id>
<updated>2008-01-04T05:00:00Z</updated>
<published>2008-01-04T05:00:00Z</published>
<link rel="alternate" type="text/html" href="http://cyll.org/blog/tech/2008-01-04-practicalrubyprojects" />
<content type="html">
My Ruby book &lt;a
href=&quot;http://www.apress.com/book/view/159059911X&quot;&gt;Practical Ruby
Projects: Ideas for the Eclectic Programmer&lt;/a&gt; is in stores!

&lt;p /&gt;

&lt;center&gt;
&lt;img src=&quot;http://cyll.org/images/book.gif&quot;&gt;
&lt;br /&gt;
&lt;i&gt;(Practical Ruby Projects)&lt;/i&gt;
&lt;/center&gt;

&lt;p /&gt;

I&apos;ve been writing for the past year, and I&apos;m crazy about the result.
This is the sort of book that I love to read, and hopefully that
shines through.

&lt;p /&gt;

Practical Ruby Projects is based on a few ideas:

&lt;ul&gt;
&lt;li&gt;&quot;Hands on&quot; is always better.&lt;/li&gt;
&lt;li&gt;You can cover more if you trust your reader to know the basics.&lt;/li&gt;
&lt;li&gt;Programming can be creative and exciting.&lt;/li&gt;
&lt;li&gt;Getting started is hard. Anything that makes that easy is good.&lt;/li&gt;
&lt;/ul&gt;

&lt;p /&gt;

This book covers a lot of projects (all done in Ruby, of course!):

&lt;ul&gt;
&lt;li&gt;Animation&lt;/li&gt;
&lt;li&gt;Music&lt;/li&gt;
&lt;li&gt;Simulation&lt;/li&gt;
&lt;li&gt;Turn Based Startegy Games&lt;/li&gt;
&lt;li&gt;RubyCocoa&lt;/li&gt;
&lt;li&gt;Genetic Algorithms&lt;/li&gt;
&lt;li&gt;Implementing Lisp&lt;/li&gt;
&lt;li&gt;Parsing&lt;/li&gt;
&lt;/ul&gt;

&lt;p /&gt;

PS- All the &lt;a href=&quot;http://cyll.org/PracticalRubyProjects.zip&quot;&gt;source code&lt;/a&gt; is available under the MIT license!</content>
</entry>

<entry>
<title type="html">Startup School in Sunny CA</title>
<category term="" />
<id>http://cyll.org/blog/2007/03/29/2007-03-29-startupschoolinsunnyca</id>
<updated>2007-03-29T04:00:00Z</updated>
<published>2007-03-29T04:00:00Z</published>
<link rel="alternate" type="text/html" href="http://cyll.org/blog/tech/2007-03-29-startupschoolinsunnyca" />
<content type="html">
Some background. My friend Adam was selected as one of this year&apos;s
Y-Combinator Winter Founders. For the past few months he and his
partner Josh have been building a startup company named &quot;Tsumobi.&quot;

&lt;p /&gt;

Thanks to Adam, I flew out this past weekend to attend Y-Combinator&apos;s
Startup School. All in all, it was a totally unique experience.

&lt;p /&gt;

&lt;center&gt;
&lt;img src=&quot;/images/blog/ss/speaking.jpg&quot;&gt;
&lt;br /&gt;
&lt;i&gt;(The auditorium was packed.)&lt;/i&gt;
&lt;/center&gt;

&lt;p /&gt;

The speakers were really good. Almost everyone had some useful
insight. My favorites were Mitch Kapor (founder of Lotus, and no
slouch since then either) and Greg McAdoo Partner (of Sequoia
Capita). And as I understand, Paul Graham&apos;s presentation was something of
a novelty because he used slides.

&lt;p /&gt;

The audience was a very cool collection of geeks. Unfortunately, there
were a few individuals that would mob each speaker as he or she tried to
leave the stage. It wasn&apos;t clear to me if they were looking for
investors or new best friends, but some of the speakers got a little
wild eyed trying to escape.

&lt;p /&gt;
&lt;center&gt;
&lt;img src=&quot;/images/blog/ss/robot.jpg&quot;&gt;
&lt;br /&gt;
&lt;i&gt;(Thankfully RoboCop was there to escort the speakers off the premise.)&lt;/i&gt;
&lt;/center&gt;
&lt;p /&gt;

That said, I meet some really sharp other attendees, including several
folks I&apos;d previously only met electronically. I even ran into my
friend Davy who was down from Washington for the weekend.

&lt;p /&gt;
&lt;center&gt;
&lt;img src=&quot;/images/blog/ss/mingle.jpg&quot;&gt;
&lt;br /&gt;
&lt;i&gt;(Trendy Nightclub or Geek Social?)&lt;/i&gt;
&lt;/center&gt;
&lt;p /&gt;

I managed to pick up a sore throat on the plane and by Saturday night
I was so exhausted that I feel asleep on the couch in the middle of a
networking event. Not my finest moment. But it was definitely worth it.

&lt;p /&gt;
&lt;center&gt;
&lt;img src=&quot;/images/blog/ss/citylights.jpg&quot;&gt;
&lt;br /&gt;
&lt;i&gt;(Heck of a view looking down from the hills toward the city.)&lt;/i&gt;
&lt;/center&gt;
&lt;p /&gt;

Mountain View itself was kind of awful, but the warm breezes of
California were amazing. You know, I&apos;m not sure if I&apos;ll end up with my
own startup company at some point, but today it actually feels doable.

&lt;p /&gt;

I&apos;d say that&apos;s the real takeaway from Startup School.
</content>
</entry>

<entry>
<title type="html">Building Rubinius</title>
<category term="" />
<id>http://cyll.org/blog/2007/02/06/2007-02-06-buildingrubinius</id>
<updated>2007-02-06T05:00:00Z</updated>
<published>2007-02-06T05:00:00Z</published>
<link rel="alternate" type="text/html" href="http://cyll.org/blog/tech/2007-02-06-buildingrubinius" />
<content type="html">
Have I mentioned how cool I think &lt;a
href=&quot;http://blog.fallingsnow.net/rubinius/&quot;&gt;Rubinius&lt;/a&gt; is? It&apos;s
totally awesome. Here&apos;s how I got it building on my Mac:

&lt;p /&gt;

&lt;pre&gt;
# Make sure ~/bin is in your path before doing this
cd ~/bin
wget http://www.opensource.apple.com/darwinsource/Current/ruby-22.2.2/ruby/mdoc2man.rb
chmod a+x mdoc2man.rb

# You&apos;ll need DarwinPorts/MacPorts installed

sudo port install subversion

sudo port install readline
sudo port install ruby

sudo port install pkgconfig
sudo port install glib2

# Now use Ruby Gems

# Had to download package manually for some reason
sudo gem install rake
sudo gem install RubyInline
sudo gem install rspec
sudo gem install ruby2ruby (needed by RSpec)

# Check out Rubinius
svn co http://code.fallingsnow.net/svn/rubinius/trunk

cd trunk

cd externals/syd-parser
rake package
cd pkg
sudo gem install sydparse-1.2.2.gem
cd ../../..

rake build:all
&lt;/pre&gt;

&lt;p /&gt;

I&apos;m pretty sure that&apos;s what I did anyways. =)</content>
</entry>

<entry>
<title type="html">Digging the Paste Way</title>
<category term="" />
<id>http://cyll.org/blog/2007/02/06/2007-02-06-diggingthepasteway</id>
<updated>2007-02-06T05:00:00Z</updated>
<published>2007-02-06T05:00:00Z</published>
<link rel="alternate" type="text/html" href="http://cyll.org/blog/tech/2007-02-06-diggingthepasteway" />
<content type="html">
I&apos;m using Python and &lt;a href=&quot;http://pylonshq.com/&quot;&gt;Pylons&lt;/a&gt; for a
project at work, and I deployed my application for the first time
today.

&lt;p /&gt;

I&apos;ve mostly enjoyed using Pylons. Although it does suffer from Too
Many Files Syndrome (which I&apos;ll try to talk about in a later post) and
the javascript/AJAX stuff feels cobbled together and undocumented
compared to other frameworks like Rails or &lt;a
href=&quot;http://pylonshq.com/&quot;&gt;Seaside&lt;/a&gt;.

&lt;p /&gt;

It&apos;s basically just another MVC web framework, but it works and I like
its philosophy of loosely coupled best of breed libraries. In
particular, it&apos;s been great how easy it was to use &lt;a
href=&quot;http://www.sqlalchemy.org/&quot;&gt;SQLAlchemy&lt;/a&gt; instead of SQLObject.

&lt;p /&gt;

SQLAlchemy is insanely powerful (though not as user friendly as I&apos;d
hoped) and is a great fit for our databases which don&apos;t necessarily
conform to the schemas demanded by ActiveRecord or SQLObject. And If
you take the time to build your model classes carefully, you can hide
most of the complexity.

&lt;p /&gt;

While I&apos;m at it, I also out to give a shout ought to &lt;a
href=&quot;http://jquery.com/&quot;&gt;jQuery&lt;/a&gt; which I&apos;ve been using alongside
the Prototype Javascript Library that ships with Pylons. jQuery is
totally awesome. I love it&apos;s markup oriented behavior concept. It&apos;s
really a great way to think about writing Javascript.

&lt;p /&gt;

Anyways, all that was just so I could mention how frickin cool &lt;a
href=&quot;http://pythonpaste.org/&quot;&gt;Paste&lt;/a&gt; based web deployment is
(Pylons uses Paste). Your entire web app gets packed up as a Python
egg, which can then be installed on any machine (multiple versions can
be installed too, and library version dependencies are handled by the
Egg system so no need to worry about upgraded versions preventing
rollbacks).

&lt;p /&gt;

In order to launch the web app, all you need to do is have the Egg
installed, put together a quick config file (specifying things like
port, but also application specific things like database connection or
data directories), and use the &apos;paster&apos; command to launch it. I&apos;m
pretty sure this is &quot;good stuff.&quot;

&lt;p /&gt;

&lt;b&gt;Update:&lt;/b&gt; Ian Bicking, Python web super hero, does a quick
comparison between &lt;a
href=&quot;http://blog.ianbicking.org/turbogears-and-pylons.html&quot;&gt;Turbo
Gears and Pylons&lt;/a&gt;.
</content>
</entry>

<entry>
<title type="html">One Step Back</title>
<category term="" />
<id>http://cyll.org/blog/2006/12/11/2006-12-11-onestepback</id>
<updated>2006-12-11T05:00:00Z</updated>
<published>2006-12-11T05:00:00Z</published>
<link rel="alternate" type="text/html" href="http://cyll.org/blog/tech/2006-12-11-onestepback" />
<content type="html">
Does anyone know why the recently released &lt;a
href=&quot;http://www.ruby-doc.org/core/&quot;&gt;Core Doc for Ruby 1.8.5&lt;/a&gt;
contains a flood of classes from the &lt;a
href=&quot;http://www.ruby-doc.org/stdlib/&quot;&gt;Standard Library&lt;/a&gt; (which is
also documented separately)?

&lt;p /&gt;

It&apos;s resulted in a serious loss of usability. Now when I need
documentation on the core classes that really matter (classes like
Array, Class, Enumerable, File, Hash, IO, Regexp, String, and Thread),
I have to wade through a mess of DRb, Generators, IXMLDOM, Net, RDoc,
REXML, RI, RSS, Resolv, Rinda, RubyToken, SM, SOAP, Test, WEBrick,
WSDL, XSD, YAML, and Zlib.

&lt;p /&gt;

All of which are great (except SOAP and WSDL -- ugh ;-). I just
liked it better when they were documented separately in the Standard
Library docs.

&lt;p /&gt;

Some kind of fancy AJAX search interface to the RDocs might take the
edge off here, but I&apos;d still like to be able to browse just the most
important classes. I hope we don&apos;t lose that ability forever.

&lt;p /&gt;

For some perspective, here&apos;s the number of classes (+/- one or two)
documented in the Core RDoc for the past three releases of Ruby.

&lt;p /&gt;

&lt;a href=&quot;http://www.ruby-doc.org/core-1.8.3/&quot;&gt;1.8.3&lt;/a&gt;: 167&lt;br&gt;
&lt;a href=&quot;http://www.ruby-doc.org/core-1.8.4/&quot;&gt;1.8.4&lt;/a&gt;: 181&lt;br&gt;
&lt;a href=&quot;http://www.ruby-doc.org/core/&quot;&gt;1.8.5&lt;/a&gt;: 1325&lt;br&gt;

&lt;p /&gt;

Yikes!</content>
</entry>

<entry>
<title type="html">Mongrel Comet Update</title>
<category term="" />
<id>http://cyll.org/blog/2006/12/10/2006-12-10-mongrelcometupdate</id>
<updated>2006-12-10T05:00:00Z</updated>
<published>2006-12-10T05:00:00Z</published>
<link rel="alternate" type="text/html" href="http://cyll.org/blog/tech/2006-12-10-mongrelcometupdate" />
<content type="html">
If you&apos;ve been looking to do Comet work using Ruby and Mongrel, I
might have some good news.

&lt;p /&gt;

I&apos;d &lt;a
href=&quot;http://cyll.org/blog/tech/2006-08-09-themongrelcomet.html&quot;&gt;previously
reported&lt;/a&gt; that my code to add Comet support to Mongrel required a
seperate URL handler at a different mount point for each persistent
connection because of some mysterious threading issue.

&lt;p /&gt;

Looks like I may have been misunderstanding what was going on. In
fact, &lt;a
href=&quot;http://rubyforge.org/pipermail/mongrel-users/2006-December/002349.html&quot;&gt;Joseph
McDonald reports&lt;/a&gt; that it works just fine... provided you remember
to respect your browsers allowed number of connections. I&apos;m not sure
why I&apos;d forgotten about this during testing. &lt;a href=&quot;http://en.wikipedia.org/wiki/Comet_%28programming%29&quot;&gt;From Wikipedia&lt;/a&gt;:

&lt;p /&gt;

&lt;i&gt;

Browsers pose a further limitation: section 8.1.4 of the HTTP 1.1 spec
states that &quot;A single-user client SHOULD NOT maintain more than 2
connections with any server or proxy&quot;, and this recommendation is in
fact followed by the most common browsers, including Internet Explorer
and Firefox. Holding one connection open for HTTP streaming tends to
create performance issues for AJAX applications, such as inability to
kick off a new user-initiated data request while a series of images
are being loaded. This is often worked around by creating a distinct
hostname for push connections (even with a single physical server).

&lt;/i&gt;</content>
</entry>

<entry>
<title type="html">Two Down</title>
<category term="" />
<id>http://cyll.org/blog/2006/09/26/2006-09-26-twodown</id>
<updated>2006-09-26T04:00:00Z</updated>
<published>2006-09-26T04:00:00Z</published>
<link rel="alternate" type="text/html" href="http://cyll.org/blog/tech/2006-09-26-twodown" />
<content type="html">
The second chapter of my upcoming Ruby book is done! Man it feels
good. But now I have to decide which chapter to write next.

&lt;p /&gt;

I haven&apos;t had as much time to blog as of late, but I&apos;m going to take
this opportunity to give a shout out to two great Ruby tools I&apos;ve been
using at work lately.

&lt;p /&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://syntax.rubyforge.org/&quot;&gt;Syntax&lt;/a&gt; - This module apparently does a lot, but I&apos;ve mostly been subclassing it&apos;s Syntax::Tokenizer. With a little glue code these tokenizers can be easily used along side...&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://i.loveruby.net/en/projects/racc&quot;&gt;RACC&lt;/a&gt; - In the style of YACC, RACC is LALR(1) parser generator, but you get to use Ruby (and it generates Ruby) instead of C.&lt;/li&gt;
&lt;/ul&gt;

&lt;p /&gt;

I&apos;m always amazed at how many low profile, but very cool libraries
there are for Ruby.
</content>
</entry>

<entry>
<title type="html">Making Ruby into PHP</title>
<category term="" />
<id>http://cyll.org/blog/2006/08/26/2006-08-26-makingrubyintophp</id>
<updated>2006-08-26T04:00:00Z</updated>
<published>2006-08-26T04:00:00Z</published>
<link rel="alternate" type="text/html" href="http://cyll.org/blog/tech/2006-08-26-makingrubyintophp" />
<content type="html">
Sometimes a web framework is just over kill. Maybe it&apos;s a one off
dynamic page, maybe you don&apos;t want the memory footprint of a whole
framework running for only a small component of your whole site.

&lt;p /&gt;

mod_ruby and eruby can get you a lot of what PHP gives you if you&apos;re
into that and don&apos;t mind the setup. There&apos;s the added perk that you
won&apos;t have to write PHP.

&lt;p /&gt;

But what if you want something similar, but quick and simple and
you&apos;re willing to use CGI?  Here&apos;s a neat little trick.

&lt;p /&gt;

First save this text into a file called &quot;rubyhp.rb&quot; in your cgi-bin
directory.

&lt;p /&gt;

&lt;pre style=&quot;code&quot;&gt;
require &lt;font color=&quot;#bc8f8f&quot;&gt;&apos;erb&apos;&lt;/font&gt;
require &lt;font color=&quot;#bc8f8f&quot;&gt;&apos;cgi&apos;&lt;/font&gt;

cgi = &lt;font color=&quot;#228b22&quot;&gt;CGI&lt;/font&gt;.new
print &lt;font color=&quot;#bc8f8f&quot;&gt;&quot;Content-type: text/html\n\n&quot;&lt;/font&gt;
print &lt;font color=&quot;#228b22&quot;&gt;ERB&lt;/font&gt;.new(&lt;font color=&quot;#228b22&quot;&gt;DATA&lt;/font&gt;.read).result(binding)
&lt;/pre&gt;

&lt;p /&gt;

Leave this file unexecutable, so your web server won&apos;t serve it. Then
create your PHP style Ruby file like this.

&lt;p /&gt;

&lt;pre style=&quot;code&quot;&gt;
&lt;font color=&quot;#b22222&quot;&gt;#&lt;/font&gt;&lt;font color=&quot;#b22222&quot;&gt;!/usr/bin/ruby                                                                 
&lt;/font&gt;require &lt;font color=&quot;#bc8f8f&quot;&gt;&apos;rubyhp&apos;&lt;/font&gt;
__END__
&amp;lt;html&amp;gt;
 &amp;lt;body&amp;gt;
  &amp;lt;% cgi.params.each &lt;font color=&quot;#a020f0&quot;&gt;do&lt;/font&gt; |key, value| %&amp;gt;
   &amp;lt;%= key %&amp;gt;: &amp;lt;%= value %&amp;gt;&amp;lt;br /&amp;gt;
  &amp;lt;% &lt;font color=&quot;#a020f0&quot;&gt;end&lt;/font&gt; %&amp;gt;
  &amp;lt;% &lt;font color=&quot;#a020f0&quot;&gt;if&lt;/font&gt; cgi.params.empty? %&amp;gt;
   Sorry, please enter some cgi parameters. How about &quot;?foo=baz&quot;?
  &amp;lt;% &lt;font color=&quot;#a020f0&quot;&gt;end&lt;/font&gt; %&amp;gt;
 &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/pre&gt;

&lt;p /&gt;

Name this file &quot;test.rb&quot; and save it in your same cgi-bin
directory. Make it executable and you&apos;re done. You can write whatever
erb you want after the __END__ line, without needing to worry about
setting up anything fancy. And you have access to a parsed CGI object
through the variable &apos;cgi&apos;.

&lt;p /&gt;

Does CGI still have a place in modern web work? I&apos;m don&apos;t know. But I
do still use it for quick dynamic pages on cyll.org like the &lt;a
href=&quot;http://cyll.org/bandnames.shtml&quot;&gt;Computer Science Bandname
Generator&lt;/a&gt;. This little trick makes life a little easier for me
when I do.
</content>
</entry>
</feed>
