News for hackers. Stuff that matters.
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.