<headius> No way to change the name of a class
<headius> Rewriting in Ruby sounds great
<headius> Kernel#` is the method, in rubykernel
<byteit101[m]> Ah excellent, thanks! Mixing subspawn and ruby's native Process.* will cause weird issues if you inspect $? then
<byteit101[m]> module Kernel; def ` (*args); puts "Kerneling #{args.inspect}"; end; end;
<byteit101[m]> i'll be, that's the most surprising working ruby I've seen this decade!
<byteit101[m]> I'm hoping your optimization work is going well, I feel like I'm 90% of the way to making some sort of ouroboros, Kernel#` calls Open3.capture2 calls Process.spawn calls SubSpawn.spawn_compat calls the right backend to actually do the spawn :-D
<byteit101[m]> > Realized a dumb optimization that can be handy: j = 0; p Time.now.to_f; 100_000.times{|i| require 'json'; j+=i;}; p Time.now.to_f
<byteit101[m]> ^ do you want a ticket for this optimization? I've used this pattern in several places that could be hot paths for spawn-heavy apps
BZK[m] has joined #jruby
<byteit101[m]> I'm so annoyed at how much similar-but-not-quite-the-same complex arg parsing popen and spawn share, as I can't reuse the code easily
<byteit101[m]> I shall leave it at ` for today, and work on peopen more tomorrow
<headius> It could be added to my idea list issue
<headius> That optimization
<headius> I can think of other clever things we can do with a specialized require call site
<headius> The difference is between p open and spawn are indeed rather annoying, which is why all those years ago I ended up just porting the C Ruby code line for line
<headius> Your work on win 32 must be including some native IO stuff, right? Now is probably the right time for us to finish native io on windows which will bring us almost all the way to Linux compatibility levels
<byteit101[m]> but yes, I was looking at that, but decideded to narrow the scope for 0.2 to getting the core proceses tests working first
<byteit101[m]> I wasn't sure how to deal with fake bidirectional IO in a IO.select call
<byteit101[m]> might be time to add a "common" gem :-D
<byteit101[m]> Ok, I've implemented a "clean" popen API that doesn't accept shell strings or env variables as the first arg: https://github.com/byteit101/subspawn/blob/master/subspawn/lib/subspawn.rb#L257
<byteit101[m]> I shall take a break and implement popen_compat later