Live data from Hacker News

RubyJS: A JavaScript standard library based on the Ruby core-lib

rubyjs.org

31–38 of 38 posts

Re: RubyJS: A JavaScript standard library based on the Ruby core-lib

#32
I think this is really awesome. I know I can use ES5 and I don't even have to worry about old browsers because my app requires the latest to work, but I think this is more a preference thing.

Hell, I could even use JQuery for a lot of this stuff, but I really like ruby standard library and it's cleaness.

Re: RubyJS: A JavaScript standard library based on the Ruby core-lib

#35

I did a quick check of the implementation, am I wrong in thinking every primitive type is boxed ? If it is the case, i expect the performance to be pretty abysmal. Do you have some data on that ?

Yes. Primitives are boxed. However method arguments are only boxed when needed, which makes it as fast as normal. In the methods internally are all using JS primitives (there are some left-overs where that's not the case yet). Wrapper objects are similarly fast as extending native JS types.

Re: RubyJS: A JavaScript standard library based on the Ruby core-lib

#37

I did a quick check of the implementation, am I wrong in thinking every primitive type is boxed ? If it is the case, i expect the performance to be pretty abysmal. Do you have some data on that ?

Yes. Primitives are boxed. However method arguments are only boxed when needed, which makes it as fast as normal. In the methods internally are all using JS primitives (there are some left-overs where that's not the case yet). Wrapper objects are similarly fast as extending native JS types.

Ok thanks !

Re: RubyJS: A JavaScript standard library based on the Ruby core-lib

#38
post #25

Earlier quoted context omitted.

I don't really see why RubyJS would be better than PHP.js. And I'm definitely not saying that PHP.js should be used. [edit] To be more specific, I really don't see the point of using a third-party library when the native methods are available. IMHO, if you choose a language, you should stick with it.

RubyJS creator here. I was just missing so many (native) methods in javascript. i liked the standard library of javascript and there is an extensive public ruby testsuite that i could use to test my implementation against. Plus i liked the idea of taking something that already works elsewhere and translate it JS, instead of coming up with my own API. IMO it's the same as using underscore/lodash, stringjs, etc, just a…

What is the license currently? It says Affero in the presentation, but github shows MIT license?
Post reply on HN