subbu has quit [Ping timeout: 260 seconds]
subbu has joined #jruby
subbu has quit [Ping timeout: 252 seconds]
subbu has joined #jruby
subbu has quit [Ping timeout: 268 seconds]
<cgautam[m]> <headius> "I'm sure there's a JVM library..." <- is this message for me
ahorek[m] has quit [Quit: You have been kicked for being idle]
<headius> cgautam: yes sorry
subbu has joined #jruby
<headius> enebo: okay other than fixing these refinement issues do you have any high priority items for 9.4.1?
<enebo[m]> whatever came in over break
<headius> I have a fix in progress for one such item
<headius> I triaged most of the items from the break
<enebo[m]> I am hopeful whatever is broken for refinements will also fix the use of it in tzinfo
<enebo[m]> Ok. I am going to examine the zsuper in a closure issue this morning
<enebo[m]> headius: does your PR fix sorbet to the point of running
subbu has quit [Ping timeout: 260 seconds]
<enebo[m]> headius: I reviewed the bound super PR. What you did makes sense to me.
<enebo[m]> Part of me is not super solid on how use mixing in these included pseudo modules work in combination with other things but I guess without exhaustively working through prepends/refines or something in the super type?
<enebo[m]> prepend may work fine is a super call asks for ???origin??? on the type it is referencing from the include
<enebo[m]> which whatever getter that is I think we must do that
<headius> it doesn't actually mix it in... it just creates the pseudoclass out of an include wrapper and uses that as the implementation class for the method
<headius> so super can go up from there
<headius> it's hacky as heck
<headius> I don't get why it should do this
<enebo[m]> yeah I did get that but I guess so long as the pseudo part of this is just going up one level it will be no worse than being in the original type
<enebo[m]> "no worse" == "works the same"
<headius> yeah there is some refinement-related code in the same blob of CRuby but I will have to circle back to that
<headius> or wait until someone is using bind_call to invoke refined methods and it doesn't work
<enebo[m]> Me using "no worse" shows my overall confidence :)
<headius> and we thought Ruby was complicated 15 years ago
<enebo[m]> wait until module adds the new concept "depends"
<enebo[m]> (this is a joke)
<enebo[m]> I believe much of the complexity added later was to satisfy library authors and I wonder if this all could have been done in some idiomatic coding style over more language features
<headius> hah
<headius> yes it probably could have
<enebo[m]> prepend I can see why someone would do it but at the same time it just feels like some mind-bending hack
<headius> they way they did it sure does feel hacky
<headius> I considered implementing it such that all classes have a pseudo class below them that's actually on the object
<headius> so you could just include above that and it would prepend the original
<headius> but it adds one pseudoclass to every level
<enebo[m]> I am not throwing shade at MRI here either (from an impl standpoint -- you have to do something with a huge old codebase) but from a language standpoint I am just questioning whether this complexity was ultimately worth it)
<enebo[m]> ah yeah I simpler might be worth it even if it effects some micro benches
<headius> rather than doing this origin dance all the time
<headius> enebo: so recent bundler no longer works on 9.3
<headius> that failed an update to the docker hub image: https://github.com/docker-library/official-images/pull/13836
<headius> s/3/2/
<headius> ah yes, 2.4 was released before the holiday and must have dropped Ruby 2.5 support (at least)
<headius> so my question is whether it's time to just drop the 9.2 images
<headius> we don't support it anymore and 9.4 has been out for a couple months
nirvdrum[m] has quit [Quit: You have been kicked for being idle]
<enebo[m]> headius: I don't have any idea who uses images and whether it should matter or not
<enebo[m]> like we will not be releasing a new version of our stuff so it would be to pick up fixes in bundler or whatnot but bundler will not work for 2.5 so they cannot get that
<enebo[m]> so it makes me wonder what benefit it would be for us to try and update the image and update it with what?
<enebo[m]> I guess the base container deps getting security?
<enebo[m]> I think we could stop supporting it and see if anyone gives a reason why we shouldn't?
<headius> I could make the image install an older version of bundler on 9.2 but this is a pretty good excuse to just drop it
<headius> Yeah that seems fine. We can always put it back if there's some compelling reason to do so
<headius> Also that bind commit seems to have failed some suites so I need to look into that
<lopex[m]> hmm looking at that regxp memoization, and limitations @ https://bugs.ruby-lang.org/issues/19104#note-4
<lopex[m]> and wonder how many changes there are after https://github.com/ruby/ruby/pull/6486
<lopex[m]> no changes in onigmo repo btw
<lopex[m]> I wonder how do they want to cross port anything again
<lopex[m]> btw we already know whether a stack is needed for a regexp before regexp compilation
<lopex[m]> might be somewhat helpful
<headius> Yeah it would be great to port over some of the recent optimizations
<lopex[m]> "but when the value is too large, it is not useful for preventing ReDoS"
<lopex[m]> could it be based on regexp "ticks" like we have ?
<kares[m]> why is make needed in the Docker images?
subbu has joined #jruby
<headius> kares: there are a number of gems that stub out the extension on JRuby but RubyGems still runs make
<headius> it also affects Windows
<headius> lopex: yeah I bet it is
<enebo[m]> jrake
<headius> enebo: I pushed an update to remove 9.2
<headius> and tweeted about it
<enebo[m]> So if you use chatGPT to translate code from one language to another and it works...what are the IP issues?
<enebo[m]> (note: I am not doing this but I saw someone say they did this for their job)
<enebo[m]> co-pilot is pretending their training data need not comply with IP laws so I wonder how much of this is just a minefield waiting to blowup
<kares[m]> the future of language porting 😜
<kares[m]> ... is here!
<enebo[m]> cd ~/mri; ok convert this to Java
<headius> licensing is bollocks anyway
<enebo[m]> headius: yeah almost ironic I am bringing this up but it is an obvious problem
<headius> yeah it is
<enebo[m]> I think we are pretty sensitive to this stuff...moreso than most people
<headius> also who owns the copyright on AI-generated code
<headius> the prompter or the AI
<enebo[m]> For dall-e images they claimed they owned it but that is just terms of use
<enebo[m]> not only the images but also the input
<enebo[m]> lopex: This is a topic after your heart
<kares[m]> oh really? what you tell it to do they own ... interesting
<enebo[m]> I did not verify they but I saw that mentioned by others in a couple of tweets
<enebo[m]> but dall-e was just a test bed play thing. If you paid money no doubt you could own both
<enebo[m]> lopex: I have still not watched that video on stable diffusion but that is the OSS route for images right?
<enebo[m]> Assuming you have a good dataset
<lopex[m]> enebo: the one from computerphile ?
<enebo[m]> I think so? You sent me something a while back
<enebo[m]> yeah
<lopex[m]> "Pragmatically, OpenAI was a mechanism for Microsoft to try risky things with AI without incurring the liability and reputational risk of doing it themselves. They became very conservative after Tay."
<lopex[m]> indeed
<enebo[m]> I don't know what compvis is but it is what it seems to use
<enebo[m]> I would use AI not to write the code but to include the proper includes for C
<enebo[m]> lopex: and author name
<lopex[m]> with license info ? /s
<lopex[m]> well there's that https://githubcopilotlitigation.com/
<lopex[m]> the fil­ings contain what bothers them
<enebo[m]> lopex: thanks. It will be interesting to see how this shakes out
<enebo[m]> I personally would like to kill almost all IP laws but we clearly are not going that direction
<enebo[m]> If AI is an escape hatch then you will see a lot of people using it as an active circumvention tool
<lopex[m]> also there's this product https://githubnext.com/projects/hey-github/
<enebo[m]> the comment examples are really funny
<lopex[m]> sorry for the spam but this must be some kind of a fad https://news.ycombinator.com/item?id=34263644
<enebo[m]> This broke some CI tests
<headius> realy?
<enebo[m]> From a glance something in the reporting of Thread#inspect being different
<enebo[m]> but I think it may be a little more than that
<headius> aha
<headius> well a bunch of these are due to to_java actually returning Thread now instead of our wrapper
<headius> that is an API change indeed
<enebo[m]> yeah Ruby-Thread is not in the name
<headius> these might all be that
<enebo[m]> but I did not look at all failures
<headius> I did not notice these failures, my bad
<headius> it seems to be all in our suites though
<enebo[m]> Seems like a reasonable change but do we care to know if we are in a Ruby thread or a Java one?
<headius> well you can still get the wrapped RubyThread with JRuby.ref or to_java(org.jruby.RubyThread) I think
<headius> this does beg the question though... should the default now be Thread? It is one thing to make it possible to to_java(java.lang.Thread) but it is another entirely to change the API to always do that
<headius> maybe we back off the default and push it for 9.5
<enebo[m]> My main questions: a) should we provide API to know Ruby vs Java? b) Do people already assume this is how we determine that or is it just our test suites?
<enebo[m]> I think the answer to a is yes but I have no idea on b
<enebo[m]> If no one is looking for Ruby vs Java threads I don't care too much but if we cannot know then we consider the fallout of the change
<headius> well this is literally to_java, it seems like the default of Thread is logical
<enebo[m]> fwiw no one is using 9.4 yet
<headius> but I'm worried about changing it mid-version
<enebo[m]> but we did not announce (and let's be honest we do not have a real mechanism for this) it
<headius> I was just about to change the tests but there may be library code using this
<enebo[m]> yeah that is my main issue
<enebo[m]> if someone is assuming this we cannot just change it even if we pretend .1 is out
<enebo[m]> and personally .1 is like a pre for us
<enebo[m]> but I have no idea how you would even figure this out either
<enebo[m]> We should make a wiki page of breaking changes and deprecations
<enebo[m]> Then we can just update it so 9.5 will replace X for Y. Z is going away
<enebo[m]> assert_match(/Ruby-\d+-Thread-\d+:\s(.*.rb)?:\d+/, native_thread_name(Thread.current))
<enebo[m]> This seems like a weird way to test to me
<enebo[m]> isn't there an id?
<enebo[m]> I am sure there is a reason and there is a comment above one of these mentioning parsing apart for windows but it is a fairly weird piece of text to parse. I am guessing there is no id-like method
<enebo[m]> Although if we do plan on delaying this change we should either make '==' work or make an 'thread_id' which encapsulates logic like this
<enebo[m]> I would assume all Thread.current would be a Ruby thread so I am not sure why 'saved = Thread.current; ...; assert_eq(saved, Thread.current)
<enebo[m]> I am spamming :)
<headius> heh yeah those are weird tests
<headius> I dunno... hard to gauge the possible impact from this
<headius> someone would have to have known thread.to_java returns the JRuby object wrapper and then know how to use it to get the real thread underneath
<enebo[m]> headius: when kares sees this he can probably tell us where he saw this happening
<headius> these failures may be the failures in my PR
<enebo[m]> he said he saw it used by two different things
<headius> yeah
<kares[m]> I know it's breaking but 9.4 seemed like a fit, returning an internal org.jruby.RubyThread by default is simply inspected territory
<kares[m]> some advanced uses assume this - have seen thread.to_java(org hrubý.RubyThread).native_thread to get the java thread
<kares[m]> which would still work but having a blessed to_java do the same by default made sense to me
<enebo[m]> So API to get native is fine since it will effectively be self.
<kares[m]> I think LS might have the to_java.native_thread assumption but they will be fine changing once they upgrade
<enebo[m]> I think the weird part is the testing using inspect on the old wrapper
<kares[m]> I can poke around tomorrow to see if there are other potential.uses In gems
<kares[m]> enebo[m]: Yeah sorry about that I did not notice those failures ...
<enebo[m]> kares: yeah that's great. I have to wonder how many consumers there can eb
<enebo[m]> it is no big deal but that matching code invites other questions
<enebo[m]> Like should we have an API for what it is trying to do
<enebo[m]> Or should == just work
<enebo[m]> Likely without a wrapper == probably does work now
<kares[m]> hmm I think those will be just weird tests, but yeah can poke around history when they were introduced for context
<kares[m]> believe it was just fewer types to test that way ...
subbu has quit [Ping timeout: 260 seconds]
<kares[m]> (but am not behind a computer to check now)
<enebo[m]> kares: I suspect the to_java(Thread) stuff will be just fine so I think our only concern is why people are looking at inspect output
<enebo[m]> "I suspect" == it is just returning this/self so it is fine
<kares[m]> assert_match(/Ruby\-\d+\-Thread\-\d+\:\s(.*\.rb)?\:\d+/, native_thread_name(Thread.current)) ... this one?
<kares[m]> will still work the same ... btw.most use-cases at least the two Logstash and the
<kares[m]> stuff I am working on these days to the native thread extraction simply to set the name
<enebo[m]> kares: that happens in I think more than one place but yeah
<kares[m]> okay will inspect those places one by one tomorrow or the day after
<headius> hey what's our policy on merging 9.3 to 9.4 now
<headius> 9.3 is in maintenance mode so all new work is on 9.4
<headius> enebo: asking because this bind/call behavior apparently predates 2.6 so I need to apply a similar fix to 9.3, but it won't merge cleanly because 9.4 added bind_call
<enebo[m]> I think we should backport things which are not risky if someone notices it broken on 9.3
<enebo[m]> but I think we should not move everything we discover unless it is mostly just a cherry-pick
<headius> so not merging forward but backporting/cherry-picking to 9.3
<enebo[m]> I think when it is some obvious language semantic especially
<headius> I just don't know if it is too early to cut off merging but not sure when we last did it either
<enebo[m]> but when we change things like the whole module iinclude/prepend/... we should consider risk
<enebo[m]> I am mixed
<headius> yeah so the question in my mind is whether we will have enough fixes coming in for 9.3 that we need to keep merging forward
<headius> it is already hard to merge many pieces
<headius> we did it while 9.4 was in dev but it's out now and new fixes and code should largely go there
<headius> but it is not adopted by many people yet
<enebo[m]> I think if we get a simple core method fix in 9.3 we merge forward
<enebo[m]> but if it is already a mile apart we just punt it (or possibly examine how important it is to make it work)
<enebo[m]> but I think that is largely bi-directional
<headius> so I should apply this to 9.3, merge 9.3 to master, and then make the additional change to bind_call separately
<headius> here's the 9.3 PR: https://github.com/jruby/jruby/pull/7555
<enebo[m]> cool. ship it :)
<enebo[m]> assuming it runs our guantlet
<enebo[m]> HAHAH so looking more at that thread error it is the same test which is tested like 5 times
<headius> that figures
<lavamind> hello
<lavamind> testing
<enebo[m]> So sequel is failing and I cannot see which commit actually did it
subbu has joined #jruby
<headius> I can help once I finish this
<headius> there was a CRuby test for this change and I'm getting it to pass
<headius> just waiting for a few more suites to be green before I merge into 9.3, and then I'll rebase and update the 9.4 PR
<enebo[m]> kares: headius I just looked at this thread name test and it literally is testing to make sure inspect shows Ruby-*-Thread in it.
<headius> yeah
<enebo[m]> So we are not depending on this string for anything
<enebo[m]> we should still see if anyone does but I am going to commit out this string test since it is already low-value and I would rather see green
<lavamind[m]> hello
<lavamind[m]> it seems jruby 9.3.9.0 is no longer able to build openssl for some reason
<lavamind[m]> ERROR: Failed to build gem native extension.
<lavamind[m]> Trying to install the 'trocla' gem
<lavamind[m]> One thing that changed recently is that openssl-3.1.0 was released on Dec 23, not sure if that's the exact cause
<lavamind[m]> Pruned log: https://paste.debian.net/1266252/
<lavamind[m]> (aside: IRC bridge is still broken, messages from IRC not showing up in Matrix)
<headius> bleh specs failed
<headius> lavamind: JRuby could never b
<headius> never build openssl because it is an extension made for CRuby
<headius> we need to have the openssl gem maintainer add a no-op gem for us that just installs our jruby-openssl
<lavamind[m]> hrmm, strange that its now trying to build it in the test though ? it was working two weeks ago
<lavamind[m]> headius: is that something the openssl maintainer needs to do for every release of the openssl gem?
<lavamind[m]> oh I see, the "trocla" gem itself has had a new release, adding openssl as a new dep
<lavamind[m]> do you know of a barebones gem published on rubygems that has minimal dependencies and an executable ?
<lavamind[m]> just so I can test if jruby can install a gem and launch the executable in a test
<headius> lavamind: yeah it would need to be done for every release so there's a -java version that just installs our stuff
<headius> ugh ok so gems are starting to add openssl as a dep
<headius> we'll need to bump up the timeline on dealing with this enebo
<headius> enebo: these failures do not appear to have anything to do with my UnboundMethod#bind change
<headius> that libutil thing was previously seen only on master but byteit101 did something to patch that in subspawn... I don't know why we are seeing it on 9.3 now
<headius> the other one would mean some JI is loading early but I don't know what would have changed that either
<enebo[m]> so something broke it but it was not what you suspected...but still a good fix
<headius> the spec failures don't make sense either
<headius> Etc.sysconf returns the value of POSIX.1 system configuration variable SC_SYMLOOP_MAX ERROR
<headius> Errno::EINVAL: Invalid argument - No message available
<headius> these have nothing to do with my patch
<enebo[m]> yeah that I see locally
<headius> there's some environment change on GHA I suspect
<byteit101[m]> I would have expected it to always be broken on 9.3 on fedora
<enebo[m]> so now GHA has it I guess
<enebo[m]> err doesn't have it
<lavamind[m]> headius: I have lots of these errors as well on Debian
<headius> byteit101: GHA must have updated something
<headius> was this a lib/lib64 issue?
<byteit101[m]> likely
<byteit101[m]> It was a dev/devel package missing
<headius> lavamind: ok thank you for that
<headius> so it seems like we can ignore these for purposes of this PR but we will need to deal with them so 9.3 is green again
<headius> probably just remove the problematic Etc values like in the debian patch if they are not on all envs
<headius> and the other part I dunno
<lavamind[m]> yeah, I don't see the value of testing all of the possible Etc.sysconf values
<headius> agree
<headius> this is a ruby/spec bug
<headius> I suspect CRuby would fail too
<lavamind[m]> either that, or accept EINVAL as valid
<headius> it passes for me locally, perhaps someone else can confirm CRuby also fails
<headius> enebo: I'm going to merge PR so I can finish up this bind thing
<enebo[m]> headius: ok
<headius> lavamind: commented with more details about how to fix this... the long term fix would be in openssl, but trocla could remove the dependency or release a separate -java gem with jruby-openssl as the dep
<headius> there's no way to do conditional dependencies in RubyGems itself
<lavamind[m]> ah ok I understand
<lavamind[m]> thanks
<lavamind[m]> A bit tangential but jruby-openssl seems to be compatible with bouncycastle 1.72 in testing
<headius> we always try to keep it up to date but it lags sometimes
<lavamind[m]> you won't find me, a Debian dev, blaming you for that lol
<headius> enebo: do you see this Etc failure locally too?
<headius> I want to confirm it fails in CRuby before I file something with rubyspec
<enebo[m]> oh can you give me the line to try
<enebo[m]> It must be happening on my machine though since this only just started wit GHA
<enebo[m]> and I didn't see it on windows :)
ahorek[m] has joined #jruby
<enebo[m]> So I did not notice this but I only see that on 9.3 and not 9.4 (which is the one which returns nil like MRI)
<enebo[m]> kares: Commit of interest: https://github.com/jruby/jruby/commit/be88ae16c7bd857c72d30527365dc998641068e9 when you are looking
<enebo[m]> I think the main issue is just making sure j.l.Thread has a native_method
<headius> That would probably cover 99% of this case
<headius> Just sort of duck type the Java thread to have this method
<headius> With a deprecation warning
<enebo[m]> headius: and I have output on my machine above in a gist
<headius> hmm ok so there is some behavioral difference here
<headius> I remember this being nil too so we must be raising this anew