<JRubyGithub>
[jruby] nirvdrum pushed 1 new commit to master: http://git.io/boa4
<JRubyGithub>
jruby/master 9f1ad0a Kevin Menard: [Truffle] Untagged passing Encoding.find specs.
JRubyGithub has left #jruby [#jruby]
nateberkopec has joined #jruby
knowtheory has joined #jruby
<knowtheory>
enebo: hey!
<enebo>
knowtheory: ah I missed a bit of that stream. I thought you wrote PDFium which used GS
<knowtheory>
enebo: np! yeah. this is about ditching ghostscript
<enebo>
knowtheory: aha. ok as you were then :)
<knowtheory>
the guys who wrote ghostscript have moved onto mupdf (which has a much nicer api)
<knowtheory>
and we're giving PDFium a shot
<knowtheory>
would be interested in chatting about how we should be doing this for jruby compatibility too at some point
<knowtheory>
our current sprint is just focused on getting a working pipeline atm
<enebo>
knowtheory: well I guess it depends on how popular it becomes but considering that you might want a second backend to something might change your design
<knowtheory>
using JRuby as a platform has been on my todo list for a while (but low priority unfortunately)
<enebo>
knowtheory: I am not a big person for designing for reuse before getting something workng well first
<knowtheory>
enebo: nah, we've got it designed in a pretty abstracted/minimalist way
<knowtheory>
and yeah, if alternative backend is the way to go, that's good to keep in mind :)
<knowtheory>
(and there are a pile of different PDF rendering/processing libraries)
<enebo>
knowtheory: oh this is JS code?
<knowtheory>
nope?
<enebo>
hahah
<knowtheory>
sorry repo's not public yet :D
<knowtheory>
i should do that
<enebo>
PDFium
<knowtheory>
PDFium is a c/c++ library that power's Chrome's pdf rendering
<knowtheory>
it's part of chrome/chromium
anaeem1 has quit [Quit: Leaving...]
<knowtheory>
and for a variety of crazy reasons includes v8 as a dependency
<knowtheory>
(if that's what's caught your eye)
<enebo>
ah ok someone did not know how to describe it in a post
<knowtheory>
haha :D
<knowtheory>
there's surprisingly little written about it
<enebo>
knowtheory: yeah so the other wondering is how hard ffi would be
<knowtheory>
PDFium is a free/unencumbered extraction out of FoxIt's PDF sdks
<knowtheory>
Yeah, that's another port of call, but having never written a ruby extension before, all the tutorials/docs focus on vanilla c ext authoring
<knowtheory>
I poked around the FFI stuff for a little while just to try and get oriented
<enebo>
knowtheory: I guess the main downside of FFI is changes between platforms but since it is chrome perhaps it is really stable in that regard
<knowtheory>
oh yeah? PDFium is intended to run everywhere
<enebo>
knowtheory: and I guess it depends on how granular your interaction is too
<knowtheory>
although our current focus is just to make sure it runs on ubuntu & osx
<enebo>
knowtheory: I mostly mean if you need to call a C/C++ method which saves to a struct some systems do not have same layouts and sizes for the struct. This likely is not an issue for something only shipped with chrom
<knowtheory>
(we've written a brew formula and had to create a deb for it, cause installing pdfium by itself is essentially about downloading a tarball and using google's tools to compile it)
<knowtheory>
Yeah the major components are just PDFium to read PDFs and dump out bitmap data
<enebo>
heh to the tarball
<knowtheory>
and then FreeImage for conversion to a variety of formats
<enebo>
knowtheory: is it BMP?
<knowtheory>
yup
<enebo>
knowtheory: ok I wonder if image_voodoo can handle BMPs
<enebo>
knowtheory: that is the other side as well making images
<knowtheory>
oh interesting
<enebo>
knowtheory: so I recommend that library when you do contemplate JRuby :)
<knowtheory>
Awesome, i'll keep that on file
<enebo>
knowtheory: I will even add BMP support if it is missing (I doubt it is since BMP flavors are ancient)
<knowtheory>
Yeah we've been debating the best interface to FreeImage, and whether we were gonna pull it in ourselves at the C level
<knowtheory>
so this is a good reason not to :)
<enebo>
knowtheory: image_voodoo is only JRuby but making an API similar to it might be a good idea. with_bytes { |img| img.save … }
<enebo>
knowtheory: It is meant to be compatible+ with image_science
<enebo>
knowtheory: but I don’t know if image_science supports BMP
<knowtheory>
yeah, if we sling the bitmap data back up through ruby so that it can be routed to image_science or image_voodoo
<knowtheory>
that's potentially a good idea
<enebo>
knowtheory: I guess it is largely you need to return something to Ruby but if it is essential and InputStream or a pointer to byte data then it should be low weight
<JRubyGithub>
[jruby] chrisseaton pushed 3 new commits to master: http://git.io/bKsu
<JRubyGithub>
jruby/master ccfa2af Chris Seaton: [Truffle] Move Array#| to Ruby.
<JRubyGithub>
jruby/master 4236e2e Chris Seaton: [Truffle] Move Array#== and Array#eql? to Ruby.
<JRubyGithub>
jruby/master d1de0a0 Chris Seaton: [Truffle] Remove the specialised Array#any? - it wasn't actually optimised anyway.
JRubyGithub has left #jruby [#jruby]
camlow325 has joined #jruby
baroquebobcat has joined #jruby
triple_b has joined #jruby
calavera has joined #jruby
mrmargolis has joined #jruby
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] chrisseaton pushed 3 new commits to master: http://git.io/bKWD
<JRubyGithub>
jruby/master f5d97c9 Chris Seaton: [Truffle] Array#clear is fine for compilation, and we shouldn't throw away any existing storage or specialization.
<JRubyGithub>
jruby/master e8e3278 Chris Seaton: [Truffle] Move Array#empty? to Ruby.
<JRubyGithub>
jruby/master 74e693c Chris Seaton: [Truffle] Remove the specialised Array#find - it wasn't actually optimised anyway.
JRubyGithub has left #jruby [#jruby]
subbu|away is now known as subbu
vtunka has joined #jruby
sgrif has joined #jruby
slyphon has joined #jruby
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] chrisseaton pushed 2 new commits to master: http://git.io/bK0A
<JRubyGithub>
jruby/master 14f88f5 Chris Seaton: [Truffle] Move Array#flatten to Ruby.
<JRubyGithub>
jruby/master 52f8033 Chris Seaton: [Truffle] Move Array#to_a to Ruby.
JRubyGithub has left #jruby [#jruby]
vtunka has quit [Quit: Leaving]
triple_b has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
donV has joined #jruby
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] nirvdrum created truffle_coerce_to_str_node (+1 new commit): http://git.io/bKrQ
<JRubyGithub>
jruby/truffle_coerce_to_str_node d935095 Kevin Menard: [Truffle] Extracted Kernel#eval's to_str coercion to a new node.
eregon has quit [Read error: Connection reset by peer]
eregon has joined #jruby
fridim_ has quit [Ping timeout: 264 seconds]
fridim_ has joined #jruby
cpuguy83 has joined #jruby
shellac has quit [Quit: Computer has gone to sleep.]
<sgrif>
enebo & subbuss: Thanks for being so patient with me on this
shellac has joined #jruby
Liothen has quit [Ping timeout: 245 seconds]
<enebo>
sgrif: I should say the same to you
<enebo>
sgrif: I hate to keep someone hanging on this many changes :)
PragTob has quit [Remote host closed the connection]
<sgrif>
Trust me, I have no issues with working on fixing issues.
<sgrif>
I didn't expect this to be ready when I first opened it
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] nirvdrum pushed 2 new commits to truffle_coerce_to_str_node: http://git.io/bKHR
<JRubyGithub>
jruby/truffle_coerce_to_str_node 21a7cdb Kevin Menard: [Truffle] Transfer to interpreter before building up exception message.
<JRubyGithub>
jruby/truffle_coerce_to_str_node 1653315 Kevin Menard: [Truffle] Use a clearer method name to help out debugging.
JRubyGithub has left #jruby [#jruby]
<enebo>
sgrif: well thanks. I really enjoyed the gusto you went after this
<sgrif>
^_^
<sgrif>
It was my pleasure. It seemed like an easy win, and will help Rails greatly
<sgrif>
Unfortunately, it looks like MRI is less receptive to making this change, so you'll just have another case where you guys are significantly faster
Liothen has joined #jruby
<enebo>
sgrif: did they say why?
<sgrif>
Ability to alias eval and binding, and the inability to easily catch that at the compiler level
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] lumeet opened pull request #2572: Fix uninitialized usage of File::Stat on jruby-1_7 (jruby-1_7...uninitialized_file_stat_jruby-1_7) http://git.io/bKQ9
JRubyGithub has left #jruby [#jruby]
<enebo>
lumeet: thanks for the second PR.
imperator has joined #jruby
metadave has joined #jruby
metadave has left #jruby [#jruby]
<enebo>
lumeet: In the future if you check for 1.9 issues and submit to jruby-1_7 branch we will end up merging those changes into master (assuming they still apply to 2.2) so it becomes a one PR affair if done that way
<chrisseaton>
sgrif: clever - a good example of an IR pass
pietr0 has joined #jruby
<chrisseaton>
sgrif: but how do you handle cases where for example you have decided to not allocate a temporary proc, because you thought it was immediately going to be converted back to a proc, and then the method that would have done that is monkey patched, and now you're left in between, holding a block when you wanted a proc? is there logic to go back and fix that up?
<sgrif>
When a method is monkey patched mid-execution?
<chrisseaton>
Yeah
<sgrif>
I guess I'm not sure I understand
<chrisseaton>
sgrif: I'll try to make a solid example and get back to you
<sgrif>
chresseaton: <3
<sgrif>
chrisseaton*
<chrisseaton>
sgrif: you're effectively doing escape analysis here, and one of the hardest bits of that is fixing it all up again if it all goes wrong
Liothen has quit [Ping timeout: 245 seconds]
<enebo>
chrisseaton: This is only detecting a case where the block should not be reified into a proc. I think it is a static opt
cajone has quit [Ping timeout: 245 seconds]
<chrisseaton>
enebo: you might be right - I'm checking as a mental exercise....
<enebo>
chrisseaton: we don’t do OSR-like behavior either so we won’t deopt halfway through a method execution either
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] nirvdrum pushed 5 new commits to master: http://git.io/bKje
<JRubyGithub>
jruby/master 76913e2 Kevin Menard: [Truffle] Extracted Kernel#eval's to_str coercion to a new node.
<JRubyGithub>
jruby/master 1d41e85 Kevin Menard: [Truffle] Use a clearer method name to help out debugging.
<JRubyGithub>
jruby/master 3fef31d Kevin Menard: [Truffle] Transfer to interpreter before building up exception message.
JRubyGithub has left #jruby [#jruby]
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] nirvdrum deleted truffle_coerce_to_str_node at 71bdae0: http://git.io/bKjT
JRubyGithub has left #jruby [#jruby]
<enebo>
chrisseaton: Ah I think I might understand your question. We pass block pass elements as Block.java instances. So even if we reify to a proc we will still unwrap it back to a block if it is passes as a block pass var
yfeldblum has joined #jruby
<chrisseaton>
enebo: yeah that was it - ok I get it
cajone has joined #jruby
vtunka has quit [Quit: Leaving]
Liothen has joined #jruby
Brian has joined #jruby
Brian is now known as Guest99870
yfeldblum has quit [Ping timeout: 245 seconds]
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] eregon pushed 7 new commits to master: http://git.io/b6Ub
<JRubyGithub>
jruby/master 933a2c3 Benoit Daloze: [Truffle] Avoid using frame-style visibility in core....
<JRubyGithub>
jruby/master 4221159 Benoit Daloze: [Truffle] Do not error if there is no visibility in the caller frame....
JRubyGithub has left #jruby [#jruby]
kwando_ has joined #jruby
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] nirvdrum pushed 1 new commit to master: http://git.io/b6TF
<JRubyGithub>
jruby/master 0a7f712 Kevin Menard: [Truffle] Handle String coercion in Encoding.find.
JRubyGithub has left #jruby [#jruby]
kwando has quit [Ping timeout: 264 seconds]
rsim has quit [Read error: Connection reset by peer]
<lumeet>
enebo: ah, alright. I thought so at first but for some reason misinterpreted the message anyway. it's good to know because I guess I'm going to submit a few more during the following weeks.
<enebo>
lumeet: great. thanks for the work!
benlovell has quit [Ping timeout: 252 seconds]
triple_b has joined #jruby
<donV>
Hi all!
<donV>
How are you all doing?
<lumeet>
enebo: I noticed for example that http://jira.codehaus.org/browse/JRUBY-4828 has reappeared, not completely though but the null byte error is no longer there. I think there should be StringSupport.checkEmbeddedNulls in many places in File, Dir, IO at least.
<enebo>
lumeet: yeah ick. I agree some helper and uniform way of processing strings for file destined stuff
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] nirvdrum pushed 1 new commit to master: http://git.io/b6Gc
<JRubyGithub>
jruby/master 53665ec Kevin Menard: [Truffle] All Encoding.{default_interal, default_internal=} specs now pass.
JRubyGithub has left #jruby [#jruby]
shellac has quit [Quit: Computer has gone to sleep.]
<enebo>
system ~/work/bench9000 master 3687% bash: /Users/enebo/.rbenv/versions/2.1.5/bin/ruby: No such file or directory
<enebo>
?
<enebo>
:)
<nirvdrum>
I don't think it supports RVM.
<enebo>
I am trying to run my local dev only…do I need anything for that?
<nirvdrum>
Testing other rubies needs to be via rubies installed with rbenv/ruby-build, AFAIK.
<nirvdrum>
The 2.1.5 you specified is for MRI-2.1.5
<enebo>
oh god
<enebo>
ok..yeah I had no idea what that was
yfeldblum has joined #jruby
<nirvdrum>
I'm not sure why, but ruby-build omits the mri- prefix for version numbers.
<nirvdrum>
bench9000 just does a direct string match.
<enebo>
nirvdrum: yeah I am happy there is a big detailed readme but I did not really understand some of it
<enebo>
like the CLI usage
<enebo>
:)
<nirvdrum>
I didn't write it :-)
<nirvdrum>
I don't think anyone will get mad if you want to clarify anything in there.
<enebo>
not blaming anyone but myself
<nirvdrum>
Eh, the rbenv part is probably not very intuitive.
<nirvdrum>
Especially if you've been accustomed to RVM.
subbu is now known as subbu|lunch
<enebo>
well I did not read the entire document to try and run it and I don’t think anyone will do that
<nirvdrum>
Fair enough. I can't imagine anyone outside Ruby implementers using it anyway :-P
<enebo>
So perhaps I can add a quick start right after philospophy
<nirvdrum>
That'd be fine.
<nirvdrum>
Well, Chris did all the work. But I can't imagine he'd mind.
<enebo>
he can revert it if he does not like it
baroquebobcat has quit [Quit: baroquebobcat]
baroquebobcat has joined #jruby
<chrisseaton>
enebo: do what you like
<chrisseaton>
enebo: it's designed to be scientifically correct and flexible for writing papers rather than easy to use, and it's not always very fast as it tries very hard to make sure the program is warmed up
<chrisseaton>
enebo: let me know if you need any help
<enebo>
chrisseaton: My only two suggestions would be to warn if rbenv is not a command and some quick start section
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] nirvdrum pushed 2 new commits to master: http://git.io/biOY
<JRubyGithub>
jruby/master 534e7ac Kevin Menard: [Truffle] String#<=> needs to return one of {-1, 0, 1}.
<JRubyGithub>
jruby/master ede5c46 Kevin Menard: [Truffle] Handle String coercion in String#<=>.
JRubyGithub has left #jruby [#jruby]
<enebo>
chrisseaton: not sure if I am qualified to make a synopsis section quite yet though
<chrisseaton>
enebo: if you want to do something simple it should be fairly simple (except for it assuming you have rbenv and things)
dinfuehr has quit [Ping timeout: 264 seconds]
<enebo>
chrisseaton: are there any other prereqs?
<chrisseaton>
enebo: I don't think so, no
<enebo>
ok
<chrisseaton>
and if you just want to benchmark JRuby as you develop it you don't even need rbenv
<nirvdrum>
The only other caveat is the list of Ruby versions is hard-coded in the project somewhere. So it's not enough to just specify a version you may have installed with rbenv.
<chrisseaton>
Yeah - that's something we should change
<chrisseaton>
it's in lib/bench/default.config
<enebo>
chrisseaton: yeah I figured that out
<nirvdrum>
enebo: Looking to measure that block change?
<enebo>
nirvdrum: well I have a large series of changes locally and was hoping to measure differences but I think I will need to restrict this set of benches I use
<nirvdrum>
Nifty.
<enebo>
Does it put the output somewhere?
<enebo>
without explicitly specifying where?
<nirvdrum>
It should dump to STDOUT.
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] nirvdrum pushed 2 new commits to master: http://git.io/bini
<JRubyGithub>
jruby/master a2f5e08 Kevin Menard: [Truffle] Handle String coercion in String#{<<,concat}.
<JRubyGithub>
jruby/master 0e6a3a2 Kevin Menard: [Truffle] Handle frozen Strings in String#{<<,concat}.
JRubyGithub has left #jruby [#jruby]
<enebo>
well the samples did I guess
<nirvdrum>
The score will when the benchmark is done.
<enebo>
It didn't
<enebo>
but perhaps ‘detail’ is not right command?
<enebo>
I shoudl do report perhaps?
<nirvdrum>
I've only run it a few times. If chrisseaton is still around, he'd be better able to debug.
<enebo>
I bet I should be doing report
JRubyGithub has joined #jruby
<JRubyGithub>
jruby/master af2e2e0 Kevin Menard: [Truffle] Untagged some passing String specs.
<JRubyGithub>
[jruby] nirvdrum pushed 1 new commit to master: http://git.io/biWe
<JRubyGithub>
jruby/master be3e5bf Benoit Daloze: [Truffle] Make all class/module fields of CoreLibrary final....
JRubyGithub has left #jruby [#jruby]
subbu|lunch is now known as subbu
<enebo>
chrisseaton: I am only interested in one implementation
<enebo>
chrisseaton: and I am using group “3” so hopefully this is about 10-12 minutes for interp
<chrisseaton>
the problem with the benchmark ips approach is the the number of invocation varies between implementation as it attempts to scale them for the different performances - we need to keep the number of invocations the same, but also make the number of iterations high enough to be non-trivial for optimising implementations - which means it's always quite slow