<chrisseaton>
bjfish2: in this case I think @tuple is just self (or it needs to be if it isn't), so that might work
nateberkopec has joined #jruby
<chrisseaton>
bjfish2: see visitInstVarNode in BodyTranslator to see where @tuple will come from
<bjfish2>
chrisseaton it’s currently implemented as self, but if I want to call methods defined in tuple.rb i need ‘@tuple’ to return self.to_tuple
<chrisseaton>
bjfish2: the methods in Tuple are all very low level - I'm not sure it's worth trying to bring it all in - could we just shim the methods it has directly in Array?
<chrisseaton>
You don't need to do tuple.at(a), you can simply do at(a), as tuple is self
<chrisseaton>
Can you put a big comment that these methods came from tuple.rb?
<bjfish2>
yep, got it, i don’t think the method needs to be singleton either if @tuple is just self
iamjarvo has joined #jruby
iamjarvo has quit [Max SendQ exceeded]
viking has joined #jruby
viking has joined #jruby
iamjarvo has joined #jruby
iamjarvo has quit [Max SendQ exceeded]
iamjarvo has joined #jruby
elia has joined #jruby
mitchellhenke has joined #jruby
iamjarvo has quit [Client Quit]
subbu has joined #jruby
iamjarvo has joined #jruby
dinfuehr has joined #jruby
dinfuehr has quit [Remote host closed the connection]
dinfuehr has joined #jruby
iamjarvo_ has joined #jruby
iamjarvo has quit [Ping timeout: 255 seconds]
iamjarvo has joined #jruby
iamjarvo has quit [Max SendQ exceeded]
iamjarvo has joined #jruby
iamjarvo_ has quit [Ping timeout: 252 seconds]
dinfuehr has quit [Remote host closed the connection]
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] bjfish opened pull request #2676: [Truffle] Adding Array#shuffle to array.rb. (master...truffle_array_shuffle) http://git.io/pBNV
JRubyGithub has left #jruby [#jruby]
e_dub has joined #jruby
aramisbear has quit [Ping timeout: 246 seconds]
jbarop has joined #jruby
<jbarop>
Hi there.
<nirvdrum>
Hello.
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<nirvdrum>
bjfish2: Let me know if you need an explanation of my comments on your latest PR.
<jbarop>
I'm looking for information how I can execute RubyGems from Java using jRuby. Executing Ruby scripts work but I'm missing how I can set the GEMS search path.
<bjfish2>
nirvdrum i talked with chrisseaton about this earlier in this channel , i’ll paste the conversation into the PR
<nirvdrum>
jbarop: I'm not familiar with that. Although I'm pretty sure there's a maven-gem proxy set up somewhere so you can pull in gems as maven dependencies.
<nirvdrum>
bjfish2: Okay. Thanks.
dinfuehr has joined #jruby
iamjarvo has joined #jruby
havenwood has joined #jruby
dinfuehr has quit [Remote host closed the connection]
calavera has joined #jruby
vtunka has joined #jruby
camlow325 has joined #jruby
<nirvdrum>
bjfish2: I added a couple more comments, but probably best to wait for chrisseaton. He's doing some traveling today, so his availability is limited.
vtunka has quit [Quit: Leaving]
<bjfish2>
chrisseaton okay, i’ll wait for his input
<bjfish2>
nirvdrum he’s commented now
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tcrawley-away is now known as tcrawley
vtunka has joined #jruby
cremes has quit [Read error: Connection reset by peer]
vtunka has quit [Remote host closed the connection]
cremes has joined #jruby
<nirvdrum>
bjfish2: Did you follow his suggestion?
<bjfish2>
chrisseaton I just saw his latest comment I’ll go with that
<bjfish2>
nirvdrum keep doing mentions wrong
<nirvdrum>
Basically, re-open Array in that shims file to add the swap method. Then you can change the definition of shuffle! to use @tuple again.
<nirvdrum>
You should be able to use the Rubinius source as-is that way.
joast has quit [Ping timeout: 250 seconds]
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] lucasallan pushed 1 new commit to master: http://git.io/pRlz
<JRubyGithub>
jruby/master 245279f Lucas Allan Amorim: [Truffle] - Adds Random class
JRubyGithub has left #jruby [#jruby]
<jbarop>
nirvdrum: Thanks. Setting ENV["GEM_HOME"] and ENV["GEM_PATH"] did the trick
<nirvdrum>
jbarop: Great. Glad to hear you got it working.
colinsurprenant has joined #jruby
zorak8 has joined #jruby
subbu has quit [Ping timeout: 240 seconds]
colinsurprenant has quit [Quit: colinsurprenant]
colinsurprenant has joined #jruby
<cprice404>
hi, is there a changelog for jffi somewhere?
iamjarvo has joined #jruby
<cprice404>
i noticed that there was a 1.2.8 and wasn't sure whether it would be a good idea to bump our dependencies up to that version.
colinsurprenant has quit [Ping timeout: 240 seconds]
<cprice404>
trying to determine what version you guys are using in tests for e.g. jruby 1.7.19
e_dub has quit [Quit: e_dub]
aramisbear has joined #jruby
colinsurprenant has joined #jruby
e_dub has joined #jruby
zorak8 has quit [Read error: Connection reset by peer]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zorak8 has joined #jruby
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] enebo pushed 2 new commits to master: http://git.io/pR6N
<JRubyGithub>
jruby/master eb31ee4 Thomas E. Enebo: Last missing instrs to be encoded
<JRubyGithub>
jruby/master 4da20e1 Thomas E. Enebo: All instrs know how to encode vs decoupled encoder map
JRubyGithub has left #jruby [#jruby]
dinfuehr_ has joined #jruby
dinfuehr_ has quit [Read error: Connection reset by peer]
dinfuehr has joined #jruby
erikhatcher has joined #jruby
colinsurprenant has quit [Quit: colinsurprenant]
<nirvdrum>
cprice404: Aethenelle is probably your guy, when he comes around.
<lopex>
nirvdrum: I dont see scan code range in that method on jruby
<lopex>
git pl
<lopex>
er
<lopex>
nirvdrum: mri also uses switch (ENC_CODERANGE(str))
rsim has quit [Ping timeout: 265 seconds]
<lopex>
which is just getCodeRange
<nirvdrum>
Okay.
<nirvdrum>
It seems like this could be made faster.
<nirvdrum>
Unless scanning the code range dominates figuring out the length.
<lopex>
nirvdrum: I'm confused now, I said it does use getCodeRange()
<lopex>
where does it use the scan ?
<nirvdrum>
It doesn't. I'm asking if it should.
<nirvdrum>
Or why it doesn't.
<lopex>
aaah
<nirvdrum>
Basically, strings with CR_UNKNOWN but that would have CR_7BIT if scanned, fall through to the default switch case.
<lopex>
you mean it doesnt cache the code range as a result
<lopex>
yeah
<lopex>
now I got it :)
nateberkopec has joined #jruby
<nirvdrum>
Scanning should be okay here. Unless the cost of the scan exceeds the cost of the length calculation in the default case.
camlow3__ has joined #jruby
<lopex>
yeah, thinking of a reason it cant be...
aramisbear has joined #jruby
<lopex>
nirvdrum: also, in this case the range should be known since it could come from the literal right ?
<nirvdrum>
Yeah, but I don't think that happens anywhere currently. Strings seem to default to CR_UNKNOWN and wait for a scanForCodeRange() call to set the CR flag.
camlow325 has quit [Ping timeout: 256 seconds]
<lopex>
yeah, I guess it could use the scan since it's lazy, but in most cases the range would come tainted from other strings
camlow3__ has quit [Remote host closed the connection]
_djbkd has quit [Remote host closed the connection]
<nirvdrum>
In that case scanForCodeRange has a very quick exit though.
<lopex>
nirvdrum: is that in truffle ?, afaik jruby always had prescanned literals
<nirvdrum>
It's basically an int comparison.
<lopex>
yeah
<nirvdrum>
lopex: The snippet I pasted is running non-Truffle.
<lopex>
if unknown then scan
<lopex>
enebo: ^^
<lopex>
at least in old ast
<nirvdrum>
Interesting.
<nirvdrum>
I'm looking to implement this in Truffle, so I came across this case and was curious.
<nirvdrum>
My suspicion is it's done lazy to reduce load times.
<lopex>
nirvdrum: do you also use shared RubyString bytelists in truffle ?
<nirvdrum>
Yes and no. It's a mess.
<nirvdrum>
I've been leaning towards not sharing lately, but code in there definitely shares.
_djbkd has joined #jruby
<lopex>
since literals fire new strings every time, I guess the f"foo" doesnt
<lopex>
this frozen thingy
<nirvdrum>
That's gone, isn't it?
<enebo>
lopex: I am not sure when/why of CR calculation with literals
<nirvdrum>
I thought it was killed in favor of optimizing .freeze.
<lopex>
I forget
<lopex>
ah
<enebo>
lopex: fwiw, it seems like we could bake in CR calc into lexing while we walk the string…at least for 7bit
<lopex>
yeah
<lopex>
I guess that was my point
<lopex>
since it's scanned anyways
<enebo>
lopex: ah. It is a good idea…we clearly need to scan it to make it :)
<lopex>
I'm almost sure mri does that
<enebo>
DARK MATTER
<nirvdrum>
Would this be lighter than the current scan?
<nirvdrum>
There's a lot going on there.
<enebo>
lopex: nirvdrum: Can one of you fix this or make an issue on it
<lopex>
enebo: I guess it's quite good thing since lost of methods taint with cr
erikhatcher has joined #jruby
mistergibson has quit [Ping timeout: 246 seconds]
<enebo>
nirvdrum: well if we know it is 7bit out of the gate we have no scan needed
erikhatcher has quit [Client Quit]
<enebo>
nirvdrum: so we will not walk it a second time
<lopex>
and it's all known at parse
<enebo>
valid, unknown, 7bit, and broken all known by the end of making it
<nirvdrum>
How can you tell if it's valid vs 7bit without scanning the String?
camlow325 has joined #jruby
<enebo>
nirvdrum: we are scanning the string to make it
<nirvdrum>
StringSupport.codeRangeScan seems to inspect all the bytes.
<enebo>
nirvdrum: just not with that method
<nirvdrum>
Got it.
<lopex>
enebo: is that NODE_STR in mri ?
<nirvdrum>
This could be a nice little improvement then.
<enebo>
nirvdrum: I would not expect much for ordinary parsing since most literals are pretty small but if you are loading lots of templates then it becomes more pronounced
<enebo>
nirvdrum: but who knows
mistergibson has joined #jruby
<enebo>
I think allocating bytelists is so much bigger than figuring out what is in it that it may not show up as a large thing
<nirvdrum>
enebo: I think the biggest difference is you'd potentially lead more strings down the faster path.
<nirvdrum>
StringSupport is loaded with fast/slow calls.
<enebo>
nirvdrum: lopex: My other .1,.2 activity is to port MRI lexer (which ripper is from) to reduce all the stringbuilder and abstraction overhead in the lexer
<nirvdrum>
And CR_UNKNOWN leads down the slow path, unless an explicit scan is made.
camlow325 has quit [Remote host closed the connection]
<enebo>
nirvdrum: yeah I could see something warmup differently I guess
<enebo>
nirvdrum: we do save CR once we calc it once though
<enebo>
nirvdrum: So other than slow path not happening as much it is really just a second char walk
<nirvdrum>
Yeah. I just came across one case where getCodeRange is used rather than scanCodeRange, so it's not scanned yet. Maybe this is the only one.
<enebo>
nirvdrum: not that I am saying this is a bad idea…it is great to get rid of crap like this :)
<nirvdrum>
But you end up going down a slower path as a result.
<lopex>
enebo: rb_enc_str_new is used to construct the nodes in mri which in turn does rb_enc_str_coderange
<enebo>
lopex: but it does it on finished char*?
<lopex>
enebo: there's few combinations
<enebo>
lopex: e.g. they do not do it while they lex the char*
<lopex>
not usre yet
<enebo>
lopex: ok
<lopex>
enebo: which case in parse.y is that ?
<lopex>
enebo: all those seems to be used to create nodes of various kinds like dstr xstr etc
<JRubyGithub>
[jruby] enebo opened issue #2678: Mark literals CR during lexing to avoid CR scan later http://git.io/pETK
JRubyGithub has left #jruby [#jruby]
e_dub has joined #jruby
<enebo>
nirvdrum: I don’t know…you can see the params they provide but all-in-all what does STR_NEW3 mean to you and wouldn’t explicitly passing in those params be simpler to read? :)
<enebo>
STR_NEW_AT_ZERO
<enebo>
whatnot…but hey some of these names sort feels like the C way to me
<nirvdrum>
Okay. I didn't know if there were like different versions of Ruby or something.
<enebo>
I have sometimes wondered if some C coding conventions fall out of lack of traditionally good IDEs
mistergibson has quit [Ping timeout: 255 seconds]
dinfuehr_ has quit [Remote host closed the connection]
<enebo>
nirvdrum: ok I just looked at them…one is empty string..one is strlen a \0 provided char* and one is use a char* and only use n bytes
dinfuehr has joined #jruby
<enebo>
nirvdrum: so just different convenient cases I guess
dumdedum has quit [Ping timeout: 244 seconds]
mistergibson has joined #jruby
<enebo>
I would call them STR_EMPTY, STR_CHAR_STRING, STR_NBYTES
dinfuehr has quit [Ping timeout: 245 seconds]
<nirvdrum>
Ahh.
<nirvdrum>
I should probably get a local checkout.
<lopex>
enebo: tradition killer
<enebo>
lopex: any good beers lately?
<nirvdrum>
enebo: Okay. It looks like the code range is in the lexer and Truffle just wasn't doing anything with it in the translator. But IR also seems to not be doing anything with the CR from the lexer.
<enebo>
nirvdrum: yeah I am aware we drop it in IR
<lopex>
24,7°
<enebo>
nirvdrum: It is a bug
<enebo>
nirvdrum: I tried correcting it quickly the other week and we had a few errors
<nirvdrum>
enebo: Okay. Well I don't think anything needs to happen in the lexer then. I guess both backends just had a similar bug and I was looking in the wrong spot as a result.
<enebo>
nirvdrum: I will fix it for pre2 though since I think it is causing other problems
<enebo>
nirvdrum: yeah it may be but it is a good optimization I think
<enebo>
nirvdrum: I don’t think it will be big but it is simple and has no cost
<enebo>
nirvdrum: well only the cost of checking the var we are already setting when making string when we are done walking it
<enebo>
non_ascii
<nirvdrum>
Yeah. In the Truffle case it means we can choose the correct specialization on the first pass, without needing to do a full scan.
subbu has joined #jruby
<nirvdrum>
But I'm glad I asked because I didn't know that was already in the AST.
camlow325 has joined #jruby
camlow325 has quit [Remote host closed the connection]
subbu is now known as subbu|lunhc
camlow325 has joined #jruby
colinsurprenant has joined #jruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<cprice404>
Aethenelle: I was told you might know about changes between jffi 1.2.7 and 1.2.8, and which one jruby 1.7.19 is tested against?
nateberkope has joined #jruby
nateberkopec has quit [Ping timeout: 252 seconds]
<Aethenelle>
cprice404: mostly just a few constant changes/additions and better ld script support
<Aethenelle>
i'm not sure which 1.7.19 was tested against... pretty sure it was 1.2.7
<cprice404>
Aethenelle: great, thanks, so we should probably stick with 1.2.7 it sounds like
<Aethenelle>
cprice404: yes, at least until I revisit the reverted commit
<cprice404>
great, thanks for the info
<Aethenelle>
there's also an issue with the whole thing assuming dyld which doesn't work for windows.
<Aethenelle>
but that's in all versions
<cprice404>
k
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] bjfish opened pull request #2679: [Truffle] Adding Array#rassoc to array.rb (master...truffle_array_raassoc) http://git.io/pE4N
JRubyGithub has left #jruby [#jruby]
<cprice404>
we're not running on windows for now, so, that sounds ok
calavera has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
skade has joined #jruby
enebo has quit [Quit: enebo]
_djbkd has quit [Remote host closed the connection]
aramisbear has quit [Ping timeout: 245 seconds]
yfeldblum has joined #jruby
iamjarvo has joined #jruby
cprice404 has quit [Quit: Konversation terminated!]
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] nirvdrum pushed 2 new commits to master: http://git.io/pEVX
<JRubyGithub>
jruby/master f8d706f Kevin Menard: [Truffle] Set the code range properly on String#initialize.
<JRubyGithub>
jruby/master dcee5f0 Kevin Menard: [Truffle] Use the detected code range from the lexer when translating the AST.
JRubyGithub has left #jruby [#jruby]
cprice404 has joined #jruby
zorak8 has quit [Ping timeout: 240 seconds]
bjfish2 has quit [Quit: bjfish2]
subbu|lunhc is now known as subbu
_djbkd has joined #jruby
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] nirvdrum pushed 1 new commit to master: http://git.io/pE6F
<JRubyGithub>
jruby/master 8299588 Kevin Menard: [Truffle] String#each_char is now multibyte-encoding aware.
_djbkd has quit [Remote host closed the connection]
<PragTob>
Hi everyone, I'm happy to tell you that jrubyconf.eu will happen again this year - 31st of July around Berlin (Germany) ! http://2015.jrubyconf.eu/ :) CFP will hopen again
<PragTob>
it's a great event, Charlie and Tom will be there as will lots of other great people :)
<PragTob>
it's also executed together with eurucamp (31st of July - 2nd of August) http://2015.eurucamp.org/
iamjarvo has joined #jruby
lance|afk is now known as lanceball
PragTob has quit [Remote host closed the connection]
e_dub has quit [Quit: e_dub]
x1337807x has joined #jruby
x1337807x has quit [Max SendQ exceeded]
x1337807x has joined #jruby
e_dub has joined #jruby
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] nirvdrum pushed 1 new commit to master: http://git.io/pu3E
<JRubyGithub>
jruby/master 68be707 Kevin Menard: [Truffle] Pulled in String#index from Rubinius.
JRubyGithub has left #jruby [#jruby]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
iamjarvo has joined #jruby
_djbkd has joined #jruby
colinsurprenant has joined #jruby
enebo has joined #jruby
_djbkd has quit [Remote host closed the connection]
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] enebo pushed 2 new commits to master: http://git.io/pucv
<JRubyGithub>
jruby/master 9a42332 Thomas E. Enebo: humble beginnings of getting ir persist reads working
<JRubyGithub>
jruby/master dc71ebe Thomas E. Enebo: ir.compiler.debug will not log irbuild interp lists. Remove nested closures for logging to de-noise output.
JRubyGithub has left #jruby [#jruby]
elux has joined #jruby
bjfish2 has joined #jruby
elia has joined #jruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lanceball is now known as lance|afk
colinsurprenant has quit [Quit: colinsurprenant]
rsim1 has quit [Quit: Leaving.]
mattwildig has joined #jruby
drbobbeaty has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]