Live data from Hacker News

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

rubyjs.org

11–20 of 38 posts

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

#12
post #3

I'm not a rubyist, and I can see how this can be nice for ruby developers, but IMHO, if you need javascript - use javascript. Why add another layer of complexity and error proneness? What happens when a different js programmer needs to review your code? Or when you need to write some Node.js code and forgot all about syntax? "The main motive is to have a decent standard library for JavaScript" - jQuery works just fin…

Actually, even without jQuery, the native library for strings, arrays and numbers is usually more than enough. I might have needed something like `capitalize()` once or twice but would probably not include a whole library just for that.

Agree to disagree. The JS native library is incredibly rudimentary by "modern" standards. Even something as basic as comparing two arrays requires either hand rolling a solution or reaching out to a separate library.

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

#13

Is Underscore.js not good enough for you guys? Really?

You might not feel it's necessary for you, but I don't see the need for the critical tone.

They've donated their time to add something new to the ecosystem. You are under no obligation to use it.

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

#14
post #3

I'm not a rubyist, and I can see how this can be nice for ruby developers, but IMHO, if you need javascript - use javascript. Why add another layer of complexity and error proneness? What happens when a different js programmer needs to review your code? Or when you need to write some Node.js code and forgot all about syntax? "The main motive is to have a decent standard library for JavaScript" - jQuery works just fin…

> I'm not a rubyist, and I can see how this can be nice for ruby developers, but IMHO, if you need javascript - use javascript.

This is JavaScript, in the same way that jQuery is JavaScript.

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

#15
post #3

I'm not a rubyist, and I can see how this can be nice for ruby developers, but IMHO, if you need javascript - use javascript. Why add another layer of complexity and error proneness? What happens when a different js programmer needs to review your code? Or when you need to write some Node.js code and forgot all about syntax? "The main motive is to have a decent standard library for JavaScript" - jQuery works just fin…

[deleted]

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

#16
If you're after a standard library for Javascript, you could do worse than including es5-shim. Which has the advantage of being a library that (partially) implements a standard: Ecmascript 5.

    > es5-shim.js and es5-shim.min.js monkey-patch a
    > JavaScript context to contain all EcmaScript 5
    > methods that can be faithfully emulated with a
    > legacy JavaScript engine.
It provides Array::map, Array::filter, Array::reduce as defined in Ecmascript 5 along with String::trim and others, as well as replacing buggy implementations.

Previous versions of es5-shim included shims for things that cannot be correctly or completely shimmed in ES3 but those have since been separated and I now recommend including es5-shim in basically all web projects to get closer to a modern javascript in most browsers.

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

#17

If you're after a standard library for Javascript, you could do worse than including es5-shim. Which has the advantage of being a library that (partially) implements a standard: Ecmascript 5. > es5-shim.js and es5-shim.min.js monkey-patch a > JavaScript context to contain all EcmaScript 5 > methods that can be faithfully emulated with a > legacy JavaScript engine. It provides Array::map, Array::filter, Array::reduce…

Sure. You could do worse than RubyJS as well. This project is implementing the standard set by the reference implementation of Ruby and its standard library. And having used Ruby a bit, I’ve come to find its standard library quite good, as dynamic languages go. So it doesn’t much matter that ES5 features are “more native”—here and now, it’s still a matter of preference.

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

#18
post #12

Earlier quoted context omitted.

Actually, even without jQuery, the native library for strings, arrays and numbers is usually more than enough. I might have needed something like `capitalize()` once or twice but would probably not include a whole library just for that.

Agree to disagree. The JS native library is incredibly rudimentary by "modern" standards. Even something as basic as comparing two arrays requires either hand rolling a solution or reaching out to a separate library.

A thousand times this. Javascript as a modern language for non-web things is not mature at all. The amount of date/time, string, and hash utility functions that JS simply does not have is staggering.
Post reply on HN