No, there is currently no way how to implement continuations on CLR that
could capture stack of arbitrary managed method frames. If all frames
were under your control you could compile them in a special way that
supports continuations. Thatâ€™s IMO what Rx provides. In theory we could
IL-rewrite IronRuby.Libararies into code that supports continuations and
we could generate continuations aware IL for Ruby methods. But as soon
as you have a call to an arbitrary .NET method that wasnâ€™t compiled with
continuations support in the middle of your stack trace it breaks.
From: [email protected]
[mailto:[email protected]] On Behalf Of Ryan R.
Sent: Monday, January 11, 2010 12:36 PM
To: [email protected]
Subject: Re: [Ironruby-core] Questions for IronRuby’s RubyInside Article
I’m not sure if this is too late or not, but regarding this question:
Q: Closures, continuations, and tail-call optimizations are often
discussed in terms of programming language VM’s. Which of these
attributes are implementable at present, which are expected to be
implemented, and which are not possible by design?
You might want to peek at the Reactive Extensions
method. This method is supposed to represent call/cc on the CLR. Several
of us are still trying to figure out exactly how, but with Rx running on
.NET, Mono, and Silverlight, you should be covered. This is probably a
1.x feature, but I just wanted to throw it out there.
On Fri, Jan 8, 2010 at 6:58 PM, Jimmy S.
<[email protected]mailto:[email protected]>
RubyInside.comhttp://rubyinside.com/ will be running a series of
articles about all the various Ruby implementations, written by the
implementers, and each article is accompanied with a Q&A-style section.
IronRuby hasnâ€™t really received any IronRuby-specific questions, so Iâ€™d
like to ask all of you to propose questions (as a reply to this mail),
which I will then answer in the article =P. These can be questions you
know the answer to, but think would provide valuable information to the
rest of the Ruby community, or questions you donâ€™t know the answer too,
which would provide valuable information to everyone =)
For some context and/or inspiration, hereâ€™s the current IronRuby Q&A:
http://docs.google.com/View?id=dcvr9mmg_108c67mcf2b. Feedback or
questions on the answers are welcome.
Ironruby-core mailing list
[email protected]mailto:[email protected]