Live data from Hacker News

Where is Ruby Headed in 2021?

bignerdranch.com

271–280 of 360 posts

Re: Where is Ruby Headed in 2021?

#271
post #92

Earlier quoted context omitted.

> People always say development is faster in a dynamically typed language, this is not my experience. You need to actually run the program and step into it with a debugger in order to determine the type of anything at run time. You just develop on the running program... If you just write it in your editor, run, check for errors, stop, edit more, run, stop, etc... then yes, you don't gain anything.

> You just develop on the running program... Ah yes, don't worry about correctness at all, just wing it. I take it you haven't had to debug some of the stuff you've written?

You asked about the productivity boost... Well it's in being able to code, debug, etc... a running program.

Did you miss a decade or two of CS history? Lisp and Smalltalk have been around long enough that the value of programming with dynamic languages is known... I mean, there's shaceships and whatnot running on Lisp.

Or did CS simply start and end with Java?

Re: Where is Ruby Headed in 2021?

#272

Earlier quoted context omitted.

> But that's a pretty out-of-date take Gradual/optional static typing are not new ideias. It’s just that they are fashionable now. It used to be that not having to deal with types at all was the cool place to be in. Our computers were getting so much faster every year, why would performance be a concern? Programmers are more productive in dynamic languages and computer time is cheap, etc, etc. The “correctness” pitch…

When it comes to code, I'm fairly certain "correctness" is in fact an irrefutable advantage. The argument has always been whether or not the price of that correctness is too high. But at this point if you're using a modern IDE / code editor (e.g. VSCode), it's actually easier to write statically typed code because the inference / auto-completion / etc is so much better when you do. At least with TypeScript in VSCode.

That’s why I used correctness in quotes, because it’s no guarantee.

Re: Where is Ruby Headed in 2021?

#273

Earlier quoted context omitted.

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…

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 avail…

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?

#274
post #255

Earlier quoted context omitted.

Ruby has (always had) a REPL and .methods gives you all possible methods you can call on an object. Editors with completion have been around forever too. "Intellisence" is just what MS calls it. It's not unique to statically typed languages. Completion has existed for dynamic languages probably longer than I've been alive. In fact, the reason tooling for Java/C# is so good is because the VM can feed it info as it's r…

Please try one out, the difference in quality is staggering. Also, .methods is a runtime thing, that’s hardly useful. Of course at runtime you must know the available methods.

I do write code in statically typed languages (C++, Haskell, have done Java before, etc...).

> Also, .methods is a runtime thing, that’s hardly useful

I think you missed the whole point of a REPL and dynamic languages... Developing while program is running = runtime things are definitely useful, they provide instant feedback (including completions, linting, that sort of thing).

Re: Where is Ruby Headed in 2021?

#275
post #270
post #198

Earlier quoted context omitted.

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.

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...

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?

#276

Earlier quoted context omitted.

You’re right. Software development has devolved into a popularity game.

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.

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?

#277
post #129

Earlier quoted context omitted.

> 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

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.

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?

#278
post #129

Earlier quoted context omitted.

> 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

Yup. The lack of libraries made it a non-starter. Rails has just about everyone beat in that category.

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?

#279

Earlier quoted context omitted.

Why is JS one of the worst languages ever designed? I've used many languages and JS is one of the better designed ones in my opinion.

>Why is JS one of the worst languages ever designed? Implicit type conversions. Function scoping. Null and undefined, what is the difference? Accessing an undefined variable doesn't throw an exception. Assigning to an undefined variable without var puts it in the global scope. No integer type. I could go on and on. The only reason it has become successful is because it has a monopoly in the browser.

I'd add

- Actually using any of the distinguishing features of prototypical inheritance is nearly always a bad idea, which makes the use of that model in the first place very questionable. One of the cornerstones of the language is pretty much one big foot-gun, to be wholly avoided.

Re: Where is Ruby Headed in 2021?

#280

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. I…

> 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.

Post reply on HN