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
<fkchang> free for just 1 day http://free.discovermeteor.com (and very expensive otherwise)
<fkchang> adambeynon: re: opal-rspecI didn't, I thought specifying a new main as the erb file would work, but not what I expected. I'll dig deeper, I've seen enough code to think what I was doing should work, if not close
aep has left #opal ["WeeChat 0.4.2"]
marcandre has joined #opal
ryanstout has joined #opal
<ryanstout> if anyone's curious, I've been working on (another) web framework that uses opal. I put together an intro video: http://www.youtube.com/watch?v=jvES35dP_aQ&fmt=18 If anyone has time, let me know their thoughts.
<fkchang> ryanstout: I'll have to watch the whole thing, first few minutes are interestin
<ryanstout> thanks, sorry it ended up longer than I expected
<ryanstout> still really early, but I wanted start getting some early thoughts/feedback
<meh`> ryanstout, why so many underscores?
<ryanstout> so the model class lets you just start assigning things, kind of like JS expando. But since in ruby a method is called without (), I prefix things with underscore something.mispelled_method raises an exception
<ryanstout> if that makes since
<ryanstout> I'm not set on doing it that way though
<ryanstout> the .__value and .__updated ones are going to change to just .value and .updated
<ryanstout> I was keeping them separate since they are methods on the reactive value its self, but I don't think they need to be
<ryanstout> there's other ways to call a .value method on the value stored in a ReactiveValue
<meh`> I'd rather have them as method! than _method
<ryanstout> ! gets used for destructive methods already though
<meh`> I see
<ryanstout> yea, I may need to rethink the _ thing. Thanks, this early feedback is useful.
<meh`> :)
<ryanstout> any more thoughts on it?
<ryanstout> does it seem like its going in the right direction?
<meh`> I admit I mostly skimmed over it, and found the events on nil values to be cool
<ryanstout> yea, its nice because you can start using stuff before its setup.
DrShoggoth has quit [Remote host closed the connection]
<ryanstout> fkchang: did you get a chance to watch the video?
DrShoggoth has joined #opal
DrShoggoth has quit [Max SendQ exceeded]
<fkchang> ryanstout: nope, taking care of kids, cooking, and stuff, will try to get to it, maybe on my phone as I cook
<ryanstout> no worries, whenever you get time, thanks :-)
DrShoggoth has joined #opal
DrShoggoth has quit [Max SendQ exceeded]
DrShoggoth has joined #opal
DrShoggoth has quit [Max SendQ exceeded]
DrShoggoth has joined #opal
DrShoggoth has quit [Max SendQ exceeded]
DrShoggoth has joined #opal
<meh`> adambeynon, we could track external requires and produce separated files
<meh`> ryanstout, what do you think of paggio?
<ryanstout> what's the url?
<ryanstout> checking it out...
<ryanstout> its cool
<ryanstout> I was never a haml guy or anything though, so I'm not used to that style
<ryanstout> how do you set attributes on tags?
gverri has joined #opal
<meh`> ryanstout, well, there are specialized elements, but the generic way is img(src: "url")
<ryanstout> ok
<meh`> in the case of img, it has an #src method, so you can just do img.src("url")
<meh`> it's basically the opal-browser's DSLs made generic
<ryanstout> interesting
<meh`> I'll start using paggio in opal-browser since it has a intermediate representation
<meh`> I'm using it for single page websites
<ryanstout> does it save a lot of code? (instead of html)
<meh`> how do you mean?
<ryanstout> like does it end up being less code than it would be in html
<meh`> well, it depends
<meh`> since it's just ruby, you can automate a bunch of stuff
<ryanstout> I thought about trying to do something like haml, but I feel like most people are so used to html, its one more thing to learn
<ryanstout> still, its very interesting
gverri has quit [Ping timeout: 240 seconds]
meh` has quit [Ping timeout: 250 seconds]
DrShoggoth has quit [Read error: Connection reset by peer]
e_dub has joined #opal
DouweM has quit [Read error: Connection reset by peer]
marcandre has quit [Remote host closed the connection]
ryanstout has quit [Quit: ryanstout]
fkchang has quit [Ping timeout: 252 seconds]
kludge` has quit [Ping timeout: 272 seconds]
kludge` has joined #opal
GitHub146 has joined #opal
<GitHub146> opal/master f9d578e Adam Beynon: Implement Enumerable#collect_concat and #flat_map
<GitHub146> [opal] adambeynon pushed 2 new commits to master: http://git.io/VLRuPA
<GitHub146> opal/master 4524fc8 Adam Beynon: Cleanup Enumerable spec white-list to a single directory entry
GitHub146 has left #opal [#opal]
GitHub32 has joined #opal
GitHub32 has left #opal [#opal]
<GitHub32> [opal] adambeynon pushed 1 new commit to master: http://git.io/5xYMxA
<GitHub32> opal/master 7dae682 Adam Beynon: Implement Enumerable#reject and remove spec filters
travis-ci has joined #opal
<travis-ci> [travis-ci] opal/opal#1599 (master - f9d578e : Adam Beynon): The build passed.
<travis-ci> [travis-ci] Build details : http://travis-ci.org/opal/opal/builds/15442778
travis-ci has left #opal [#opal]
travis-ci has joined #opal
<travis-ci> [travis-ci] opal/opal#1600 (master - 7dae682 : Adam Beynon): The build passed.
<travis-ci> [travis-ci] Build details : http://travis-ci.org/opal/opal/builds/15442852
travis-ci has left #opal [#opal]
elia_ has quit [Quit: Connection closed for inactivity]
GitHub23 has joined #opal
GitHub23 has left #opal [#opal]
<GitHub23> opal/master aeee689 Adam Beynon: Implement Enumerable#reverse_each
<GitHub23> [opal] adambeynon pushed 1 new commit to master: http://git.io/efY8bw
GitHub87 has joined #opal
<GitHub87> opal/master 53fe56b Adam Beynon: Implement Enumerable#partition and remove spec filters
GitHub87 has left #opal [#opal]
<GitHub87> [opal] adambeynon pushed 1 new commit to master: http://git.io/SCsmOw
travis-ci has joined #opal
<travis-ci> [travis-ci] opal/opal#1601 (master - aeee689 : Adam Beynon): The build passed.
<travis-ci> [travis-ci] Build details : http://travis-ci.org/opal/opal/builds/15443085
travis-ci has left #opal [#opal]
travis-ci has joined #opal
travis-ci has left #opal [#opal]
<travis-ci> [travis-ci] Build details : http://travis-ci.org/opal/opal/builds/15443198
<travis-ci> [travis-ci] opal/opal#1602 (master - 53fe56b : Adam Beynon): The build passed.
GitHub1 has joined #opal
GitHub1 has left #opal [#opal]
<GitHub1> opal/master 6b27223 Adam Beynon: Initial implementation of Enumerable#zip
<GitHub1> [opal] adambeynon pushed 1 new commit to master: http://git.io/3QtrvQ
travis-ci has joined #opal
<travis-ci> [travis-ci] opal/opal#1603 (master - 6b27223 : Adam Beynon): The build passed.
<travis-ci> [travis-ci] Build details : http://travis-ci.org/opal/opal/builds/15443498
travis-ci has left #opal [#opal]
DouweM has joined #opal
meh` has joined #opal
meh` has quit [Ping timeout: 260 seconds]
DrShoggoth has joined #opal
GitHub87 has joined #opal
<GitHub87> opal/master d46329c Adam Beynon: Cleanup observer specs
GitHub87 has left #opal [#opal]
<GitHub87> opal/master 0e51628 Adam Beynon: Add some missing string specs
<GitHub87> [opal] adambeynon pushed 4 new commits to master: http://git.io/QF_m5g
<GitHub87> opal/master 70f88d0 Adam Beynon: Add Comparable specs from rubyspec
travis-ci has joined #opal
<travis-ci> [travis-ci] opal/opal#1604 (master - 4a95206 : Adam Beynon): The build passed.
travis-ci has left #opal [#opal]
<travis-ci> [travis-ci] Build details : http://travis-ci.org/opal/opal/builds/15450718
elia has joined #opal
e_dub has quit [Ping timeout: 240 seconds]
elia has quit [Quit: Computer has gone to sleep.]
elia has joined #opal
DrShoggoth has quit [Ping timeout: 245 seconds]
e_dub has joined #opal
marcandre has joined #opal
meh` has joined #opal
ryanstout has joined #opal
DrShoggoth has joined #opal
e_dub has quit [Ping timeout: 240 seconds]
DrShoggoth has quit [Ping timeout: 240 seconds]
prakriti has joined #opal
e_dub has joined #opal
e_dub has quit [Client Quit]
elia has quit [Quit: (IRC Client: textualapp.com)]
sagidullin has joined #opal
sagidullin has quit [Remote host closed the connection]
ryanstout has left #opal [#opal]
meh` has quit [Ping timeout: 240 seconds]
ryanstout has joined #opal
<abowhill> I'm installing Opal on Fedora via RPM, with "rpm install opal". npm-debug.log shows it needs root. Will this cause problems later or is it normal?
<abowhill> (.rvm/src/npm-debug.log)) => 46 error Error: EACCES, mkdir '/usr/lib/node_modules/opal'
<ryanstout> I don't think thats the same opal
<ryanstout> or maybe I'm wrong
<ryanstout> sorry, nevermind
<ryanstout> read it wrong
<abowhill> oh ok hehe
<ryanstout> rpm or rvm?
<abowhill> oh man, sorry RVM.
<ryanstout> ok, there is an opal rvm package, so I was confused
<abowhill> Ruby version manager. I apologize..
<abowhill> The reason I ask is RVM normally does things as non-root, and occasionally will ask for root access on certain ops. It did't this time, and I'm familiar with RVM causing problems when you break this convention.
<adambeynon> abowhill: Im not too sure about the root issue, but I think the rvm version of Opal is *way* out of date
<adambeynon> it should work, but its very very old
<adambeynon> ryanstout: really interesting video btw
<adambeynon> the reactive stuff looks really nice
<abowhill> oh really, okay.
<ryanstout> adambeynon: thanks, it still early
<ryanstout> adambeynon: just trying to get some early feedback on things, make sure its heading in a good direction
<adambeynon> ryanstout: definitely. what language/framework is the html template stuff?
<adambeynon> looks kinda like mustache/handlebars
<ryanstout> its my own, inspired by handlebars
<ryanstout> I'm probably going to change the {/} maybe to {end}
<ryanstout> its weird since its not ruby, but your running ruby in it
<ryanstout> but its also not erb because some of the bindings need to do things a little different
<adambeynon> ryanstout: yeah. I have been struggling to force binding style things into erb and haml
<adambeynon> a special syntax is the right way to go
<adambeynon> I did look at handlebars, but their compiler is a little awkward to get working with opal
<ryanstout> its tricky with .each especially
<ryanstout> this compiles the templates on the backend before they get sent to the server
<ryanstout> ^client I mean
<ryanstout> vienna uses erb right?
<adambeynon> ryanstout: it can use either erb or haml
<adambeynon> the haml stuff is very new though
<ryanstout> sorry, I haven't looked at vienna that much. So it re-renders the html when things change?
<adambeynon> ryanstout: nope. at the moment it hasnt got any built in binding stuff - because It was awkward to do with normal ruby code
<adambeynon> I thought about having a b() helper
<adambeynon> but it was ugly..
<adambeynon> <%= b 'user.name' %>
<adambeynon> so any updates are done inside the controller
<adambeynon> element.find('#user-name').value = "foo"
<adambeynon> which is what I found really nice about your demo
<ryanstout> interesting
<ryanstout> thanks. I'm not sure how well I showed it, but I've basically got all of the auto-updating working
<ryanstout> its cool too because its smart about what to update
<ryanstout> and hopefully simpler to write (imho) than something like ember
<adambeynon> yeh - I always found ember a little awkward, but hey
<adambeynon> is this opal stuff just for fun, or an app in creation?
<ryanstout> half fun, half maybe just something I want to have for future projects
<ryanstout> I like a lot of the idea's behind meteor, but I feel like it could have been done better (in JS or ruby)
<ryanstout> I took some of the idea's from derbyjs also if you've seen it
<ryanstout> I like JS a lot, but I really think compiling to JS is the future, hehe
<ryanstout> adambeynon: btw, is opal just a side project for you?
<adambeynon> ryanstout: started off as a side project - I have written lots of various lang-to-js compilers
<adambeynon> now I use it in 5 apps
<adambeynon> 2 in my business
<ryanstout> cool, well thanks for all the hard work
<adambeynon> 3 used externally, but private
<adambeynon> ryanstout: np. occasionally I look back at a project using opal from about 3 years ago - its come a very long way :)
<ryanstout> I bet
<adambeynon> it was originally built on top of cappuccino, so had a very rubymotion/macruby feel to it
<ryanstout> interesting
<adambeynon> ryanstout: how does your template stuff work? does it compile to placeholder elements?
<ryanstout> it puts in comments that it looks for
<ryanstout> and an array of proc's that instantiate everything
<ryanstout> and things with attributes it gives id's if they don't have one
<ryanstout> adambeynon: is that what you were asking?
<adambeynon> ryanstout: yeap - just to compare it to how emberjs handles it
<adambeynon> I think they use data- attributes
<ryanstout> ember uses <script> tags, but I personally think comments are a lot cleaner
<ryanstout> both can appear anywhere in html
<ryanstout> and in modern browsers, you can do fast xpath lookup on comments
<ryanstout> I have it setup so it would be easy to render the html on the backend (with placeholders) for the initial page load. To make it SEO compatible out of the box
<adambeynon> server rendering as well would be really nice to have
<adambeynon> ryanstout: what would method_added() be needed for?
<adambeynon> (still working on it, btw)
<ryanstout> its for the API to specify how events are propagated on objects
<ryanstout> somewhat internal
<ryanstout> but like before a method you could say: reacts_with :[], :<<
<ryanstout> sorry, I'm not explaining this well
<ryanstout> basically, it would let you describe how the event propagate.
<ryanstout> :-)
<ryanstout> the idea would be to call class methods before the method, then when the method gets added, it tags that data with that method
<ryanstout> (like how thor does stuff)