News for hackers. Stuff that matters.
Re:From Node to Ruby on Rails by aelzeiny on Thursday December 16, 2021 @01:12PM (#29581595)
> I dislike all the magic of rails.

This is my #2 problem with Ruby, and it's also the reason why a lot of folk love it. I think of macros in the same way I think of RegEx, if you're writing one you better hope it works perfectly because chances are that you'll be the only one to maintain it.

Other Ruby "features" that I dislike:

1. Blocks + Procs + Lambdas are all function-adjacent. Can't we just call them functions?

3. Out of bounds indexes on Arrays/Maps return nil.

4. method_missing() is super cool and super abusive. Again it feels like magic when functions come from nothing.

Re:From Node to Ruby on Rails by Toutouxc on Friday December 17, 2021 @07:18AM (#29591197)
> Blocks + Procs + Lambdas are all function-adjacent. Can't we just call them functions?

Well, Ruby has functions, they're just called Procs. Lambdas are a special, more strict breed of Procs, and blocks are just (pretty complex) syntax sugar for passing a Proc to a method. The main function-like concept is always a Proc.

> Out of bounds indexes on Arrays/Maps return nil.

Calling the #[] or #slice method on an Array with an out-of bound index returns nil, calling the #fetch method raises an IndexError or returns an arbitrary default value. You can use whichever suits the situation.

Re:From Node to Ruby on Rails by tcoff91 on Thursday December 16, 2021 @10:30PM (#29587352)
Ruby on Rails is awesome to write, horrible to maintain. It’s the fastest way to build a web app but good luck with staying productive once you have 100 engineers working on it and a million lines of rails soup to wrangle.
Re:From Node to Ruby on Rails by hudon on Friday December 17, 2021 @11:29AM (#29594400)
GutHub, Shopify, Coinbase, Square, AirBnB, etc. , can probably answer some of your concerns.
Re:From Node to Ruby on Rails by tcoff91 on Friday December 17, 2021 @01:29PM (#29596184)
GitHub feels super slow so I can't say I'm all that surprised to hear it's a rails app.
Re:From Node to Ruby on Rails by montblanc on Saturday December 18, 2021 @01:17PM (#29606932)
Gitlab is also Rails :) But wait it's probably super slow. You should try Jira heard it was wriiten in Java. Must be a fast app then.