This is awesome to see that it's possible. I've always wondered about the same sort of concept, but instead it would be trying to use Crystal to run the latest Rails version. I lack the time/energy/knowledge to try it, but it would be interesting to see how close you could get to either power or port Rails to Crystal, and if it would even be worth it (in terms of speed and type safety, etc).
Ruby 3.3 on Rails 1.0
41–50 of 76 posts
Re: Ruby 3.3 on Rails 1.0
#42Earlier quoted context omitted.
> just because you prefer to find your exceptions at compile time doesn't mean that it's the best way to find them. It is indeed the best way to find them. At compile time, you get errors for all possible paths a program will take. For dynamic languages like Ruby you will get an error only if the program takes a path through problematic code and then Ruby will flag the error. This means a runtime error could lie late…
This seems like a semi-moot point considering that after you've updated something you (presumably) also run an automated test suite and (have someone) test the application manually. I've also had various occasions where code compiled successfully but no longer worked as intended.
Put another way, automated test suites give you an extremely high level of assurance when using a statically typed language. When your test suite passes in the new version Ruby, you're happy but there still could be cases left that you've not dealt with in rarely triggered code paths/conditions.
Re: Ruby 3.3 on Rails 1.0
#43This whole blog post is essentially an advertisment for why statically typed languages can prevent such madness. I'm sorry -- it is not my intention to start another non-useful static/dynamic typing debate. It seems crazy that when a new version of Ruby comes out, developers need to hunt for runtime errors (that may or may not trigger depending on the path the application took) to see what incompatibility needs to be…
Heavy Ruby/Rails user here. We basically run type checking on major hand-offs between modules using DrySchema/DryValidation, a gem that makes it easy to set that up. Without doing this, the integrity of the codebase erodes with scale.
I've had real problems upgrading client's projects built using DryValidation prior to v1 in the past.
They changed the syntax of the validations just enough to break stuff and completely removed features like shared predicates. The upgrade process was very poorly documented with suggestions to go read random blog posts.
I think the replacement for shared predicates was supported be macros but even that is marked as likely to be removed in v2.
Just looking through some of the Dry changelogs the work BREAKING still features far more than I'm happy with. I'd be much happier to use Sorbet or an RBS based typing solution than work with Dry again.
It might have advantages over ActiveModel but ActiveModel is far better supported.
Re: Ruby 3.3 on Rails 1.0
#44As much as people complain about Python, Ruby really went through just as much (if not more) churn over the years from backwards-incompatible changes.
Re: Ruby 3.3 on Rails 1.0
#45As much as people complain about Python, Ruby really went through just as much (if not more) churn over the years from backwards-incompatible changes.
Ruby is used a lot less so the base population of people able to complain is much smaller.
I know which group I'm happy to be a part of.
Re: Ruby 3.3 on Rails 1.0
#46Earlier quoted context omitted.
This seems like a semi-moot point considering that after you've updated something you (presumably) also run an automated test suite and (have someone) test the application manually. I've also had various occasions where code compiled successfully but no longer worked as intended.
The automated test suite can check many code paths but compilation of a statically typed language checks all possible code paths. Put another way, automated test suites give you an extremely high level of assurance when using a statically typed language. When your test suite passes in the new version Ruby, you're happy but there still could be cases left that you've not dealt with in rarely triggered code paths/condi…
Re: Ruby 3.3 on Rails 1.0
#47Earlier quoted context omitted.
I don't get people who voluntarily use JS outside a browser. I'd rather jump into a pit filled with rusty spikes.
That’s fair, but TypeScript coupled with modern JS dev tooling makes it actually a pretty palatable experience these days. Speaking as someone who used to want to jump into pits for JavaScript-related reasons.
It's wild how people insist on using less-good tooling because that's what they've heard they are supposed to do... and that that's as good as they are going to get.
It's not!
Re: Ruby 3.3 on Rails 1.0
#48As much as people complain about Python, Ruby really went through just as much (if not more) churn over the years from backwards-incompatible changes.
But it was done slowly enough not to piss anyone off.
Re: Ruby 3.3 on Rails 1.0
#49That was a fun read. You should do Rails 8.0 on Ruby 1.8 next.
In theory this is a funny idea but I think it would be a huge waste of time. Ruby syntax has changed and added so much since since 1.8 that you'd be stuck fixing thousands of syntax errors.
Re: Ruby 3.3 on Rails 1.0
#50As much as people complain about Python, Ruby really went through just as much (if not more) churn over the years from backwards-incompatible changes.