Eiam has joined #jruby
<Eiam> Hi good folks in #jruby, a superset of the other good folks in #ruby. I am currently migrating a project from ruby to jruby and just trying to map my gems over and get things installed
<Eiam> currently, my understanding is ruby 2.5.1 is not yet supported, I'm locked to 2.5.0 with the 9.2.0.0 engine
<Eiam> is that accurate?
<Eiam> second, I'm trying to bring over my favorite debugger, pry. Locally I can "gem install pry-debugger-jruby" and it installs without issue, but when I include the same thing in my gemfile it fails ,"could not find pry-debugger-jruby" in rubygems repository or installed locally. which is a bit weird, since i just installed it. "gem list" clearly shows "pry-debugger-jruby (1.2.1 java)"
jrafanie has joined #jruby
machty has quit [Ping timeout: 256 seconds]
lopex has quit [Ping timeout: 245 seconds]
electrical_ has quit [Ping timeout: 256 seconds]
machty has joined #jruby
jrafanie has quit [Quit: Textual IRC Client: www.textualapp.com]
electrical_ has joined #jruby
lopex has joined #jruby
knowtheory_ has quit [Ping timeout: 256 seconds]
deathy has quit [Ping timeout: 276 seconds]
flavorjones has quit [Ping timeout: 260 seconds]
duncanm has quit [Ping timeout: 256 seconds]
Iambchop has quit [Ping timeout: 256 seconds]
Scorchin has quit [Ping timeout: 256 seconds]
snowp has quit [Ping timeout: 255 seconds]
fidothe_ has quit [Ping timeout: 276 seconds]
asarih has quit [Ping timeout: 260 seconds]
codefinger has quit [Ping timeout: 256 seconds]
atambo_ has quit [Ping timeout: 256 seconds]
electrical_ has quit [Ping timeout: 245 seconds]
qmx has quit [Ping timeout: 276 seconds]
lopex has quit [Ping timeout: 260 seconds]
machty has quit [Ping timeout: 260 seconds]
zph has quit [Ping timeout: 255 seconds]
phlebas has quit [Ping timeout: 255 seconds]
amitchellbullard has quit [Ping timeout: 255 seconds]
Eiam has quit [Ping timeout: 245 seconds]
deathy has joined #jruby
asarih has joined #jruby
fidothe_ has joined #jruby
qmx has joined #jruby
Iambchop_ has joined #jruby
zph has joined #jruby
codefinger has joined #jruby
atambo_ has joined #jruby
qmx has quit [Ping timeout: 276 seconds]
deathy has quit [Ping timeout: 256 seconds]
asarih has quit [Ping timeout: 276 seconds]
zph has quit [Ping timeout: 265 seconds]
atambo_ has quit [Ping timeout: 240 seconds]
fidothe_ has quit [Ping timeout: 276 seconds]
codefinger has quit [Ping timeout: 260 seconds]
Iambchop_ has quit [Ping timeout: 276 seconds]
<kares> Eiam: sounds like a Bundler issue (assuming you're to read the backlog)
machty has joined #jruby
<GitHub25> [jruby] kares closed issue #4759: unstable ambiguous overload resolution https://git.io/v5GEj
qmx has joined #jruby
fidothe_ has joined #jruby
amitchellbullard has joined #jruby
snowp has joined #jruby
knowtheory_ has joined #jruby
lopex has joined #jruby
flavorjones has joined #jruby
asarih has joined #jruby
electrical_ has joined #jruby
phlebas has joined #jruby
zph has joined #jruby
fidothe_ has joined #jruby
fidothe_ has quit [Changing host]
amitchellbullard has joined #jruby
amitchellbullard has quit [Changing host]
snowp has joined #jruby
snowp has quit [Changing host]
knowtheory_ has joined #jruby
knowtheory_ has quit [Changing host]
deathy has joined #jruby
atambo_ has joined #jruby
codefinger has joined #jruby
Iambchop_ has joined #jruby
<GitHub123> [jruby] kares pushed 5 new commits to master: https://git.io/fsweh
<GitHub123> jruby/master 0303b01 kares: [test] make sure we can run file test on MRI...
<GitHub123> jruby/master e65a3cd kares: [refactor] and split out a few expand-path internals
<GitHub123> jruby/master 536bff4 kares: [test] re-arrange JRuby's file/pathname tests
duncanm has joined #jruby
claudiuinberlin has joined #jruby
Scorchin has joined #jruby
olle has joined #jruby
olle has quit [Client Quit]
Puffball has quit [Quit: Puffball]
travis-ci has joined #jruby
<travis-ci> kares/warbler (master:97da1d0 by kares): The build has errored. (https://travis-ci.org/kares/warbler/builds/394441221)
travis-ci has left #jruby [#jruby]
<GitHub198> [jruby] kares closed issue #4334: improve Ruby's Set performance https://git.io/v1JtJ
<GitHub199> [jruby] kares closed issue #4245: Bad to_s output for extremely small floats https://git.io/vPxMR
rawra has quit [Remote host closed the connection]
<GitHub174> [jruby] kares closed issue #4668: Multi-byte method name is not compatible with CRuby https://git.io/vH5oC
<GitHub157> [jruby] kares closed issue #4580: Define method with GBK name by using 'def' has wrong symbol name https://git.io/v9CFh
travis-ci has joined #jruby
<travis-ci> kares/warbler (master:0ee9978 by kares): The build failed. (https://travis-ci.org/kares/warbler/builds/394448224)
travis-ci has left #jruby [#jruby]
rawra has joined #jruby
rawra has quit [Ping timeout: 256 seconds]
claudiuinberlin has quit [Ping timeout: 265 seconds]
Puffball has joined #jruby
drbobbeaty has joined #jruby
jrafanie has joined #jruby
drbobbeaty has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
drbobbeaty has joined #jruby
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<GitHub196> [jruby] kares created test-readline-1.3.0 (+1 new commit): https://git.io/fG2iv
<GitHub196> jruby/test-readline-1.3.0 f860fb2 kares: let's update jruby-readling to 1.3.0...
<GitHub161> [jruby] elsabio opened issue #5223: Illegal reflective access by org.jruby.util.ShellLauncher https://git.io/fG2X4
drbobbeaty has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rawra has joined #jruby
drbobbeaty has joined #jruby
drbobbeaty has quit [Client Quit]
rawra has quit [Ping timeout: 248 seconds]
<kares> headius: you got access to the json repo? it seems not to be fixing issues
<kares> or enebo ^^
<enebo> kares: I don't think I do the florian one?
<enebo> not sure what to think...I see the guy has been committing to other stuff but he seems pretty awol on this project
<enebo> no commit in 8 months
jrafanie has joined #jruby
<kares> enebo: yep that one
<kares> adding myself to the comments
<kares> thought Charlie might have rights since he has rubygems push right
<enebo> kares: it is probable that he does have commit rights. he is on vacation this week
<kares> okay we'll see if I do not forget to ask him next week or so :)
rawra has joined #jruby
rawra has quit [Ping timeout: 276 seconds]
rawra has joined #jruby
rawra has quit [Ping timeout: 256 seconds]
xardion has quit [Remote host closed the connection]
xardion has joined #jruby
claudiuinberlin has joined #jruby
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
havenwood has quit [Quit: ZNC 1.7.0 - https://znc.in]
havenwood has joined #jruby
havenwood has quit [Changing host]
havenwood has joined #jruby
init has joined #jruby
init has left #jruby [#jruby]
Eiam has joined #jruby
claudiuinberlin has joined #jruby
subbu is now known as subbu|lunch
rawra has joined #jruby
rawra has quit [Ping timeout: 256 seconds]
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<enebo> lopex: neat
<lopex> enebo: to what extent do they have to go for having php codebase
<enebo> lopex: I guess
<enebo> lopex: run it on ruby executable!
<enebo> lopex: but ruby loads the universe so this instr starvation no doubt is not a big part of startup
<lopex> enebo: funcall's would kill it
<enebo> lopex: it will be fun to use a tool like that and see how various things do...does rust via LLVM generation get anything?
<lopex> enebo: this and memory read stalls where primary causes intel introduced HT right ?
subbu|lunch is now known as subbu
<enebo> lopex: I don't know
<lopex> enebo: so if one thread stalled (or flushed) and waits for memory
<lopex> there might be a chance another one would resume and do anything :P
<enebo> lopex: well if you are reading pages between thread context switches no doubt packing that code into less pages can only be good
<enebo> oh you are talking about intel bugs
<lopex> enebo: also how it plays with caches
<enebo> I don't know
<lopex> no
<lopex> just HT
<enebo> I never read about how hyperthreading actually works
<enebo> fwiw I have never been very interested as I almost never see it work out for me
<lopex> enebo: I recall from what Click said
<enebo> ok
<lopex> or it was one of it's uses
<lopex> stalls
<enebo> so this release is given to LLVM
<enebo> that is pretty nice
<lopex> enebo: but for the most part he complained about lack of good profiling tools
<lopex> hardware counters etc
<lopex> you just dont know how much your code is stalling
<enebo> I remember his page fault talk and modern hardware talk but it was a long time ago that I saw it
<enebo> cache misses is the death of continuing perf improvements
<lopex> yeah, same on his last talk
<lopex> and no good way to measure it
<enebo> lopex: I guess he have revised and modernized the talk a bit in the last year or two
<lopex> yeah, I'm talking about this one
<lopex> but stalls/misses still dominant
<enebo> I saw it like 7-8 years ago so I just remember very broad strokes :)
<lopex> ram is new hard disk
<lopex> of not for ram thins would go 10x faster
<lopex> up to 10x
<lopex> and then "jvm does that?" talk
<lopex> enebo: so I'm wondering about this open addressing hash
<lopex> enebo: if you allocate a bunch of buckets in a row
<lopex> they should still be in the same cache lines right ?
<lopex> the bucket introduce indirections sure
<enebo> well memory locality of n objects linked by references is almost always going to be worse than just relying on a primitive array
<lopex> yeah
<enebo> I fully expect to see improved performance in those benchmarks with the last round of changes
<lopex> sure
<lopex> enebo: but you should see better diff when making puts interleaved by other allocations
<enebo> GC handbook talks about some collectors relocating on locality of object references but I don't think any JVM collectors do it.
<lopex> so the buckets are more scattered
<enebo> The handbook made it sounds very difficult
<lopex> and not that indirections are dominant
<enebo> lopex: yeah in real life we are not hashing the same thing over and over in a loop so it should only improve
<enebo> I guess I don't know how much it matters in Java though
<lopex> enebo: oh, how many locality metrics are there ?
<enebo> After all we have objects all over the place all the time
<lopex> I guess more than one
<enebo> so having good locality is good but it may not be visible in the sea of cache misses
<enebo> I have no idea though
<lopex> so we go back to profiling tools
<enebo> yep
<enebo> the notion we are able to control this very much at the level we are at probably is wishful thinking but I do expect that primitive array version to microbench faster
<lopex> enebo: and funny thing is that all is not for von neuman fault
<lopex> just ram
<lopex> and that fast flip flop takes up to 6 transistors
<lopex> and ram bit is just one transistor and a capacitor
<lopex> and that cap is responsible for all that
<lopex> enebo: ah, I posted this for headius once: https://www.youtube.com/watch?v=8mFl8fywIP4&t=15m45s
<enebo> lopex: thanks...afk a little bit
claudiuinberlin has joined #jruby
claudiuinberlin has quit [Quit: Textual IRC Client: www.textualapp.com]
<ChrisBr> enebo: I added some numbers to the PR
<ChrisBr> no idea how to calculate the memory you said
<ChrisBr> surprisingly without the HashEntry objects it seems to be slower for hashes > 1000 elements :(
<lopex> ChrisBr: hiya
<lopex> ChrisBr: might be collisions ?
<lopex> in open addressing you usually do more work but gain on cache locality
<enebo> ChrisBr: ok I will check them out
<lopex> ultimately you still have the load factor too
<lopex> ChrisBr: also take a look at https://en.wikipedia.org/wiki/Cuckoo_hashing
<ChrisBr> yeah right! But we have a max load factor of 50%
<enebo> lopex: how much is object record sizewise: I remember 23 bytes?
<enebo> or words
<lopex> enebo: hmm,
<lopex> class is a pointer
<lopex> hash is always 32 bit
<lopex> and bit mask integer
<lopex> enebo: depends how you count
<enebo> there is also compressed storage now too for fields
<enebo> in this case though that would not apply
<lopex> so the ref itself, class, 32 bit hashcode, and an int for metadata
<enebo> ChrisBr: Ignoring growing array you can just try different linear sizes and see when it is better
<lopex> enebo: not sure how packed they are wrt alignement
<lopex> enebo: and a size for arrays
<enebo> lopex: but for this bucket we basically are referencing object and using a long
<enebo> so those will just align
<lopex> enebo: and next, prev
<lopex> and key
<lopex> and value
<enebo> lopex: yeah but all aligned
<lopex> if you're talking about a bucket
<enebo> yeah linked list is significant
<ChrisBr> enebo: so you mean trying with smaller inital size?
<lopex> yeah, words are always aligned
<lopex> in java
<enebo> ChrisBr: just saying 15 seems like it is clearly slower at linear
<enebo> ChrisBr: half makes me wonder if MRI even picked a reasonable size
<enebo> 15 seems like a human just picked it
<enebo> I guess it is 1 less than 16
<lopex> enebo: afaik mri is insane and it once had 2x
<lopex> enebo: so guaranteed collistions
<lopex> not sure what it does now
<lopex> ChrisBr: java is 0.75
<enebo> you know I did not really ever look at this PR
<ChrisBr> enebo: size it 16 :) did I write 15 ? :/
<enebo> so the RubyHashEntry is still there so my comment about removing it makes no sense since it still exists
<lopex> ChrisBr: do you also use those MRI magic exp numbers etc ?
<enebo> ChrisBr: oh well I naively assumed testing 15 and 16 was showing boundary difference unless 16 is 0 elements to 15?
<enebo> I guess maybe I should not talk too much right after a run though
<enebo> you probably do mean 0-15 elements is linear where 0 is pretty much no search but still linear
<ChrisBr> right, so I test 16 elements (0-15 - liner search) and then I test 16 elements (hashing)
<enebo> I guess I would try 8
<ChrisBr> yeah, right
<enebo> and maybe even 4 but just to see
<ChrisBr> lopex: magic exp numbers?
<ChrisBr> like the 16 for linear search?
<lopex> ChrisBr: oh I mean the "feature" arrays
<enebo> this version allocates a rubyhashentry every time you search?
<ChrisBr> for put not, for get I create a temporary RubyHashEntry to return it
<ChrisBr> otherwise I would need to change the "interface" everywhere
<ChrisBr> but I only store the RubyObjects and not the RubyHashEntry's
<enebo> ChrisBr: yeah I see. I bet that is showing up in the get bench. This version is trading search locality with an allocation
<ChrisBr> so it is "just" a temporary object, but sure we would also need to get rid of it at some point
<enebo> ChrisBr: a benchmark play thing would be to reuse a single instance to see how much it changes get performance
<enebo> ChrisBr: that might make us consider whether we want to change the API or not
<ChrisBr> single instance you mean retrieving always the same key?
<lopex> just using the same entry as a singleton
<enebo> no I mean allocation a since RubyHashEntry and basically just set the values into that single instance
<lopex> for the benchmark
<ChrisBr> ah right, ok
<ChrisBr> I can try that
<enebo> that may have been a garbled sentence :P
<enebo> but so long as you could parse it
<lopex> enebo: actually what interface sohuld be changed ?
<ChrisBr> lopex: interface was maybe the wrong word
<ChrisBr> method signature
<lopex> ChrisBr: then do it :P
<ChrisBr> this is still "quick & dirty" ;)
<enebo> lopex: I don't know but if that allocation is big part of get perf then maybe we consider changing API
<enebo> ChrisBr: this is just an experiment :)
<enebo> an evil one
<lopex> ChrisBr: the entry thing should not be transparent for internal jruby api
<lopex> ChrisBr: we could construct it for JI though
<lopex> enebo: seems fair enough ?
<enebo> lopex: not sure I got that. I thought you meant since it is internal we can change it
<lopex> enebo: yes, but java allow to iterate over entries afaik ?
<enebo> lopex: oh I see
<enebo> lopex: ah yeah not sure how iteration would work but I am not sure how much we care if it is fast or slow in JI case
<lopex> enebo: yeah it's not a concern for us wrt jruby api
<enebo> lopex: I guess internally we can iterate over it in a less boxed way
<enebo> lopex: but for implementing Map I guess I don't know
<lopex> enebo: java's Map.Entry and entrySet
<enebo> lopex: but don't we already box into some Entry object Java wants in that case?
<enebo> so RubyHashEntry is not really important in that case is it?
<lopex> enebo: yeah, at very least we reconstruct the thing
<lopex> enebo: yes
<enebo> lopex: but don't we already or does RubyHashEntry implement Entry?
<lopex> enebo: I mean agreed
<enebo> lopex: ok
<lopex> enebo: yeah, good catch, and probably I made it so
<enebo> lopex: so that is a concern
<lopex> enebo: we're old
<lopex> enebo: why ?
<lopex> enebo: I mean only for JI
<enebo> well maybe not too bad a concern but now enumeration from Java needs to allocate no instances
<enebo> with this change it will get slower
<enebo> internally so long as we don't use that then it won't affect "ruby"
<lopex> enebo: depends on the usage yes
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<enebo> but anyone in JI land who passes it into java will see it slow down. So by concern i mean we should see how bad that is
<enebo> It might not be bad enough to care
<lopex> enebo: unless it's mitigated by the gains
<enebo> true
<enebo> I can see fetch is quite a bit faster with the new version
<lopex> enebo: hmm, good call, it might be the reason java havent introduced open addressing
<lopex> right ?
<enebo> no hmm
<enebo> it is slower on fetch
<enebo> I read it backwards
<enebo> so I bet allocation is the difference
<lopex> definitely
<lopex> enebo: lolz, actually java api's usage might be the reason java will not introduce open addressing
<enebo> lopex: yeah possibly
<lopex> and it will be the exposure of the entry type
<enebo> Java is a big ship with a lot of cargo
<lopex> enebo: just like the hashcode
<lopex> enebo: and tonn of momentum
<lopex> a ton
<enebo> I wonder how well graal deals with this microbench
<lopex> enebo: you mean excape analysis ?
<enebo> yes
<lopex> enebo: I sort of though hotspot would make it work
<lopex> thought
<enebo> In case of temp alloc instance
<enebo> yeah it seems very limited in use
<enebo> shit is ripped out from method which makes it and it is read only
<enebo> Even if graal kills it with perf I am not sure we can just roll with it or not
<ChrisBr> enebo: lopex: for get I also do not use the hash anymore because I don't store it anymore! Do you think it makes a difference to still calculate the hash and compare instead of the values?
<lopex> enebo: I dont know, print inlining might give some insight
<enebo> ChrisBr: maybe. It is a difference
<lopex> ChrisBr: I think you cannot rely on hash perf being cheap
<lopex> er
<enebo> some objects do deep hash calcs right?
<lopex> yes
<enebo> like struct?
<lopex> but wait
<lopex> I'm confused
<lopex> you get hash, find a bucket and when do you use it the second time ?
<lopex> same for open addressing right ?
<lopex> enebo: what you do is equals then
<ChrisBr> so for the key I want to insert / fetch I need to calc hash and bucket, yes
<ChrisBr> but for everything what is already there, I don't have the hash anymore (because I only store the key & value object)
<ChrisBr> so I would need to calc the hash for every element (for linear search for every iteration)
<lopex> doh, it's for rehash
<lopex> enebo: ^^
<lopex> and just rehash ?
<enebo> caching hash?
<lopex> yes
<lopex> and copy
<lopex> seems right
<enebo> just to know whether it needs to move?
<enebo> it compares against fresh hashCode?
<lopex> for rehash ?
<enebo> yeah
<enebo> I am asking you
<enebo> Seems like RubyString could really cache hashcode and invalidate if contents change
<enebo> it recalcs every hashCode call
<ChrisBr> before we stored the hash inside the RubyHashEntry
<enebo> unrelated
<ChrisBr> then for fetching, putting, deleting etc we compared the hash and then equals
<lopex> enebo: no, just to copy the hashes
<enebo> ChrisBr: lopex I thought that was just used for rehash
<ChrisBr> because we already had the hash for the new elements and existing ones so it is cheaper to compare than the equals
<lopex> since rehash is a form of copy :P
<ChrisBr> now we don't store them anymore so we would need to calculate the hash on the fly
<enebo> ChrisBr: so you might want to use a String as part of bench in addition to Fixnum since that recalcs hashCode all the time
<lopex> enebo: aaaah
<enebo> the fixnum one is pretty much free
<lopex> enebo: it's used for fast skip on bucket search
<ChrisBr> right
<lopex> er, it doesnt make sense
<lopex> wait
<ChrisBr> that is the question: is it still fast skip if we need to calc the hash on the fly or do we just do an equals
<lopex> yeah, actually when bucket(hash1) != bucket(hash2) and hash1 != hash2
<lopex> bucket loosed information yes
<lopex> jeeze it was so long ago
<lopex> well, it's a fast skip after all
<lopex> ChrisBr: yeah, since hash for ruby potentially calls dozens of ruby objects by method call
<lopex> ChrisBr: or
<enebo> I have to go to dinner now but hopefully you two will figure this out I guess removing the hash comparison from internalKeyExist makes me wonder what happens if key contents change
<lopex> ChrisBr: if we minimize the collisions by increasing load factor we can get rid of it
<lopex> enebo: ^^
<lopex> enebo: and thar what mri seems to be doing
<enebo> although that question makes me think finding the same object if object state exists is bizarre in first place
<lopex> enebo: ^^
<lopex> enebo: makes sens ?
<lopex> *sense
<enebo> lopex: higher factor means more buckets so less items likely to be in same one
<enebo> lopex: more buckets compared to number of entries in hash
<enebo> that was awkward way of saying that
<enebo> I mean relationship as more entries are added more buckets would be added compared to using a lower load factor
<enebo> so less collision chance
<enebo> but any collision will require some eql
<ChrisBr> my benchmark is kinda unreliable, sometimes it is faster but sometimes not :(
<enebo> heh
<enebo> ChrisBr: I did mean that yeah
<lopex> enebo: yes, but that's what mri does doesnt it ?
<enebo> lopex: I don't know
<enebo> lopex: could be
<lopex> enebo: I bet
<enebo> It makes sense with less collisions hashing would be faster
<lopex> enebo: caching hash greatly simplifies that for us
<lopex> enebo: *not caching
<enebo> eql can be very expensive
<lopex> doh
<lopex> enebo: yes, but it seems to be mitigated by thata from mris perspective
<enebo> sure
<enebo> makes sense as a theory but I cannot tell you why they did it :)
<ChrisBr> so the load factor should be at max 50% as bin array is always two times bigger than the entries array ...
<enebo> seems like a good theory though
<lopex> enebo: also in c they could be using a scheme like (key, hash, index) as entries in an arrays itself
<lopex> enebo: we cant
<lopex> enebo: right ?
<ChrisBr> anyway, sleeping time in Germany! cu tomorrow & thanks for the help
<lopex> enebo: we cant use Unsafe here
<enebo> no we could have int[] hash, index and Object for key, value
<enebo> but two arrays
<enebo> ChrisBr: thanks talk to you later
<lopex> ChrisBr: seeya, we'll be waiting for you
<enebo> lopex: gotta go too now
<lopex> enebo: ok, so, next time
<ChrisBr> we already have now two arrays! One for the buckets and the other one with the key & values
<ChrisBr> or do you mean to also store the hash in one of the array?
<lopex> yes, canonical open addressing
<ChrisBr> anyway, cu tomorrow ;)
<lopex> ChrisBr: for now the theory is not I guess
<lopex> ChrisBr: since it depends on hashing density (high density == lots of eql calls) and vice versa