mkristian has joined #jruby
claudiuinberlin has joined #jruby
jmales has joined #jruby
jmales has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
jmales has joined #jruby
jmales has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
shellac has joined #jruby
drbobbeaty has joined #jruby
jmales has joined #jruby
drbobbeaty has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jmales has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
jmales has joined #jruby
drbobbeaty has joined #jruby
bbrowning_away is now known as bbrowning
jmales has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
jmales has joined #jruby
jmales has quit [Client Quit]
sidx64 has joined #jruby
drbobbeaty has quit [Quit: Textual IRC Client: www.textualapp.com]
drbobbeaty has joined #jruby
mkristian has quit [Quit: This computer has gone to sleep]
chrisarcand has quit [Remote host closed the connection]
mkristian has joined #jruby
chrisarcand has joined #jruby
<enebo> lopex: I think we should comment out that warning and release (with an issue filed against joni)
<lopex> enebo: I found it
<enebo> wowowowowo
<lopex> enebo: it's just /\X/ doesnt switch the regexp to utf-8
<enebo> hahaha
<enebo> lopex: wow all that thinking about toggling magic and it was just an encoding issue pushing it down a different path
<lopex> yep
<lopex> enebo: so the solution is to add warnings enabled condition to public void warn(String message) in RubyWarnings
<lopex> since that's what's used in joni
<lopex> or use separate warning callback
<enebo> wait what
<enebo> what is the code for that then?
<lopex> for what ?
<enebo> the solution you just said
<enebo> what specifically is the "warnings enabled condition"
<lopex> if (!runtime.warningsEnabled()) return;
<lopex> like in warn(ID id, ISourcePosition position, String message)
<lopex> enebo: RubyWarnings implements joni WarnCallback
<enebo> lopex: so our main RubyWarnings class should add that check to warn
<enebo> lopex: but I guess that means all users of warn will not have to pass that check
<lopex> enebo: unless it's used elsewhere by accident
<lopex> but that method is joni specific
<lopex> enebo: or isnt it ?
<enebo> I have no idea what you are talking about
<lopex> enebo: otherwise let's use separate callback
<lopex> enebo: warn(String message)
<enebo> lopex: ok but that is not RubyWarnings is it?
<lopex> what ?
<enebo> enebo: RubyWarnings implements joni WarnCallback
<lopex> I'm lost
<enebo> lopex: perhaps you can just fix this and I can look at the commit instead of trying to get this described
<enebo> lopex: I know the gist is to guard against warnings being enabled but I do not follow what you are saying specifically
<lopex> enebo: there's a warn method that takes only String right ?
<lopex> in RubyWarnigs
<lopex> it doesnt come from IRubyWarnings
<lopex> it comes from joni WarnCallback
<lopex> right ?
<enebo> ok I see that but never seen WarnCallback in my life
<lopex> because it's an interface from joni
<enebo> so plain warn(String) is only for jcodings
<enebo> err joni
<lopex> enebo: yes, in joni
<enebo> yeah ok
<lopex> enebo: and it's used in Regexp construction in RubyRegexp
<enebo> I get it. I am even surprised this is like this
<lopex> me too actually
<enebo> As an API I would have no idea that is only for joni but I suppose it is just for random errors
<lopex> enebo: so warn(String s) shouldnt be uses in jruby code
<lopex> *used
<enebo> HAHAH 48 uses
<lopex> heh
<lopex> well, then let's use separate warn callback impl
<lopex> enebo: do we need to access runtime from it ?
<lopex> ah, we do
<enebo> we have two ways to do this
<enebo> 1 is to just change consumers to not use that unless it is ok to only show when warningsEnabled
<lopex> enebo: but what about exts ?
<enebo> lopex: ah yeah true so that sort of means we cannot just throw a guard in this method
<lopex> so separate impl
<enebo> lopex: which leads to 2 which is to have joni call something else
<lopex> and deprecate that
<lopex> enebo: another callback impl
<enebo> hahah yeah maybe
<enebo> we could also ammend IRubyWarnings to include it
<enebo> but some ext may impl that too
<lopex> yeah, almost a moral problem
<enebo> so warn(String) is desirable as an API because it is just a String param
<lopex> yeah
<enebo> it is just on the wrong interface :)
<lopex> so new warn callback impl right ?
<enebo> I am actually the person to blame over this ID field
<lopex> enebo: so let's add RegexpWarnings to the runtime
<enebo> Someone from netbeans wanted it because they were matching on strings
<enebo> lopex: sure it seems a simple way of changing nothing
<lopex> and use that as joni WarnCallback
<enebo> lopex: can you make that change
<lopex> ok
<enebo> I think we can release after this change too and it will not even require joni release
<lopex> enebo: also we differ a bit in Regexp#to_s
<enebo> lopex: oh for warnings
<lopex> also an easy fix though
<enebo> lopex: I am ok shipping bugs unless the fix involves little risk
<enebo> lopex: My main issue is any changes we make should not allow more warnings to be produced than MRI
<lopex> well, it shouldnt
<enebo> lopex: yeah MRI is a toggle off in to_s right?
<lopex> enebo: mri also warns on ruby -w -e "/\X/u"
<lopex> so we're gold
<enebo> lopex: just using a scary global state toggle
<lopex> enebo: we'll just pass null warnings from joni there
<lopex> that's it
<enebo> lopex: ok but that will be a joni release to fix right?
<lopex> it's and empty impl
xardion has quit [Remote host closed the connection]
<lopex> enebo: no
<enebo> or is it in RubyRegexp
<enebo> ok
<lopex> it's already has that
<enebo> lopex: so what needs to be fixed?
<lopex> Ola!
<enebo> lopex: yeah so we change warn to NONE in to_s and back when done
<enebo> lopex: to be fair we may have also had a warn(String) in IRubyWarnings many years ago
<enebo> lopex: he might have thought it was just hooking into general rb_warn logic
<enebo> lopex: and it may have been in MRI way back then too
<lopex> enebo: he may have created it in the first place
<enebo> well IRubyWarnings preceeds me
<enebo> I think maybe I moved it from another package at some point and I added ID for netbeans to match warnings
<enebo> In truth I think the ID is a nice thing
<lopex> I mean that imeplement thing
<enebo> yeah
<enebo> he may have
<enebo> if I did that ID enum today it would have format string in it
<enebo> then be variadic call with ID, data1, ...
<enebo> warn(ID.ILLEGAL_PATTERN, regexp.inspect())
<lopex> enebo: so the lesson from all that is we forgot \p switches the regexp to utf-8
xardion has joined #jruby
<enebo> so \p matches unicode code points therefore will just be utf-8 regardless if the \p represents only ascii
<enebo> e.g. "1" =~ /\p{N}/
<enebo> hmmm I guess \p{N} maybe represents non-ascii numbers too?
<lopex> enebo: it's just char type
<lopex> and N is just a range
<enebo> lopex: yeah but if \p{N} can only be 0-9 then not marking regexp as UTF-8 probably allows 7bit search
<enebo> I mean specifically 'N'
<enebo> or maybe \p{Nd}
<enebo> that is 0-9 I am unsure what N is
<lopex> CR_N is quite long
<enebo> yeah I see No and Nl
<enebo> so for my statement above I did not mean N but Nd
<lopex> well there's \p{ascii} too
<enebo> lopex: well even better point :)
<enebo> lopex: so that is UTF-8 in joni
<lopex> 0x0000, 0x007f,
Puffball has quit [Remote host closed the connection]
Puffball has joined #jruby
sidx64 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<lopex> enebo: maybe even put that warnings in regexp class ?
<enebo> lopex: well I don't care I guess
<lopex> to not pollute the runtime
<enebo> lopex: I do not love inner class defs too much but this is so limited in scope it makes sense to me
claudiuinberlin has quit [Quit: Textual IRC Client: www.textualapp.com]
<lopex> enebo: well it could even implement the warn calback :P
<lopex> so many moral questions
<enebo> lopex: yeah I would not go there since people will see it as some public method on regexp
<enebo> lopex: we do not really want people writing new regexp methods using that for new warns
<enebo> lopex: the less visible it is probably the better
<lopex> enebo: I dont know how to put it
<lopex> enebo: but it's yet something else
<lopex> enebo: seems like a parser thing
<lopex> enebo: for some reason there's verbose == true for some time
rrutkowski has joined #jruby
rrutkowski has quit [Client Quit]
rrutkowski has joined #jruby
rrutkowski has quit [Quit: rrutkowski]
rrutkowski has joined #jruby
<headius> good morning
<nirvdrum> What part of the world are you in now?
<headius> at home...with a bit of a cold today though
<lopex> verbose is false and not nil
<lopex> so warningsEnabled is true for some time during init
<headius> hmm
<headius> this is used for the non-verbose warnings too
<lopex> so this would explain some things
<headius> so everything not nil turns those on
<headius> I wish a null Boolean were treated as false rather than NPE
rrutkowski has quit [Quit: rrutkowski]
<lopex> but I should obey -w
<lopex> so where's the difference
<headius> well -w and -v turn on verbose mode
<headius> are you doing something with warnings?
<lopex> oh, so there's the confusion
<lopex> and there's warning(String message) and warn(String message)
<lopex> this is embarrassing
<lopex> enebo: ^^
mkristian has quit [Quit: This computer has gone to sleep]
<GitHub157> [jruby] lopex pushed 1 new commit to master: https://git.io/vA0v1
<GitHub157> jruby/master d20b9f7 Marcin Mielzynski: fix regexp warnings
<lopex> this was the most deceptive thing in a loong while
mkristian has joined #jruby
mkristian has quit [Client Quit]
<headius> yeah warning is the only-in-verbose-mode one
<headius> decisions made long before I joined the project :-)
<GitHub82> [jruby] lopex pushed 1 new commit to master: https://git.io/vA0vd
<GitHub82> jruby/master d78ae0f Marcin Mielzynski: disable warnings in Regexp#to_s
<lopex> headius: but there's another warn method
<lopex> which matches joni
<headius> ahh
<lopex> and it doesnt obey verbose
<lopex> :P
<headius> oops :-)
<lopex> headius: but mri also is nonsensical
<lopex> headius: ruby -w -e "/\X/u"
<lopex> this should be silent really
<lopex> it indeed collide internally but not due to user
<enebo> lopex: is it ready! :)
<lopex> it is
<enebo> lopex: rock star ninja
<lopex> embarrasssing
<enebo> lopex: well only if we released without noticing but you have to admit that code is confusing
<lopex> it is indeed
<enebo> or perhaps I should say inconsistent enough to be confusing
<lopex> enebo: plus mri
<lopex> so it's confusion squared
<enebo> well I mostly mean onigmo+mri deciding what to warn on or not
<enebo> I do agree that a warning on duplications for \X would be really weird and I am happy we don't now :)
<lopex> \X has huge path for unicode only
<lopex> which duplicates ranges
<lopex> well overlaps
<lopex> so duplicates
<lopex> enebo: on versbose we do :P
<lopex> as mri
<lopex> headius: and mri alters verbosity internally in two places
<headius> oh yeah?
<lopex> yep
<lopex> in encoding loads and Regexp#to_s
<enebo> headius: that code in to_s is hilariously scary from our perspective
<enebo> headius: since it is C toggle of global state on/off
<enebo> kares: Do you think your refactorings of invokers could have caused the nokogiri compliation errors?
<enebo> ok new 'release' push for sonatype...we will see if it is still dog slow
<lopex> enebo: we can release joni/jcodings too
<enebo> lopex: do we need to? I am pushing release bits to sonatype now
<enebo> lopex: I should say what changed
<lopex> enebo: there are even more fixes
<enebo> lopex: like the range one I reported the other day?
<lopex> that too
<lopex> enebo: and things not covered by mri tests
subbu is now known as subbu|lunch
<enebo> lopex: casemap fixes in jcodings
<enebo> lopex: ruby 2.3 use those?
<lopex> enebo: not used yet
<enebo> ok so only jcodings fix is my EUC-JP oddity for chr
<enebo> and some private fields
<enebo> ok but a ton of changes on joni
<enebo> lopex: Would you say current release of joni is ok for 9.1.16.0?
<enebo> lopex: your changes for single byte opts and so forth are great but we have not been using this in jruby-9.1 branch at all yet
<enebo> lopex: I am a little concerned about risk of pushing this out and releasing with it
<lopex> enebo: not enabled in jruby yet
<enebo> lopex: so what is enabled in joni which a 9.1.16.0 would use?
<enebo> new changes/fixes that is
<lopex> yeah, only fixes
<lopex> better errors
<enebo> important fixes?
<GitHub196> [jruby] headius pushed 1 new commit to master: https://git.io/vA0LL
<GitHub196> jruby/master 065cf78 Charles Oliver Nutter: Do not generate invokers for Ruby 1.8 mode anymore....
<headius> enebo: fixed
<headius> I assume
<lopex> enebo: one for look behinds
<enebo> headius: cool. I can try locally too since I was just running nokogiri recently if you did not make it past that rex thing
<enebo> lopex: so you don't think it will be very risky to use a brand new joni for 9.1.16.0 then?
<headius> enebo: might be my jruby env is screwed up...it was installing gems without proper shebang too
<lopex> enebo: most is better handling of syntax errors
<enebo> lopex: do you know if any of these fixes are marked against a 9.1.16.0 fixed issue?
<lopex> enebo: none
<enebo> lopex: at this point I am inclined to punt this to 9.1.17.0 and 9.2.0.0
<lopex> no problem
<enebo> lopex: ok
lanceball has quit [Remote host closed the connection]
<enebo> I like to see dependent libs sit on as nightlies and part of our CI before releasing them with JRuby itself
<headius> yeah that's great
<headius> 9.1.16.0 is already pretty recent on joni though isn't it?
<enebo> yeah jan 25 or so
<enebo> looks like most of the recent activity is on new features with a few fixes
<enebo> but the commit lopex linked above made this feel a little more scary :)
<lopex> yeah, mostly fixes for onigmo tests
<lopex> enebo: it's a fix with tests :P
<headius> two new flags but if they're not used they shouldn't fire
<enebo> lopex: yeah I know if fixes those tests but not what else it does
<headius> i wouldn't do it day before release anyway
<enebo> headius: yeah the new stuff is fine since it is not used
<headius> right
<enebo> new engine changes to fix look behind regexps somehow worry me :)
<lopex> look behind is always scary
<GitHub151> [jruby] headius closed issue #4889: jruby 9.1.15 fails with NameError: cannot load Java class jline.console.ConsoleReader https://git.io/vb83h
claudiuinberlin has joined #jruby
lanceball has joined #jruby
<enebo> lopex: so I run this runner script which invokes subprocesses to build a rails app
<enebo> lopex: when at the end I hit C-v then C-c and a warning pops up when the process dies showing that case duplicated range warning
<enebo> So I think we still have some extra reporting somewhere?
lanceball has quit [Changing host]
lanceball has joined #jruby
<lopex> enebo: none I can think of
<lopex> enebo: does the verbosity can change anyhow ?
<lopex> er, s/can//
<enebo> I don't know
<enebo> lopex: I guess is there another expansion which maybe should be utf-8 as well?
<enebo> I just tried on windows and I want to see this on linux as well
<lopex> enebo: you mean shouldnt ?
<enebo> lopex: I thought we did not warn if we made something utf-8
<enebo> all \X was changed to be utf-8 and the warnign went away right?
<lopex> enebo: the opposite
<enebo> oh \X should not be utf-8
<enebo> I am in a ruby process launching rails server and then hitting non-visible characters
<enebo> ^C ^V
<enebo> so I half wonder if there is some regexp in a loop in there..
<lopex> hmm
<lopex> quoting ?
<enebo> lopex: do you know of easy way to dump all regexps getting processed
<lopex> enebo: caache keys ?
<enebo> I don't know...it would get before processing each time it used it?
<lopex> enebo: makeRegexp is central
<enebo> lopex: but is that called every time a regexp is used?
<lopex> enebo: there's some regexp in RubyNumeric
<lopex> er util/Numeric
<rtyler> headius: FYI, I haven't forgot about your request for endless build capacity, it's still on my whiteboard but ran out of waking minutes last weekend for fun hacking :/
<lopex> enebo: well actually we should display the regexp in question in the warnings
<enebo> lopex: I agree does MRI?
<lopex> yes
<enebo> hahah ok yeah that would be useful
<lopex> but it should be on runtime side
<enebo> lopex: so what I know at this point is that puma says hit Ctrl-C to quit
<enebo> If I hit Ctrl-V I see the warning message (but only after I actually hit Ctrl-C)
<enebo> that no doubt is just some flushing issue
<lopex> yeah
<lopex> no idea
<enebo> This is on windows so maybe this is us doing some pure Ruby and using a regexp
<enebo> headius: ^ jog anything
<lopex> enebo: all ruby regexp warnings got through Ruby.warning
<lopex> which checks against verbose
<lopex> does anything spin new runtimes ?
<headius> enebo: no
<enebo> lopex: yeah...my script spins new runtimes
<enebo> but it won't be inproc
<enebo> so maybe not :) It runs more than one JVM but through Kernel#system
<enebo> I am close to rage quitting the release today
<enebo> we could spin special joni release which ignores this warning to move past it
<enebo> but of course we still need to figure it out at some point
<lopex> enebo: or just use none warnings anyways
<lopex> this way we can check if external users trigger that
<enebo> lopex: well since it is a new class we could just match and just not display that particular warning too :)
<lopex> new class ?
<enebo> for the warning type
<enebo> the new joni callback class for warn()
<lopex> I thought it's pre joni release
<enebo> dude you just made the fix
<lopex> enebo: 16 Jan
<enebo> I mean the jruby new class which impls the warn method
<enebo> we can have that noop if it is the duplicated character class warning
<lopex> can you just switch off the warnings in makeRegexp ?
<enebo> then we would hack around it but not need to make a special release
<enebo> lopex: but is turning off all warnings acceptable?
<lopex> just to make sure external users dont trigger that
<lopex> just for test
<enebo> lopex: because you think joni may be issuing that warning through the old code path?
<lopex> no
<enebo> lopex: as a test I predict that will get rid of that warning then
<lopex> because this way we eliminate ruby regexps to make sure
<enebo> there is no string matching that warning in jruby source
<enebo> I find it impossible to think a ruby gem has it either
<enebo> It is just such a specific string
<enebo> so theory for me is that sub-invokes of a new JVM running JRuby toggles warn on somehow
<enebo> Or we have some other regexp which is issuing this warning errantly
<headius> enebo: I found why 9.1 works I think
<enebo> I don't really see any other scenario and the first scenario is weird to me since we would be back at square one from yesterday
<enebo> since I doubt MRI does this
<headius> the logic for "clumping" methods in 9.1 does consider compat version and binds only newest
<enebo> although I guess I don't know
<enebo> only newest!
<enebo> ok interesting
<enebo> makes sense too
<enebo> so generating a 1.8 binding makes no sense
<enebo> err compat on a ruby which has no 1.8
<enebo> I don't know how precompiling works though
<headius> I modified the clumper to skip those results which fixes it on master and makes the existing compat checking on 9.1 redundant
<headius> so 9.1 probably doesn't really need the patch
<enebo> can you precompile your ext and have 1.7 bindings made from 9.1? Related question is do we care
<headius> no
<enebo> leaving it as is my vote in any case
<headius> you could never generate both 1.8 and 1.9 at the same time either
<enebo> I guess it does not matter though. Nothing can use them so it is wasted work I guess
<enebo> but I mean leave as-is for .16
<headius> yeah ok
<headius> I agree now that I know why 9.1 works
<enebo> ok
<enebo> shoot if .16 was one week away I would say full steam to joni/jcodings and we should get better warn in place to debug this issue easier
<enebo> as it is I feel like just adding a string compare against that single warning message and ignoring it since it is such a benign warning
<enebo> needing to know you have more than one char in a set of matches will not affect correctness nor performance
subbu|lunch is now known as subbu
<enebo> so perhaps we should punt on figuring out this duplicated char with a message match hack, then add proper message to joni to warn on which regexp is broke, the unhack for .17
<enebo> As ugly as message match is the utility of the actual warning is so little it just seems simplest way to move past this for now
<enebo> any thoughts?
<GitHub160> [jruby] lopex pushed 1 new commit to master: https://git.io/vA0nb
<GitHub160> jruby/master 7171a22 Marcin Mielzynski: disable warnings for internal patterns
<lopex> I dont think it will help though
<lopex> enebo: I guess we missunderstood each other again
<lopex> enebo: I meant that non ruby core regexp might trigger that warning
<lopex> enebo: since joni defaults to System.err
<enebo> lopex: yeah this was not what I meant at all
<enebo> lopex: I meant string matching on warncallback which does print out regexps
<enebo> lopex: and not allowing ANY regexp which triggers this to give warning for that particular warning
<enebo> lopex: but only as a hack until we see which regexp is causing this
<enebo> lopex: then determining whether it is a problem with joni OR someone is using a regexp which should be giving that warning
<enebo> I suspect we just have a bug though
<lopex> but where ?
<enebo> who knows
<enebo> lopex: without see which regexp it is hard
<enebo> lopex: so far my repro is a bit huge to figure that out
<enebo> lopex: can you add the regexp to the warning string like MRI in joni
sidx64 has joined #jruby
<enebo> lopex: also I only cherry-picked one of your two commits. I should have looked more closely
<enebo> lopex: I am going to rebuild and see if I still see this issue
claudiuinberlin has quit [Quit: Textual IRC Client: www.textualapp.com]
mistergibson has joined #jruby
sidx64 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
drbobbeaty has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bbrowning is now known as bbrowning_away
<GitHub83> [jruby] headius closed pull request #5040: Update lib/ruby/stdlib/csv.rb to 2.5 (master...update_csv_to_2.5) https://git.io/vAOLD
<GitHub5> [jruby] headius pushed 2 new commits to ruby-2.5: https://git.io/vA0XV
<GitHub5> jruby/ruby-2.5 d601685 Charles Oliver Nutter: Add minimal RbConfig::LIMITS to boot CRuby tests....
<GitHub5> jruby/ruby-2.5 14a2aca Charles Oliver Nutter: Update tests from MRI 2.5.0....
<GitHub92> [jruby] headius closed pull request #5055: [ruby-2.5] Implement String#delete_suffix (ruby-2.5...ruby25/delete_suffix) https://git.io/vABfI
<GitHub46> [jruby] headius pushed 4 new commits to ruby-2.5: https://git.io/vA0XN
<GitHub46> jruby/ruby-2.5 7d50a30 Charles Oliver Nutter: Merge branch 'ruby-2.5' into ruby25/delete_suffix
<GitHub46> jruby/ruby-2.5 21be6f2 Christian Bruckmayer: Implement tests for String#delete_suffix...
<GitHub46> jruby/ruby-2.5 32abf40 Christian Bruckmayer: Implement String#delete_suffix & String#delete_suffix!...