skade has quit [Quit: Computer has gone to sleep.]
havenwood has quit [Ping timeout: 250 seconds]
vtunka has joined #jruby
drbobbeaty has joined #jruby
mister_solo has quit [Ping timeout: 265 seconds]
JRubyGithub has joined #jruby
JRubyGithub has left #jruby [#jruby]
<JRubyGithub>
[jruby] gsamokovarov opened pull request #3002: Don't warn on private attribute accessors to match CRuby (master...private-attrs-no-longer-produce-warnings) http://git.io/vk4gX
simi has joined #jruby
mister_solo has joined #jruby
drbobbeaty has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jeremyevans has quit [Ping timeout: 246 seconds]
mister_solo has quit [Ping timeout: 265 seconds]
mister_solo has joined #jruby
mister_solo has quit [Remote host closed the connection]
mister_solo has joined #jruby
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] mkristian pushed 1 new commit to master: http://git.io/vk4i1
<JRubyGithub>
jruby/master 45f25bf Christian Meier: [build] add an alternative to the torquebox repo
JRubyGithub has left #jruby [#jruby]
mkristian has joined #jruby
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] testors opened issue #3003: no TypeError when use FFI callback with invalid return type http://git.io/vk4Pf
JRubyGithub has left #jruby [#jruby]
mister_solo has quit [Remote host closed the connection]
mister_solo has joined #jruby
camlow325 has joined #jruby
<mkristian>
travis seems to be working again
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] mkristian pushed 1 new commit to master: http://git.io/vk4XW
<JRubyGithub>
jruby/master f50b495 Christian Meier: jruby-dist-bin200.tar.gz grew bigger
<JRubyGithub>
[jruby] chrisseaton pushed 2 new commits to truffle-head: http://git.io/vkRCQ
<JRubyGithub>
jruby/truffle-head 9ab30f1 Chris Seaton: Merge branch 'master' into truffle-head...
<JRubyGithub>
jruby/truffle-head b221938 Chris Seaton: [Truffle] Fixes to interop after merge - result from RubyMethod having gone.
JRubyGithub has left #jruby [#jruby]
arturaz has quit [Ping timeout: 255 seconds]
<fuzzyhorns>
what does 'jruby -S' do? i forget how to look up the flags
<headius>
fuzzyhorns: hi there
<headius>
-S looks in PATH and jruby's own bin/ for the command that follows
<headius>
typically used to make sure you're running that command with the ruby/jruby you expect
<headius>
for visualvm you may need to pass --manage to JRuby, and both processes should be running as the same user
<headius>
--manage enables our mbeans and sets a JVM property to enable remove monitoring
<fuzzyhorns>
oooh i was hoping to look at the mbeans so that sounds perfect
<fuzzyhorns>
are they documented anywhere?
<headius>
hmm, I don't think so
<headius>
they're pretty self-explanatory though, I think I picked ok names :-)
<fuzzyhorns>
ok well, when i connect i'll be able to see them :)
<headius>
yup yup
Aethenelle has quit [Ping timeout: 272 seconds]
<fuzzyhorns>
does —manage have any perf impact that would make it bad to use in prod, btw?
rsim has quit [Quit: Leaving.]
<headius>
it doesn't in JRuby, and I don't think it does in the JVM...but it does open ports, so if you use it in production lookup how to restrict it to local addresses or something
colinsurprenant has joined #jruby
<headius>
securing JMX monitoring ports is outside my expertise :-{)
<headius>
:-)
colinsurprenant has quit [Client Quit]
<kares>
fuzzyhorns: headius it also starts the RMI server which worries those doing real-time trading on Java :)
<headius>
kares: that's true, good point
<kares>
... but it's not something "ordinary" people care about on production
<headius>
I don't know if it does anything when not connected, but I'm sure there's some µs latency caused by periodic scheduling :-)
colinsurprenant has joined #jruby
<kares>
headius: that's about what worries them the unpredictability of the schedules
vtunka has quit [Quit: Leaving]
<headius>
kares: if you get a chance Gil Tene from Azul did a really interesting talk on how lmax improved latency using zing and other strageies
<headius>
it was at goto chicago 2015 but I'm not sure video is up yet
<headius>
I didn't even know lmax was a trading firm until his talk...I just associated it with the low-latency scheduler
<headius>
that's LMAX in case the font doesn't make it clear
jeremyevans has joined #jruby
<fuzzyhorns>
if i wanted to see how many threads have open database connections, what's the best place for me to peek into?
<headius>
well that depends how, if at all, the connections are associated with the threads
<fuzzyhorns>
yeah, my mental model is pretty sketchy there :/
<headius>
you'd need to look at a heap dump most likely
<fuzzyhorns>
mm, maybe it's better to just look at the db connection pool
<headius>
see which RubyThread instances are live, look at thread-locals for acquired connections, or something
<fuzzyhorns>
rather than from the thread side?
<fuzzyhorns>
thread-locals?
<headius>
yeah, connection pool, or look in heap for all *Connection" objects
<headius>
there's no innate association between a thread and a connection...that's framework specific
<headius>
so you'd have to know a bit about the framework and how it associates them
<headius>
usually, I'd expect them to use a thread-local (e.g. Thread.current[:connection] = conn)
<kares>
fuzzyhorns: the Ruby connection pool is still higher level, if you know what underlying java connection is used you can query those using the Object Query UI on VisualVM
<fuzzyhorns>
when I see a jruby process though, that isn't an entire other instance of my app, is it? it's just a ruby thread object? again my mental model is too rough here
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] eregon pushed 1 new commit to master: http://git.io/vkRzN
<fuzzyhorns>
kares: mm, in my case i think the ruby connection pool is handled by the oracle adapter we're using
<fuzzyhorns>
(in a rails stack)
<kares>
fuzzyhorns: in that case I also recommend -Xreify.classes=true so it's easier to find ActiveRecord::ConnectionAdapters::ConnectionPool ruby class
<kares>
but you still have a native JDBC connection ... so maybe that is easier to locate
<headius>
sigh
<headius>
first bug of the day and it's a framework dependent on the behavior of the specific `sort` impl in MRI
<fuzzyhorns>
kares: yeah i tried that at one point, but only for some dumps, does it help when viewing live too?
dabradley has joined #jruby
<kares>
fuzzyhorns: yes ... otherwise you'll mostly see org.jruby.RubyClass instances on the Java class side
camlow325 has quit [Read error: Connection reset by peer]
camlow325 has joined #jruby
<subbu>
headius, should I push my patch and see what travis thinks of it? Otherwise, I'll have to run tests, etc. later in the evening / weekend and push after.
<headius>
oh I haven't seen it
enebo has joined #jruby
<headius>
for the double-ensure?
<subbu>
i haven't pushed it.
<subbu>
yes.
<headius>
yeah go for it
<subbu>
ok.
<headius>
I will run stuff locally because travis is broken for other reasons
<subbu>
i haven't kept track of all the commands I need to run, so I am taking the lazy route.
<mkristian>
subbu, I always look in .travis.yaml to find out what to run locally ;)
<subbu>
mkristian, ah .. ok.
<subbu>
headius, enebo pushed.
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] subbuss closed issue #2993: Many failures in Sequel tests on [RuntimeError] exception expected, not Class: <NoMethodError> Message: <"undefined method `[]' for nil:NilClass"> http://git.io/vkLiI
JRubyGithub has left #jruby [#jruby]
<subbu>
headius, enebo the commit message has the full explanation
<subbu>
sometimes my commit messages are much longer than the actual code changes ;)
<subbu>
but I figure the explanations are useful.
<enebo>
KLOCC
<subbu>
KLOCC?
<mkristian>
I had the feeling travis works better again and I added a second gems repo otto.takari.io to avoid the problems with the TB proxy
<enebo>
1000 lines of commit comments
<subbu>
:)
dabradley has quit [Ping timeout: 245 seconds]
<jeremyevans>
Just wanted to say thanks for all your help. I think all of the issues that had the Sequel tests failing in pre2 have now been addressed
<subbu>
headius, enebo it might benefit to do a walkthrough of all the exception building and interpret logic since it can help you guys understand what it is, but also more importantly, as I've discovered working at WMF, code review immensely helps in uncovering subtle issues.
<subbu>
probably done in person one of these days.
<enebo>
subbu: sounds good to me
skade has quit [Quit: Computer has gone to sleep.]
<subbu>
headius, enebo ok .. thu / fri afternoon and tue/thu/fri mornings work.
<colinsurprenant>
hey! question about jruby ext: my Library load method creates my RubyClass, now how can I retrieve my own RubyClass from a class method (meta = true) to instanciate myself ?
<colinsurprenant>
I am currently doing runtime.getModule(“MyModule”).getClass(“MyClass”) but I do not think this is optimal
<JRubyGithub>
[jruby] chrisseaton pushed 1 new commit to truffle-head: http://git.io/vk0PA
<JRubyGithub>
jruby/truffle-head 3afa8a5 Jaroslav Tulach: Registering RubyLanguage using @TruffleLanguage.Registration annotation and providing base implementation of its methods.
JRubyGithub has left #jruby [#jruby]
deobalds has joined #jruby
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] chrisseaton pushed 1 new commit to truffle-head: http://git.io/vk0DF
<JRubyGithub>
jruby/truffle-head 2cb91dc Chris Seaton: Merge branch 'master' into truffle-head
JRubyGithub has left #jruby [#jruby]
lance|afk is now known as lanceball
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] nirvdrum pushed 1 new commit to master: http://git.io/vk0H6
<JRubyGithub>
jruby/master ac481dd Kevin Menard: [Truffle] Avoid an extra buffer allocation for File.readlink.
<nirvdrum>
enebo: I could probably change the signature to accept a jnr.ffi.Pointer instead.
<enebo>
speaking of tests…is the redness of master being handled? I saw something about DOS or some flakiness
<nirvdrum>
If that's preferable. It just means if you want to use Unsafe you'll need to wrap the argument with an FFI Pointer before making the call.
<enebo>
nirvdrum: yeah I think my only weirdness to this is levels of abstraction but with that said a pointer to C-alloced thing is pretty reasonable when calling out to C
<enebo>
nirvdrum: but jffi pointer might make it easier to document later as well. Especially since there is lots of Java code written using it
<nirvdrum>
Okay. I'll change it up.
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] chrisseaton pushed 1 new commit to master: http://git.io/vk0At
JRubyGithub has left #jruby [#jruby]
<JRubyGithub>
jruby/master 74d26f9 Chris Seaton: [Truffle] Encapsulate Array constructors.
<nirvdrum>
enebo: I don't suppose you know what the difference between allocate, allocateDirect, and allocateTemporary is all about, do you?
pjammer has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<enebo>
nirvdrum: the aalocateDirect is not so straight-forward but I look at that as a different issue
<nirvdrum>
That's only used in a test.
<nirvdrum>
It's expected the caller has a Pointer object somehow.
<enebo>
nirvdrum: yeah I mostly just meant I look to tests in while learning how to use some methods
<nirvdrum>
Ahh.
<enebo>
nirvdrum: but this is really nice…way nicer than using a long
<nirvdrum>
Yeah. I was just trying to divorce from one implementation. But really, all of jnr is based around FFI so it's not an unreasonable requirement.
<enebo>
nirvdrum: I am half surprised we don’t have high level alloc in jnr-posix
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] nirvdrum pushed 1 new commit to master: http://git.io/vkEmj
<JRubyGithub>
jruby/master 7509d73 Kevin Menard: [Truffle] Updated File.readlink for new jnr-posix call signature.
JRubyGithub has left #jruby [#jruby]
<enebo>
nirvdrum: but probably because we have not made signatures like this
<nirvdrum>
As jnr-posix fills out, you may find it worthwhile.
<nirvdrum>
I think some of the Java fallbacks JRuby currently has should just be pushed into JavaPOSIX.
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] chrisseaton pushed 1 new commit to master: http://git.io/vkE3T
<JRubyGithub>
jruby/master 703c6c9 Chris Seaton: [Truffle] Encapsulate the RubyHash constructor.
JRubyGithub has left #jruby [#jruby]
<nirvdrum>
chrisseaton: You'll need to mvn -U again, I'm afraid.
<chrisseaton>
rgr
<nirvdrum>
Something, something, agile.
<enebo>
nirvdrum: yeah. agreed. we have this conflict at times over things like process spawning being to semantically made in Ruby’s mold but we do get lazy at times and stick it in JRuby because we do not need to force a jnr-posix release
<fuzzyhorns>
hmm, havin trouble connecting to jruby process in visualvm
<fuzzyhorns>
any tips i might be missing?
<nirvdrum>
enebo, chrisseaton: I could just be reading this wrong, but but it looks like NativeMemoryManager does the same exact thing for allocateDirect and allocateTemporary.
djbkd has quit [Remote host closed the connection]
mkristian has joined #jruby
<fuzzyhorns>
every time i try to connect to jruby process visualvm crashes lol
<nirvdrum>
chrisseaton: It looks like memory allocations > 256 bytes are automatically cleaned up via a finalizer. If you wanted to eagerly clean up, you can cast to a AllocatedDirectMemoryIO and call dispose. Unfortunately, the dispose method isn't defined in any common base class.
<nirvdrum>
If the allocation is <= 256 bytes, it's managed in a magazine.
<nirvdrum>
My guess is the allocateDirect originally always allocated directly (no magazine) and allocateTemporary always used the magazine and at some point the determination was made dynamically based upon the buffer size and the two methods converged to have identical behavior.
<subbu|lunch>
headius, enebo comparing the existing failing builds .. with my patch, the same mri tests are failing before/after => my fix looks good.
pjammer has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
elia has joined #jruby
subbu|lunch is now known as subbu
djbkd has joined #jruby
fuzzyhorns has quit [Quit: Leaving.]
<colinsurprenant>
hey! got another question about extensions and type conversions:
<colinsurprenant>
I have a wrapped Java class which contains a Map<String, Object> property, when I initialize that from a RubyHash, the (primitive type) key/values in the Map are all automagically converted to native Java object, I have yet to figure out where this takes place. but my question is, this Map can also contain non-primitive value of a Java class that is also wrapped as a Ruby object, I’d like to know what do I need to do for thi
<colinsurprenant>
Java class to also be auto-magically :P converted ?
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] bjfish opened issue #3005: Parse error with LC_ALL=en_US.iso88591 http://git.io/vkE6z
JRubyGithub has left #jruby [#jruby]
<nirvdrum>
enebo: ^ That looks like another variant of our lexer problem.
<Aethenelle>
hrm... flexible array member support in FFI... can't really do that automagically can we?
<headius>
man, this frozen hash thing is involved
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] chrisseaton pushed 2 new commits to master: http://git.io/vkEMM
<JRubyGithub>
jruby/master 4757c64 Chris Seaton: [Truffle] Encapsulate RubyString constructor and remove old helpers.
<JRubyGithub>
jruby/master 8370e02 Chris Seaton: [Truffle] New String helpers.
JRubyGithub has left #jruby [#jruby]
<headius>
nirvdrum: fine by me on the additional readlink overload
<nirvdrum>
headius: Cool. We have consensus!
<headius>
enebo: I think the problem is that we don't actively duplicate class variables in a singleton class when cloning it, or something
<headius>
I can't reproduce without Lotus's gnarly combinations of modules and included and inherited
<headius>
I traced through module duping in MRI and they make copies of instance var table...and then I dug deeper and discovered they implement class vars using the same tables
<enebo>
there cref and our cref mean something else now
<enebo>
so their cref == our dynscope/frame
<headius>
CFP is control frame pointer I believe
<enebo>
yeah
<enebo>
there frame is not all of our frame htough
<headius>
what's EP?
<headius>
oh, environment pointer
elia has quit [Quit: Computer has gone to sleep.]
<colinsurprenant>
I will try to reformulate my question :P - any help appreciated
<enebo>
well your snippet works with that change
<colinsurprenant>
I have to Java objects with their respective JRuby wrappers: JavaContainerClass & JRubyContainerClass, JavaValueClass & JRubyValueClass. My JavaContainerClass has a Map<String, Object> property. Whenever I set primitive key/values from Ruby in this Map, from Java all key/values have the “primitive” Java classes and vice-versa - this is perfect. Now, if my Map contains a JavaValueClass value, (how) is it possible to have it
<colinsurprenant>
auto-boxed as a JRubyValueClass when accessed from Ruby??
<headius>
into the bowels of yarv
<colinsurprenant>
to Java objects-> two Java objects
<enebo>
ah and B has the cvar
<headius>
colinsurprenant: JavaValueClass is a Java type?
<colinsurprenant>
yes
<colinsurprenant>
and JRubyValueClass is its JRuby wrapper
<enebo>
headius: HELLS YES
<headius>
I'm not sure there's a simple way right now
<enebo>
all of lotus/view passes now with that change
<headius>
enebo: is B right?
<headius>
I didn't check where it's actually going in MRI
<enebo>
headius: yeah B is right but zillions of tests now pass on lotus
<headius>
well that's promising :-)
<enebo>
JRUBY_OPTS=-X-C jrake test
<enebo>
rake aborted!
<enebo>
NameError: uninitialized class variable @@jars_lock in Jars
<enebo>
booo
<mkristian>
where is this happening ?
<headius>
colinsurprenant: the coercion protocols in 1.7 and earlier are not really customizable...the primitive values get converted, and everything else is wrapped in natural Ruby proxy version of the class
<headius>
so it will always come into Ruby as JavaValueClass
<enebo>
mkristian: we are fixing some issue involving cvars and I saw this when I tried to run rake
<headius>
I have code on the drawing board for 9k I need to land that allows somewhat better customization
vikaton has joined #jruby
<colinsurprenant>
headius: ok, thanks. that’s what I wanted to know, so I’ll deal with it “manually”
<colinsurprenant>
headius: great if that’s improved in 9k!
<headius>
huh, it does go on B...that's unexpected
<headius>
if the module isn't dup'ed they go on A
<headius>
this seems wrong
<headius>
I'm talking MRI behavior here
<enebo>
mkristian: do not worry…I am convinced I still have a problem with my fix…the place where this is happening should not be blowing up
<mkristian>
enebo, ok - just let me know if it persists. the code looks ok at first glance
<headius>
man, I can't make heads nor tails out of MRI's cvar logic
<headius>
environment pointers appear to be a linked list of some kind
<enebo>
headius: only changed interp and it has some smallish cleanup but it should be a reasonable starting point
Aethenelle has quit [Read error: Connection reset by peer]
<nirvdrum>
rtyler: I always use ruby-debug-ide with RubyMine. It works quite well.
<rtyler>
yeah, I know a number of folks who use that at Lookout, but I'm not terribly interested in battling the IDE war and JRuby war at the same time :P
dinfuehr has joined #jruby
subbu has quit [Ping timeout: 245 seconds]
<nirvdrum>
Then you will fail at both!
<rtyler>
heh
<rtyler>
NOOOOOOOOOOOOOOOOOOOOOOOOOOO
* rtyler
pounds the sand in front of the half-buried statue of liberty
dinfuehr has quit [Ping timeout: 258 seconds]
* nirvdrum
stabs jnr-constants
<nirvdrum>
I suppose I should be happy constants for rlimit already exist. I'm just not entirely sure why the enum is named RLIMIT instead of RLimit.