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
ryanstout has quit [Quit: ryanstout]
Kilobyte|StupidC is now known as Kilo`Byte
<meh`> there we go
<meh`> ylluminate, if you install the lissio gem, you can now create and start lissio apps
<meh`> ylluminate, lissio new <path> creates a new barebon app
<meh`> to run it just `lissio start` inside the project dir
meh` has quit [Ping timeout: 260 seconds]
fkchang has quit [Ping timeout: 260 seconds]
<ylluminate> great meh` thanks!
ryanstout has joined #opal
ylluminate has quit [Quit: Bye!]
ryanstout has quit [Quit: ryanstout]
DrShoggoth has quit [Read error: Connection reset by peer]
DrShoggoth has joined #opal
DrShoggoth has quit [Max SendQ exceeded]
DrShoggoth has joined #opal
e_dub has quit [Quit: It's a hard knock life]
marcandre has joined #opal
marcandre has quit [Remote host closed the connection]
schappim has joined #opal
e_dub has joined #opal
schappim has quit [Quit: Leaving...]
schappim has joined #opal
schappim has quit [Client Quit]
meh` has joined #opal
GitHub112 has joined #opal
<GitHub112> opal/master 104338b meh: Don't flatten in Promise.when
<GitHub112> [opal] meh pushed 1 new commit to master: http://git.io/q7oQKQ
GitHub112 has left #opal [#opal]
travis-ci has joined #opal
<travis-ci> [travis-ci] opal/opal#1645 (master - 104338b : meh): The build has errored.
<travis-ci> [travis-ci] Build details : http://travis-ci.org/opal/opal/builds/16070741
travis-ci has left #opal [#opal]
ryanstout has joined #opal
<ryanstout> are there any docs on getting source map's working in a rack app?
<ryanstout> (running from master)
<ryanstout> meh`: opal-sprockets got merged into opal right?
<meh`> ryanstout, yse
<ryanstout> thanks, I'll check it out
<adambeynon> ryanstout: does the browser complain it cant find them?
<ryanstout> would that be in the console?
<ryanstout> didn't seen any errors, it just didn't show up
<ryanstout> except for __opal_source_maps__/corelib/helpers weirdly enough
<adambeynon> in the chrome dev tools, it usually lists all the js sources AND the ruby ones
<adambeynon> oh, just that 1 file?
<ryanstout> yea
<adambeynon> thats odd. perhaps clearing the page cache?
<adambeynon> not experienced that before though
<ryanstout> I'm copying code out of https://github.com/opal/opal/blob/master/lib/opal/sprockets/server.rb into my own config.ru, so I'm probably doing something wrong
<ryanstout> so maybe its a path issue, because it will load the .map files if I request them, but its just not showing up in chrome
<ryanstout> so it looks like its only trying to request the map for helpers.js.map
<ryanstout> but my other opal files have this stuff in them: //@ sourceMappingURL=/__opal_source_maps__/templates/page.js.map
<adambeynon> maybe they are loaded lazily ... like only when you trace errors/lines etc
<adambeynon> I only look at them using `debugger` statements
<ryanstout> let me try that
<ryanstout> CMD+SHIFT+R clears the page cache right?
<adambeynon> yes, I think thats it
<ryanstout> humm, no luck
<ryanstout> its strange, seems like everything needed is working
<ryanstout> so looks like /__opal_source_maps__/corelib/helpers.js.map is the first one in the file.
<adambeynon> ohhhh, its loading them all inside one js file?
<adambeynon> that could be the problem
<adambeynon> well, it is the problem
<ryanstout> its one .rb file that requires a bunch of others
<adambeynon> how many .js files are actually served?
<ryanstout> 1
<adambeynon> yeah, it will only load one source map per .js file
<adambeynon> the Opal::Server has a #debug property
<adambeynon> are you using the server directly?
<ryanstout> I'm using it directly from Opal::Environment.new, then I copied the SourceMap class
<ryanstout> I didn't want the default index page, so I couldn't use Opal::Server
<ryanstout> do you think opal will support multiple files on source maps?
<adambeynon> well, there are other ruby tools which can do that
<adambeynon> I cant remeber their name
<adambeynon> remember*
<ryanstout> sorry, maybe we're not talking about the same thing
<ryanstout> I know in source map's, you can see the individual files from concatenated files. Seeing as how the require's are basically concatenating, I would assume it could just show the individual required files.
<adambeynon> I think it would be too tricky for the way sprockets works
<adambeynon> sprockets in Opal::SErver handles each ruby file in its own <script> tag
<adambeynon> so the source maps load properly
<ryanstout> ok
<ryanstout> so maybe I'll make it add each script tag in dev
<ryanstout> adambeynon: thanks for the help
<ryanstout> having them in separate files makes for a ton of requests and a super long page load time. (went from instant to 4+ seconds)
<ryanstout> any idea if its something I could patch sprockets to support?
<ryanstout> actually, it said it took 9sec
<adambeynon> should be quicker on the second load, I think
<ryanstout> still 2.5 seconds
<ryanstout> I know its only in dev, but that still seems like a long time
elia has joined #opal
<ryanstout> ok, so if I use the debug option on Opal::Server, and do requires, it spits out the required file as a separate file, but the file it was required from also has it included as well.
<ryanstout> which probably explains the high page load
<adambeynon> what does your index page look like?
<ryanstout> you mean html wise?
<adambeynon> yep
<ryanstout> its doing a separate JS file for each require
<ryanstout> sorry, never mind, I figured it out
<ryanstout> weirdly its a 4 second load on the 2nd loads now (13 seconds on first load)
<ryanstout> (not trying to complain, just trying to get a sense if there's something I can do to improve it)
<adambeynon> that seems really long. usually on the apps I write, the first load is 4-6 secons, and the second/third/etc loads are less than a second
<ryanstout> let me remove all of my code and see how long it takes just loading opal
<adambeynon> ryanstout: check to make sure the page cache is enabled in chrome
<adambeynon> sprockets should do caching anyway
<adambeynon> but just in case
<ryanstout> adambeynon: page cache in chrome?
<ryanstout> or is there something in sprockets?
<ryanstout> yea, 6.2s for just opal
<ryanstout> (with source maps)
<ryanstout> 1.39 after cache
<ryanstout> I'm on a fast new i7
<ryanstout> MBP
<ryanstout> so I guess for sprockets to support concatenated source maps, it would have to convert the source map from each file and move the line/char numbers up based on where it ended up in the concatenated file?
<adambeynon> yes, but sprockets doesnt have any sourcemap support. Thats why we need the special Opal::Server which does it all manually
<adambeynon> I think sprockets master branch has basic support
<adambeynon> but no releases for it
<adambeynon> (I think)
<ryanstout> yea, I saw that
elia has quit [Quit: Computer has gone to sleep.]
<ryanstout> ok, well maybe I'll have to dig into the sprockets source a bit more
<ryanstout> again, thanks for the help
elia has joined #opal
elia has quit [Quit: Computer has gone to sleep.]
<ryanstout> adambeynon: does any_instance.stub work in opal-rspec?
<adambeynon> ryanstout: haven't tried it. It does use rspec3 though, and they did change a lot of the mocking system for rspec3
<adambeynon> double() etc works fine.
<ryanstout> ok, didn't realize it was on 3
<ryanstout> I have it running both in mri and opal, so I'll upgrade the mri ones and see if it works
<adambeynon> 2 was actually a lot trickier to get working, so I skipped to 3
<ryanstout> good plan
<ryanstout> yea, 2 was a mess
<ryanstout> (under the hood)
<ryanstout> I didn't realize the .should syntax was getting deprecated
elia has joined #opal
schappim has joined #opal
schappim has quit [Quit: Leaving...]