Releasing ruby2c 1.0.0 beta 1

| | Comments (4)

After far too long, I finally have the dubious honor of releasing ruby2c 1.0.0 beta 1 today. I'm itching to do it, we really need to get it out there so people can get their eyes on it and give us feedback. I'm also nervous as hell... the thing is a mess!

Understand what we mean by beta. It means we need eyes on it, it means it was ready enough to put out in the wild, but it also means that it isn't ready for any real use.

What can it do?

Well, currently it can pass all of its unit tests (325 tests with 512 assertions) and it can translate nice simple static algorithmic code into C without much problem. For example:

& cat x.rb
class Something
  def blah; return 2+2; end
  def main; return blah; end
end
& ./translate.rb x.rb > x.c
& gcc -I /usr/local/lib/ruby/1.8/powerpc-darwin x.c
x.c: In function `main':
x.c:17: warning: return type of `main' is not `int'
& ./a.out
& echo $?
4

What can it not do?

More than it can.

It can't (and won't) translate dynamic code. Period. That is simply not the intent.

It probably can't translate a lot of static code that we simply haven't come across or anticipated yet. Our tests cover a fair amount, our validation runs cover a lot more than that, but it is still fairly idiomatic ruby and that puts us at being better at certain styles of coding and much worse at others.

It is also simply rough around the edges. We've rounded out the rdoc but haven't done a thing for general documentation yet. These are on our list, and rather high on our priority list, but we just haven't had the time yet. For now, check out the rdoc and the PDF presentation that we've had up for a while.

PLEASE: file bugs! We need feedback and we'd like to be able to track it. The ruby2c project is on rubyforge and I'm getting the trackers set up today as well.

4 Comments

I have to admit that's one of the most downer of an announcements I've ever read. ;)

After reading the title and the version number, I got excited... only to have my excitement taken down several notches. :/

So I take it this can't be used for normal Ruby code?

I would hope that the tsunami announcement was more of a downer.

We are only human, and we can only do so much. There is a LOT to ruby2c and it just doesn't scale very well with only 2 people. That is why we need to release it.

As far as "normal ruby code" goes... that depends on what you mean by "normal". If you mean normal as in "conforming with, adhering to, or constituting a norm, standard, pattern, level, or type", then YES! But if you mean normal is in "typical" then NO. Nor is it intended to.

I suggest you read the presentation. There is a PDF in the download or you can see it (currently... needs a real home) at http://www.zenspider.com/~ryand/Ruby2C.pdf

Maybe instead of 1.0.0 beta it should have been declared 0.0.1 alpha (re:downer) ?

1) I don't do bogus version numbering. Counting numbers start at 1. My version number scheme is described at http://www.zenspider.com/ZSS/Definitions/Versions.html

2) We already did 2 private alphas, as described in the version history.

3) You are a wimp for not signing your name to your post. I almost deleted it but I figured it was worth it to get a chance to describe versioning schemes.

Leave a comment