<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
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?
<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>
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