e_dub has quit [Ping timeout: 260 seconds]
e_dub has joined #opal
DrShoggoth has joined #opal
vwoo has quit [Quit: Computer has gone to sleep.]
vwoo has joined #opal
vwoo has quit [Quit: Computer has gone to sleep.]
vwoo has joined #opal
<denysonique> In the future opal-node will be just another Ruby implementation ;>
* denysonique is wondering if any code form Rubinius wouldn't be useful for Opal
fkchang has quit [Ping timeout: 264 seconds]
jurbat has joined #opal
<e_dub> denysonique, might be worth looking at some of their stdlib impls to see what makes sense in the browser and could be brought in without lagging opal
DrShoggoth has quit [Quit: Leaving]
fkchang has joined #opal
e_dub has quit [Ping timeout: 256 seconds]
vwoo has quit [Quit: Computer has gone to sleep.]
e_dub has joined #opal
jurbat has quit [Ping timeout: 246 seconds]
meh` has joined #opal
e_dub has quit [Ping timeout: 268 seconds]
elia has joined #opal
e_dub has joined #opal
kludge` has quit [Ping timeout: 264 seconds]
fkchang has quit [Ping timeout: 245 seconds]
kludge` has joined #opal
chap has joined #opal
adambeynon has joined #opal
<adambeynon> meh`: Im going to do a big lexer.rb rewrite, try and squash the bugs
<adambeynon> and base it on mri/parse.y
<adambeynon> which would also make it easier for people familiar with mri to contribute
<meh`> adambeynon, sounds good
<adambeynon> I use most of the logic from parse.y anyway
<adambeynon> the code generator is still the ugly part though
<meh`> adambeynon, I think rescue is still kinda broken
<adambeynon> in terms of catching exceptions?
<meh`> no, in terms of returning stuff
<adambeynon> have you a link to whats breaking?
<meh`> no, but I'll try to come up with a reduced test case soon
<adambeynon> is there an ensure part as well?
<meh`> no
<meh`> only rescue
<adambeynon> ok, well, if you can get a failing test case I will have a look through it
chap has quit [Ping timeout: 246 seconds]
<meh`> adambeynon, I think I have to fix that DOM thing in the core
<meh`> because otherwise Native() is giving you an object that isn't usable in Ruby
<meh`> and I think there are functional objects or something in js
<meh`> so it's not really specific to the DOM
<meh`> but rather to the engine
<adambeynon> `value == null || !value._klass`
<adambeynon> isnt that enough to detect native objects ?
<adambeynon> (from native.rb)
<meh`> adambeynon, the issue is in def []
<meh`> of Native::Object
<meh`> there's a check for the function
<meh`> I could check !value._klass in the typeof check
GitHub187 has joined #opal
<GitHub187> [opal] meh pushed 1 new commit to master: http://git.io/zzOB6Q
GitHub187 has left #opal [#opal]
<GitHub187> opal/master 9fd4117 meh: Check if a function is not a functional object in Native::Object#[]
<meh`> adambeynon, ^
<meh`> that should fix it
<meh`> but I think I also need a #call in Native::Object now
<adambeynon> bare in mind, every function object will have a ._class property
<meh`> is it ._class now?
<meh`> instead of ._klass?
travis-ci has joined #opal
<travis-ci> [travis-ci] opal/opal#784 (master - 9fd4117 : meh): The build passed.
travis-ci has left #opal [#opal]
<travis-ci> [travis-ci] Build details : http://travis-ci.org/opal/opal/builds/9688578
<meh`> adambeynon, where are native specs?
<meh`> do we have any?
<meh`> I think what I did doesn't work :D
<meh`> Uncaught TypeError: Object function AudioProcessingEvent() { [native code] } has no method 'apply'
<adambeynon> no, its still ._klass
<adambeynon> yay! dom fun!
<meh`> oh
<meh`> no, I know why
<meh`> dammit
<meh`> it's a function
<meh`> but it's not a function
<meh`> how do you even
<meh`> it has no .call or .apply
<meh`> I think you can only call it as constructor
<meh`> so they're specific constructors
<meh`> that check is not enough
<meh`> adambeynon, I think a better test is
<meh`> typeof(x) == "function" && x instanceof Function
<meh`> or just instanceof Function
<meh`> instead of using typeof
<meh`> because it's clearly giving back wrong stuff
<meh`> adambeynon, thoughts?
<adambeynon> instanceof Function, if it doesnt have .call or .apply I cant see that being reliable cross browser either
<meh`> adambeynon, where do I put specs for native?
<meh`> spec/opal/native?
<adambeynon> yeah
<adambeynon> one file per method
<adambeynon> spec/opal/native/to_a_spec.rb
<adambeynon> etc
<meh`> roger
<meh`> adambeynon, also I was thinking, do you think it makes sense to have #each_pair in Native::Object?
<meh`> adambeynon, how do I call a spec for #[]? ◕ ◡ ◔
<adambeynon> element_reference_spec.rb
<adambeynon> element_set_spec.rb
<adambeynon> ;)
<adambeynon> thats what rubyspec uses
e_dub has quit [Ping timeout: 245 seconds]
<meh`> adambeynon, how was it to run just a set of specs?
<adambeynon> bundle exec rake spec:opal/native
<meh`> thanks
<meh`> what the
<meh`> oh
<meh`> I added #to_s to the wrong class when I added them to the core classes lol
<meh`> adambeynon,
<meh`> 1. Native::Object#[] should return the same value for bridged classes
<meh`> <No message>
<meh`> what does that mean?
<adambeynon> usually that you havent actually got a .should test in the example
<meh`> mh
<meh`> but I do
<meh`> weird stuff
<adambeynon> gist?
<meh`> nah, I think the problem is somewhere else
<meh`> trying to figure it out
<meh`> something's very wrong
e_dub has joined #opal
<meh`> triple snap
<meh`> adambeynon, is there a way to see if something is a native bridged value?
<adambeynon> well, it has a ._klass property, but apart from that, not really
<adambeynon> oh
<adambeynon> well
<adambeynon> if (!value.constructor._klass)
<adambeynon> no
<adambeynon> wait
<adambeynon> that wont work
<adambeynon> errrrr
<meh`> lol
<adambeynon> there isnt really
<adambeynon> bridged just sets which prototype to use
<meh`> can you add a ._bridged or something please?
<adambeynon> whats it needed for?
<meh`> I think I need it in Native
<meh`> but, brb
<adambeynon> ^_- native should treat bridged and real classes the same, shouldnt it? and not wrap them?
<meh`> yeah, it should
adambeynon has quit [Quit: Textual IRC Client: www.textualapp.com]
adambeynon has joined #opal
e_dub has quit [Remote host closed the connection]
GitHub44 has joined #opal
<GitHub44> opal/master 57a8d32 Adam Beynon: Initial commit for return as an expression (#320)...
GitHub44 has left #opal [#opal]
<GitHub44> [opal] adambeynon pushed 1 new commit to master: http://git.io/ILjYHQ
adambeynon has quit [Quit: Textual IRC Client: www.textualapp.com]
travis-ci has joined #opal
travis-ci has left #opal [#opal]
<travis-ci> [travis-ci] opal/opal#785 (master - 57a8d32 : Adam Beynon): The build passed.
<travis-ci> [travis-ci] Build details : http://travis-ci.org/opal/opal/builds/9691297
chap has joined #opal
chap has quit [Client Quit]
adambeynon has joined #opal
GitHub114 has joined #opal
<GitHub114> opal/master 7c05062 Adam Beynon: Implement support for returning from a block inside method (#303)
GitHub114 has left #opal [#opal]
<GitHub114> [opal] adambeynon pushed 1 new commit to master: http://git.io/AvgBJQ
<adambeynon> \o/
<meh`> awesome
<meh`> adambeynon, I forgot if you answered about the #each_pair in Native::Object
<adambeynon> imo, natives should have as few methods as possible as we want a lot of it to get sent via method_missing
<adambeynon> even Kernel gets in the way
<meh`> I agree on that
<adambeynon> e.g. $global.location.hash
<meh`> but each_pair doesn't seem like a common name in objects
<meh`> yes, hash is not in it :)
<meh`> but how do you enumerate the keys in an object?
<meh`> you can do that in js
<adambeynon> class Native::Object < BasicObject
<adambeynon> ahhh
<adambeynon> I didnt realise we were inheriting from BascObject
<adambeynon> what about #each ?
<adambeynon> similar to Hash#each
<meh`> adambeynon, fine by me
<adambeynon> I dont mind aliasing each_pair as well, so thats up to you ;)
<meh`> I'll get bored with killing virtual monsters and I'll finish up the native specs
<adambeynon> I now see the differences between Native and Native::Object
<adambeynon> lol, woop
<meh`> adambeynon, do you think you're going to add async before/after?
elia has quit [Read error: Connection reset by peer]
_elia has joined #opal
<adambeynon> meh`: yeah, havent thought about how yet
<adambeynon> should be straightforward
<meh`> adambeynon, awesome
<adambeynon> I will try and have a look for you
<adambeynon> currently fixing up a bug that snuck in somewhere in Array#==
<adambeynon> not by me though ;)
<adambeynon> [:foo] == [:bar] # => true
<adambeynon> not very ideal..
<adambeynon> basically, Array#== failed for anything that wasnt an array inside another array
<meh`> I don't think it was mine either ( ≖‿≖)
<adambeynon> nope
<adambeynon> I was wondering why specs that should be failing, wernt
<adambeynon> also, we can now return from a block !
<meh`> awesome
<adambeynon> meh`: after the lexer/parser rewrite, im going to take it out of opal core and gemify it, as I have uses for it in other projects
<adambeynon> should make our lib/ a lot smaller
<adambeynon> and easier to get though
<adambeynon> as its basically then just codegen
<meh`> adambeynon, umh
<meh`> isn't it better to use that parser gem kungfag linked?
<adambeynon> parser ?
<adambeynon> whitequarks one?
<meh`> yes
GitHub13 has joined #opal
<GitHub13> [opal] adambeynon pushed 1 new commit to master: http://git.io/_7WxtQ
GitHub13 has left #opal [#opal]
<GitHub13> opal/master 03b6ab5 Adam Beynon: Fix Array#== not properly comparing children...
travis-ci has joined #opal
travis-ci has left #opal [#opal]
<travis-ci> [travis-ci] Build details : http://travis-ci.org/opal/opal/builds/9696045
<travis-ci> [travis-ci] opal/opal#787 (master - 03b6ab5 : Adam Beynon): The build passed.
<meh`> adambeynon, what's the standard for ? methods?
adambeynon has quit [Ping timeout: 240 seconds]
adambeynon has joined #opal
ryanstout has joined #opal
jurbat has joined #opal
jurbat has quit [Client Quit]
GitHub139 has joined #opal
GitHub139 has left #opal [#opal]
<GitHub139> opal/master 6b7866c Adam Beynon: Rewrite some lexer logic to match parse.y
<GitHub139> [opal] adambeynon pushed 1 new commit to master: http://git.io/B1vahg
travis-ci has joined #opal
<travis-ci> [travis-ci] opal/opal#788 (master - 6b7866c : Adam Beynon): The build passed.
<travis-ci> [travis-ci] Build details : http://travis-ci.org/opal/opal/builds/9699780
travis-ci has left #opal [#opal]
zmike1234 has joined #opal
_elia has quit [Ping timeout: 245 seconds]
elia has joined #opal
elia has quit [Ping timeout: 256 seconds]
chap has joined #opal
elia has joined #opal
chap has quit [Ping timeout: 256 seconds]
GitHub68 has joined #opal
GitHub68 has left #opal [#opal]
<GitHub68> opal/master 1e0955f Adam Beynon: Refactor ===, ==, =~ and = parsing in lexer.rb
<GitHub68> [opal] adambeynon pushed 1 new commit to master: http://git.io/G2l30g
elia has quit [Ping timeout: 256 seconds]
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
travis-ci has joined #opal
<travis-ci> [travis-ci] opal/opal#789 (master - 1e0955f : Adam Beynon): The build passed.
<travis-ci> [travis-ci] Build details : http://travis-ci.org/opal/opal/builds/9704116
travis-ci has left #opal [#opal]
zmike1234 has quit [Quit: ~]
elia has joined #opal
elia has quit [Quit: Computer has gone to sleep.]
elia has joined #opal
elia has quit [Client Quit]
fkchang has joined #opal
vwoo has joined #opal
elia has joined #opal
_elia has joined #opal
elia has quit [Ping timeout: 240 seconds]
_elia has quit [Quit: Computer has gone to sleep.]
vwoo has quit [Quit: Computer has gone to sleep.]
e_dub has joined #opal
vwoo has joined #opal
chap has joined #opal