Ruby: March 2005 Archives

Meet the Fam'

| | Comments (1)

toolset.png

(click for a prettier version)

This is the world I'm living in right now... Let me introduce you to the fam'.

The core of the fam here is the ruby2c tool chain. That includes: ParseTree, an independent package that mines ruby's internals for method syntax trees; Rewriter and R2CRewriter, layers that make language translation easier; TypeChecker, a type inference engine for ruby; and finally RubyToC, which translates a subset of ruby into static C code. We released a beta of ruby2c in February and are still working on it in parallel with our work on metaruby.

Also related to ParseTree are ABC, Dep, Graph and ruby2ruby. They are much more in the "toy" category, mainly in the amount of polish more than utility. ABC, Dep, and Graph help you analyze code and visualize code complexity and relationships. ABC generates whitespace independent complexity metrics. Dep shows very basic dependencies between classes/methods. Graph translates parse tree output into a DOT file for the GraphViz tools.

Ruby2Ruby translates the output of ParseTree back into ruby. At first glance, it doesn't sound very useful. After all, you started with ruby, right? Why translate it back to ruby?. But imagine how many things you can build on this foundation: syntax highlighters, indentation tools, code annotation tools, enhanced debugging output, and truly awesome dynamic optimizers/rewriters/inliners. There are a lot of possibilities sitting on top of this 150 lines of code.

ZenTest is my test auditing and generation tool. It analyzes your implementation and unit tests and generates missing methods (both test and implementation) based on naming convention (Blah#blah should be tested by TestBlah#test_blah). It is my hope to tie ZenTest, ABC, and Graph together so you can visualize your test and implementation interdependencies and focus on the writing tests where they are most needed, based on complexity.

The blue nodes are things we haven't written yet, but hope to in the near future. ZenHack is going to be a repository of useful tools for hacking on ruby, prototyping, and generally playing with the language. It will tie into a lot of the tools above by using and abusing them. Parser will eventually be a full fledged pure ruby parser that we can use to feed ruby2c and can also feed to ruby2c. We also have planned two new tails to the ruby2c tool pipeline, one to generate extension code for regular ruby extensions and another to generate code for metaruby itself. The current ruby2c translator was a throwaway proof of concept.

So, that is the fam! Ruby community, the fam. Fam, the ruby community. I hope to see you mingling soon and enjoying each other as much as I have.

OpenPlanning

| | Comments (0)

In the spirit of doing more with less, I'm trying to plan a software release and blogging schedule that spreads stuff out and encourages people to check out ruby2c and metaruby more. Using suggestions from the basecamp workshop (which I still haven't gotten my materials from... hrm) I'm shooting for 11:30 AM on Tuesday of each week to maximize eyeballs on the blog posts. I'm already behind on my posts and releases, but just getting this up here will help.

- [-] 2005-03
    - [-] Blog Releases
        - [ ] w1 (01)
        - [-] w2 (08)
            - [+] nopaste
            - [ ] ruby/osx improvement fund
            - [+] this release schedule
        - [-] w3 (15)
            - [+] lovechild
            - [+] parsetree/ruby2c family
        - [ ] w4 (22)
            - [ ] metaruby components
        - [ ] w5 (29)
            - [ ] Todo ical script
    - [ ] Bug Software Release: ruby2c
    - [ ] Major Software Release: ZenHacks
    - [ ] Minor Software Release: ZenTest
- [ ] 2005-04
    - [ ] Blog Releases
        - [ ] w1 (05)
            - [ ] subethaedit hack
        - [ ] w2 (12)
            - [ ] reflection revamp proposal
        - [ ] w3 (19)
            - [ ] birthday calendar script
        - [ ] w4 (26)
    - [ ] Bug Software Release:
    - [ ] Major Software Release:
    - [ ] Minor Software Release:
Dave's Email:
subject: access
The magic phrase is arachnophilia
My Response:
Dave, you are a sweet, wonderful man and I really enjoy spending time with you. That being said, I think it is only fair of me to tell you that I am not attracted to you in _that_way_. No matter how much you want "access" via a "magic phrase", declaring your "love for spiders", I'm just not available to you in that capacity. I hope this doesn't put a crimp on our relations.

Yours Truly,
ZenSpider

Things have slowed down of late. I think that means that we have reached a new plateau, and that can certainly be considered a good thing. Eric and I have started moving on the metaruby side as a forcing function to get ruby2c even more complete. We've also done a better job of illustrating what ruby2c really is in relation to itself, extension writers, metaruby, and the rest of the parse tree family. I hope to have this blogged in the near future.

We've been wanting to do something called ping-pong pairing, to force us to switch more and get us even more robust code. It is an interesting idea but we haven't been able to sit and code for a while. I've been doing it with myself though, using ruby2c and metaruby and DAMN, it works well. Granted, I have easy pickings right now as we are at the front of the project, not the back, but still. I have this mental image of me wearing my metaruby hat finding something that doesn't work (equivalent to a failed unit test). Then I switch to my ruby2c hat and trudge over to that emacs buffer and fix it. This usually causes a new breakage over in metaruby, so I get to trudge back... Clean separation, and a nice forcing function for me to get both more robust.

Now... if only I weren't on the bus while doing this...

I do. In fact, I drink it!

About this Archive

This page is a archive of entries in the Ruby category from March 2005.

Ruby: February 2005 is the previous archive.

Ruby: April 2005 is the next archive.

Find recent content on the main index or look in the archives to find all content.

Pages

Powered by Movable Type 4.1