News for hackers. Stuff that matters.
Re:Ruby Together by mooreds on Wednesday March 09, 2022 @09:53PM (#30622705)
What would convince you?

* top companies using it? (shopify, github, stripe)

* number of stars on github for projects? https://github.com/rails/rails has 50k stars

* place in the Redmonk language rankings? https://redmonk.com/sogrady/2021/08/05/language-rankings-6-2... shows it at #9

* ability to get a good paying job? https://marketing.dice.com/pdf/2020/Dice_2020_Tech_Salary_Re... has the ruby salary at 114k, more than typescript/javascript

I am an active member of the ruby community so am definitely biased, but I'd love to know. Sorry if that's combative, but I always wonder how folks choose languages based on popularity. If there's anything folks can point at, or if it is more of a gut feel. (Unless it is javascript or C, which are always going to be around because of their huge deployed base.)

Edit: added place in the redmonk ratings. Changed to be less combative.

Re:Ruby Together by aerovistae on Wednesday March 09, 2022 @10:39PM (#30622989)
It didn't come across as combative at all, no worries. I find it pretty convincing to be honest. If anything I think the biggest hold-up is that I can get jobs as a senior front-end engineer but if I looked for Ruby jobs I'd kind of be taking 2 steps back down in terms of what I can contribute.

Frankly I'm not a fast learner, unfortunately. Although it's possible that I've convinced myself of that because I hate the Java ecosystem so much that my brain just doesn't want to absorb information about gradle and intellij configuration and java dependency management and so on.

Re:Ruby Together by scrose on Wednesday March 09, 2022 @10:47PM (#30623022)
I went from being mostly frontend focused to working almost exclusively on backend and while I was able to get a generous pay bump, I found that I was generally much happier to just be working with Ruby/Rails almost full-time. Even though I was not as proficient right away.

I guess what I’m trying to say is if you end up focusing on working only with what you’re proficient at, you may be missing out on other opportunities that you may end up enjoying more long-term.

Re:Ruby Together by jambalaya on Thursday March 10, 2022 @03:19AM (#30624504)
We're hiring for Ruby/Rails. We're also hiring JS. I've used Ruby/Rails my entire career and don't plan on switching. Pay seems good. Definitely more JS jobs of course but I'm happy with what I'm doing and making. I bet you can pick it up in no time.
Re:Ruby Together by andrei_says_ on Thursday March 10, 2022 @11:02AM (#30628415)
Would you consider sharing which company you’re speaking of (“we are hiring for Ruby/Rails”)

My email is in my profile.

Re:Ruby Together by phaedrix on Wednesday March 09, 2022 @11:21PM (#30623188)
It's not you, it's java.
Re:Ruby Together by lawik on Thursday March 10, 2022 @12:11AM (#30623443)
The market is quite good for people who want to try a move or two.

I'm not into Ruby but I see people hesitate similarly about my preferred lang and mostly think they should just take that leap.

Re:Ruby Together by sunsetSamurai on Thursday March 10, 2022 @12:27AM (#30623511)
what's your favorite language?
Re:Ruby Together by seiferteric on Wednesday March 09, 2022 @10:02PM (#30622764)
The usual reason given is lack of libraries compared to python. I started a project a while ago with the idea that you could create a ruby library that would implement the C python extension API using the ruby C extension library... I got some basic stuff working, so you could "import" a basic python C extension in ruby (after recompiling it against my headers/library). Then you can use a python -> ruby transpiler (which does exist) to convert the python parts of the code to ruby and maybe have stuff "just work". The more I got into it though, it seemed pretty daunting to get something like numpy working... so I have stopped for now.
Re:Ruby Together by axelthegerman on Wednesday March 09, 2022 @10:08PM (#30622802)
I'm not sure what Python library you couldn't find an equivalent for in rubygems. I never had a problem finding what I needed. (Maybe some ML or related fields?)

Depending on the size of the library it might make sense to rewrite it. Using C extensions is more popular than Python or other languages

Re:Ruby Together by ta988 on Wednesday March 09, 2022 @11:00PM (#30623081)
Many things in rubygems are unmaintained, prototypes or really incomplete.
Re:Ruby Together by vidarh on Thursday March 10, 2022 @06:22AM (#30625700)
That's the case in any package manager open to anyone to submit to.
Re:Ruby Together by mooreds on Wednesday March 09, 2022 @10:08PM (#30622809)
Ah, good point. Domain does matter. But that didn't seem to be what the original poster was pointing to.

Based on my ambient knowledge, I wouldn't want to write anything in the machine learning space in ruby. Or for that matter in any language other than python (or maybe scala/java, if you are using spark).

Or are you suggesting that python has more/superior libraries compared to ruby across the board?

Re:Ruby Together by chucke on Thursday March 10, 2022 @02:33AM (#30624162)
Why not just use numo, Ruby's own numpy?
Re:Ruby Together by jstummbillig on Thursday March 10, 2022 @03:01AM (#30624371)
There is no need to sway anyone because there is nothing to sway. Javascript is eating the web and interest in Ruby/Rails is declining, measurably: https://trends.google.com/trends/explore?date=all&q=%2Fm%2F0...

That is not to say that you can't get a job and you might win the market by doing something increasingly rare in relatively high demand. Or you might not. Or you might do ruby for a multitude of other reasons but relative popularity better not be one.

Re:Ruby Together by pizza234 on Thursday March 10, 2022 @03:05AM (#30624399)
Fun thing (or not, depending on how one sees it): the trends of "Ruby" and "Ruby on Rails" match almost exactly:

- https://trends.google.com/trends/explore?date=all&q=%2Fm%2F0...

- https://trends.google.com/trends/explore?date=all&q=%2Fm%2F0...

But this is well known :)

Re:Ruby Together by weatherlite on Friday March 11, 2022 @04:19AM (#30637924)
As you said everyone and his sister knows javascript, JS devs are a commodity. I don't think anyone can expect to secure his future by picking up something like JS or Python since there are tens of millions of people learning it right now. So the popularity of the language means just that - everyone knows it. There are more jobs but way more people applying.

Nor is Ruby a secure bet, nothing is really. Ruby is niche but it still has a very strong community, there is almost nothing web related Rails and the community haven't solved. I think people overrate the importance of community size. Does it matter if JS has 10 million devs or 20 million? Not really imo. Maybe even 10 is better than 20, less decision fatigue.

Re:Ruby Together by krainboltgreene on Thursday March 10, 2022 @04:04AM (#30624798)
this is exactly how i would expect hackernews users to do analysis when the question is "should i get a ruby job"
Re:Ruby Together by Lapsa on Thursday March 10, 2022 @12:41AM (#30623574)
I made a switch from .NET to Ruby. Initially it's surely a downgrade in terms of salary and whatnot. In a long term - just about everything seems bit more sane over here. Ruby is my fav, don't mind Javascript (although I find its quirks annoying), secret crush on C (you clog it up w/ billions of calculations and it just goes: "yeah, here you go...").
Re:Ruby Together by cutler on Thursday March 10, 2022 @08:48AM (#30626820)
Here in the UK most Ruby jobs pay a lot more than .Net. In fact .Net, for some some reason, is second only to PHP in terms of low-pay.
Re:Ruby Together by mekster on Wednesday March 09, 2022 @10:34PM (#30622971)
What you say means it's worth learning if you can land in the right company which is quite risky.

Besides, unless a language has a strong point compared to others, it's a hard sell, like PHP is good on web, JS is known by everyone and ecosystem is huge and python is good for ML and scientific stuff but what's the selling point of ruby besides rails?

With that said I do like the language itself (but not the typing system in 3) and would like to use if there's a place for it.

Re:Ruby Together by mooreds on Wednesday March 09, 2022 @10:40PM (#30622996)
> what's the selling point of ruby?

I'd say it is custom webapp development (with rails) and scripting on the command line (anything bash can do, ruby can do better).

PHP is good on the web with the huge installed base of wordpress, but when it comes to custom web app development, ruby (well, rails, really) holds its own with laravel, symfony and the other MVC frameworks.

Re:Ruby Together by girvo on Wednesday March 09, 2022 @10:49PM (#30623035)
As someone with years (oh god, so many years) of experience in Laraval and Symfony, I think Rails is superior to both. They're all excellent mind you, I just think Rails is even nicer in usage.
Re:Ruby Together by brigandish on Wednesday March 09, 2022 @11:59PM (#30623385)
> scripting on the command line (anything bash can do, ruby can do better)

That's true but you could say that about zsh too, and any number of other languages. Usually, the important reason that shell programming is used is the lack of need to install anything to run a script, which makes it easy and portable, and hence, reliable.

I can't write a script in Ruby and share it safe in the knowledge it will work on another system, especially if it relies on a gem or two. I'd much rather go with something that compiles and move a binary around if I'm dropping dash/bash/zsh. If I was forced to choose an interpreter to do that kind of work, perl would be much safer than Ruby, Python or Javascript.

Re:Ruby Together by sohooo on Thursday March 10, 2022 @02:44AM (#30624241)
Inline Bundler is a nice way to include gems in a single script file, which proved to be useful for me: https://bundler.io/guides/bundler_in_a_single_file_ruby_scri...
Re:Ruby Together by l30n4da5 on Thursday March 10, 2022 @10:43AM (#30628155)
> scripting on the command line (anything bash can do, ruby can do better)

completely agreed. on a linux system, most of my shell scripts are written in ruby at this point, simply because it is much better to work with than bash.

Re:Ruby Together by nitrogen on Thursday March 10, 2022 @01:24AM (#30623761)
What makes Ruby a fantastic language is that Ruby code can be structurally beautiful and poetic. It just flows well.
Re:Ruby Together by mekster on Thursday March 10, 2022 @04:45AM (#30625079)
To accomplish...?
Re:Ruby Together by vidarh on Thursday March 10, 2022 @06:34AM (#30625784)
Whatever you want. A small selection of things I've personally written in Ruby to give an idea of breadth:

* The text editor I use day to day.

* A messaging middleware server

* A private cloud orchestrator (running ~1000 VMs across on-prem, a couple of colo's, managed servers and

* Many web application backends for various sites; e.g. e-commerce, CRM systems.

* Forecasting and simulation framework for a VC.

* Framework for statistical analysis of error rates for OCR engines, and models to attempt to reduce the error rates by applying various clustering methods (for my MSc; "dipped down" to C for kmeans a couple of other things via FFI; 95%+ of the lines of code was Ruby)

* Map-tile renderer (we rendered custom maps based on hundreds of layers of proprietary map data for customers) and the webapp to go with it (document managed linked to map data)

* FUSE filesystem doing on demand rendering and caching of the map tiles mentioned above for newly uploaded layers.

* Code to generate terraform files to deploy infrastructure.

And when I have time I play with writing game code using DragonRuby.

I can do all of this in a dozen other languages too. I've done in Ruby because Ruby is pleasant to use and feels most productive to me.

Re:Ruby Together by cntainer on Thursday March 10, 2022 @06:39AM (#30625811)
Better readability for fellow humans.

I think these 2 quotes by matz describe best ruby's philosophy.

> I hope to see Ruby help every programmer in the world to be productive, and to enjoy programming, and to be happy. That is the primary purpose of Ruby language

> Often people, especially computer engineers, focus on the machines. They think, "By doing this, the machine will run fast. By doing this, the machine will run more effectively. By doing this, the machine will something something something." They are focusing on machines. But in fact we need to focus on humans, on how humans care about doing programming or operating the application of the machines. We are the masters. They are the slaves.

Re:Ruby Together by mekster on Thursday March 10, 2022 @11:08AM (#30628476)
> I hope to see Ruby help every programmer in the world to be productive, and to enjoy programming, and to be happy. That is the primary purpose of Ruby language

That's why I wish ruby to succeed but after 20+ years of the language being around and python is taking all the scripting needs outside of web, I'm not sure what area is left for ruby.

Re:Ruby Together by andrei_says_ on Thursday March 10, 2022 @11:06AM (#30628452)
Adapting to how I naturally think and thus reducing the annoying friction and boilerplate present in so many other languages.

Feels soft, malleable, agreeable, and defines the minute-by-minute experience of using it.

Puts me in a state of flow and contributes to me looking forward to coding sessions.

Re:Ruby Together by l30n4da5 on Thursday March 10, 2022 @10:41AM (#30628120)
> what's the selling point of ruby besides rails?

In devops, at least, Puppet extensions and facts can be written in ruby.

I much prefer ruby as a scripting language, as well.

Re:Ruby Together by BilalBudhani on Thursday March 10, 2022 @05:08AM (#30625194)
Just to add another great resource

* Job board for Ruby https://jobs.gorails.com/