« OSCON Wrap-up | Main | IronRuby Update (or what have you been doing since OSCON?) »

July 29, 2007

IronRuby: a promising start

Creature II

It was fun watching all of the reactions to IronRuby this past week. Thank-you to everyone who took the time out to kick the tires and comment on what you found (both good and bad). I was particularly happy to see this exchange:

Antonio Cangiano downloaded the sources, compiled them successfully and ran some quick tests. He was disappointed to find that we didn't handle implicit type conversions correctly when doing arithmetic:

1/3.0 => 0

A few short hours later, Seo Sanghyeon responded with a blog post titled Teaching IronRuby math tricks. I really liked how Seo not only fixed the bugs in the sources, but he also spent some time writing up a detailed blog post on how Windows developers can apply the patch that he created to their copy of the source code. Teach 'em to fish and all that.

Not to be outdone, Josh Nursing wrote a detailed blog post, that gives you step-by-step instructions (complete with screen shots!) on how to build the project. He also fixes one of the bugs, and gives you step-by-step instructions on how he did it.

This is a great start for our nascent community. Thanks to your efforts, I could devote more time at OSCON working on cool demos, and talking to other open source developers. Starting Monday our team is going to be focusing on getting our sources out on Rubyforge as quickly as possible. Exciting times!

TrackBack

TrackBack URL for this entry:
http://www.typepad.com/t/trackback/2419952/20418496

Listed below are links to weblogs that reference IronRuby: a promising start:

Comments

Hello John,

Can you kindly arrange to start a special section in asp.net forums for IronRuby, so as, all IronRuby lovers can share and discuss there.

IronPython already has a special section there.

When can we expect few working samples in AspNet Futures like IronRuby.

Thanks

Paggy4u
---------------
An unblinking eye on Asp.Net and IronRuby.

Hi John,

Thanks for the mention!

In addition to the http://rubydoes.net site, there is an IronRuby group on Facebook already.

I've done some testing of Silverlight wih IronPython but it's frustrating not to be able to use IronRuby like Jim and you did at Mix'07.

@Josh:

Sorry about the Silverlight breakage. We're working on fixing that - hope to get that in the Rubyforge release. Problem is that there are numerous moving parts there (SL, DLR and IronRuby) so it's hard to pick a point in time and say 'it works'.

Will have to join that group on Facebook :)

@Paggy4u

We are many months away from having ASP.NET integration. It's in our plans, though, so we will definitely spin up a forum when that support is ready for folks to use.

Hi,

I found a nice blogging site for IronRuby.

http://ironruby.blogspot.com/

Great!. IronRuby world is emerging.

While looking at the source, it seems that IronRuby parses to its own AST and then converts that to the DLR AST. Is that how things will stay?

I'm looking to write a throw away language on the DLR to learn more about it (and dynamic languages in general) and my first thought was to parse directly into the DLR AST. Is that not possible? The main difficulty I can think of is that the DLR doesn't deal with function/class declaration stuff directly, right?

@Rob:

You could compile directly to the DLR AST, but then you would lose valuable information along the way that you might want to make available, such as pretty printing / syntax coloring of your source language. The IronPython team found this out the hard way, which is why we maintain two trees.

Hey Jon, for kicks I thought I'd implement the "reverse" method for Mutable string. I did the following:

[RubyMethodAttribute("reverse", RubyMethodAttributes.PublicInstance)]
public static MutableString Reverse(MutableString str)
{
string reversed = Reverse(str.ToString());
return new MutableString(reversed);
}

private static string Reverse(string s)
{
char[] charArray = new char[s.Length];
int len = s.Length - 1;
for (int i = 0; i <= len; i++)
charArray[i] = s[len - i];
return new string(charArray);
}

But I can't seem to call it from rbx.exe. Am I missing something on how to add a ruby method impl to the MutableString?

By the way, I can't wait to see this stuff up on RubyForge. We'll be sure to index it in Koders.com.

This is really going to cut into my Subtext time I'm afraid, but it's too fun to pass up. ;)

Phil, did you run the GenerateInitializers.cmd file in Ruby\Builtins? That's required to re-generate the tables for initializing our binder.

Ah! I did not. So are you accepting patches now or waiting till its up on IronRuby?

I've made it a bit farther into my compiler, but I seem to have hit a strange issue. My toy language has incr and decr operators that add and subtract 1. Incr works fine, but Decr causes a NotImplementedException in BinaryExpression. Sure enough, Operators.Subtract isn't handled. Am I doing something wrong?

Here's the snippet of my code (apologies for the F#)

| Decr e2 ->
Ast.Ast.Binary(SourceSpan.None, Microsoft.Scripting.Operators.Subtract, convertExpr e2, Ast.Ast.Constant(1)) :> Expression
| Incr e2 ->
Ast.Ast.Binary(SourceSpan.None, Microsoft.Scripting.Operators.Add, convertExpr e2, Ast.Ast.Constant(1)) :> Expression


I guess the first question really should be: is there a more appropriate place to ask DLR support-ish questions?

Thanks.

Hi lam,

Today is the day (31st August), you will be placing all the IronRuby codes on RubyForge.

Best wishes in advance to you and your team for every success for your hard work and enthusiastic nature.

We wish to grown in this language, with your kind support in future.

Thanks

SoftMind

Post a comment

If you have a TypeKey or TypePad account, please Sign In

Photos

  • www.flickr.com
    This is a Flickr badge showing public photos from John Lam. Make your own badge here.

April 2008

Sun Mon Tue Wed Thu Fri Sat
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30      
Blog powered by TypePad