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