# Try IronRuby in your browser

**URL:** <https://www.ruby-forum.com/t/try-ironruby-in-your-browser/137388>\
**Category:** IronRuby\
**Created:** [May 12, 2008, 7:02pm UTC](https://www.ruby-forum.com/t/try-ironruby-in-your-browser/137388 "2008-05-12T19:02:09Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Oleg\_T](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/f19dbf/32.png) [@Oleg\_T](https://www.ruby-forum.com/u/Oleg_T)\
**Post date:** [May 12, 2008, 7:02pm UTC](https://www.ruby-forum.com/t/try-ironruby-in-your-browser/137388/1 "2008-05-12T19:02:09Z")

</div>

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](http://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/](http://www.ironruby.info/ir/)

Oleg

---

<div class="post-metadata">

**Author:** ![Oleg\_T](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/f19dbf/32.png) [@Oleg\_T](https://www.ruby-forum.com/u/Oleg_T)\
**Post date:** [May 12, 2008, 7:13pm UTC](https://www.ruby-forum.com/t/try-ironruby-in-your-browser/137388/2 "2008-05-12T19:13:58Z")

</div>

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](http://redhanded.hobix.com/inspect/205000LinesOfRubyCodeDonatedInTheTryRubyD)  
rive.html

Pete

---

<div class="post-metadata">

**Author:** ![Oleg\_T](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/f19dbf/32.png) [@Oleg\_T](https://www.ruby-forum.com/u/Oleg_T)\
**Post date:** [May 12, 2008, 7:19pm UTC](https://www.ruby-forum.com/t/try-ironruby-in-your-browser/137388/3 "2008-05-12T19:19:22Z")

</div>

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 ;).

---

<div class="post-metadata">

**Author:** ![Oleg\_T](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/f19dbf/32.png) [@Oleg\_T](https://www.ruby-forum.com/u/Oleg_T)\
**Post date:** [May 12, 2008, 7:50pm UTC](https://www.ruby-forum.com/t/try-ironruby-in-your-browser/137388/4 "2008-05-12T19:50:38Z")

</div>

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

On Mon, May 12, 2008 at 1:18 PM, Curt H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![Oleg\_T](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/f19dbf/32.png) [@Oleg\_T](https://www.ruby-forum.com/u/Oleg_T)\
**Post date:** [May 12, 2008, 8:30pm UTC](https://www.ruby-forum.com/t/try-ironruby-in-your-browser/137388/5 "2008-05-12T20:30:15Z")

</div>

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](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](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](http://blogs.msdn.com/ironpython)

From: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
[[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)] On Behalf Of Curt  
Hagenlocher  
Sent: Monday, May 12, 2008 10:19 AM  
To: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
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.  
\<[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)\> 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.NET](http://ASP.NET)[http://asp.net/](http://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/](http://www.ironruby.info/ir/)

Oleg

---

<div class="post-metadata">

**Author:** ![Oleg\_T](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/f19dbf/32.png) [@Oleg\_T](https://www.ruby-forum.com/u/Oleg_T)\
**Post date:** [May 12, 2008, 10:02pm UTC](https://www.ruby-forum.com/t/try-ironruby-in-your-browser/137388/6 "2008-05-12T22:02:23Z")

</div>

Hey there Shri,

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

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

Cheers,

C.J.

---

<div class="post-metadata">

**Author:** ![Oleg\_T](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/f19dbf/32.png) [@Oleg\_T](https://www.ruby-forum.com/u/Oleg_T)\
**Post date:** [May 12, 2008, 10:13pm UTC](https://www.ruby-forum.com/t/try-ironruby-in-your-browser/137388/7 "2008-05-12T22:13:34Z")

</div>

C.J. Adams-Collier:

> Do you accept changes provided that the contributor has assigned  
> copyright to Microsoft?
> 
> [Copyright Assignment / Sharing [LWN.net]](http://lwn.net/Articles/272265/)  
> [http://www.copylaw.com/forms/copyassn.html](http://www.copylaw.com/forms/copyassn.html)  
> [http://www.update.uu.se/~ams/inetutils/gnulib/doc/Copyright/request-](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

---

<div class="post-metadata">

**Author:** ![Oleg\_T](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/f19dbf/32.png) [@Oleg\_T](https://www.ruby-forum.com/u/Oleg_T)\
**Post date:** [May 12, 2008, 10:14pm UTC](https://www.ruby-forum.com/t/try-ironruby-in-your-browser/137388/8 "2008-05-12T22:14:09Z")

</div>

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](http://twitter.com/jschementi/statuses/809136066). But that’s not as  
serious as stack overflowing a shared host =P

~js

---

<div class="post-metadata">

**Author:** ![Oleg\_T](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/f19dbf/32.png) [@Oleg\_T](https://www.ruby-forum.com/u/Oleg_T)\
**Post date:** [May 12, 2008, 10:22pm UTC](https://www.ruby-forum.com/t/try-ironruby-in-your-browser/137388/9 "2008-05-12T22:22:21Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Oleg\_T](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/f19dbf/32.png) [@Oleg\_T](https://www.ruby-forum.com/u/Oleg_T)\
**Post date:** [May 13, 2008, 12:11am UTC](https://www.ruby-forum.com/t/try-ironruby-in-your-browser/137388/10 "2008-05-13T00:11:23Z")

</div>

Ah! Thanks for the clarification, Mike.

---

<div class="post-metadata">

**Author:** ![Oleg\_T](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/f19dbf/32.png) [@Oleg\_T](https://www.ruby-forum.com/u/Oleg_T)\
**Post date:** [May 12, 2008, 8:30pm UTC](https://www.ruby-forum.com/t/try-ironruby-in-your-browser/137388/11 "2008-05-12T20:30:50Z")

</div>

Ok, fixed license name. Lawyers can relax now 🙂

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

Oleg
