News for hackers. Stuff that matters.
Re:Ruby: We have decided to go forward to 3.0 this year by sacado2 on Monday August 31, 2020 @11:30AM (#24332448)
Are they going to make non-backward-compatible changes, or is this just a marketing move?
Re:Ruby: We have decided to go forward to 3.0 this year by anshul on Monday August 31, 2020 @12:46PM (#24333247)
Ruby 3 is expected to introduce new concurrency primitives that evade the global interpreter lock (guilds / isolates) and type definitions for the stdlib for optional typing support. This should be a big release for ruby!
Re:Ruby: We have decided to go forward to 3.0 this year by aantix on Monday August 31, 2020 @03:05PM (#24334848)
Re:Ruby: We have decided to go forward to 3.0 this year by jrochkind1 on Monday August 31, 2020 @02:48PM (#24334679)
There are some non-backwards-compat changes regarding keyword arguments.

They aren't that exciting, but they are necessary to eliminate some ambiguous and inconsistent cases, and will be a pain for some codebases. (2.7 already marks as deprecated behavior that will break in 3).

https://www.ruby-lang.org/en/news/2019/12/12/separation-of-p...

I'm not sure if ruby actually commits to semver-style no-backwards-incompat-unless-major; they didn't used to. Either way though, recent ruby minor version releases have seen few if any (?) backwards incompat changes of any note -- nothing of note I can think of since 1.9 in 2007 (which did have major changes. Ironically 2.0 didn't have so much). The keyword arg changes will definitely effect more codebases more significantly than any we've seen in a while.

Re:Ruby: We have decided to go forward to 3.0 this year by ilikepi on Monday August 31, 2020 @11:38AM (#24332537)
It might be a little of both. I did come across this change to keyword arguments[1] recently, but I'm not sure how impactful it is since I don't personally leverage keyword arguments right now.

[1]: https://www.ruby-lang.org/en/news/2019/12/12/separation-of-p...

Re:Ruby: We have decided to go forward to 3.0 this year by d3nj4l on Monday August 31, 2020 @11:48AM (#24332618)
It sure does blow up your logs if you're using rails with 2.7.1.
Re:Ruby: We have decided to go forward to 3.0 this year by sosodev on Monday August 31, 2020 @11:50AM (#24332644)
Have you updated? Pretty sure all the warnings have been fixed now.
Re:Ruby: We have decided to go forward to 3.0 this year by ljm on Monday August 31, 2020 @12:28PM (#24333029)
Problem is if you're stuck on gems that aren't maintained any more. Seen a few with PRs containing fixes going stale. Can still switch to a fork, at least.
Re:Ruby: We have decided to go forward to 3.0 this year by jamie_ca on Monday August 31, 2020 @12:29PM (#24333034)
Yeah, core rails the only warning I've seen is a single one in sprockets-rails (brand new app from last week).
Re:Ruby: We have decided to go forward to 3.0 this year by d3nj4l on Monday August 31, 2020 @10:43PM (#24338052)
Can't update at work, there's a few breaking changes :/
Re:Ruby: We have decided to go forward to 3.0 this year by pmarreck on Monday August 31, 2020 @11:50AM (#24332648)
looks like they're adding an optional type system, which means you get the worst of both worlds- no guarantees AND no compile-time type checking (think: what happens if type-checked code calls non-typed code?) so I have no idea how they're going to make that fast since all types will still have to be checked at runtime
Re:Ruby: We have decided to go forward to 3.0 this year by sosodev on Monday August 31, 2020 @11:56AM (#24332702)
Are you sure it’ll be awful? Sorbet (https://sorbet.org/) is pretty popular already. It can statically check your whole project and dynamically check it at runtime. It also doesn’t add that much overhead so I’m not sure what you’re on about...
Re:Ruby: We have decided to go forward to 3.0 this year by pmarreck on Monday August 31, 2020 @12:08PM (#24332800)
What does it do with your library code that isn't type-specified? If it infers types, isn't there a limit as to how far that can go?
Re:Ruby: We have decided to go forward to 3.0 this year by dbalatero on Monday August 31, 2020 @12:31PM (#24333063)
Not sure what Ruby core will do, but Sorbet will type everything as T.untyped in the absence of type hints. Libraries can progressively provide rbi files to add first class type support though.
Re:Ruby: We have decided to go forward to 3.0 this year by oomkiller on Monday August 31, 2020 @12:30PM (#24333042)
Sorbet looks really cool, too bad they developed their own typing system that keeps types in a totally separate file instead of adopting it.
Re:Ruby: We have decided to go forward to 3.0 this year by jamesgeck0 on Monday August 31, 2020 @01:48PM (#24333999)
Sorbet was developed before the details of the new Ruby type system were locked in. They’re working on providing some convergence in upcoming releases.
Re:Ruby: We have decided to go forward to 3.0 this year by tomc1985 on Monday August 31, 2020 @02:05PM (#24334189)
The 'separate' file is to avoid breaking backwards compatibility and avoiding a Python2/3 fiasco
Re:Ruby: We have decided to go forward to 3.0 this year by virtue3 on Monday August 31, 2020 @03:28PM (#24335097)
Also see coffeescript, etc.
Re:Ruby: We have decided to go forward to 3.0 this year by Lio on Monday August 31, 2020 @02:27PM (#24334430)
Sorbet will be compatible with the new file format. We’ll still be able to use the inline Sorbet type signatures.

My personal hope is that typing can be included in test/spec files.

Re:Ruby: We have decided to go forward to 3.0 this year by cjohnson318 on Monday August 31, 2020 @12:07PM (#24332789)
I use type hints in Python to make my code more readable and more clearly convey my intent, although I rarely use analysis tools.
Re:Ruby: We have decided to go forward to 3.0 this year by jnwatson on Monday August 31, 2020 @02:02PM (#24334161)
It works great for Python.