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/
dleedev has quit [Quit: WeeChat 0.4.2]
RoxasShadowRS has quit [Read error: Connection reset by peer]
e_dub has joined #opal
ryanstout has quit [Ping timeout: 260 seconds]
ryanstout has joined #opal
Noldorin has quit []
meh` has quit [Ping timeout: 265 seconds]
e_dub has quit [Quit: ZZZzzz…]
e_dub has joined #opal
GitHub23 has joined #opal
<GitHub23> [opal-browser] dlee opened pull request #17: Swap arguments to replaceChild (master...fix_replace) http://git.io/xqMUQA
GitHub23 has left #opal [#opal]
ryanstout has quit [Quit: ryanstout]
dleedev has joined #opal
<dleedev> hi, is there a way for opal's sprocket server to server an html.erb besides index.html.erb?
fkchang has quit [Ping timeout: 248 seconds]
<adambeynon> dleedev: I think so
<adambeynon> server.index_path = 'index.erb'
<dleedev> sorry, I should have been clearer
<dleedev> I want to serve multiple *.html.erb files
<adambeynon> oh right, I see
<adambeynon> well, Opal::Server is just a collection of pre-configured rack middleware things
<adambeynon> Im not sure how to hook up something like that to rack
<adambeynon> Tilt is a dependency of Opal, so maybe they have some rack middleware to listen on a path?
<adambeynon> dleedev: the opal server stuff can also be used with Sinatra which I think handles .erb/.haml templates automoatically
<adambeynon> that is a basic sinatra app using the opal server
<dleedev> ok, thanks, I'll look into that
<dleedev> btw, how far is opal from 1.0.0?
<adambeynon> dleedev: not very. there aren't any big changes to do
<adambeynon> just a case of finding time to fix the smaller issues :)
<dleedev> is there a list of TODOs somewhere?
<adambeynon> not really
<adambeynon> well
<adambeynon> that is a list of rubyspecs I want to pass, but we need to fix
<adambeynon> the are all things that should be supported
<adambeynon> mostly edge cases for methods
<dleedev> what's the criteria for what gets included or not?
<adambeynon> If we can keep it fast. It varies to be honest
<adambeynon> we could have a float and integer class
<adambeynon> but not having them map to javascript numbers is just too awkward
<adambeynon> we support #+ as a real method, which is really slow, but its worth it for Array#+ if nothing else
<adambeynon> and vector type classes
<adambeynon> My main priority is speed (and size?) though. All my opal apps run on iOS (ipad/iphone), so I cant afford opal to be slow
elia has joined #opal
<dleedev> adambeynon: do you do native apps or browser apps for iOS?
<adambeynon> dleedev: It used to be all browser apps
<adambeynon> but now I wrap them using phonegap/cordova
<dleedev> how's that been?
<adambeynon> fantastic. The 2 new apps I am working on atm are basically Point of Sale apps, and cordova makes it really nice to work with stuff on the Objective-C side
<adambeynon> (I use rubymotion, but same idea)
<adambeynon> also I find that wrapping an app makes it more stable. Safari crashes all the time for me
<adambeynon> once a day or so
<adambeynon> I have never had a wrapped app crash yet (famous last words)
RoxasShadowRS has joined #opal
<dleedev> I'm assuming the JS layer is for the UI?
e_dub has quit [Quit: ZZZzzz…]
e_dub has joined #opal
<dleedev> when do you need to us ruby motion?
<adambeynon> dleedev: rubymotion is only used for communicating with attached hardware (receipt printer, cash drawer etc)
<adambeynon> the rest of the app (UI, models, ajax, etc) are all written using ruby
<adambeynon> the rubymotion code is less than 200lines?
<adambeynon> it basically connects to the printer and creates a new UIWebView which loads the opal app
<adambeynon> even those couple of hundred lines in rubymotion is nicer than writing them using Obj-C
e_dub has quit [Quit: It's a hard knock life]
<dleedev> is it simple to communicate from opal layer to rubymotion layer?
<adambeynon> yeap: http://cordova.apache.org/docs/en/3.3.0/guide_hybrid_plugins_index.md.html#Plugin%20Development%20Guide_the_javascript_interface
<adambeynon> I usually serialize some json object and send it through that interface
<adambeynon> then a rubymotion class reconstructs it
<adambeynon> in my example, I send a json version of some purchase/items, then the rubymotion just forwards it to the printer controller
<adambeynon> I try and keep as much as possible written under opal. rubymotion is just a middleman between opal and hardware things (or custom iOS APIs, I guess)
<adambeynon> dleedev: If I didnt need the hardware stuff, I would probably revert back to a simple homescreen webapp though
<adambeynon> makes updating a lot easier
kludge` has quit [Ping timeout: 245 seconds]
kludge` has joined #opal
dleedev has quit [Quit: dleedev]
GitHub74 has joined #opal
<GitHub74> vienna/master 2027858 Elia Schito: Add Model#destroyed?
<GitHub74> vienna/master e76712f Elia Schito: Remove the record from the record array after it has been destroyed
<GitHub74> [vienna] elia pushed 2 new commits to master: http://git.io/1O78jg
GitHub74 has left #opal [#opal]
GitHub135 has joined #opal
GitHub135 has left #opal [#opal]
<GitHub135> vienna/master 593335c Elia Schito: Update persistence spec
<GitHub135> [vienna] elia pushed 1 new commit to master: http://git.io/KsV2Lw
<elia> adambeynon, fixed some #destroy related stuff in vienna
travis-ci has joined #opal
<travis-ci> [travis-ci] Build details : http://travis-ci.org/opal/vienna/builds/18643854
<travis-ci> [travis-ci] opal/vienna#137 (master - 2027858 : Elia Schito): The build passed.
travis-ci has left #opal [#opal]
travis-ci has joined #opal
<travis-ci> [travis-ci] Build details : http://travis-ci.org/opal/vienna/builds/18643866
<travis-ci> [travis-ci] opal/vienna#138 (master - 593335c : Elia Schito): The build passed.
travis-ci has left #opal [#opal]
<adambeynon> elia: nice one!
<adambeynon> not removing an item from the array on #destroy -- oops :D
<elia> :)
<adambeynon> elia: I was thinking about vienna - I have a lot of extensions like bindings/observers/etc, do you think they should be going into vienna as optional requires?
<adambeynon> or best to keep them in separate repo?
<elia> adambeynon, not sure
<elia> not using opal very much lately :sadface:
<adambeynon> bad times :( I think I will keep them external for now
<adambeynon> can decide when we finally release a 0.1.0
<elia> and actually discovering vienna now that I'm trying to fix todomvc tests
<elia> adambeynon, an option is also to have them in vienna but not required by default
<elia> adambeynon, on a side note after reading about your phonegap/cordova apps I'm longing to try that approach…
<elia> the same goes for volt
<elia> adambeynon, down to three: https://gist.github.com/elia/a1c16041f904258a97a4
<elia> lunchtime, cylater
elia has quit [Ping timeout: 260 seconds]
elia has joined #opal
meh` has joined #opal
<adambeynon> elia: nice one. never knew they had automatic tests for the todos app
GitHub87 has joined #opal
<GitHub87> opal-browser/master b2d2ca6 meh: dom/node: use #<< internally instead of #add_child
<GitHub87> opal-browser/master 0b18b52 meh: dom/node: make #replace semantics consistent with #add_child
GitHub87 has left #opal [#opal]
<GitHub87> [opal-browser] meh pushed 2 new commits to master: http://git.io/ICD9lA
GitHub112 has joined #opal
GitHub112 has left #opal [#opal]
<GitHub112> [opal-browser] meh closed pull request #17: Swap arguments to replaceChild (master...fix_replace) http://git.io/xqMUQA
travis-ci has joined #opal
travis-ci has left #opal [#opal]
<travis-ci> [travis-ci] Build details : http://travis-ci.org/opal/opal-browser/builds/18651425
<travis-ci> [travis-ci] opal/opal-browser#180 (master - b2d2ca6 : meh): The build was broken.
travis-ci has joined #opal
<travis-ci> [travis-ci] opal/opal-browser#181 (master - 2cfd6c5 : meh): The build passed.
travis-ci has left #opal [#opal]
<travis-ci> [travis-ci] Build details : http://travis-ci.org/opal/opal-browser/builds/18651584
barry_ has joined #opal
barry_ has quit [Ping timeout: 250 seconds]
barry_ has joined #opal
barry__ has joined #opal
barry_ has quit [Ping timeout: 272 seconds]
DrShoggoth has joined #opal
DMDaMan has joined #opal
fkchang has joined #opal
DMDaMan has left #opal ["Textual IRC Client: www.textualapp.com"]
DrShoggoth has quit [Read error: Connection reset by peer]
ryanstout has joined #opal
DrShoggoth has joined #opal
DrShoggoth has quit [Read error: Connection reset by peer]
DrShoggoth has joined #opal
elia has quit [Ping timeout: 260 seconds]
dleedev has joined #opal
dleedev has quit [Client Quit]
Noldorin has joined #opal
Noldorin has quit [Max SendQ exceeded]
<ryanstout> so if anyone can help,I have sort of an opal question. I'm trying to take the code in my frameworks bindings, which are currently "compiled" on the back-end and then sent to the front-end inside of Proc's with some other code. My problem is the bindings are supposed to be evaluated in a specific context, so I'm running them with .instance_eval, but Proc's capture other variables in closure. Is there any way to transmit them as code that can be run witho
<ryanstout> capturing variables?
<adambeynon> ryanstout: it depends on how/where they are being compiled, but how about some "def" method
<ryanstout> I think def's capture too don't they?
<adambeynon> not any variables above their scope
<adambeynon> ryanstout: have you got a link to where you are compiling them now?
Noldorin has joined #opal
<ryanstout> adambeynon: one sec, let me find it on github
Noldorin has quit [Client Quit]
<adambeynon> sure. I am off out for a bit, but I will be back within an hour
<ryanstout> it gets put in a proc, that then gets put in a lambda that sets up the IfBinding
<ryanstout> those get compiled in a big opal file, so all of your bindings end up in one file
<adambeynon> ryanstout: so, one the client, you loop through each lambda and run it?
<adambeynon> on*
<ryanstout> yea
<ryanstout> to setup the bindings
<adambeynon> ok, and what problem is being caused by the proc accessing variables from another scope?
<ryanstout> the problem is the variables in the lambda are the first place it looks in the If's conditional binding
<ryanstout> yea, the proc is getting passed into the IfBinding.new on line 27
<ryanstout> so its seeing target, context, and, id
Noldorin has joined #opal
<adambeynon> ryanstout: so those variables are conflicting with method names it should be seeing in another context?
<ryanstout> yea
<adambeynon> ryanstout: can't you just do
<adambeynon> self.context
<adambeynon> to force it as a method call?
<ryanstout> yea, but the code that runs in the proc is passed in from the user in the binding.
<ryanstout> so they would have to do:
<ryanstout> {#if self.context}
<ryanstout> if that makes since
<ryanstout> anyway, I can just give the variables obscure names, but I was trying to think if there was a better solution
<adambeynon> right, I see the issue now
<adambeynon> ok
<adambeynon> ryanstout: was just about to suggest that, yea
<adambeynon> __context
<adambeynon> or something
<adambeynon> not sure there is another way around it
<ryanstout> ok
<ryanstout> just wanted to be sure there wasn't anything I wasn't thinking of
<ryanstout> thanks for the help
mneorr has joined #opal
fkchang has quit [Remote host closed the connection]
fkchang has joined #opal
fkchang has quit [Remote host closed the connection]
barry__ has quit [Ping timeout: 250 seconds]
barry_ has joined #opal
fkchang has joined #opal
Noldorin has quit [Read error: Connection reset by peer]
mneorr has quit [Remote host closed the connection]
mneorr has joined #opal
mneorr has quit [Ping timeout: 260 seconds]
mneorr has joined #opal
barry_ has quit []
Noldorin has joined #opal
elia has joined #opal
dimaursu16 has quit [Ping timeout: 260 seconds]
mneorr has quit [Remote host closed the connection]
mneorr has joined #opal
mneorr has quit [Ping timeout: 248 seconds]
<ryanstout> elia: thanks for the tweet.
<elia> ryanstout, your fault, the demo is awesome
<ryanstout> elia: check this out: http://69.163.93.20:3000/db
<ryanstout> the live data syncing
<elia> now I'm sure I have a virus in the browser :)
<ryanstout> :-)
<ryanstout> yea, you should be able to see me changing it
<elia> I did
<ryanstout> cool
<ryanstout> elia: let me know if you want to contribute :-)
<elia> sure, problem is time
<ryanstout> yea, I know how that goes
<elia> or getting a good excuse to play with it (aka use it in day job)
<ryanstout> yea
<elia> ryanstout, first thing I'd like to contribute is a logo btw :)
<ryanstout> that would be great. My brother is working on one, but he hasn't had luck getting one he likes
<ryanstout> elia: do you think we'll be able to get traction on volt? (I'm genuinely curious)
<elia> ryanstout, I think yes, has the awesomeness of ng, ember, and ruby
<elia> I don't like very much the cluttered html but it definitely effective
<elia> and having a video demo is a huge boost
<ryanstout> I think down the road we could add something like haml
<elia> that would be awesome
<ryanstout> I'm not sold on the html generation from ruby thing
<ryanstout> ^yet
<elia> ryanstout, you're referring to haml?
<ryanstout> no, I thought lissio did some ruby -> html
<elia> oh I see, I like it, but haml is easier
<elia> lissio generator resembles Markaby which I never used and Arbre which I used in activeadmin
<elia> well gotta go
<ryanstout> thanks for the feedback
mneorr has joined #opal
mneorr has quit [Ping timeout: 250 seconds]
mneorr has joined #opal
elia has quit [Read error: Connection reset by peer]
elia has joined #opal
elia has quit [Quit: Computer has gone to sleep.]
fkchang has quit [Ping timeout: 250 seconds]
DrShoggoth has quit [Quit: Leaving]