Live data from Hacker News

Rails 6.1

weblog.rubyonrails.org

71–80 of 87 posts

Re: Rails 6.1

#71
post #37

Earlier quoted context omitted.

DHH mentioned "NEW MAGIC" when he released the Hey stack on twitter [1]: > The HEY stack: - Vanilla Ruby on Rails on the backend, running on edge - Stimulus, Turbolinks, Trix + NEW MAGIC on the front end There has been a lot of speculation since then on what New Magic is. It was supposed to release at the same time as hey.com but they decided to postpone it till later. Many people think/hope that it is something simi…

I asked DHH the other day about the server side aspects of NEW MAGIC and he replied with: https://twitter.com/nickjanetakis/status/1334940603457658883 So we know NEW MAGIC will involve a substantial amount of integration with Rails on the server side but it could technically be ported over to other frameworks. It's interesting because StimulusJS 2.0 and Turbolinks 6 are fully client side based on previous tweets by m…

This article[1] and the others in the series give an idea of the direction by analysing how hey.com works. The page-updater library looks to bring a more declarative replacement for server-generated JavaScript responses, for example.

[1] https://dev.to/borama/a-few-sneak-peeks-into-hey-com-technol...

Re: Rails 6.1

#72

One of my favorite characteristic of Rails community is there is less to non-existence of superiority of paradigm nonsense. Since I switched to other languages/frameworks, discussion around Slack/forum is plenty of non-realworld usage .. great engineering (without user interaction). It's painful when you want to ship, not only to play. Rails is full of libs for building real business. Github and Shopify 's engineers…

What did u switch to? I keep wondering whether I should stick to Ruby and call it a career or just look for jobs that interest me / good career move , regardless of stack.

Re: Rails 6.1

#73

One of my favorite characteristic of Rails community is there is less to non-existence of superiority of paradigm nonsense. Since I switched to other languages/frameworks, discussion around Slack/forum is plenty of non-realworld usage .. great engineering (without user interaction). It's painful when you want to ship, not only to play. Rails is full of libs for building real business. Github and Shopify 's engineers…

Yeah this is exactly how I feel too.

Rails really is something special that can't be replicated by simply leaving the Ruby ecosystem and trying to reinvent "the good parts" in another language / framework.

You'll be missing out on one of the best parts of Rails which is an actual business extracts features into Rails from real world usage. That and Shopify + GitHub + Basecamp are running Rails master so by the time regular folks like us use a release it's already insanely tested in the real world with hundreds of millions of requests passing through these features. The confidence level that brings to the table that it's going to work for your app is unrivaled.

The massive amount of community support (gorails, etc.) and library ecosystem is icing on the cake.

Re: Rails 6.1

#74
post #6

It's a really nice time to be a Ruby / Rails developer. Rails itself has made some really nice improvements with this release and there is also the "NEW MAGIC" should be following in the next couple of days which is currently being sold as what Rails was to the back end, this will be to the front end. Ruby 3 is also just a few days away which brings optional type checking to helps add some additional structure to lar…

I’m so glad the pendulum seems to be swinging back to sensible server side based web dev that embraces the web and layers in dynamic front end behavior when needed. Most sites need a small amount of JS. Some benefit from quite a bit more, and for that there are things like Stimulus. And maybe you need a ton and it needs to work offline and manage a ton of local state - for that there are the usual SPA suspects. But t…

I don't see this trend out in the real world. Look on any major jobs site and you'll find React jobs everywhere.

Re: Rails 6.1

#75

I did a bunch of work in rails prior to the 3.0 days ( probably around 2013 or so), but then switched domains to work more in data engineering. When I came back to it to scratch an itch for some pet projects, I barely recognized it. I felt completely lost. Life moved pretty fast, I guess. Are there any good resources out there for someone from the 2.x days to get back to speed?

I fall in this same bucket. I still refer to the old railscasts now and then. I use rails for my hobby projects. Currently, I depend on Rails Guides, and I think they do a pretty good job. Would be good to know other resources. https://guides.rubyonrails.org/

I run https://www.driftingruby.com which has a lot of updated resources.

Re: Rails 6.1

#76
post #65

Hey, sorry for the aside - I am a Rails developer since Rails 4ish and we are running Rails 5 at work. I'm using Rails 6 for my own projects and in these side projects, I've been having a huge hell of a time trying to grok "right ways" to do things with webpacker/webpack. I seem to encounter issues every single time with deploys to Heroku because of precompilation issues, or imports not running right. But tutorials g…

Hey, I'm a JS dev who's been splashing around in rails for the past year or so. I'm happy to help! I just had a similar issue this morning, and I asked in the Ruby on Rails Link slack [1]. They're pretty helpful in there. For what it's worth, my issue was that Heroku was running `rake assets:precompile` without node_modules being installed. This was because `yarn install` failed. I looked closely at the logs and saw…

Thank you @timwis, that room looks great.

And yes, I experienced the same issue you discussed! That has helped in the past a few times. I wonder what the advantage is to precompiling as opposed to doing it at build time during the deploy step.

Re: Rails 6.1

#77
post #69
post #64

I'm hoping for vuejs and rails tie together. As a previous rails developer I never loved backbone angular or react but felt at home with vuejs and am jealously watching the laravel community embrace vue

Hey, feel free to check out https://github.com/matestack/matestack-ui-core and see if that's your jam :) Rails+Vue.js pretty tightly coupled!

that is pretty cool! Will check it out thanks!

Re: Rails 6.1

#78

Earlier quoted context omitted.

Based on this GitHub comment[0], it appears the answer is yes although it requires a little additional customization out of the box to prevent N+1 queries.. [0] https://github.com/rails/rails/pull/39341#issuecomment-72725...

In conjunction with Rails's "russian-doll" caching, N+1 queries are (or at least, can be) a good thing. This sounds counterintuitive; but, in the common case of read-heavy services, N ≐ 0 after the first access. When something changes, subsequent views end up loading & rendering the one record that changed, instead of preloading an entire collection. However, achieving this in practice requires some care in the nesti…

Hey, just wanted to thank you for the link. This sent me down a deep rabbit-hole of DHH interviews! I'm surprised I haven't taken notice of him before, he has so many profound insights. I am really grateful :)

Re: Rails 6.1

#79

Earlier quoted context omitted.

Man I'm hoping NEW MAGIC is like Phoenix LiveView. As a Rails dev I started looking into the Elixir/Phoenix world just for LiveView but I don't really want to switch languages... I just want that new magic that LiveView offers. I know there are gems for Rails but I'd prefer if it was baked-in and officially supported.

> I started looking into the Elixir/Phoenix world just for LiveView but I don't really want to switch languages... Yes, you want to add languages ! Join us...

Haha I would love to and it seems like a really great language/community/ecosystem. I'm just a part-time developer though, so my "coding time" is extremely limited and mainly just around scratching an itch as quickly as possible. I'm confident Elixir/Phoenix would give me that speed and comfort too, but I already know Rails and the time I would spend learning Elixir/Phoenix just to get access to LiveView would be better spent just learning Javascript and moving on.

I wish I had a use case where Elixir's concurrency model makes the initial lift worth it, but my work doesn't even require me to learn how to make Ruby scale past a $5 DigitalOcean droplet.

Re: Rails 6.1

#80

Earlier quoted context omitted.

LiveView is awesome - I'd be pleasantly surprised if Rails were able to pull off something that good with Ruby's more limited capacity for concurrency.

We actually built something inspired by LiveView, it's called motion! https://github.com/unabridged/motion

Motion has been on my to-do list for way too long, I should spend some time with it this weekend.
Post reply on HN