Ruby in JavaScript, all projects are dead?

Hello, recently I’ve examined some of the projects that trying to bring
ruby into the browser.

http://hotruby.yukoba.jp - JavaScript Ruby Bytecode VM
http://github.com/jessesielaff/red - JavaScript compiler and interpreter

It seems that they are pretty finished and working but there’s no
activity since 2008.
So, are they are dead? And if so maybe there’s some other projects of
this kind that’s alive and active?

Thanks.

Forgot one more project GitHub - mneumann/rubyjs: Ruby to Javascript Compiler

Similar but different:
http://jsclass.jcoglan.com/

MarkT

Hmm, I’m not agree. The main goal of Ruby in JavaScript (for me) is

1 absence of the mental shift
2 better syntax
3 better OO support
4 better STD lib

The js.class solves only one from this problems - the 3th.

By the way there is also another project - CoffeeScript
http://jashkenas.github.com/coffee-script/
It solves 2, 3 and partially 4, but not the first one.

On Jun 27, 1:58 pm, Alexey P. [email protected] wrote:

It solves 2, 3 and partially 4, but not the first one.
Maybe not, but lord, coffee script syntax is so much nicer than
javascript syntax. I wish coffee script would catch on in a big way,
get some native implementations and displace javascript altogether. I
appreciate javascript as a language, but having used Ruby, the verbose
syntax is just mind numbing.

I believe Google has a summer of code project to bring Ruby to
browsers via their Native Client project.

http://code.google.com/p/nativeclient/

I think JavaScript is fine, but would prefer Ruby if it were a choice
in the browser. Hopefully Google will come through and get it to
happen.
Tim

It’s not a critique, I just pointed out that the syntax is a little
different than Ruby.

CoffeScript has very nice syntax, a lot better than JS. And seems it is
very active. Golden mean between the purity and practices.

I’m currently working on RubyScript, a re-implementation of YARV in
JavaScript (based on HotRuby).

A little teaser:

I’ll try to release something soon.

// Magnus H.

UPD, this one seems to be interesting and is very active. And (a big
plus), it generates human readable js.

You could always just boot Linux in your browser, and then run ruby
within that :slight_smile:

http://bellard.org/jslinux/
http://bellard.org/jslinux/tech.html

I don’t know if the following project is live, but it claimed to be able
to run JVM in Javascript, in which case you could run jruby within that:

http://ejohn.org/blog/running-java-in-javascript/

On Wed, 20 Jul 2011 07:41:47 +0900, Alexey P. wrote:

UPD, this one seems to be interesting and is very active. And (a big
plus), it generates human readable js.

GitHub - adambeynon/opal: Ruby to Javascript compiler

Check out ColdRuby. It is not dead (currently being integrated in a
QtScript-based
application, hence no commits in main repo), does not have its own
parser, but offers
somewhat better compatibility than Opal. Last time I checked, it passed
slightly more
than 50% of Ruby MRI bootstrap tests.

On Tuesday, July 19, 2011 05:41:47 PM Alexey P. wrote:

UPD, this one seems to be interesting and is very active. And (a big
plus), it generates human readable js.

GitHub - adambeynon/opal: Ruby to Javascript compiler

I remember starting a project like this. I more or less gave up when I
realized there didn’t seem to be a good way to have it continue to
generate
human-readable JS, and also support continuations.

This seems to suffer from the same limitation. Notice there’s no
enumerators.
In MRI, I can do stuff like this:

ruby-1.9.2-p180 :010 > (1…10).each_cons(2).to_a
=> [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9,
10]]

Opal doesn’t do that – all of the enumerable methods (each and friends)
simply die if I don’t pass a block.

I guess if that ends up being the only edge case, and people are OK with
this,
it makes sense. But it seems like the more weird corner cases like this,
the
less benefit there is to trying to pretend it’s a full-fledged Ruby.
Even if
your gems don’t hit any of the corner cases imposed by the interpreter
itself,
you’re still running in a restricted environment that may pose its own
problems…

Maybe it would be better to create a language specifically designed to
work
well in that environment – to build on the good ideas from JavaScript,
give
us Ruby-esque syntactic sugar, but to stick close enough that the
resulting
JavaScript makes sense and is debuggable… and I just described
CoffeeScript.

So, it looks really, really cool, but I think I’m still going to use
CoffeeScript if I use anything beyond pure JS.

Looks interesting!


Michael J.

@mjijackson

On Thu, Jul 21, 2011 at 01:57:31PM +0900, David M. wrote:

This seems to suffer from the same limitation. Notice there’s no enumerators.
less benefit there is to trying to pretend it’s a full-fledged Ruby. Even if
your gems don’t hit any of the corner cases imposed by the interpreter itself,
you’re still running in a restricted environment that may pose its own
problems…

It would be nice to have a full-fledged Ruby that compiles to
human-readable JavaScript, but if it falls short of that level of
completeness, that does not necessarily make it unworthy of developing
and supporting (and, most importantly, of using).

Maybe it would be better to create a language specifically designed to work
well in that environment – to build on the good ideas from JavaScript, give
us Ruby-esque syntactic sugar, but to stick close enough that the resulting
JavaScript makes sense and is debuggable… and I just described CoffeeScript.

So, it looks really, really cool, but I think I’m still going to use
CoffeeScript if I use anything beyond pure JS.

That might make sense.

What I’d really like, though, is a fixed JavaScript.

There are experimental javascript backends for LLVM.

Rubinius is based on LLVM, maybe it is possible to do an
ruby-javascript implementation using this path?

Im not really familiar with compiler and virtual machine
implementations, so I leave this idea open for discussion.

Markus

On Sun, Jun 27, 2010 at 1:25 AM, Alexey P. [email protected]
wrote:

Hello, recently I’ve examined some of the projects that trying to bring
ruby into the browser.

http://hotruby.yukoba.jp - JavaScript Ruby Bytecode VM
http://github.com/jessesielaff/red - JavaScript compiler and interpreter

It seems that they are pretty finished and working but there’s no
activity since 2008.
So, are they are dead? And if so maybe there’s some other projects of
this kind that’s alive and active?

I think the most complete currently available way to use Ruby in the
browser isn’t through JavaScript, its through Silverlight/Moonlight.

On Mon, Jul 25, 2011 at 3:04 AM, Christopher D. [email protected]
wrote:

this kind that’s alive and active?

I think the most complete currently available way to use Ruby in the
browser isn’t through JavaScript, its through Silverlight/Moonlight.

It would be better to either fix or get rid of JS really. I think
that the goal for any set of tools that are targeting being embedded
in markup like Javascript need to take note of how Microsoft
integrated their Linq DSL into the .NET framework in versions three
and four. The syntax of the host language is not altered in any
significant way and we get the benefits of new constructs. (I
typically work with datasets culled from a database so I am most
familiar with the features related to list manipulation. Select,
filter, reduce, etc.) The biggest sin with respect to Javascript is
its use as an extension language for web browsers and anything else.
How I would love to have a browser that exposed its API through Ruby,
coupled with a Linq like DSL to communicate with web pages when
appropriate.

On 29 Jun 2010, at 04:50, timr wrote:

I believe Google has a summer of code project to bring Ruby to
browsers via their Native Client project.

Monorail - nativeclient - Native code for web apps - Monorail

I think JavaScript is fine, but would prefer Ruby if it were a choice
in the browser. Hopefully Google will come through and get it to
happen.

One of the reasons I started looking at Go for a Ruby implementation was
the possibility of NaCl support. Unfortunately support has been dropped
for the time being :frowning:

Ellie

Eleanor McHugh
Games With Brains
http://feyeleanor.tel

raise ArgumentError unless @reality.responds_to? :reason