bb010g has quit [Quit: Connection closed for inactivity]
brauliobo has joined #jruby
skade has joined #jruby
knu has quit [Ping timeout: 276 seconds]
knu has joined #jruby
mdedetrich has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yfeldblum has quit [Ping timeout: 246 seconds]
shellac has joined #jruby
mdedetrich has joined #jruby
yfeldblum has joined #jruby
mdedetrich has quit [Ping timeout: 260 seconds]
shellac has quit [Quit: Computer has gone to sleep.]
mdedetrich has joined #jruby
pawnbox_ has quit [Remote host closed the connection]
pawnbox has joined #jruby
mdedetrich has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pitr-ch_ has quit [Read error: Connection reset by peer]
pitr-ch has joined #jruby
mkristian has joined #jruby
samphippen has joined #jruby
mdedetrich has joined #jruby
djbkd has joined #jruby
nateberkopec has joined #jruby
benlovell has joined #jruby
djbkd has quit [Ping timeout: 265 seconds]
nateberkopec has quit [Ping timeout: 276 seconds]
mdedetrich has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mdedetrich has joined #jruby
drbobbeaty has joined #jruby
mdedetrich has quit [Client Quit]
mdedetrich has joined #jruby
vtunka has joined #jruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #jruby
tkimura has quit [Quit: Leaving]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #jruby
js__ has joined #jruby
js__ has quit [Client Quit]
samphippen has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mdedetrich has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mdedetrich has joined #jruby
mdedetrich has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
drbobbeaty has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
samphippen has joined #jruby
hoodow has quit [Quit: hoodow]
hoodow has joined #jruby
shellac has joined #jruby
josh-k has joined #jruby
nateberkopec has joined #jruby
preet has joined #jruby
preet has quit [Client Quit]
nateberkopec has quit [Ping timeout: 250 seconds]
djbkd has joined #jruby
djbkd has quit [Ping timeout: 272 seconds]
drbobbeaty has joined #jruby
tcrawley-away is now known as tcrawley
cristianrasch has joined #jruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #jruby
benlovell has quit [Ping timeout: 265 seconds]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #jruby
nateberkopec has joined #jruby
nateberkopec has quit [Ping timeout: 276 seconds]
benlovell has joined #jruby
benlovell has quit [Ping timeout: 250 seconds]
vtunka has quit [Quit: Leaving]
benlovell has joined #jruby
yfeldblum has quit [Ping timeout: 240 seconds]
bbrowning_away is now known as bbrowning
nirvdrum has joined #jruby
nateberkopec has joined #jruby
lance|afk is now known as lanceball
monkstone has joined #jruby
rsim has joined #jruby
monkstoneT has joined #jruby
djbkd has joined #jruby
<rsim>
Discovered that in our Rails application JRuby.runtime.object_space_enabled? is true. Started investigation and found out that rubyzip gem enables it https://github.com/rubyzip/rubyzip/blob/master/lib/zip.rb#L33-L36 As I understand it is very bad from the performance perspective?
monkstone has quit [Quit: Leaving]
ITXpander has joined #jruby
<ITXpander>
hey guys, quick question which i haven't found an answer for (simple one at least). When using jbundler with warbler, is there a graceful way to tell warbler not to include a set of jars into the target war? say for instance i need servlet-api jars for local development, but i don't wanna bundle them in a war
<ITXpander>
and thanks in advance :-)
djbkd has quit [Ping timeout: 250 seconds]
digitalextremist has quit [Ping timeout: 240 seconds]
skade has quit [Quit: Computer has gone to sleep.]
digitalextremist has joined #jruby
e_dub has joined #jruby
vtunka has joined #jruby
thedarkone2 has joined #jruby
drbobbeaty has quit [Read error: Connection reset by peer]
drbobbeaty has joined #jruby
samphippen has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
samphippen has joined #jruby
bjfish2 has joined #jruby
samphippen has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mkristian has quit [Quit: This computer has gone to sleep]
drbobbeaty has quit [Read error: Connection reset by peer]
drbobbeaty has joined #jruby
skade has joined #jruby
samphippen has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
samphippen has joined #jruby
pawnbox has quit [Remote host closed the connection]
bga57 has joined #jruby
djbkd has joined #jruby
pawnbox has joined #jruby
djbkd has quit [Ping timeout: 240 seconds]
vtunka has quit [Quit: Leaving]
pawnbox has quit [Ping timeout: 272 seconds]
pawnbox has joined #jruby
<Papierkorb>
headius: Do I remember correctly that you were asking to also test Hash in the subscription-remove-one benchmark?
<headius>
rsim: incredibly bad
<headius>
they should absolutely not be doing that
<headius>
we're talking 10x bad
<headius>
rsim: see if you can figure out why they're doing that...it's very likely they don't need to be
<headius>
ITXpander: that's a good question, I'm not sure. codefinger might know because he maintains warbler
colinsurprenant has joined #jruby
<ITXpander>
headius: i read through the code, didnt see any obvious way of doing that
<ITXpander>
hence why i asked
<headius>
ITXpander: ok, sorry I can't help ya :-)
<ITXpander>
headius: no probs, its not bothering too much since tomcat gladly ignores those, but if i could keep it clean would be nice
<ITXpander>
nothing major
<headius>
yeah I understand...it's a good thing to be able to do
<headius>
especially when it does matter because versions don't line up
<ITXpander>
well i wouldn't expect any1 doin servlet stuff in jruby to require those for development anyways, its just some background dependencies that need those when you're not in a j2ee container
<headius>
yeah
<Papierkorb>
headius: Yes you were (on Reddit). Wanted to tell you that SortedSet is a huge bottleneck. I just ran the test with a Hash as backing store (Hash{Fixnum => nil}), and with that, even MRI is faster than my (naive) native Java implementation
<headius>
Papierkorb: oh yes, sorry...distracted
<headius>
that's very interesting
<Papierkorb>
JRuby is still twice as fast, but what a difference that makes
<Papierkorb>
headius: Will update the gist, you can see then if you like
<headius>
I've wanted to put a stake through set.rb's heart for a long time
<headius>
it's barely more than a Hash wrapper
<headius>
enebo: ^^
<headius>
tldr: set.rb adds a crapload of overhead
<headius>
not that we didn't know this
<Papierkorb>
headius: replied to your comment on reddit, the gist is also now updated
<headius>
Papierkorb: thank you!
<headius>
your little writeup is one of the more popular r/ruby items today :-)
<headius>
I love that it's right below Ruby3x3 too
<enebo>
heh RubySet.java
<Papierkorb>
headius: Thank you too for helping me making that operation faster :)
<ITXpander>
Papierkorb: i personally went the other way around, java programming speed was getting on the way, not the actual execution speed, and i moved to jruby
<Papierkorb>
ITXpander: Yep, I'm not a Java-guy, and will only use Java code where it is just much faster. JRuby gives me the freedom to choose this on a problem to problem basis though.
<enebo>
headius: and you applied that a while ago on 9k
<headius>
yeah, when I was working on handle-only binding
<headius>
which uses this logic
<Papierkorb>
Should I open an issue in the jruby github?
<Papierkorb>
about sorted set being slow
<headius>
generated populators use a different chunk of code
<enebo>
is there a spec/test covering this somewhere?
<headius>
Papierkorb: only if it's slower than MRI
<headius>
enebo: I think I'd need to write one in Java to make sure
<headius>
but that's not hard
<Papierkorb>
kk
<headius>
Papierkorb: it's something we'd like to do at some point but we don't generally put those in the tracker
<headius>
and I won't forget :-)
<headius>
actually, maybe you could open one saying how much slower it is than a plain Hash
<headius>
there may be things we can do in set.rb to reduce the overhead for both Ruby and JRuby
<headius>
like extending Hash instead of aggregating, or something
<enebo>
headius: I am mldly confusing that this is only an issue via JI. Wouldn’t any module_method with singleton be broken?
<Papierkorb>
I'm now wondering though how I could get the Java code to be at least as fast
<headius>
enebo: not JI, via JRuby ext that doesn't pre-generate populators
<headius>
@JRubyMethod(module = true)
<headius>
to set up the second singleton-class method I duped the original, but I did not change impl class in the duped copy
<enebo>
ah right we dup the entry
<headius>
yeah
<enebo>
ok this makes plenty of sense then
<headius>
I don't like that there's two different paths for this either but the populators skip a crapload of conditional logic
<headius>
probably the main reason I couldn't quite get handle-only binding to be as fast as invoker-based
<enebo>
it does make me wonder if this setup/change-over exists in other places
<enebo>
any other places we reparent a copy of a method
<headius>
well if we did a test run with handle-based binding = true it would exercise this other path
<headius>
that might be a good idea since all 3rd-party exts go through this logic
<enebo>
not really an issue for a fix but if we do reparent a dup other places we might want a helper method for changing this info
<headius>
yeah true
<headius>
dupForModule
<enebo>
sure
<enebo>
There are a fair number of Set instances used in Rails
<rsim>
headius: it would be good to print out visible warnings when JRuby.objectspace is enabled - now I found it out only when was doing heap dumps to debug other issues
<headius>
heh, I just did "x.should ==" in a JUnit test
<headius>
so there's pure-ruby rbtree overhead for every insert and iteration
samphippen has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<enebo>
yeah and it nukes keys every time right?
<Papierkorb>
Note that SortedSet in JRuby is slower than it MRI
<enebo>
Papierkorb: yeah because it loads a cext
<Papierkorb>
No it's not. Man I can't even think straight now
<headius>
enebo: cext?
<Papierkorb>
enebo: 10ms off, could be as well noise
<enebo>
headius: rbtree in MRI will load we won’t right?
<enebo>
headius: we will LoadError and use pure Ruby version
<headius>
hmmm
<headius>
I don't see rbtree ext in MRI
<enebo>
or do we have native rbstree?
<headius>
we do not
<enebo>
heh…well what is this code for :) I figured there must be a native of rbtree somewhere or this is just weird
<enebo>
in MRI that is
<headius>
Papierkorb: do you have an rbtree gem installed?
<headius>
enebo: yeah I'm confused
<enebo>
unless this is a gem
<headius>
so the pure ruby version is lazy about sorted keys until you each
<headius>
the other version keeps an rbtree up to date
<Papierkorb>
headius: Nope, require raises a LoadError
<headius>
Papierkorb: ok, so we're slow for some other reason then
<enebo>
headius: I do remember this it sorts lazily on access
<headius>
enebo: yeah
<enebo>
def to_a
<enebo>
(@keys = @hash.keys).sort! unless @keys
<enebo>
to_a.each(&block)
<enebo>
yum
<enebo>
fun stuff
<enebo>
I would say we can beat O(n) compares
<Papierkorb>
Mh. I'm wondering if I should remove the reddit post. Or if I should leave it there and see if someone figures out my mistake. It's still good ad for JRuby afterall, albeit less 'fair' compared to what I thought I knew before
<enebo>
I guess this is quicksort under the covers
<enebo>
so O(ln(n))
whitby has joined #jruby
<headius>
Papierkorb: what's the mistake?
<enebo>
headius: his bench was not constructing the klass
<Papierkorb>
headius: it always bench'd an Array, as I forgot to klass.new(array) it in the construction
<GitHub191>
[jruby] headius closed issue #3463: Module method defined on metaclass in Java ext has wrong owner http://git.io/v4ZBr
<GitHub183>
[jruby] headius pushed 1 new commit to master: http://git.io/v4bfQ
<GitHub183>
jruby/master 07d50d1 Charles Oliver Nutter: Set implClass properly for dup'ed module methods in populator....
<headius>
what's the corrected code?
<Papierkorb>
Oh, and turns out that I suck at Java. Good thing is I never claimed to be any good at it
<headius>
I'd still expect us to be a lot faster than MRI, and if we're not we'll just fix that :-)
djbkd has quit [Remote host closed the connection]
<headius>
Papierkorb: no, we implement our own string almost exactly like MRI
<headius>
byte[] + Encoding
<headius>
(and Java is officially UTF-16 now, not UCS-2)
<Papierkorb>
headius: Interesting, does it default to UTF-8 ?
<headius>
yes, same as MRI
<Papierkorb>
They finally dropped that hideous encoding? Great!
donV has joined #jruby
<Papierkorb>
headius: thing is, now that I know how to get it to run fast, I wanted to know if MRI or JRuby uses any significant amount of memory more than the other
bbrowning_away is now known as bbrowning
brauliobo has quit [Ping timeout: 244 seconds]
mkristian_ has quit [Quit: This computer has gone to sleep]
<headius>
well JRuby is very likely to use a lot more than MRI for small apps, but will use a lot less if you need lots of concurrency
<headius>
Papierkorb: oh, just clarifying.... Java is still UTF-16 internally, but JRuby's String impl is separate from Java and defaults to UTF-8 by default like MRI
<headius>
we don't use Java's string because Ruby's string has to be able to accommodate various encodings plus raw binary data
<headius>
Papierkorb: if you do look at memory, keep in mind that the JVM includes an excellent GC, which is excellent in part because it uses a lot more memory to reduce GC overhead
djbkd has joined #jruby
djbkd has quit [Remote host closed the connection]
djbkd has joined #jruby
<headius>
cremes: hey, how's the IO work coming
<headius>
I chatted with yorick about the socket work, and it might actually be usable as a library from JRuby for people who want raw, real sockets
djbkd has quit [Remote host closed the connection]
djbkd has joined #jruby
<cremes>
headius: on hold at the moment. I need to spend some time with yorick to discuss the branch and get it into shape for merging.
lance|afk is now known as lanceball
<cremes>
he needs to finish the socket work before he’ll have time to discuss it, so I’m just in a holding pattern.
kwando has joined #jruby
<headius>
ahh I see
<cremes>
headius: I’m not willing to push forward on the memory-mapped IO changes until I know what’s going on with the rubinius runtime.
<cremes>
brixen portends large changes, so I am holding off so I don’t waste any work.
<cremes>
I have no insider info beyond what he’s written in those blog posts from last year.
<cremes>
He plays his cards close. :)
<cremes>
But so far, it’s all vaporware.
djbkd has quit [Remote host closed the connection]
djbkd has joined #jruby
bbrowning_away is now known as bbrowning
pietia has joined #jruby
<headius>
cremes: ok
pbroker has joined #jruby
<pbroker>
having trouble importing a jar file into a ruby project intellij (using jruby 9. I am using 'require' to get the jar. but then can't seem to find the classes when i want to call them in a function
<headius>
pbroker: you can require the jar but still need to import the classes you want from it...are you doing that?
<pbroker>
yeah i am doing importing the class but it is giving a error on a missing dependency because the java class relies on other java classes to work. any easy way to get the dependencies?
<headius>
ahh right
<headius>
well you need to make sure all the related jars are loaded
<headius>
that's kinda a guessing game since Java doesn't typically tell you what other jars are needed
<headius>
do you get an error saying "probable missing dependency: BlahClass"?
<pbroker>
haha! yeah i figured i would run into this issues. I am tryuing to automate a frontend web application and all the backend is written in java (including the api). So i have to use the API to get some things set up that can't be automated on the frontend but you can just view on the frontend. I wish the whole app was just a Ruby on Rails application
<pbroker>
I have the API jar. and figured it would be easier to use then doing a REST request
<pbroker>
to the API
<enebo>
not sure if search.maven.org has nice dependency tree but if you can compile the library you want with maven you can run: mvn tree:dependencies -Dverbose and get a list
<pbroker>
oh yeah i can totally do that! thanks for the help!
<headius>
enebo: good call
pbroker has quit [Ping timeout: 246 seconds]
djbkd has quit [Remote host closed the connection]
bb010g has quit [Quit: Connection closed for inactivity]
skade has joined #jruby
yfeldblum has quit [Remote host closed the connection]
skade has quit [Ping timeout: 272 seconds]
brauliobo has joined #jruby
skade has joined #jruby
drbobbeaty has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<GitHub25>
[jruby] headius pushed 1 new commit to master: http://git.io/v4AoS
<GitHub25>
jruby/master f3f0091 Charles Oliver Nutter: Pre-dedup literal hash string keys but not all string keys....
<GitHub143>
[jruby] headius closed issue #3472: Hash keys should only be deduplicated for direct literal forms http://git.io/v4SWN
<annafw>
hi all! i was trying jruby-9.0.4.0 and i have tests that run in jruby-9.0.1.0 but in 9040, i'm getting a bunch of BUG: interpreter fell through to end unexpectedly errors
<annafw>
seems to be when we're logging via log4j. i'm wondering if anyone else has seen problems?
<annafw>
i'm going to try to do a bit more digging to see where things are blowing up. just surprised that my tests are failing in 9040 (and were ok in 9010).
<headius>
open a bug for that...that would be a high priority item for us
<headius>
yeah that's surprising to me too
<headius>
we did make some interpreter changes but nothing I'd expect to fail like that
<annafw>
ok - let me dig a bit more.
<headius>
enebo: ^^ !!
skade has quit [Ping timeout: 240 seconds]
<enebo>
yeah something failing in IR we generate
<enebo>
gotta run
enebo has quit [Quit: enebo]
yfeldblum has joined #jruby
tcrawley is now known as tcrawley-away
shellac has quit [Quit: Computer has gone to sleep.]
andrewvc has quit [Ping timeout: 246 seconds]
andrewvc has joined #jruby
pietia has quit [Ping timeout: 252 seconds]
<annafw>
ok @headius i found the diff. it's some wacky metacoding we are doing. i'll submit a bug with the deets.
<annafw>
:) so suspenseful!! i actually didn't know that this was a thing in ruby.
andrewvc has joined #jruby
<GitHub81>
[jruby] annafw opened issue #3483: define_method with * args throws RuntimeError http://git.io/v4AQr
cristianrasch has quit [Quit: Leaving]
<headius>
oooo nice
<headius>
I had a feeling it might be related to define_method
<headius>
yup and I bet I know exactly why
<headius>
you can work around this by giving the variable a name I bet
<headius>
in 9.0.3 we modified define_method method complation to treat it like a regular method
<headius>
but regular methods don't have "star" args
<headius>
so the interpreter doesn't know how to handle it
<headius>
perfect reduction, thank you annafw
drbobbeaty has joined #jruby
shellac has joined #jruby
colinsurprenant has quit [Quit: colinsurprenant]
bjfish2 has quit [Quit: bjfish2]
e_dub has quit [Quit: ZZZzzz…]
<annafw>
yeah... so our fab use case of this is we're doing something ridiculous for testing purposes.
annafw has quit [Quit: Page closed]
annafw has joined #jruby
<annafw>
here's what we're doing:
<annafw>
oh maybe i'll put it in the ticket. this ui is killing me.
<headius>
I updated the bug...it looks like adding an explicit return works around the issue
<headius>
so it's probably some difference in how methods versus blocks work when they fall off the end
<headius>
the freenode IRC client doesn't seem to be very good :-\ maybe we should try the mibbit client even if it does have ads
<headius>
or maybe they'd give us a license
<annafw>
thx @headius for the updates on the ticket. yeah i should use gitter instead of irc... or try a better irc client that i can use proxies with.
annafw has quit [Quit: Page closed]
<headius>
heh, mibbit is banned from freenode, so I guess that idea is out