<rapha>
is there some thingamajig which you can let look at some code written, in, say, ruby 2.6 and which will tell you if it should work fine with, say 3.1?
<rapha>
i guess like rubocop but with respect to breaking changes between versions only
maroloccio has joined #ruby
<balo>
rapha: test suite?
razetime has joined #ruby
maroloccio has quit [Quit: WeeChat 3.7.1]
maroloccio has joined #ruby
<rapha>
balo: you mean you're expecting this legacy piece of software to have a test suite? man, that would be a nice luxury!
<rapha>
no, lol, no test suite. i'm asking for some kind of code scanner, i guess.
<balo>
rapha: can it be ran in a test environment of some sort? There weren't many incompatibilities, the only one I recall was with the kwargs and hash arguments
<balo>
> In principle, code that prints a warning on Ruby 2.7 won’t work
<ox1eef_>
I can't think of anything that would be different in a subtle way. It would either work or error out. Ruby 3.1 itself might be the best "tool" to test it with.
* rapha
always feels insecure when doing anything with jruby
* rapha
will just try
<adam12>
Could try the #jruby channel...
<adam12>
I don't know if JRuby will even warn on deprecations like kwargs..
kovital has joined #ruby
<ox1eef_>
I never found jruby useful. I like Kernel#fork too much.
* rapha
wants an excuse to have to learn how to use Kernel#fork
whysthatso125070 has quit [Ping timeout: 248 seconds]
<ox1eef_>
IIRC I first got interested in it because I had an IRC bot that I wanted to evaluate code in a separate process (with an OSX API that created the sandbox).
teclator has quit [Ping timeout: 255 seconds]
<ox1eef_>
JRuby / the JVM is not alone in removing it. The Objective-C runtime only allows a fork with exec following immediately afterwards.
John_Ivan has quit [Read error: Connection reset by peer]
John_Ivan has joined #ruby
kaivai has quit [Ping timeout: 260 seconds]
kaivai has joined #ruby
svdasein_ has quit [Remote host closed the connection]
<havenwood>
ox1eef_: The JRuby equiv of parallel Threads always seemed fine to me. Fibers were what I missed. Project Loom seems to be solving that gap now in 2023, but took some time coming!
<havenwood>
Threads posing as Fibers only got you so far.
<havenwood>
ox1eef_: Curious if you've tried the new `bundle gem --ext=rust` style Rust extension yet?
<ox1eef_>
whynotboth.jpeg
<havenwood>
I like your client-side Rust app. Still harder to pull that off with Ruby since you ship the runtime.
<ox1eef_>
And not so far. I'm slacking when it comes to picking up Rust. :(
<havenwood>
What are you focusing on instead? The OS stuff?
<havenwood>
I've always had a soft spot for BSDs.
<havenwood>
ox1eef_: I've not made much more Rust progress either, since I don't have real work to do in it.
<ox1eef_>
I decided a couple of days ago that I won't start any new projects before perfecting the one's I've already started. They're mostly Ruby, some TypeScript, some shell scripts, and a little bit of C.
<havenwood>
A practical lot.
<ox1eef_>
Indeed. Always helps when you have a real problem to solve.
<havenwood>
Natalie and Artichoke seem like the most promising MRI implementations other than the main three — CRuby, JRuby and TruffleRuby.
<havenwood>
I think mruby and picoruby are in a class of their own.
dionysus69 has quit [Ping timeout: 255 seconds]
<havenwood>
I guess Opal should get an honorable mention. :)
<ox1eef_>
I hope they're successful, but I'm a bit pessimistic. Alternative implementations come and go, and usually bring another set of trade offs with them.
<havenwood>
Both Artichoke and Natalie seem to be making steady progress. I always worry about these new ones fading out.
<ox1eef_>
Same. MagLev, Rubinius, ...
<havenwood>
Topaz and MagLev were both super cool, yeah.
<havenwood>
Lots of Rubinius lives on in TruffleRuby, at least.
<havenwood>
TruffleRuby is more of a pure Ruby implementation than Rubinius, but built directly on its Ruby implementations as a starting point.
<ox1eef_>
Rubinius was very nice back in the day. Very approachable as a Ruby programmer.
<havenwood>
Yeah, I'd say TruffleRuby is even more so.
<havenwood>
Nice when it's implemented in Ruby!
<ox1eef_>
Ah, I see. I thought it was JVM-based.
<havenwood>
Fun to see more of CRuby implemented in Ruby too, *for performance*. :)
<havenwood>
ox1eef_: It's on the JVM, yeah, or they can do GraalVM + Substrate even, but more of the code is Ruby percentage wise than Rubinius.
<havenwood>
The core is Truffle, so some Java implementation on that, but most of core and stdlib is Ruby.
<ox1eef_>
Interesting. So Rubinius, but Java instead of C++.
<havenwood>
ox1eef_: Already works great serverside if you don't need sockets or have some way to get at them without WASM.
<havenwood>
ox1eef_: Basically, yeah — backed by a far more advanced JIT written in Java rather than HotSpot written in C++.
<ox1eef_>
Sounds cool indeed.
<havenwood>
Graal JIT is a Java implementation, so they went further.
<havenwood>
HotSpot basically got too complex to allow any commits.
<havenwood>
YJIT is an example of going to a more robust, higher level language to enable going further too.
<havenwood>
Modern JITs can't be written in C, it turns out. ;P
<havenwood>
C and C++ JITs get complicated beyond human ability to iterate further.
<havenwood>
Rust and Java JITs are showing promise for going much futher.
<havenwood>
Rust is a like a frustrating, but zero cost abstraction version of Ruby.
<havenwood>
Rubinius removed its JIT for being too complicated, was immediately too slow to use, restored a JIT, then gave up.
<havenwood>
TruffleRuby built on a research JIT, Graal, as well as Rubinius work around pure Ruby implementation and RubySpec.
<havenwood>
There was for sure novel research with TruffleRuby, particularly around deoptimization, since while Graal is advanced it didn't have a concept of modified-at-runtime languages.
<havenwood>
TruffleRuby shows how GraalVM or SubstrateVM can run Ruby and optimize the hot paths while allowing dynamic code changes that fall back to interpretation rather than JITed or AOTed code.
<havenwood>
It's neat CRuby now incorporates Rust for YJIT and how Bundler support Rust extensions. Seems like a great pairing.
<ox1eef_>
I need to give it a try. Still haven't experiemtned with the JIT.
<ox1eef_>
I'm keeping an attentive eye on ruby.wasm.
razetime has quit [Remote host closed the connection]
Ziyan has joined #ruby
admina has joined #ruby
aphorise has joined #ruby
_73 has joined #ruby
_73 has left #ruby [ERC 5.4 (IRC client for GNU Emacs 28.2)]
Guest3035 has joined #ruby
Guest3035 has quit [Client Quit]
ryjo has quit [Quit: Client closed]
gr33n7007h has quit [Ping timeout: 255 seconds]
gr33n7007h has joined #ruby
_73 has joined #ruby
<_73>
Hello. Ruby 3.2.0 broke backwards compatibility within the Ruby3 major version by removing the deprecated methods Dir.exists?, etc. I was wondering, is this the first time Ruby has broken backwards compat within a major version, or has it happened before?
admina has quit [Remote host closed the connection]
markong has quit [Ping timeout: 268 seconds]
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sidetracking has joined #ruby
sidetracking has quit [Client Quit]
eddof13 has joined #ruby
teclator has joined #ruby
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
eddof13 has joined #ruby
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kovital has quit [Ping timeout: 248 seconds]
otisolsen70 has quit [Quit: Leaving]
aeris has quit [Ping timeout: 255 seconds]
aeris has joined #ruby
cek has joined #ruby
eddof13 has joined #ruby
Prodigy has joined #ruby
kovital has joined #ruby
ur5us has joined #ruby
desnudopenguino1 has joined #ruby
desnudopenguino has quit [Ping timeout: 252 seconds]
desnudopenguino1 is now known as desnudopenguino
Prodigy has left #ruby [Leaving]
___nick___ has quit [Ping timeout: 255 seconds]
_ht has quit [Quit: _ht]
howdoi has joined #ruby
<leah2>
in minor ways else too
kovital has quit [Quit: Best CPUs can count to infinity twice without being bugged out by zero division errors or whatnot.]
fercell_ has joined #ruby
quazimodo has joined #ruby
fercell has quit [Ping timeout: 255 seconds]
Al2O3 has quit [Quit: Al2O3]
Al2O3 has joined #ruby
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hightower3 has joined #ruby
hightower3 has quit [Remote host closed the connection]
hightower3 has joined #ruby
hightower2 has quit [Ping timeout: 252 seconds]
tomtmym has quit [Quit: Gone.]
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
eldritch has quit [Quit: bye]
<havenwood>
_73: MINOR Ruby versions break compatibility in minor ways. The Ruby 3 release wasn't much different than a standard MINOR release. Like mentioned, the only big breaking change was 1.8 to 1.9, which was huge. Matz learned from Python and Ruby's own big breaking change and decided to keep it gradual from here.
<havenwood>
Matz has decided to never do a Ruby 1.8-to-1.9 level change again.
<havenwood>
It'll be gradual from here.
<havenwood>
MINOR: increased every Christmas, may be API incompatible
<weaksauc_>
any limitations with jruby?
<weaksauc_>
all the gems work well?
Al2O3 has quit [Ping timeout: 252 seconds]
markong has joined #ruby
<ox1eef_>
It is not a 100% drop in replacement for MRI. Especially useful if you want to interface with the JVM / Java ecosystem.
gr33n7007h has quit [Ping timeout: 265 seconds]
gr33n7007h has joined #ruby
teclator has quit [Ping timeout: 255 seconds]
gr33n7007h has quit [Ping timeout: 246 seconds]
gr33n7007h has joined #ruby
<weaksauc_>
ox1eef_ yeah just was thinking of using it to play around with ruby guis
<weaksauc_>
since spring et al are more fleshed out than most ui libs
<ox1eef_>
I think it is good for that. IIRC a Ruby editor called redcar was done using JRuby.
<havenwood>
weaksauc_: Most gems work in JRuby and popular ones with C-extensions tend to ship Java extension alternatives.
<havenwood>
weaksauc_: You can't fork.
joto2 has joined #ruby
<havenwood>
weaksauc_: Most things work well. Especially if you're starting in JRuby, it should be smooth.
joto has quit [Changing host]
joto has joined #ruby
joto2 has quit [Changing host]
joto2 has joined #ruby
<ox1eef_>
It can also lag a little bit behind MRI in terms of language features. It was a bit slow to boot when I last tried it. The JVM picks up speed when it has been running for a while. Probably not the best option for short-lived scripts.