02:31
lopex has quit [Quit: Connection closed for inactivity]
05:57
mkristian has joined #jruby
08:46
lopex has joined #jruby
08:49
claudiuinberlin has joined #jruby
09:49
shellac has joined #jruby
09:55
drbobbeaty has joined #jruby
10:15
<
kares >
enebo: think I nailed down why (arg1), (arg1, arg2) method root-ing isn't working properly
10:15
<
kares >
its an edge case but we've hit it previously with AR-JDBC and simply ignored it - so this is the second time
10:16
<
kares >
reproducable from the following case, suppose I have 4 methods: (arg1), (arg1, arg2), (arg1, arg2, arg3) and (arg[])
10:16
<
kares >
interpreter properly handles (arg1) and (1, 2) but not (1, 2, 3) - it will always route through (arg[])
10:17
<
kares >
this has been working in 1.7 I believe the IR interpreter needs a ThreeOperandArg instr
10:17
<
kares >
is there any reason why it was left-out?
10:20
<
kares >
guess the 3 args cases supported in native methods always goes through allocating an IRubyObject[]
10:29
drbobbeaty has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
11:42
ebarrett has joined #jruby
12:19
drbobbeaty has joined #jruby
13:04
rdubya1 has quit [Quit: Leaving.]
13:04
rdubya has joined #jruby
13:26
mkristian has quit [Quit: This computer has gone to sleep]
13:52
Puffball has joined #jruby
14:01
mila has joined #jruby
14:02
<
mila >
what does JRUBY_OPTS='--1.9' or JRUBY_OPTS='--2.0' do?
14:09
Puffball has quit [Quit: Puffball]
14:11
Puffball has joined #jruby
14:48
<
nirvdrum >
mila: Those are old options from JRuby 1.7.x that allow changing out the Ruby compatibility level.
14:48
<
nirvdrum >
They don't do anything with JRuby 9.x.
14:48
<
nirvdrum >
Since 9.x only supports a single version of the Ruby runtime.
15:01
mkristian has joined #jruby
16:02
xardion has quit [Remote host closed the connection]
16:08
xardion has joined #jruby
16:18
<
enebo >
lopex: hey 'character class has duplicated range' you know where a message like that comes from?
16:18
<
lopex >
enebo: yeah
16:19
<
enebo >
lopex: Saw like 6 of them running some basic rails testing on windows
16:19
<
lopex >
enebo: we need the warn callback to be more -w aware
16:20
<
enebo >
lopex: neither of the commands I saw those for were with -w nor -v enabled
16:20
<
lopex >
enebo: I know
16:20
<
enebo >
lopex: maybe MRI does the same thing?
16:20
<
lopex >
enebo: you see two part of that condition ?
16:21
<
lopex >
onig_warn == onig_null_warn || !RTEST(ruby_verbose)
16:21
<
enebo >
I love how !RTEST is true in their C
16:21
<
enebo >
I get it too but it always messes my head up when I see it
16:22
<
enebo >
oh wait I am misreading even this :)
16:23
<
lopex >
enebo: there's onig_set_warn_func(re_warn); in re.c
16:23
<
lopex >
maybe we miss that ?
16:23
<
enebo >
I don't know
16:23
<
lopex >
actually it's more complex
16:23
<
enebo >
I think this if is weird
16:24
<
lopex >
for example \X will always have duplicated range (due to the data they use)
16:24
<
lopex >
so we need to silence that
16:24
<
lopex >
it's all weird
16:24
<
enebo >
lopex: so do you think you can repro this...I don't actually know why it is happening
16:24
<
lopex >
enebo: we have two cases
16:25
<
lopex >
enebo: one is ruby -W2 -e '/[aa]/
16:25
<
lopex >
enebo: another is ruby -W2 -e '/\X/'
16:26
<
lopex >
the second one needs to be silences
16:27
<
enebo >
yeah this is a blocker for 9.1.16.0 now since we will get this reported immediately
16:27
<
enebo >
and sonatype is mega mega mega slow today
16:28
<
enebo >
took like 1.5 hours to upload to staging (and a close on repo has been going for like an hour now)
16:28
<
enebo >
jruby -e '"A" =~ /\X/'
16:28
<
enebo >
I just did this to see difference
16:29
<
enebo >
if you omit the string for the regexp is just warns on no result and not the mismatched char type
16:29
<
lopex >
and not during parse since Regexp.new("\\X") is silent on mri too
16:31
<
lopex >
why jruby -e "/\X/" is silent ?
16:31
<
lopex >
and [aa] is not ?
16:31
<
lopex >
now I'm confused
16:32
<
enebo >
mri23 -e '"A" =~ /[aa]/'
16:32
<
enebo >
this is silent
16:32
<
enebo >
-W2 changes it for [aa]
16:32
<
enebo >
but not for \X
16:33
<
enebo >
with or without -W2 MRI will not warn on \X
16:33
<
enebo >
[aa] sort of makes sense it would
16:33
<
lopex >
\X internally duplicates too
16:34
<
enebo >
lopex: ah so maybe internal duplication is not warned
16:34
<
enebo >
lopex: since the programmer did not actually do it
16:34
<
lopex >
and I am condused how
16:34
<
lopex >
let me reproduce that intenal on onigmo again
16:43
<
enebo >
lopex: holy crap
16:43
<
lopex >
no it's to_s
16:43
<
enebo >
lopex: if that is it then that scares the crap out of me :)
16:44
<
enebo >
rando global symbol toggles :)
16:44
<
lopex >
but it's to_s so it's not our case
16:44
<
enebo >
If they do that somewhere else (since they do it here) then we may need something a bit more sophisticated than just porting logic
16:44
<
lopex >
enebo: and same thing for encoding loading
16:45
<
lopex >
enebo: just grep for ruby_verbose =
16:45
<
lopex >
enebo: CC_DUP_WARN is called 18 times for \X in onigmo
16:46
<
enebo >
afk a few minutes...brb
16:46
<
lopex >
enebo: it must be if (onig_warn == onig_null_warn || !RTEST(ruby_verbose)) return ; then
16:48
<
lopex >
enebo: and they default to rb_warn("%s", s);
16:48
<
lopex >
but I still dont get itt
17:08
mkristian has quit [Quit: This computer has gone to sleep]
17:09
mkristian has joined #jruby
17:09
mkristian has quit [Client Quit]
17:13
<
enebo >
lopex: so I have two comments
17:14
<
enebo >
lopex: we can see this warning happen and we can make changes to our code to not display in the cases we can observe. If they are doing stuff like to_s we probably have to do it a different way.
17:15
<
enebo >
lopex: unfortunately, just fixing the observable cases we know about might not be enough to know if we fixed the problem completely
17:15
<
lopex >
enebo: no no, I said they do use verbose in to_s but it's not our case
17:16
<
enebo >
lopex: I know. I am just saying if they do that in one place they may do it in others
17:16
<
lopex >
enebo: I searched the code
17:16
<
lopex >
only two places except setting options
17:16
<
enebo >
lopex: so it was only one place then and not our case
17:37
<
lopex >
well, that's just a trail
17:37
<
lopex >
and it's already insane
17:38
<
enebo >
does pattern warning call this method?
17:38
<
lopex >
but it still doesnt explain the difference between [aa] and \X
17:38
<
lopex >
onig_syntax_warn ?
17:38
<
enebo >
I looked at where ccDuplicateWarn is called I don't see how [aa] and \X could be differentiated
17:39
<
enebo >
I mean the places where it calls it \X must have already been duplicated
17:40
<
lopex >
enebo: it's the only place for me
17:40
<
lopex >
but afaik I've already checked that
17:40
<
lopex >
and it is a difference
17:40
<
lopex >
since [aa] uses bitset
17:40
<
lopex >
and \X uses code range
17:41
<
lopex >
and there's two warning paths for them
17:41
<
enebo >
lopex: ok so if from this place where \X is processed we can suppress the warning we might be ok
17:42
<
enebo >
which cannot be a static field or n threads might get confused but we probably need some out of band field that our warn method can look at to ignore if the field is set
17:43
<
enebo >
(OR pass something down the callstack as method params)
17:43
<
enebo >
lopex: so is our equivalent code anything in CodeRangeBuffer?
17:44
<
lopex >
enebo: and CClassNode
17:44
<
lopex >
enebo: but I'm still confused since onigmo calls that dup check function
17:45
<
enebo >
lopex: you're confused because MRI never warns for that case
17:46
<
enebo >
lopex: so why have C call some warn function?
17:46
<
enebo >
I have to say if we cannot figure this out easily I think our workaround is to disable this warning altogether
17:46
<
enebo >
I do not think it is likely to be an important warning
17:47
<
enebo >
but with that said it would be nice to give the warning at the same time MRI does
17:47
shellac has quit [Quit: Leaving]
17:47
<
enebo >
[aa] does just work anyways...it is not invalid
18:23
claudiuinberlin has joined #jruby
18:26
<
GitHub80 >
[jruby] ChrisBr opened pull request #5055: [ruby-2.5] Implement String#delete_suffix (ruby-2.5...ruby25/delete_suffix)
https://git.io/vABfI
18:42
<
enebo >
ChrisBr: I think you can RubyString prefix = arg.convertToString() and get rid of a few lines
18:44
<
enebo >
ChrisBr: I think if you get rid of those three lines the DRY shared version is not as compelling
18:44
<
enebo >
or merge the three lines into a single one
18:50
<
enebo >
Are those semantics right though? If the entire string is the suffix it returns itself?
18:50
<
enebo >
I half expected at least a dup()
18:50
<
enebo >
heh I did prefix but same question
19:25
rubierer has joined #jruby
19:25
rubierer has left #jruby [#jruby]
20:07
<
enebo >
ChrisBr: mri25 -e 'p "aaa".delete_prefix("aaa")' -> ""
20:22
<
enebo >
lopex: do you think onig_null_warn == onig_warn?
20:23
<
enebo >
but I guess we do see MRI warn sometimes though
20:27
<
enebo >
lopex: I am super confused as well. I don't see how this works in MRI at all
20:28
<
lopex >
enebo: welcome
20:28
<
lopex >
to the club
20:29
<
lopex >
but yeah onig_null_warn == onig_warn
20:29
<
lopex >
since DEFAULT_WARN_FUNCTION is undefined
20:30
<
lopex >
er, onig_set_warn_func(re_warn);in re.c
20:30
<
enebo >
yeah so ruby sets that
20:30
<
enebo >
but where is re_warn?
20:30
<
lopex >
in ruby.c ?
20:30
<
enebo >
Could it be onig_null_warn?
20:30
<
lopex >
onig_set_verb_warn_func(re_warn); too
20:31
<
lopex >
onig_verb_warn doesnt seem to be used at all though
20:31
<
lopex >
enebo: actually no. it's set in re.c
20:31
<
enebo >
oh it is func
20:32
<
lopex >
er, it's in error.c
20:33
<
lopex >
enebo: it all begins with add_ctype_to_cc
20:34
<
lopex >
then its' add_ctype_to_cc_by_range
20:34
<
lopex >
then add_code_range_to_buf
20:34
<
lopex >
which does return add_code_range_to_buf0(pbuf, env, from, to, 1);
20:35
<
lopex >
1 is for true
20:35
<
enebo >
co checkdup as 1 is because if you are in verbose it should print out
20:35
<
enebo >
so that field should be 1 or true
20:35
<
enebo >
but something else is making it not happen
20:36
<
enebo >
as you say MRI has this extra conditional we do not
20:36
<
lopex >
but checkdup seems to be 1
20:36
<
enebo >
but I don't see how onig_warn could be conditionally set
20:36
<
enebo >
lopex: yeah I am just saying it has to be 1
20:36
<
enebo >
lopex: otherwise -W2 -v or whatever would never print out
20:36
<
enebo >
lopex: and it should if that is set
20:37
<
enebo >
lopex: so checkdup is not worth looking at more
20:37
<
enebo >
lopex: it has to be 1
20:37
<
enebo >
(or true for us)
20:39
<
lopex >
and BITSET_SET_BIT_CHKDUP does basically same thing
20:40
<
lopex >
enebo: and even if there's difference why /[\p{Han}\p{Han}]/ triggers the warning
20:41
<
enebo >
should that not trigger it?
20:41
<
enebo >
Isn't that just [aa] more or less?
20:41
<
enebo >
It doesn't?
20:42
<
lopex >
but it's the same path \X does
20:42
<
lopex >
and \X doesnt
20:42
<
enebo >
oh I see it is a coderange path
20:42
<
enebo >
haha so two things using C coderange path has different behavior
20:42
<
enebo >
That is really weird
20:43
<
lopex >
enebo: did you look at node_extended_grapheme_cluster ?
20:43
<
lopex >
it's a series of add_ctype_to_cc
20:43
<
lopex >
so maybe there's some difference in char class parser
20:44
Antiarc_ has joined #jruby
20:46
Antiarc_ has quit [Client Quit]
20:47
Antiarc has quit [Remote host closed the connection]
20:47
Antiarc has joined #jruby
20:51
Antiarc has quit [Client Quit]
20:51
Antiarc has joined #jruby
20:53
Antiarc has quit [Client Quit]
20:53
Antiarc has joined #jruby
20:54
Antiarc has quit [Client Quit]
20:56
Antiarc has joined #jruby
20:56
Antiarc has quit [Remote host closed the connection]
20:57
Antiarc has joined #jruby
20:58
<
ChrisBr >
enebo: thank you! You're right, if getting rid of the first three lines, it does not look that compelling to dry it
20:59
<
ChrisBr >
and btw: you're right, you found a bug as well
21:00
<
ChrisBr >
the empty check was initially to not return broken multibyte strings but is a bug if suffix == whole string
22:17
bbrowning is now known as bbrowning_away
22:17
drbobbeaty has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]