Ruby as Client Side Language in Web Browser (replacing JS)

Hi everybody,

I was thinking about the old days when IE was able to execute script
both in JS and VB.

Do you think can be a good idea to include in a web browser a Ruby VM to
execute client side script written in ruby?

thanks Simone

On 5/27/10, Simone R. [email protected]ain.invalid wrote:

Hi everybody,

I was thinking about the old days when IE was able to execute script
both in JS and VB.

Do you think can be a good idea to include in a web browser a Ruby VM to
execute client side script written in ruby?

I think it’s a fantastic idea. I suspect most people on this list will
agree. Now, if only we could get the firefox maintainers on board as
well…

The biggest technical challenge with a project like this is making
ruby safe enough. We need a good sandboxing tool for ruby code (there
are other good applications for one, if it existed). I think the big
problem is that there are (probably) still buffer overflow and other
security bugs in MRI. Those would all need to be found and fixed.

The second biggest challenge is to get ruby hooked up to all the dom
manipulation and other libraries people expect to have in javascript.

you might want to take a look at:
http://hotruby.yukoba.jp/

2010/5/27 Simone R. [email protected]

On May 27, 10:45 am, “Simone R.” [email protected] wrote:

Hi everybody,

I was thinking about the old days when IE was able to execute script
both in JS and VB.

Do you think can be a good idea to include in a web browser a Ruby VM to
execute client side script written in ruby?

Yes, but on the other hand Javascript is pretty good language in it’s
own right. The problem it has, where Ruby shines, is that it’s syntax
is a little too crufty and it lacks much of the functionality Ruby
provides out of the box. In that vain, check out CoffeeScript.

Wouldn’t it be possible to develop an extension for various browsers for
a
proof of concept? Or does it have to be integrated in the browser
itself?

On May 27, 2010 5:04 PM, “Louis-Philippe” [email protected] wrote:

you might want to take a look at:
http://hotruby.yukoba.jp/

2010/5/27 Simone R. [email protected]

Simone R. wrote:

Hi everybody,

I was thinking about the old days when IE was able to execute script
both in JS and VB.

Do you think can be a good idea to include in a web browser a Ruby VM to
execute client side script written in ruby?

I’d like to have a ruby -> swf compiler. ActionScript is painful–it
combines the worst of java and javscript.

what about ming for swf generation:
http://mingruby.rubyforge.org/

2010/5/27 Joel VanderWerf [email protected]

Louis-Philippe wrote:

what about ming for swf generation:
http://mingruby.rubyforge.org/

That is interesting, though it is far from a ruby -> swf compiler.
AFAICT ming is not suited to building a complex UI like flex.

On Thu, May 27, 2010 at 9:45 PM, Joel VanderWerf
[email protected] wrote:

Do you think can be a good idea to include in a web browser a Ruby VM to
execute client side script written in ruby?

I’d like to have a ruby -> swf compiler. ActionScript is painful–it
combines the worst of java and javscript.

Copy that.
Concering Javascript I was once dreaming of Client Side Ruby too. But
I got pretty much acquainted to Javascript. After all I prefer
prototype over class inheritance ;). The syntax is a pain, but
Prototype, Moo, JQuery and friends kind of easy that.

Cheers
Robert

On Thu, May 27, 2010 at 1:45 PM, Joel VanderWerf
[email protected]wrote:

I’d like to have a ruby -> swf compiler. ActionScript is painful–it
combines the worst of java and javscript.

Long ago there was the IronMonkey project to run IronRuby and IronPython
on
Tamarin, the ActionScript virtual machine via bytecode translation.
It’s
long since gone by the wayside, as far as I can tell:

https://wiki.mozilla.org/Tamarin:IronMonkey
https://wiki.mozilla.org/Tamarin:IronMonkey

A nice alternative would be cappuccino: http://cappuccino.org/
http://cappuccino.org/no plugin… and you can do TDD with it.
http://cappuccino.org/its not Ruby… but its fully Object Oriented
and
has SmallTalk as common ancestor with Ruby.

2010/5/28 Dick D. [email protected]

You’re on a hiding to nothing I think; if you can’t rely on it being
present in the browser you’ll be constantly testing and working around
it (java applet, anybody)?

Just learn Javascript; it’s a tiny language and it’s absolutely
everywhere on
the server side these days too.

2010/5/28 Dick D. [email protected]

You’re on a hiding to nothing I think; if you can’t rely on it being
present in the browser you’ll be constantly testing and working around
it (java applet, anybody)?

On 5/28/10, Louis-Philippe [email protected] wrote:

A nice alternative would be cappuccino: http://cappuccino.org/
http://cappuccino.org/no plugin… and you can do TDD with it.
http://cappuccino.org/its not Ruby… but its fully Object Oriented and
has SmallTalk as common ancestor with Ruby.

Also two of the other projects mentioned on this thread: CoffeeScript
and HotRuby. All 3 compile ruby down to JavaScript, which probably is
really the most practical (tho not the best) way to achieve ruby on
the browser.

On 5/27/10, Louis-Philippe [email protected] wrote:

what about ming for swf generation:
http://mingruby.rubyforge.org/

2010/5/27 Joel VanderWerf [email protected]

Simone R. wrote:

Hi everybody,

Louis-Philippe:

Although we appreciate your contributions to the discussion, when
posting to ruby-talk, please don’t top-post.

2010/5/27 Simone R. [email protected]:

I was thinking about the old days when IE was able to execute script
both in JS and VB.

Do you think can be a good idea to include in a web browser a Ruby VM to
execute client side script written in ruby?

Technically, yes - and in fact it has been attempted already. The
hard bit is to get enough momentum so there is a large enough
installation basis in clients so site developers will use it. It’s a
catch 22 situation: if there are not enough client installations web
applications won’t use it and if web applications do not use it people
have no reason to install the client extension. The only realistic
way out of this would be a Ruby VM that comes installed with a popular
browser. Even then the question remains whether this is sufficient to
win enough web site development teams over to using Ruby instead of
JavaScript which by now they know by heart. I don’t think that
technical advantages of Ruby vs. JavaScript are not enough to make
this a realistic scenario. So, yes, it’s a cool idea, I would like
it, too - but I assume this won’t happen anytime soon, if at all.

Kind regards

robert

Here’s an interesting candidate for displacing ‘javascript’ for
‘Ruby’…!

http://blog.jcoglan.com/category/jsclass/

(wow).
MarkT

On Thu, May 27, 2010 at 9:45 AM, Simone R. [email protected] wrote:

Hi everybody,

I was thinking about the old days when IE was able to execute script
both in JS and VB.

Do you think can be a good idea to include in a web browser a Ruby VM to
execute client side script written in ruby?

I just noticed this article, which talks about using IronRuby in MS
Silverlight:

http://www.rubyinside.com/ironruby-silverlight-ruby-in-browser-3192.html?utm_source=internal&utm_medium=web&utm_campaign=featured-post