Re.Mark

My Life As A Blog

Archive for the ‘Ruby’ Category

Learning IronRuby 1.0

leave a comment »

As you may have noticed, IronRuby 1.0 was released earlier this week.  I downloaded the .NET 4.0 version and headed to the Samples folder – in there, I noticed, is a Tutorial folder.  There’s a file called tutorial.bat, so I opened a command line in that folder and ran the batch file.  And I was impressed to be presented with an IronRuby Tutorial:

IronRuby Tutorial

There are three tutorial options available: an IronRuby Hosting Tutorial; an IronRuby Tutorial and a Try Ruby Tutorial.

So, if you’ve been meaning to get to grips with IronRuby, these tutorials could be just what you’ve been waiting for.

Written by remark

April 16, 2010 at 5:11 pm

Posted in Ruby

AIC 2009 Slides available

leave a comment »

As Matt announced, the slides from the Architect Insight Conference 2009 are all now online.  The keynote videos are there too.  As Marc notes, there’s something there for most architectural interests – including my session on Dynamic Languages and Architecture (with what could become my trademark use of translucent black.)

Written by remark

June 16, 2009 at 5:18 pm

Posted in .NET, Architecture, Events, Python, Ruby

Tagged with

Ruby Tuesday #30 : Thoughtworks and Ruby

leave a comment »

I know it’s Friday, but it’s a shame to waste a good title. ..

I thought this article by Martin Fowler about the use of Ruby at Thoughtworks was interesting.  Right at the end there’s an insight into how valuable Ironruby will be to Thoughtworks.  Speaking of Martin Fowler and dynamic languages, it’s also worth checking this post out – it contains some empirical data about how often Thoughtworks developers have to do type checks in Ruby.

Written by remark

June 12, 2009 at 4:54 pm

Posted in Ruby

Use .NET classes in IronRuby

leave a comment »

Having posted how to use .NET classes in IronPython, I thought I should repeat the exercise in IronRuby.  I figured I’d use the same assembly I built for the IronPython example.  To start IronRuby (which, again, I’m assuming you have already installed) type ir at a command prompt.  You should see something like this:

image

First thing is to require the SampleClasses assembly.  Here’s how:

>>>require ‘c:/lib/SampleClasses.dll’

and you should the following output:

=> true

Let’s import the namespace:

>>>include SampleClasses

and the output this time should be:

=> Object

Next, create an instance of the User class:

>>>a = User.new

which should lead to this reponse:

=> SampleClasses.User

Time to set a property:

>>>a.Name = ‘Bob’

and you’ll see that worked from the response:

=> “Bob”

Of course, you can check if you like:

>>>puts a.Name

which will duly report that our user is called Bob:

Bob
=> nil

It really is that easy.   Now you can go and have some fun with IronRuby and .NET assemblies.

Written by remark

June 4, 2009 at 5:11 pm

Posted in .NET, Ruby

Ruby Tuesday #29 : Iron Ruby 0.5

leave a comment »

IronRuby 0.5 was released last week – you can get it here.  Read Jimmy Schementi’s post for more info – I’d also recommend that you read his post about his presentation at RailsConf 2009.  For those of you exploring .NET 4, there’s a CTP of IronRuby available here (this version is roughly equivalent to the IronRuby 0.3 release. ) Having downloaded IronRuby 0.5, I set about following these instructions to run IronRuby on Rails – this is a sign of the progress that IronRuby is making.  It’s worth pointing out that there’s some info about deploying Ruby web apps via IIS and Rack in Jimmy’s RailsConf 2009 post.  Also released last week was version 0.91 of the DLR, which you can grab here

Written by remark

May 27, 2009 at 11:07 am

Posted in .NET, Ruby

AIC 2009 – Dynamic Languages and Architecture

leave a comment »

Thanks to all of you who attended my session at AIC earlier today.  The slides will be made available on line over the next week or so. 

I think the interesting capability made possible by the DLR is using static languages and dynamic languages together.  And there’s another benefit of learning a new language: when we only use one language we tend to think in that language – having other languages in our toolkit means that we have other approaches available to us.

So, where can you start to take advantage of dynamic languages?  The areas I discussed today were:

  • extending your application by adding scripting support to your application
  • configuring your application with a dynamic language
  • creating a DSL using a dynamic language
  • writing one or more layers of your architecture in a dynamic language
  • testing your application(s) with a dynamic language

Of all of these, extending and testing are probably the best places to start.

I also talked a bit about the DLR (and a couple of the Iron Languages – Iron Python and Iron Ruby) and the way that C# will be taking advantage of the DLR. It’s fascinating to see the evolution of programming languages and how the trends of dynamic, functional and concurrent programming are influencing this evolution.

Here are the links that I gave out in my session:

http://www.codeplex.com/IronPython

http://ironruby.net/

http://www.codeplex.com/dlr

http://devhawk.net/

http://blog.jimmy.schementi.com/

Dynamic Languages on .NET (www.microsoftpdc.com)

http://ironpython-urls.blogspot.com/

http://www.ironpythoninaction.com/

I also mentioned the Anders Hejlsberg session on the future of C# – you can watch that here – and a Channel 9 video of Anders Hejlsberg and Gilad Bracha discussing language design, which you can find here.

As part of the preparation for the session, I exchanged some emails with a few folks including Michael Foord.  For those of you who’d like to see Michael’s take on this subject, he’s posted about it here.

Written by remark

May 8, 2009 at 5:29 pm

Ruby Tuesday #28 : Architect Insight Conference

leave a comment »

This Friday the fourth annual Architect Insight Conference will roll into town – this year the town is London.  I’ll be speaking about dynamic languages from an architectural perspective and how and when you can incorporate them into your architecture. 

Written by remark

May 5, 2009 at 4:28 pm

Posted in Architecture, Events, Python, Ruby

Tagged with