News for hackers. Stuff that matters.
Re:Rust for Rubyists by pfarrell on Sunday December 24, 2017 @11:39PM (#16002679)
Exactly [1,2,3,4,5].select{|x| x%2 == 0}

If I were interviewing a a Ruby dev, anything other than Array#select indicates lack of experience.

Re:Rust for Rubyists by turboladen on Monday December 25, 2017 @12:09AM (#16002756)
That seems a bit shallow. I’ve been Rubying for 10 years and have always preferred find_all over select. select turns up in other APIs having different meanings (thinking of IO specifically); find_all tells you exactly what it’s going to do. Just my opinion, of course.
Re:Rust for Rubyists by dkubb on Monday December 25, 2017 @02:18AM (#16003135)
For me, it's always been select/reject/detect. Even though I know about find_all, it always seemed like the odd one out.
Re:Rust for Rubyists by odammit on Monday December 25, 2017 @11:49AM (#16004751)
Unrelated!

I haven’t talked to you in years. I wrote some DM plugins back in the day.

Hope you’re doing well!

Are you working on any interesting open source projects?

Re:Rust for Rubyists by dkubb on Tuesday December 26, 2017 @01:25AM (#16007445)
I don't recognize your handle, but nice that you remember DataMapper!

I'm doing really well, although I did kind of fall off OSS work as I got busier with kids and family stuff. I still hack on lots of different things, but nothing that I've been able to open source. I've been busy learning Haskell these days, although I tend to write Ruby for work.

Re:Rust for Rubyists by odammit on Tuesday December 26, 2017 @12:52PM (#16009737)
Glad all is well!
Re:Rust for Rubyists by fny on Monday December 25, 2017 @12:47PM (#16004974)
You're forgetting the existence of `find` which easily justifies `find_all`
Re:Rust for Rubyists by pmontra on Monday December 25, 2017 @03:49AM (#16003366)
I always use select and I've been writing Ruby since 2006. I didn't even remember find_all exists. As a name select reflects what I want it to do, find_all much less (this is very subjective). Furthermore it's easier to type. Luckily we have both and everyone is happy.
Re:Rust for Rubyists by nurettin on Monday December 25, 2017 @12:23AM (#16002802)
You know that methods in ruby can have many aliases, right? Can you clarify your statement?