Live data from Hacker News

Ruby 2.0.0 Released

ruby-lang.org

61–70 of 303 posts

Re: Ruby 2.0.0 Released

#61
post #50

Earlier quoted context omitted.

It's fun, it's clean, it's simple, and it works.

I use Ruby some, but I'm not sure I'd describe it as clean exactly. I've used Python a bit recently and was struck by just how clean it seemed. (I'm not sure Python has anything that quite replaces blocks, though. I don't claim Python's all better than Ruby.)

Cleanliness is subjective, but:

* Everything is an object, without exception.

* The object model is pleasingly orthogonal and its behaviour is easy to understand and predict once you know how it works.

* The syntax is high on alphanumerics and low on punctuation.

* Most of the core library method names strike a good balance between brevity and clarity.

* `Enumerable` is simple and powerful.

Re: Ruby 2.0.0 Released

#62
post #34
post #28

Earlier quoted context omitted.

And you deserve to lose those 50 points. Why do people still write silly comments like this? 1. Probably 75% of new startups are using rails, and rightly so. You'd need a good reason not to use it. "Rusty slow legacy systems" - what nonsense. 2. If there was a better language, they'd probably learn it? Or are you trying to insinuate Ruby programmers are dumb/lazy? 3. If you are blaming your slow web page on Ruby, you…

> 1. Probably 75% of new startups are using rails, and rightly so. You'd need a good reason not to use it. "Rusty slow legacy systems" - what nonsense. 75%? Evidence? You are the one who is talking nonsense, sorry to be direct and getting on Reddit level but you started. > 2. If there was a better language, they'd probably learn it? Or are you trying to insinuate Ruby programmers are dumb/lazy? Do I really have to te…

Having spent a good year at the 2012 batch at the 500 Startups office, I can safely say that the majority (>60%) of the guys I spoke with there were working off some sort of rails stack.

Re: Ruby 2.0.0 Released

#63
post #5

This is pretty exciting. Might be too early to tell, but it feels like the Ruby versioning recently has been done very right. The switch from 1.8.x to 1.9.x was slightly painful, but I think 80% of Rubyists have made the jump. I'm hopeful and expecting the switch to 2.0 by 80% of Rubyists in 2013. Compared to the adoption of major version releases by Python/Java/C#/PHP, I think that's something the Ruby core release…

1.9 was not supposed to be a wide release, and it contained more breaking changes than 2.0, IIRC.

I'm not 100% sure on the history, but I believe 1.9.x started as a dev release and then they changed their minds and decided it was a wide release. That initial confusion might be why the community took the time to go from 1.8 to 1.9.

I think they've learned from that, as 2.0 looks like a much cleaner/easier transition.

Re: Ruby 2.0.0 Released

#64
post #10

Today, I'll lose at least 50 karma points, but it's worth: Why people still use Ruby? 1. Because they get dream day rates for maintaining rusty slow legacy systems 2. Because they do not want to learn new languages and can stay in their comfort zone 3. Because they think it's still 2005 and nobody cares about slow server response times And now Ruby lovers, click on downvote or give your reasons why you still use Ruby…

You might as well ask why people still use Java. Because it works for their purposes, is popular (i.e. has market demand), and there aren't enough perceived incentives to move to a newer/better language yet.

I'd very much like to learn the next great framework and its language - I just haven't been convinced by any of the front-runners quite yet (especially in terms of ecosystem resources). When that happens, you can bet many coders like me will jump on it. Till then we'll just continue to work on our Rails apps.

Re: Ruby 2.0.0 Released

#65
post #10

Today, I'll lose at least 50 karma points, but it's worth: Why people still use Ruby? 1. Because they get dream day rates for maintaining rusty slow legacy systems 2. Because they do not want to learn new languages and can stay in their comfort zone 3. Because they think it's still 2005 and nobody cares about slow server response times And now Ruby lovers, click on downvote or give your reasons why you still use Ruby…

You seem to think people should constantly jump ship and change languages/ecosystems. I used to do this, and the result is that you don't get results.

I still look at new developments, and toy with new technology and programming languages, but when I want to get shit done, I find there's little that defeats using plain "old" C, Ruby, Java or whatever else you would probably call outdated.

Re: Ruby 2.0.0 Released

#67
post #23

Anyone have any thoughts on why python and ruby are so similar, yet so far apart? They are obviously very close, because people switch between them all the time. And they are compared on everything (languages features, libraries, tooling...). I think it's a healthy competitive environment.

I was thinking about this lately a lot as I started doing some Python after almost 10 years of Ruby, I think it boils down to the simplicty vs. elegance tradeoff. If you want to have elegant, very high-level APIs that hide a lot of details, like Rails with has_many :posts in class definitions etc. you have to sacrifice simplicity and transparency - this is what defines Ruby in comparison to Python, in hundreds of pla…

[deleted]

Re: Ruby 2.0.0 Released

#68
post #23

Anyone have any thoughts on why python and ruby are so similar, yet so far apart? They are obviously very close, because people switch between them all the time. And they are compared on everything (languages features, libraries, tooling...). I think it's a healthy competitive environment.

I was thinking about this lately a lot as I started doing some Python after almost 10 years of Ruby, I think it boils down to the simplicty vs. elegance tradeoff. If you want to have elegant, very high-level APIs that hide a lot of details, like Rails with has_many :posts in class definitions etc. you have to sacrifice simplicity and transparency - this is what defines Ruby in comparison to Python, in hundreds of pla…

The unfortunate thing is that there really isn't a tradeoff if you build your elegant and simple DSL on top of a set of API primitives that give you access to low-level behavior.

Look at Hibernate. As of the last time I used it (admittedly, several years ago), it was almost impossible to run raw queries against the underlaying database and get back simple result sets as arrays of tuples. You had either the abstraction, or nothing.

With ActiveRecord, you can at least get at the underlaying database connection via select_all and select_values, and turn Relations into SQL queries via '#to_sql'. It's not perfect by any stretch, and for some reason I don't understand Arel decided that being able to OR two queries together wasn't important, but you can leave the abstraction when you need to.

(Mongoid, the MongoDB ORM, is actually really well-designed in this regard; the Mongoid::Criteria works like Arel should, as does Sequel...)

Re: Ruby 2.0.0 Released

#69
post #47
post #40

Earlier quoted context omitted.

> 75%? Evidence? None really, just the startups at an incubator-type place near me. Might not be 75% but it's certainly a big chunk and probably the majority.

So no evidence whatsoever. No java, JavaScript, python, php, perl, c++, c#, erlang?

My hunch is that it's pretty rare to see a new startup using Perl, Erlang, C++ or even Java.

Re: Ruby 2.0.0 Released

#70
post #49

Overall, a good feature set. I only see some utility for keyword arguments, admittedly, but I tend to write very functional code, so maybe other people will get more mileage. Refinements, as I understand them, are a bad idea. I understand the motivation, but this is not the way to go about it. There's now a new scope all over the place (the set of refinements applied to any given class). This means that the behavior…

Totally agree about refinements. Hopefully the community pushes back enough on that experiment so it gets deprecated and removed.

A better design approach to achieve this effect is wrapper objects (similar to jQuery and Underscore.js) where I can add functionality to existing objects. Ruby has everything we need for this already, and makes it quite easy to do.

Post reply on HN