<DouweM>
So the problem is with SomeClass < OtherClass where OtherClass includes SomeModule? Sounds related to https://github.com/opal/opal/issues/370, which has the same situation
<meh`>
DouweM, the problem in that case is only with super
<DouweM>
meh`: I'm thinking both would have to do with what is supposed to be the context in that OtherClass method
<meh`>
DouweM, the alias_native is the proper method, the issue is define_method isn't working properly for some reason
<meh`>
DouweM, OR the check I did was wrong and you're right
<DouweM>
right, and I'm thinking define_method cares about the context where it should define the method, like super cares about the context. and we've shown the context is wrong for super, so maybe for define_method as well?
<DouweM>
but that's just speculation
<DouweM>
I just thought they looked similar with the A < B include C setup
<meh`>
DouweM, no, super does weird things
<DouweM>
ah
<meh`>
it's compiled differently
<DouweM>
I really have no idea how the compiler works
DouweM has quit [Ping timeout: 248 seconds]
kludge` has quit [Ping timeout: 248 seconds]
e_dub has quit [Ping timeout: 248 seconds]
DouweM has joined #opal
<meh`>
adambeynon, can you tell me how to proceed with the specs stuff so you can work on the bugs?
<meh`>
adambeynon, we shouldn't waste your time on specs, there are more important things to do for you
<elia>
meh`: found a cool bug in native :D
<meh`>
elia, what is it?
<elia>
Native::Base#method_missing was trapping both #native? and #raise from Base#initialize
<elia>
that's about that quick fix of the other day
<meh`>
you mean just Native#method_missing, right?
<rubys>
How does DOM::Builder distinguish between names of elements and ruby variable names?
<meh`>
rubys, normal block scoping
<meh`>
if the block has a parameter it is just called and not instance_exec'd
<meh`>
it all depends on how you need to use it
<rubys>
as someone who has used similar things, that gets annoying very fast. Any mistake, and you will build dom nodes instead of getting a reasonable error message.
<meh`>
rubys, that happens most of the time in this kind of language :)
<rubys>
that's why tagz looks for terminating underscores, and wunderbar looks for leading underscores
elia has joined #opal
<meh`>
rubys, if you worry about that, you add an argument
<meh`>
DOM { |_| _.div.home { _.icon[:home] } }
<meh`>
and there you go :)
<rubys>
what would the following do? DOM { |_| _.div.home { _icon[:home] } }
<rubys>
note: I removed a . between _.icon
<meh`>
rubys, it would create an _icon element
<meh`>
no
<meh`>
it wouldn't
<meh`>
it would just call a method _icon in scope
<meh`>
I think
<meh`>
dunno
<rubys>
my guess is that you were right the first time
<rubys>
adding an argument gives you an additional option, but doesn't solve the problem
<meh`>
rubys, if you start tailoring APIs to possible typos you end up nowhere
<meh`>
what if you type _dov instead of _div?
<meh`>
you don't get an error, do you?
<rubys>
it is not just typos. try running such logic in irb
<rubys>
anyway, you asked what I think...
<meh`>
rubys, yeah, I was just discussing it :)
<rubys>
this is something that I have experience with over a long period of time. And I might be a tad opinionated :-)
GitHub125 has joined #opal
<GitHub125>
opal/master d7628b9 Adam Beynon: Move some more language specs over to rubyspec
<GitHub125>
[opal] adambeynon pushed 1 new commit to master: http://git.io/QIZhzQ
GitHub125 has left #opal [#opal]
travis-ci has joined #opal
<travis-ci>
[travis-ci] opal/opal#971 (master - d7628b9 : Adam Beynon): The build passed.
<rubys>
once [Browser::]HTTP.post starts working, I
<rubys>
I'd like to discuss what should happen if the data parameter is a hash
<rubys>
I'd like to see it encoded as a form request
<meh`>
rubys, it's already like that
<meh`>
see line 151 of browser/http/request.rb
DouweM has quit [Ping timeout: 245 seconds]
GitHub24 has joined #opal
<GitHub24>
[opal] adambeynon pushed 1 new commit to master: http://git.io/TP5QrQ
GitHub24 has left #opal [#opal]
<GitHub24>
opal/master d57fc8a Adam Beynon: Few minor fixes
<rubys>
meh`: cool. I was browsing opal-jquery, and I didn't (and still don't) see that logic there
<meh`>
it's probably missing
<meh`>
opal-jquery is mostly a thin wrapper around jquery
<meh`>
while opal-browser is a full blown wrapper of the browser APIs
<rubys>
jquery itself probably does it
<meh`>
yeah
<meh`>
although I think it would do it with a normal object
<meh`>
I don't know what would happen with an Opal Hash
<rubys>
I started with opal-browser, couldn't figure out how to make it work, switched to jquery, and got an error. I still can't get either to work for me.
<rubys>
single page application which has both client and server components; various data is fetch concurrently over the internet and the table is updated as responses arrive
<adambeynon>
rubys: nice :D
<adambeynon>
ENV['REQUEST_URI']
<adambeynon>
how are you passing that to the client?
<rubys>
that's a darn good question!
<rubys>
I can probably remove it, as it probably evaluates to ''
<rubys>
testing...
<rubys>
yup
<rubys>
this also works:
<rubys>
HTTP.post(nil, payload: "field=#{field}") do |response|
<adambeynon>
ahh I see, yeh, nil.toString() => ''. makes sense
<adambeynon>
looking good though
<rubys>
so... why does opal-jquery override the content type?
GitHub15 has joined #opal
<GitHub15>
[opal] adambeynon pushed 1 new commit to master: http://git.io/6DvacA
<GitHub15>
opal/master dbc0252 Adam Beynon: Use rubyspec for stringscanner specs
GitHub15 has left #opal [#opal]
<rubys>
in this case, I'm passing a single argument, but in the general case, having to marshall my own parameters (including worrying about % encoding) is a PITA
<adambeynon>
I think im fed up of dealing with rubyspec for today
<brixen>
adambeynon: anything I can help with?
<adambeynon>
brixen: I meant converting our current specs to use rubyspec instead. until now we were using a mixture of the two, so im just ripping our old ones out to use them directly from rubyspec
<adambeynon>
should have gone with rubyspec from the start :)
<brixen>
ah ok
<meh`>
adambeynon, I told you
<meh`>
but you NOPEd
<meh`>
ages ago
<meh`>
adambeynon, will you focus on the longstanding bugs now? :D
<meh`>
that fucked up module inheritance is biting me in the ass
<meh`>
brixen, do you use YARD?
<brixen>
meh`: not if I can help it
<meh`>
lol
<meh`>
brixen, what do you prefer?
<brixen>
nothing that embeds docs into source code
<meh`>
oh
<adambeynon>
meh`: just tidying up the Enumerator specs, then i am onto real bugs :)
e_dub has quit [Ping timeout: 261 seconds]
<meh`>
adambeynon, great
<adambeynon>
meh`: with lissio, do you have an intermediate controller between a route and the component?
<meh`>
adambeynon, nope
e_dub has joined #opal
adambeynon has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
adambeynon has joined #opal
rubys has quit [Ping timeout: 248 seconds]
elia has quit [Quit: Computer has gone to sleep.]
rubys has joined #opal
elia has joined #opal
rubys has quit [Remote host closed the connection]
<adambeynon>
meh`: not sure really, looking over what Ive done today atm
<adambeynon>
might carry on tomorrow
<adambeynon>
cant cope with these late nights anymore :P
<adambeynon>
the super stuff needs fixing
<adambeynon>
I've found quite a few problems with it
<adambeynon>
I know how to fix it, but it seems like ti would be slow
<adambeynon>
need to try and find a quicker way
<meh`>
I see
<adambeynon>
basically, you would need (for every super call) to have a while loop going up the hierarchy chain searching for the current super method, and then search again looking for its parent
<adambeynon>
sort of a double loop thing
<adambeynon>
which we did have before...
<adambeynon>
and worked
elia has quit [Quit: Computer has gone to sleep.]
<meh`>
adambeynon, eh, working is better than not
<meh`>
I'd do it even as a speed fix
<adambeynon>
yeh. at the end of the day, it is a very crucial feature to get right
<adambeynon>
the time to worry is when we start using super() inside fibonacci calls
<meh`>
lol
<adambeynon>
right, so, we need to take 2 steps with super.
<adambeynon>
1. fix modules to be simple js objects
<adambeynon>
currently, a modules "prototype" inherits from object,