Try IronRuby in your browser

Hello!

I put together some simple version of IronRuby powered “Try Ruby” [1].
This is just night hack, I hope to improve it.

Now, the problem is that anybody can crash it with “def f() f() end”,
“f()”. I mean StackOverflowException, which is really bad on shared
ASP.NET hosting.

Any idea if IronRuby can prevent stack overflow? I’m volunteering to
contribute an implementation if so.

[1] http://www.ironruby.info/ir/

Oleg

You may want to check out Why’s blog for other ways people have tried to
crash his implementation of try Ruby:
http://redhanded.hobix.com/inspect/205000LinesOfRubyCodeDonatedInTheTryRubyD
rive.html

Pete

You might want to change your blog entry to say “OSI-approved Open
Source
license” instead of “GPL-based license” so that you don’t give our
lawyers a
collective heart attack ;).

“OSI-approved/GPL-inspired may be more appropriate” :wink:

On Mon, May 12, 2008 at 1:18 PM, Curt H. [email protected]

Hi Oleg,

You can prevent stack overflow by explicitly maintaining the recursion
count. See
http://lists.ironpython.com/pipermail/users-ironpython.com/2007-October/005694.html
for a related thread about IronPython. However, such a fix in IronRuby
would be in IronRuby.dll, and so we could not accept your patch. You
could try patching it for your own version of IronRuby if wanted.

Thanks,
Shri
Want to work on IronPython, IronRuby,
F#?http://blogs.msdn.com/ironpython/archive/2008/02/25/ironpython-ironruby-and-f-openings-in-dev-test-and-pm.aspx
Visit IronPython Blog | Microsoft Learn

From: [email protected]
[mailto:[email protected]] On Behalf Of Curt
Hagenlocher
Sent: Monday, May 12, 2008 10:19 AM
To: [email protected]
Subject: Re: [Ironruby-core] Try IronRuby in your browser

You might want to change your blog entry to say “OSI-approved Open
Source license” instead of “GPL-based license” so that you don’t give
our lawyers a collective heart attack ;).
On Mon, May 12, 2008 at 9:46 AM, Oleg T.
<[email protected]mailto:[email protected]> wrote:
Hello!

I put together some simple version of IronRuby powered “Try Ruby” [1].
This is just night hack, I hope to improve it.

Now, the problem is that anybody can crash it with “def f() f() end”,
“f()”. I mean StackOverflowException, which is really bad on shared
ASP.NEThttp://asp.net/ hosting.

Any idea if IronRuby can prevent stack overflow? I’m volunteering to
contribute an implementation if so.

[1] http://www.ironruby.info/ir/

Oleg

Hey there Shri,

Do you accept changes provided that the contributor has assigned
copyright to Microsoft?

http://lwn.net/Articles/272265/
http://www.copylaw.com/forms/copyassn.html
http://www.update.uu.se/~ams/inetutils/gnulib/doc/Copyright/request-assign.changes

Cheers,

C.J.

C.J. Adams-Collier:

Do you accept changes provided that the contributor has assigned
copyright to Microsoft?

Copyright Assignment / Sharing [LWN.net]
Copyright Assignment; Short-Form Copyright Transfer; Copyright Assignment Form; Grant of Rights; Copyright License
http://www.update.uu.se/~ams/inetutils/gnulib/doc/Copyright/request-
assign.changes

We accept changes to the IronRuby.Libraries project only, and only if
there’s a signed contributor agreement.

We will accept trivial patches to IronRuby.dll, but generally only
things like a missed conditional etc. - no feature additions are
accepted there. We will open things up fully once we get to a 1.0
release of the DLR.

Thanks,
-John

Yeah, you can crash your browser if you execute something similar in
Silverlight. Gets really hard to figure out when you’ve got a recursive
method_missing call =P I was having fun with this last night:
http://twitter.com/jschementi/statuses/809136066. But that’s not as
serious as stack overflowing a shared host =P

~js

I think the issue is vetting the contribution. Microsoft wants to
protect
itself and make sure that anything in the “core” hasn’t violated an
existing
copyright. As I understand it, Microsoft considers it prohibitivly
expensive
to ensure that all contributions aren’t already copywritten, which is
why
they don’t accept patches to the core yet. Once the DLR is stabilized
they
will allow contributions to the IronRuby core because it can no longer
influence the DLR core.

Ah! Thanks for the clarification, Mike.

Ok, fixed license name. Lawyers can relax now :slight_smile:

I’m saving keystrokes too, should be fun to watch. I’m gonna share saved
data after several days.

Oleg