yfeldblum has quit [Remote host closed the connection]
havenn has quit [Ping timeout: 244 seconds]
<chrisseaton>
headius: are you ever tempted to move all the notifications to a separate IRC room? they can swamp any conversation sometimes
subbu has quit [Quit: Ex-Chat]
calavera has joined #jruby
calavera has quit [Client Quit]
<headius>
chrisseaton: they don't bother me really
dinfuehr has joined #jruby
<headius>
it might be worth reducing the github noise down to one line
<headius>
we can format it however
<chrisseaton>
some new guy came here the other day and asked if this was just the notification room
x1337807x has joined #jruby
x1337807x has quit [Max SendQ exceeded]
x1337807x has joined #jruby
dinfuehr has quit [Ping timeout: 252 seconds]
<headius>
yeah I saw that
sferik has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sferik has joined #jruby
dinfuehr has joined #jruby
dinfuehr has quit [Ping timeout: 244 seconds]
yfeldblum has joined #jruby
anaeem1 has joined #jruby
anaeem1 has quit [Remote host closed the connection]
anaeem1 has joined #jruby
dinfuehr has joined #jruby
phrinx_ has quit [Ping timeout: 252 seconds]
dinfuehr has quit [Ping timeout: 252 seconds]
slyphon has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
aewffwea has joined #jruby
<aewffwea>
So how can I declare a new class inside a test/description/rspec if I want it to disappear at the end of the test?
<chrisseaton>
foo = Class.new { }
<aewffwea>
and what's the difference if I do class foo ?
bjfish2 has left #jruby [#jruby]
<chrisseaton>
you can't do class foo, as the class name needs to be a constant - using .new allows you to assign the class to a local variable instead
<aewffwea>
chrisseaton: but can it be a constant inside the implicit class defined by the describe method?
<chrisseaton>
aewffwea: you might be able to put it there - I'm not sure if describe allocates a new class each time though, or just an instance
<aewffwea>
chrisseaton: I tested it and it kinda works, but it seems to live after the test is finished... That's my problem
<chrisseaton>
did you test the .new mechanism? and what do you mean by 'live' - it's not guaranteed to be GCd immediately if that's what you mean
dinfuehr has joined #jruby
<aewffwea>
chrisseaton: I used a class with the same name in another describe and it extended the original class
<aewffwea>
I did something like
<aewffwea>
class foo; end
<aewffwea>
class Foo; end
<chrisseaton>
ok - what about the .new technique instead then?
<aewffwea>
I didn't try that... I'm just trying to understand what are the different options to learn more
dinfuehr has quit [Ping timeout: 245 seconds]
DomKM has quit [Quit: Connection closed for inactivity]
pgokeeffe has quit [Quit: pgokeeffe]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kares has joined #jruby
sferik has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
GitHub129 has joined #jruby
<GitHub129>
[jcodings] haozhun opened pull request #12: bugfix: the max length of char property capped too low (master...encbug) http://git.io/hapT
GitHub129 has left #jruby [#jruby]
dinfuehr has joined #jruby
dinfuehr has quit [Ping timeout: 250 seconds]
beawesomeinstead has joined #jruby
dinfuehr has joined #jruby
dinfuehr has quit [Read error: Connection reset by peer]
dinfuehr has joined #jruby
JohnBat26 has joined #jruby
djellemah_ has joined #jruby
djellemah__ has joined #jruby
djellemah has quit [Ping timeout: 256 seconds]
djellemah_ has quit [Ping timeout: 264 seconds]
pgokeeffe has joined #jruby
yfeldblum has quit [Remote host closed the connection]
yfeldblum has joined #jruby
havenwood has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 265 seconds]
kith has quit [Quit: kith]
pitr-ch has joined #jruby
kith has joined #jruby
donV has joined #jruby
mister_solo has joined #jruby
pgokeeffe has quit [Quit: pgokeeffe]
beawesomeinstead has quit [Quit: Connection closed for inactivity]
donV has quit [Quit: donV]
kares has quit [Remote host closed the connection]
tlarevo has joined #jruby
sferik has joined #jruby
dinfuehr has quit [Read error: Connection reset by peer]
dinfuehr has joined #jruby
vtunka has joined #jruby
marr has joined #jruby
tlarevo has quit [Remote host closed the connection]
shellac has joined #jruby
tlarevo has joined #jruby
e_dub has quit [Quit: e_dub]
yfeldblum has joined #jruby
tlarevo has quit [Ping timeout: 256 seconds]
yfeldblum has quit [Ping timeout: 246 seconds]
yfeldblum has joined #jruby
drbobbeaty has joined #jruby
drbobbeaty has quit [Client Quit]
drbobbeaty has joined #jruby
dinfuehr has quit [Read error: Connection reset by peer]
dinfuehr has joined #jruby
dinfuehr has quit [Read error: Connection reset by peer]
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] bensummers opened issue #2733: Compiling app with embedded JRuby has RELEASE_6 warning http://git.io/hVbz
JRubyGithub has left #jruby [#jruby]
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] eregon pushed 1 new commit to master: http://git.io/hVhn
<JRubyGithub>
jruby/master 711a1c5 Benoit Daloze: [Truffle] Rename PrimitiveNodes to TrufflePrimitiveNodes.
JRubyGithub has left #jruby [#jruby]
mister_solo has quit [Ping timeout: 255 seconds]
SynrG has quit [Ping timeout: 265 seconds]
tcrawley-away is now known as tcrawley
SynrG has joined #jruby
slyphon has joined #jruby
erikhatcher has joined #jruby
yfeldblum has quit [Ping timeout: 265 seconds]
mister_solo has joined #jruby
mister_solo has quit [Ping timeout: 252 seconds]
<eregon>
aewffwea: Declaring a constant in a Class.new block does not open a new namespace, so you end up defining it on the outer namespace, object if there is no module/class keyword wrapping it
bbrowning_away is now known as bbrowning
erikhatcher has quit [Quit: erikhatcher]
mister_solo has joined #jruby
jseminck has quit [Remote host closed the connection]
nirvdrum has joined #jruby
vtunka has quit [Quit: Leaving]
erikhatcher has joined #jruby
nateberkopec has joined #jruby
erikhatcher has quit [Ping timeout: 264 seconds]
mister_solo has quit [Ping timeout: 272 seconds]
anaeem1 has quit [Remote host closed the connection]
anaeem1 has joined #jruby
enebo has joined #jruby
anaeem1 has quit [Ping timeout: 264 seconds]
e_dub has joined #jruby
bjfish2 has joined #jruby
kotk has joined #jruby
e_dub has quit [Quit: e_dub]
anaeem1 has joined #jruby
slyphon has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] mkristian created maven-3.3.1 (+2 new commits): http://git.io/hw1V
<JRubyGithub>
jruby/maven-3.3.1 203ef11 Christian Meier: added maven extension.xml to use ruby DSL pom
<JRubyGithub>
jruby/maven-3.3.1 44d9244 Christian Meier: no more pom.xml - as far as possible
JRubyGithub has left #jruby [#jruby]
mje113__ has joined #jruby
lance|afk is now known as lanceball
mister_solo has joined #jruby
dabradley has joined #jruby
slyphon has joined #jruby
mister_solo has quit [Ping timeout: 256 seconds]
aramisbea has joined #jruby
aramisbea has quit [Read error: Connection reset by peer]
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] mkristian force-pushed maven-3.3.1 from 44d9244 to a67d043: http://git.io/hwdS
<JRubyGithub>
jruby/maven-3.3.1 a67d043 Christian Meier: no more pom.xml - as far as possible
JRubyGithub has left #jruby [#jruby]
mister_solo has joined #jruby
slyphon has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tcrawley is now known as tcrawley-away
iamjarvo has joined #jruby
mitchellhenke has joined #jruby
slyphon has joined #jruby
dinfuehr has joined #jruby
mister_solo has quit [Ping timeout: 252 seconds]
anaeem1 has quit [Remote host closed the connection]
anaeem1_ has joined #jruby
anaeem1_ has quit [Read error: Connection reset by peer]
anaeem1 has joined #jruby
vtunka has joined #jruby
anaeem1 has quit [Remote host closed the connection]
anaeem1 has joined #jruby
e_dub has joined #jruby
elia has joined #jruby
slyphon has quit [Ping timeout: 272 seconds]
anaeem1 has quit [Ping timeout: 252 seconds]
bbrowning is now known as bbrowning_away
subbu has joined #jruby
tcrawley-away is now known as tcrawley
lanceball is now known as lance|afk
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] mkristian pushed 1 new commit to jruby-1_7: http://git.io/hrsr
<JRubyGithub>
jruby/jruby-1_7 5f4bb39 Christian Meier: fix the creation of BigDecimal from a String...
JRubyGithub has left #jruby [#jruby]
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] nirvdrum pushed 2 new commits to master: http://git.io/hrGA
<JRubyGithub>
jruby/master bba8243 Kevin Menard: [Truffle] Fixed issues with strings not being fully initialized upon dup.
<JRubyGithub>
jruby/master d663235 Kevin Menard: [Truffle] Completed String#{reverse,reverse!}.
JRubyGithub has left #jruby [#jruby]
tcrawley is now known as tcrawley-away
<lopex>
nirvdrum: "ruby, where reversing a string requires phd"
<nirvdrum>
Heh.
<nirvdrum>
Maybe that's my problem. I stopped once I got my Master's :-P
<lopex>
yeah, me too
<nirvdrum>
That silly dup issue took me longer to figure out than it should have. Apparently there's no spec for that.
<lopex>
I wonder how many places thwart array bounds check elimination due to those encodings
<nirvdrum>
eregon: What's the flow for adding new specs now?
slyphon has joined #jruby
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] mkristian force-pushed jruby-1_7 from 5f4bb39 to 9b8aa73: http://git.io/Y42-2g
<JRubyGithub>
jruby/jruby-1_7 9b8aa73 Christian Meier: fix the creation of BigDecimal from a String...
JRubyGithub has left #jruby [#jruby]
<lopex>
% 1
calavera has joined #jruby
chamila has joined #jruby
havenwood has joined #jruby
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] mkristian pushed 1 new commit to master: http://git.io/hrCE
<JRubyGithub>
jruby/master 8421673 Christian Meier: Merge branch 'jruby-1_7'...
JRubyGithub has left #jruby [#jruby]
<nirvdrum>
lopex: Another thing I want to take a look at some time is JRuby and Rubinius both seem to have just ported String from MRI. While that helps in many regards, if MRI picked a suboptimal algorithm, we will have too.
<lopex>
nirvdrum: if it has visible effects, then yes
aramisbea has joined #jruby
<lopex>
nirvdrum: but most of the that algorithms dont matter
<lopex>
nirvdrum: joni for example does a whole lot more optimizations than oniguruma
<lopex>
it has 10 more instructions
<lopex>
template sharing etc
<lopex>
and it's own cow in ast nodes
<lopex>
impossible things in c land
<lopex>
or very hard at very least
<lopex>
nirvdrum: bacref/matcher reusing makes String#scan like 10x faster than mri
<nirvdrum>
I don't know the details, but I'm certain it's better than 1.4 was.
<lopex>
most of the time, there wont be ver long characters
<lopex>
so the splits are still worth doing ?
<lopex>
nirvdrum: in 1.4 GC barely worked :)
<lopex>
it leaked like shit
mister_solo has joined #jruby
<nirvdrum>
I was going to run through a few things with inline diagnostics on. They're per-platform limits so we'll still need to be cautious, but it'd give a more accurate picture of how things stand today relative to 6 or 7 years ago.
<lopex>
nirvdrum: I guess many threasholds/settings are made adaptive now ?
<nirvdrum>
I think enebo and headius has more details on that.
<lopex>
I remember tweaking all possible inliing settings because there is a problem in bigs switches (like the one in joni interpreter)
<lopex>
the bigger the switch the slower it got
<lopex>
so it seemed it didnt use jump tables but balanced tree
<lopex>
but that wasnt the case either
<lopex>
still a mystery
<nirvdrum>
I profess I'm still learning what HotSpot does here.
<lopex>
multiple aproaches to splitting showed surprising behaviours
<lopex>
even found where switches were being profiled in hotspot sources but werent used at all
<lopex>
I wonder if anything changed
<lopex>
nirvdrum: I got scared but the imensity of that thing
<lopex>
nirvdrum: and hotspot folks said you need two years to be comfortable with that
<lopex>
discouraging
<lopex>
anyways, enough complains
<nirvdrum>
Well, my investigations might not turn up anything. But it's worth taking half a day to look :-)
mister_solo has quit [Ping timeout: 256 seconds]
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] nirvdrum pushed 1 new commit to master: http://git.io/hroO
<JRubyGithub>
jruby/master 5d0ef7f Kevin Menard: [Truffle] Untagged some passing String specs.
JRubyGithub has left #jruby [#jruby]
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] bjfish opened pull request #2734: [Truffle] Adding more specializations of Array#delete_at. (master...truffle_array_delete_at) http://git.io/hrol
JRubyGithub has left #jruby [#jruby]
dinfuehr_ has joined #jruby
dinfuehr has quit [Ping timeout: 264 seconds]
vtunka has quit [Quit: Leaving]
mister_solo has joined #jruby
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] eregon pushed 2 new commits to master: http://git.io/hrXG
<JRubyGithub>
jruby/master ea56f15 Benoit Daloze: [Truffle] JT: Do not die of Ctrl+C, only propagate to subprocesses.
<JRubyGithub>
jruby/master 363daa7 Benoit Daloze: [Truffle] JT: Spawn igv in its own process group....
JRubyGithub has left #jruby [#jruby]
dinfuehr_ has quit [Remote host closed the connection]
tenderlove has joined #jruby
phrinx has joined #jruby
calavera has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dabradley has quit [Quit: WeeChat 0.4.2]
phrinx_ has joined #jruby
phrinx has quit [Read error: Connection reset by peer]
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] bjfish pushed 1 new commit to master: http://git.io/hr5z
<JRubyGithub>
jruby/master 418dab9 Brandon Fish: [Truffle] Adding Array#sort_by! to array.rb.
JRubyGithub has left #jruby [#jruby]
anaeem1_ has joined #jruby
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] chrisseaton closed pull request #2734: [Truffle] Adding more specializations of Array#delete_at. (master...truffle_array_delete_at) http://git.io/hrol
<nirvdrum>
headius: That snakeyaml thing seems to block 9k installation with ruby-build, too.
<el_cristobal>
Is this an alright place to ask about github.com/headius/jruby-pg ? I'm trying to require a specific ref of it in a Gemfile, since there doesn't seem to have been a release of it recently, but Bundler can't seem to find the gem definition.
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] lightswitch05 closed issue #1413: jopenssl/load - Unable to deploy on jBoss 7.1.1.Final using jRuby 1.7.10 http://git.io/ho0w
JRubyGithub has left #jruby [#jruby]
phrinx has joined #jruby
phrinx_ has quit [Read error: Connection reset by peer]
zorak8 has quit [Ping timeout: 264 seconds]
camlow32_ has quit [Remote host closed the connection]
e_dub has quit [Quit: e_dub]
x1337807x has joined #jruby
x1337807x has quit [Client Quit]
x1337807x has joined #jruby
elia has quit [Quit: Computer has gone to sleep.]
camlow325 has joined #jruby
x1337807x has quit [Client Quit]
x1337807x has joined #jruby
tcrawley-away is now known as tcrawley
shellac has quit [Ping timeout: 252 seconds]
lance|afk is now known as lanceball
sferik has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] enebo opened issue #2736: early return in each'd enumerator is jumping out of each and not method http://git.io/hoyG
<lopex>
headius: the vanilla is without mri changes
<headius>
that took me hours to figure out
<headius>
MRI does a cast to unsigned char there but we didn't have that...it was in a macro so I didn't think anything of it at first
<lopex>
yes, that 0xff is all over the place
<enebo>
lopex: but 1.8.7 is still in 1.7.x?
<lopex>
headius: grep for 0xff in jocodings/joni :)
<lopex>
enebo: I guess, is it ?
<enebo>
lopex: yeah
<lopex>
headius: the vanilla thing might go away actaully I think
<headius>
yeah, it has never been active...what was it?
<lopex>
headius: yeah
<lopex>
just to keep old oniguruma compatibility
<lopex>
headius: later this summer I'll probably opensource a thing that might bring jruby some fame
<headius>
oh really?
subbu has joined #jruby
e_dub has quit [Quit: e_dub]
<lopex>
headius: it's not a framework, but an engine with more regime, - a tree based http api and the most flexible scaffolding I know of as an example functionality
x1337807x has joined #jruby
e_dub has joined #jruby
sferik has joined #jruby
<headius>
wow, sounds interesting...been working on it for a while, eh?
<lopex>
yeah about two years, but it's more ideas than the code
<JRubyGithub>
[jruby] nirvdrum pushed 1 new commit to master: http://git.io/h6q7
JRubyGithub has left #jruby [#jruby]
<JRubyGithub>
jruby/master 1b500a1 Kevin Menard: [Truffle] Filled out more of String#{<<, concat}.
<lopex>
headius: that's why I asked once about cold code performance, since on startup I do lots of tree walking and expansions
<lopex>
headius: like building a tree based on rdbms relation metadata
<nirvdrum>
headius: Something occurred to me just now. Those m17n specs seem broken on 1.7, but String#b is a 2.0 method. I was seeing the failure in 1.9 mode.
e_dub has quit [Quit: e_dub]
<headius>
nirvdrum: 1.7 runs MRI tests from 1.9.3
<headius>
so they wouldn't use b
<nirvdrum>
So they were passing just because they didn't exercise that functionality?
<headius>
they probably just did the long form .force_encoding("ASCII-8BIT")
<nirvdrum>
Because the failing snippet also failed in 1.9 mode.
<headius>
I wouldn't be surprised...1.7's encoding support was much weaker than 9k
djbkd has quit [Remote host closed the connection]
<nirvdrum>
Gotcha. So the MRI tests might have just been structured differently?
<headius>
yes, they started expanding the tests dramatically after 1.9.3
<nirvdrum>
headius, lopex: On a tangentially related note, the multitude of String#modify* methods is dizzying.
SynrG has quit [Ping timeout: 272 seconds]
<headius>
nirvdrum: me too
sferik has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<nirvdrum>
I also did a bit of benchmarking earlier. In cases where String has an immutable and mutable variant, it might be better just making the immutable a combined dup + mutable call. It's a tad less efficient, but I'd be surprised if that amounts to anything anywhere.
<nirvdrum>
E.g., String#reverse
SynrG has joined #jruby
<nirvdrum>
As it stands, any issues found in one need to be carried forward to the other. And code size is just larger.
<lopex>
nirvdrum: oh, imagine the plethora of newString*
<nirvdrum>
I haven't gotten there yet :-)
<lopex>
newStringSharedNoCopy7Bit
<lopex>
well, that one I just made up
<headius>
nirvdrum: most of the time we do that
pjammer has joined #jruby
<headius>
I doubt it would be much less efficient
<nirvdrum>
I guess I got lucky. chop doesn't seem to either.
<nirvdrum>
But chomp does.
<nirvdrum>
I had to get the count up to 100,000,000 to see a 1s difference.
<nirvdrum>
And on really short strings, dup + mutate was faster in some cases.
<nirvdrum>
I'm trying to balance not screwing with code that obviously has been working for years and trying to make it a bit easier for someone to feel confident working in there.
<enebo>
lopex: about middle between amsterdam, rotterdam, and the hague…not the brewery I am thinking of
<nirvdrum>
I couldn't use benchmark-ips because I can't get any gems to install in 9k due to that package psych issue. So, not my best benchmark.
<nirvdrum>
But the magnitude should be roughly correct.
<lopex>
headius: do you perform some perf regression tests when porting that Regexp stuff ?
djbkd has quit [Remote host closed the connection]
<headius>
lopex: I did not
<headius>
perf is not my concern at the moment
<nirvdrum>
And the way I wrote, there's Ruby method dispatch overhead. We could eliminate that since we can call strDup directly.
<nirvdrum>
Anyway, I'm floating it out there. If you want to maintain parity with MRI, that's fine too.
<headius>
nirvdrum: yeah, I don't know if there's a reason they don't dup+mutate
<headius>
I'd like to figure out or find out
<lopex>
just git blame that mri code
<nirvdrum>
headius: It looks like they're a fair bit slower.
<enebo>
nirvdrum: oh what was it before?
<lopex>
that might be gc though
e_dub has quit [Client Quit]
<enebo>
nirvdrum: This is after your specialization?
<nirvdrum>
lopex: It could be, yeah. That's the problem here.
<nirvdrum>
enebo: Just in porting reverse it stuck out to me that JRuby has implementations for String#reverse and String#reverse!.
<enebo>
oh heh
<enebo>
nirvdrum: that is somewhat rare
<nirvdrum>
enebo: I'm advocating maybe making String#reverse just be a dup + reverse!
<enebo>
nirvdrum: usually we dup for non-bang and then call bang impl
<lopex>
nirvdrum: also, mri packs smaller string in RObject union fields, so longer string will behave differently on mri
<nirvdrum>
enebo: That's what headius said. I just happened to look at String#chop and see the same I guess.
<lopex>
nirvdrum: much more gc overhead
<enebo>
nirvdrum: I mean we do that nearly for all our methods
<enebo>
nirvdrum: I am surprised
<nirvdrum>
lopex: Yeah, that's why I tried a few different lengths. I wanted to rule out O(n) stuff.
<enebo>
werid
<enebo>
nirvdrum: I guess reverse can be done in-place
<nirvdrum>
lopex: Although if GC overhead is the issue here, then MRI could dup + mutate too.
<enebo>
nirvdrum: which is lopex argument no doubt
<enebo>
oh no it can’t for reverse
<enebo>
I don’t know why then
<nirvdrum>
enebo: I think it was just ported from MRI.
<nirvdrum>
MRI has implementations for both.
<enebo>
nirvdrum: yeah could be
kares has quit [Ping timeout: 255 seconds]
<nirvdrum>
So now we're speculating as to why :-)
<lopex>
git blame :)
<enebo>
nirvdrum: there is no reason not to :)
<nirvdrum>
lopex: I'm looking at the blame. It's a stochastic mess.
<lopex>
then feeed /def/random with it!
<nirvdrum>
The original code seems to be from 1998 with bolted on stuff over time.
<lopex>
nirvdrum: I'll look at that too
<nirvdrum>
My guess is the rationale here has been lost to time.
<lopex>
and it happens I dont have mri repo locally
<nirvdrum>
And no one questioned it.
<lopex>
nirvdrum: can you spot other examples of not duping/modifying ?
<nirvdrum>
lopex: String#chop was one I saw.
<lopex>
nirvdrum: 1998 ?
<nirvdrum>
Oh, I meant in JRuby.
<lopex>
aaah
<lopex>
nirvdrum: well, there was a time I ported stuf without serious tests and it was already a cold code back then
<lopex>
nirvdrum: then afte tow years the was a batch of fixes since they provided some tests in mri
<lopex>
*after two
<lopex>
wow mri is huge
<nirvdrum>
lopex: Yeah, I'm not looking to blame anyone. I'm just asking if it makes sense to do a dup + mutate to cut down on what is essentially duplication. I think the answer is this was ported from MRI, but I can't tell if it was expanded to address a previous performance issue. That's all.
<enebo>
nirvdrum: do it
<enebo>
nirvdrum: There is no reason not to.
<lopex>
nirvdrum: stop talking about "not blaming anyone" :) I know you arent blaming anyone
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] bjfish opened pull request #2737: [Truffle] Implementing more of Array#pop. (master...truffle_array_pop) http://git.io/h6gb
JRubyGithub has left #jruby [#jruby]
<nirvdrum>
lopex: Heh. Okay. I just want to make sure you don't think I'm attacking you.
<nirvdrum>
Far too many devs are attached to things they wrote 7 years ago.
<lopex>
why would you
<nirvdrum>
And we have that whole language barrier to balance :-D
<lopex>
right
<nirvdrum>
I won't bring it up again then.
<lopex>
nirvdrum: it was different times, lots of stuff was done quickly since jruby lacked functionality
<lopex>
nirvdrum: now it's the time to do it property
<lopex>
*properly
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<nirvdrum>
enebo: The follow-up then is whether some of this would be a better fit for Ruby. Writing it in Java is easily enough, but if you have a smarter compiler now, doing "def reverse; self.dup.reverse!; end" might be a better option.
<nirvdrum>
*easy enough
mitchellhenke has quit [Quit: Computer has gone to sleep.]
<nirvdrum>
I know you had some false starts with Ruby-based implementations in the past, but the IR seems like it'd be up to snuff for some operations nowadays.
<enebo>
nirvdrum: I think it should be measured
elia has joined #jruby
<enebo>
nirvdrum: I think it is trivial to replace Java with Ruby impl just by loading a core_ext/string.rb if we want to override Java
<nirvdrum>
enebo: My gist sorta would. I did the dup.reverse! in situ.
<enebo>
nirvdrum: The other issue I have which needs to be considered is startup time
<headius>
a method that just does dup.reverse! should be as fast as the Java version
<headius>
neither of those methods would trigger frame or scope
<nirvdrum>
I don't have a great handle on that. You'd have less bytecode to verify, but more Ruby to parse.
<lopex>
nirvdrum: heh, I dint see anything interesting in mri logs too
<enebo>
headius: I guess I am including startup overhead as well
donV has quit [Quit: donV]
<headius>
enebo: sure, that will take a small hit for every such method
<enebo>
kernel I think is a big part of startup now
<headius>
it's actually not huge
<headius>
JI is bigger
<enebo>
like >0.5s
<enebo>
headius: yeah which would not be loaded if we did not load kernel
<enebo>
headius: so I count that
<headius>
well, I guess
<headius>
we load it because we needed it to do a ruby kernel
<enebo>
but I mean we do not load a tiny fraction of an all Ruby core in methods in kernel+JI but it is a subtantial amount of load time
<enebo>
I am thinking we need an internal autoload :)
pietr0 has quit [Quit: pietr0]
<enebo>
an index file of all methods which registers the method at load time but parses nothing
<enebo>
first hit trigger parse + ir build
<enebo>
So classes/modules are logically consistent but references
<enebo>
which would mean dealing with first time concurrent loads but it would make ruby impls have no overhead
<lopex>
is the IR rewritten multiple times as the profile saturates ?
<enebo>
in truth it might even make ruby version load faster than Java impl
<enebo>
lopex: well we don’t have profiling setup past invocation counts
<enebo>
lopex: but we do promote from simplest IR build interp to either a full interp or a full JIT dependng on -X-<l;etter>
<lopex>
enebo: I mean, like snapshotting saturated IRs
<enebo>
lopex: so you mean persisting IR for code at some point?
<enebo>
lopex: so next load we can load that at that point?
<lopex>
enebo: that's the question, I guess you can do the whole thin anyways
<lopex>
*cant
<lopex>
enebo: like skipping the frames
<enebo>
lopex: our persistence layer is running again which is how we implement AOT now
<enebo>
lopex: but we save the IR very early on at this point
tcrawley-away is now known as tcrawley
<lopex>
ok
<enebo>
lopex: so we do not save much over just parsing
<enebo>
lopex: but the plan is to be able to save much later after conservative optimizations
<lopex>
enebo: but some more info might be worth keeping so it doesnt have to rewarm as much ?
<enebo>
lopex: startup time issues made us back off to simplest IR for quick interp
<enebo>
lopex: yeah it would be helpful
iamjarvo has joined #jruby
<nirvdrum>
enebo: I can see the inevitable post on /r/ruby about how reverse! is way faster than reverse due to lazy compilation :-P
<enebo>
lopex: so long as those optimizations are completely safe
<lopex>
enebo: --dev makes some cold code precalculations many times faster now
<lopex>
enebo: so it show how much is being wasted profiling
<lopex>
*shows
<lopex>
in my case
<enebo>
it == the JVM or jruby?
<lopex>
jruby
<lopex>
er
<enebo>
lopex: —dev largely is only JVM glags
<lopex>
--dev is like a meta switch right ?
<lopex>
yeah
<enebo>
lopex: except -X-C
<lopex>
yeah, but also -J-Djruby.compile.mode=OFF
<enebo>
-X-C is OFF
<enebo>
lopex: but you can also try -Xjit.threshold=-1 -X-C
<enebo>
lopex: this never leaves startup interpreter
<nirvdrum>
enebo: And we landed on blowing away all these 19 variants, right?
<lopex>
enebo: I dont think it will be a real issues as the code gorws, since theres very little hot cold code (sounds weird)
<enebo>
lopex: it is a much slower interp but since we never run any passes on it load time is better if you are not doing anything hot
<enebo>
lopex: not to me
slyphon has joined #jruby
<lopex>
enebo: and then in app dev mode the code isnt reloade
<enebo>
lopex: gem list is the perfect 0 hot code test case
<enebo>
lopex: I think many CLI apps are too
<lopex>
yeah
<lopex>
enebo: but it bites me more
<enebo>
nirvdrum: I think so :|
<enebo>
nirvdrum: I am now frightened of native exts calling them
<enebo>
nirvdrum: like cat19
<nirvdrum>
Yeah, that's my concern.
<nirvdrum>
And I'm sure there are some enterprising JSR-292 users out there.
elfuego has quit [Quit: elfuego]
<enebo>
nirvdrum: I really really want them gone but I think we ran out of time to figure out what people are using and haven’t gotten anyone to switch
<enebo>
hah
<lopex>
I made cat19 on some depressive winter night, the trauma keeps me till now
<enebo>
lopex: -Xjit.threshold=-1 —dev
<nirvdrum>
The two biggest extensions that make use of String I can think of are jrjackson and json.
<lopex>
enebo: how does it differ from OFF ?
<enebo>
the threshold tells it to never advance to full interpreter
<nirvdrum>
enebo: Maybe go for it and get them to test on Travis and catch issues post pre2?
<enebo>
nirvdrum: we could add back missing ones for anyone who complains
<enebo>
nirvdrum: I wish we had a reasonable list
<enebo>
nirvdrum: I strong suspect cat19 will be used
<enebo>
nirvdrum: and if they use that then probably a few others
<lopex>
enebo: doesnt make any difference for me
<enebo>
nirvdrum: nokogiri would be one eto check out
<lopex>
enebo: or some options should exclude each other ?
<enebo>
lopex: yeah it probably does not how it works
<nirvdrum>
Ahh, right.
dfr|work has quit [Ping timeout: 256 seconds]
<enebo>
lopex: so -X-C (OFF) will run a method jit.threshold times and then ask for a full build (I think that is like 20 right now). Then asynchronously full build for full interp and replace the definition when it finishes.
<nirvdrum>
Yeah, I don't want to break anything on anyone. At the same time, 9k is 2.2+, so calling a method with a "19" prefix should be a red flag.
<enebo>
lopex: so you will see no slow down from compilation but will see more overall CPU activity since you no doubt have more than 1 core
<enebo>
nirvdrum: yeah we need blessed names with annotations and we need to backport those names and need to convert people over with minimum 1.7.x prereq
<enebo>
nirvdrum: then we can make 90_000 and kill bad names
<enebo>
nirvdrum: seems like crap but at least for what people are using it seems like a path forward
JohnBat26 has quit [Ping timeout: 256 seconds]
<lopex>
headius: maybe we should invite that facebook guy here or something, mail conversation wont be very efficient
pjammer has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<lopex>
headius: the issues like, they patch some code that is being generated
<headius>
lopex: that's a very good idea
e_dub has joined #jruby
pjammer has joined #jruby
<lopex>
headius: I looked at that presto code, most of it could be incorporated
<lopex>
as new syntax, etc
<lopex>
headius: but I dont want to make any decisions by my self only
havenwood has joined #jruby
djbkd has joined #jruby
<flavorjones>
enebo nirvdrum: anything I can answer quickly about nokogiri and String?
<nirvdrum>
flavorjones: Any idea what methods you might be calling from org.jruby.RubyString?
<nirvdrum>
flavorjones: If not, I can grep through later.
<flavorjones>
as far as compatibility functions go, to_s19 is the only one, I think
<flavorjones>
oh, also chomp_bang19
<nirvdrum>
flavorjones: Thanks. We'd like to get rid of the *19 variants, but don't want to break things on anyone.
<headius>
lopex: help me out here... when I do mbcToCode, the codepoint that results is what exactly
e_dub has quit [Quit: e_dub]
<flavorjones>
Yeah, I had to jump through one hoop for 9000 compatibility, but headius walked me through it
<flavorjones>
Let me know how I can support the effort
dfr|work has joined #jruby
<nirvdrum>
flavorjones: Unfortunately, not really having an extension API, it's basically just Java visibility. So, don't want to break things on anyone, but also don't want to pay for past sins forever.
<headius>
indeed
<lopex>
headius: depends on the encoding, in general it's a number representing a character as an integer (in unicode case it's the unicode 21 bit codepoint)
<headius>
lopex: I was under the mistaken impression that it was a unicode codepoint always
<lopex>
headius: in those weird encodings like GB* it can be 32bit even
<headius>
how can I get from the encoding's codepoint to a unicode codepoint?
<nirvdrum>
flavorjones: The best thing you could it is test against 9k. It looks like you do test against pre1, so that's great.
<lopex>
headius: in case of utf* it will be a unicode codepoint
<headius>
enebo: I think this is the main problem in the lexer right now...it's getting these codepoints out but then just using them as utf-16 chars
<headius>
lopex: EUC-JP
<headius>
for example
<nirvdrum>
I really don't know where Travis landed on tracking 9k master.
<lopex>
headius: then it's the equivalent of their means of a codepoint
<headius>
nirvdrum: there were some blockers that I never got back to
<lopex>
headius: er, was that sentence correct ?
<headius>
lopex: ok, that explains a lot
zorak8 has quit [Read error: Connection reset by peer]
<headius>
yes
<headius>
so I need to transcode this if I want a unicode codepoint
<headius>
basically
<lopex>
headius: in general there indeed is a gap of smantics between encodings
<flavorjones>
nirvdrum: yup, and if we need to modify nokogiri code to work with 9k specifically we are all OK with that
<headius>
ec.convert(value, in, length, utf32, out, 6, 0);
<headius>
int codepoint = UTF32BEEncoding.INSTANCE.mbcToCode(utf32, 0, out.p);
<headius>
how many lines is rude to paste, I wonder
<headius>
enebo: you think that will be a perf hit for every mbc during parse? :-D
<lopex>
headius: that already uses the transcoding path right ?
<headius>
that should do everything
<enebo>
hmm
<enebo>
headius: actually so long as all the transcoders are presetup this is ok for mbc
<enebo>
headius: in new lexer utf32 is not actually going to exist
e_dub has quit [Quit: e_dub]
<enebo>
headius: and things like in and out will be only alloced once
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<headius>
I'm not going to do this in old lexer
<headius>
but I think I have a grasp of everything that's broken now
<enebo>
ok
<headius>
unfortunately there's multiple places in the code where it's confusing codepoint versus unicode codepoint
sferik has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<headius>
so I can't just make it a unicode codepoint, because stuff like tokenAddMBC wants it to be the original encoding's codepoint
<headius>
but the stringbuffer obviously needs a unicode codepoint
<lopex>
well, there no wonders
<lopex>
:)
<lopex>
headius: what code is that btw ?
<headius>
my code
<lopex>
I mean what component
<headius>
oh, well I put it in lexerSource.readCodepoint
<headius>
LexerSource
<headius>
it's basically just broken as is
<headius>
in a number of ways
<headius>
treating lead byte as codepoint, treating codepoint as unicode
<lopex>
but whatever number and an encoding is always enough for a context
<lopex>
wow I feel like Tim Bray these days
<headius>
heheh
slyphon has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<headius>
this really should be pushing the bytes all the way into the AST as-is
<headius>
I would guess that's the endgame for switching to ripper lexer
<enebo>
headius: well it depends
<headius>
I guess I am looking for your blessing to walk away from this for now
<headius>
what you have might work for unicode but definitely does not for other encodings
<enebo>
headius: for identifiers we end up alloc’ing for staticScope and lvar allocation when we make AST
<headius>
and fixing it is large
<enebo>
headius: but I think parsing ripper lexer to mainline lexer is first part and it will fix most of the mbc problems
<headius>
enebo: mmm good point
<enebo>
headius:
<enebo>
headius: The leading byte might be a better fix than what MRI has for that logic
<enebo>
headius: but we ultimately will have the same logic
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] nirvdrum pushed 1 new commit to master: http://git.io/h6ho
<JRubyGithub>
jruby/master b59faa2 Kevin Menard: Simplified String#reverse.
JRubyGithub has left #jruby [#jruby]
<headius>
yeah, there's just too many levels of plumbing here right now and they all are making bad assumptions about codepoints
<enebo>
headius: I am unclear if I munged that in ripper
<headius>
I can't fix one without breaking others
<enebo>
headius: yeah
<enebo>
headius: well maybe I try and port lexer next week
<enebo>
headius: it will not be done in a couple of hours :)
<headius>
I sympathize
<headius>
do we not have a port of it already for ripper?
<lopex>
I do too
<enebo>
headius: but it will move us to being complete and I think it will also help with startup
<headius>
I'm confused about that
<enebo>
we do but ripper returns completely different things
<enebo>
since it is not building an AST but producing strings for ripper
<headius>
oh right, and it works because it's not actually being parsed
djbkd has quit [Remote host closed the connection]
<headius>
or rather not parsing all the way to ast
<enebo>
MRI makes it work with m4
<headius>
right ok
<enebo>
and even then they have two pieces of code in one file
<headius>
yeah
<headius>
ok
<enebo>
but most of the lexer sans yaccValue returns will be the same code
<headius>
I'm going to move on to the next failure
<enebo>
but once I port it I will need to also update to 2.2 from 2.0
<enebo>
which I will do before I start so ripper is 2.2
<enebo>
ok need to buy brewing supplies
<headius>
ta ta
enebo has quit [Quit: enebo]
anaeem1 has quit [Remote host closed the connection]
anaeem1_ has joined #jruby
<lopex>
headius: btw wrt unicode/regexp perl is still leading the world with it's support for level-whatever-number-it-is unicode compliance and features
<lopex>
but that's just unicode
donV has joined #jruby
<lopex>
the grapheme cluster was withdrawed from mri repo last time I checked
<lopex>
*withdrawn
* lopex
didnt check that in the dict, just occured
<headius>
we should all be using perl
<lopex>
debian does we should too
anaeem1_ has quit [Ping timeout: 256 seconds]
tcrawley is now known as tcrawley-away
<lopex>
headius: there might be issues with GB* 32 bit code points, since in c code it's an unsigned thing
<lopex>
so just mask it with long 0xff..
<headius>
ugh, yeah
elfuego has joined #jruby
djbkd has joined #jruby
sferik has joined #jruby
slyphon has joined #jruby
sferik_ has joined #jruby
sferik has quit [Ping timeout: 264 seconds]
slyphon_ has joined #jruby
slyphon has quit [Ping timeout: 246 seconds]
sferik_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mje113__ has quit [Quit: Connection closed for inactivity]
sferik has joined #jruby
djbkd has quit [Remote host closed the connection]