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/
elia has quit [Quit: Computer has gone to sleep.]
ryanstewart has joined #opal
e_dub has joined #opal
barry has quit [Remote host closed the connection]
barry has joined #opal
barry has quit [Ping timeout: 246 seconds]
ryanstout has quit [Quit: ryanstout]
barry has joined #opal
barry has quit [Ping timeout: 246 seconds]
barry has joined #opal
barry has quit [Ping timeout: 246 seconds]
barry has joined #opal
barry has quit [Ping timeout: 246 seconds]
barry has joined #opal
barry has quit [Remote host closed the connection]
barry has joined #opal
meh`_ has quit [Read error: Operation timed out]
barry has quit [Remote host closed the connection]
barry has joined #opal
barry has quit [Ping timeout: 252 seconds]
dragonkh has quit [Quit: Bye!]
barry has joined #opal
dimaursu16 has quit [Ping timeout: 246 seconds]
barry has quit [Remote host closed the connection]
elia has joined #opal
dimaursu16 has joined #opal
kludge` has quit [Ping timeout: 240 seconds]
kludge` has joined #opal
DouweM has joined #opal
barry has joined #opal
barry has quit [Ping timeout: 252 seconds]
barry has joined #opal
barry has quit []
ch007m has joined #opal
elia has quit [Quit: Computer has gone to sleep.]
RoxasShadowRS has joined #opal
elia has joined #opal
e_dub has quit [Quit: It's a hard knock life]
<elia> adambeynon, ping
<elia> anything against picking up <script type="text/ruby"> synchronously? cc: ylluminate
<elia> adambeynon, I'm mean those with the src attribute
DouweM has quit [Quit: Leaving...]
<adambeynon> elia: hi. Yeah that sounds fine to me
<adambeynon> What about requires inside them
<adambeynon> Worth attempting to handle?
<elia> adambeynon, first thing to do about requires is to route them to Kernel#require and give it an empty implementation that ppl can override to their taste
<elia> sync,async,experiments,node,requirejs, then we'll see
<elia> I'd like to work on the real-req branch this sat
<elia> adambeynon, you think you can do that by then?
<elia> btw to answer your original question I think we can skip them for now and make as few assumptions as possible
<elia> otherwise we would need to support a bunch of configurations like assets host, basic authentication, and who knows what else
* ylluminate gives thumbs up on require inside as well, but yes, anything to get a quick inclusion right now is a big win.
<ylluminate> i think too that this would help to facilitate a quicker integration into jsbin, no?
<ylluminate> thanks guys
<adambeynon> elia: what were your thoughts on requiring the "main" file in rails/sprockets apps?
<elia> adambeynon, basically copying sassimporter
<adambeynon> ahh, forgot about that. Will read that source to get an idea
<elia> requires inside ruby won't any longer be managed by sprockets
<elia> but sprockets will still be notified of the dependencies (depend_on)
<elia> adambeynon, take a look at sassimporter
e_dub has joined #opal
ryanstout has joined #opal
<adambeynon> elia: on a sidenote, sprockets has a nice cache class that we could possibly make use of for our sourcemaps
<adambeynon> instead of the current global variable
<elia> +1
<elia> will keep in mind
GitHub77 has joined #opal
GitHub77 has left #opal [#opal]
<GitHub77> [opal] elia pushed 1 new commit to master: http://git.io/g1Wf-g
<GitHub77> opal/master 0c8b4db Elia Schito: Add Kernel#require_remote along with opal-parser...
<elia> adambeynon, check this if it's ok ^^^
travis-ci has joined #opal
<travis-ci> [travis-ci] opal/opal#1764 (master - 0c8b4db : Elia Schito): The build was broken.
<travis-ci> [travis-ci] Build details : http://travis-ci.org/opal/opal/builds/21438847
travis-ci has left #opal [#opal]
<elia> :(
GitHub87 has joined #opal
GitHub87 has left #opal [#opal]
<GitHub87> opal/master 2714aaf Elia Schito: fixup! Add Kernel#require_remote along with opal-parser
<GitHub87> [opal] elia pushed 1 new commit to master: http://git.io/cLdCLw
<adambeynon> elia: our x-strings aren't that clever yet ;)
<elia> adambeynon, lol, I though I was better at copypasting…
<elia> adambeynon, partially related to https://github.com/opal/opal-rails/issues/23
<elia> are we already checking for double loading of opal?
<travis-ci> [travis-ci] Build details : http://travis-ci.org/opal/opal/builds/21440331
<travis-ci> [travis-ci] opal/opal#1765 (master - 2714aaf : Elia Schito): The build was fixed.
travis-ci has left #opal [#opal]
travis-ci has joined #opal
<elia> phew!
travis-ci has joined #opal
<travis-ci> [travis-ci] Build details : http://travis-ci.org/opal/opal/builds/21440331
travis-ci has left #opal [#opal]
<travis-ci> [travis-ci] opal/opal#1765 (master - 2714aaf : Elia Schito): The build was fixed.
<ryanstout> elia: are you working on redoing require's?
<elia> ryanstout, yes
<elia> any thoughts?
travis-ci has joined #opal
travis-ci has left #opal [#opal]
<travis-ci> [travis-ci] Build details : http://travis-ci.org/opal/opal/builds/21440331
<travis-ci> [travis-ci] opal/opal#1765 (master - 2714aaf : Elia Schito): The build was fixed.
<ryanstout> would it be possible to optionally do an AST transform to make require’s async. You could make it so a require transforms into require ‘path’ do … end with all of the code after the require being inside the do / end
<ryanstout> just throwing that out, probably isn’t simple or possible :-)
<elia> ryanstout, probably easier with top file requires (but I'm just guessing)
<ryanstout> yea
<ryanstout> probably couldn’t work except with those
<ryanstout> though maybe it could
<elia> plans are primarily for static requires tho
<elia> the most important things are two
<elia> 1. get Kernel#require called
<elia> 2. get stuff loaded in the right order/place
<ryanstout> yea
<elia> so the compiler will accumulate code inside some Opal.modules = {}
<elia> Opal.modules['my_file'] = function(Opal){…}
<ryanstout> ah
<elia> and then Kernel#require gets stuff from there at runtime
<ryanstout> thats a good idea
<ryanstout> so the require still happens and can be over-ridden
<elia> right, hooks are a good thing
<elia> then a Kernel#async_require is still possible imo: e.g. `require_async 'foo.rb', 'bar.rb' do … end`
<elia> but also really platform dependent
<ryanstout> yea
elia has quit [Quit: Computer has gone to sleep.]
<adambeynon> ryanstout: I have looked at making opal requires into an async
<adambeynon> make them compile into an AMD style thingy
<ryanstout> adambeynon: yea?
<adambeynon> but yeah, only works top level
<adambeynon> which is still pretty useful
<ryanstout> yea, for me that would be useful
<adambeynon> ryanstout: I think we could actually just handle the top level ones automatically (using some requirejs/amd style syntax) and then just leave the other ones (inside methods, dynamic etc) to revert to Kernel#require
<ryanstout> yea
<adambeynon> would make opalrb.org/try more useful so we could pull in stdlib as well
<ryanstout> in volt I’m just using top level’s
e_dub has quit [Ping timeout: 268 seconds]
e_dub has joined #opal
ch007m has quit [Ping timeout: 246 seconds]
ch007m has joined #opal
meh` has joined #opal
ch007m has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<mieko> adambeynon: I threw together a toy a few days that added a "coverage call" prelude to every method body (ala gprof). After execution, I had a hash in Opal.coverage showing which methods were actually executed during the run. How crazy would it be to feed that back into the compiler as a white list, and selectively omit method definitions?
<mieko> Of course, one would have to be sure to have a test suite that gets absolutely full coverage.
<ryanstout> mieko: I’ve thought about doing the same thing, sounds really cool
<ryanstout> dead code eliminiation
<ryanstout> getting that kind of coverage is really tricky though. it would be nice if you could remove the code and load it on demand if it does end up being needed
<mieko> Yeah, considering the runtime nature of it, I likened it to profile-guided optimization, but with a really sharp edge.
<ryanstout> yea
<mieko> ryanstout: That'd be a method_missing from hell.
<ryanstout> yea, I was thinking of doing it at the class level
<ryanstout> intellegent requires
<ryanstout> mieko: this is you right? http://mike.filespanker.com/
<mieko> Yeah.
<ryanstout> nice
<ryanstout> I’m in a similar boat
<ryanstout> been doing JS forever
<ryanstout> (and ruby for a long time)
<ryanstout> mieko: shamelss self promoting, but have you seen volt: https://github.com/voltrb/volt
<ryanstout> checkout the demo videos
<mieko> Haha, I happened to catch the first one a few hours after you posted it. Looks awesome.
<ryanstout> mieko: ok, wasn’t sure if you were around back then :-)
<ryanstout> its almost ready to start building production apps on it
<ryanstout> mieko: anyway, the post on that page is great, sums up a lot of my thoughts
DrShoggoth has joined #opal
<mieko> ryanstout: Apparently I've drank enough Opal kool-aid this week that I'd rather spend 3 hours hacking Opal than write a single-line workaround in my code.
<meh`> mieko, more self promoting https://github.com/meh/lissio ◔ ◡ ◔
<mieko> meh`: Lissio looks a lot like the mini-MV* we're building to replace our backbone monstrosity (piece by piece). I haven't had a chance to look far into it, but I was curious how much Application/routing all-in it requires.
<mieko> Vs. "Here's some JSON or a URI, here's a DOM element, do your thing"
elia has joined #opal
<meh`> mieko, well, it's split up, if you don't need routing, you don't have to use it
dimaursu16 has quit [Ping timeout: 240 seconds]
<meh`> mieko, the fancy stuff are models, adapters and components
<meh`> mieko, if you have specific questions ask them, I'll answer to them in a bit
dimaursu16 has joined #opal
elia has quit [Quit: Computer has gone to sleep.]
elia has joined #opal
<ryanstout> when using opal, does anyone have it where chrome won’t bring up the JS file from a JS error?
DouweM has joined #opal
<elia> ryanstout, probably sourcemaps related
<ryanstout> elia: sourcemaps are off
<ryanstout> it happens at least 70% of the time for me
<ryanstout> if its not happening for anyone else, it must be something I’m doing
<elia> whoa, I use safari most of the time
<elia> adambeynon uses chrome I think
<elia> should I retweet this from @opalrb? https://twitter.com/kay_alladin/status/446178431882240000
<elia> lol
<ryanstout> anyone seen something like this issue? https://github.com/opal/opal/issues/522
dleedev has joined #opal
dleedev has quit [Client Quit]
dleedev has joined #opal
<ryanstout> adambeynon: you around?
<dleedev> Hi, is there something I can read up about best-practice with opal and phonegap?
dragonkh has joined #opal
GitHub66 has joined #opal
<GitHub66> opal/master 5714f9f Mike Owens: Make String#split(/re/) obey "limit" argument....
GitHub66 has left #opal [#opal]
<GitHub66> opal/master b8fd3d4 meh.: Merge pull request #521 from mieko/split...
<GitHub66> [opal] meh pushed 2 new commits to master: http://git.io/319O2Q
<meh`> ryanstout, what is the exception?
<ryanstout> Uncaught TypeError: Cannot read property 'map' of undefined
<ryanstout> let me find where that gets thrown from
<ryanstout> inside of Hash#==
<ryanstout> where it checks for other.map
<ryanstout> other is undefined
DrShoggoth has quit [Quit: Leaving]
<meh`> mmh
<ryanstout> looks like _id is used in some classes: https://github.com/opal/opal/search?q=_id&ref=cmdform
<meh`> ryanstout, that's not the problem
<ryanstout> ok
<meh`> it's something in Array#delete
travis-ci has joined #opal
<travis-ci> [travis-ci] opal/opal#1768 (master - b8fd3d4 : meh.): The build passed.
<travis-ci> [travis-ci] Build details : http://travis-ci.org/opal/opal/builds/21465871
travis-ci has left #opal [#opal]
travis-ci has joined #opal
<travis-ci> [travis-ci] Build details : http://travis-ci.org/opal/opal/builds/21465871
<travis-ci> [travis-ci] opal/opal#1768 (master - b8fd3d4 : meh.): The build passed.
travis-ci has left #opal [#opal]
<ryanstout> meh`: thanks for looking into the issue. Anything I can do to help?
<meh`> ryanstout, I just have to figure out where the undefined is coming from
<ryanstout> cool, thanks for looking into it
<elia> dleedev, you can try asking to adambeynon when he's around, I know he did that kind of stuff
<dleedev> elia: ok, thanks
<dleedev> adambeynon: once you’re back, could you refer me to some writeup on how to deploy opal apps using phonegap?
<dleedev> or rather, best practices on developing opal apps for phonegap
e_dub has quit [Quit: It's a hard knock life]
<elia> ryanstout, but please don't dare help me ;) learning project
elia has quit [Quit: Computer has gone to sleep.]
ryanstout has quit [Quit: ryanstout]
ryanstout has joined #opal
<ryanstout> elia: looks good, hit me up if I can help :-)