Live data from Hacker News

Ruby 2.5.0 Released

ruby-lang.org

81–90 of 113 posts

Re: Ruby 2.5.0 Released

#81
post #61

Earlier quoted context omitted.

Huh... didn't even know what POODR was... Guess I've been faking it for the past nine years... I mean, I did start a company that used Ruby/Rails as the primary platform. And I've worked the last six years in a shop that currently has a team of about 12 Ruby/Rails developers... Don't get me wrong, Ruby's a tool in my toolbox; I use it like I would any other tool. I like solving problems. Most modern languages make it…

It's not just you. I've been running a company on Rails for four years - never heard of that book.

As a Ruby ops programmer who came to Rails via Chef I had no exposure to Sandi Metz or any of the other Ruby OO thinkers. However, several years later, now that I have read and integrated the ideas in POODR to my work, I highly recommend it.

Besides Sandi Metz, another Rubyist that I rate highly for delivering clear ideas about design is Avdi Grimm. His RubyTapas series quite radically changed my approach to building applications in Ruby.

Observe that programming in Rails doesn't intrinsically require an OO mindset. But when I reached the limits of the framework, knowing a thing or two about building rich OO domain models served me very well and helped avoid anti-patterns.

Re: Ruby 2.5.0 Released

#82
post #61
post #46

Earlier quoted context omitted.

I started a new contracting gig a couple of months ago, in Ruby. I had used it briefly years before in another project, but it was so long ago that I had to learn it again basically from scratch. Although I don't really think the language is anything special (i.e. it's a standard dynamic OO language), what really turns me off Ruby is this dogmatic, almost religious aspect of its community. Take POODR - it's more or l…

Huh... didn't even know what POODR was... Guess I've been faking it for the past nine years... I mean, I did start a company that used Ruby/Rails as the primary platform. And I've worked the last six years in a shop that currently has a team of about 12 Ruby/Rails developers... Don't get me wrong, Ruby's a tool in my toolbox; I use it like I would any other tool. I like solving problems. Most modern languages make it…

(To you and everybody else)

Point taken - apparently I mistook the particular echo chamber I happen to be in at that moment for a more general symptom. Glad to hear!

Re: Ruby 2.5.0 Released

#83
I had installed Ruby on a Windows 10 machine a few weeks back and had some issues setting up Ruby 2.4.*.

I forgot where the issue came from (I think it was some issue with bundler or ruby gems), but can I install 2.5 without breaking my set up?

Re: Ruby 2.5.0 Released

#84
post #82
post #61

Earlier quoted context omitted.

Huh... didn't even know what POODR was... Guess I've been faking it for the past nine years... I mean, I did start a company that used Ruby/Rails as the primary platform. And I've worked the last six years in a shop that currently has a team of about 12 Ruby/Rails developers... Don't get me wrong, Ruby's a tool in my toolbox; I use it like I would any other tool. I like solving problems. Most modern languages make it…

(To you and everybody else) Point taken - apparently I mistook the particular echo chamber I happen to be in at that moment for a more general symptom. Glad to hear!

Sorry, I think I got a bit sidetracked in my response.

I do hope that your current situation gets better or that you find somewhere that isn't so preoccupied with navel gazing.

Re: Ruby 2.5.0 Released

#85
post #80

Earlier quoted context omitted.

> Sure, these depended upon injecting new methods into core classes, but who cares? I, as a developer reading your code 6 months later, care. When something fails, it's nearly impossible which of the magic methods were injected by which magic library.

Not really. It's hard for your editor to do this statically, but there's heaps of good tooling for finding the method source and docs dynamically. pry> show-source SomeClass.class_method pry> show-source AnotherClass#instance_method # List an arbitrary object's class methods, instance methods, methods mixed in by included modules pry> cd some_object pry> ls The runtime knows how to execute your program (it's not rand…

You realise you just validated my point, right? :)

Re: Ruby 2.5.0 Released

#86
post #46

When I discovered Ruby 12 years ago, it was an amazing moment. All the features I loved from my previous favorite languages Perl, Smalltalk, and Scheme in one place, but with a much more reasonable syntax, a far more robust standard library, a complete and dead-simple packaging system, and a practical and portable runtime. The fact that it still feels magical, fun, practical, and pragmatic all at the same time while…

I started a new contracting gig a couple of months ago, in Ruby. I had used it briefly years before in another project, but it was so long ago that I had to learn it again basically from scratch. Although I don't really think the language is anything special (i.e. it's a standard dynamic OO language), what really turns me off Ruby is this dogmatic, almost religious aspect of its community. Take POODR - it's more or l…

Ruby & Rails developer since 1.8/2.2, never heard about POODR

Re: Ruby 2.5.0 Released

#87
post #31

Earlier quoted context omitted.

Disagree 1000%. Just because you can write a monstrosity in Ruby doesn’t make the language itself inelegant. Ruby, of the many languages I’ve used, has by far the highest potential for code being poetry. You can find solutions that are incredibly simple and understandable due to so much boilerplate being remove from the syntax. Likewise you can write code that’s impressively concise without being inscrutable — I’m co…

> Sure, these depended upon injecting new methods into core classes, but who cares? I, as a developer reading your code 6 months later, care. When something fails, it's nearly impossible which of the magic methods were injected by which magic library.

Rust's way of doing this is nice. It allows you to extend core types (e.g. add methods to integers), but in order to use the added methods you import the trait that adds them in the file you want to use them in (so you can always have a good idea of where they've come from)

Re: Ruby 2.5.0 Released

#88
post #31

Earlier quoted context omitted.

Disagree 1000%. Just because you can write a monstrosity in Ruby doesn’t make the language itself inelegant. Ruby, of the many languages I’ve used, has by far the highest potential for code being poetry. You can find solutions that are incredibly simple and understandable due to so much boilerplate being remove from the syntax. Likewise you can write code that’s impressively concise without being inscrutable — I’m co…

Are you familiar with Rust, Haskell, C# or JavaScript? All of these allow creating new extension methods of existing types, albeit by three different methods. I'm assuming that your "2001.to_year - 1" is "the date time for 2001 minus 1 day" rust (traits) (pow:: (2u8, 1000).digits().sum() (2..10_000).amicable_numbers().sum() 1901.to_year().upto(2001.to_year() - 1.to_day()).days().iter().filter(|d| d.mday + d.wday == 1…

Yes, I am familiar with all of them. :) Rust most of all, and that's another language I'm extremely happy with. The others to lesser extents, and Javascript is the only one of them where I'd say I dislike the language.

Re: Ruby 2.5.0 Released

#89
post #31

Earlier quoted context omitted.

Disagree 1000%. Just because you can write a monstrosity in Ruby doesn’t make the language itself inelegant. Ruby, of the many languages I’ve used, has by far the highest potential for code being poetry. You can find solutions that are incredibly simple and understandable due to so much boilerplate being remove from the syntax. Likewise you can write code that’s impressively concise without being inscrutable — I’m co…

> Sure, these depended upon injecting new methods into core classes, but who cares? I, as a developer reading your code 6 months later, care. When something fails, it's nearly impossible which of the magic methods were injected by which magic library.

It's almost as if you didn't even bother reading the sentence immediately following.

If you're writing a library doing things like this is a bad idea (except in very limited circumstances). And to what seems to be every non-Rubyist's surprise, virtually no libraries in practice actually do this sort of thing so there are never problems in practice.

The times I do this sort of thing in my own application code, I put the methods in a module and have a hook that raises an exception if the methods already exist when the module is included. This is the best of both worlds: I can add features that don't exist, but am informed immediately when my app launches if such a method has already been defined.

Re: Ruby 2.5.0 Released

#90

i loved ruby and i still do but my focus has now shifted to scheme/clojure and lisp family dialects like racket, and i don’t see a reason to return or move to anything else it feels like my search is over.

Similar sentiment here. Luckily I had the chance to move ruby->clojure professionally.

I used said chance, but I try not to disconnect too much from the ruby world as it's such a nice/productive ecosystem.

You never know when your Ruby skills can save the day again!

Post reply on HN