phrinx has quit [Remote host closed the connection]
phrinx has joined #jruby
<chrisseaton>
locks: are you using 9k?
phrinx has quit [Ping timeout: 246 seconds]
<locks>
chrisseaton: jruby-head
<chrisseaton>
locks: I wouldn't advise that at the moment - head of the master branch is going to be very unstable for a couple of months
<locks>
oh
<locks>
I guess I'll put it in the allow failure matrix
<locks>
I'm also testing against jruby-19mode
<chrisseaton>
but thanks for testing! headius might be interested in this IR failure as it looks like it might be in the interpreter, which shouldn't be the case
<projectodd-ci>
* eregontp: [Truffle] Add the possibility to make singleton methods.
<projectodd-ci>
* eregontp: [Truffle] Use our shiny new singleton methods.
<projectodd-ci>
* eregontp: [Truffle] It is IO.open, not File.open (RDoc misleading).
<projectodd-ci>
* eregontp: [Truffle] Kernel#respong_to_missing? is private.
<projectodd-ci>
* eregontp: [Truffle] Remove a couple inexistant methods.
<projectodd-ci>
* eregontp: [Truffle] Add the GC module.
<projectodd-ci>
* eregontp: [Truffle] Just use inheritance for static delegation, it is much simpler.
<projectodd-ci>
* eregontp: [Truffle] Rename RubyMethod.withNewVisibility to just withVisibility.
<projectodd-ci>
* eregontp: [Truffle] #initialize and #method_missing should be private.
<projectodd-ci>
* chris: [Truffle] TruffleCompilerExceptionsAreThrown doesn't seem to quite work - workaround.
<projectodd-ci>
* chris: [Truffle] Restructure the PE tests.
<projectodd-ci>
* tom.enebo: Add new fake instr to hold intperpreter state. This instr is destined to only be instr 0 of the linearized instr list used only by the interpreter. It removes all remaining IRScope state knowledge from interpreter (not currently hooked up).
<projectodd-ci>
* tom.enebo: Boo. nested closures need unmolested parent scopes based on passes which may replace parent variables with temp vars. We cannot use this simpler approach and will end up going the original full-clone route. Commented out cloning in prepareInstructions
<projectodd-ci>
* chris: [Truffle] Found an unexploded loop on the fastest part of the fast path!
<projectodd-ci>
* eregontp: [Truffle] Fix special visibility for accessors on self
<projectodd-ci>
* sss.lists: Minor interp tweak + removed dead imports.
<projectodd-ci>
* sss.lists: Turn off requireFrame opt for now since it is buggy in some scenarios
renderfu_ has quit [Remote host closed the connection]
anaeem___ has joined #jruby
anaeem1_ has quit [Ping timeout: 240 seconds]
renderful has joined #jruby
tylersmith has quit [Remote host closed the connection]
tylersmith has joined #jruby
renderful has quit [Ping timeout: 246 seconds]
<avsej>
headius, just to follow up yesterday question about exception traces, I was right, it was CompositeException from rxjava, it just packed my throwable into a list, so it was not visible
tlarevo has joined #jruby
tylersmith has quit [Ping timeout: 245 seconds]
johnsonch is now known as johnsonch_afk
tlarevo_ has joined #jruby
brettporter has joined #jruby
tlarevo has quit [Ping timeout: 272 seconds]
kares has joined #jruby
mpapis has quit [*.net *.split]
Jamo has quit [*.net *.split]
jeremyevans has quit [*.net *.split]
dabradley has quit [*.net *.split]
justinmcp_ has quit [*.net *.split]
mpapis has joined #jruby
jeremyevans has joined #jruby
Jamo has joined #jruby
dabradley has joined #jruby
justinmcp_ has joined #jruby
anaeem___ has quit [Remote host closed the connection]
anaeem1 has joined #jruby
anaeem1 has quit [Ping timeout: 255 seconds]
anaeem1 has joined #jruby
anaeem1__ has joined #jruby
josh-k_ has quit [Remote host closed the connection]
anaeem1 has quit [Ping timeout: 240 seconds]
JohnBat26 has joined #jruby
havenwood has quit [Remote host closed the connection]
<JRubyGithub>
[jruby] jrubyci pushed 1 new commit to master: http://git.io/1Zs9jQ
anaeem1 has joined #jruby
rsim has joined #jruby
pchalupa has joined #jruby
tenderlove has joined #jruby
tenderlove has quit [Ping timeout: 244 seconds]
rolfb has joined #jruby
yfeldblum has quit [Ping timeout: 272 seconds]
noop has joined #jruby
fridim_ has joined #jruby
dabradley has quit [Ping timeout: 244 seconds]
dumdedum has joined #jruby
dabradley has joined #jruby
mister_solo has joined #jruby
joast has quit [Ping timeout: 246 seconds]
brettporter has quit [Remote host closed the connection]
brettporter has joined #jruby
brettporter has quit [Read error: Connection reset by peer]
brettporter has joined #jruby
brettporter has quit [Changing host]
brettporter has joined #jruby
yfeldblum has joined #jruby
tenderlove has joined #jruby
tenderlove has quit [Ping timeout: 260 seconds]
vtunka has joined #jruby
multibot__ has joined #jruby
multibot_ has quit [Ping timeout: 245 seconds]
shellac has joined #jruby
marr has joined #jruby
drbobbeaty has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
drbobbeaty has joined #jruby
drbobbeaty has quit [Client Quit]
postmodern has quit [Quit: Leaving]
yfeldblum has quit [Remote host closed the connection]
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] mkristian force-pushed uniform-jruby-home from 8ad4396 to ddc1b06: http://git.io/ScsKNw
<JRubyGithub>
jruby/uniform-jruby-home 1f2b2b5 Christian Meier: run tests/jruby.index with jruby-complete
<JRubyGithub>
jruby/uniform-jruby-home a52e331 Christian Meier: uniform setting path to jruby home - no detection just use the one from the classloader
<JRubyGithub>
jruby/uniform-jruby-home ddc1b06 Christian Meier: warn when jruby home is not set to one of the tested cases
JRubyGithub has left #jruby [#jruby]
josh-k has quit [Remote host closed the connection]
josh-k has joined #jruby
josh-k has quit [Ping timeout: 255 seconds]
nirvdrum_ has joined #jruby
yfeldblum has joined #jruby
jmimi has joined #jruby
yfeldblu_ has joined #jruby
yfeldblum has quit [Ping timeout: 240 seconds]
nirvdrum_ has quit [Ping timeout: 240 seconds]
yfeldblu_ has quit [Ping timeout: 260 seconds]
yfeldblum has joined #jruby
anaeem1 has quit [Remote host closed the connection]
anaeem1 has joined #jruby
ludyte has quit [Quit: ludyte]
Guest62544 has joined #jruby
jrhe_ has quit [Quit: Connection closed for inactivity]
logs has joined #jruby
* logs
is logging
elia has joined #jruby
elia has quit [Quit: Computer has gone to sleep.]
fntzr has joined #jruby
fntzr has quit [Client Quit]
drbobbeaty has joined #jruby
yfeldblum has quit [Remote host closed the connection]
yfeldblum has joined #jruby
e_dub has quit [Read error: Connection reset by peer]
e_dub has joined #jruby
yfeldblum has quit [Ping timeout: 272 seconds]
obs has joined #jruby
renderful has joined #jruby
iamjarvo has joined #jruby
<avsej>
i have issues when idea does not pick jruby sources even if they are configured
<avsej>
is it known issue?
vtunka has quit [Quit: Leaving]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
elia has joined #jruby
iamjarvo has joined #jruby
pchalupa has quit [Quit: Computer has gone to sleep.]
renderful has quit [Ping timeout: 240 seconds]
shellac has quit [Quit: Computer has gone to sleep.]
yfeldblum has joined #jruby
josh-k has joined #jruby
yfeldblum has quit [Ping timeout: 255 seconds]
josh-k has quit [Ping timeout: 260 seconds]
josh-k has joined #jruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
brettporter has quit [Remote host closed the connection]
brettporter has joined #jruby
brettporter has quit [Remote host closed the connection]
brettporter has joined #jruby
josh-k has quit [Remote host closed the connection]
vtunka has joined #jruby
pchalupa has joined #jruby
nirvdrum_ has joined #jruby
brettporter has quit [Remote host closed the connection]
Guest62544 has quit [Ping timeout: 250 seconds]
brettporter has joined #jruby
josh-k has joined #jruby
brettporter has quit [Remote host closed the connection]
johnmuhl has joined #jruby
yfeldblum has joined #jruby
josh-k has quit [Remote host closed the connection]
josh-k has joined #jruby
iamjarvo has joined #jruby
tenderlove has joined #jruby
bbrowning_away is now known as bbrowning
yfeldblum has quit [Ping timeout: 260 seconds]
josh-k has quit [Ping timeout: 258 seconds]
tenderlove has quit [Ping timeout: 255 seconds]
josh-k has joined #jruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tcrawley-away is now known as tcrawley
joast has joined #jruby
vtunka has quit [Quit: Leaving]
anaeem___ has joined #jruby
joast has quit [Client Quit]
anaeem1 has quit [Ping timeout: 244 seconds]
<headius>
rtyler: there are but I know we could use more
<headius>
avsej: sources?
nirvdrum_ is now known as nirvdrum
<avsej>
i meant *-sources.jar
<headius>
locks: that failure should be reported as a bug, if you haven't already
<headius>
please just go ahead and file anything that fails against jruby-head and add 9000_feedback tag
<headius>
avsej: Oh, huh...I don't know why that would be. The maven stuff we use to push requires sources, so I know they're there
<avsej>
only jruby cannot resolve sources, for example asm.jar sources attached successfully
<headius>
chrisseaton: those pom changes are in truffle-specific bits, yeah?
<headius>
I am not looking at them in context at the moment
<chrisseaton>
headius: yeah - just showing that it does what I need. I can also tag those specs in some way for JRuby proper, but didn't do that yet
<headius>
right, no problem
<chrisseaton>
do you get what I'm going on about with wanting 100% of RubySpec - even if we're not sure it's all the best way?
<headius>
I think we're on the same page with this then
<headius>
well, given that MRI doesn't pass 100% of RubySpec, I don't see that as a goal...but yes, we've made small moves toward this over the years, like -X+O
<headius>
we are not as much in the "proving we can do it" business in JRuby proper, though, so we have taken the pragmatic approach and implement things people use
<headius>
a strict option that's 100x slower isn't useful
<chrisseaton>
yeah, when Truffle can Rails it won't be an issue, but until then there's no way to prove we're not just a toy implementation except RubySpec
<headius>
well, I mean to users
<headius>
it's obviously useful to us, and might in some cases enable someone to use JRuby that otherwise couldn't
<chrisseaton>
We're over 80% of RubySpec language now, so we're getting there
<headius>
chrisseaton: I don't see anything here that's a problem
<headius>
this is exactly what I thought you wanted
shellac has joined #jruby
josh-k has quit [Remote host closed the connection]
<headius>
chrisseaton: oh, one other thing
josh-k has joined #jruby
<headius>
I think it might be best to say "Compily strictly with MRI"
<headius>
until matz recognizes RubySpec as the standard to which all impls should be judged...that standard is still MRI
<headius>
for better or worse
<headius>
RubySpec also wouldn't mean anything to a user
<headius>
*shrugs*
<headius>
er
* headius
srugs
<headius>
forget it
<chrisseaton>
will do
johnsonch_afk is now known as johnsonch
josh-k has quit [Ping timeout: 240 seconds]
joast has joined #jruby
havenwood has joined #jruby
e_dub has quit [Quit: ZZZzzz…]
kares has quit [Ping timeout: 246 seconds]
vtunka has joined #jruby
pchalupa is now known as pchalupa-afk
Guest62544 has quit [Quit: Konversation terminated!]
kaawee has joined #jruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mje113__ has joined #jruby
iamjarvo has joined #jruby
JRubyGithub has joined #jruby
<JRubyGithub>
jruby/non-indy-jit b7f248b Charles Oliver Nutter: Merge remote-tracking branch 'origin/master' into non-indy-jit...
JRubyGithub has left #jruby [#jruby]
<JRubyGithub>
[jruby] jrubyci pushed 1 new commit to non-indy-jit: http://git.io/S0CVmw
<chrisseaton>
it would be nice if new MRI features automatically included new RubySpec specs by the actual feature authors
<brixen>
it would be nice if implementation authors include rubyspecs for the specs they write period
<brixen>
for the features they write, rather
<brixen>
but at this point, I no longer care
<brixen>
rubyspec is tremendously useful for rbx exactly because it describes MRI behavior
kaawee has quit [Ping timeout: 260 seconds]
<brixen>
go try to figure out how IO.popen works from the MRI tests
<brixen>
MRI devs aren't interested in helping define Ruby behavior
<chrisseaton>
I wrote tons of Truffle by reading the Ruby documentation rather than the source - that turned out to be a mistake as it's simply lies in a lot of places
<brixen>
anyway, my only point is, rubyspec merely describes MRI behavior
<brixen>
neither matz nor any other MRI dev can argue with something that merely describes the behavior
<brixen>
if they don't think it's the right behavior, they can go change it
<rtyler>
headius: got links to said tests, or issues filed already about improving them
<brixen>
and it is extremely useful for devs
<brixen>
unless you regularly work with devs (new and experienced) using Ruby, you have no idea what they struggle with
<headius>
brixen: I was just refering to your earlier statements that RubySpec was no longer based on MRI, or wouldn't be in the future
tlarevo_ has quit [Remote host closed the connection]
<headius>
I don't know how much -- if anything -- diverges significantly in RubySpec versus MRI, so this is mostly academic
<headius>
rtyler: I believe mkristian added them...they may only be smoke tests for the jruby-complete jar but it's a start
<enebo>
mberg: and scary at the same time…he has nearly crossed over to homeless man in the outfit
<nirvdrum>
mberg: Sounds like Team America.
bbrowning is now known as bbrowning_away
<mberg>
I really should get around to seeing that. It's on Netflix now.
<dfr|work>
morning.
<nirvdrum>
If you like their sort of humor, it's a fantastic movie.
<mberg>
My favorite Matt Stone / Trey Parker production is still Cannibal: The Musical.
<nirvdrum>
That's been on my backlog for a while.
<mberg>
It's better if you like musicals. It's surprisingly well-composed.
ludyte has joined #jruby
mister_solo has quit [Ping timeout: 245 seconds]
<headius>
Book of Mormon was here a few months ago, but I never had a chance to go
<subbu>
nirvdrum, can you test if anything changed on master for you? i dont expect, but you never know.
<headius>
enebo, subbu: hey, so where do we stand with TODOs from yesterday?
<headius>
I got my patch in to just "let it fail" wrt bytecode size, which got threshold=0 further
<enebo>
headius: I am nearly to point of testing my changes
iamjarvo has joined #jruby
<enebo>
headius: These changes should make all interpretation be independent of their IRScopes so JIT can mangle them without breaking interp
<enebo>
headius: subbu changed one thing yesterday we needed to change for closures always adding a GEBB
<subbu>
i also pushed my changes y'day that simplifies lambda/proc diffs.
<headius>
oh really?
<headius>
I have a failure that looked like an empty block tripping up JVM compile
<enebo>
headius: we were only doing it for lambdas but we cannot know is a closure is a lambda until first activation
<subbu>
by adding the try-catch for all blocks (as opposed to adding on-demand once we know that is a lambda)
ludyte has quit [Quit: ludyte]
<headius>
ahh yes, actually, it's a finally with nothing in it, so stack isn't dealt with and it blows up
<headius>
ahhh right ok
<enebo>
headius: so now all are adding it. Perhaps it can be optimized later
<headius>
I have merged that, I should try this case again
<headius>
*shrugs* uncaught exception handler should be nearly free
<headius>
oh, but they all need to catch and check lambda?
<enebo>
headius: only if an exception is thrown I think
<headius>
ok
<subbu>
yes, only if there is an exception that gets thrown (break/return/ other java/ruby exceptions)
yfeldblum has joined #jruby
<enebo>
subbu, headius: Since this will be known in JIT scenario we can probably make a pass to remove it from procs
fridim_ has quit [Ping timeout: 258 seconds]
<enebo>
we just don’t know during interp since it has never been called…I guess perhaps that might not be possible at threshold=0 or AOT but we don’t support AOT so that is probably a different kettle of fish
zeroecco has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<headius>
enebo: the lambda state of a closure can't change again at runtime?
<headius>
I thought that's why we had to pass it into prepare
<enebo>
headius: yeah I actually wondered that as well
<nirvdrum>
subbu: Eating lunch now. I'll check in a bit.
<headius>
or is it that a closure starts out as non-lambda, and may once-only change to lambda if passed to the right call
<headius>
e.g. lambda {}
<enebo>
headius: well 2 places where lambdas occur…syntax where we know and a proc passed to Kernel.lambda
<headius>
right
<enebo>
The latter case we do not know until we execute
<subbu>
headius, enebo i don't know the ruby semantics of that switching between lambda and non-lambda very well ... but how can a blockbe used in multiple places?
<headius>
right, ok
yfeldblum has quit [Ping timeout: 244 seconds]
renderful has joined #jruby
<enebo>
but fwiw I think there is an issue here
<headius>
subbu: well, if the same block is passed around as &block, you could do lambda(&block) later maybe?
<headius>
that's the sort of weird edge case I hope nobody does
<enebo>
a = proc { puts “A” }; a.call; lambda(&a).call
<subbu>
I see .. Proc.new(&block) & lambda (&block)
<enebo>
oh you just said it
elia has quit [Quit: Computer has gone to sleep.]
<enebo>
subbu: so perhaps in this case we should always have GEB stuff
<subbu>
ok, it is there now.
<subbu>
so, we can worry about opt-ing it later depending on what we know about it.
<enebo>
yeah I was wondering about this yesterday
<enebo>
I suspect there are places we can determine it is unconditionally a proc
<enebo>
If closure cannot escape
<headius>
Did I just dream there being a cocoa-based inkscape for OS X?
<headius>
I thought for sure I could run it without X11
pchalupa-afk is now known as pchalupa
<enebo>
headius: I think so :)
<chrisseaton>
I to used to absolutely love inkscape, but the Mac X11 version is uncanny valley and unuseable
<headius>
oh you know what, I'm thinking of gimp
<headius>
well poo
<headius>
chrisseaton: yeah :-\
<headius>
bl
<headius>
bbl
skade has joined #jruby
renderful has quit [Quit: Leaving...]
tylersmith has joined #jruby
robbyoconnor has quit [Excess Flood]
robbyoconnor has joined #jruby
bbrowning_away is now known as bbrowning
phrinx has joined #jruby
robbyoconnor has quit [Ping timeout: 240 seconds]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
e_dub has quit [Quit: ZZZzzz…]
robbyoconnor has joined #jruby
shellac has quit [Quit: Computer has gone to sleep.]
anaeem1 has joined #jruby
anaeem1 has quit [Read error: Connection reset by peer]
nanoyak has joined #jruby
kares has quit [Ping timeout: 260 seconds]
kW_ has quit [Ping timeout: 250 seconds]
blinsay_ is now known as blinsay
<nirvdrum>
subbu: Still getting the stack overflow.
kW_ has joined #jruby
kares has joined #jruby
viking has quit [Remote host closed the connection]
jmimi has quit [Quit: Leaving.]
iamjarvo has joined #jruby
nanoyak has quit [Quit: Computer has gone to sleep.]
pchalupa has quit [Quit: Leaving]
nanoyak has joined #jruby
blinsay is now known as blinsay_
zeroecco has joined #jruby
tcrawley is now known as tcrawley-away
blinsay_ is now known as blinsay
yfeldblum has joined #jruby
<subbu>
nirvdrum, thanks.
dmarcotte has joined #jruby
tcrawley-away is now known as tcrawley
yfeldblum has quit [Ping timeout: 255 seconds]
shellac has joined #jruby
Aethenelle has joined #jruby
mje113__ has quit [Quit: Connection closed for inactivity]
elia has joined #jruby
subbu is now known as subbu|lunch
elia has quit [Ping timeout: 260 seconds]
lance|afk is now known as lanceball
enebo has quit [Ping timeout: 260 seconds]
<headius>
subbu|lunch: do you feel the dynscope eliminating pass is not ready or did it just need the other patches we've made recently?
enebo has joined #jruby
dumdedum has quit [Ping timeout: 260 seconds]
anaeem1_ has joined #jruby
JRubyGithub has joined #jruby
JRubyGithub has left #jruby [#jruby]
<JRubyGithub>
jruby/master 13cd181 Thomas E. Enebo: New {Closure,}InterpreterContext with all state interpreter needs to execute....
<JRubyGithub>
[jruby] jrubyci pushed 1 new commit to master: http://git.io/yaFIfg
skade has quit [Quit: Computer has gone to sleep.]
<headius>
enebo: woah....rake -T ran with threshold=0
<headius>
everything compiled successfully along that path
postmodern has joined #jruby
<enebo>
headius: with my last commit or are you just saying you made it past another milestone?
<enebo>
headius: master is still not quite right between interp and JIT since linearized instrs are not being cloned
robbyoconnor has quit [Ping timeout: 255 seconds]
<headius>
enebo: not including your commit
<enebo>
headius: congrats
<subbu|lunch>
headius, it should be ready. I tested it in interp mode. but, as part of y'day's commits, i noticed that it could have affected jit in some scenarios (by trapping a return in a block that had its dynscope removed).
<headius>
subbu|lunch: ok
subbu|lunch is now known as subbu
<enebo>
headius: A little more time for me to figure out Labels getting cloned and mucking up rescue ipcs
<subbu>
dce should also be safe as long as you don't run it after ensure-temps-ready.
<headius>
ok
<headius>
I'm going to see how far I can push threshold 0 and then I'll experiment with passes
<chrisseaton>
What is the Ruby equivalent of Python's string.replace, which doesn't try and interpret the string as regex back references?
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] jrubyci pushed 2 new commits to master: http://git.io/tby-OQ
<JRubyGithub>
jruby/master 09b0be3 Thomas E. Enebo: Remove some params for long dead rubyClass field on TC
<JRubyGithub>
jruby/master 44364b1 Thomas E. Enebo: Remove no longer correctly named preMethodFrameAndClass since we no longer have class
JRubyGithub has left #jruby [#jruby]
nirvdrum has quit [Ping timeout: 250 seconds]
subbu has quit [Ping timeout: 272 seconds]
<lopex>
chrisseaton: doesnt try what ?
<chrisseaton>
lopex: doesn't try *to* interpret the strings as regex
enebo has quit [Quit: enebo]
<lopex>
chrisseaton: most of string methods do
<chrisseaton>
lopex: maybe *try and* is a British English thing
<lopex>
split/scan/gsub etc
<chrisseaton>
lopex: yeah... so how do I get them to stop?
<lopex>
chrisseaton: just as java String methods
<chrisseaton>
lopex: do I have to Regex.escape everything?
<lopex>
chrisseaton: there is special casing sometimes like split and one space string
<lopex>
chrisseaton: there's side effects like capture resetting after these are run
colinsurprenant has quit [Quit: colinsurprenant]
tcrawley is now known as tcrawley-away
<lopex>
chrisseaton: notably tr and index dont use regexes
<chrisseaton>
lopex: ok, but that doesn't help me with replace - what should I be doing?
<lopex>
chrisseaton: you mean String#replace ?
<chrisseaton>
yeah - it's replacing things in my string as it thinks they're regex back references - how do I replace without doing that?
brettporter has joined #jruby
brettporter has joined #jruby
<lopex>
chrisseaton: use Regex.quote
blinsay_ is now known as blinsay
<lopex>
but ruby String#replace just assigns the buffer
e_dub has quit [Quit: ZZZzzz…]
<lopex>
chrisseaton: I'm confused, you mean python replace behaviour or ruby method "replace" name
<lopex>
?
<chrisseaton>
lopex: I want to replace all instances of string A in string B with string C, but it's interpreting my strings as regexes - isn't there a plain, non regex replace method, as in Python (and Java)
iamjarvo has joined #jruby
<lopex>
chrisseaton: that's String#gsub and yeah it uses regexps
<chrisseaton>
lopex: yeah, so there isn't a non regex version? nobody ever wants to replace strings that aren't regexes?
<lopex>
chrisseaton: jruby uses joni regexps in weakref cache so it doesnt have to escape every time
<lopex>
chrisseaton: and yeah, there's very few special casing that doesnt do regexps in ruby string methods
<chrisseaton>
chrisseaton: that's crazy - running a full regex interpreter for all string replacements
elia has quit [Quit: Computer has gone to sleep.]
<lopex>
all string replacements are quoted and converted to regexp
<lopex>
chrisseaton: but it pays off sometimes since regexps use boyer-moore searches
<lopex>
let me recall
<lopex>
chrisseaton: RubyRegexp.regsub19
<lopex>
in jruby
<chrisseaton>
I mean writing normal Ruby, not implementing it
<lopex>
er
<lopex>
wait
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<lopex>
chrisseaton: hmm, then quote
<lopex>
so it doesnt have any regexp special chars
<lopex>
chrisseaton: oh, quote and escape are aliases
<lopex>
chrisseaton: but it might be a bit different from internal helpers alone, there's lots of inconsistency
dmarcotte has quit [Quit: Leaving.]
<lopex>
chrisseaton: I gather you're implementing some of core methods in ruby ?
<chrisseaton>
lopex: no I'm writing a normal Ruby program - a benchmark harness - just trying to write a basic string replace and finding it very hard!
<lopex>
chrisseaton: jruby's gsub might actually run faster than java's
<chrisseaton>
yeah, but my string comes from a file, I'm not writing it literally, so to 'add more backslashes' i need to run some kind of quote routine, but the docs said if you put a string it it's escaped for you - not interpreted as a regex
<chrisseaton>
if you need to escape your string, it clearly isn't being interpreted as just a string - it's being interrupted as a regex, and that's not what the docs say
<headius>
so it's not the same as a normal string...it's expecting \\1 or something maybe
<headius>
since you only have \\ it drops it
<headius>
oh huh....
<chrisseaton>
headius: yeah, but the docs say "The pattern is typically a Regexp; if given as a String, any regular expression metacharacters it contains will be interpreted literally, e.g. '\\d' will match a backlash followed by ‘d’, instead of a digit."
<headius>
chrisseaton: \\' is the post-match group :-)
<headius>
and there's no post-match in any of your examples
<headius>
so it's working exctly right
<headius>
if the gsub bits match the $ vars, anyway
<chrisseaton>
headius: ah no I see - the replaced string CAN contain back references even if it's a string "If replacement is a String it will be substituted for the matched text. It may contain back-references to the pattern’s capture groups"
<headius>
yes
<headius>
and I believe ' is one of the groups, for postmatch
<chrisseaton>
I thought the thing about escaping it for you referred to the replacement as well
<headius>
no, you just need to double-escape the backreferences because otherwise they're escapes for the literal string
marr has quit [Ping timeout: 255 seconds]
<chrisseaton>
yeah - I think I'll just use String#[]= instead
<chrisseaton>
didn't find that earlier
<lopex>
oh I missed that one :)
<chrisseaton>
ok I'll calm down now
<headius>
I guess I've learned something over the years
<lopex>
look at my shame now
<headius>
you've been away too long
<rtyler>
SHAME
tylersmith has quit [Remote host closed the connection]