_djbkd has quit [Remote host closed the connection]
TheWhip has quit [Ping timeout: 256 seconds]
camlow325 has quit []
slash_nick is now known as slash_quit
elia has quit [Quit: Computer has gone to sleep.]
TheWhip has joined #jruby
TheWhip has quit [Ping timeout: 240 seconds]
_djbkd has joined #jruby
slash_quit is now known as slash_nick
_djbkd has quit [Quit: My people need me...]
brauliobo has quit [Ping timeout: 240 seconds]
_djbkd has joined #jruby
TheWhip has joined #jruby
TheWhip has quit [Ping timeout: 250 seconds]
KevinCorcoran has quit [Ping timeout: 246 seconds]
nateberkopec has quit [Ping timeout: 268 seconds]
TheWhip has joined #jruby
TheWhip has quit [Ping timeout: 252 seconds]
_djbkd has quit [Quit: My people need me...]
Osho has quit [Ping timeout: 244 seconds]
havenwood has joined #jruby
nirvdrum has quit [Ping timeout: 256 seconds]
KevinCorcoran has joined #jruby
TheWhip has joined #jruby
KevinCorcoran has quit [Remote host closed the connection]
TheWhip has quit [Ping timeout: 268 seconds]
Osho has joined #jruby
blinsay has quit [Ping timeout: 264 seconds]
blinsay_ has joined #jruby
blinsay_ has joined #jruby
blinsay_ is now known as blinsay
KevinCorcoran has joined #jruby
TheWhip has joined #jruby
KevinCorcoran has quit [Remote host closed the connection]
KevinCor_ has joined #jruby
colinsurprenant has joined #jruby
colinsurprenant has quit [Client Quit]
TheWhip has quit [Remote host closed the connection]
TheWhip has joined #jruby
TheWhip has quit [Ping timeout: 244 seconds]
KevinCor_ has quit [Remote host closed the connection]
KevinCorcoran has joined #jruby
KevinCorcoran has quit [Remote host closed the connection]
xcv has joined #jruby
KevinCorcoran has joined #jruby
KevinCorcoran has quit [Remote host closed the connection]
_djbkd has joined #jruby
xcv has quit [Ping timeout: 250 seconds]
tenderlove has quit [Quit: Leaving...]
rsim has joined #jruby
rsim has quit [Ping timeout: 240 seconds]
TheWhip has joined #jruby
KevinCorcoran has joined #jruby
KevinCorcoran has quit [Ping timeout: 246 seconds]
skade has joined #jruby
bb010g has joined #jruby
thedarkone2 has quit [Quit: thedarkone2]
rsim has joined #jruby
KevinCorcoran has joined #jruby
_djbkd has quit [Quit: My people need me...]
KevinCorcoran has quit [Ping timeout: 240 seconds]
rsim has quit [Quit: Leaving.]
rsim has joined #jruby
<GitHub148>
[jruby-openssl] kares commented on commit 91619ec: which exception class do you mean here ... could you add id as a comment pls, thanks http://git.io/vcx4s
elia has joined #jruby
rsim has quit [Ping timeout: 240 seconds]
xcv has joined #jruby
_djbkd has joined #jruby
xcv has quit [Ping timeout: 256 seconds]
yfeldblum has quit [Ping timeout: 246 seconds]
TheWhip has quit [Remote host closed the connection]
TheWhip has joined #jruby
TheWhip_ has joined #jruby
TheWhip has quit [Ping timeout: 260 seconds]
_djbkd has quit [Remote host closed the connection]
mkristian__ has joined #jruby
elia has quit [Quit: Computer has gone to sleep.]
skade has quit [Quit: Computer has gone to sleep.]
pawnbox has joined #jruby
pawnbox has quit [Remote host closed the connection]
mkristian__ has quit [Quit: This computer has gone to sleep]
TheWhip_ has quit [Remote host closed the connection]
xcv has joined #jruby
skade has joined #jruby
baroquebobcat has quit [Quit: baroquebobcat]
mkristian__ has joined #jruby
samphippen has joined #jruby
skade has quit [Ping timeout: 250 seconds]
skade has joined #jruby
elia has joined #jruby
yfeldblum has joined #jruby
TheWhip has joined #jruby
pawnbox has joined #jruby
drbobbeaty has joined #jruby
PragTob has joined #jruby
xcv has quit [Ping timeout: 256 seconds]
TheWhip_ has joined #jruby
TheWhip has quit [Ping timeout: 255 seconds]
vtunka has joined #jruby
kwando has quit [Remote host closed the connection]
mkristian__ has quit [Quit: This computer has gone to sleep]
<GitHub139>
[jruby] eregon commented on commit c0be331: We should have a helper for this, it's really verbose (compared to Unsafe which is half the code).... http://git.io/vcpmV
drbobbeaty has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
samphippen has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<GitHub130>
[jruby] eregon pushed 1 new commit to master: http://git.io/vcp3o
<GitHub130>
jruby/master 797e181 Benoit Daloze: [Truffle] Straightfoward translation for Rubinius.check_frozen....
TheWhip_ has quit [Remote host closed the connection]
skade has quit [Quit: Computer has gone to sleep.]
<GitHub41>
[jruby] eregon pushed 1 new commit to master: http://git.io/vcpl7
<GitHub41>
jruby/master d06d163 Benoit Daloze: [Truffle] Introduce MethodHandleUtils and use MethodHandle to access private fields.
<GitHub101>
[jruby] eregon commented on commit c0be331: Done in d06d16331dca49185e8d4cb2ecb80f13bc10384e. http://git.io/vcplj
temporalfox has quit [Read error: Connection reset by peer]
samphippen has quit [Read error: Connection reset by peer]
samphippen has joined #jruby
xcv has joined #jruby
mkristian has quit [Quit: This computer has gone to sleep]
enebo has joined #jruby
TheWhip has quit [Read error: Connection reset by peer]
TheWhip has joined #jruby
kwando has joined #jruby
mkristian has joined #jruby
sdogruyol has quit [Remote host closed the connection]
<GitHub44>
[jruby] eregon commented on commit d06d163: It seems we don't even need the doPrivileged() as we expect callers to have sufficient permissions. http://git.io/vchXx
<GitHub69>
[jruby] eregon pushed 1 new commit to master: http://git.io/vch1s
<GitHub69>
jruby/master e0f049e Benoit Daloze: [Truffle] It seems we do not need doPrivileged there.
sdogruyol has joined #jruby
samphippen has quit [Read error: Connection reset by peer]
samphippen has joined #jruby
brauliobo has quit [Ping timeout: 265 seconds]
<headius>
eregon: yay!
mkristian has quit [Quit: This computer has gone to sleep]
pawnbox has joined #jruby
klemanski has joined #jruby
Scient has quit [Ping timeout: 265 seconds]
knu has quit [Ping timeout: 265 seconds]
Antiarc has quit [Quit: No Ping reply in 180 seconds.]
m4rCsi has quit [Quit: No Ping reply in 180 seconds.]
skade has quit [Quit: Computer has gone to sleep.]
samphippen has joined #jruby
KevinCorcoran has joined #jruby
Aethenelle has joined #jruby
<cremes>
is there a way to safely override self.allocate for a class?
<Aethenelle>
cremes: there should be no reason to override allocate
whitby has quit [Quit: I go.]
<Aethenelle>
at least not from ruby... you should only need to define it for a class if you're writing a C extension.
<Aethenelle>
and some cases in Java for a JRuby class.
<Aethenelle>
What are you trying to do?
<cremes>
Aethenelle: I want to make sure an ivar is set when someone calls MyClass.allocate
KevinCorcoran has quit [Remote host closed the connection]
TheWhip has joined #jruby
<Aethenelle>
no one should be calling allocate. They'd be calling new which calls allocate then initialize. Normally initialization like that happens in initialize. Most classes provide their own initialize method
<cremes>
I agree, but it happens. Let me paste a link to an example:
<Aethenelle>
allocate is supposed to return an empty instance of the object. overriding it to populate an ivar violates that expectation
<Aethenelle>
cremes: that's a test suite for Ruby itself, I'd expect that to call allocate here and there.
<cremes>
Aethenelle: yes, I know it’s a test suite. It’s doubly weird that they are testing the behavior of something that no one is supposed to do. <sigh>
<cremes>
Since it sounds impossible, I have a workaround that I’ll use. Thanks fo ryou rtime
<Aethenelle>
cremes: I don't think they're testing it because they expect someone to call allocate, they're probably using allocate as the easiest platform independent method of getting a improperly initialized IO object
<cremes>
perhaps
<headius>
cremes: what's the use case? I'm confused
<Aethenelle>
i didn't say it was impossible, just that you shouldn't try... I imagine you might be able to override it but that'll cause all kinda of problems
<headius>
allocate is like the lowest level "give me a blank object"...unsure why you'd be checking for an ivar there
<cremes>
I have a workaround
<headius>
we don't dynamically dispatch to allocate so you'd have to replace it on the Java side
<headius>
MRI doesn't either
<Aethenelle>
headius: not only that but returning anything other than an empty object will throw some people. especially anyone calling allocate
<headius>
yes, I'm curious what cremes needs to do
<GitHub110>
[jruby] eregon pushed 2 new commits to master: http://git.io/vcjDr
<GitHub110>
jruby/master 303c301 Benoit Daloze: [Truffle] Pass the context explicitly for Module and Class related methods.
<GitHub110>
jruby/master 71599e9 Benoit Daloze: [Truffle] Pass the context explicitly for Module and Class methods reading the context field directly.
<headius>
cremes: what's the workaround?
_djbkd has joined #jruby
<Aethenelle>
i thought they might not be dynamically dispatched but I wasn't sure and I've done some crazy things (with equally crazy results) to methods that I'm not sure are (like display)
<headius>
enebo: what does "fixed" mean in terms of regexp
<cremes>
headius: in my IO refactor, the #ensure_open method delegates to an internal class. If IO.allocate is called then ensure_open doesn’t work correctly.
<cremes>
I handle the case where that subordinate class instance is nil and raise IOError
<cremes>
not a big deal… just thought I could hook into #allocate directly
<headius>
cremes: why wouldn't you do that in initialize?
<headius>
nobody can ever call allocate and expect a working, initialized object on any impl
<cremes>
I normally do, but I’m trying to pass a shitty MRI test/spec :)
<headius>
close and other methods check whether the IO has been initialized
<headius>
at least in MRI and JRuby
<cremes>
yes
<cremes>
this is a big deal about nothing. already fixed and commited it
colinsurprenant has quit [Quit: colinsurprenant]
<headius>
I don't think it's a big deal
<headius>
I was just curious
_djbkd has quit [Ping timeout: 240 seconds]
<headius>
no need to get testy :-)
skade has joined #jruby
<cremes>
sorry
klemanski has joined #jruby
PragTob has quit [Remote host closed the connection]
<Aethenelle>
wait... you're refactoring IO as in it's a clean rewrite in Java?
KevinCorcoran has joined #jruby
<headius>
Aethenelle: this is work in rbx to make a pure Ruby IO
colinsurprenant has joined #jruby
<headius>
well, pure Ruby + FFI
<cremes>
correct, Ruby + FFI
<Aethenelle>
ahh... that makes sense too...
colinsurprenant has quit [Client Quit]
<Aethenelle>
i'd expect rbx to have some sort of allocate setup... Though, since we're talking about rbx, you might just be able to just redefine it...
<Aethenelle>
been a while since I've taken a stroll through rbx source
<Aethenelle>
why not just put in a nil guard for that ivar on that call?
<Aethenelle>
or do the extra crazy thing and redefine the method at initialize
<Aethenelle>
ie: uninitialized the method just throws, during init redefine it with the correct behavior
_djbkd has joined #jruby
<headius>
cremes: MRI tests working ok for you?
<cremes>
headius: yep, working out okay.
<cremes>
lots of failures. have already fixed most of the hangs.
<headius>
well that's good
KevinCorcoran has quit [Remote host closed the connection]
brauliobo has quit [Ping timeout: 264 seconds]
<headius>
enebo: I have a fix for this regexp encoding bug
subbu|qr is now known as subbu
<enebo>
headius: oh yeah
<enebo>
headius: I was eating so I missed your question above
<enebo>
headius: but it sounds like you figured it out
<headius>
yeah, String#match was taking a too-direct path to construct the Regexp it would use, skipping some option and encoding negotiation
bbrowning_away is now known as bbrowning
<GitHub28>
[jruby] headius pushed 3 new commits to master: http://git.io/vCevs
<GitHub28>
jruby/master 0b87f44 Charles Oliver Nutter: Properly compile String#match RubyString to get proper encoding....
<GitHub28>
jruby/master 333aa86 Charles Oliver Nutter: Remove String and Regexp excludes that pass now.
<GitHub28>
jruby/master 61f48e1 Charles Oliver Nutter: Remove unused private method.
<headius>
enebo: there's the fix if you want to have a look
<enebo>
headius: I am super happy you reduced that one
<headius>
yeah, added a regression spec for this case too
<enebo>
headius: I had hoped my other fixes for 9.0.1 would have fixed it but they didn't
<headius>
I had to step debug MRI to see what was different
<enebo>
last m17n bug in jruby ever? :)
<headius>
let's hope!
<headius>
there's still code using the direct newRegexp paths that shouldn't though, I'm sure
<headius>
that's usually what it is
<enebo>
beyond I think shit like method names or things which we are coupled to real CharSets due to Java Strings
<headius>
I have the right protocols wired up in the other paths, but not all code uses it
mkristian has quit [Quit: This computer has gone to sleep]
<enebo>
headius: if the fix is unrelated to new transcoding methods can you check to see if this is also broken in 1.7?
<headius>
sure
subbu is now known as subbu|away
havenwood has joined #jruby
<headius>
enebo: oddly enough 1.7 passes
<headius>
but I did rejigger a lot of regexp for 9k
<enebo>
YAY
<enebo>
:)
<headius>
CASE CLOSED
<lopex>
numbers!
<lopex>
so release is nearing ?
<enebo>
lopex: relatively
<GitHub42>
[jruby] nirvdrum commented on commit d06d163: If you want to remove it, you'll need to annotate FindBugs as well. Not having it originally triggered a FindBugs failure. http://git.io/vCekT
<enebo>
lopex: as in the future
<headius>
ugh, 3193 is a super in define_method bug
<enebo>
haha
<enebo>
I wonder what
<enebo>
I forgot
<enebo>
oh yeah
mkristian has joined #jruby
<headius>
enebo: bug I need to fix for 9.0.2: jitted blocks aren't showing up in backtraces
<headius>
I must not be formatting the mangled name right
<enebo>
oh and nothing tripped over it
<enebo>
test:mri:jit
<headius>
yeah, probably nothing that tests backtrace contents in there
<headius>
or at least nothing that would be a rootless block
<headius>
(i.e. all blocks end up compiling along with a method)
KevinCorcoran has joined #jruby
<headius>
this fails in interpreter too though
<enebo>
oh yeah
<enebo>
you removed calling through one of the magic methods
<enebo>
I think
subbu|away is now known as subbu
<headius>
hmm?
<enebo>
headius: I remember glancing at this super issue and I believe prepend is a big part of it
<headius>
oh hmm
<headius>
yeah
<enebo>
headius: we match on some method names I remember thinking you have stopped calling through one
<headius>
I don't know what that means :-)
<enebo>
heh
KevinCorcoran has quit [Remote host closed the connection]
<enebo>
just a sec
<enebo>
headius: some patch I remember you stopped calling through “INTERPRET_BLOCK”
<enebo>
headius: FrameType matches against it
<enebo>
headius: it is also possilbe I am remembering wrongly too :)
<headius>
oh, this is unrelated to backtrace
<headius>
and it's jitted blocks that aren't showing up
<headius>
jesus, why would someone do this
<headius>
what a mess
<enebo>
headius: I thought you said it failed in interp too
<headius>
unrelated to backtrace
<headius>
this is a stack overflow due to a super in a define_method method calling itself again
<headius>
fails in JIT and in interp
<enebo>
haha…wait we are talking about two things
<headius>
yes we are :-)
<enebo>
yeah ok. I think the super bug is due to prepend being implemented after subbu (ignore) container logic
<enebo>
so I think this is something involving prepend endlessly calling itself by resolving super wrong
<enebo>
clearly it is calling itself to death so that was not helpful
<enebo>
but this must be an unresolved super
<enebo>
ok I am not being helpful…
<headius>
I have to get a repro that doesn't use all this gnarly rspec stuff
<enebo>
headius: the Module.new also sticks out
<enebo>
Module.new + prepend
<headius>
yeah I tried a simple case of Module.new + prepend but so far it's fine
<enebo>
At IRBuild time it does not know it is in a module scope at all
<headius>
it does become unresolved super
<enebo>
so something in IRRuntimeHelpers.unresolvedSuper
<headius>
seems to be
<enebo>
headius: searchMethod does or does not know about prepend?
<headius>
it should know about it, but in some cases I think we need to be asking for the method location before searching
<enebo>
I sort of ignored chealds impl
<headius>
there's just so many layers to this
lanceball is now known as lance|afk
bb010g has joined #jruby
KevinCorcoran has joined #jruby
<GitHub57>
[jruby] nirvdrum commented on commit e0f049e: How does this not trigger a FindBugs issue now? Did you annotate it somewhere? http://git.io/vCeGA
mkristian_ has joined #jruby
mkristian has quit [Ping timeout: 264 seconds]
<headius>
enebo: this one blows
<enebo>
BLOWS
<enebo>
CORRRAL
<enebo>
tl;dr tell people to not use prepend
<headius>
I can't even figure out the class hierarchy that triggers it because of all the intermediate rspec magic
<enebo>
headius: yeah I am guessing this one will not be tractable until we can reduce it
KevinCorcoran has quit [Remote host closed the connection]
<enebo>
headius: maybe at the time this super() is called you can dump the hiearchy
<enebo>
p self.class.ancenstors or somethign?
<GitHub29>
[jruby-openssl] mkristian closed issue #70: can not use SSL_CERT_FILE to point to java keystore http://git.io/vZzPU
skade has quit [Quit: Computer has gone to sleep.]
<headius>
I look at it but it doesn't reflect other classes where this fires
skade has joined #jruby
xcv has quit [Ping timeout: 256 seconds]
subbu is now known as subbu|lunch
KevinCorcoran has joined #jruby
lance|afk is now known as lanceball
pawnbox has quit [Remote host closed the connection]
<GitHub36>
[jruby-openssl] mkristian opened issue #74: java.lang.SecurityException with runnable jar http://git.io/vCe0L
<mkristian_>
headius, enebo, cares a new jruby-openssl release would be great. the gem only. fixed a few regressions around cert file loading (some I introduced a while ago) and added tests for them.
<mkristian_>
what are your thoughts ?
KevinCorcoran has quit [Remote host closed the connection]
<enebo>
mkristian_: I am ok with it
KevinCorcoran has joined #jruby
<klemanski>
headius, i'm on jruby-1_7 branch but i have problem running rake spec:profiler - no such file to load -- rspec/expectations, undefined method `should' for true:TrueClass, and other
<klemanski>
docs/README.test.md suggests running ant install-dev-gems, but there is no task like that
<klemanski>
thers is also no build_lib/junit.jar ad README.md says
<mkristian_>
klemanski, please have a look at BUILDING.md - not sure about those docs/* files
<klemanski>
i have some progress: $ ./bin/jruby -v # => jruby 1.7.23-SNAPSHOT and no "undefined method" errors, but still spec not passed, working on it
xcv has joined #jruby
brauliobo has joined #jruby
<headius>
klemanski: make sure you've done mvn -Pbootstrap to get things like rspec installed
<GitHub20>
[jruby] nirvdrum pushed 1 new commit to master: http://git.io/vCeie
<GitHub20>
jruby/master 887e676 Kevin Menard: [Truffle] Added missing transfers.
<nirvdrum>
headius, enebo: How do you feel about StringSupport being divorced of JRuby exceptions and instead using standard Java exceptions (or anything without a dependency on a particular backend), letting the backends handle the translation to JRuby exceptions?
<enebo>
nirvdrum: but you could possible just externd Ruby.java then and override these methods?
KevinCorcoran has quit [Remote host closed the connection]
<enebo>
nirvdrum: is that a crazy idea?
<enebo>
nirvdrum: truffle never ever uses our exceptions
<nirvdrum>
I looked at it and it gets a bit funky because we need to transfer back to the interpreter on raise.
<enebo>
nirvdrum: whose interpreter?
<nirvdrum>
The Truffle one.
<nirvdrum>
I guess I could transfer within those methods. Not ideal, but should work.
<enebo>
hmm
<enebo>
I guess you want the action of exception + raise in method
<nirvdrum>
Constructing exceptions often doesn't partially evaluate. And we don't really want to compile that anyway.
<headius>
instead of passing runtime in they could receive an object like jnr-posix's handler
<enebo>
and our newArgumentException maps to our types
<enebo>
headius: yeah I was thinking that but then do we need to deprecate 100 static mthods
<nirvdrum>
What I did here isn't great either. I have to place it behind a boundary at the moment.
* enebo
has no idea how many methods exist on StringHelper
<headius>
enebo: we'd have to do something in any case since they're going to start raising completely new exceptions
<enebo>
err StringSupport
<enebo>
headius: yeah my idea would only work if we included raise into new methods on runtime with void return
<nirvdrum>
Loading the entire runtime presents other problems as well, just by virtue of being statically reachable. It'd be nice if some of it were more pluggable.
<enebo>
which would be icky
imperator has joined #jruby
<headius>
and the exceptions they raise right now may contribute to backtrace overhead if they're used to trigger other fallback logic
<imperator>
hello
<headius>
imperator: hey there
<enebo>
nirvdrum: headius: I personally think the POSIXHAndler pattern would be the cleanest but I was trying to not cause so much deprecation
<imperator>
saw this one today: /home/dberger/.rbenv/versions/jruby-9.0.1.0/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:54: warning: loading in progress, circular require considered harmful - bigdecimal.jar
<headius>
imperator: yeah I have meant to dig into that but have not done so...it doesn't seem to hurt anything but it shouldn't be there
<enebo>
nirvdrum: headius: but I am ok with that
xcv has quit [Remote host closed the connection]
<enebo>
nirvdrum: do you know if we can leverage that anyplace else?
<headius>
enebo: I'm just thinking if we're going to do this it would be nice to do it right once
<enebo>
nirvdrum: like perhaps sharing decimal formatting
<imperator>
headius, ok, thanks - yeah, seemed to run alright after that
<nirvdrum>
enebo: I keep saying it, but we (me?) probably should search through rubygems for anything with the java platform and do a static analysis to see what methods are actually used.
<enebo>
headius: yeah it was my first thought as well I guess
<nirvdrum>
That doesn't handle the cases of private usage of course.
<nirvdrum>
But it's kinda sucky that anything that's public, even for internal-only consumption, has become a de facto API.
<nirvdrum>
enebo: Sorry, leverage what anyplace else?
<headius>
imperator: I suspect we're just triggering a re-require within the bigdecimal stuff, which would be pretty benign
<enebo>
nirvdrum: an exception handler object
<enebo>
nirvdrum: like we can parse floats and some other random utilities
<nirvdrum>
It springs up in several places.
<nirvdrum>
The two backends overlap a lot on String, Encoding, and Regexp.
<enebo>
nirvdrum: ok so adding a handler will help more than just sharing stringsupport
<nirvdrum>
StringSupport is just by far the largest.
brightball has quit [Quit: Leaving...]
<nirvdrum>
Oh, certain File handling operations as well.
<enebo>
nirvdrum: would it be insane to depreace all of StringSupport and make a new class and somehow make using these routines difficult
<nirvdrum>
I guess in an ideal world, anything that doesn't rely on either backend would be devoid of it. I totally understand why that's not the case at the moment, so this isn't me passing judgment.
<headius>
a large number of these are ports of encoding subsystem in MRI and might make sense living in jcodings
<enebo>
nirvdrum: I have limiting package access to some degree but I am entertaining the option you have a nice pattern for closing arbitrary access
<enebo>
have=hate
<enebo>
:)
<headius>
hell, the whole of code range logic probably should be in bytelist + jcodings
<enebo>
headius: +100
<lopex>
a not excptions themselves
<headius>
yeah
<enebo>
lopex: with a handler it does not matter
<enebo>
lopex: since the handler can decide how to handle the error
mberg_ has joined #jruby
<enebo>
So I think that is the best idea
<nirvdrum>
ConvertBytes is another case. In that one, fixnums & bignums are returned, but I think that's more out of convenience. Almost nothing else actually needs JRuby internals.
<lopex>
enebo: but still some backtrce would be done
<headius>
I struggled to use combination of StringSuppoer and jcodings when some methods were C-like return codes and some were exceptions
mberg has quit [Ping timeout: 240 seconds]
yosafbridge has quit [Ping timeout: 240 seconds]
<lopex>
*made
<nirvdrum>
enebo: @API, baby :-)
KevinCorcoran has joined #jruby
TheWhip has quit [Ping timeout: 240 seconds]
<enebo>
So deprecate StringSupport and add something more reusable by both backends in jcodings
<nirvdrum>
I'd be on board with that.
<nirvdrum>
Although jcodings is currently unaware of Ruby-level semantics, right?
<lopex>
yes
yosafbridge has joined #jruby
<enebo>
so CR is odd
<enebo>
errors might not be
<nirvdrum>
I think some of the StringSupport operations are Ruby-specific.
<lopex>
yes
<lopex>
mri likes to throw ruby exceptions from there
subbu|lunch is now known as subbu
<lopex>
but rejiggering would require to check for consumers
<lopex>
nirvdrum: lots of thing might be put to encoding instances themselves for specialization
<enebo>
nirvdrum: but this mostly just means generic methods can be moved without much thought and Ruby-specific ones could still be moved or not but perhaps put into a different class
<lopex>
enebo: but could it be an instance in Ruby.java ?
<enebo>
I know it would be weird to have a RubyStringSupport in jcodings but I would be really happy to not have this helper class :)
<lopex>
or some if it ?
<enebo>
lopex: yeah definitely could be as well
<enebo>
lopex: I would like to see the non-lang-speicifc sutff moved ot jcodings and get this smaller at least
<headius>
there's a bunch of stuff in EncodingUtils that has similar characteristics
<lopex>
enebo: it'll be quite a bit of work
<headius>
some depend on Ruby stuff, some are just encoding-related
<enebo>
fwiw nirvdrum has probably stared at this class more than anyone lately :)
<enebo>
we are all in agreement that generic stuff can just go into jcodings
<enebo>
So that seems like a start at least
<lopex>
should be from very beginning
KevinCorcoran has quit [Remote host closed the connection]
<enebo>
oh…cr is built into jcodings
<enebo>
so more of this is probably generic than I thought
<lopex>
enebo: where ?
<enebo>
I guess methods like succ could be said to be Ruby-specific but I do not see an issue with jcoding having a succ method which happens to behave like Ruby
<enebo>
lopex: CodeRangeable?
<enebo>
haha sorry
<lopex>
enebo: it's not in jcodings
<nirvdrum>
I wrote CodeRangeable.
<nirvdrum>
And ByteListHolder.
<enebo>
It could be though if we wanted jcodings to know about CR as an opt?
<nirvdrum>
It was my first stage in divorcing the code from RubyString.
<enebo>
nirvdrum: so you are trying to solve an immediate issue or just trying to fix this for good?
<nirvdrum>
More the latter than the former.
<headius>
if I sit here and reload my expense report for the rest of the day, I'm sure it will suddenly be approved by accounts payable
<enebo>
nirvdrum: then it seems adding all general logic to jcodings would be a great start
<enebo>
headius: JSF is cool
guyboertje has left #jruby ["Leaving"]
<lopex>
nirvdrum: anything comes to your mind requiring cr in jcodings ?
<headius>
I like to imagine every time I reload it electrically shocks the accountants a little bit
<headius>
bzzt
<headius>
bzzt
<headius>
approve me...bzzt
<enebo>
lopex: nirvdrum: I was thinking CR might be nice in jcoding if we can detect CR while doing other string operations at the same time
<nirvdrum>
enebo: For better or worse, JRuby+Truffle has to currently boot two mostly disparate runtimes and it's getting a bit long in the tooth. Abstracting the common areas so code reuse can occur without requiring both runtimes would be desirable.
<enebo>
nirvdrum: yeah I bet
<enebo>
nirvdrum: Truffle uses CR right?
baroquebobcat_ has joined #jruby
<nirvdrum>
And we're currently doing things like translating JRuby exceptions in a catch-all handler and having to rewrite backtraces.
<nirvdrum>
It does.
<enebo>
nirvdrum: Seems like CR must inadvertantly affects semantics on some level
<headius>
bzzt
<nirvdrum>
We don't really do the CoW stuff yet.
<headius>
nirvdrum: ick
<headius>
re backtrace rewriting
<enebo>
nirvdrum: I don’t think they try but I feel like it must have snuck when I see methods like cat19
<headius>
RubyString was based on String and StringBuilder for a while
<headius>
many moons ago
<klemanski>
on my default locale , is float separator not the dot
<headius>
klemanski: oh, that's why it fails?
<headius>
silly locale-specific tests
<enebo>
CR was designed by MRI to not take up space
<klemanski>
decode_graph have regexp /^\s+\d+\.\d+\s/ # parent or child
<headius>
klemanski: ok
<enebo>
and it largely only helps for knowing 7bitness
<lopex>
enebo: it's in the flags in jruby too
<enebo>
lopex: no doubt one int is worth not having to calculate length in cases
<headius>
klemanski: if it's just a problem with the test I'm not too concerned...you can push a PR and we'll see how it looks on travis
_djbkd has joined #jruby
samphippen has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<headius>
especially if it's unrelated to your changes
<nirvdrum>
enebo: We delineate between unknown & broken currently. That would complicate a bit. Also, 7-bit can be useful knowledge outside of just length (e.g., String#[]).
<klemanski>
second is that printProfile builds invalid json when "first" is not set to true
<enebo>
nirvdrum: well worst case is to set a flag is bytelength == length field to also say 8bit too
<enebo>
but two things to set is undesirable
<nirvdrum>
And pushing the envelope a bit here, if we push stuff into jcodings, it'd be nice if stuff was easily pluggable/overridable. Truffle has a set of annotations that can help guide compilation. To avoid a system-wide dependency on Truffle, I've had to treat a lot of StringSupport/jcodings as opaque, which limits optimization opportunities.
<nirvdrum>
But I'll be happy enough to just break away from runtime.
<headius>
yeah that's a bigger challenge
<headius>
jcodings is a Java library, not a Truffle library
<headius>
and Java has no compilation-guiding annotations
<headius>
(that are readily accessible)
<enebo>
nirvdrum: whether CR or length in bytelist I think would be a big improvement. Especially if jcodings operations can inform of the length/cr
mkristian_ has quit [Quit: This computer has gone to sleep]
<headius>
having jcodings know how to use cr makes sense to me now
<headius>
but obviously it's still a characteristic of the junction of byte[] and encoding, which something outside jcodings would aggregate
<headius>
in our case, ByteList or RubyString
<headius>
I don't think jcodings should have to know about ByteList because it's a very specific abstraction around byte[] + encoding
<enebo>
headius: yeah holder needs to hold it
<enebo>
headius: but calculating methods need to calculate it
<headius>
and if calculating them is something encoding related it makes sense to be in jcodings
<headius>
and other folks using jcodings would find them useful
<lopex>
nirvdrum: what was that caching wrt isCompatibleWith you mentioned last week, I forget ?
<headius>
rather than having them buried inside bytelist
<headius>
yeah this does make sense
<enebo>
yeah since jcodings can see it counting an mbc so it knows valid and potentially the number of chars
<headius>
valid = byte[] + encoding is all good
<nirvdrum>
lopex: I was just saying the set of encodings is static, essentially. So you could generate a lookup table rather than discover whether two encodings are compatible on every call.
<headius>
7bit = byte[] + encoding is ascii compat and has no high bytes
<nirvdrum>
E.g., String#== has to check if the encodings are compatible.
<headius>
etc
<lopex>
nirvdrum: you mean the pairs ?
<nirvdrum>
lopex: Yes.
<enebo>
I wonder if 8bit is important
<headius>
it might be outside Ruby
<lopex>
nirvdrum: but the code sometimes looks at String value
<headius>
within Ruby 8bit is synonymous with binary
<enebo>
heh PRs accepted for them
<lopex>
headius: hmm, I wonder how it would help joni too
<headius>
lopex: yeah true
<lopex>
headius: the whole preprocessing might go out of the water then
<lopex>
only quoting potentially
<enebo>
OUT OF THE WATER
<nirvdrum>
Well, I can take a pass at this and let you guys pick it apart :-)
<headius>
7bit matching could drop a lot of complexity
<headius>
nirvdrum: goodie :-)
<lopex>
enebo: did I use it correctly ?
<enebo>
nirvdrum: we ruv u
<nirvdrum>
I'd really like to fix the jcodings index confusion as well.
<enebo>
lopex: I have no idea what it means so maybe not :)
<headius>
hah yeah
<headius>
if only those indexes in MRI had some standard mapping in the real world
<nirvdrum>
That static field creates problems for SVM as well.
<lopex>
enebo: hmm, I bet I heard it in some birtish english
<lopex>
enebo: oh, hmm blows out of the water ?
<nirvdrum>
I think the code as written allows someone to provide their own Encoding implementation. Is that even really doable, however?
<enebo>
may blow it out of the water
<enebo>
sure
<headius>
lopex: I assume MRI uses index for each encoding so they can pack it into fewer bits than a pointer, yeah?
<enebo>
I know that phrase
<lopex>
headius: it was that way then yes (in flags)
<headius>
right
<lopex>
ivar otherwwise
<headius>
I wonder how much overhead they have constantly looking those indices up
<headius>
where we just grab the Encoding field
<lopex>
I always wondered abou that
<nirvdrum>
In any event, the list of encodings within jcodings is finite and fixed, so we could just assign each an index and call it a day.
<headius>
flags + mask + dereference into encodings array for every operation
<nirvdrum>
Instead of this lookup table system where the iterator index is different.
<headius>
probably + shift somewhere too
<headius>
fast ops but wasted work
<headius>
nirvdrum: yeah
<lopex>
headius: and if that fails then ivar
<headius>
would make debugging a lot easier too
<headius>
lopex: that was messy when I was porting the rest of logic too, since ANY object in MRI can have an associated encoding
<nirvdrum>
Of course, jcodings suffers from compatibility constraints as well. And ostensibly others are actually using it.
<headius>
even though in practice only like 2 or 3 types do it
<headius>
nirvdrum: I know of nobody using jcodings right now except via joni
<headius>
facebook uses joni for some stuff
<headius>
at the very least
<enebo>
nirvdrum: NAW
<enebo>
nirvdrum: major numberz
<klemanski>
./bin/jruby -S rake spec:profiler is running in 1.8 mode, ./bin/jruby --profile --1.8 -S rspec spec/profiler/profiler_basics_spec.rb fails but ./bin/jruby --profile --1.9 is passing
<headius>
so the transitive dependency needs to work but I don't know of anyone using jcodings public API
<klemanski>
export JRUBY_OPTS=--1.9 is ignored
<headius>
klemanski: ah-ha
<headius>
ignore the 1.8 mode then
<headius>
that's our motto these days
<headius>
enebo: I can't fix this prepend shit
<klemanski>
but assertion is for 1.9 but runner starts with 1.8 mode
<headius>
I have no idea what's going on with it
<enebo>
headius: any reduction tat all?
<headius>
no
<headius>
I managed to remove the anonymous module but that's about it
<headius>
the rest is all twisted around rspec guts
<klemanski>
probably commit fixes also this falling expectaiton
<headius>
the brain betrays
brauliobo has quit [Ping timeout: 268 seconds]
<headius>
I make a point of not remembering trifling details, and then I regret it when I can't remember them
<isjaylee>
so how does minneapolis not have a jruby meetup?
<headius>
I still get that weird expectation fail
xcv has quit [Ping timeout: 264 seconds]
<headius>
isjaylee: I dunno, I guess we never figured we had enough users to warrant it
<headius>
or content
<headius>
jruby meetup in minneapolis is taking enebo and I out for a beer
<enebo>
heh
<isjaylee>
haha, might have to take you up on that then. trying to wrap my head around jruby with 2011 books
<headius>
yeah we need to update the book :-(
<headius>
the deploying book is supposed to be getting an update right now
<headius>
ideally we will update using book too but have not started that process
<headius>
you running into a lot of things that have changed?
<isjaylee>
i think it's probably more my not getting it than it is the books itself
<isjaylee>
java's scary
hobodave has joined #jruby
<headius>
ahh yeah
<headius>
klemanski: I'm stumped about that expectation fail
yfeldblum has quit [Ping timeout: 240 seconds]
<hobodave>
hey guys. Is there a way to have Object#instance_of? (or some equivalent) detect superclasses of a Java object?
<headius>
kind_of?
<headius>
the Java hierarchy should be reflected in the Ruby hierarchy
skade has quit [Quit: Computer has gone to sleep.]
skade has joined #jruby
<klemanski>
it's time to start moving to 9k, gem "iconv-jruby" would be helpfull :)
<headius>
we could do that
<headius>
I only found out recently that they gemified it when they removed it
<hobodave>
headius I'm not sure why I didn't think of that. Thanks!
<headius>
ideally we'd get it into iconv gem
<klemanski>
i would be nice to move to 9k and then migrate to new encoding api "in free time"
<headius>
iconv gem project really just needs someone to rip out what we have in 1.7 and put it into the gem
<headius>
or even better, someone to write a pure-Ruby wrapper around 1.9 encoding/transcoding that matches iconv API
<klemanski>
or at least some wiki page with examles how to do it
<headius>
iconv only has like one method right?
<headius>
looks like only one method with any meat
<headius>
"iconv"
<headius>
I'm sure iconv could be implemented atop 1.9+ transcoder
<klemanski>
Iconv.conv('UTF-8//IGNORE//TRANSLIT', 'US-ASCII', translited) and Iconv.new('UTF-8//IGNORE//TRANSLIT', 'US-ASCII').conv(translited)
brightball has joined #jruby
<headius>
right
<klemanski>
conv/iconv is probably most important method
<headius>
those all just map to Encoding::Converter modes
isjaylee has quit [Quit: Leaving.]
tcrawley is now known as tcrawley-away
TheWhip has joined #jruby
<mberg_>
Huh. Helping a coworker figure out why jython-2.7.0 no longer had an os.getpid() method, traced it to a jnr.posix.POSIXFactory failure, discovered the jython standalone jar seemed to be missing a bunch of the jnr.posix package.
<headius>
mberg_: I don't think they've kept up
<headius>
it has evolved pretty rapidly over the past few years
<headius>
it = jnr-posix
<mberg_>
The weird thing is that it does seem to work in some environments. Same box, same jar, was able to load on 1.7 but not 1.8, and he's claiming that it works on 1.8 on another host that should be the same (kernel, libc, jvm, etc) but is running on ESXi instead of KVM
colinsurprenant has joined #jruby
havenn is now known as havenwood
<mberg_>
In this case, it may just be a build issue. They included the whole package up through 2.7.0b3, but not 2.7.0b4 and forward.
* mberg_
would frankly like to make it a non-problem by ditching jython in favor of jruby. ;) But this is part of a larger product of a company we acquired.
mberg_ is now known as mberg
<headius>
mberg: we have *tried* to keep jnr-posix backward-compatible...maybe it will just drop in?
<mberg>
I just pushed the classes from their last working release into their broken one and it fixed the problem.
KevinCorcoran has quit [Remote host closed the connection]
<headius>
enebo: moving on to fixing block jit backtrace
<headius>
mberg: nice
<enebo>
ok
KevinCorcoran has joined #jruby
<mberg>
Hopefully the jython folk just fix their build to include them in the next release. But now I want to figure out what is different that the absence of the LinuxLibCProvider doesn't seem to matter sometimes. :/
<headius>
if it's absent we would fall back to pure-Java version
<headius>
I think
<mberg>
I'll probably look closer tomorrow, since it's late and I mostly want to sate my curiosity more than anything else.
<headius>
hmm
<headius>
maybe I'm wrong about blocks being missing
<headius>
it works in a simple case just fine
<headius>
but it doesn't show up in some Java exception traces
KevinCorcoran has quit [Ping timeout: 240 seconds]
<GitHub29>
[jruby] headius pushed 1 new commit to master: http://git.io/vCvGX
<GitHub29>
jruby/master cbcd2eb Charles Oliver Nutter: Check OOME message for nullness so we can report this properly.
<naag>
there's some things unclear on that issue so if you've got some free time, i'd be happy to explain in more detail what's going wrong
<naag>
(at least what i think is going wrong)
<headius>
naag: I'm a docker newbie
<headius>
yeah go for it
isjaylee has joined #jruby
<naag>
headius: ok here goes. we're using Bunny to connect to RabbitMQ. with MRI, things are smooth, but JRuby experiences a NoMethodError inside Bunny
<naag>
i looked at the code and imagine there might be something fishy going on inside Bunny or JRuby, not really sure about that
lanceball is now known as lance|afk
<naag>
but while digging in, i found that JRuby does not catch the NoMethodError when looking for Exception
<naag>
so this NoMethodError reports false for e.is_a?(Exception)
<headius>
yeah that's strange
<naag>
which is kind of funny? i looked at the ancestors:
<headius>
jruby -e 'begin; zagnut; rescue Exception; p $!; end' works fine
<headius>
that's why I was wondering if that's a mix-up in what Exception means at that point in the code
<naag>
yes, i also tried to isolate the issue but i couldn't reproduce it outside of bunny
<naag>
i greped bunnys code for 'import' and didn't find any import of java.lang.Exception