<headius>
and that's one of the simplest pieces of logic
pitr-ch has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<lopex>
lovely
<chrisseaton>
I wonder if JRuby with JNR to call GMP would work well
<chrisseaton>
BigInteger seems quite slow in places
<headius>
calling native is usually the last resort
<headius>
especially for something like math
<headius>
JScience has much faster impls of BigInteger and BigDecimal but we've not explored using it
<headius>
rbx uses libtommath for Bignum but I believe they just use the MRI BigDecimal ext
<headius>
chrisseaton: I just don't know from reading MRI's code where the MRI behavior ends and the BigDecimal impl begins :-(
<headius>
whatever we wrap would still need to conform to the MRI-specific parts too
<headius>
ugh...re-ported some logic for mul/div and now a BigDecimal spec is hanging ;-(
<chrisseaton>
I keep meaning to try running some of MRI using Sulong
<headius>
it would certainly be a good test...they use every trick in the book
<headius>
well-behaved extensions they are not
temporalfox has joined #jruby
temporal_ has quit [Ping timeout: 272 seconds]
licrfsb has joined #jruby
headius has quit [*.net *.split]
headius has joined #jruby
<eregon>
There is an option to use GMP at least for * in MRI, but I think for other functions they didn't consider as their impl might be faster or similar.
<eregon>
That's for Bignum though, not BigDecimal
temporalfox has quit [Read error: Connection reset by peer]
<lopex>
Bignum also forks at places afaik
<lopex>
I mean spawns threads
temporalfox has joined #jruby
lanceball is now known as lance|afk
nicksieger has joined #jruby
<headius>
lopex: lovely
<lopex>
bigdivrem1
<lopex>
look at the arbitrary bds.zn > 10000 || bds.yn > 10000
<GitHub25>
jruby/master d97bf85 Charles Oliver Nutter: Make all 1.8-era convert methods do 1.9 logic....
<GitHub25>
jruby/master 43e9bb1 Charles Oliver Nutter: Add specs for * and ** coercion of BasicObject types....
<GitHub174>
[jruby] headius closed issue #4210: **operator behavior is different from MRI https://git.io/vPWHu
<eregon>
headius: because they don't parse on older rubies?
<eregon>
headius: no there are separate examples
<eregon>
maybe your editor is failing you? :p
<eregon>
headius: fixtures would work but you'd have to name them. That's pretty annoying I believe for combinations of arguments. But feel free to do so :D
<headius>
eregon: but they only evaluate the method definitions
<headius>
then they call with kwargs and ** and stuff as plain Ruby
<headius>
hell, we could metaprogram all these combinations and not maintain anything but the actual expectations by hand
<headius>
and the method names could be the literal text of the arguments
<headius>
(or some romanized version of it)
<eregon>
that's pretty much what it is but without the metaprog, isn't it?
<eregon>
** is fine, but def(foo:) is not
<eregon>
(well, to be checked)
<headius>
there's already a precedent for things that don't parse...separate files
<eregon>
so which file are you looking at, I didnt write these specs!
<headius>
well then don't defend them :-)
<headius>
language/method_spec.rb
<headius>
most of the file is one long "it" that uses "evaluate"
<headius>
this is also impractical for trying to incrementally support these specs because first fail kills the run
<eregon>
A method assigns local variables from method parameters
<eregon>
- for definition 'def m(a) a end'
<eregon>
- for definition 'def m((a)) a end'
<eregon>
- for definition 'def m((*a, b)) [a, b] end'
camlow325 has joined #jruby
<eregon>
it's different it
<headius>
ugh
<headius>
so evaluate wraps it
<eregon>
evaluate <<-ruby do
<eregon>
is just
<eregon>
ruby
<eregon>
def m((a)) a end
<eregon>
it "def m((a)) a end" do
<eregon>
eval_in_some_module "def m((a)) a end"
nicksieger has joined #jruby
<headius>
just to be clear, you're saying you like this style better than version files and fixtures, yeah?
<eregon>
so it just avoids duplication and allows to define a method in a module without too much pain
<eregon>
no, I don't say that
<eregon>
but for this particular case I understand the motivation at least
<headius>
it appears that evaluate is only used for argument lists
<eregon>
I don't really love fixtures because you always have to context switch
<eregon>
yes, pretty much afaik
<headius>
so it's either duplicating a bunch of signatures everywhere, or it's not consistently testing all forms
<eregon>
m() seems nicer in expectations than m_one_req_two_opt_rest()
<headius>
I disagree
<headius>
but it doesn't have to be named that either
<eregon>
how do you name it then? :p
enebo has joined #jruby
subbu is now known as subbu|breakfast
<chrisseaton>
headius: is it possible to get a integrated C/Ruby backtrace when you're using C extensions?
<headius>
Methods.req1opt2rest?
<headius>
chrisseaton: not that I know of
<eregon>
headius: yeah there are some like that in core/method/fixtures/classes.rb
<headius>
there's probably some gdb way
<chrisseaton>
I might blog that Sulong gives you that, but need to search to see if anyone's done it before
<headius>
I know I've seen it but it was not something you could just get with a flag
<headius>
and I thought it was possible in rbx too but I don't remember details
<headius>
eregon: how far back is ruby/spec supporting at this point?
<eregon>
2.1
jensnockert has joined #jruby
<eregon>
so there are probably very few cases of syntax issues
<eregon>
so we could easily convert those evaluate in it, by just putting the def in the it, but you'd still have to name the examples :)
<headius>
no, I wouldn't
<eregon>
headius: would that be better? We could automate if we just name the examples as the code
<headius>
the fixture could supply the name as well
<headius>
I'm thinking it through a bit
<headius>
the main thing that bugs me is the duplication and the diference from how all other specs work
<eregon>
So how would you do it? In a very meta way that just use the same list of args for methods/procs/lambdas?
<headius>
I said I'm thinking it through :-)
<eregon>
sorry :D
<eregon>
that's nice for DRY but maybe quite a bit magic to understand as well. And then we get a giant Hash somewhere with args => (expectations for methods, expectations for procs)
<eregon>
method_spec/lambda_spec duplicate quite a bit
lance|afk is now known as lanceball
nicksieger has quit [Read error: Connection reset by peer]
<GitHub128>
[jruby] eregon pushed 1 new commit to truffle-head: https://git.io/vP8Uq
<GitHub128>
jruby/truffle-head 23dd0d0 Benoit Daloze: [Truffle] Show the path on ENOENT.
<chrisseaton>
I wonder if you could abstract the specs another level and write declarations of behaviour and have code generated for you
<headius>
napkin sketch...combining the describe <descriptive name> it <does stuff> and tap would reduce it by a few lines
<headius>
chrisseaton: that's kinda what I'm thinking too
<headius>
if you represented the structure of the args and what passing certain things to them should do, you'd be able to generate most of these specs
<headius>
pretty weird specdoc output from core/method/alias_spec.rb, plus all the duplication
<headius>
eregon: this is kinda academic because I don't plan on spending time on this before my trip anyway...just had to figure out how/where to add my specs and discovered this
nicksieger has quit [Read error: Connection reset by peer]
<headius>
brb
nicksieger has joined #jruby
nicksieg_ has joined #jruby
nicksieger has quit [Read error: Connection reset by peer]
<GitHub105>
jruby/truffle-head 7916404 Benoit Daloze: [Truffle] Add a FAILURE constant in PrimitiveNode.
<GitHub105>
jruby/truffle-head 41add42 Benoit Daloze: [Truffle] Move Math.ldexp to primitive.
nicksieger has quit [Read error: Connection reset by peer]
pilhuhn is now known as pil-afk
<GitHub62>
[jruby] eregon pushed 1 new commit to truffle-head: https://git.io/vP8Yn
<GitHub62>
jruby/truffle-head b49cfca Benoit Daloze: [Truffle] Eclipse: format only edited lines.
nicksieger has joined #jruby
shellac has quit [Quit: Leaving]
claudiuinberlin has quit []
nicksieger has quit [Read error: Connection reset by peer]
thedarkone2 has joined #jruby
nicksieger has joined #jruby
prasunanand has quit [Quit: Leaving]
nicksieger has quit [Read error: Connection reset by peer]
nicksieger has joined #jruby
<GitHub157>
[jruby] chrisseaton pushed 1 new commit to truffle-head: https://git.io/vP8ZG
<GitHub157>
jruby/truffle-head 7e15360 Chris Seaton: [Truffle] Update Truffle.
nicksieger has quit [Read error: Connection reset by peer]
nicksieger has joined #jruby
<GitHub142>
[jruby] eregon pushed 3 new commits to truffle-head: https://git.io/vP8nO
<GitHub142>
jruby/truffle-head 0f3030b Benoit Daloze: [Truffle] Remove usages of CallDispatchHeadNode.callFloat.
<GitHub142>
jruby/truffle-head 0bb8863 Benoit Daloze: [Truffle] Convert Math.frexp to a primitive.
<GitHub142>
jruby/truffle-head e67238e Benoit Daloze: [Truffle] Remove now unused callFloat().
thedarkone2 has quit [Quit: thedarkone2]
nicksieger has quit [Read error: Connection reset by peer]
nicksieger has joined #jruby
<chrisseaton>
headius: when you tried Java 9 recently, did you try to build it on Java 9 with Maven? I get 'Cannot make a non-public member of class java.lang.reflect.AccessibleObject accessible' immediately
pitr-ch has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jensnockert has quit [Read error: Connection reset by peer]
jensnockert has joined #jruby
pitr-ch has joined #jruby
claudiuinberlin has joined #jruby
pitr-ch has quit [Read error: Connection reset by peer]
<chrisseaton>
And the only thing I changed was I modified jruby.version in the Mavenfile
<headius>
ignore the Mavenfile
<headius>
it's not used in the build
<headius>
that's for an integration test
<headius>
I think that's coming from polyglot-ruby not using a recent-enough jruby
<headius>
mven polgyglot
<chrisseaton>
Sounds probable - can I update that manually do you think? Or is trying to run Maven with Java 9 just not worth the hassle at this stage?
<olle>
enebo: Everyone who authored jruby’s .travis.yml did. It and docs and trying things taught me a lot.
<enebo>
olle: yeah stuff like travis configs are stone soup to me :)
<enebo>
olle: I just copy and tweak an existing one
<enebo>
olle: some things are just easier to reuse than learn outright
lanceball is now known as lance|afk
<olle>
enebo: gem install travis-lint # This exists. Perhaps sometimes helping the tweaking.
electrical has joined #jruby
<enebo>
olle: ah yeah
<olle>
enebo: It can complain about things like “That’s not legal and will be quietly dropped"
<enebo>
olle: yeah I wish all config tools had something like that
<enebo>
olle: configs generally have a complete lack of typing
<olle>
enebo: This week, I and two friends made a ‘mob programming’ session over vim in tmux using team-speak voice chat. We added a class around hashly configuration. Protecting names and such. But that’s runtime. No ahead-of-time checks nor explanations to the user.
<enebo>
olle: although I guess it could be generalized into a linter
<olle>
enebo: “Here’s what the built-in grammar thinks of your config file” is a better ploy.
<enebo>
olle: I supose it depends on whether you need to load live resources and such to validate but even then it is possible just more difficult
<olle>
enebo: Ah, true. With some extractions the tool could have a `--config-test`
<enebo>
olle: yeah sounds like a good library
nicksieger has quit [Read error: Connection reset by peer]
nicksieger has joined #jruby
Aethenelle has joined #jruby
bbrowning is now known as bbrowning_away
nicksieger has quit [Read error: Connection reset by peer]
jeremyevans has joined #jruby
nicksieger has joined #jruby
Scorchin has quit [Ping timeout: 258 seconds]
xkickflip has joined #jruby
rsim has joined #jruby
claudiuinberlin has quit []
nicksieg_ has joined #jruby
nicksieger has quit [Read error: Connection reset by peer]
knowtheory has quit [Remote host closed the connection]
flavorjones has quit [Remote host closed the connection]
bruceadams has quit [Read error: Connection reset by peer]
fidothe has quit [Remote host closed the connection]
deathy has quit [Read error: Connection reset by peer]
mccraig_ has quit [Read error: Connection reset by peer]
nicksieg_ has quit [Read error: Connection reset by peer]
guilleiguaran__ has quit [Write error: Connection reset by peer]
aemadrid has quit [Write error: Connection reset by peer]
nicksieger has joined #jruby
deepak_ has joined #jruby
mccraig_ has joined #jruby
fidothe has joined #jruby
Scorchin has joined #jruby
nicksieger has quit [Remote host closed the connection]
shellac has joined #jruby
mccraig_ has quit [Remote host closed the connection]
Scorchin has quit [Remote host closed the connection]
fidothe has quit [Remote host closed the connection]
deepak_ has quit [Remote host closed the connection]
shellac has quit [Client Quit]
deepak_ has joined #jruby
mccraig_ has joined #jruby
fidothe has joined #jruby
Scorchin has joined #jruby
deathy has joined #jruby
aemadrid has joined #jruby
guilleiguaran__ has joined #jruby
knowtheory has joined #jruby
bruceadams has joined #jruby
flavorjones has joined #jruby
lawltoad has joined #jruby
tcrawley is now known as tcrawley-away
akp has quit [Remote host closed the connection]
<lawltoad>
Hi all. I take hear JRuby is one of the biggest users of jffi, anyone familiar with it? Im getting segfaults from what I suspect is jffi when I jmap the process
<headius>
seems plausible...and we also are the maintainers of jffi and the rest of jnr
<lawltoad>
headius, Ah, interesting. I'm not "from a project" but I'd been taking a peek at jython recently. Specifically, I was validating if starting an interperater under a different classloader A and then getting rid of it correctly let all classes get unloaded.
thedarkone2 has joined #jruby
<lawltoad>
Has the JRuby team done any experiments with this? The goal is to use a dynamic language as a 'shell' into a running system, but also to allow it to clean itself up out of the heap when not needed.
<headius>
lawltoad: in a limited fashion, yes...JRuby is typically run from command line with a single JRuby instance, but all the code and classes we generated at runtime are loaded into child classloaders that clean up
<headius>
and of course JRuby or Jython deployed in a web container will generally clean up runtime classes since each application will have its own classloader
shellac has quit [Quit: Computer has gone to sleep.]
<lawltoad>
Have you validated that in the web container, or just suspect this is true? I got segfaults when trying to use jmap -histo:live to validate the class unload
jensnock_ has quit [Remote host closed the connection]
Aethenelle_ has joined #jruby
Aethenelle has quit [Ping timeout: 260 seconds]
Aethenelle_ is now known as Aethenelle
<headius>
lawltoad: well we have done stress tests of spinning up a new classloader with JRuby repeatedly, and things do clean up
<headius>
I have not seen segfaults in jmap but I'd like to see the dump
<headius>
if you suspect it's in jffi go ahead and file an issue there