6 ms·
Ruby and Rails really seem to be going through a renaissance lately. - The pickaxe book, Programming Ruby, has a new edition this year covering Ruby 3.3 - The
by Kerrick 2y ago
Ruby and Rails really seem to be going through a renaissance lately.
- The pickaxe book, Programming Ruby, has a new edition this year covering Ruby 3.3
- The Rails Way is being updated for Rails 8 and is available in pre-release, and will have two companion books
- A new title, Rails Scales, is being published by PragProg and is available in pre-release now
- YJIT has made Ruby fast. Like, _FAST_
- Rails has a bunch of new features that cover the "missing middle" levels of success
- Ruby has a bunch of new and new-ish features like Data (immutable Struct), pattern matching, Fibers and Ractors, and more.
I had largely moved on from ruby into the world of front-end applications by 2013, but now I'm excited about the prospects of diving back in.
- game_the0ry 2y agoI would argue - its not a comeback, it was always the "king" of web dev. Seriously, other projects can use its success as a reference for implementation. And I say this as a front end dev.
- brandall10 2y agoAs a Rails dev from 2011-2018, having returned over the past year, it def seemed there was an exodus in or around 2015. Part of it was due to the rise of SPA and Rails difficulty working with those (webpacker, anyone?), part due to poor perception of Rails 4, part due to newer options such as Elixir/Phoenix or Golang rising in popularity for backend work, part due to many of the leaders such as Yehuda Katz moving on. Also watching from afar on HN, it seems like Rails 7 release was perceived as a sort of comeback, with quite a few articles posted in recent years praising the framework for a return to relevance.
- nicoburns 2y ago> part due to newer options such as Elixir/Phoenix or Golang rising in popularity for backend work I suspect Django and Laravel have taken a chunk of the market as like for like replacements.
- brandall10 2y agoDoubtful experienced devs moved to them. Attended many user groups and conferences during those years and both were seen as “lesser than”. Not unusual to see pot shots taken in presentation slides. Elixir/Phoenix were embraced with excitement due to Jose’s connection to the community and the ruby like syntax.
- princevegeta89 2y agoTried GoLang and also used Phoenix for a massive project which went well. But we had problems onboarding new folks into it and some junior and even senior engineers went bonkers trying to get their heads around FP and the elixir language in general. I would say it worked great for me, but the problems and the curve of learning for others in my team made it feel like Elixir creates that gap for teams in general. Go is good, but again I only tried it long ago and can't comment it for what it is today. I loved Ruby but I find it hard to go back to it after my experience with Elixir and Typescript. I was hoping for Crystal to go to great lengths but it doesn't seem to be the case at all.
- ch4s3 2y agoYou do need to set some rule when onboarding people into an Elixir application. Not everything needs to be a GenServer, and please don't endlessly nest Enum.map calls.
- silenced_trope 2y agoI also noticed an elitism from other devs when it comes to Rails devs. I literally heard on multiple occasions "we don't hire Rails devs here!" followed by a laugh. Of course it was tongue in cheek, if the candidate is amazing yes they're a hire. But it spoke to a reputation that Rails devs had seemingly received. I think because prior to JS/Node, it was Rails that offered newbies the fastest path into web dev. I don't believe this is the reason for any sort of exodus, but the negative perception may be partly a reason for devs choosing other frameworks.
- mdaniel 2y ago> - YJIT has made Ruby fast. Like, _FAST_ Then I pray with all my heart that GitLab moves to it, because that's one of the major complaints I hear about folks who use their web interface. Even while I was visiting the site to look up whether their main repo had a .devcontainer folder in it, I could just watch all the stupid ajax-y shit spin endlessly in what is conceptually a static table (sure, it changes per commit, but they're not a stock ticker platform) OT1H, I know, I know, "MRs welcome" but OTOH as a ruby outsider getting the dev environment up for contributing to them has been a lifelong struggle. Now that Rubymine has support for .devcontainer maybe it'll work better
- mattmcknight 2y agoWell, a lot of those pages have Vue application running on them.
- jwcooper 2y agoI'm not saying GitLab is poorly designed, but a poorly designed website will be slow on the fastest of languages or frameworks. It's not necessarily a Rails or Ruby problem here.
- ksec 2y ago>Then I pray with all my heart that GitLab moves to it, YJIT does make Ruby fast, but that doesn't mean it makes _Rails_ fast. (yet) At least dont expect multiple times improvements. Hopefully in the future.
- byroot 2y agoThere's plenty of reports of YJIT lowering real world Rails applications latency by 15-30%. There is also plenty of perfectly snappy Rails applications out there. People need to stop blaming the framework...
- deleted 2y ago[deleted]
- paulddraper 2y agoGitHub has always been fast for me.
- klaussilveira 2y agoDo you have any benchmarks to share on YJIT?
- pilaf 2y agohttps://speed.yjit.org/ https://speed.yjit.org/
- klaussilveira 2y agoAlso: Endless Ruby! https://bugs.ruby-lang.org/issues/16746 https://bugs.ruby-lang.org/issues/16746
- michaelbarton 2y agowhy not ennnnnnd? https://bugs.ruby-lang.org/issues/5054 https://bugs.ruby-lang.org/issues/5054
- bradgessler 2y agoI'm optimistic about Ruby's async story with the work Samuel Williams has been doing. https://github.com/socketry/falcon https://github.com/socketry/falcon is the tip of the iceberg, which is built on top of https://github.com/socketry/protocol-http2 https://github.com/socketry/protocol-http2 and a not of other repos at https://github.com/socketry https://github.com/socketry. It's inspiring other's in the community to think of interesting applications, like using the HTML slot API to stream responses to HTML without JS. https://x.com/joeldrapper/status/1841984952407110037 https://x.com/joeldrapper/status/1841984952407110037 I know other frameworks have had asynchronous IO support forever, but it's finally coming to Ruby that seems like it will stick around and be well supported.
- ksec 2y agoMy only concern is that none of his work is being picked up by Rails. As a matter of fact, it isn't just SW's work, the whole async story on ruby, it seems neither Fiber or Ractor has reached any mass adoption.
- frostymarvelous 2y agoThat's not completely accurate. Rails 7.2 added fiber support. Only action cable still doesn't fully support falcon using http 2. But that's coming soon as well.
- brightball 2y agoMy assumption is that’s due to the use case benefits for it. More concurrency is not always ideal, especially if you’re not in an environment that guarantees you won’t have negative impacts or runaways process (BEAM languages, etc). Rails projects are typically so hardwired to use a background queue like Sidekiq that it becomes very natural to delegate most use cases to the queue.
- osbre 2y ago> More concurrency is not always ideal Is this due to increased memory usage? Does the same apply to Sidekiq if it was powered by Fibers?
- deleted 2y ago[deleted]
- agumonkey 2y agoInteresting that both ruby and python are on the jit path. less is more.
- btown 2y agoI think there's a new and healthy rivalry between Ruby, Python, and JS for web backends! - Ruby and Rails now has all of the things mentioned above and more. I do have concerns that Rails will evolve in directions where bundled frontends have less official support, with the continued centralization of 37signals/DHH [0] and their controversial removal of Typescript from Turbo [1] (and bundling in general for Hey), but it's such a large community that there will be continued momentum in all directions. - Python used to be the choice if you expected to do both data processing/machine learning/NLP and web backends in a centralized codebase with a single language. And Django is still a world-class solution there, with gevent + asyncio + forthcoming developments on GIL-less Python all contributing towards making Django a highly performant and parallel framework. That said, with much of an app's data processing complexity often best offloaded towards LLM-powered solutions that have dedicated APIs, and both Ruby [2] and Node having bindings to https://pola.rs/ https://pola.rs/ as an alternative to Pandas, it's no longer the only solution. - And on the JS end, frameworks that enable full-stack batteries-included admin-out-of-the-box development like https://redwoodjs.com/ https://redwoodjs.com/ and https://www.prisma.io/nextjs https://www.prisma.io/nextjs + e.g. https://next-admin.js.org/ https://next-admin.js.org/ continue to evolve. Nowadays, if you're building a complex web application from scratch, Prisma provides all the escape hatches you'd need, so that you can build entirely in JS/TS and have the facilities you'd expect from Rails or Django. I'm really excited that all three communities are continuing to push the boundaries of what's possible; it's amazing to see. [0] https://news.ycombinator.com/item?id=30600746 https://news.ycombinator.com/item?id=30600746 [1] https://news.ycombinator.com/item?id=37405565 https://news.ycombinator.com/item?id=37405565 [2] https://github.com/ankane/ruby-polars https://github.com/ankane/ruby-polars
- acchow 2y ago> - YJIT has made Ruby fast. Like, _FAST_ Curious, I tried to look for some benchmarks, which still seems to show Node often being 3-10x faster https://benchmarksgame-team.pages.debian.net/benchmarksgame/fastest/node-ruby.html https://benchmarksgame-team.pages.debian.net/benchmarksgame/...
- mardifoufs 2y agoI'm not saying you're wrong but this feeling seems to pop up whenever a major RoR version releases. Now maybe ror usage has been trending up but I'm not necessarily seeing it.
- EasyMark 2y agoPeople are pushing back on “micro services and SPA everywhere” fads probably.
- Alifatisk 2y ago> YJIT has made Ruby fast. Like, _FAST_ Sadly, a lot of people still live in the Ruby 1.X era and thinks its slow.
- graypegg 2y agoI totally suggest diving back in! I'm doing the same. Day job is all frontend, but messing around with Rails again in my own time is reminding me of a much more productive and interesting era of my career. I was lucky enough to be near-ish to Rails World this year, was surprised how many other attendees were in that exact same position.
- eek2121 2y agoI'm a long time Ruby/Rails web developer. I stick with it because it has worked well for me. It just keeps getting better every year.