Posted by
Aaron Patterson – December 24, 2007
I’ve been working hard on RKelly lately. RKelly is a ruby implementation of Kelly. Kelly is a fictional project that I made up so that I could name my project RKelly. Anyway, RKelly is a javascript parser, and will be an interpreter someday. Today I was able to get RKelly to parse and produce a parse tree of prototype.js. I couldn’t get GraphViz to export the file, but you can download the dot file here.
Here is a parse tree of a function that calculates the fibonacci sequence:

Here is the javascript code:
function f(n) {
var s = 0;
if(n == 0) return(s);
if(n == 1) {
s += 1;
return(s);
} else {
return(f(n - 1) + f(n - 2));
}
}
And the ruby code that produced that graph:
require 'rkelly'
parser = RKelly::Parser.new
puts parser.parse(File.read(ARGV[0])).to_dots
I need a new computer….. It took 2 minutes to render the prototype graph! Ugh!
Posted by
Aaron Patterson – December 9, 2007
I’ve been refactoring Mechanize for an 0.7.0 release. Basically I’m trying to clean the code up and there are a few features that I think are unnecessary, but I would like to ask people first.
- REXML as a parser.
I want to remove support for REXML. I don’t use it. Hpricot seems to do everything I need.
- 1.8.2 thru 1.8.4 support
I’ve got a bunch of monkey patches for 1.8.2 thru 1.8.4. I’d like to remove these because I think most people are on 1.8.5 or up.
- WWW::Mechanize::Page#watch_for_set
I am going to remove this method. It made sense when REXML was the main parser, since REXML was so slow. I think that Hpricot is fast enough that this method is not so useful.
I’m going to make 0.7.0 lazily build up form and link objects, which should give everyone a slight speed increase but makes watch_for_set obsolete (sort of).
I’m changing around the class names to be better organized, but they should all have the same methods. Also, if there are any feature requests, let me know!
Posted by
Aaron Patterson – December 7, 2007
I need to post something because it seems like I’m only posting release announcements to my blog……
Today is my sister’s birthday, so I woke her up at 8 this morning to wish her a happy birthday. I wanted to make sure that I was the first person to congratulate her on her special day. Is it OK to say “congratulations” for a birthday? I know Pam doesn’t like to throw around that word without some sort of accomplishment occurring. For example, getting engaged. Should you really congratulate someone on getting engaged since they just made a decision? They didn’t really overcome any obstacles or adversity, they just decided to get married. Anyway, I think that surviving another year is worth congratulating someone.
We will be rollerskating for my birthday, and Pam sent out an evite with this image:

今週日本語のクラスで私とパムさんは「何々つもりだ」と「何々なる」を習いました。私は「パムは茸が好きになる」と言っていました。でも、パムさんは意地悪になりました。Oh well.
Posted by
Aaron Patterson – December 6, 2007
CSSpool (pronounced “cesspool”) is a validating SAC parser for CSS. The parser
calls methods on a document handler depending on what it has found. CSSPool
currently only supports CSS 2.1. CSSPool will not yield invalid properties or
selectors.
Changes:
## 0.2.4
* Fixed error handling on at rules. Thanks Dan for tests!
* Made specificity an array
* Made StyleSheet::Rule comparable on specificity
*
Posted by
Aaron Patterson – December 5, 2007
CSSpool (pronounced “cesspool”) is a validating SAC parser for CSS. The parser
calls methods on a document handler depending on what it has found. CSSPool
currently only supports CSS 2.1. CSSPool will not yield invalid properties or
selectors.
Changes:
## 0.2.3
* Fixed a bug where nil selectors on conditional selectors were being visited.
*
Posted by
Aaron Patterson – December 4, 2007
CSSpool (pronounced “cesspool”) is a validating SAC parser for CSS. The parser
calls methods on a document handler depending on what it has found. CSSPool
currently only supports CSS 2.1. CSSPool will not yield invalid properties or
selectors.
Changes:
## 0.2.2
* I suck.
*
Posted by
Aaron Patterson – December 4, 2007
The Mechanize library is used for automating interaction with websites.
Mechanize automatically stores and sends cookies, follows redirects,
can follow links, and submit forms. Form fields can be populated and
submitted. Mechanize also keeps track of the sites that you have visited as
a history.
Changes:
# Mechanize CHANGELOG
## 0.6.11
* Detecting single quotes in meta redirects.
* Adding pretty inspect for ruby versions > 1.8.4 (Thanks Joel Kociolek)
http://rubyforge.org/tracker/index.php?func=detail&aid=13150&group_id=1453&atid=5709
* Fixed bug with file name in multipart posts
http://rubyforge.org/tracker/?func=detail&aid=15594&group_id=1453&atid=5709
* Posting forms relative to the originating page. Thanks Mortee.
* Added a FAQ
http://rubyforge.org/tracker/?func=detail&aid=15772&group_id=1453&atid=5709
*
Posted by
Aaron Patterson – December 3, 2007
I was put in charge of nerd meeting this week.
So, I made a special terminal theme for this week. You can get it here.
Posted by
Aaron Patterson – December 1, 2007
日本語を練習していました。日本語のドキュメンテーションにCSSPoolを書くと思います。でも、日本語を書くのは難しで私は遅い!www!
Posted by
Aaron Patterson – December 1, 2007
CSSpool (pronounced “cesspool”) is a validating SAC parser for CSS. The parser
calls methods on a document handler depending on what it has found. CSSPool
currently only supports CSS 2.1. CSSPool will not yield invalid properties or
selectors.
Changes:
## 0.2.1
* Recovering from unexpected tokens in the properties section.
*