adambeynon changed the topic of #opal to: http://opalrb.org - Ruby runtime and library on top of Javascript | 1.0.0 is near | This channel is logged at http://irclog.whitequark.org/opal
<cogitator> Phew, finally. @meh' : About what I try to accomplish: I try to reduce the CPU load, therefore the need for a Ruby "sleep" function.
<meh`> cogitator, my advice is to use opal-browser and proc { }.defer
<meh`> you have to require 'browser/immediate'
<meh`> it executes the proc when it can, leaving time to the page to do its thing
<meh`> but you still have to separate the task in multiple proc { }.defer calls
<fkchang> meh`: what's the js equivalent of proc {}.defer ? I think it would make a good slide
<meh`> fkchang, many things :)
<meh`> I'll link you
<cogitator> Okay, thanks, I'll keep a note of this and I will try it next time.
cogitator has quit [Quit: Page closed]
meh` has quit [Ping timeout: 264 seconds]
fkchang has quit [Ping timeout: 268 seconds]
DouweM has quit [Ping timeout: 264 seconds]
fkchang has joined #opal
elia has joined #opal
kludge` has quit [Ping timeout: 246 seconds]
<elia> hey fkchang :) you got my mail?
<fkchang> I did, thx
kludge` has joined #opal
kludge` has quit [Ping timeout: 268 seconds]
kludge` has joined #opal
kludge` has quit [Changing host]
kludge` has joined #opal
adambeynon has joined #opal
GitHub14 has joined #opal
GitHub14 has left #opal [#opal]
<GitHub14> [opal-rspec] adambeynon pushed 1 new commit to master: http://git.io/PlelJg
<GitHub14> opal-rspec/master babc0d7 Adam Beynon: Add some clarification to running specs using rspec
DouweM has joined #opal
elia has quit [Quit: Computer has gone to sleep.]
DouweM has quit [Ping timeout: 265 seconds]
DouweM has joined #opal
elia has joined #opal
meh` has joined #opal
[spoiler] has joined #opal
fkchang has quit [Ping timeout: 246 seconds]
<adambeynon> elia, meh` : do you use any particular mocking framework when testing?
<elia> adambeynon, I usually stay with rspec
<adambeynon> yeh, me too. having a tough time getting it to work under opal
<adambeynon> rspec-mocks uses ObjectSpace which isnt going to work on opal
<adambeynon> might have to provide a custom mocking framework
<adambeynon> which is far from ideal
<meh`> adambeynon, nope
<meh`> adambeynon, what does it use of ObjectSpace?
<adambeynon> meh`: from what I can see, it uses it a lot for checking if objects are real or BasicObject delegates
<adambeynon> ObjectSpace._id2ref() and friends
<meh`> we could try to implement it
<meh`> some of it at least
<adambeynon> we would have to keep a table of all object ids => actual objects
<adambeynon> every ruby object would never be released
<adambeynon> we could stub the method that uses that check and always force non-delegate objects, but that would break when testing delegates
<meh`> adambeynon, can you point me to this code?
<meh`> the one that uses it, that is
<adambeynon> yeah, finding it now
<adambeynon> infact, looking at the code they resort back to assuming non-delegates for ruby <= 1.9.1
<meh`> then we can get around it
elia has quit [Quit: Computer has gone to sleep.]
elia has joined #opal
<adambeynon> meh`: yeah, stubbing that method out means we can get some basic mocks working
<adambeynon> haha, to get mocks working we have to stub out methods
<adambeynon> irony or something there
Guest26798 is now known as denysonique
<elia> adambeynon, ok if Hash.new(`{a: null}`) #=> {a: nil} ?
<meh`> elia, isn't that already the case?
<elia> nope
<meh`> weird
<meh`> I thought it would
<elia> pushing
<meh`> yeah, it should call Native.try_convert
GitHub25 has joined #opal
<GitHub25> opal/master ee0caf1 Elia Schito: Hash.new should convert null/undefined values to nil when a native object is passed
GitHub25 has left #opal [#opal]
<GitHub25> [opal] elia pushed 1 new commit to master: http://git.io/KFDaMA
<elia> oh, I did it manually…
<meh`> no actually
<meh`> it should be Native(value)
<meh`> we should either wrap or or none at all
<elia> meh`, not sure about that…
<elia> I'm sure a hash shouldn't have any null/undef as values
<meh`> it's either all or nothing
<meh`> if you have null/undefined you're going to handle it yourself
<alexch> Hi! So apparently rubyspec has decided to go 2.0+ only... Is Opal planning to move to 2.0 at some point?
<elia> meh`, partially convinced, only thing I don't like very much are all those additional function calls
<meh`> passing an object is not the usual way to create an Hash
<meh`> if you're passing a native, you're expecting natives
<meh`> otherwise just create an hash normally
travis-ci has joined #opal
<travis-ci> [travis-ci] opal/opal#1369 (master - ee0caf1 : Elia Schito): The build passed.
travis-ci has left #opal [#opal]
<travis-ci> [travis-ci] Build details : http://travis-ci.org/opal/opal/builds/13644116
<meh`> alexch, when we get 1.9 to work :)
<meh`> alexch, and some things of 2.0 we can't support
elia has quit [Ping timeout: 244 seconds]
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
elia has joined #opal
DrShoggoth has joined #opal
elia has quit [Quit: Computer has gone to sleep.]
DrShoggoth has quit [Remote host closed the connection]
DrShoggoth has joined #opal
alexch has quit [Ping timeout: 250 seconds]
[spoiler] has quit [Quit: Leaving]
DrShoggoth has quit [Remote host closed the connection]
DrShoggoth has joined #opal
elia has joined #opal
ryanstout has joined #opal
DrShoggoth has quit [Remote host closed the connection]
elia has quit [Quit: Computer has gone to sleep.]
elia has joined #opal