Live data from Hacker News

An Overview Of Upcoming Ruby on Rails 7.1 Features Part 1

web.archive.org

31–40 of 132 posts

Re: An Overview Of Upcoming Ruby on Rails 7.1 Features Part 1

#31

1. Rails retired Webpacker [that] compiled and bundled JS. Import maps, Turbo and Stimulus [are now the] default options, replacing Webpacker, Turbolinks and UJS . How do these new tools compare with the old? Versus Webpack, Vite etc?

Better. Much, much better than webpack/vite imo.

A specific example? Genuinely asking (codebase is Typescript/ES6 modules).

Re: An Overview Of Upcoming Ruby on Rails 7.1 Features Part 1

#32
post #6

I was pretty sad to see the pattern matching PR reverted for 7.1 [0], but I guess the Rails team wants to make sure they nail the execution (?) even if that means being late to the pattern matching party, which is arguably one of the best additions to Ruby since the 1.9.3 hash syntax. For now, I'm good with the little gem that kddnewton put together ( https://github.com/kddnewton/rails-pattern_matching ). [0]: https:…

I don’t understand the issue - why was it reverted? Are there multiple ways to do pattern matching? Why?

Re: An Overview Of Upcoming Ruby on Rails 7.1 Features Part 1

#33
Finally upgraded some internal applications to Rails 7 this month, and I was very happy with the asset pipeline changes. Rails' asset pipeline management hasn't really meshed with our development strategies for CSS and JS for a long time, and it felt like we were always fighting with trying to make our process fit Rails' expectations.

We're on Propshaft now and I expect far fewer asset issues in the future :P

Re: An Overview Of Upcoming Ruby on Rails 7.1 Features Part 1

#34
post #5

Quoted post unavailable.

I'm not on the RoR stack, but I think it doesn't generate a lof of buzz today because it's no longer the flashy new toy (IMO rust, go, kubernetes, a gazillion of react components in the UI, elixir, etc. took its place of "guess what, now we are running this!").

It's a battle tested and stable framework and I would use it anyday, but you no longer read much about it on the news, junior devs are not trying to pitch it as the next silver bullet. So, to be short, it's lacking buzz and online engagement. The tech is all there, the fad has passed.

Re: An Overview Of Upcoming Ruby on Rails 7.1 Features Part 1

#36

I was a devoted rails fan 10 years ago, but haven't looked back since full stack typescript. What's the general vibe on RoR nowadays?

Switched to Elixir/Phoenix a few years ago and have never looked back. Absolutely a 100% improvement on Rails in every way (except the availability of work!)

Re: An Overview Of Upcoming Ruby on Rails 7.1 Features Part 1

#37
post #8
post #5

Quoted post unavailable.

Shopify and Github being run on Rails sorta put it to bed a long time ago.

Yes but we should not look at unicorns to settle this argument. After all not every company has the size of a unicorn, the world is not big enough for that. Very few companies get to the point that any random technology won't do.

I've seen dozens of Rails projects going in production and many are still there. Same thing for any other programming language I guess. For normal sized companies Rails is OK.

What matters is: do you still find developers to work with your technology after 2, 5, 10, 20 years? If you don't, you have to move the project where the developers are. In the case of Rails they are still here for hire.

Re: An Overview Of Upcoming Ruby on Rails 7.1 Features Part 1

#38
post #10

I was a devoted rails fan 10 years ago, but haven't looked back since full stack typescript. What's the general vibe on RoR nowadays?

> What's the general vibe on RoR nowadays? Most people that use it are fine and productive. Because of lazy evaluation, type issues persist though. Plenty of instances of trying to call string methods on integers, and array methods on nil, and Rails devs in denial that that's a big problem as the app continues to grow.

The main problem is active record insanity and poorly designed table relationships/indices that lead to maintenance nightmares.

Re: An Overview Of Upcoming Ruby on Rails 7.1 Features Part 1

#39
post #28

Earlier quoted context omitted.

Because of lazy evaluation or because the developers aren't properly documenting their work? A language with a formal type system essentially forces you to provide type documentation, but there is an expectation with dynamically typed languages that you will still document the types (probably in your test suite). Rails in particular makes this a core function of the framework to really push you to do so.

> Rails in particular makes this a core function of the framework to really push you to do so. This sentence surprised me. How does Rails do it? I never documented types in Rails and all was well, since 2005.

Rails puts testing front and centre. Testing exists to document how features are intended to function and intended to be used (with the added bonus of enabling machine validation of the documentation).

If a function accepts an arbitrary type, as is the case for all inputs in a dynamic language, one needs to document how the function is expected to behave when given x type. This is ultimately the same as type checking in a typed language. It just moves where the documentation is located.

In that move, it is true that you often lose some strictness in the quality of the documentation. The developers who have an active hatred towards their co-workers may even forgo writing documentation entirely. But if you reach that point you've really got people problems, not technical problems.

Re: An Overview Of Upcoming Ruby on Rails 7.1 Features Part 1

#40

1. Rails retired Webpacker [that] compiled and bundled JS. Import maps, Turbo and Stimulus [are now the] default options, replacing Webpacker, Turbolinks and UJS . How do these new tools compare with the old? Versus Webpack, Vite etc?

My impression is that there are two ways to use rails:

1. Your frontend js needs are pretty minimal and you don't want something approaching a single-page app. In this case, you lean into Turbo and Stimulus to have rails do most things for you that would previously have been done with some a heavy-weight react-based frontend.

2. Your frontend js needs are significant and you do want a single-page app. In this case, ignore/disable turbo + stimulus. Instead, build your rails app as just a json API and then have a separate project for your frontend built using a dedicated frontend build tool like vite/CRA/webpack/etc.

On one hand, I feel like the turbo/stimulus stuff is the rails community preferring to pretend that the JS world doesn't exist. On the other hand, maybe it's really just the rails world embracing the above dichotomy: they're tools for doing some light frontend work with no JS, and an acceptance of the fact that if you want an SPA, there are better non-rails tools that you'll wind up using anyway.

Post reply on HN