meh` 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 https://botbot.me/freenode/opal/
e_dub has quit [Quit: It's a hard knock life]
e_dub has joined #opal
meh` has quit [Ping timeout: 252 seconds]
ryanstout has quit [Quit: ryanstout]
pebble` has quit [Remote host closed the connection]
[o__o] has quit [*.net *.split]
kofno has quit [*.net *.split]
adambeynon has quit [*.net *.split]
e_dub has quit [*.net *.split]
BlapecOol has quit [*.net *.split]
basicer has quit [*.net *.split]
Zackio has quit [*.net *.split]
antonishen has quit [*.net *.split]
lectrick has quit [*.net *.split]
wasnotrice has quit [*.net *.split]
Liothen has quit [*.net *.split]
ryanstewart has quit [*.net *.split]
lacrosse has quit [*.net *.split]
Kilo`byte has quit [*.net *.split]
e_dub has joined #opal
lectrick has joined #opal
Liothen has joined #opal
ryanstewart has joined #opal
antonishen has joined #opal
wasnotrice has joined #opal
Zackio has joined #opal
kofno has joined #opal
basicer has joined #opal
lacrosse has joined #opal
[o__o] has joined #opal
adambeynon has joined #opal
BlapecOol has joined #opal
Kilo`byte has joined #opal
meh` has joined #opal
elia has joined #opal
GitHub16 has joined #opal
<GitHub16> opal/master 271cae4 Elia Schito: Merge pull request #546 from wstrinz/master...
<GitHub16> [opal] elia pushed 2 new commits to master: http://git.io/OpYuMA
GitHub16 has left #opal [#opal]
<GitHub16> opal/master f6cf82b Will Strinz: Slight README correction
travis-ci has joined #opal
<travis-ci> [travis-ci] opal/opal#1879 (master - 271cae4 : Elia Schito): The build passed.
<travis-ci> [travis-ci] Build details : http://travis-ci.org/opal/opal/builds/27009204
travis-ci has left #opal [#opal]
<adambeynon> elia: completely missed that HN post on Opal
<elia> adambeynon, caught that on twitter
<elia> adambeynon, I'd like to know if MRI does anything in that regard (optimising non-overwritten math ops)…
<elia> adambeynon, otherwise is just bulls… trolling
<adambeynon> elia: I think they do, IIRC there is some rb_add_op() type method which handles it. of course, doing that in opal would involve having a function which would be just as slow as the way we are doing it now
<adambeynon> also, a math op being "264x slower" is a bit meaningless. If you have 100 other method calls in the same event loop, all it means is that with opal you have 101 method calls
<adambeynon> if we are working out some very complex math thing, then fair enough, but my math stuff is pretty small parts of general app stuffs
<elia> adambeynon, yeah, the fact that he says he's not "singling on Opal" means in fact the opposite with the clear aim of praising dart
<elia> the pan on store.prada.com products seems to work fine after all and they're not that ugly ;)
<elia> *seem
<adambeynon> looking good
<adambeynon> btw, is that an older version of opal?
<elia> adambeynon, yeah, I think around 0.3.6 or .36…
<elia> opal (0.3.42)
elia has quit [Quit: Computer has gone to sleep.]
<adambeynon> elia: any reason your sticking with that version? (curiosity)
elia has joined #opal
<elia> adambeynon, the QA+dev costs basically
<adambeynon> elia: I do wonder if it would ever make sense to go back to the old method dispatching (self.foo || $mm('foo')).call(...)
<adambeynon> obviosuly when sourcemaps work better etc
<adambeynon> there was something really nice about not having to use Native()
<elia> uh, yeah,
<elia> you saw my attempt at D3?
<elia> most of all that would give us back mm on native objecs and classes (array etc
<elia> adambeynon, but it's really ugly
<adambeynon> elia: yeah, far too ugly. I can't remember the performance problems either
<elia> adambeynon, the other option could be to add MM stubs to Object…
<elia> me neither
<adambeynon> some opt-in system could work
<adambeynon> Opal.add_stubs_to `$.fn`
<elia> adambeynon, yeah
<elia> yeah some list of stubs subscribers maybe
<elia> and one could just decide to put object
<elia> there
<adambeynon> Object.keys(Opal.BasicObject._proto)
<adambeynon> Array[512]
<adambeynon> That is lower than I thought
<adambeynon> that is the biggest opal app I use
<adambeynon> 512 methods/stubs
<adambeynon> not a huge amount
<elia> gotta go for lunch, if you write I'll read later on [o__o]
<elia> cy
elia has quit [Quit: Computer has gone to sleep.]
elia has joined #opal
meh` has quit [Ping timeout: 245 seconds]
meh` has joined #opal
<meh`> nice
<elia> meh`, yeah, you saw the thread on HN?
<meh`> nope
<meh`> link
<meh`> still opal bashing?
<elia> yep
<meh`> heh, it never gets old
<elia> was researching to see if it was the same on MRI
<elia> yeah, this time it's an excuse to praise dart
<adambeynon> Well, the HN thread said 240x faster, which is a slight improvement on those results ^_-
<elia> adambeynon, ha! yeah
<meh`> link link, I wanna read
<elia> anyways I wonder what's making it so slow…
<elia> I tried calling functions on node instead of using bare operations
<meh`> elia, bare functions or methods?
<meh`> there's a huge difference
<elia> meh`, funcs
<meh`> brb
<adambeynon> bundle exec ./bin/opal -e 's = Time.now.to_f; a = 0; 30000000.times { a = a + 1 }; e = Time.now.to_f; puts e - s'
<adambeynon> 3.200000047683716
<adambeynon> ^^ that is if we compile '+' as a normal js operator
<elia> there we go, 13sec on node with method call
<adambeynon> elia: if I compile with "optimized ops" (so it generates a ternary statement), then it comes at 3.4 seconds
<adambeynon> (typeof(a) === "number" ? a + b : a['$+'](b))
<elia> ha! that could be good response
meh` has quit [Ping timeout: 240 seconds]
<elia> adambeynon, not sure how it's handled in MRI, but maybe we can try keeping track of method definition and have a flag that stays true unless is overwritten
<elia> adambeynon, but probably not worth it
<adambeynon> elia: Im not against reintroducing the optimized code (ugly, but faster). If it was a compiler option it could then just be enabled by those that want it
<adambeynon> or in production builds, for example
<elia> yeah, I don't think ppl usually redefines Numeric#+
<elia> *redefine
<adambeynon> elia: (on my laptop) opal master: 3.2300000190734863
<adambeynon> ruby: 2.370970058441162
<elia> thubsup
<elia> :(
<elia> *thumbsup
<elia> :)
<adambeynon> :D
<elia> adambeynon, you gonna reply on HN?
<adambeynon> elia: going through looking at other possible optimizations first ;) It looks like we are also calling a lot of functions for each block call/yield
<adambeynon> so trying to remeber why we needed such a complex routine :)
<adambeynon> I think it was to support blocks in define_method
<elia> heheh
<adambeynon> in which case I would rather make blocks faster by default, and make define_method do any reworking of params to suit
<elia> +1
<adambeynon> 1.5988201976002722
<adambeynon> oh yeahhhhhhh
<elia>
<elia> lol
meh` has joined #opal
<meh`> that wasn't quick at all
<meh`> elia, does dart have open classes?
<elia> no idea
<elia> looked at it once, and immediately shut my eyes and closed the browser window…
<meh`> you can't
<meh`> what the fuck is he talking about then
<meh`> "duh they don't optimize 1 + 1"
<meh`> "1 + 1" can mean whatever in Ruby
<meh`> bah
<elia> yeah, they don't even have a "try it online" page…
<meh`> they do, but it's broken
<meh`> even more broken than ours
<elia> lol, I think I'll reply that dart is a toy :trollface:
<meh`> I'd just reply that they should understand a bit more about Ruby before talking
<meh`> they designed Dart around what JS engines can make run fast
<meh`> so unbelievable it can *gasp* run fast
<meh`> adambeynon, I think we're going the wrong way with so many options
<meh`> adambeynon, we should have a debug and production mode
<meh`> production does all possible optimizations without breaking semantics
<meh`> debug does everything it can to maintain even stricter semantics (arity checking and whatnot)
<meh`> and maintain readability
<elia> I agree, no one uses them, at least we need to propose good defaults, and maybe keep them available at a lower (Compiler class?) level
<adambeynon> yeap. The only option I ever used was to turn method_missing off when we had the ugly method missing code
<adambeynon> since then I keep everything as-is
<elia> me too
<meh`> yep
<meh`> we just need a debug and a production mode
<meh`> and have compiler level options
<meh`> and everyone's happy
<elia> side note, the HN script takes 6.5476e-05 seconds in C, just saying…
<meh`> it takes 0 seconds on paper
<elia> whoa!
<elia> now looking how swift is swift…
elia has quit [Quit: Computer has gone to sleep.]
[o__o] has quit [Read error: Connection reset by peer]
[o__o] has joined #opal
GitHub2 has joined #opal
<GitHub2> [opal] adambeynon pushed 1 new commit to master: http://git.io/Rvzdgw
GitHub2 has left #opal [#opal]
<GitHub2> opal/master cb6b706 Adam Beynon: Cleanup runtime yield1
travis-ci has joined #opal
<travis-ci> [travis-ci] Build details : http://travis-ci.org/opal/opal/builds/27021462
travis-ci has left #opal [#opal]
<travis-ci> [travis-ci] opal/opal#1880 (master - cb6b706 : Adam Beynon): The build passed.
elia has joined #opal
meh` has quit [Ping timeout: 240 seconds]
<elia> swift takes 18s (from the REPL)
<adambeynon> what?!
<adambeynon> I assumed it would be a lot faster than node..
elia has quit [Quit: Computer has gone to sleep.]
dimaursu16 has joined #opal
dimon_ has joined #opal
dimaursu16 has quit [Ping timeout: 252 seconds]
Zackio has quit [Quit: ZNC - http://znc.in]
Zackio has joined #opal
dimon_ has quit [Ping timeout: 252 seconds]
e_dub has quit [Read error: Connection reset by peer]
e_dub has joined #opal
pebble` has joined #opal