ur5us has quit [Ping timeout: 260 seconds]
ur5us has joined #jruby
nirvdrum has quit [Ping timeout: 258 seconds]
nirvdrum has joined #jruby
<headius[m]> ok well that's progress
ur5us has quit [Ping timeout: 260 seconds]
nirvdrum has quit [Ping timeout: 264 seconds]
ur5us has joined #jruby
drbobbeaty has quit [Ping timeout: 265 seconds]
nirvdrum has joined #jruby
Freeky has joined #jruby
Liothen_ has joined #jruby
Iambchop_ has joined #jruby
Freaky has quit [*.net *.split]
rdubya[m] has quit [*.net *.split]
JulesIvanicGitte has quit [*.net *.split]
KarolBucekGitter has quit [*.net *.split]
kasaltie has quit [*.net *.split]
Liothen has quit [*.net *.split]
Iambchop has quit [*.net *.split]
Liothen_ is now known as Liothen
Iambchop_ is now known as Iambchop
kasaltie has joined #jruby
JulesIvanicGitte has joined #jruby
KarolBucekGitter has joined #jruby
rdubya[m] has joined #jruby
ur5us has quit [Ping timeout: 260 seconds]
ang-st has quit [Ping timeout: 264 seconds]
ang-st has joined #jruby
drbobbeaty has joined #jruby
ang-st has quit [Ping timeout: 258 seconds]
ang-st has joined #jruby
ang-st has quit [Ping timeout: 256 seconds]
ang-st has joined #jruby
joast has quit [Quit: Leaving.]
joast has joined #jruby
xardion has quit [Remote host closed the connection]
xardion has joined #jruby
<headius[m]> enebo: hey weird failures on webrick tests
<headius[m]> I'm trying to get them green
<headius[m]> but about half that remain fail because crypt couldn't load?
<headius[m]> I can't reproduce just calling String#crypt directly... it seems to work fine
<enebo[m]> Tales from the crrypt
<headius[m]> indeed
<enebo[m]> headius: so without looking I would say base process loads native and subprocess fails for some reason and the test is spawning another jruby
<headius[m]> yeah I'm trying to figure out how it's launching stuff
<headius[m]> aha I think I might have had jruby in PATH but also something from rvm
<headius[m]> I did rvm system on a hunch and the errors went away
<headius[m]> 👍
<headius[m]> down to 5F
<headius[m]> weird, something that is masked to not run when on Windows fails for us, but seems like just some env difference
<headius[m]> ok nevermind, it came back
<headius[m]> how peculiar
<headius[m]> enebo: this is weird
<headius[m]> java.lang.UnsatisfiedLinkError: dlopen(liblibcrypt.so.1.dylib, 9): image not found
<headius[m]> at jnr.ffi.provider.jffi.NativeLibrary.loadNativeLibraries(NativeLibrary.java:93)
<headius[m]> liblib
<headius[m]> perhaps weirder is that I'm on MacOS and there's not such library even with the right name
<headius[m]> I'm wondering if this is some kind of threading thing where it's lazily loading on two threads and one sees a partial result
<enebo[m]> weird
<enebo[m]> liblib how can that happen...
<headius[m]> oh I see how it fails over library names
<headius[m]> so it does try "libcrypt" which gets prepended with lib elsewhere
<headius[m]> it later tries "crypt" which should work if it exists
<enebo[m]> SyntaxError: -e:1: Invalid redo
<headius[m]> but these exceptions shouldn't be getting out in any case
<headius[m]> hah I forgot about redo
<enebo[m]> When did error not end up on the front or even on the same line
<headius[m]> what do you mean?
<enebo[m]> mri26 -e redosdklfj
<enebo[m]> I am guessing this was quite a while ago
<enebo[m]> we output in an older format
<enebo[m]> we do NameError: vs (NameError) at end
<headius[m]> oh this is probably from the reversed trace
<enebo[m]> when was that I think we have been wrong for years
<headius[m]> hmm
<headius[m]> I don't get your error
<headius[m]> $ rvm ruby-2.6.5 do ruby -e redoasdfasdf
<headius[m]> Traceback (most recent call last):
<headius[m]> -e:1:in `<main>': undefined local variable or method `redoasdfasdf' for main:Object (NameError)
<enebo[m]> we prepend error name on the front of the error string
<enebo[m]> MRI does it on the end of the line
<headius[m]> if I just do "redo" I get this
<enebo[m]> yeah I am fixing a test based on this
<enebo[m]> notice there is two issues
<headius[m]> oh that's our output
<enebo[m]> they output twice and we do 'SyntaxError: -e:1: Invalud redo
<enebo[m]> MRI used to do this too
<headius[m]> did they?
<headius[m]> -e:1: Invalid redo
<headius[m]> -e: compile error (SyntaxError)
<headius[m]> $ rvm ruby-1.9 do ruby -e redo
<headius[m]> the "SyntaxError: -e:1:" line for us is probably due to our different backtrace output
<headius[m]> if you set backtrace.style=mri it looks mostly th esame
<headius[m]> $ ruby -Xbacktrace.style=mri -e redo
<headius[m]> -e:1: Invalid redo (SyntaxError)
<enebo[m]> oh well that is nice
<enebo[m]> so MRI test suite should use that option
<headius[m]> I believe we set that when running MRI suiite
<enebo[m]> It is possible we do but we excluded based on not realizing that
<headius[m]> yeah we do
<enebo[m]> ok well that was a simple fix then...untag
<headius[m]> yay
<enebo[m]> I am installing 1.8.7
<headius[m]> good luck!
<enebo[m]> I find it weird we picked something different than MRI originally
<enebo[m]> a big clone :)
<headius[m]> originally?
<enebo[m]> I also have to remove openssl-devel
<headius[m]> we did have exactly the same output but switched it to the rbx style
<headius[m]> that's what this line is from, there's just no other lines to sho
<headius[m]> show
<enebo[m]> I mean did we just whole cloth decide to emit errors differently
<enebo[m]> so rbx was motive
<headius[m]> well, better format was motive, mostly due to the centering
<headius[m]> first line shows exception, line, message
<headius[m]> subsequent lines show function at file:line centered on at
<headius[m]> it was based on rbx format but isn't exactly the same I believe
<headius[m]> in any case it was a style choice we we liked this format so we made it default
<enebo[m]> ok I don't remember but that was a long time ago
<headius[m]> but the MRI style is still there, and of course we use MRI style for caller and exception.backtrace output
<lopex> enebo[m]: hey, I'm alive
<enebo[m]> lopex: thank goodness
<enebo[m]> lopex: I was a bit concerned
<headius[m]> yeah so was I
<enebo[m]> lopex: how you doing anyhow?
<headius[m]> welcome back
<enebo[m]> lopex: living in your brothers brewery?
<enebo[m]> That is where I would be if I was in Poland and both your brothers
<lopex> enebo[m]: I was taking seronil (an antidepressant) wasnt talkative for a while
<headius[m]> hard to stay motivated in this crazy world right now
<lopex> that's a longer story for me though, but anyways...
<enebo[m]> lopex: well good to see you
<lopex> enebo[m]: my brother arranged cellar for his brewery
<lopex> enebo[m]: lots of place, I'm about to help him with some automation on rpi
<enebo[m]> lopex: for aging beers?
<lopex> both
<lopex> two rooms
<lopex> one for brewing one for aging/storage
<enebo[m]> nice
<lopex> I might find a photo somewhere
<enebo[m]> lopex: duct tape solves all problems
<lopex> enebo[m]: even when repairing ISS
<enebo[m]> lopex: true
<headius[m]> aha I think I found the problem
<headius[m]> I actually fixed this in jnr-ffi but had not released it
<headius[m]> when using the reflection-based proxy generator in jnr-ffi it will defer symbol lookup until first call
<headius[m]> even if you tell it to failImmediately
<headius[m]> so it fails at the crypt call even though it should try the other paths and eventually just leave it null
<headius[m]> I didn't want to do a release of jnr-ffi because you know why
<headius[m]> guess I'll do that now
<headius[m]> lopex: how's day to day life there these days? Folks here are all YOLO and going swimming
<lopex> headius[m]: apart from remote work ?
<headius[m]> are people wearing masks and such?
<lopex> yeah
<lopex> differs across EU though
<headius[m]> Poland and Minnesota are practically tied for confirmed cases
<headius[m]> and you have like 8x more people
<lopex> yeah, we're in the middle of nowhere actually
<lopex> politicians are confused
<enebo[m]> lopex: assuming Poland is good at testing Minnesota and Poland have had the same number of cases
<lopex> Czech are doing much better
<enebo[m]> lopex: but we only have about 5.5 million people
<headius[m]> yeah 9k in Czech
<lopex> one good thing was we closed borders early on, but since then it's all mistakes
<headius[m]> I guess I missed the memo that Czech Republic is now Czechia
<lopex> yeah, weird, on worldometers ?
<headius[m]> lopex: how much closed? everyone?
<headius[m]> on JHU dashboard
<lopex> headius[m]: closed for entry for non citizens
<lopex> and two week quarantine for citizens
<lopex> now there's rumors about openning
<headius[m]> hardcore
<lopex> well, the whole UE did that eventually
<lopex> *EU
<lopex> do you use teams at work ?
<headius[m]> teams? it's pretty much just enebo and me now
<lopex> works pretty well though
<lopex> I wonder how this works https://github.com/jitsi/jitsi-meet-electron
<headius[m]> who does teams?
<headius[m]> I think I've heard of a dozen different meetup tools since this started
<lopex> does as produce ?
<lopex> microsoft
<lopex> but after all that zoom hype they'll eventually fix it wrt sec and it will become popular I think
<lopex> headius[m]: here in the EU even public offices use teams
<lopex> not to mention companies and corps
<headius[m]> oh MS teams ok
<lopex> headius[m]: what I'm wondering about is the office suit
<headius[m]> I have not tried that one
<lopex> did they compile whole office via asm or have rewritten everything
<headius[m]> yeah it's all in browser now or something?
<headius[m]> I suppose wasm could do this but office is huge
<lopex> like, you can embed excel document and simultaneously work on it from browser
<lopex> you can play tic tac toe
<lopex> feels like electron like thingy
<headius[m]> it's using remote desktop behind the scenes
<headius[m]> 😀
<lopex> but I have to admit screen sharing and confs work ok
<headius[m]> I haven't participated in any online confs
<lopex> doh, we do our daily bullshit now
<headius[m]> I had a few confs say they were going to do one but never heard back again
<lopex> oh I mean video confs
<headius[m]> oh sure
<headius[m]> haven't done any for tech work but have done a bunch for social things
<lopex> well, now I miss my daily biking to work
<lopex> it was good for oxygenating the brain
<headius[m]> I have been trying to get back into running but mostly doing it at night so there's not a lot of people
ur5us has joined #jruby
subbu is now known as subbu|away
<headius[m]> ahh I and I see why the windows-sensitive test fails for us now too
<headius[m]> apparently Windows returns a different result for env vars depending on locale, probably transcoding it
<headius[m]> this test uses a CGI style handler that runs in a subprocess and receives things through env
<headius[m]> so I think our env is borked when there's multibyte involved
<enebo[m]> I have a single failure in test_syntax now
<headius[m]> the first set of question marks are expected
<headius[m]> the second set is borked clearly
<enebo[m]> I did make two fixes to tests which I will need to upstream to MRI but I will do that later (and probably ask headius to help me get started with performing commits to MRI)
<enebo[m]> I have been too lazy to not just start committing directly
<headius[m]> nice
<enebo[m]> Last one is a doozy
<headius[m]> they just need your pubkey and then you can clone the repo from ruby-lang.org
<enebo[m]> All name identifiers I will need to make be the value and a position
<enebo[m]> yeah I will ask later on that
<headius[m]> as far as process goes... 🤷‍♂️
<headius[m]> they don't seem to have any sort of rigid PR or review process
<enebo[m]> I am going to finish this first because I am doing it and I will end up maybe having more
<headius[m]> yeah cool get that stuff upstreamed
<headius[m]> probably best to join ruby-core slack and someone can help you
<enebo[m]> this last commit I changed from assert_syntax_error to having to spawn processes
<headius[m]> when the time comes
<enebo[m]> unfortunately they are doing a lot of iseq compile and left us eval but in these cases eval of an invalid break/next is a different message
<lopex> you mean mri doesnt have proper pr process ?
<headius[m]> I believe you can use PRs but they have a separate repo and I've never seen anything indicating when you should use a PR versus committing directly
<headius[m]> this will be a good chance to clarify that I suppose, I have not committed in a while
<headius[m]> enebo: ah so eval has a different message from just iseq compiling as a root script
<headius[m]> you could use our parser
<enebo[m]> in some cases it does
<headius[m]> JRuby.parse
<enebo[m]> but there is no consistency in error messages
<enebo[m]> parse will not work for us
<headius[m]> I have used our parser and compiler to replace iseq in a few places
<enebo[m]> it has to be build + parse
<headius[m]> JRuby.compile_ir then
<enebo[m]> so I guess in essence I could make code to do that and then submit that
<enebo[m]> but for now this is ok...we can probably make our tests faster for some files once I go that route
<enebo[m]> It is interesting though. in cases I see they still do process spawn but naively I would think they could assert_syntax_error
<enebo[m]> so there may be other weird wrinkles they hit as well
<enebo[m]> So the generic error is 'Invalid break'. It is simple but lack context...but you know...it is a break on a line. Seems fine right?
<headius[m]> I know I patched some of our MRI test files to use JRuby.compile instead of iseq
<enebo[m]> If you do the same thing within an eval it is: ' Can't escape from eval with break".'
<headius[m]> yeah
<enebo[m]> Sure it is more helpful so I could see push back but is this really worth of different text?
<enebo[m]> I probably would suggest 'Invalid break (within eval)'
<enebo[m]> Then tests would work and eval could be used but we would then be exercising different pieces of code
<enebo[m]> which is also interesting because compile_iseq means what? Never an eval I guess?
<headius[m]> aha
<headius[m]> valueStr = RubyString.newString(runtime, value.toString(), runtime.getEncodingService().getLocaleEncoding());
<headius[m]> "normalizing"
<headius[m]> passing garbage through Java String and then forcing to some arbitrary encoding... seems legit
<enebo[m]> yep...too legit to quite
<headius[m]> MRI doesn't seem to do anything at all to the incoming string before calling setenv
<headius[m]> ick
<headius[m]> our native setenv call uses java.lang.String so I have to conform to that at some point
<lopex> lol RubyString constructors
<headius[m]> hmph
<headius[m]> I can't figure out how to get this string to decode right
<headius[m]> to be fair I'm not even sure what encoding it's supposed to be, if any
<headius[m]> %A4%DB%A4%B2
<headius[m]> somehow that needs to go into a Java string and come through setenv as those bytes
<headius[m]> lopex: any thoughts on that?
<headius[m]> I don't even know if this is supposed to be utf-8 or not
<lopex> headius[m]: no idea
<lopex> what is this ?
<lopex> os depentant ?
<headius[m]> there's a webrick test that uses a CGI script in a subprocess and environment variables to drive it
<lopex> so transcoding ?
<headius[m]> that string appears in the request URI, and eventually goes into the env, but I can't figure out how to get it there without it getting mangled into <?> characters
<lopex> hmm
<headius[m]> the logic that breaks it is in our ENV impl, where we treat it as UTF_8 and try to decode to a Java string
<lopex> baybe burp culd help...
<lopex> *maybe
<headius[m]> it's only UTF-8 because that's default encoding... but I don't know if it should be utf-8 bytes or what
<lopex> so, it's like misstranscode on env reads ?
<lopex> or bad escapes ?
<headius[m]> it's on the way out
<headius[m]> I have stepped through an I can see the string we try to use for setenv is already screwed up
<headius[m]> EFBFBD is the multibyte <?>
<lopex[m]> and all that in/out encoding settings are the same ?
<lopex[m]> what env, system and locale ?
<headius[m]> well it boils down to having a string in hand that's got the bytes \xA4\xDB\xA4\xB2 and then trying to pass that to setenv as a Java string
<headius[m]> they are being interpreted as UTF-8 because that's the default encoding
<lopex[m]> on read /write the env ?
<headius[m]> yeah
<headius[m]> write in this case
<lopex[m]> no idea
<lopex[m]> updateRealENV
<lopex[m]> blew
<headius[m]> heh yeah
<lopex[m]> headius: theories ?
<headius[m]> I'm wondering if maybe env can't be relied upon to be valid strings?
<headius[m]> CRuby takes these bytes and passes them directly through to setenv
<headius[m]> are they UTF-8 or not? I don't know
<headius[m]> do they have to be any encoding in particular? I don't know
<lopex[m]> but what it would do ?
<lopex[m]> os doesnt transcode
<lopex[m]> or does it ?
<headius[m]> I'm checking MRI again now
<headius[m]> yeah looks like ruby_setenv just throws the bytes straight out as is
<headius[m]> doesn't appear to look at encoding of the string or the environment
<headius[m]> oh actually nevermind... I do see some code that does encoding
<headius[m]> hmm
<headius[m]> looks like it mostly just checks if it's ascii compatible enc
<headius[m]> this is the test
<lopex> encodings ftw
<headius[m]> I need to read up on setenv... if it's legal for it to contain random bytes in no particular encoding then our use of String isn't going to fly
<lopex> headius[m]: setenv on what os ?
<headius[m]> well I'm on macos
<headius[m]> they all just accept char* though so that could be just about anything
<headius[m]> what did you mean by burp?
<lopex> headius[m]: sec test analytic tool
<lopex> @google burp
<headius[m]> yeah I basically want to understand what these bytes are supposed to be
<headius[m]> input as SOME_ENCODING => output as UTF-16
<lopex> no idea
<headius[m]> ok
<headius[m]> good news is that it seems to come back in ok: