News for hackers. Stuff that matters.
Re:Where is Ruby Headed in 2021? by kayodelycaon on Thursday November 18, 2021 @09:21PM (#29273095)
This is really cool. I’ve used a number of languages and dabbled in a few frameworks but nothing I’ve used brings me joy like ruby does.

I approach programming creatively. I think in large systems and architecture. Ruby allows me to skip worrying about the details. Code blocks abstract away thinking about loops and just focus on data. Just about every array operation I could want is there, waiting for a code block. In other languages, things don’t flow like that.

I’ve tried purely function languages and I just can’t wrap my head around them because they abstract too much.

I’ve tried python, but I end up having to deal with the mess of importing modules and having to set up loops when all I want to do is map data.

Node.js comes so close but anemic standard library and absolute mess of explicit async everywhere just gets in the way. I want to love JavaScript. :(

Then there is Rails. Nothing even comes close. The attempts to replicate it in other languages ends up missing part of what makes it so great. I’m sad about the move to mounds of JavaScript. Nothing can match the productivity of simple_form and bootstrap.

My entire career has been in Ruby on Rails. I hope improvements to Ruby can keep it relevant. If not, I suppose JavaScript will do.

Re:Where is Ruby Headed in 2021? by shafyy on Friday November 19, 2021 @03:57AM (#29275180)
I feel very similarly with Ruby and especially Rails. After working in Rails for multiple years, I'm now doing a freelance gig where the tech stack is React, NodeJS with TypeScript on Firebase Cloud Functions, and it almost sucks out all of the joy of programming.

Making software in Rails feels creative, and the act of writing code in itself is very satisfactory.

A good opportunity to re-read the Rails Doctrine: https://rubyonrails.org/doctrine

Now, I know that this is very subjective and I can see how others might prefer other languages or frameworks, so I'm not adding this here to start a discussion. Just to share my feelings :-)

Re:Where is Ruby Headed in 2021? by chowchowchow on Friday November 19, 2021 @10:30AM (#29278167)
I had this exact realization getting ramped up in a large rails codebase: ruby is optimized for experience of the code author, while most of the things people miss from it (explicit imports, static types) help with code maintenance and codebase scalability.

The small/large project distinction makes sense to me. I think there’s a clear point in project size where the joy of writing code has to be deprioritized behind maintainability and simplicity, even if it becomes less fun to write code that way.

Re:Where is Ruby Headed in 2021? by horsawlarway on Friday November 19, 2021 @10:59AM (#29278496)
It's not a pleasant experience to come on board and deal with a typeless, styleless, inconsistent mess. And that's what Ruby on Rails will create, unless you spend an inordinate amount of effort on adding back all the tooling you need to make functional software in large groups.

Even then - there's no real path to a mature and maintainable language/framework. In my area (Atlanta) we're seeing a glut of RoR devs available because a lot of the large employers have given up and shut down the RoRs projects in favor of anything more suitable to teams in the 15 to 500 engineer range. Usually this has been typescript/java/.net.

Even within the RoR guys I know - a LOT of them are trying to get out and work with something else (several folks I know are moving to elixir)

Re:Where is Ruby Headed in 2021? by joelbluminator on Saturday November 20, 2021 @09:23AM (#29288298)
> a LOT of them are trying to get out and work with something else (several folks I know are moving to elixir)

Dumb move, Elixir has around 1000 job openings in the U.S while Ruby has 35000. In fact I find it pretty hard to believe they can't get a Ruby job in the U.S, and they choose Elixir from all stacks as a solution to their problem. Sounds to me like they just wanna try Elixir and can't really build a good argument in their head on why they're doing it. Jobs-wise things are definitely not gonna be easier for them with Elixir.

Re:Where is Ruby Headed in 2021? by zerocount on Wednesday November 24, 2021 @06:02PM (#29336228)
I agree. Elixir is just too obscure.
Re:Where is Ruby Headed in 2021? by ksec on Friday November 19, 2021 @04:47PM (#29282995)
>Even then - there's no real path to a mature and maintainable language/framework.

Hopefully that is what Github and Shopify brings to the table. Instead of just using Rails they are now actively shaping its future direction.

>because a lot of the large employers have given up and shut down the RoRs projects

My impression is that the vast majority of Rails communities don't care much about its ecosystem growth. They are just happily using it.

Re:Where is Ruby Headed in 2021? by tmm84 on Sunday November 21, 2021 @10:18PM (#29302364)
This has been my experience. I gave into learning Ruby and how things can be written several different ways. Even when tools like Rubocop and the like are used it still can result in a codebase that is very difficult to use.

My opinion, typed/tooled is useful when the desired solution/behavior/concept is complex.

Re:Where is Ruby Headed in 2021? by AlchemistCamp on Friday November 19, 2021 @11:39AM (#29279076)
Elixir is also dynamically typed but due to its pattern matching and immutability, I've found it eliminates about 90% of the issues that I've found with dynamic typing in other languages.

It's still got most of what made Ruby a joy to work with and several unique advantages, too!

Re:Where is Ruby Headed in 2021? by montblanc on Sunday November 21, 2021 @01:45PM (#29298628)
Lots of people complain about Elixir's lack of types and possible incomprehensible mess caused by Macros. It kinda proves to me that everyone has different tastes in software and that's about it, there is no objective truth to any of it. For me Java code is a nightmare.
Re:Where is Ruby Headed in 2021? by shafyy on Saturday November 20, 2021 @09:45AM (#29288502)
> I think there’s a clear point in project size where the joy of writing code has to be deprioritized behind maintainability and simplicity, even if it becomes less fun to write code that way.

I completely disagree. Joy of writing code must always be a top priority, also in large codebases. There are enough examples of where Ruby (on Rails) is used in large codebases with GitHub, Shopify, etc.

I guess it's a matter of personal match, too. Some people match better with TypeScript, others better with Rails. Nothing wrong about that.

I'm aware that they use a heavily modified version of Rails, but it still is Rails in the fundament.

Re:Where is Ruby Headed in 2021? by montblanc on Sunday November 21, 2021 @01:47PM (#29298643)
Gitlab, Discourse, Mastodon, Forem (dev.to) etc etc. All are big OSS software and are maintainable and seem to have quite a high velocity feature development. If it was an unmaintainable mess the whole opens source thing wouldn't have worked as well as it does for them. So maybe we should steer the debate towards - it CAN be done (as you can see) but it's more difficult with Rails (which I think is false).
Re:Where is Ruby Headed in 2021? by chowchowchow on Sunday November 21, 2021 @07:14PM (#29301161)
Well, sometimes joyfully written code can be less than joyful for those who have to read & maintain it…
Re:Where is Ruby Headed in 2021? by Buttons840 on Thursday November 18, 2021 @11:38PM (#29273896)
> I’ve tried python, but I end up having to deal with the mess of importing modules

Without those imports, how will people reading the code find the definitions? How will they track down the source code for all the methods being called?

If the answer is "with an IDE / tools", then can't those same tools be used to solve the "mess of importing modules"? If you're using a good IDE, imports and go-to-definition are both solved problems, no matter what language you're using.

If you're not using an IDE, that's a more interesting situation, and without an IDE I much prefer having the explicit imports so that I at least know where to start digging.

Re:Where is Ruby Headed in 2021? by sanderjd on Friday November 19, 2021 @01:04AM (#29274309)
The often impossibility of finding the definition of the methods I'm calling is the main thing that soured me on Rails. I think a more explicit style is more common nowadays, which is a good thing.
Re:Where is Ruby Headed in 2021? by grncdr on Friday November 19, 2021 @03:41AM (#29275085)
Maybe you already know it, but I find `something.method(:mystery_method).source_location` points me to the right place more often than not. I only mention it because I have noticed a lot of people work productively in Ruby without leveraging it's dynamic/reflective features[0], but little idioms like the above are absolute lifesavers for me.

[0]: A big disadvantage of the above is it's not statically resolvable, so you couldn't really build an IDE go-to-definition with it.

Re:Where is Ruby Headed in 2021? by Lio on Friday November 19, 2021 @04:38AM (#29275410)
The two tools I'd recommend for navigating ruby code in addition to #source_location are Solargraph[1] and, my favourite, good 'ol exuberant ctags[2].

Solargraph is an amazing project but ctags is still just so fast and low overhead that it's what I mostly use.

ctag support is available for most editors and is built into Vim. You need to first generate a tag file (or have an editor plugin do it for you[3]) and then press Ctrl-] to go to definition.

1. https://solargraph.org/

2. http://ctags.sourceforge.net/

3. https://github.com/tpope/gem-ctags

Re:Where is Ruby Headed in 2021? by nitrogen on Friday November 19, 2021 @06:17AM (#29276054)
And don't forget the option of just calling into pry at the line in question and typing ls and show-doc. Also ripgrep is incredibly useful for navigating new codebases.
Re:Where is Ruby Headed in 2021? by sanderjd on Friday November 19, 2021 @02:53PM (#29281500)
Yes, grep + debugger / pry were how I solved this when I was still writing lots of Ruby. I find it much more productive to be able to get these answers statically, but I was too strong when I said "impossible"; there's always some way to find the right code, or the VM wouldn't be able to run it :)
Re:Where is Ruby Headed in 2021? by Lio on Friday November 19, 2021 @10:36AM (#29278236)
Yes, you’re quite right! Thank you again, I must remember to use pry more.

With ruby 3.1 I think we’re getting a new default debug.rb gem.

It will be interesting to see if pry or the beat ideas from pry can be integrated with that.

Re:Where is Ruby Headed in 2021? by chenmike on Friday November 19, 2021 @03:02AM (#29274890)
This magic is delightful in small codebases I’m familiar with and absolute hell in large codebases I’m not familiar with
Re:Where is Ruby Headed in 2021? by sanderjd on Friday November 19, 2021 @02:54PM (#29281508)
Well put. Totally my view of it.
Re:Where is Ruby Headed in 2021? by rhizome31 on Friday November 19, 2021 @04:17AM (#29275289)
I've worked with Ruby in the past and I currently work with Python and Elixir. This is a caveat that Elixir inherited from Ruby. In Elixir there's the `only` option of `import`, but it doesn't seem idiomatic to use it. In Python there's `import *` but it's an actively discouraged practice whereas in Ruby and Elixir it's the norm. I like all three but on this particular point I think Python got it right.
Re:Where is Ruby Headed in 2021? by sodapopcan on Friday November 19, 2021 @08:08AM (#29276739)
I _much_ prefer Elixir’s way of not using imports much and prefixing most function calls with the module name. That way when I jump to a function definition, I often don’t need to do any further jumping around—I know exactly where everything is coming from right there. I especially hate when language idioms encourage using a shorthand name for the module when importing. Just be explicit!
Re:Where is Ruby Headed in 2021? by MrWiffles on Friday November 19, 2021 @09:16AM (#29277341)
> [...] I especially hate when language idioms encourage using a shorthand name for the module when importing. Just be explicit!

THIS. 100%!

I also think Python seems to do this better with the namespace pattern of `import x.y.z`. Never seen the `import *` pattern before, didn't know Python can do that (never done Python really though either, only browsed some code here or there).

But one addition to your statement I'd like to add: not just idioms, but documentation can spread this antipattern too.

Noobs come to a language, read the documentation for some tool, library, etc., and understandably come away thinking "Oh ok, this is how it's done" when in reality, while they're not doing anything wrong per se, they're being taught a bad habit right off the bat. And that makes the inevitable hard slap across the face that reality (or a co-worker) eventually hits you with all the more shocking, possibly even leading to resentment of others when this happens.

I myself had this problem many years ago; "why the hell do you need all these subclasses and so many layers of abstraction?!" I once asked. "Because those class/method names already exist within other classes loaded at runtime, or will likely be added in future external dependencies, and we don't want to accidentally overwrite those."

Well, I thought that was a stupid idea. In my (very limited at the time) experience, when I had that problem, I just insisted on finding a damn good descriptive name that wasn't going to be used for anything else, even if it was wicked long or a pain to type. Too long? Don't be lazy. Typos more probable with length? Learn to copy/paste. That was the approach I learned at some point from some documentation somewhere on the internet, and it always worked for me, so it was the "one true path" and all others were inferior, making proponents or users/adherents of any other way "wrong" and inferior to me and my superior, non-lazy intellect. You're telling me that you do it differently? You must be stupid or lazy, and I'm neither therefore I'm better than you; thus forcing me to adopt your inferior standard?! Preposterous! Insulting! Offensive! That's how I saw it.

God, was I dumbass.

I developed this attitude by learning my skills in a near total vacuum, other than documentation written by people on the internet back in the 90's. Not official company-published technical docs, mind you, but forum and BBS posts, mailing list discussions, and way too much IRC to be considered "healthy" by any stretch of the imagination.

Those who taught me did so in a way that was efficient and they did no wrong at all of course - this failure was entirely of my own making, from my own arrogance. But it's also true that had I been taught at the same time that "there are other ways in other languages that are totally valid; this is just for simplicity's sake" and then been shown, or better yet required to use other patterns in school/projects/etc., I might have been able to see the short-sightedness of my own arrogance sooner. Instead, it resulted in an antipattern that allowed me to become overconfident, arrogant, and more difficult to work with than I should've been.

----------

In case you're wondering, I can't remember what I read or where that came from so long ago. Sorry. Might have been C, C++, Java, DOS BASIC (non-GUI/non-Windows), Visual Basic (before .NET) or maybe even PHP 3.something, no idea - that was 20+ years ago. I was inexperienced, arrogant, and a fool; none of that was the author's fault whatsoever. We're all young and stupid at some point in life. I'm no longer young, but at least now I know I'm stupid! :-)

Re:Where is Ruby Headed in 2021? by MrWiffles on Friday November 19, 2021 @08:59AM (#29277150)
Yeah that's been a major pain in my ass more than once, totally get where you're coming from there. One tip for you, and anyone else who might be reading this from the future (hi! do we have flying cars yet? what about time machines? can you bring me one of each, in like, 10 minutes?): RubyMine, the IDE from JetBrains (commercial, Java-based desktop app but not nearly as bad/sluggish as you might expect, though not native fluidity) has a feature to show you where a given method ultimately comes from, going all the way up the chain of source code and abstractions to where it's really defined, including within Rails or other libraries/gems/imported files in a given project. It's a really killer feature for this particular pain point, in my opinion.

Short of that, assuming all your dependencies are unpacked under your project's directory (likely .gitignore'd but there nonetheless, instead of in somewhere like /opt/ or /usr/local/lib or something) you could also `grep -ir 'def method_name' | less` or something to try to figure that out, though it's nowhere near as smooth as RubyMine.

Other editors have Ruby and/or Rails plugins that may help ease this pain point as well, though personally I haven't done anything with that on the editor front in a very, very long time. Generally I'm outright militant about keeping my dependencies to an absolute minimum in a project, and doing everything the most "vanilla" (standard, accepted, most widely adopted patterns, naming conventions, etc.) way possible, and therefore I usually know what gem/lib is providing what particular method, so I don't really need that kind of utility most of the time because I can google up some API docs...when there are API docs anyway.

But in cases where you're having a legacy project/monolith dropped in your lap and nobody knows anything because "the business guy" fired the one developer who actually knew how everything worked and now that guy won't answer his calls because working for free is dumb? Yeah, in those cases, RubyMine or a real good editor plugin can be a lifesaver for this.

Re:Where is Ruby Headed in 2021? by sanderjd on Friday November 19, 2021 @02:56PM (#29281547)
If that RubyMine feature works well these days then that's great! In my day it was nice but hit or miss.
Re:Where is Ruby Headed in 2021? by inopinatus on Friday November 19, 2021 @01:32AM (#29274439)
It isn't a good thing. My first advice to all newbie Ruby programmers is to stop thinking about methods and start thinking about messages.
Re:Where is Ruby Headed in 2021? by saagarjha on Friday November 19, 2021 @01:35AM (#29274446)
I don’t see how this helps?
Re:Where is Ruby Headed in 2021? by inopinatus on Friday November 19, 2021 @01:38AM (#29274456)
Ruby's dispatch is Smalltalk-like, not Java-like; it is (very) late-bound. The consequences for interface design are dramatic, the natural style being one in which objects notify each other, rather than telling each other what to do, and the result is loose coupling and ease of composition.

People trying to write Java-like OO in Ruby end up confused and frustrated.

Re:Where is Ruby Headed in 2021? by discreteevent on Friday November 19, 2021 @05:59AM (#29275970)
There's a tradeoff between coupling and cohesion. All the books and talks are about decoupling because that's the interesting part. The problem is that in poor codebases you find everything has been decoupled and the complexity is a nightmare. As Adele Goldberg said: "“In Smalltalk, everything happens somewhere else.” It's better to have a system where you only decouple where and when you want to because you have decided that paying the cost is worth it.
Re:Where is Ruby Headed in 2021? by llamataboot on Friday November 19, 2021 @08:25AM (#29276883)
They used to pay me to turn monoliths into microservices, now they pay me to turn their microservices back into monoliths...
Re:Where is Ruby Headed in 2021? by rhizome31 on Friday November 19, 2021 @04:23AM (#29275328)
I've worked with Java, Ruby and Python but I don't get your point. Can you recommend any resource to help understand what you mean? Or maybe some short examples in Python and Ruby that would highlight how implicit imports allow solving problems in a way that explicit imports prevent?
Re:Where is Ruby Headed in 2021? by stepbeek on Friday November 19, 2021 @09:47AM (#29277679)
Not the parent, but I’ve found Sandi Metz conference talks to be an amazing resource for learning more about this message focused approach.
Re:Where is Ruby Headed in 2021? by sanderjd on Friday November 19, 2021 @05:25PM (#29283398)
But back to the original point, Sandi Metz wouldn't suggest that implicit imports are good.
Re:Where is Ruby Headed in 2021? by inopinatus on Friday November 19, 2021 @02:39PM (#29281332)
Sandi Metz's talks, and Avdi Grimm's MOOM course.
Re:Where is Ruby Headed in 2021? by saagarjha on Friday November 19, 2021 @01:45AM (#29274483)
Ok, but Objective-C also does messages and most of them are defined statically and can be easily searched for in a codebase. I’m not saying Ruby needs header files to send messages to something, but being able to figure out where the code for something is isn’t off the table for languages with dynamic dispatch and it can come in handy.
Re:Where is Ruby Headed in 2021? by inopinatus on Friday November 19, 2021 @01:53AM (#29274508)
For that, there's

    object.method(:name).source
    object.method(:name).source_location
but frankly this is still thinking in a rigid mindset that suits other languages better. Ruby isn't just "dynamic dispatch"; a typical metaprogramming technique handles all incoming calls without named methods, or by dynamically writing the code.

To put it bluntly, assuming there's a method on the other side of your message, is practically the antithesis of Ruby.

It's similar to the category error that leads folks to conflating type with class, and writing type checkers that look for class signatures.

Re:Where is Ruby Headed in 2021? by eximius on Friday November 19, 2021 @02:14AM (#29274624)
While freeing to write, that is horrifying to inherit.
Re:Where is Ruby Headed in 2021? by inopinatus on Sunday November 21, 2021 @05:03PM (#29300193)
That isn’t code you write in an application. The topic was how to find a method’s handler, this is how it’s done in the REPL.

Or if you mean, dynamically instantiated methods, those are found throughout Ruby and its ecosystem, and the reason it isn’t horrifying is that the language has terrific support at the REPL for developers needing reflection.

Re:Where is Ruby Headed in 2021? by sanderjd on Friday November 19, 2021 @05:32PM (#29283468)
Yeah this is pretty much why I decided I didn't want to write Ruby anymore. You may be right that this is the philosophy of the language, but if it introduces a speed bump or cognitive overhead when trying to understand what a snippet of code is doing (and I contend that "there might not even be a method there responding to your message" is a speed bump), then it's not a good thing, even if it's clever and somehow ideologically pure and interesting. I can appreciate programming languages as art pieces, but when I'm at work I want them to just be a tool.
Re:Where is Ruby Headed in 2021? by mypalmike on Friday November 19, 2021 @07:06AM (#29276372)
The best features about this bridge are that it's made out of soap bubbles and it doesn't necessarily span the river at any given time. This flexibility is wonderful.
Re:Where is Ruby Headed in 2021? by inopinatus on Friday November 19, 2021 @02:37PM (#29281311)
That is not a good metaphor for anything, really: no-one was enlightened; at best some reddit-grade snark was conveyed.
Re:Where is Ruby Headed in 2021? by mypalmike on Friday November 19, 2021 @05:20PM (#29283345)
I worked with Ruby for two years. The metaphor is apt when considering software development as an engineering discipline. It was certainly not meant as snark. You disagree, that's fine.
Re:Where is Ruby Headed in 2021? by inopinatus on Saturday November 20, 2021 @01:31PM (#29290594)
Not really sure what you think I disagree with, since the metaphor is so vague and wishy-washy it could apply to anything from theology to stamp collecting, but it sounds like trying to conflate late binding with some manner of bad coding style.

Well, since I have been privileged to work with several really great Ruby teams over the last couple of decades, whose large and well-structured code uses metaprogramming techniques yet remains easy to follow & comprehend (and debug and extend), and who remain splendidly productive to boot, I can say, if this bunch of guesses at the intended meaning of that "soap bubble" metaphor hold water, then yeah, I disagree.

Conversely, shitty code can be (and is) written in explicit import and early-bound languages. The enterprise world, for example, is riddled with massive hairballs of brittle, unmaintainable, boilerplate-heavy Java.

All of which only goes to show that people, not the programming language, are the problem.

Re:Where is Ruby Headed in 2021? by tomc1985 on Friday November 19, 2021 @10:44AM (#29278321)
I can't think of a single point in my RoR career where this has come up. How do you even do Java-like OO when classes are so loosey-goosey anyway?

Though having suffered in a Rails codebase written by Java engineers, I definitely agree that a light touch is needed with OO -- though composition has its own difficulties and together this forms one of my bigger criticisms of Rails.

Re:Where is Ruby Headed in 2021? by chespinoza on Friday November 19, 2021 @08:22AM (#29276854)
There's plenty of people writing java-like code in Python too, just check Amazon SDK for python or GCP SDK, it's a mess, I don't know if they get frustrated but they do get SDK users confused and frustrated.
Re:Where is Ruby Headed in 2021? by t0mbstone on Friday November 19, 2021 @06:48PM (#29284121)
You need to be using RubyMine. Simply command-click on ANYTHING to jump to the definition, even if it's nested deep in a gem that your project uses.

RubyMine, and the "jump to definition" feature in particular, is the primary thing that enabled me to really "get" Ruby and finally understand how everything worked together.

Re:Where is Ruby Headed in 2021? by devoutsalsa on Friday November 19, 2021 @01:08AM (#29274328)
“git grep” is pretty amazing for tracking things down.
Re:Where is Ruby Headed in 2021? by oblio on Friday November 19, 2021 @05:28AM (#29275722)
That's like someone asking for directions and you giving them a shovel and a introduction to archaeology manual.

If someone asks for directions you give them directions or a current map.

Re:Where is Ruby Headed in 2021? by hagbard_c on Friday November 19, 2021 @10:39AM (#29278269)
Well, no, not really. It is more of the equivalent of showing how to read (or where to find) maps instead of pointing out something on one. If the searcher is in a hurry the latter is more helpful, otherwise the former is preferable.
Re:Where is Ruby Headed in 2021? by oblio on Friday November 19, 2021 @11:16AM (#29278744)
Yeah, but you shouldn't need git grep to find out what something is.

I understand using to find out why it's there, but not what it is.

Re:Where is Ruby Headed in 2021? by sanderjd on Friday November 19, 2021 @05:36PM (#29283510)
Yeah the problem is that grep understands lines of text but not the structure of code. But code should be understandable by a computer program (by definition it has to be at some point) so you should be able to use a tool that understands the structure of the code it's reading rather than just seeing a bunch of lines of text.
Re:Where is Ruby Headed in 2021? by devoutsalsa on Friday November 19, 2021 @02:45PM (#29281406)
Personally I find it faster than using an IDE much of the time. It’s super fast and very powerful.
Re:Where is Ruby Headed in 2021? by rhizome31 on Friday November 19, 2021 @04:29AM (#29275364)
Of course that's what we end up doing in practice, using external tools (CLI or IDE) to work around a limitation in expressiveness of the language. This advice is a testimony that there's indeed a problem upfront :) And it comes short when searching from commonly used names...
Re:Where is Ruby Headed in 2021? by nitrogen on Friday November 19, 2021 @06:22AM (#29276082)
This advice is a testimony that there's indeed a problem upfront

Indeed, and the problem is that IDEs have encouraged developers to write convoluted code and to forget how to navigate a filesystem. Reading code and commit history is a much faster path to understanding a system than an IDE's autocomplete. I learned this from Ruby, and it serves me well in C, Kotlin, Scala, PL/SQL, Typescript, etc.

Re:Where is Ruby Headed in 2021? by maccard on Friday November 19, 2021 @08:41AM (#29277000)
> IDEs have encouraged developers to write convoluted code and to forget how to navigate a filesystem.

I would argue the exact opposite. Developers who force tools designed 30 years ago to dictate programming language best practices today are holding back the entire industry. There is no reason for my tooling to depend on my filesystem; imagine if my IDE integrated directly with vcs, and a language server provided both of those tools semantic information about my code, available on any device. Let's not kid ourselves either, utf-8 isn't human readable on disk, it's still a binary-like format.

Re:Where is Ruby Headed in 2021? by rhizome31 on Friday November 19, 2021 @09:48AM (#29277695)
You're right to remind that the filesystem is a metaphor, a model and not the reality of what's going on on the computer. The thing is it's still the common denominator between different IDEs and text editors. IDEs cannot be used in every situation so any professional developer who uses an IDE also knows his way around with a text editor. If we were to come up with a better abstraction than the file system, it would have to be shared between different IDEs for interoperability. My understanding is that Smalltalk was such an attempt but somehow that aspect of it didn't really spread. Are you aware of current progress being made in this area?
Re:Where is Ruby Headed in 2021? by sanderjd on Friday November 19, 2021 @05:33PM (#29283483)
I did that for many years, then I switched to languages with good static analysis and felt really silly about how many years I had wasted wandering around in darkness.
Re:Where is Ruby Headed in 2021? by Raphael on Friday November 19, 2021 @02:11AM (#29274606)
Would a Ruby IDE be able to figure it out?
Re:Where is Ruby Headed in 2021? by t-writescode on Friday November 19, 2021 @02:33AM (#29274739)
In my experience on a IntelliJ with Ruby extensions (so working like RubyMine), no.

Input and output parameters on a program with hundreds of thousands of lines becomes .. rough, to say the least. DryStruct has helped a lot; but several teams working on a single codebase with their own opinions of method calling patterns evolved over several generations all in a single codebase, and it’s … rough.

Re:Where is Ruby Headed in 2021? by sanderjd on Friday November 19, 2021 @05:38PM (#29283534)
RubyMine was impressive (because it's a hard problem) but still hit or miss when I was writing Ruby about 5 years ago. It may very well have improved a lot since then!
Re:Where is Ruby Headed in 2021? by prescriptivist on Friday November 19, 2021 @12:11AM (#29274037)
Those are fair points, but I just kind of hold the entire program space in my head. I work on a pretty large and complicated Rails app that does real world things (handle money, deal with people and companies, etc) and it's daunting at first but after a while it's sort of become one big system of objects interacting with other objects in a global objectspace and that's how it exists in my head.

I think for people that come to love Ruby it feels more natural to think about a program that way as opposed to thinking about a purely lexical context of a piece of code.

Re:Where is Ruby Headed in 2021? by valenterry on Friday November 19, 2021 @12:39AM (#29274186)
I think this is actually a very efficient way of programming. but it doesn't scale in project size and team size. Similar for Lisp. This is why these languages are really good for prototyping, but not as good anymore for big, longterm projects imho.

That's also why I don't think it's a great idea to add types etc. to programming languages like python or ruby. They are not made for this and they should focus on what they do well. Use the right tool for the job, don't try to make every tool being able to be used for the same task.

Re:Where is Ruby Headed in 2021? by chrischattin on Friday November 19, 2021 @05:51AM (#29275897)
This is just not true. There are several multi-Billion dollar public companies with millions of users and thousands of employees built on Rails.

In fact, the philosophy of convention over configuration et all makes Rails MORE scalable and easier to onboard new people than anything else out there that I’ve seen.

Re:Where is Ruby Headed in 2021? by jack_riminton on Friday November 19, 2021 @06:23AM (#29276086)
I agree, the convention means there are very straight-forwarded places to look for things

I recently worked on a Rails project for someone who didn't like to create scaffolds, models or controllers for small things, thinking that it would add to the bloat. But conceptually it makes everything 10x times easier and faster to find and understand

Re:Where is Ruby Headed in 2021? by oblio on Friday November 19, 2021 @07:26AM (#29276475)
Well, you'd better not check what happened to all those Rails apps when those companies grew.

There are soooo many blogs about migrating away from Ruby, adopting Go, Scala, whatever statically typed thing.

There's a reason even Ruby is getting a proper static type system.

Re:Where is Ruby Headed in 2021? by aantix on Friday November 19, 2021 @11:30AM (#29278958)
RoR is the most popular choice with Y-Combinator companies.

Its productivity is simply hard to beat.

Most of these companies are unicorns or public. https://spreecommerce.org/ruby-on-rails-most-popular-among-t...

Re:Where is Ruby Headed in 2021? by oblio on Friday November 19, 2021 @11:46AM (#29279175)
Dropbox literally hired Guido for a while and sponsored a performance oriented fork of Python.

I doubt they can be listed as a Rails success story.

Re:Where is Ruby Headed in 2021? by ksec on Friday November 19, 2021 @04:57PM (#29283112)
I dont think Dropbox even use Ruby. They have been a Python shop since day one?

Stripe doesn't use Rails either. That was a pretty bad article. And it is somehow from Spree.

Re:Where is Ruby Headed in 2021? by wavesplash on Friday November 19, 2021 @08:12AM (#29276765)
Um, really? Why are unicorns like Shopify or Github are still using Rails if that's the norm?
Re:Where is Ruby Headed in 2021? by golergka on Friday November 19, 2021 @10:46AM (#29278347)
The same reason Facebook uses php: that's what they started with and it's prohibitively complex, expensive and risky to change at their scale.
Re:Where is Ruby Headed in 2021? by joelbluminator on Saturday November 20, 2021 @08:11AM (#29287773)
Shopify is not a unicorn...sorry for nitpicking. Its a publicly traded company worth 210 billion dollars. It used to be a unicorn a long time ago.
Re:Where is Ruby Headed in 2021? by oblio on Saturday November 20, 2021 @03:27PM (#29291554)
Now that I think of it, are there any major startups launched post Rails glory days? Some time around and before Rails 4.0, so 2013.

Almost all the major former startups that I could find are from 2010 or earlier.

Re:Where is Ruby Headed in 2021? by montblanc on Sunday November 21, 2021 @09:37AM (#29296441)
Depends on your definition of major. For a company to become a unicorn it usually takes 7 years (not sure on the number but it keeps changing). So many companies formed in 2015,16...+ aren't there still. Looking in Linkedin for Rails jobs there are a lot, not all of them are old companies. Gitlab is a very famous name(2014) but it too IPO'ed so it's not a startup anymore.
Re:Where is Ruby Headed in 2021? by oblio on Tuesday November 23, 2021 @05:29AM (#29316303)
Gitlab definitely counts ;-)
Re:Where is Ruby Headed in 2021? by prescriptivist on Friday November 19, 2021 @12:18AM (#29274072)
Which isn't to say lexical scope isn't important in a ruby program -- it's paramount, especially for resolving constants -- it's just that after a while it's not that big of a deal that there is some ambiguity about where things come from. For me it's one of the most intuitive languages I've ever worked with but it requires a sense of intuition that is learned over time, as contradictory as that sounds.
Re:Where is Ruby Headed in 2021? by regularfry on Friday November 19, 2021 @09:10AM (#29277259)
It also requires a certain sense of confidence that whoever named that method you're calling gave it a good name. Fortunately (and not, I think, coincidentally) the ruby community has always tended towards good naming being really important.
Re:Where is Ruby Headed in 2021? by llamataboot on Friday November 19, 2021 @08:24AM (#29276874)
Explicit programming is more readable, but can result in a lot of boilerplate. "Magical" programming is much more intuitive once you know where the magic comes from but can be maddening to debug. Any framework large enough to be useful starts abstracting away implementation details.

I've found that people that gravitate towards Ruby enjoy meta-programming. The running joke is that you're not a Ruby programmer until you've decided that you should write a DSL. Like everything, clever programming has its tradeoffs.

These days no one reads the source code of every method they call until something is not working the way they expected it to.

Personally, I find the JS ecosystem that absolute worst for this because of the amount of imported code to layer basic functionality on top of the standard library.

If you've worked with rails long enough - well at that point things like Devise are probably in your mental model of how they work.

Personally I still find the large unbridgeable chasm between Python 2 and 3 to be a large friction point in the ecosystem. But if I worked in Python a smuch as I worked in Ruby, I may find Ruby more troublesome.

The simple fact is all languages are getting better. The best tool is not always the one that would be best for the job, sometimes it's just the one you know best. And the tradeoffs we make for ease of programming and abstraction can then turn around and mean we are pushing megabytes of JS over the wire when we don't need to, and now we are trying to solve that with more explicit inclusion and automatic tree-shaking in build pipelines etc.

It's all good. Every tool has two edges. I'm much happier to see people continue to engage with this edges are figure out how to make them more effective than to always argue about which edge is sharper.

Re:Where is Ruby Headed in 2021? by horsawlarway on Friday November 19, 2021 @11:12AM (#29278678)
Magic requires memorization.

Memorization is not consistent between teams/team-members.

Memorization is also the fastest skillset folks lose if they step away from the language/toolset for a while (it degrades rapidly)

Worst of all - The RoR ecosystem (6 versions in) requires memorization about which set of things you need to have memorized for this specific version of the framework.

I'll take some boilerplate code EVERY FUCKING TIME. The magic becomes a curse.

Re:Where is Ruby Headed in 2021? by joelbluminator on Saturday November 20, 2021 @08:15AM (#29287795)
What framework are you using then? Rails is pretty intuitive and easy...I am biased yes but nothing I saw from Spring or Django made me think they made more sense than Rails. The whole Bean thing is pretty crazy. Django is an over engineerd Rails from what I saw.
Re:Where is Ruby Headed in 2021? by epidemian on Friday November 19, 2021 @10:27AM (#29278134)
> Without those imports, how will people reading the code find the definitions? How will they track down the source code for all the methods being called?

I think in dynamic languages like Ruby and Python, there are two very different cases that we need to distinguish when thinking about this.

The first one is global references to modules/classes/functions. For example, in Python you may write:

  import my_module
  
  foo = my_module.Foo(some_arg)
So, if you wanted to find the definition of that my_module.Foo() reference, it's easy: go to the definition of my_module and search for the Foo class/function definition.

In Ruby, you may see instead something like:

  require 'my_module'
  
  foo = MyModule::Foo.new(some_arg)
Which looks very similar to Python, with the difference that the `require` method doesn't assign any local binding, but just executes the file my_module, which in turn will modify the global namespace directly and make `MyModule` available at runtime. The `require 'my_module'` might not even be present on the file that's then using `MyModule`: it might be indirectly required by another module that this file uses. Or, in the case of using Rails or any framework with auto-imports, the file might not have any `require` calls at all!

So, how is this resolved?

By convention, basically. If you see a reference like `MyModule::Foo` and want to see the definition of that, the convention is that that definition will live under my_module/foo.rb, so you can go to that file with some confidence that you'll find the the code for that class there.

So, if the convention is strong, and people follow it, this is basically a non-issue, and the go-to-definition can be done as easily as in Python, with or without an intelligent IDE.

---

The second case is when you have a dynamic reference to an object/function/whatever, like:

  def do_something(arg):
    arg.foobar()
In this case, neither Ruby nor Python (or any dynamic language in general) will help you much in trying to find the definition of the `foobar` method, as the type of the argument will only be known at runtime at the moment that this function will be called, and can even vary between calls.

There are different ways to make this go-to-definition somewhat more ergonomic than a global search for `def foobar`. But on the language level, i think both Python and Ruby are basically the same in this case: not very helpful. We then compensate by using good naming conventions, type annotations/comments, or using powerful IDEs that analyze the code to make good guesses about who is calling what.

Re:Where is Ruby Headed in 2021? by mehphp on Thursday November 18, 2021 @10:31PM (#29273497)
I just left a rails gig to go back to django. I like ruby ok but not a big fan of rails.

I totally see the value and understand why someone would like it but I just never could get to that point with it.

I much prefer the explicit imports, loops, etc I suppose

Re:Where is Ruby Headed in 2021? by chespinoza on Friday November 19, 2021 @08:28AM (#29276904)
That's interesting, what you think Django excels that Rails doesn't? Which ones were the pain points in your opinion?
Re:Where is Ruby Headed in 2021? by mehphp on Friday November 19, 2021 @10:53AM (#29278421)
I think it’s just preference really. I don’t think Django is better I just prefer some of it’s choices.

For example, I really don’t like that rails implicitly imports stuff into the namespace.

I like being able to follow the imports explicitly at the top of the file. I feel like there is way less of “where does this come from or what IS this?” when working with Django.

Re:Where is Ruby Headed in 2021? by t-writescode on Friday November 19, 2021 @09:02PM (#29284960)
Autoloading is a major source of pain in Ruby, I think.

What function did I import, exactly? Which of the 37 “update” calls did I call when I called it on this?

Re:Where is Ruby Headed in 2021? by scrose on Friday November 19, 2021 @12:15AM (#29274059)
> I’m sad about the move to mounds of JavaScript. Nothing can match the productivity of simple_form and bootstrap.

You might like some of the recent Rails 7 previews. I believe they’re removing Webpack out of the box and trying to simplify things on that end[0].

[0] https://weblog.rubyonrails.org/2021/9/15/Rails-7-0-alpha-1-r...

Re:Where is Ruby Headed in 2021? by clairity on Friday November 19, 2021 @02:15AM (#29274632)
to me, this is what makes the upcoming rails 7 release really exciting: no more node, npm, webpack, & yarn! all that js tooling complexity thrown right out the window, replaced with the much simpler set of es6 modules, turbo & stimulus (and maybe strada too).
Re:Where is Ruby Headed in 2021? by Lio on Friday November 19, 2021 @05:04AM (#29275554)
There seem to a lot of ruby pieces falling into place for Rails 7.

The Achilles Heel of Hotwire apps has previously been the low number of supported websocket connections and high memory usage when using ActionCable and Puma but I have high hopes that Falcon[1] will take care of that.

That along with Github's View Components[2] and Tailwind make me really please with the way Rails is heading right now.

1. https://github.com/socketry/falcon

2. https://github.com/github/view_component

Re:Where is Ruby Headed in 2021? by clairity on Friday November 19, 2021 @02:15PM (#29281058)
yes, websocket connections/memory use was a problem, will have to take a look at falcon.

i'm personally not a fan of tailwind (or bootstrap) for being overly/cryptically verbose, but i understand why it's popular when coupled with view components, which do seem useful.

Re:Where is Ruby Headed in 2021? by pull_my_finger on Thursday November 18, 2021 @11:09PM (#29273734)
>Node.js comes so close but anemic standard library

The nodejs API is rather big really. If you're using Ruby as your standard of normal sized almost everything would look small in comparison, but "anemic" is a stretch. You'd really hate Lua.

If you're taking suggestions, you might enjoy Janet[1]. It has a pretty large user API, lots of bells and whistles included in the standard libs like you'd find in Ruby, and lots of different ways to achieve the same result like Ruby. It's been a while since I checked out the ecosystem, but I was _very_ happy with the Joy Framework[2]. It definitely doesn't come close to the scope of Rails, but I think it _does_ near Rails in it's easy of use for the developer with it's scaffolding, controller generation etc.

[1]: https://janet-lang.org/

[2]: https://github.com/joy-framework/joy

Re:Where is Ruby Headed in 2021? by chespinoza on Friday November 19, 2021 @08:56AM (#29277125)
>If you're taking suggestions, you might enjoy Janet[1].

Just curious about why you'd suggest going from a popular stack to Janet? I'd rather suggest Common Lisp as it's a way more stable, mature and standardized technology.

Re:Where is Ruby Headed in 2021? by kayodelycaon on Friday November 19, 2021 @08:04AM (#29276714)
Funny you should mention Lua. It’s a fun little language I very much enjoy. Lua isn’t typically used for business applications with heavy logic and a lot of data manipulation.
Re:Where is Ruby Headed in 2021? by helloguillecl on Friday November 19, 2021 @06:08AM (#29276015)
I got sucked into React, graphQL and Nodejs and and always missed Rails, with all the hype I never thought that the environment would be so far behind. It's all my fault.

But now that Rails has incorporated Stimulus as a sane approach to the client-side of things, I'm coming back and it will be difficult to take me away again.

Re:Where is Ruby Headed in 2021? by pmarreck on Friday November 19, 2021 @12:00PM (#29279357)
> I’ve tried purely function languages and I just can’t wrap my head around them because they abstract too much.

Not sure what you mean here specifically (do you not understand Enumerable.inject in the Ruby stdlib? That's about the hardest thing to understand and once you're there, functional langs are pretty trivial) I was already coding in a functional style in Ruby (PORO, intentionally not mutating vars, etc.), so that wasn't an issue for me at least, when I hopped to Elixir.

The kicker was when I spent an entire month debugging a problem that would have been impossible to occur in Elixir/Phoenix- I was working on a million-line Rails codebase and there was a session issue where sessions would seemingly randomly get dropped... it was nondeterministic and absolutely maddening, a number of other devs had attempted to fix it and failed, and I finally did- and it ended up being a key-overwrite issue with a regular Hash being merged with a HashWithIndifferentAccess in the ENV variable passed between rack layers (and god, was that hard to find! I had to write custom debugging tools that walked through every Rack layer and deep-diffed the ENV hash, etc.). That was the last straw.

So far, Elixir/Phoenix has been fantastic for me at NOT producing "flagging tests", nondeterministic-seeming bugs, etc. Massive productivity boost.

[dead]
Re:Where is Ruby Headed in 2021? by dang on Saturday November 20, 2021 @09:29PM (#29293655)
Flamewar comments like this are not ok on HN and will get you banned if you do it repeatedly. Please make your substantive points without swipes.

Also, please keep tedious programming language flamewar like this and https://news.ycombinator.com/item?id=29288298 off HN. We're trying for something more interesting here.

https://news.ycombinator.com/newsguidelines.html

Edit: https://hn.algolia.com/?dateRange=all&page=0&prefix=false&qu... is totally unacceptable, and we ban accounts that carry on like that. I don't want to ban you, so please don't post like this again. In fact, please just stop posting about this topic and stick to things that genuinely gratify your intellectual curiosity. Conducting a putdown campaign against what other people like is an abuse of this site.

Re:Where is Ruby Headed in 2021? by joelbluminator on Sunday November 21, 2021 @09:18AM (#29296339)
Ban away dude, who cares.
Re:Where is Ruby Headed in 2021? by pmarreck on Saturday November 20, 2021 @03:13PM (#29291468)
:: let me hand-wave a merely possible but not at all guaranteed negative future scenario to argue against a better solution today ::

that's basically what you just did. "Electric cars will pollute someday! Just you wait!" >..<

Keep in mind that I've worked on small Ruby projects as well, and still prefer Elixir.

I'm not gonna suggest that there wouldn't be challenges in that scenario, but it just seems to me so far that they'd be much more manageable given the thoughtful design of Elixir.

The biggest problem in my app currently is actually JS/Node dependency hell, not Elixir code... and the JS only makes up a small portion of my app! (I should have never used AdminLTE as a design template...) At least my JS is tested (which was another huge PITA to figure out... simulating a DOM...)

Re:Where is Ruby Headed in 2021? by sergiomattei on Saturday November 20, 2021 @11:34AM (#29289512)
I sometimes wonder whether your job is to be a full-time dick about Elixir.

It's been years of this nonsense. Let it go.

Re:Where is Ruby Headed in 2021? by jb3689 on Friday November 19, 2021 @02:26AM (#29274699)
> Then there is Rails. Nothing even comes close

Have you tried Phoenix? It's really close. It's better in some ways. The data layer is quite different however. As much as I like Ruby, Elixir made a lot of things I liked about Ruby better

Re:Where is Ruby Headed in 2021? by kayodelycaon on Friday November 19, 2021 @08:17AM (#29276814)
Yup. The lack of libraries made it a non-starter. Rails has just about everyone beat in that category.
Re:Where is Ruby Headed in 2021? by pmarreck on Friday November 19, 2021 @11:52AM (#29279249)
I think many would be pleasantly surprised at this point, especially considering the entire Erlang library is also trivially accessible:

https://hex.pm/

Re:Where is Ruby Headed in 2021? by joelbluminator on Friday November 19, 2021 @03:21AM (#29274975)
Are you happy with the way things are going for Elixir? It seemed to me like the Elixir community was hoping for it to become the next Ruby and I don't see that happening anymore. It will have to settle for being a well respected but obscure piece of tech, kinda like what Erlang is.
Re:Where is Ruby Headed in 2021? by cpursley on Friday November 19, 2021 @04:07AM (#29275228)
Elixir and Phoneix are more popular than ever, especially with the release of LiveView. The ecosystem and community continues to absorb refugees from Ruby and other stacks.

It's such a better platform than Ruby and Rails that I won't bother writing about it here - there are already hundreds of blog posts about it. Productivity is at least on par with Ruby (I believe better) and performance on another plane of existence.

Re:Where is Ruby Headed in 2021? by joelbluminator on Friday November 19, 2021 @04:21AM (#29275314)
Sorry that really doesn't add up to what I see when I look at job boards, Elixir has really poor numbers. The Ruby guys who wanted to jump ship to Elixir already did so a few years ago (some of them will continue to jump ship from Elixir to Rust or Go because hey why not). So I don't know where new growth will come to Elixir.

It's not just jobs, by any metric you can think of Elixir is an obscure tech, if you want I will add sources to this claim but hopefully we can agree.

Re:Where is Ruby Headed in 2021? by UnknownUser1234 on Friday November 19, 2021 @07:31AM (#29276497)
You’re right. Software development has devolved into a popularity game.
Re:Where is Ruby Headed in 2021? by joelbluminator on Friday November 19, 2021 @08:51AM (#29277079)
I think people may be traumatised by what happened to Perl or Cobol. They don't want to become obsolete. In reality what happened to Perl isn't the norm imo.
Re:Where is Ruby Headed in 2021? by handrous on Friday November 19, 2021 @11:46AM (#29279182)
PHP is the more recent one. Folks who worked in PHP but got out at the right time look at all the low-paying PHP jobs (and there are lots of them!) and see mostly-PHP-experience job candidates dismissed out of hand for higher-paying jobs that would offer work experience outside PHP and think "there but for the grace of God, go I".
Re:Where is Ruby Headed in 2021? by joelbluminator on Friday November 19, 2021 @01:56PM (#29280854)
PHP has declined but its by no means a dead or dying tech. Pay should be good in the good companies (Slack? MessageBird? I am sure there are some big names I dont follow the PHP world that much). What I am saying is that even declining tech can provide stable income for decades. Perl is a different story though. I dont know if the Perl people can still get jobs writing Perl.
Re:Where is Ruby Headed in 2021? by handrous on Friday November 19, 2021 @02:45PM (#29281403)
Oh no, it's not dying—there's a ton of PHP work out there—it's just that most of the PHP dev market is very stagnant, wage-wise, outside a handful of companies, in a way that most languages in wide use are not. There's also a real stigma that goes along with still being mostly a PHP person these days, I've noticed. (I was one, like... 9 or 10 years ago)
Re:Where is Ruby Headed in 2021? by cpursley on Friday November 19, 2021 @04:49AM (#29275490)
Re:Where is Ruby Headed in 2021? by joelbluminator on Friday November 19, 2021 @05:09AM (#29275585)
Pepsico, Toyota ...come on now that's weak. They're not even IT companies let alone Tech. Whatsapp is running on a fork of Erlang afaik , not Elixir. Look I'm not saying no one is using Elixir, I'm just saying there's little jobs that's all. Cherry picking some famous names isn't gonna change that.
Re:Where is Ruby Headed in 2021? by regularfry on Friday November 19, 2021 @09:43AM (#29277651)
It's a difficult metric, that one. In part because I get the impression that high-specificity tech like Elixir and to a certain degree Clojure attract people who, once they're in the job, _never leave_, and their productivity is high enough (if you believe the marketing) that you just don't need to grow a team as hard and as fast as you would on a more "popular" stack to get equivalent outcomes.

If all that's true, it's a natural consequence that better tools will have fewer job postings: you need fewer people to get the job done, and the ones you've got have really good retention. However, so will tools on the other side of the bell curve: nobody in their right mind wants to go there, either on the supply or demand side. So all popularity really tells you is where the enterprise hype machine was, five, ten, fifteen years ago such that "nobody got fired for choosing X" and "learn X! It's got a lot of job postings!" still align.

But the enterprise hype machine is optimised for tools that have a very specific set of surface criteria: enormous libraries so you're not inventing anything, rock-solid vendor support so there are people being paid to evangelise it into orgs (or, like JS, are ubiquitous anyway, but I think that particular lightning only strikes once), and "easy to learn" ergonomics such that developers asymptote towards replaceable cogs in both quality and quantity.

"Well respected but obscure" describes a certain sort of success, by that reasoning. It just needs enough of a community to stay alive, and that's a bit more of a toss-up. Ruby haemorrhaged people in the Rails 4-5-6 cycle as people jumped ship to node, but Rails 7 and Ruby 3 are looking extremely tasty despite that, and I wouldn't be surprised if we saw a bit of a resurgence in popularity over the next couple of years outside big enterprises.

Most of the people I interview have got into tech after Rails 3 was released, and generally aren't aware of why the Rails/Phoenix/Django concept was such a breath of fresh air. I think what you'll see is that the reason Phoenix and Elixir have a "next big thing" isn't technical factors at all. It'll be a rediscovery by the new generation when someone unexpected goes unicorn and the story is "it was all down to Phoenix", even when the real factors were elsewhere.

Re:Where is Ruby Headed in 2021? by oblio on Friday November 19, 2021 @07:45AM (#29276585)
Plus these companies tend to have tens of techs stacks and hundreds of projects, you never know if what they're highlighting isn't some small internal project used by just one team and developed by more or less a lone wolf developer, with the project on life support after said developer left the company.
Re:Where is Ruby Headed in 2021? by dnautics on Friday November 19, 2021 @10:53AM (#29278418)
Pepsico and Toyota are sponsors for elixir events on the regular.
Re:Where is Ruby Headed in 2021? by oblio on Friday November 19, 2021 @12:06PM (#29279462)
Nice!
Re:Where is Ruby Headed in 2021? by dnautics on Friday November 19, 2021 @10:51AM (#29278407)
how about PagerDuty, Divvy, Slab? I once worked at a company where the CTO said 'elixir is an unknown quantity and I'm not sure we want to rely on it' and here we were using three critical services (one financial!) that were running on elixir.

> there's little jobs that's all

wasn't an issue for me. I applied for five elixir jobs in a limited sector (fintech) and got an offer.

Re:Where is Ruby Headed in 2021? by joelbluminator on Friday November 19, 2021 @01:27PM (#29280540)
Have never heard of Divvy and Slab. PagerDuty is a nice company though. Thats still not much. You can't compare it to Go or Kotlin or Swift who are about the same age as Elixir.
Re:Where is Ruby Headed in 2021? by dnautics on Friday November 19, 2021 @07:13PM (#29284334)
I guess you aren't working in startups. I'm at literally my third company that uses divvy as their corporate card.

You probably haven't heard of klarna, or discord, either.

Re:Where is Ruby Headed in 2021? by joelbluminator on Saturday November 20, 2021 @01:00AM (#29285926)
It's very weird to assume I'm some dinosaur because I haven't heard of a company that doesn't even have a Wikipedia page and hasn't IPO'ed yet. We use Recurly to do subscriptions and our expenses aren't done in the U.S (maybe that's the thing?).

About Discord see my other comment - I don't think Elixir is their main language.

Re:Where is Ruby Headed in 2021? by dnautics on Saturday November 20, 2021 @04:16AM (#29286644)
https://elixir-lang.org/blog/2020/10/08/real-time-communicat...

> From day one, Discord has used Elixir as the backbone of its chat infrastructure.

https://builtin.com/software-engineering-perspectives/what-i...

> Another is a re-architecture of our guilds service, which as our biggest communities have grown, started struggling to handle 100,000 connected sessions per Elixir process. We horizontally scaled the Elixir processes so that we can scale as the number of connected sessions increases... Many of our stateful services that maintain connections to clients, and process and distribute messages in real-time, are written in Elixir, which is well suited to the real-time message passing workload. But in recent years we have run up against some scaling limitations. Discord has written and open-sourced several libraries that ease some pains we’ve encountered with managing a large, distributed Elixir system with hundreds of servers

Re:Where is Ruby Headed in 2021? by llamataboot on Friday November 19, 2021 @08:27AM (#29276898)
Yet arguably, exposure to Live View turned the Rails ecosystem back towards tools like Stimulus Reflex and Hotwire, etc instead of everyone going for the very heavy Rails API + React stack which honestly is overkill unless you absolutely need a SPA or are building out multiple front ends against your backend
Re:Where is Ruby Headed in 2021? by pmarreck on Friday November 19, 2021 @11:48AM (#29279206)
Discord, an app with 300 million users, is apparently built on an "obscure piece of tech" >..<

maybe come out from under that ruby rock and smell the dev air now and then

Also, I was on Ruby since the time when it was "trying to be the next Java" (this was prior to 1.0!). All good things start out small.

Anyway, after the initial learning curve, much happier working in Elixir/Phoenix than I ever was in Ruby/Rails... especially from a code-writing AND code-maintenance standpoint. Immutable-everything is the way forward (which also massively aids concurrency). It also being 10x faster and far better/easier at working in a concurrent context are also perks.

Re:Where is Ruby Headed in 2021? by joelbluminator on Friday November 19, 2021 @04:06PM (#29282493)
1. I don't know Discord that well but looking at their Github it lists Javascript, Python, Rust, C++ and Elixir (in that order). Is Elixir their main language? Their careers page has tech all over the place - Rust, Java, Python, I actually am not bumping into Elixir. Could be a coincidence but it reinforces my feeling that Elixir is not the main language on Discord (if they even have one).

2. The amount of users Discord has has nothing much to do with anything. Facebook has 2 billion users and its programming language is Hack. So Hack isn't obscure? How many people know and use Hack besides a few thousand Facebook employees? If Facebook gets 2 more billion users in the next decade will Hack become 2x as popular?

Re:Where is Ruby Headed in 2021? by pmarreck on Saturday November 20, 2021 @03:20PM (#29291510)
Elixir is the language that ties all those other languages together there and was also their first language, until they had to branch out into those other ones for performance or other reasons.

> The amount of users Discord has has nothing much to do with anything

The argument I was arguing against was that Elixir is niche, not argumentum ad populum. It's no longer really niche, just elite. ;)

Re:Where is Ruby Headed in 2021? by jjdeveloper on Friday November 19, 2021 @03:54AM (#29275172)
I see Elixir pulling in a lot of people in with Liveview, especially those in the node/react world who are getting tired of the churn and build complexities.
Re:Where is Ruby Headed in 2021? by dudeinjapan on Friday November 19, 2021 @07:09AM (#29276397)
> I’ve tried python, but I end up having to deal with the mess of importing modules

It's funny, the fact that Ruby doesn't have a facility to import modules is one of my biggest gripes with it. Instead of importing into a specific scope, the global namespace becomes a dumping ground for anything that has ever been loaded, and you need something like Zeitwerk to do auto-loading for you. Which I guess can be seen as a convenience initially, but it makes things harder to manage as your app grows in complexity.

Re:Where is Ruby Headed in 2021? by regularfry on Friday November 19, 2021 @09:17AM (#29277348)
I have mixed feelings about autoloading. I never use it for my own stuff, ever: explicit `require`s all the way. But I do appreciate not needing the boilerplate in Rails.

It would have been nice to be able to do something like: `MyActiveRecordImport = require('activerecord')` to take control of the constant name, but honestly it's not something I hugely miss.

Re:Where is Ruby Headed in 2021? by louissm_it on Friday November 19, 2021 @04:14AM (#29275270)
You nailed it. I work with Ruby, TypeScript (React, Node) and Elixir.

While Elixir has more than enough uses and I love it dearly, nothing comes close to the productivity and expressiveness of Ruby (+ Rails).

I have very high hopes for JS/TS. Using a single isomorphic language for web development must have some benefits, but I'm afraid it's not there yet.

Re:Where is Ruby Headed in 2021? by fn1 on Friday November 19, 2021 @02:13AM (#29274618)
> Just about every array operation I could want is there, waiting for a code block. In other languages, things don’t flow like that.

This is a question about standard-library. The standard-library of kotlin is equally amazing (but Kotlin more or less requires the IntelliJ eco-system of course).

Re:Where is Ruby Headed in 2021? by karmasimida on Friday November 19, 2021 @02:44AM (#29274800)
Bet one entire language's future on a single framework isn't working very well I guess.

It is 2021, web frameworks are ... one of the solved problems. Polyglot is the future, and people are already adapting

Re:Where is Ruby Headed in 2021? by joelbluminator on Friday November 19, 2021 @03:04AM (#29274904)
> Polyglot is the future, and people are already adapting

Yes, right. I like how you can read into the future. Let's see what happens 10-20 years from now, things tend to change. But even if we look at how things are now, plenty of places still commit to 1-2 languages (in fact if you're a small shop it's pretty crazy to try anything else).

Re:Where is Ruby Headed in 2021? by regularfry on Friday November 19, 2021 @09:54AM (#29277763)
It depends heavily on the problem you're solving. A few jobs back I was in a small shop and we were all regularly bouncing between Java, C, Ruby, JS, Perl, Python... Go crept in round the edges too. We wouldn't have been able to deliver without the full set just because of what we had to interface with. It's more than doable as long as the culture is "learn the necessary skills".
Re:Where is Ruby Headed in 2021? by karmasimida on Friday November 19, 2021 @03:16AM (#29274958)
> plenty of places still commit to 1-2 languages

That might be true, but it didn't mean they will commit to ONE language for forever. Even governmental agency's code gets rewritten in newer languages eventually:

https://aws.amazon.com/blogs/apn/automated-refactoring-of-a-...

Re:Where is Ruby Headed in 2021? by joelbluminator on Friday November 19, 2021 @03:25AM (#29274992)
C, Java, Javascript, Ruby, PHP, Python, all these languages are 30-50 years old. I don't see any of them fading away the coming 20 years from now (you might argue about Ruby since it's much smaller, but it has a very strong community keeping it moving). You could bet your career on any of these and I'm pretty sure you will be fine 20 years from now.
Re:Where is Ruby Headed in 2021? by kayodelycaon on Friday November 19, 2021 @08:13AM (#29276776)
I am a polyglot outside of work, across many fields beyond just tech. Wordpress themes, managed networking, and home automation have been my latest tech projects. (Let’s make light switches less reliable!)

Since I’ve run Linux servers at every job I’ve had, I’m trying to get my toe into devops at my current employer. Getting all of our application into Docker has been fun. (Why does everyone run shit as root in a container!? Dropping permissions isn’t difficult!!!)

Re:Where is Ruby Headed in 2021? by chespinoza on Friday November 19, 2021 @09:38AM (#29277592)
That's easy to say, but for small teams and startups it's difficult to achieve.
Re:Where is Ruby Headed in 2021? by bamboozled on Friday November 19, 2021 @07:02AM (#29276340)
I like your honesty.

I’ve bounced around over the years and I’m doing a lot of Python now. It’s funny You said that about “loops” because I do feel like I’m always looping something in Python ha

Re:Where is Ruby Headed in 2021? by davidlee1435 on Friday November 19, 2021 @01:39AM (#29274460)
I quite like Kotlin when it comes to a language's "flow." Pity there's not a better web server framework for it
Re:Where is Ruby Headed in 2021? by stepbeek on Friday November 19, 2021 @07:42AM (#29276562)
We've been building on top of Spring Boot with nodejs as a part of the build process for front-end assets.

It's not as nice as rails, but we love kotlin so it's hard to give up.

Re:Where is Ruby Headed in 2021? by MrWiffles on Friday November 19, 2021 @08:50AM (#29277076)
> [...] I’ve used a number of languages and dabbled in a few frameworks but nothing I’ve used brings me joy like ruby does.

Totally agree, 100%. Ruby isn't "perfect", but it's a pleasure to use. As in, I actually want to use it, not just am "ok" or ambivalent about it. I have my nitpicks about Ruby, about Rails and other things just like anyone, but I second your comment that nothing else has been able to match that sweet spot of great productivity that is a direct result of a fantastic developer experience created through a programming language that just "flows" linguistically so much easier than...well, everything else I've personally ever seen (with Python being an arguable tie there).

My biggest gripes about Ruby and its ecosystem have been the pain in the posterior it is to deploy apps (all those gems, which eventually wind up abandonware and now you've got dependency hell, especially with apps not maintained in 5 years or something) and its relative sluggishness when compared against some other deployable artifacts.

Personally, I think Crystal (https://crystal-lang.org/) fixes pretty much all of this, as long as you're willing to cede a few things due to the nature of the beast (compiled vs. interpreted).

And that's not considering the speed improvements Ruby's gained in the last few years (3x3); it's undoubtedly far better now than when I last released an app with Ruby or Rails (circa ~2016, maybe ~2017ish). I'm just so disappointed that everything's "JavaScript this" or "Go(lang) that". Not that I have a problem with Go (I do have many problems with JavaScript, which I strongly dislike, but that's a separate topic), it's just that this industry acts like lemmings in a lot of cases. "New shiny!" attracts the horde, and that critical mass creates a new tyranny of being the "snowflake" technology/stack/developer, which has a lot of risks for both the organization paying for what you build in tech stack $X (rare language, can I replace this hire later, can I find somebody that knows $X, lower risk if we use $Y b/c we can find plentiful/cheap talent in $Y or $Y salaries are lower than $X), and by that token therefore it's a risk to the developer's career to get hard core on anything perceived as "snowflake" or otherwise not "flavor of the $(month || year || interval)".

Which is just so sad, and I feel like it's a contributing factor in Ruby's decline (in terms of hiring demand for full time positions). It's not at all the technology's fault, and it's not a performance "issue" whatsoever anymore (really wasn't in the first place unless you were nickel and diming literally everything or did stuff just plain stupid).

Go, Rust and friends all have their own benefits and drawbacks too, and they're fine languages with their own killer features and/or quirks. They can produce pre-compiled code for a variety of platforms from a single machine, resulting in (if desired) a single file binary deployable artifact that can be installed and simply run, no dependencies to install, no OS configuration necessary. Ruby, without lots of hacks potentially questionable hacks and potential future abandonware, doesn't do that at all AFAIK, but Crystal can also produce fat binaries just like Go can (and I assume Rust can too), making it the best of both worlds in my opinion.

Crystal: compile Ruby-like code to a "fat" binary for single file, zero-config/dependency deployment that runs true multithreaded apps as native code. And most of those tradeoffs you'd have to give up because "compiled" - most of those you can work around pretty easily and I've heard you can even have it embed source code in the binary to be run in interpreted mode at runtime, so you can have your app compiled for the vast majority of use cases, then have it run its own code inside itself interpreted/JIT'd when run, giving you access to many (all?) of the features you'd otherwise think you'd have to sacrifice.

So yeah, I love Ruby, and I think Crystal is definitely the next evolutionary step for that language and ecosystem. No hate on Ruby there whatsoever, I just see it as a more mature option for a lot of use cases, but definitely not all. I don't know if you can do that metaprogramming magic Ruby is so amazing at any faster in Crystal since you'd have to run the code as interpreted at runtime, not pre-compiled (AFAIK), so it's not an outright replacement. Still, I think it's damn near one, and you can probably "color outside the lines" just a tiny bit as needed when you absolutely MUST have that feature anyway.

Okay, end stream-of-consciousness. I haven't been able to sleep for 3 days, so rambling is a sort of unavoidable side effect...sorry about that. But yeah, try Crystal if you haven't already, you'll likely be very happily shocked at how amazing it is!

Re:Where is Ruby Headed in 2021? by chespinoza on Friday November 19, 2021 @09:31AM (#29277529)
I wonder why Crystal is not more popular today that it reached 1.X, as you say, it fixes some important Ruby issues but most importantly it also fixes Elixir's weaker points.
Re:Where is Ruby Headed in 2021? by MrWiffles on Friday November 19, 2021 @10:28AM (#29278147)
I can't comment on the Elixir stuff since I haven't really touched it at all yet (only ever seen one job opening in hundreds over 5+ years mentioning Elixir - only one, total!). But I have a theory on the rest...

I think the actual reason why it's not more popular is something I personally call "The Tyranny of the Masses". In short, what's popular/flavor-of-the-month is automatically "right", and everything else is automatically "wrong" or "high risk" in our industry. These are of course not real demonstrable facts, but people's perceptions that influence choice of technology stack.

Take JavaScript/Node.js for server-side apps for example. MASSIVE ecosystem. Near total ubiquitous skill availability in the developer market (with one major caveat I'll explain below). Not perceived as a rare or difficult skill to pick up, so salaries can be on the lower side than, say, a C developer with Linux kernel experience, for example. To employers and managers, this is a much more attractive mix than something where all of the above are in any way seen as "less true".

Compare that to Elixir. Not around nearly as long as JS, far fewer learning resources, relies on perceived turbo-nerd/esoteric "Erlang" runtime, so support availability may be harder to find and more expensive (so what's that mean for the employer's support and availability contracts, uptime agreements, and/or regulatory environment should something go sideways?). Not nearly as many available published libraries as on NPM (yes I'm sure Elixir's are far higher quality, but remember: it's perception, not fact, at play here). Skilled hires in market not nearly as common or ubiquitous as JavaScript devs are. Nobody has 20 years of Elixir experience. 20+ JavaScript experience does exist though (again, perception matters, not the fact that JS 20 years ago was laughably bad and would almost never even run today!).

Then there's the "safety" factor for production apps. JavaScript? Billions of apps all over the place. Nearly ever prod scenario imaginable has happened and 90% of them have at least been blogged about. Async/await in single threaded runtime using multiple processes for concurrency? Yep, somebody's done it. True multi-threaded single-process concurrency? Yep. Big, perceived as financially stable tech company behind it? Yep. Large market/ecosystem of firms that provide high quality support at reasonable prices to compete for business? Yep. Elixir? Arguably none of that, and definitely not to the quantity - again, not quality, quick-glance perception, optics here is all people look at - that JavaScript has behind it.

Is Elixir a better language, runtime, and ecosystem than JavaScript/Node.js? Almost certainly, and you can probably prove that pretty objectively with only some very obscure/esoteric exceptions having merit. I mean, dude, it's JavaScript, that's a low fucking bar! (Yes I'm a JS hater, go ahead, flame away! "YOUR BOOS MEAN NOTHING TO ME, I'VE SEEN WHAT MAKES YOU CHEER!" - Rick Sanchez)

But is it popular? Not compared to JS! JS is like that air-headed valley girl high school cheerleader that every guy wants to sleep with, and Elixir is that nerdy girl with a good heart, a great head on her shoulders, who can respect people and while she covers nearly every inch of her skin with clothing, leaving everything to the imagination, even a blurred photo would tell you that underneath all that, hot damn! She's the total package. But you want the cheerleader because of the popularity contest. You'll be the big man on campus if you get with her! Well, maybe not "the", more like "a", one in an ever-growing series.

Fast forward to 5-10 years post HS graduation. Cheerleader? Trailer trash with 6 kids on food stamps and zero drive in life whatsoever. Nerd girl? CEO of her own startup, and somehow even hotter now than she was back then!

Oh how foolish we are for falling into the trap of popularity. And while some may feel justified in their subservience to that popularity because reasons, some of them even good, we'll all feel curse the lack of choice, the absence of competition, the void of creativity and innovation - that we inevitably acquiesce to the clamors of the mob. Our future's bright hope will be made dim indeed when we succumb to the Tyranny of the Masses.

EDIT: The caveat on JS skills I mentioned above? Almost everybody who says they "know" JS is really at best an intermediate-level developer with it. It has a lot of special use cases, variations in how things work depending on engine, execution context (server app? browser engine?), and even today in 2021 we still see even self-described "experts" telling you to use alert() to get debug data instead of at the very least console.log/warn/error, etc. The language has made some frankly just plain weird (IMO flat out bad) design choices, like allowing more arguments to a method than its signature declares, and used to be so vastly snowflaked (nearly zero consistency between browsers) that you absolutely had to write an ENTIRE new JS app for each browser you wanted to target. Granted, that was the Netscape Navigator days, when Internet Explorer (Exploder?) was version 5, the rightly-maligned version 6 didn't exist yet, Firefox was a twinkle in somebody's eye, and Microsoft even shipped IE for the Mac (like OS X 10.1 or 10.2! Remember Aqua, the striped textures? Ahh, the good 'ol days...) It's come a long way since, but it still fundamentally suffers from having more bad documentation than good, and while most consider it a "lowest common denominator", that's unfair to people who really are true experts in the language, who will tell you that when you get real deep with Node or V8, you can see some gnarly shit. It's a god-awful security nightmare; why the hell would I let whatever website in the world run whatever code they want directly on my machine all willy-nilly, automatically accepting every API call by default, denying almost nothing, with unrestricted access to some pretty advanced/low-level APIs that can do some serious damage if abused? And people say Flash was bad (well, they did only after Steve Jobs made a big deal about it; he wasn't wrong, but virtually NO ONE hating on Flash back then had any idea how it even worked before Steve bitch slapped it into oblivion and rightly so). Its syntax is arguably archaic (we don't need semicolons to end statements/lines these days, language parsers are much more capable now; look at Python, Ruby!), it's littered with inconsistencies in the language itself, and since everybody's a hammer (JS "expert"), everything looks like a nail (a suitable use for Node/JS/DOM/Script), even when it's damn well obvious, painfully so, that it's absolutely NOT. All this, and yet everybody's somehow an "expert" with JavaScript. Really? Really?

Re:Where is Ruby Headed in 2021? by chespinoza on Friday November 19, 2021 @01:13PM (#29280365)
In all these years the only thing I've seen has been despise against JS, if it was popular it was 'cause we hated it, we hated how bad designed it was, but then Node appeared and someone said that isomorphic JS would be a good idea as looking for backend engineers would be easier. Now there are tons of JS libs in npm, but a big percentage are quite minimal, unnecessary and of questionable quality.
Re:Where is Ruby Headed in 2021? by ksec on Friday November 19, 2021 @05:11PM (#29283250)
It isn't complicated. Crystal doesn't work on Windows. If elixir ecosystem is small, Crystal is 10 times smaller. Unless there is an active community that decide to do the grind and fill in all the missing pieces. Crystal may remain a niche in the foreseeable future.
Re:Where is Ruby Headed in 2021? by chespinoza on Saturday November 20, 2021 @09:59AM (#29288624)
Well, you can run Linux using WSL in Linux so you can get Crystal working there anyways.