[IronPython] DLR question

Jimmy Schementi Jimmy.Schementi at microsoft.com
Fri Jun 27 03:42:35 CEST 2008


Let's break it down:

1. Will IronRuby will run real ruby programs? Yes
2. Is Rails is a real ruby program? Yes

So, those two points say that IronRuby will run Rails. We run "hello world" today. Cool.

3. Will IronRuby and IronPython will be able to interop? Yes, but in a constrained way.

So, you'll be able to use IronRuby code from IronPython, and visa versa. However, this is constrained. As Dino said, you won't be able to subclass. So ...

4. Will IronPython run Rails? No, not pure vanilla Rails.

Rails controller/models depend on subclassing, so you wouldn't be able to do this:

class MyPythonController(ActionController.Base):
  def index():
    render(partial='foo')

... though it does seem awesome! So, someone need to write a layer in between to create an IronPython API for Rails. But I'm not sure any Python developer would want to ever do that. :)

~Jimmy

> -----Original Message-----
> From: users-bounces at lists.ironpython.com [mailto:users-
> bounces at lists.ironpython.com] On Behalf Of Dino Viehland
> Sent: Thursday, June 26, 2008 5:26 PM
> To: Discussion of IronPython
> Subject: Re: [IronPython] DLR question
>
> Maybe? :)
>
> -----Original Message-----
> From: users-bounces at lists.ironpython.com [mailto:users-
> bounces at lists.ironpython.com] On Behalf Of Ben Hall
> Sent: Thursday, June 26, 2008 5:09 PM
> To: Discussion of IronPython
> Subject: Re: [IronPython] DLR question
>
> Will we ever be in a position where, for example, Rails could run on
> top of Python and that level of interop?
>
> Ben
>
>
> On Fri, Jun 27, 2008 at 1:01 AM, Dino Viehland
> <dinov at exchange.microsoft.com> wrote:
> > The short answer to this is yes.  But there's a longer answer too J
> >
> >
> >
> > First off, it's not like you're going to be able to do:
> >
> >
> >
> > class MyPythonClass(object):
> >
> >     def MyPythonFunc(self): pass
> >
> >     def MyRubyFunc
> >
> >     end
> >
> >
> >
> > or anything like that.  There's also no plans to support subclassing
> because
> > generally the type systems are just too different.  But you can
> monkey patch
> > all you want.  So you could do:
> >
> >
> >
> > class MyPythonClass(object): pass
> >
> >
> >
> > then in Ruby:
> >
> >
> >
> > MyPythonClass.someFunc = someProcOrBlockOrWhateverThoseRubyGuysDo
> >
> >
> >
> > And you could get crazy with metaclasses or other such magic to make
> this
> > more seamless.
> >
> >
> >
> > The other part of the long answer is that this doesn't necessarily
> work
> > today - I'm actually not sure whether it does or not today.  We're
> actually
> > in the process of finalizing the interop protocol right now and when
> that's
> > done and all the languages have adopted the new protocol we'll start
> testing
> > this and ensuring we have good interop.
> >
> >
> >
> > From: users-bounces at lists.ironpython.com
> > [mailto:users-bounces at lists.ironpython.com] On Behalf Of Michael
> Stephens
> > Sent: Thursday, June 26, 2008 3:44 PM
> > To: Discussion of IronPython
> > Subject: [IronPython] DLR question
> >
> >
> >
> > I have a DLR question and was wondering if you guys knew.  We have a
> python
> > scripting system for our application.  We would like to add iron
> python to
> > it as well.  My question is can I define a ruby function and an iron
> python
> > function in the same class?  That way they can write ruby functions
> and
> > python functions and they can all be bound with the same local
> variables and
> > class state etc.
> >
> > Michael Stephens
> >
> > Electrical Engineering Graduate Student
> > University of Wyoming
> > falcon at uwyo.edu or 89iroc at gmail.com
> >
> > _______________________________________________
> > Users mailing list
> > Users at lists.ironpython.com
> > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
> >
> >
> _______________________________________________
> Users mailing list
> Users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
> _______________________________________________
> Users mailing list
> Users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com




More information about the Ironpython-users mailing list