<adambeynon>
basically, catch all errors and rethrow if its not the class you want
<elia>
thanks :)
<adambeynon>
elia: np
<adambeynon>
elia: I've got something really cool to show you later as well. I've got a rails demo app that uses vienna and renders vienna views to serve up initial html
<adambeynon>
gives you the best of html on the server and client side rendering
<elia>
adambeynon, cool
<elia>
opensource?
<adambeynon>
elia: of course! ;)
<elia>
YAY!
<elia>
adambeynon, I than ready to open skype/screen share
<adambeynon>
it also "tags" the html with the view/controller name, so you can still define all the events etc in the Vienna::View class
<elia>
adambeynon, "tags" anything similar to angular?
<adambeynon>
not too familiar with angular. by default, vienna adds a data-vienna-class="user_view" to the body element, so when the page loads we just recreate the Vienna::View instance as it was on the server
<adambeynon>
but we already have the html
<adambeynon>
so we just attach the events
<adambeynon>
ALSO, im working on a way so you get models automatically loaded as well
<elia>
adambeynon, awesome and awesome!
<adambeynon>
elia: I think its going to be huge ;)
<adambeynon>
Im thinking we could add a :vienna renderer
<elia>
adambeynon, mmm, what about plain data attributes
<elia>
?
<elia>
adambeynon, or a metatag (unless you care about streaming)
<adambeynon>
elia: I did think of the data attributes, but it wasnt "just works" enough for me
<elia>
that way you can add an appcontroller helper_method and that's all
<adambeynon>
elia: ohh
<adambeynon>
I see what you mean now
<adambeynon>
yeah.. the other thing is, we dont want all ivars to be copied down, it probably need to be opt-in
<adambeynon>
actually, vienna::View can handle that
<elia>
adambeynon, Kernel#as_opal? :)
<elia>
probably the usual as_json/to_json should be enough
fkchang has joined #opal
<fkchang>
adambeynon: I'd be interested in seeing the rails/vienna app you showed elia, might make a good showcase for my talk
<elia>
fkchang, sadly he didn't show anything to me… :(
<adambeynon>
elia, fkchang : still trying to fight against rails to get it working smoothly :(
<elia>
adambeynon, np :D
<fkchang>
bummer, hopefully soon. Same thing for meh` I want to show some lissio stuff, but I'll want enough time to be able to play with it in advance
<meh`>
fkchang, have hope
<meh`>
I'm fairly confident I'll be able to write up a blog post with an example app a week before rubyconf
<adambeynon>
elia: it needs some small code tidy ups, but this is the idea which is working (but very hardcoded at the moment)
<adambeynon>
elia: yep! some really neat demo would be cool.
<elia>
adambeynon, I think you should release under your github profile
<elia>
we're all eager to collaborate!
<adambeynon>
elia: sure! Its all in a current app, so I will move it out. just looking now to see how much difference rails 3 and rails 4 are
<adambeynon>
dont think its going to be a problem to work with both versions
<meh`>
fkchang, any idea on what the demo app for lissio should do?
<fkchang>
adambeynon: I agree with elia: something public would be good
<fkchang>
meh`: I'm not sure, I have to condense all the goodness of opal into 40 min, and have time for the various star wars multimedia stuff I'm weaving in. I don know the beauty of the DSL from the various snippets you've post will speak to my point that "Opal, like Ruby, is made to make the programmer happy"
<meh`>
fkchang, there's also to take into consideration my approach has nothing to do with Rails
<meh`>
and its ways, my target is to make the frontend completely client side
<fkchang>
The notion that adambeynon brings up of 1 set of ruby code that runs on either side (netzke does this pretty well too), is a compelling point too. I want to highlight code that 1) is beautiful/makes the programmer happy 2) says things much nicer than js or even coffeescript
<meh`>
and have a thin REST backend in whatever
<fkchang>
If you think that my mental note for every "feature" I want to show is, "How awesome is that" -- it sort of opens up a lot of choices, rails, no rails, as long as it's awesome
<fkchang>
I need a way to use the "snow walker falling down" clip that elia posted as some sort of JS fail
<fkchang>
a pattern I expect to be showing is "in JS it's 60 lines of nasty code, in Opal it's 12 lines of beautiful code that follows the principle of least surprise""
<meh`>
show the Tooltip :P
<elia>
fkchang, and also you can reuse all of your OOD (jedi) powers
<elia>
fkchang, btw I have a load of SW backstage pictures if you want
<elia>
fkchang, and also it's probably worth image-googlin for "site:imgur.com ext:gif starwars"
<fkchang>
for the various features, I think I'd like to show some awesome code, give a quick walk through, and then muck w/that code in real time to show them how nice it is. That would require that I'm familiar enough w/said (yet to be written) code that I can do so. I'll definitely have to pick a bunch and prune down to the code w/the most effect
<elia>
(also try with site:tumblr.com)
<fkchang>
elia: images can help, I was planning on a lot of video clips w/sound. For example I'm going to mention the problem w/the Javascript revolution is that the language is javascript, then I'll play the "what a piece of junk!" line that Luke says when he 1st sees the Millenium Falcon, etc.
<fkchang>
So I'll have to dig up a video link of the snow walker falling so I can have the dolby digital crashing sound
<elia>
fkchang, another good one is the "gonna be a lot thinner" quote going from js to ruby :)
<adambeynon>
elia, meh`, fkchang : by then my jsfiddle clone for opal should be ready, might be useful for quick coding/compiling/running routines without touching too many gems
<fkchang>
elia: nice..
<meh`>
adambeynon, kewl
<elia>
going home
<fkchang>
elia: bye
<fkchang>
adambeynon: I was going to add some jsfiddle like things either/or opal-irb or inspector
<fkchang>
adambeynon: on the note of rubyconf stuff, I'd love to show an opal-inspector w/method editing which all require the source/comment stuff I'm hoping to have added to the parser
elia has quit [Ping timeout: 264 seconds]
<adambeynon>
fkchang: yeap. been thinking on that one. Best thing to do, is for me to hack away at a prototype of a simple way to get a json string of all the methods
<adambeynon>
Opal::Parser#json_map
<adambeynon>
or whatever
<adambeynon>
and you think its best to combine all the comments and code together?
<fkchang>
from the scenario of, "let me edit DomainObject#cool_method" in opal-irb, I'd want to see code and comments together, where I simply navigate to the method click on it, and see the code and methods together. Yes. I don't think you could easily interleave comments back into the code, coz you can put them anywhere
<meh`>
I'd store the method information, the documentation metadata (documentation before the def) and the body (raw source)
<fkchang>
ultimately, I guess that's like entry/show points, For inspector I don't need line by line, just "what's the code/comments for xyz method". Down the road, I'd like to build in Smalltalks, "code from the debugger feature", but that's a ways down
<adambeynon>
fkchang: sure. well, I will have a go at it and let you know how im getting on
GitHub126 has joined #opal
GitHub126 has left #opal [#opal]
<GitHub126>
[opal] adambeynon pushed 16 new commits to master: http://git.io/RH1xBQ
<GitHub126>
opal/master ff86e14 Elia Schito: Try to provide an implementation for process_defined with :colon2
<GitHub126>
opal/master 2a06296 Elia Schito: Unexpectedly is "class variable"
<GitHub126>
opal/master 71ea9c0 Elia Schito: Change Opal.dispatch_super to be just a super finder
<fkchang>
adambeynon: thanks. If you've a decent api, but suboptimal interface, I could run with that to implement those parts and just pull more recent versions as you improve it
travis-ci has joined #opal
<travis-ci>
[travis-ci] opal/opal#1105 (master - c559840 : Adam Beynon): The build passed.
<adambeynon>
fkchang: seems the best. It will serve initially just for you, so breaking changes doesnt bother me too much
<fkchang>
cool, lemme know when there's something to try
<fkchang>
dunno if there's a difference in server compile time vs in browser parse time, but of course I want to start an app w/the source prepared, as well as keep any changes I make on the browser
fntzr has joined #opal
fntzr has quit [Read error: Connection reset by peer]
<eventual_>
hey all, I found what appears to be a bug in Opal and I'd like to see if I can fix it. unfortunately when I cloned the repo just now and ran "bundle install" and "rake" per the instructions to run the tests I found that they don't pass. is that being worked on right now? I see that the latest commit was about 20 minutes ago
<eventual_>
meh`: so looks like my test failure is because Opal is turning Time.utc(1970, 1, 1) into a native Date instance which does not keep track of the timezone (UTC in this case)
<eventual_>
so it to_s'trings as Wed Dec 31 1969 16:00:00 GMT-0800 (PST)
<meh`>
eventual_, you just missed elia, he's the one who wrote all that time stuff
<eventual_>
doh =)
<eventual_>
I'm kinda surprised it passes for anyone *not* running their computer in UTC
<meh`>
eventual_, I'm surprised as well
<meh`>
I guess you'll win the honorary title of bugomancer too
<meh`>
same goes for the x[] +=
<eventual_>
yeah. not terribly uncommon
<eventual_>
alright, here come the GH issues
elia has joined #opal
<meh`>
elia, v
<meh`>
23:03:35 eventual_ >! meh`: so looks like my test failure is because Opal is turning Time.utc(1970, 1, 1) into a native Date instance which does not keep track of the timezone (UTC in this case)
<meh`>
23:03:56 eventual_ > so it to_s'trings as Wed Dec 31 1969 16:00:00 GMT-0800 (PST)
<eventual_>
hey elia. I hear you wrote the Time code in Opal