Live data from Hacker News

Where is Ruby Headed in 2021?

bignerdranch.com

321–330 of 360 posts

Re: Where is Ruby Headed in 2021?

#321

Earlier quoted context omitted.

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.

> The argument has always been whether or not the price of that correctness is too high. No. I mean, that's been part of the argument, but so has whether static typing actually gave you useful correctness. Many static languages have had type systems that are more designed around convenience of compilation (and performance of compiled code) than correctness; the type systems of the optional typecheckers of modern dyna…

Strong disagree with the idea that dynamic inference steps to static declarations, particularly for Ruby and especially if you're using anything that expects you to write code inside of its DSL. The inference tends to fall off and because it isn't expected of you, nobody's doing anything to help there.

Maybe Rails is special-cased enough to get away with it, but I still maintain a project in Grape and none of the autocomplete solutions I have found for Ruby help significantly at all. Meanwhile over in TypeScript, I literally can't remember the last time I used `any` or `unknown` except at a module's edge during validation of untrusted input, and autocomplete is awesome.

Re: Where is Ruby Headed in 2021?

#322

Earlier quoted context omitted.

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.

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.

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?

#323

Earlier quoted context omitted.

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.

It's not a guarantee, but an environment/language that yells at you when you try to pass a boolean to a function that should only ever accept a string is going to result in a more correct program than one that just... doesn't say anything and lets you happily do things that make zero sense.

Re: Where is Ruby Headed in 2021?

#324
post #35

Earlier quoted context omitted.

I really feel the same about javascript with typescript. It feels a heck of a lot like new grads or old c#/java devs trying to keep up with the times by switching to javascript, but then resisting the code structure and loose typings.

It's interesting though how much more robust the library ecosystem has become after Typescript attracted a new crowd that wouldn't haven otherwise gone near JavaScript with a ten foot pole.. Maybe with the new developments in Ruby ecosystem somebody will fix Net::Http so an absolute request timeout can be set to protect against slow client/server and maybe oversized payloads as well. Maybe 2030?

in what way is the library ecosystem more robust? if anything library use is down due to centralization around specific frameworks and tool chains.

Re: Where is Ruby Headed in 2021?

#325
post #38

Earlier quoted context omitted.

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

That's interesting, what you think Django excels that Rails doesn't? Which ones were the pain points in your opinion?

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?

#326

Earlier quoted context omitted.

> I suppose it could be useful in cases where you'd stubbed out B in your specs, but ehhhh. You're talking like that's rare and not something people constantly do when writing tests in Ruby.

It is of course super common. Unit tests should be stubbing out as much as possible/reasonable. The presumption is that we're talking about a well rounded test suite with both unit tests and integration tests, and the integration tests would indeed be catching the fact that A is passing entirely the wrong thing to B. Of course, this does mean we're leaning heavily on the test suite here. But, in any nontrivial applic…

Over time I have come to view mock- and stub-heavy tests as next to worthless.

Re: Where is Ruby Headed in 2021?

#327
post #186

Earlier quoted context omitted.

Intellisense will allow you to do explorative programming, finding what method is callable on a given object. It’s much easier to look up n methods than to try to guess what is the whole state of the program where it may accept this and that, where even in the best case you might get a fraction of what a statically typed language’s autocompletion allows for. Like just seriously try intellij with java and pycharm for…

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…

I have used that REPL extensively. I've written plugins for Pry for my personal usage. There are absolutely cases I've run into where it is nice to break into code, write it inline, and save the buffer. This is true. But I've run into more cases where having to do that to know what I'm working with in the first place is a tiresome slog.

Re: Where is Ruby Headed in 2021?

#328

Earlier quoted context omitted.

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

Why are you bringing up Java? Java is terrible in its own way. Of course you will be more productive without types if the alternative is only Java (which it isn't). Typescript has an extremely expressive type system.

Re: Where is Ruby Headed in 2021?

#329

Earlier quoted context omitted.

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.

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.

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?

#330

Earlier quoted context omitted.

Last few years? Java IDEs have been doing this for decades (plural). C++ IDEs for another decade beyond that.

C++ IDEs lagged Java IDEs on this stuff.

C++ IDEs predate the existence of Java, let alone Java IDEs. Microsoft Visual C++ was excellent for the time, and did most of what you expect a modern IDE to do. In 1993.
Post reply on HN