<chrisseaton>
Looks like enebo isn't even connected!
tcrawley-away is now known as tcrawley
rsim has joined #jruby
rsim has quit [Read error: Connection reset by peer]
<nirvdrum>
They're 7 hours behind you. They usually start popping online around now.
<chrisseaton>
I wonder why enebo's bouncer isn't connected though. Maybe he doesn't realise.
enebo has joined #jruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #jruby
pawnbox has quit [Ping timeout: 246 seconds]
pawnbox has joined #jruby
<nirvdrum>
chrisseaton: He's here now.
<chrisseaton>
enebo: hello!
prasun has joined #jruby
<enebo>
chrisseaton: howdy
byteit101 has joined #jruby
<chrisseaton>
enebo: I think you said a while ago that you were now optimising set_trace_func, using SwitchPoint, but that doesn't seem to be the case. Did you turn it off again?
<enebo>
chrisseaton: oh did I say that? Maybe I was saying it could be implemented that way
<enebo>
Let me look at what the JIT does
<chrisseaton>
I looked - the JIT doesn't handle the instruction.
<chrisseaton>
And the instructions aren't there unless you have --debug, which disables the JIT, so it all looks correct if that's what you want.
<enebo>
chrisseaton: ah yeah so the reason we did not implement it was we just haven’t added it to the JIT yet. We never supported events in 1.7 in the JIT at all either so it is not a regression just not implemented yet
<enebo>
chrisseaton: so we need to do it but we have not yet…for lack of more detailed explanation :)
<enebo>
chrisseaton: but the actual implementation can end up as a switchpoint which is a reasonable way to go I think
<enebo>
chrisseaton: sorry if I ended up implying we have implemented it in the JIT
<enebo>
had
<chrisseaton>
enebo: the other question I've got is I think you said a while ago that Matz had explicitly said he was fine with JRuby using the word 'Ruby'? Is that the case?
<enebo>
chrisseaton: hmm I believe that is true but I do not explicitly remember saying that. We have said JRuby is just Ruby implemented on the JVM in front of him many times and we have had no trademark issues or complaints
<byteit101>
Was upgrading a 1.7 app to 9k and noticed that MyJavaClass.java_class.annotation(Java::com.pkg.MyAnnotation.java_class) now doesn't work as annotation only takes 0 and not 1 argument. What is the new way to do this? (finding only the single MyAnnotation Annotations on a java class)
<enebo>
kares: do you have any insight to byteit101 question? I think you are most likely to have changed that code
<enebo>
chrisseaton: from a trademark perspective I doubt Ruby has any real footing anymore if it was ever trade marked but he has never said anything negative about our project using the term Ruby
<chrisseaton>
I remember some issues about that.
<chrisseaton>
enebo: it was 'Rails' that was being enforced wasn't it?
<enebo>
chrisseaton: although we always have said MRI is the standard of what defined Ruby
<enebo>
chrisseaton: yeah DHH (BaseCamp inc) holds trademark to Rails and went after grails when they called themselves ‘Groovy on Rails’
<enebo>
chrisseaton: after that they changed to Grails
<enebo>
chrisseaton: so I think the trademark is ‘Ruby on Rails’ and maybe not Rails since you could argue Grails could still be confusing
<enebo>
and both are dictionary words
<enebo>
OTOH Microsoft got US to approve Windows
<chrisseaton>
The dictionary word thing doesn't matter
<chrisseaton>
You can't trademark 'apple' if you sell apples, but you can if you sell computers
rsim1 has joined #jruby
rsim has quit [Read error: Connection reset by peer]
cremes has quit [Quit: cremes]
prasun has quit [Ping timeout: 255 seconds]
prasun has joined #jruby
cremes has joined #jruby
rsim has joined #jruby
kares has quit [Remote host closed the connection]
vtunka has quit [Quit: Leaving]
rsim1 has quit [Ping timeout: 260 seconds]
alex0ptr_ has quit [Read error: Connection reset by peer]
alex0ptr has joined #jruby
pawnbox has quit [Ping timeout: 248 seconds]
pawnbox has joined #jruby
<GitHub44>
[jruby] enebo closed issue #3888: rake fails to activate properly under bundle exec https://git.io/vrmpY
<enebo>
chrisseaton: ah yeah I think I always had this wrong in my mind. I did not connect the second half that you cannot trademark bread for the bread you sell but bread in bread treadmills could be since a treadmill is not bread
prasun has quit [Ping timeout: 255 seconds]
kares has joined #jruby
ruurd has quit [Remote host closed the connection]
alex0ptr has quit [Remote host closed the connection]
alex0ptr has joined #jruby
alex0ptr has quit [Ping timeout: 248 seconds]
TheWhip has quit [Remote host closed the connection]
ruurd has joined #jruby
ruurd is now known as Guest88653
kith has quit [Quit: kith]
rsim1 has joined #jruby
shellac has quit [Quit: Leaving]
rsim has quit [Ping timeout: 260 seconds]
swills_ has quit [Read error: Connection reset by peer]
swills has joined #jruby
thedarkone2 has joined #jruby
mpapis has quit [Quit: Connection closed for inactivity]
marciol has quit [Remote host closed the connection]
pilne has joined #jruby
bbrowning is now known as bbrowning_away
marciol has joined #jruby
alex0ptr has joined #jruby
marciol has quit [Ping timeout: 246 seconds]
alex0ptr has quit [Ping timeout: 248 seconds]
bbrowning_away is now known as bbrowning
alex0ptr has joined #jruby
alex0ptr has quit [Ping timeout: 255 seconds]
TheWhip has joined #jruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #jruby
subbu is now known as subbu|lunch
pawnbox has quit [Ping timeout: 245 seconds]
marciol has joined #jruby
subbu|lunch is now known as subbu
alex0ptr has joined #jruby
TheWhip has quit []
alex0ptr_ has joined #jruby
alex0pt__ has joined #jruby
alex0ptr_ has quit [Read error: Connection reset by peer]
alex0ptr has quit [Ping timeout: 240 seconds]
subbu is now known as subbu|away
<alex0pt__>
Is there someone around that could explain the concept of the NodeChildren/NodeChild annotations in RubyTruffle? I'm not sure what they are supposed to do.
marciol has quit [Remote host closed the connection]
alex0pt__ is now known as alex0ptr
marciol has joined #jruby
<nirvdrum>
alex0ptr: They're used by a code generator to construct the AST.
<nirvdrum>
alex0ptr: Is there something in particular that you're looking at?
<alex0ptr>
Yes
<alex0ptr>
One second...
marciol has quit [Ping timeout: 245 seconds]
<alex0ptr>
Ok BooleanCastNode.java
<alex0ptr>
What is the point of @NodeChild(value = "value", type = RubyNode.class) the annotation there?
<alex0ptr>
I assume it will have a child node of any type. And the Specialized methods receive this child?
headius2 has joined #jruby
bbrowning has quit [Quit: Leaving]
<nirvdrum>
Sorry, was AFK.
<nirvdrum>
Looking at it now.
subbu|away is now known as subbu
<nirvdrum>
alex0ptr: Yes, that's essentially correct. The node child type will be a RubyNode (as noted in the annotation) and that node will be evaluated and its return value supplied as an argument to one of the specialized methods.
<alex0ptr>
nirvdrum: I wanted to get started by writing something simple. Just a Hello World.. However the build fails with the error message stated in the description.
<nirvdrum>
So CoreMethodArrayArgumentsNode has some special handling that hides the @NodeChildren setup from you.
<alex0ptr>
nirvdrum: OH!
<alex0ptr>
nirvdrum: I see
<nirvdrum>
But the core issue here is you have required set to 1, but don't have optional=1.
<nirvdrum>
So, there's an argument count mismatch.
<nirvdrum>
Note that you shouldn't need to pass the context as an argument at all. CoreMethodArrayArgumentsNode extends from RubyBaseNode at some level and you can just call getContext().
<alex0ptr>
Good to know.
<alex0ptr>
So why optional=1?
<nirvdrum>
Well, if you remove the RubyContext parameter, you won't need optional=1.
<alex0ptr>
Ok but what does it mean? There is no Javadoc for optional.
<nirvdrum>
Yeah, we should fill that in.
<nirvdrum>
But basically it's for Ruby methods that allow for optional arguments.
<alex0ptr>
And the value is the index or count?
<nirvdrum>
Count.
<alex0ptr>
Ok
<alex0ptr>
I removed RubyContext but it still fails with the same error...
<nirvdrum>
Basically, you have a specialization with two arguments, but via the @CoreMethod annotation you've only said there's 1 argument and it's a required one.
<alex0ptr>
Yeah makes sense.
<nirvdrum>
The other reason your count is often is the receiver is the first argument and doesn't count towards the parameter count.
<nirvdrum>
If you want it to be a class method, you need to set needsSelf=false in @CoreMethod.
<nirvdrum>
Oh, nevermind. constructor=true should take care of that.
<alex0ptr>
aaaah okay. Are Initializers class methos in ruby? (New to Ruby too)
<alex0ptr>
Ok then it should work but doesn't?
<nirvdrum>
Allocation is done on the class, initialization is done on the instance.
<nirvdrum>
Take a look at ExceptionNodes. That should be a simple example.
drbobbeaty has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<nirvdrum>
And it shows what an optional argument would look like.
<alex0ptr>
Ok I'll try to mimic that.
<nirvdrum>
And apologies for not really looking at the message. You're seeing that because CoreMethodNode requires you to specify that @NodeChildren.
<nirvdrum>
If you just make GreetNode extend CoreMethodArrayArgumentsNode instead, you should be okay.
<alex0ptr>
Uhm... But I don't need any arguments here except the receiver?
<nirvdrum>
We might have gotten a bit too clever for our own good. But at the core of it, you're building an AST.
<nirvdrum>
So, the receiver still needs to be a child node.
<nirvdrum>
CoreMethodArrayArgumentsNode just hides that for you.
<nirvdrum>
If you look at CoreMethodArrayArgumentsNode, it just extends CoreMethodNode with a single child that happens to be an array of RubyNode. And the first argument of that array will be the receiver (if needed).
<nirvdrum>
The various options for @CoreMethod basically dictate how that RubyNode[] is treated.
<alex0ptr>
Okay.
<nirvdrum>
So, CoreMethodNode gives you more control over the AST structure while still giving you the helper methods from being a RubyBaseNode or RubyNode.
<nirvdrum>
Normally, you don't use CoreMethodNode unless you want to explicitly wrap one of the children.
<nirvdrum>
We do this to coerce arguments, for instance. So then the specialization gets the results of the coercion.
<alex0ptr>
Ok I think I understand. Thank you so far. I will be back with a lot more questions soon.
<nirvdrum>
No problem.
<nirvdrum>
If you look at StringNodes$AddNode, you can see an example of that wrapping.
<nirvdrum>
We always want the argument being added to be coerced to a string.
<alex0ptr>
I'll have a look at it
<nirvdrum>
Rather than handle the coercion in each specialization, we wrap the child with a new node to be evaluated.
<nirvdrum>
What's the interest in Ruby + Truffle, if you don't mind my asking?
<alex0ptr>
Hopefully a successful Master's Thesis...
<nirvdrum>
Ahh.
<nirvdrum>
If you haven't yet, you should talk to chrisseaton.
<alex0ptr>
I'm nagging him a lot already about basic stuff..