<travis-ci>
[travis-ci] opal/opal#928 (master - dded0d4 : Adam Beynon): The build passed.
fkchang has joined #opal
<fkchang>
adambeynon: elia - my rubyconf talk on opal got accepted. I'll want to get details on opal apps in the wild, and probably an accuracy check on tech details at some point
<elia>
fkchang: great!
<elia>
fkchang: within the limits of NDAs I'll give you everything I can! :D
<fkchang>
I haven't revisited source maps in a while, but I'll want to demo that
<fkchang>
and in the spirit of conference driven development, if we can get some of the parser requests I want for opal-inspector, that'd be cool to show
<fkchang>
elia: I think things like how much code, what kind of traffic serviced, how the code is better than it would've been in pure JS or coffescript would be good and not NDA'd
<elia>
sure
<elia>
fkchang: about sourcemaps the latest problem I had was that they rely on file:// to which access is probably denied by browsers
<adambeynon>
oh my, rubyconf is more expensive than I thought
<fkchang>
Rubyconf is usually pretty cheap as far as conferences go, $350 US for 3 days, though the ritzy South Beach hotel is about $100 more expensive a day than typical
<fkchang>
So anything I can showcase for opal apps in the wild would be great. I suspect you could blur out anything important, I think showing the viability of opal for production apps is really what I want to show
<adambeynon>
sure thing
<adambeynon>
I might head over for rubyconf this year actually
GitHub43 has joined #opal
<GitHub43>
opal-jquery/master 59394a0 Adam Beynon: Add :dist rake task for building and minifying builds
GitHub43 has left #opal [#opal]
<GitHub43>
[opal-jquery] adambeynon pushed 1 new commit to master: http://git.io/LJ3SSQ
<meh`>
and by based I mean it has the same API, I didn't even look at markaby's code
<fkchang>
cool, I should look at it and maybe I'll change opal-inspector to use opal-browser instead of opal-jquery (except I use assorted jquery widgets)
<fkchang>
I think the barrier to entry on opal-browser is docs. If I run yard on it, will it yield something useful?
<meh`>
fkchang, sadly know, and yeah I know
<meh`>
I'm behind on so many projects with docs :(
<meh`>
but I don't have enough time for that sadly
<fkchang>
interesting, it reminds of a JS framework I was looking at recently that I was thinking of porting to opal. I'll have to dig it up, but primarily it made the view OO, so you could reuse, subclass parts instead of just being a template language
<meh`>
fkchang, that's the plan
<meh`>
the templates will be tightly coupled with the view
<meh`>
for instance, instead of html you'll use template
<meh`>
and it does its magic calling local methods to fetch the data
<meh`>
and it will do selective updates instead of recreting everything on update
<meh`>
but alas, I'm blocked by Opal bugs :(
<fkchang>
what opal bugs, I did see elia had some issues w/the lastest build too
<meh`>
fkchang, well, until yesterday it was block destructuring
<meh`>
now it's requires not being ordered properly
<meh`>
and some issues with blankslate
<meh`>
fkchang, I'm using parslet to parse templates
<fkchang>
so what's the safest version to go w/?
<fkchang>
btw, do you have opal apps in production?
<meh`>
fkchang, not yet, they will be in 2 months max
<meh`>
fkchang, templates aren't merged in lissio yet, I'm waiting for them to be done
<meh`>
fkchang, right now I'm doing ugly stuff without templates in the picture
<meh`>
so I update the internal DOM nodes by hand on render
<meh`>
instead of it being automatic
<meh`>
but it will be a fairly straightforward conversion once templates are in
<meh`>
basically remove all the boilerplate, everything works
<fkchang>
meh`: My opal talk for rubyconf got accepted, I wanted to include some stuff on opal apps in production (or soon to) to show that opal is a viable production tool
<rubys>
meh`: 'browser' isn't quite enough. At runtime, I get:
<rubys>
TypeError: size['$respond_to?'] is not a function
<rubys>
if (size['$respond_to?']("to_ary")) {
<fkchang>
meh`: how do you specify id in ur dom builder, I do like the haml like dot class
<meh`>
fkchang, span.class.id!
<rubys>
but from what I can see, it does look promising (and more Ruby-ish than jquery)
<meh`>
rubys, I'm really sorry, I've never used the raw builder :(
<meh`>
fkchang, you know, one sad thing about opal is that all the stuff in production is either internal or the project can't be publicized
<meh`>
rubys, in opal-browser the DOM handling is very close to Nokogiri
<meh`>
so if you're used to it you'll feel at home
<rubys>
wow. I wish I had known about tagz.
<rubys>
meh`: indeed. nokogiri was inspired by markaby
* rubys
misses _why
<fkchang>
meh`: re my talk, I know a lot of stuff is internal, so I'm happy w/lines of code, how much traffic it's processing, how the opal code ended up better than js and/or coffeescript, some screenshots. Mostly want to show ppl that opal can run production apps, even if they can't see the code
<fkchang>
meh`: we can blur out things that might reveal "secret info", just want to show the good opal can bring
<meh`>
fkchang, I'll be able to give you more information in few months, I've made some brave choices for it so I've been working on dependencies for the last 6 months but apparently I've accounted for the slowness of the Italian governmental entities properly
<rubys>
can somebody point me to how I can get a working opal-browser app working? Once I see it in action, I can tear it apart and put it back together.
<fkchang>
meh`: rubyconf is nov 8, anything you can float my way before then would be appreciated
<meh`>
fkchang, then sounds like it will be right in time :)
<meh`>
rubys, the easiest, clone the repo, install the bundle, and then bundle exec rackup
<meh`>
rubys, then go with a browser there, it will run the tests
<meh`>
or as dependency, I still use it with bundler and the Opal::Server stuff
<meh`>
rubys, http://sprunge.us/PJVb that's the config.ru, there's opal-browser in the Gemfile, that's it
<fkchang>
meh`: do u know how to enable line numbers when compiling opal?
<meh`>
fkchang, nope, sorry, as far as building goes I'm stuck at how it was done more than a year ago :(
<fkchang>
I tried adding opal-browser to opal-irb so I could mess w/it, but now it doesn't run and I can't figure out what line it's choking on
<meh`>
fkchang, were you using $document or $window with opal-jquery?
<meh`>
because opal-browser sets them to something opal-browserish
<meh`>
the rest shouldn't collide with anything
<fkchang>
I will check
<fkchang>
oh, I think it's that bug I reported where the jquery extensions don't automatically get included any more
<fkchang>
I need to go back to the opal th it work son
<fkchang>
works on
adambeynon has joined #opal
<fkchang>
adambeynon: hey so at rubyconf they will often setup "share a room" lists to try to drop down costs
<fkchang>
adambeynon: 2 questions, 1) how do I compile w/line numbers 2)do you remember what version of opal-jquery supported the jquery extensions?
<meh`>
adambeynon, rubys need help using opal-browser with Opal::Builder
<meh`>
*needs
<fkchang>
adambeynon: also, if we could get some of the parser extension (storing source and comments) I wanted for opal-inspector, that would be something cool to present at rubyconf
<adambeynon>
fkchang: re opal-jquery, in the next few days I will be fixing/changing Element to become a wrapper for jquery, so we can get jquery extensions working via method_missing
<adambeynon>
its a long time missing
<adambeynon>
fkchang: and line numbers, as in the comments? /*1*/ etc?
<rubys>
adambeynon: what's the opal-browser equivalent of Opal::Builder.build('opal-jquery') ?
<adambeynon>
hi rubys
<adambeynon>
Opal::Builder.build('browser')
<rubys>
(02:52:57 PM) rubys: meh`: 'browser' isn't quite enough. At runtime, I get:
<rubys>
(02:53:15 PM) rubys: if (size['$respond_to?']("to_ary")) {
<rubys>
(02:53:13 PM) rubys: TypeError: size['$respond_to?'] is not a function
<meh`>
adambeynon, keep in mind opal-browser passes all tests by itself
<adambeynon>
rubys: are you manually adding opal.js before that as well? (I dont think browser.rb requires opal corelib)
<rubys>
I was... let me try without it
<rubys>
ReferenceError: Opal is not defined})(Opal);
<adambeynon>
rubys: looks to be because of a bad value being passed into Array.new()
<adambeynon>
meh`: possibly something from native?
<meh`>
rubys, what opal version are you using?
<meh`>
because I might be using stuff from master
<meh`>
opal-browser revealed quite a few bugs and missing functionality on opal as I was writing it
<rubys>
I am using master (I have to: some of my pull requests are needed to make this work)
<adambeynon>
rubys: there is a chance (a very slim one) that there could be a bug with Opal::Builder missing a file somewhere
<adambeynon>
the opal-spec tests are run through opal-sprockets
<adambeynon>
you could try that to see if it works
<adambeynon>
its a very slim chance, though..
<meh`>
my hate for sprockets increases
<rubys>
adambeynon: can I get you to try something for me? All it will involve is cloning a repository, running a script, and bringing a file up in a browser...
<rubys>
run that, redirecting the output to opaldemo.html
<rubys>
open opaldemo.html
<rubys>
Note: this will create a directory named 'assets' into which the Opal::Builder output will be placed.
<fkchang>
adambeynon: re: line numbers, yes, I was trying to figure out where the code was crashing and I didn't know how to turn the line numbers back on
<fkchang>
though it turned out it was the change in opal-jquery
<adambeynon>
rubys: so, the error I am getting is:
<adambeynon>
Uncaught TypeError: Cannot call method '$to_i' of null
<rubys>
so span.content is null; but in any case, you are getting much further than I did.
<adambeynon>
that is with opal @ master, and opal-browser @ master
<rubys>
that's what I was running with. Will recheck.
<meh`>
adambeynon, oh by the way, I hit a weird inherited bug yesterday
<meh`>
it was going full retard and infinite recursion
<rubys>
ok, so I was running off of yesterday's master :-)
<rubys>
ypeError: span['$content='] is not a function
<meh`>
rubys, it's my fault
<meh`>
maybe
<meh`>
gotta check if that happens in Ruby too
<adambeynon>
you are aliasing :content before you define :inner_text
<meh`>
yeah
<meh`>
adambeynon, can we have some checking on alias?
<meh`>
it doesn't raise if the method it's aliasing doesn't exist
<meh`>
adambeynon, yeah, I noticed :)
<adambeynon>
yep, good timing
<meh`>
rubys, fixed
<rubys>
looking good! Updating wunderbar...
<meh`>
rubys, the fun of living on the edge :P
<rubys>
any idea when updated opal and opal-* gems will next be pushed?
<rubys>
meh`: no complaints here, I LIKE living on the edge
<rubys>
and opal is wicked cool
<meh`>
I think we all do here :P
<adambeynon>
rubys: opal itself needs a gem bump pretty soon
elia has quit [Quit: Computer has gone to sleep.]
<rubys>
"pretty soon" is hours, days, weeks... ?
<meh`>
rubys, I don't think I'll be releasing gems of opal-browser until we hit 1.0 on opal, but if you want I can push some --pre gems
<meh`>
or rather go semver and release some 0.x.y
<meh`>
and release 1.0.0 after Opal hits 1.0.0
<meh`>
whatever's best for you
<rubys>
I'd vote for a 0.x of opal-browser. No need to rush on my account, but it would make my life easier if I could install a gem
<meh`>
fine by me, I'll write documentation for what's present as of now and rerelease a 0.x this weekend
DouweM has quit [Ping timeout: 248 seconds]
<meh`>
s/rere/re/
<adambeynon>
rubys: pretty soon for opal will be tomorrow at some point. Friday is my gem release day, and I have an updated app running off git-master, so want to base that off a gem release
<rubys>
sweet
<adambeynon>
rubys: also, opal is so rapidly changing that I would definately recommend bundler to make it easier to work with github repos
<adambeynon>
opal-jquery, opal-browser and opal-spec all use Gemfiles to point to github/opal/opal