subbu|away is now known as subbu
adam12 has quit [Read error: Connection reset by peer]
adam12 has joined #jruby
_whitelogger has joined #jruby
ur5us has quit [Ping timeout: 246 seconds]
_whitelogger has joined #jruby
_whitelogger has joined #jruby
claudiuinberlin has joined #jruby
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ur5us has joined #jruby
_whitelogger has joined #jruby
den_d has quit [Ping timeout: 256 seconds]
Liothen has quit [Ping timeout: 256 seconds]
den_d has joined #jruby
Liothen has joined #jruby
claudiuinberlin has joined #jruby
ur5us has quit [Ping timeout: 246 seconds]
drbobbeaty has joined #jruby
_whitelogger has joined #jruby
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
claudiuinberlin has joined #jruby
_whitelogger has quit [Remote host closed the connection]
_whitelogger_ has joined #jruby
lucasb has joined #jruby
xardion has quit [Remote host closed the connection]
xardion has joined #jruby
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
claudiuinberlin has joined #jruby
<headius[m]> woot, Range#bsearch has been aligned with CRuby
<headius[m]> might be complex enough that a port to Java is warranted (it's pure Ruby now)
travis-ci has joined #jruby
<travis-ci> jruby/jruby (ruby-2.6:419b6e6 by Charles Oliver Nutter): The build is still failing. https://travis-ci.org/jruby/jruby/builds/664524260 [193 min 45 sec]
travis-ci has left #jruby [#jruby]
<headius[m]> enebo: ok I think this is final version other than porting to Java at some point: https://gist.github.com/headius/1eb3151339b6ac1bc7bfa7a67f7d4cfc
<headius[m]> the block version was cute but I realized it was only using blocks because of those two state variable and the non-local return
<headius[m]> so I just left the return sled "ret" check in there
<headius[m]> this should have no block overhead other than the original conditional, and now only two ivars
<enebo[m]> headius: looks reasonable to me
<enebo[m]> Will it compile if you had manually inlined all check where they are called? It would be heinous but it could even kill needing an instance and the two vars right?
<headius[m]> hmm, maybe
<headius[m]> I think intellij can automatically do it so I can give it a try
<enebo[m]> If you try it then I would add a nice "begin/end" set of comments
<enebo[m]> but not allocing the instance and no ivars you would think would help
<headius[m]> yeah, wouldn't need the BSearch object either then
<enebo[m]> feels like some old school rbx code for eliminating expensive constructs but whatevs
<enebo[m]> "if the code fits you must commit" -Gittie Cochran
<headius[m]> there's probably a better way to write this algorithm that isn't so C like but I think this is fine
<headius[m]> appears to jit everything involved ok with check inlined
<headius[m]> enebo: updated gist above with new version
<headius[m]> no state ivars, no BSearch object, no condition block procification
subbu is now known as subbu|lunch
<headius[m]> (should pass through without becoming proc)
lucasb has quit [Quit: Connection closed for inactivity]
travis-ci has joined #jruby
<travis-ci> jruby/jruby (ruby-2.6:e972c06 by Charles Oliver Nutter): The build is still failing. https://travis-ci.org/jruby/jruby/builds/664567544 [188 min 28 sec]
travis-ci has left #jruby [#jruby]
ur5us has joined #jruby
<headius[m]> ok one more rev... it was simple enough to pull out the conditional bodies into their own methods, so it should compile better now
subbu|lunch is now known as subbu
<headius[m]> fzakaria: so bsearch on infinite range... it works by starting with an increment of 1 and then doubling that at each iteration until the condition indicates we've passed the value in question
<headius[m]> so it basically tries exponentially higher (or lower) values until the desired search value is bracketed, and then does a normal binary search on that range
<headius[m]> seems a little weird but whatever
travis-ci has joined #jruby
<travis-ci> jruby/jruby (ruby-2.6:ade293b by Charles Oliver Nutter): The build is still failing. https://travis-ci.org/jruby/jruby/builds/664574553 [193 min 9 sec]
travis-ci has left #jruby [#jruby]
drbobbeaty has quit [Ping timeout: 256 seconds]
travis-ci has joined #jruby
<travis-ci> jruby/jruby (ruby-2.6:6727777 by Charles Oliver Nutter): The build has errored. https://travis-ci.org/jruby/jruby/builds/664588280 [198 min 8 sec]
travis-ci has left #jruby [#jruby]
<fzakaria[m]> but its infinite!
<fzakaria[m]> ;)
sagax has quit [Quit: Konversation terminated!]
travis-ci has joined #jruby
<travis-ci> jruby/jruby (ruby-2.6:ca13b03 by Charles Oliver Nutter): The build failed. https://travis-ci.org/jruby/jruby/builds/664599995 [188 min 53 sec]
travis-ci has left #jruby [#jruby]
<headius[m]> fzakaria: yeah it is a strange feature but I'm guessing they did this so bsearch would at least do something on an infinite range
sagax has joined #jruby
sagax has quit [Ping timeout: 250 seconds]
sagax has joined #jruby
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ur5us has quit [Ping timeout: 246 seconds]
ur5us has joined #jruby