Live data from Hacker News

Where is Ruby Headed in 2021?

bignerdranch.com

21–30 of 360 posts

Re: Where is Ruby Headed in 2021?

#21
post #8

Honestly I don't get why some people want to move to static types. Ruby is a dynamic language, that's the point of it... Giant orgs can just use Java or something. We need some languages to stay productive for those of us who work solo or in small groups. If I wanted static types I'd use Java, Go or something (probably Haskell).

By the time they get giant with [interpreted language], the giant org cannot pivot to Java without sacrificing a year of forward momentum on product development.

It's far easier for them to adopt a static analysis tool that mimics the type safety that Java provides than to migrate their codebase.

Re: Where is Ruby Headed in 2021?

#22
post #12
post #8

Honestly I don't get why some people want to move to static types. Ruby is a dynamic language, that's the point of it... Giant orgs can just use Java or something. We need some languages to stay productive for those of us who work solo or in small groups. If I wanted static types I'd use Java, Go or something (probably Haskell).

This is a set of statements that strike me as pretty unreflective of the state of things these days. I have slung a lot of Ruby in my life and I literally-not-figuratively stopped the second I laid my hands on TypeScript because we've hit the point where gradual static typing is both easily available and super easy to work with . (And there's also Rust, which can scratch a whole different set of itches that I don't h…

I've gotten a lot of value from integrating Sorbet into a non-trival 15 year old Rails app. The gradual nature of the typing is very nice.

I've never written TypeScript but I suspect the tooling around Sorbet is pretty far behind at this point but it's still worth it. For example, there are is a whole class of unit tests that no longer need to be written. In addition to the gradual typing, having access to interfaces, typed structs and enums is all nice too.

Re: Where is Ruby Headed in 2021?

#23
post #6

The RBS files seem like a weird compromise to me. I I'm not sure I see the practical benefit, but maybe someone who has used .d.ts files can explain it. Is it just helpful if your IDE has tooling to use it? Seems like it could be helpful, but also sounds like it will become an annoying "code quality" hoop those of us that don't use VSCode will have to jump through for little benefit. When you read code outside of you…

Having used inline typing in PHP and Python I don't really see the benefit of putting it in a separate file either, but when I was reading about it earlier in the year it sounded like Matz wanted types relegated to a separate file, so that's what happened.

My understanding is that this is gentlest possible introduction of types, since you don't have to anything to your existing code.

AFAICT the Ruby community is big on gentle iterations, and this is that: enough of type system to start playing with, and to get to the whatever the next step might be.

Re: Where is Ruby Headed in 2021?

#24
We recently migrated ToolJet (https://news.ycombinator.com/item?id=27421408)'s server from Ruby ( Rails ) to TypeScript ( Nest.js ). Our goal was to have only one language in our stack so that it will be easy for the open-source contributors. I have been working as a Ruby dev since 2015 and I really love Ruby. Initially I thought we might miss a lot of things when we switch to TS. But it turned out to be a great decision in the end.

The bad:

   - Cannot compare Rails' ActiveRecord with TypeORM. TypeORM still lacks proper documentation and sometimes we even had to write raw SQL (or use the query builder feature )for joins.

   - Testing using Minitest (Ruby) is easy and the code looks very clean. It is not as easy to go through our Jest tests. Also the test suite required some customisations for small stuffs like cleaning the db after every test.   

   - There is no clear winner for web frameworks in Node ecosystem. The framework you choose will be less adopted and less matured than Rails.
The good:

   - A lot more applicants for the backend roles. We tried to hire senior Ruby developers in June and we got only a few applicants. After switching to Node, hiring has become easy.

   - Having only one language in the stack is helping us get contributions from more external developers. 

   - Nest.js is not very opinionated, we can easily customise it to follow the conventions and directory structure followed by Rails.
We have explained more on our blog: https://blog.tooljet.com/migrating-toojet-from-ruby-on-rails...

Re: Where is Ruby Headed in 2021?

#25
post #8

Honestly I don't get why some people want to move to static types. Ruby is a dynamic language, that's the point of it... Giant orgs can just use Java or something. We need some languages to stay productive for those of us who work solo or in small groups. If I wanted static types I'd use Java, Go or something (probably Haskell).

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.

That seems to be more in line with "what's the benefit of static types?" than "what benefit does JS get from static types?". JavaScript is not only a very different language than it was 15+ years ago, but also takes up a significantly higher percentage of an app's codebase. The web is a drastically different place than when JS was created.

Re: Where is Ruby Headed in 2021?

#26

We recently migrated ToolJet ( https://news.ycombinator.com/item?id=27421408)'s server from Ruby ( Rails ) to TypeScript ( Nest.js ). Our goal was to have only one language in our stack so that it will be easy for the open-source contributors. I have been working as a Ruby dev since 2015 and I really love Ruby. Initially I thought we might miss a lot of things when we switch to TS. But it turned out to be a great dec…

Honestly typeorm and nestjs are pretty bad.

Re: Where is Ruby Headed in 2021?

#27
post #17
post #8

Honestly I don't get why some people want to move to static types. Ruby is a dynamic language, that's the point of it... Giant orgs can just use Java or something. We need some languages to stay productive for those of us who work solo or in small groups. If I wanted static types I'd use Java, Go or something (probably Haskell).

Ruby isn't forcing you to use static types. That being said, I actually think something like Sorbet makes even solo/small teams more productive because it trades some additional time writing boilerplate for dramatically reducing the number of bugs you write.

This has been my experience using Sorbet.

I sometimes get annoyed when I get stuck screwing around with the RBI files. Then I get in the flow and remember how fast Sorbet allows me to move.

Re: Where is Ruby Headed in 2021?

#28
post #25

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.

That seems to be more in line with "what's the benefit of static types?" than "what benefit does JS get from static types?". JavaScript is not only a very different language than it was 15+ years ago, but also takes up a significantly higher percentage of an app's codebase. The web is a drastically different place than when JS was created.

it taking up more of an app's code doesn't mean that it suddenly has a need for typing. but even then, that assertion is incorrect, javascript has been making up a large majority of the codebase for quite some time now. Nodejs is 12 years old and jquery 15. That argument is one that could've been made like 9 years ago, but even then, multiple projects have tried adding typing and the javascript community strongly rejected it (heck typescript was pushing for it in 2014). Anecdotally, I've met considerably more and more developers coming from C# projects who are being made to do frontend work or find work in the javascript world, who seem to be very intent on pushing for typescript in their orgs.

Re: Where is Ruby Headed in 2021?

#29

We recently migrated ToolJet ( https://news.ycombinator.com/item?id=27421408)'s server from Ruby ( Rails ) to TypeScript ( Nest.js ). Our goal was to have only one language in our stack so that it will be easy for the open-source contributors. I have been working as a Ruby dev since 2015 and I really love Ruby. Initially I thought we might miss a lot of things when we switch to TS. But it turned out to be a great dec…

Honestly typeorm and nestjs are pretty bad.

TypeORM has a lot of issues but in our case it hasn't caused any major blockers. Most of the time the issue is with documentation and sometimes you run into issues like this: https://github.com/typeorm/typeorm/issues/316.

NestJS on the other hand is very solid. It has good documentation and a good community. We haven't faced any issues with NestJS yet.

Re: Where is Ruby Headed in 2021?

#30
post #25

Earlier quoted context omitted.

That seems to be more in line with "what's the benefit of static types?" than "what benefit does JS get from static types?". JavaScript is not only a very different language than it was 15+ years ago, but also takes up a significantly higher percentage of an app's codebase. The web is a drastically different place than when JS was created.

it taking up more of an app's code doesn't mean that it suddenly has a need for typing. but even then, that assertion is incorrect, javascript has been making up a large majority of the codebase for quite some time now. Nodejs is 12 years old and jquery 15. That argument is one that could've been made like 9 years ago, but even then, multiple projects have tried adding typing and the javascript community strongly rej…

> but even then, that assertion is incorrect, javascript has been making up a large majority of the codebase for quite some time now. Nodejs is 12 years old and jquery 15. That argument is one that could've been made like 9 years ago,

Typescript is 9 years old. React was still a project then and Angular was brand new. SPA's were still a new-ish concept then. JS was not used as widely 10 years ago as it is now, thanks to SPA's. The web was a drastically different place back then.

I am not at all saying that TypeScript should always be used, far from that. I just think it has a valid spot in the world of web development.

Post reply on HN