_whitelogger has joined #jruby
rusk has joined #jruby
travis-ci has joined #jruby
<travis-ci> jruby/jruby (enum-yield:56db452 by kares): The build passed. https://travis-ci.org/jruby/jruby/builds/566819308 [234 min 25 sec]
travis-ci has left #jruby [#jruby]
_whitelogger has joined #jruby
shellac has joined #jruby
shellac has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
shellac has joined #jruby
whitingjr has joined #jruby
whitingjr has quit [Ping timeout: 272 seconds]
<headius[m]> 😳
rusk has quit [Read error: Connection reset by peer]
<headius[m]> kares awesome
rusk has joined #jruby
<headius[m]> I've known for a while we had hacks interfering with hacks but wasn't sure where to start unraveling it
<headius[m]> I'd love to go pure Ruby with enumerable, but you can't represent all argument passing in pure Ruby
<kares[m]> yep - lazy is still problematic but certainly not worse than it was
<kares[m]> looking at rubinius impl atm ... seems were on par with them
<kares[m]> I wonder if they pass all yielder + lazy specs
shellac has quit [Quit: Computer has gone to sleep.]
shellac has joined #jruby
<headius[m]> Yeah I believe everyone except MRI is running the same pure Ruby lazy enumerator based on Marc-André's backport lib
<headius[m]> Which of course also has the same argument processing problems
sagax has quit [Remote host closed the connection]
lucasb has joined #jruby
<headius[m]> Ok back to work
sagax has joined #jruby
<headius[m]> I'm going to audit 9.2.8 bugs until I don't see anything I think I can fix for this release...at that point I'll go back and try to get my global vars patch better
<headius[m]> oh kares...I think I saw a perf regression
<headius[m]> numeric related
<kares[m]> headius: ooh, that would be unexpected? did some micro-benchmarks and we were doing better
<kares[m]> do you have any details?
<headius[m]> yeah sorry got distracted
<headius[m]> I was just benchmarking a loop without indy
<headius[m]> with indy they're both zippy
<headius[m]> we need a benchmark CI :-(
<kares[m]> interesting, will take a look if its due: https://github.com/jruby/jruby/pull/4736
<headius[m]> I'll look again too
<kares[m]> you're right I am seeing this on HotSpot as well
<headius[m]> oh sorry
<headius[m]> I did run on hotspot yesterday
<headius[m]> I noticed my numbers today were slower but didn't think of it
<headius[m]> but the ratio is similar
<headius[m]> also...come on J9...you gotta do better than that
<headius[m]> I wonder if we should try to make isBuiltin final
<headius[m]> just requires propagating flags into soe delegating wrappers
<headius[m]> some
<enebo> could we do something crazy like make builtin methods a type and use instanceof
<headius[m]> kares: floats degrade less
<headius[m]> data point of uncertain significance
<enebo> It would mean any movement of a builtin would need to make a new type which would be hairy
<enebo> but instanceof is cheap
<enebo[m]> enebo: It would mean any movement of a builtin would need to make a new type which would be hairy
<enebo[m]> enebo: but instanceof is cheap
<enebo[m]> weirdly this did not come from irc
<enebo[m]> Is this thing on?
<enebo[m]> :P
<headius[m]> builtin methods are a type already
<headius[m]> they're all subclasses of JavaMethod
<headius[m]> instanceof might be faster depending on how a polymorphic isBuiltin optimizes
<headius[m]> also my JavaMethod pyramid is unnecessarily complex
<headius[m]> reminds me of my Student Server architecture proposal in 1998
<enebo[m]> but if we alias a builtin it will still be a builtin if we can depend on JavaMethod
<headius[m]> isBuiltin will not work when it's implemented in pure Ruby
<headius[m]> will not/does not
<headius[m]> that doesn't affect current cases but it's something to considered
<headius[m]> I mean a type-based isBuiltin
<headius[m]> flag-based can work for both
Antiarc has quit [Ping timeout: 245 seconds]
<kares[m]> reverting to isBuiltin gives better numbers but still not on par w 9.2.7
<enebo[m]> Not to overthink this but we could decide the type based on whether it has ever been added or not but that opens up other oddities
<kares[m]> * I meant reverting isBuiltin to isFixnumReopened
<enebo[m]> atomicity coping with deletion then addition etc
<headius[m]> it does check if the entry is valid multiple times
<headius[m]> which requires a read from the class
<headius[m]> but I'd expect float to degrade more
<enebo[m]> Another thought is static boolean reallyBuitin(DynamicMethod m) { return m instanceof JavaMethod || m.isBultin(); }
<headius[m]> oh but guarded by instanceof
<headius[m]> hmmmm
<headius[m]> I wish this was all indy because the guard would be a no-op
<headius[m]> yeah that might work
<enebo[m]> Might be worth a shot
<headius[m]> I'm trying that enebo
<headius[m]> might be a little better but 9.2.7 is still 2x
<headius[m]> running an alloc profile
<headius[m]> ugh runhprof is so slow...why hasn't openjdk started shipping async profiler yet
<headius[m]> well that didn't help much...dominated by fixnums of course
<kares[m]> oh I know why I missed these ... got biased and mostly tested when Fixnum/Float is re-opened (but +/i etc stays the same) - as in Rails
<enebo[m]> is this merged with master?
<headius[m]> well an obvious difference is that isFixnumReopened doesn't have to fetch entry, call isOk, retrieve method, or call isBuiltin
<enebo[m]> how old is the branch
<enebo[m]> master Fixnums will end up caching in the operand and bypass the fixnum cache
<kares[m]> yy
<headius[m]> jit will see that
<headius[m]> should
<headius[m]> as long as it is OneFixnumArgNoBlockCallInstr in IR
<headius[m]> call_1f(%t_i_15, fix<1>, fixNum: 1, callType: NORMAL, name: +, potentiallyRefined: false)
<headius[m]> INVOKESTATIC DashE.invokeOtherOneFixnum3:+ (Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
<headius[m]> and that calls
<headius[m]> INVOKEVIRTUAL org/jruby/runtime/CallSite.call (Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/builtin/IRubyObject;J)Lorg/jruby/runtime/builtin/IRubyObject;
<headius[m]> so it's not using the fixnum object
<headius[m]> good thought though
<headius[m]> that call path should probably pass both long and RubyFixnum so we're not constructing the fixnum all the time if it's not the method we think it is
<headius[m]> but that's nothing new
<headius[m]> kares: modifying both Lt and Plus sites to use isFixnumReopened does go back to 9.2.7 perf
<kares[m]> yeah I got that far
<headius[m]> a stupid fix would be to split isFixnumReopened into isFixnumPlusRedefined etc but obviously that's gross
<headius[m]> I wish we had value types so CacheEntry would not have to be traversed
<headius[m]> or some way to atomically cache the entry.ok and isBuiltin check all at once
<headius[m]> hmm yeah...so indy gets around this by only binding the fast method if entry is ok and isBuiltin
<headius[m]> invalidation kills both bits at once
<headius[m]> three-way cache?
<headius[m]> builtinFixnumEntry, builtinFloatEntry, entry
<headius[m]> an entry can't change from builtin to non-builtin so we're checking that a lot more than necessary
<headius[m]> actually just builtinEntry since we already branch on type
<headius[m]> if instanceof Fixnum && builtinEntry.isOk
<headius[m]> it's a bit less overhead anyway
<headius[m]> better, still slower though
<headius[m]> atomicity 🤷🏻‍♂️
<headius[m]> hard to match indy here since you do all the checking up front and it only invalidates if method table changes
<headius[m]> passively
shellac has quit [Ping timeout: 268 seconds]
rusk has quit [Remote host closed the connection]
xardion has quit [Remote host closed the connection]
xardion has joined #jruby
Antiarc has joined #jruby
rtyler has quit [Quit: ZNC 1.7.3 - https://znc.in]
rtyler has joined #jruby
rtyler has joined #jruby
rtyler has quit [Changing host]
lucasb has quit [Quit: Connection closed for inactivity]
Ryctolagus has joined #jruby
<Ryctolagus> I am desperate search of an editor/IDE that is snappy like vim with MRI. My employer requires use of a windows work station and deployment, hence the migration to JRuby, any help is greatly appreaceated.
<kares[m]> just install vim on win ... you have the linux sub-system in win 10
<enebo[m]> vim and emacs work great on wsl on win 10
<enebo[m]> havenwood: you like vs? I have not tried it
<enebo[m]> havenwood: I was especially interested in C support
<havenwood> enebo[m]: we use it for screencasts, which got me trying it, and I do like it
<havenwood> enebo: it reminds me of Atom, but better Ruby support with the default plugin
<enebo[m]> havenwood: cool. I want a nicer C IDE for looking at MRI code so I may try it on LINUX!
<havenwood> Moving convo here from #ruby. Ryctolagus is on Win 7, so no WSL.
<havenwood> <Ryctolagus>:havenwood: rubymine with Jruby is s.l.o.w. rubocop takes about 5-6 seconds to notice a change in the file.
<havenwood> Ryctolagus: Are you using the --dev flag?
<Ryctolagus> havenwood: thanks
<Ryctolagus> havenwood: trying to find that setting in rubymine.... this is why I stick to vim...
<Ryctolagus> Anyone get jruby to work with vim on windows 7? MRI works like a charm and is snappy within vim.
<headius[m]> JRuby should work fine on Win7+
<headius[m]> we test a full (simple) Rails app on Windows before every release
<Ryctolagus> Yes it does I just can't get Vim to see it with any of my standard Ruby plugins
<Ryctolagus> JRuby running performant on windows is why we are going to it over MRI
<headius[m]> Ah well that's more likely a problem with the Ruby plugins
<headius[m]> FWIW I wouldn't recommend using JRuby as your vim Ruby plugin if that means it has to be firing off lots of subprocesses, because that will be pretty slow
<headius[m]> if it's just about occasionally running code that should be fine
<Ryctolagus> ah, that may be what I am encountering.
<headius[m]> but like some people plug it in to do syntax checking every keypress or whatever
<headius[m]> yeah we run well if the same process stays up for more than say 10 seconds, but constantly starting a new process will be slow every time
<headius[m]> --dev will help
<headius[m]> but not enough
<Ryctolagus> semi new to the ruby community, it is bad juju to develop an application in MRI and deploy to JRuby?
<Ryctolagus> I am assuming something could and would break
<headius[m]> is this a single background rubocop process though?
<headius[m]> if it's a long-running rubocop monitoring the dir the problem might be it's not using real filesystem events and is instead scanning dirs
<headius[m]> which would explain a delay picking up changes
<Ryctolagus> for the dev, yes it is a single background process.
<headius[m]> I'm just brainstorming here...I don't know what your setup is
<Ryctolagus> I am thankful for any advice here.
<headius[m]> let's see what rubocop uses for monitoring...
<headius[m]> 0.79 seriously? doesn't anyone ever release 1.0 anymore
<headius[m]> er 0.74
<headius[m]> hmm the dependencies don't point at any specific filesystem notification lib
<headius[m]> is there another library like rubocop-notify or something?
<Ryctolagus> yep it's directory scanning in rubymine... thats the culprit.
<headius[m]> I have never set up rubocop to monitor a dir
<headius[m]> ahh maybe this https://github.com/guard/listen
<headius[m]> ok
<Ryctolagus> that is worth looking into.
<headius[m]> aha
<headius[m]> depends on "wdm" for optimized monitoring on Windows
<Ryctolagus> nice!
<headius[m]> which is a C extension
<headius[m]> so that's probably it
<headius[m]> sigh
<headius[m]> so listen will fall back on polling
<Ryctolagus> I think I may be better off hacking on vim, at least I would be in familiar waters.
<headius[m]> we need to make listen gem an adapter for JRuby (Java has a cross-platform filesystem event API already)
<headius[m]> the journey never ends!
<Ryctolagus> Windows is just a pita, there is no avoiding it.
<headius[m]> yeah but this is great to know now
<headius[m]> probably wouldn't be more than a few lines of Ruby to add effiicent filesystem monitoring for JRuby
<Ryctolagus> woot!
<headius[m]> huh where does MRI put its JIT output?
<havenwood> headius[m]: /tmp
<havenwood> headius[m]: (taking advantage of Linux treating that dir as in-mem)
<headius[m]> I can't find anything there on macos
<headius[m]> maybe I'm doing somethingwrong
<headius[m]> I just wanted to see how big the .so for a trivial method is
<headius[m]> you're on linux with a jit-enabled Ruby? Maybe you can try this and see if you can dig up the .so: ruby --jit -e 'def foo; 1 + 1; end; 100000000.times { foo }; sleep'
<headius[m]> at first I tried running "gem list" but didn't get anything from that either
<havenwood> headius[m]: --jit-save-temps keeps them paste execution
<havenwood> past*
<headius[m]> I tried to sleep but maybe it's culling them via GC or something
<headius[m]> thanks I'll try that
<havenwood> headius[m]: that flag should persist the .c .o .so files
<havenwood> _ruby_mjit_p18322u101.{c,o,so}
<headius[m]> is that the filenames you see in /tmp
<headius[m]> I see no change...something's screwy here I guess
<headius[m]> maybe it doesn't work on macos yet?
<headius[m]> and that's directly under tmp?
<headius[m]> I have nothing like that
<headius[m]> find doesn't produce any .c or .so in /tmp/**
<havenwood> headius[m]: hrm, I can't see any files on macOS either...
<headius[m]> hmm no I see posts saying it's tested on mac
<havenwood> but i can on Linux
<headius[m]> ok so it's not just me
<headius[m]> that's fine I can spin up a linux
<headius[m]> oh but my vbox busted
<havenwood> yeah, nothing in top level /tmp for me on macOS, and #TMP isn't set.
<headius[m]> anyway thanks
<havenwood> np, odd the temp jit files aren't showing up on macOS
<headius[m]> yeah could be somewhere else or could be environment issue preventing it from using jit
<headius[m]> I thought this worked for me before but maybe I was looking at linux
<havenwood> headius[m]: It seem enabled: ruby --jit -e "puts RubyVM::MJIT.enabled?" #=> true
<havenwood> And benchmarks show it's enabled. I don't know why the temp files don't persist in top level /tmp.
<headius[m]> they aren't there even if I make it sleep
<headius[m]> I'm going to ask twitter and take dinner
<headius[m]> havenwood: I just realized your listing has sizes so that mostly answers my question anyway
<headius[m]> so the jit can produce .so's that are as small as a few kb
Ryctolagus has quit [Quit: Leaving]
drbobbeaty has quit [Ping timeout: 250 seconds]