News for hackers. Stuff that matters.
Re:Rails 7 Released by BoysenberryPi on Wednesday December 15, 2021 @11:56PM (#29575066)
Going to somewhat hijack this to ask a question. Are there any popular non-Rails uses for Ruby? I'd like to learn Ruby but it seems that Python and Ruby occupy the same space and use cases so you really only need to know one of them.
Re:Rails 7 Released by smt88 on Thursday December 16, 2021 @12:09AM (#29575150)
> Are there any popular non-Rails uses for Ruby?

No. I'm going to get downvoted for this, but Ruby isn't popular itself (with or without Rails). It's barely more popular than Fortran, according to TIOBE[1]. It cracks the top 10 according to Redmonk, but has been generally declining since 2012[2].

Somewhat shockingly, it's even less widely used than Rust according to Stack Overflow[3].

They also found Ruby has a 53% loved vs. 47% dreaded score, compared to Python's 68% and 32%. It's especially surprising that Stack Overflow's respondents like Ruby less than JavaScript and SQL, the two most frustrating languages I have ever been forced to work with myself.

> Python and Ruby occupy the same space and use cases

This is absolutely untrue. I personally loathe Python, but it is perhaps the most useful language you can learn right now, and it barely overlaps with Ruby.

It's huge in statistics/data science and machine learning. It's not the most common web backend, but it still has a fairly large ecosystem for the web. It's rapidly rising in popularity, too.

1. https://www.tiobe.com/tiobe-index/

2. https://redmonk.com/kfitzpatrick/2021/03/02/redmonk-top-20-l...

3. https://insights.stackoverflow.com/survey/2021#most-popular-...

Re:Rails 7 Released by Mikeb85 on Thursday December 16, 2021 @01:31AM (#29575614)
Tiobe and Stack Overflow rankings don't mean much. Look how popular Tiobe ranks VB due to Excel macros, or SO ranks Bash and PowerShell very highly simply because people ask a lot of questions about it.
Re:Rails 7 Released by smt88 on Thursday December 16, 2021 @02:22AM (#29575901)
I cited the three most popular rankings. I don't know what else to do here.

My own personal experience as a CTO and startup investor: I haven't seen Ruby (or even met someone whose primary language is Ruby) in a long time.

I think it had a moment ~10 years ago when a lot of people started companies using Rails. Some of them still use it, most of them just went out of business.

It hasn't been big since then. It seemed to only ever have become popular in a fairly limited bubble of startups, especially in Silicon Valley.

Re:Rails 7 Released by Mikeb85 on Thursday December 16, 2021 @03:13AM (#29576164)
I mean, it's not Java, C#, Go or JS. It never was that big.

But some pretty successful startups used it and some successful companies today use it. It's been a tool used to spawn quite a few billion+ dollar companies.

Re:Rails 7 Released by smt88 on Thursday December 16, 2021 @04:11AM (#29576455)
I agree, but we're talking about whether a language is popular, aren't we?

Ruby is a fine language that some people have ridden to great success. It is still a fairly niche language.

We're on a popular website written in Arc -- likely the only website written in Arc. Popularity isn't everything and I'm not suggesting it is.

Re:Rails 7 Released by Mikeb85 on Thursday December 16, 2021 @05:13AM (#29576795)
What does popular mean? Used by X% of people or used by X people?

Ruby developers is small in % but rather large as an absolute number.

Re:Rails 7 Released by ksec on Thursday December 16, 2021 @07:31AM (#29577496)
Popular as in industry usage? Which is comparatively very small.

Smt88 is correct in that it is increasingly a niche. Churn rate is greater than retention rate. Junior Developers cant find jobs with Ruby and Rails, and they switch to others that do find them jobs. Companies only want to hire experience Ruby Rails developers but some of them moved on. It is a vicious cycle.

The point is even if Reddit was written in Arc, it has no bearing on Arc's industry status. It needs to be in a self sustainable ecosystem.

Re:Rails 7 Released by montblanc on Thursday December 16, 2021 @09:57AM (#29578754)
Juniors have a hard time getting jobs period, I don't think it has anything to do with Ruby.
Re:Rails 7 Released by pmontra on Thursday December 16, 2021 @03:22AM (#29576210)
Honestly, is Go as big as those three other languages?
Re:Rails 7 Released by Mikeb85 on Thursday December 16, 2021 @05:12AM (#29576785)
Not yet, but it's now in the category of "You won't get fired for picking X". It's seen as enterprise-y and 'safe' and yes, is definitely quite used.

The fact it's used internally at Google and MS alone means it's got traction. I'm willing to bet lots of enterprise shops are using it for things, even if it's not #1.

Re:Rails 7 Released by ksec on Thursday December 16, 2021 @07:24AM (#29577468)
The important question is would you have enough choices in Job Hunting if all you know is Go. And Go seems to be close to if not already a self sustainable status.
Re:Rails 7 Released by Hamuko on Thursday December 16, 2021 @01:52AM (#29575728)
>or SO ranks Bash and PowerShell very highly simply because people ask a lot of questions about it.

Isn't the Stack Overflow one done by a survey, not just by analyzing the questions?

Re:Rails 7 Released by Mikeb85 on Thursday December 16, 2021 @01:59AM (#29575770)
You're right, although doesn't really change my premise. I use Bash everyday, even though I have never tried learning it, don't really care about it, etc...

I really don't think Bash and Powershell are more popular for actual development than C++ and Go respectively. People just use them because they're there... Making the rankings a lot less meaningful.

Re:Rails 7 Released by Hamuko on Thursday December 16, 2021 @02:13AM (#29575855)
>I really don't think Bash and Powershell are more popular for actual development than C++ and Go respectively.

I'd be willing to bet money that Bash is way, way more popular in development than Go.

Re:Rails 7 Released by regularfry on Thursday December 16, 2021 @04:09AM (#29576436)
If you mean popular as in "many people are using it", probably.

If you mean popular as in "many people like using it", I would question your (and their) sanity.

Re:Rails 7 Released by smt88 on Thursday December 16, 2021 @04:16AM (#29576478)
> If you mean popular as in "many people like using it", I would question your (and their) sanity.

According to Stack Overflow's survey[1], people enjoy Bash/Shell more than they enjoy Ruby.

I personally hate both Ruby and Bash, so I assume my sanity is beyond question.

1. https://insights.stackoverflow.com/survey/2021#most-loved-dr...

Re:Rails 7 Released by Mikeb85 on Thursday December 16, 2021 @02:17AM (#29575879)
Again though, you have to qualify that.

> in development

This can be taken a few ways. I don't use Go, but I interact with Bash. So you're right in a sense.

I'd also never write a web-app in bash, nor a non-trivial program, nor anything that isn't a shell script. So is it really meaningful when people are looking for a language to write a GUI app, web app, mobile app or game in?

Re:Rails 7 Released by klelatti on Thursday December 16, 2021 @02:15AM (#29575871)
Broadly agree but I have to say I’m quite happy with where Ruby has settled now.

It’s not going to vanish anytime soon and the Ruby team continue to push improvements.

Unlike Python the ecosystem hasn’t become so large that it’s become impossible to keep track of.

It’s likely to remain my go to language for small projects in large part because writing Ruby is just fun!

Re:Rails 7 Released by montblanc on Thursday December 16, 2021 @09:58AM (#29578769)
Ok the Tiobe => Fortran is complete horse shit and we all know it. Fortan and Perl are both more popular than Go in that ranking I mean come on. But sure I agree Ruby is a nichey language, usage-wise about the same as Swift/Scala or maybe even Go. Somewhere in the top 10-15 I'd guess. If you look at web backend languages (e.g remove C/Visual Basic/C++) Ruby is probably top 10.
Re:Rails 7 Released by smt88 on Thursday December 16, 2021 @04:25PM (#29584137)
Fortran is used a lot in science and engineering. My ex was an evolutionary biologist and used it, as did everyone in her department.
Re:Rails 7 Released by montblanc on Friday December 17, 2021 @12:15AM (#29588109)
What for? I know nothing about it but why not Python? Still haven't heard of anyone using it where I live.
Re:Rails 7 Released by stephenhuey on Saturday December 18, 2021 @11:18PM (#29611266)
Re:Rails 7 Released by kemitchell on Thursday December 16, 2021 @01:10AM (#29575479)
There are definitely uses cases for Ruby without Rails. It's a great command-line scripting language, for example, filling the slot of an evolved Perl. There are also lighter-weight approaches to web scripting, such as Sinatra and bare Rack HTTP servers. I have no idea how prevalent that is. I did it for several small but well used apps.

Ruby and Python share a lot of commonalities as languages. But their constituencies vary substantially, and that matters. Academic, probably Python. Working "interactive" agency, probably Ruby. Process automation, probably Ruby again. Author's implementation of new algo paper, probably Python.

I wouldn't think either-or. If it's worth familiarizing with one, it's probably one more weekend to be walk-on-ready for both.

Re:Rails 7 Released by berkes on Thursday December 16, 2021 @09:02AM (#29578159)
As a Ruby developer, I really fail to see any benefit or Ruby over Python (or even Node) for commandline scripting.

Other than "I already know Ruby". In fact, I'll often go for the -for me- more unfamiliar Python for such tools. Knowing it will cost me more effort, but also knowing that the libraries, documentation, education and off-the-shelve solutions are far, far better and move available.

Re:Rails 7 Released by montblanc on Thursday December 16, 2021 @10:07AM (#29578853)
What have you built lately in Python/Node that "the libraries, documentation, education and off-the-shelve solutions are far, far better and move available." ?

I'm not saying those use cases don't exist at all, but I don't think it's as common as you're making it up to be. As a Ruby dev the last 8 years I didn't have many times when some key functionality was only available in Python/Node. I can see it happening in web crawling or data science but those aren't common to every day web development.

Re:Rails 7 Released by berkes on Friday December 17, 2021 @05:29AM (#29590318)
Panda's et all do investigate Data. There are tools in Ruby for Datascience but the resources are thin or completely lacking.

A scraper using Scrapy. Had a tool in Ruby with Hydra (multitreaded) and message cueus and whatnot to speed it up. Spidy is just faster. Not because of the language, but because the tooling is much further along and has far more effort poored into.

Server/infra management: ported from chef to ansible. Not for speed, but because stability and availability (of a.o. resources). Unexpected side-effect was that ansible was actually faster and used far less resources on the servers (chef-deamon was notoriously bad). Not sure why, but I don't think its the language design.

FluentD, moved to flowgger and plain-old-syslog. FluentD is an awesome piece of software, but it was hogging our (micro)servers enough to be noticable, measurable and show up in the billing (as higher CPU/memory vpses).

Re:Rails 7 Released by heartbreak on Thursday December 16, 2021 @04:25PM (#29584130)
If nothing else, Python’s miserable package management ecosystem makes me reach for Ruby instead. I’ll take Bundler over requirements.txt, pipenv, poetry, etc. any day.
Re:Rails 7 Released by Mikeb85 on Thursday December 16, 2021 @01:26AM (#29575571)
Puppet, chef, sys-admin-y type things. Jekyll, Sinatra. Mruby (embeddable Ruby).

Homebrew and YAST (Suse Linux) are written in Ruby. Stripe uses Ruby but not Rails.

Basically anything you'd use Perl for, + a bunch more uses, and of course Rails and web stuff.

Re:Rails 7 Released by nunez on Thursday December 16, 2021 @01:56AM (#29575759)
i believe homebrew is transitioning to golang. all of the tools you’ve mentioned above that are seeing less usage, unfortunately :(
Re:Rails 7 Released by Mikeb85 on Thursday December 16, 2021 @02:21AM (#29575899)
Homebrew's repo is still almost all Ruby with no signs of Go anywhere. A bit of Swift...

And fair enough, tools come and go. Ruby is still the best write-once language I've used though, and Rails is still a top web framework.

Re:Rails 7 Released by poisonta on Thursday December 16, 2021 @02:13AM (#29575859)
Stripe (and Shopify) too?

Check how many top YC companies use Ruby.

Re:Rails 7 Released by berkes on Thursday December 16, 2021 @09:04AM (#29578187)
The question was how many use Ruby, but not Rails.
Re:Rails 7 Released by mekster on Thursday December 16, 2021 @06:47AM (#29577268)
You forgot Discourse and GitLab.
Re:Rails 7 Released by berkes on Thursday December 16, 2021 @09:03AM (#29578178)
Those are Rails, though. As is mastodon.
Re:Rails 7 Released by brightball on Thursday December 16, 2021 @01:34AM (#29575624)
I use Ruby without rails all the time. It’s extremely convenient for shell scripting (basically anywhere I might have used Perl in the past).

The Sequel gem (rather than ActiveRecord) and the Parallel gem play really well together. Anytime I need to do some scripting against a database it’s very convenient.

Re:Rails 7 Released by ilyash on Thursday December 16, 2021 @01:50AM (#29575714)
> It’s extremely convenient for shell scripting (basically anywhere I might have used Perl in the past).

Exactly the uses cases that I want to "steal" from Python, Ruby, Perl, etc.

Not because Next Generation Shell is "better" but because it's focused on the use cases - https://github.com/ngs-lang/ngs/wiki/Use-Cases ... while still being a "real" programming language.

Re:Rails 7 Released by firstbabylonian on Thursday December 16, 2021 @03:17AM (#29576183)
A lot of iOS build automation tooling is dependent on Ruby. fastlane is the de-facto standard in this space, which is a Ruby gem and CLI application. As a result, every iOS developer almost inevitably has to learn at least some basic Ruby to cobble together a deployment pipeline for their app.
Re:Rails 7 Released by dsrees on Thursday December 16, 2021 @07:46AM (#29577586)
Cocoapods as well. Though I feel like it's getting less and less use with SPM on the rise
Re:Rails 7 Released by cardy31 on Thursday December 16, 2021 @12:20AM (#29575215)
Homebrew is written in Ruby IIRC, but that is really just an example, not something that makes it popular.
Re:Rails 7 Released by tokumei on Thursday December 16, 2021 @01:47AM (#29575703)
It is also terribly slow, unfortunately; in contrast with other package managers.
Re:Rails 7 Released by gurkendoktor on Thursday December 16, 2021 @04:10AM (#29576447)
It's a great example though, I really like how readable Homebrew formulae are. Run "brew edit go" or "brew edit pkg-config" to take a look at how things are downloaded and built.
Re:Rails 7 Released by mekster on Thursday December 16, 2021 @06:54AM (#29577305)
I like ruby but the recent static typing feels a step backwards having have to write a separate file, unlike typescript where you can incrementally add typing to the actual source code.

https://developer.squareup.com/blog/the-state-of-ruby-3-typi...

And when I saw ruby isn't included in the list of supported language for the next gen JetBrains editor, perhaps due to low sales of RubyMine, I felt its best days may be over.

https://www.jetbrains.com/fleet/

(Scroll down to the list of programming language icons)

Re:Rails 7 Released by ksec on Thursday December 16, 2021 @07:18AM (#29577433)
Response from Jetbrain;

"Ruby/Rails will be supported in Fleet. No timeframe, though."

Re:Rails 7 Released by FreezerburnV on Thursday December 16, 2021 @12:43AM (#29575348)
Dragon Ruby is a relatively recent game making toolkit with one of the main devs being also one of the main SDL devs. It's a full programming language so you can use it for whatever you want, it just is most popularly used for RoR.
Re:Rails 7 Released by nunez on Thursday December 16, 2021 @01:55AM (#29575755)
I have a bunch of APIs running in AWS that are written in pure Ruby. My Slack status automation is written in pure Ruby. Most of the things I integrate with have SDKs for Ruby.

As long as Shopify keeps using it, Ruby will have a place in the world!

Re:Rails 7 Released by tomc1985 on Thursday December 16, 2021 @01:11AM (#29575484)
Metasploit framework is written in Ruby. Also, Jekyll, Sinatra, and Puppet or Chef? I think?

You might also want to ask the Japanese community as I have heard it is big there.

Re:Rails 7 Released by jb3689 on Thursday December 16, 2021 @02:20AM (#29575895)
Scripting? Ruby is an excellent scripting language. I find Python is an adequate scripting language by comparison
Re:Rails 7 Released by berkes on Thursday December 16, 2021 @08:55AM (#29578077)
> Are there any popular non-Rails uses for Ruby?

Hardly. And that bothers me as a Ruby (not rails) developer.

There was Chef, still is around, but Chef "lost" from Ansible and Terraform.

There are some commandline tools, but I slowly see them replaced by Go, Rust, node or Python versions. `github`, `heroku` etc.

And there are numerous small or tiny platforms, systems and toolkits that failed to get traction and live a (happy!) live with a tiny audience. Think about sinatra, sequent, gosu, (the ruby version of) cucumber, kiba-etl, etc.

But I'm pretty sure most of these tools, frameworks and platforms are there because or Rails. To cater people, shops and teams "that already know Ruby inside out" (because of Rails) and therefore choose their, say, ETL system in Ruby too.

Re:Rails 7 Released by BilalBudhani on Thursday December 16, 2021 @02:43AM (#29576019)
Ruby is also popularly used to write command line tools, for instance, Homebrew.
Re:Rails 7 Released by pmontra on Thursday December 16, 2021 @03:29AM (#29576240)
I use Ruby for Rails and for scripting. I script in Ruby anything I used to write in Perl up to about 2010 and I feel too complex to write in Bash. JavaScript is a no go in that space because of async, Python (which I make more money from than from Ruby) is just (subjectively) uglier and less convenient. Maybe this is because I was more in love with Perl than with C in the 90s.
Re:Rails 7 Released by lmm on Thursday December 16, 2021 @12:08AM (#29575145)
Not really. I think a few sysadmin-type tools are written in Ruby, but Python has more mindshare, and like you say they're pretty similar.
Re:Rails 7 Released by nikodunk on Thursday December 16, 2021 @12:40AM (#29575331)
Jekyll and Sinatra are two reasonably popular other web frameworks. But agree with the other sibling comments otherwise.