Live data from Hacker News

Rails 7.1 Released

github.com

201–210 of 245 posts

Re: Rails 7.1 Released

#201
post #60

Earlier quoted context omitted.

I've never done rails, please tell me, why does "ruby on rails" need nodejs for? Also it's fairly easy to install node. Too easy in fact. I wish it was much harder, and required a degree.

Rails lets you use modern JS frontend tools.

It lets you use modern JS frontend tool but you can also choose importmaps route that comes as default in Rails 7 so there is no need for nodejs and you can also say goodbye to the big folder "node_modules"

Re: Rails 7.1 Released

#202
post #82
post #62

Earlier quoted context omitted.

> when simple functions with inputs and outputs And the state library, and the hooks for side effects, and the SSR, and the hydration, and the VDOM, and... It's not that simple.

Functional/OOP flamewar is starting...

On the FE, this is already a settled topic. Who wants to go back to `this`? Um... nobody.

Re: Rails 7.1 Released

#203
post #184
post #113

Earlier quoted context omitted.

One of these should help with setting up a new laptop to run Rails: https://rails.new https://rubyonmac.dev

Cool, but why not just use Docker? 2-4GB extra ram overhead and some initial learning curve, add a decent Makefile and.. never worry about local env ever again. Switch back and forth between Mac, Windows, Linux like it's nothing.

Add to this that Rails 7.1 comes with a pre-generated Dockerfile that works quite well out of the box

Re: Rails 7.1 Released

#204
post #9

Rails on the backend doesn’t get the credit it deserves. On the front-end it’s been a mess for a really long while now though

> On the front-end it’s been a mess for a really long while now though

I don't disagree, but also front-end was a mess for a long time.

Now Rails (with Rails 7.1 + Hotwired + Importmaps) is a pleasure to work with.

But we had to wait for good support in browsers of at least ES6 + Import Maps.

See the date of this article here: https://web.dev/import-maps-in-all-modern-browsers/ -> 28 March 2023 announcing importmaps is available on all modern browsers.

Thus there was no way around Webpack Yarn or any other helping tool for JS until now.

Now we have importmaps and good support in browsers for east least ES6 (https://caniuse.com/?search=es6) thus there is almost no need for extra tooling so you can write modern JS.

Re: Rails 7.1 Released

#205

Would anyone start a new project with Rails today? If someone suggested using Rails for a new project to me today, I would show them the door. There are so many more mature frameworks in more robust and performant languages. IMO the only reason to use Rails today is if you’re too uncurious to learn something better.

> There are so many more mature frameworks

Please name "many more mature" frameworks. I am curious about how many web frameworks are still actively maintained today.

Please note for me, mature also includes age. So you have to state frameworks that are at least older than 2005 (I would also accept created in 2005).

Re: Rails 7.1 Released

#206

I am Rails dev, and I don't like the fact that Rails in every new version has to REINVENT ALL THE WHEELS, ALL THE TIME. That creates huge problems for Rails devs and stakeholders. Rails is based on Ruby, which is backend language, and Rails should stay more on backend. That means - session management - routing and controllers - many API options (REST, json-rpc, ...) + JSON object exporters - ORM, Mailing, etc - serve…

Are you seriously comparing the speed of changes in Rails with React/Vue/Svelte?

Re: Rails 7.1 Released

#207
post #77

Earlier quoted context omitted.

Goodreads is an example of a Rails victim like yours. They customized the app on top of Rails, and it's been so bad that Goodreads is dead in the water and has not received major tech updates despite Amazon throwing engineers at it. Ruby is a dangerous language to refactor, so often you're locked for a long time. See also: Every blog post about Rails upgrades ever (see also: Stockholm syndrome)

> despite amazon throwing engineers at it Yeah, that is one way of phrasing it. Another way to phrase it is that Amazon took it over, turned it into an ingestion funnel to their book store, and has done as little as possible after that.

Don’t speculate. Listen to engineers who work there https://news.ycombinator.com/item?id=36577444

Re: Rails 7.1 Released

#208
post #52

Earlier quoted context omitted.

The performance of Rails serializers is still a nightmare. God awful performance.

I remember looking at BSON de/serializers for some perceived performance issue a while back, ruby was only marginally slower than PHP for the same task, which was just pulling big record sets back from the db. Can you elaborate?

When was that? I ask because PHP made large improvements to performance in the last few years.

Sometimes it's more than 2x faster than before. They now have JIT and are planing to have an intermediate language for even more speed.

Most PHP stdlib code is pure C/C++ so it tends to be very fast, but I'm guessing Ruby is the same.

Re: Rails 7.1 Released

#209
post #208

Earlier quoted context omitted.

I remember looking at BSON de/serializers for some perceived performance issue a while back, ruby was only marginally slower than PHP for the same task, which was just pulling big record sets back from the db. Can you elaborate?

When was that? I ask because PHP made large improvements to performance in the last few years. Sometimes it's more than 2x faster than before. They now have JIT and are planing to have an intermediate language for even more speed. Most PHP stdlib code is pure C/C++ so it tends to be very fast, but I'm guessing Ruby is the same.

It was about maybe late last year/Jan this year. When you say intermediate language, do you mean PHP has a bytecode interpreter instead of AST? At the time I looked at it, to convince myself there was no issue with Ruby, I actually hooked up the same table/query to PHP and used PHP's excellent profiling tools, then compared those to the Rails profiler. There wasn't a great difference. PHP was faster sure, but there was definitely no knocking Ruby's speed.

Re: Rails 7.1 Released

#210

Earlier quoted context omitted.

I love the new hotwire stuff. What don’t you like about thd front-end?

Asset pipeline is a hot mess: https://fly.io/ruby-dispatch/making-sense-of-rails-assets/ Propshaft should bring sanity back to it, but its going to be a while before that's mainstream.

And this version added Bun support :)
Post reply on HN