subbu has joined #jruby
<headius> I had a rest
<headius> I will continue trying to investigate this
<headius> bisecting
<headius> it is something recent
subbu has quit [Quit: Leaving]
<headius> enebo: after mucking around with bisecting for like two hours I determined 9.3.9 IRB works here and 9.4.0.0 does not
<headius> so it is probably new IRB + reline hitting some FFI or fiddle problems on M1
<headius> so I don't think this is a new bug
<headius> I was only trying it so I could see if my bytecode reductions are working
<headius> but I will have to fix this tomorrow, may take some work
<headius> my code size improvements dropped the bytecode created by threshold=0, -e "gets", from 53974 bytes down to... 53733 bytes!
<headius> to be fair that's a little skewed since that includes all class metadata and method definitions and all that
genpaku has quit [Read error: Connection reset by peer]
genpaku has joined #jruby
<headius> byteit101: libfixposix bindings seem to have trouble finding the binary on my M1 mac
<byteit101[m]> hmmm, this is using the jruby-packaged version?
<headius> yes, but I also reinstalled latest gems and it behaves the same (assuming they are being activated)
<byteit101[m]> What is RbConfig.expand("$(target_cpu)-$(target_os)".dup)
<byteit101[m]> (saved as LFP::Binary::PATH)
<byteit101[m]> (found in require 'libfixposix/binary/version')
<headius> I'll check
<headius> "arm64-darwin"
<headius> matches the path to the binary
<byteit101[m]> hmm
<byteit101[m]> LFP::Binary::PATH matches the binary path? is there funky jar! or other things in the path?
<headius> it does resolve to the correct path
<headius> I wonder if JNR has regressed on M1 with some recent changes
<byteit101[m]> And that path is in LFP::LFPFile.local_so ?
<headius> ["fixposix"]
<byteit101[m]> Oh
<byteit101[m]> is ENV["LIBFIXPOSIX_PATH"] defined?
<byteit101[m]> Wait, backup. This is an error you get with require 'pty' ?
<headius> irb
<headius> I wanted to see if it worked better than the base pty.rb, since my issues seem terminal-related
<byteit101[m]> wait, so what's the backtrace?
<byteit101[m]> I don't think IRB uses PTY?
<headius> ah perhaps just io-console and not pty then
<headius> I forget they are not the same thing because io-console has tests that require pty
<byteit101[m]> ah yes
<headius> the backtrace is during replace-builtin in any case, it's just prepping for use
<byteit101[m]> I even recommend io-conosle integration testing in the readme: https://github.com/byteit101/subspawn/blob/master/README.md#development
<byteit101[m]> Ah, ok, so via that.
<byteit101[m]> In a fresh session, what does %w{libfixposix libfixposix/binary libfixposix/binary/version}.map{|x| require x} return?
<byteit101[m]> (actually, do all 3 paths separately in a fresh session, after require 'pty' fails)
<byteit101[m]> I think there is an ordering difference somehow
<headius> heh second one manages to find the file, but then there's this:
<headius> LoadError: Could not open library '/Users/headius/work/jruby/lib/ruby/gems/shared/gems/ffi-binary-libfixposix-0.5.1.0-java/lib/libfixposix/binary/arm64-darwin/libfixposix.dylib' : dlopen(/Users/headius/work/jruby/lib/ruby/gems/shared/gems/ffi-binary-libfixposix-0.5.1.0-java/lib/libfixposix/binary/arm64-darwin/libfixposix.dylib, 0x0005): tried:
<headius> '/Users/headius/work/jruby/lib/ruby/gems/shared/gems/ffi-binary-libfixposix-0.5.1.0-java/lib/libfixposix/binary/arm64-darwin/libfixposix.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64'))
<byteit101[m]> Ah!
<headius> universal build not getting triggered I guess
<byteit101[m]> Yes, interesting. There isn't a "universal build" with gcc, it's otool that merges and makes a universal binary, at least as far as I could tell
<byteit101[m]> I have to do "real work" right now, and will probably be busy this evening, but poke around https://github.com/byteit101/subspawn/blob/master/Rakefile#L97 and https://github.com/byteit101/subspawn/blob/master/ffi-binary-libfixposix/Rakefile#L117 if you need this today
<byteit101[m]> The other option is to run the CI on a m1/m2 machine
<headius> yes I can set that up
<headius> need to add a runner to your organization and we can run it on the same macstadium instance as JRuby
<headius> enebo: finally fixing this refinements things
<headius> I'll circle back to the m1 issues
<headius> the refined bit seems to be failing to propagate to the refine block
<headius> oh haha
<headius> it sets up the closure before it runs the refined check
<headius> you know we're eventually just going to have to treat every scope as refined... some time soon I might prototype that and start seeing what it would take to make it fast
<enebo[m]> nice
<headius> well the simple fix got me closer... at least it's trying to do a refined lookup now
<headius> hopefully that's all that's needed for now
<headius> enebo: we should just merge the JNR updates
<headius> merged to 9.3 and 9.4