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/
meh` has quit [Ping timeout: 240 seconds]
meh` has joined #opal
DrShoggoth has joined #opal
DrShoggoth has quit [Max SendQ exceeded]
e_dub has joined #opal
e_dub has quit [Ping timeout: 272 seconds]
e_dub has joined #opal
fkchang has quit [Ping timeout: 252 seconds]
RoxasShadowRS has quit [Read error: Connection reset by peer]
meh` has quit [Ping timeout: 252 seconds]
DrShoggoth has joined #opal
dimaursu16 has quit [Ping timeout: 245 seconds]
Noldorin has quit []
fkchang has joined #opal
e_dub has quit [Quit: It's a hard knock life]
dleedev has quit [Quit: dleedev]
dimaursu16 has joined #opal
RoxasShadowRS has joined #opal
DouweM_ has quit [Ping timeout: 252 seconds]
DouweM has joined #opal
DouweM has quit [Client Quit]
elia has joined #opal
<adambeynon> elia: do you still have that meh-bookmark thing handy? :)
<adambeynon> tabs => spaces
<elia> lol, yeah
<elia> adambeynon, btw I think it doesn't work on sprungus now b/c uses plain txt
<elia> not sure tho
<adambeynon> i'll let you know ;)
fkchang has quit [Ping timeout: 265 seconds]
kludge` has quit [Ping timeout: 260 seconds]
kludge` has joined #opal
DouweM has joined #opal
DouweM has quit [Quit: Leaving...]
DouweM has joined #opal
DouweM_ has joined #opal
DouweM has quit [Read error: Connection reset by peer]
AndrzejKrzywda has quit [Ping timeout: 252 seconds]
AndrzejKrzywda has joined #opal
DrShoggoth has quit [Quit: Leaving]
meh` has joined #opal
GitHub104 has joined #opal
<GitHub104> opal-browser/master 3239e9c meh: spec/dom/document: add some #ready related specs
<GitHub104> [opal-browser] meh pushed 2 new commits to master: http://git.io/ysytfw
<GitHub104> opal-browser/master ef4b243 meh: dom/document: cleanup and add documentation
GitHub104 has left #opal [#opal]
fkchang has joined #opal
<fkchang> meh`: can I set other attributes on the top level div of a Lissio::Component? i.e. I'd like to do a tag class: :column, draggable: "true"
<meh`> fkchang, nope, but you're raising a good point
<meh`> fkchang, you can use on :render for now
<meh`> I'll fix up the tag business later
<fkchang> meh`: how do I use on :render ?
<fkchang> BTW, I'm going to give a "Live coding w/Lissio" talk tonight at OCRuby
<fkchang> I was going to try to do do drag and drop as part of it, if possible
<meh`> fkchang, cool
<meh`> also
<meh`> on :render do element[:draggable] = true
dimaursu16 has quit [Ping timeout: 245 seconds]
DouweM_ has quit [Quit: Leaving...]
<meh`> fkchang, are you using the master version of lissio/opal/opal-browser?
DouweM has joined #opal
<elia> meh`, now's the time to un-re-tweet and re-re-tweet (us is awake)
<meh`> lol
barry_ has joined #opal
<elia> meh`, btw what's the problem with chrome? (locally tworks)
<fkchang> meh`: I'm using head as of whenever I did the last bundle update, maybe a week ago?
<meh`> elia, it's in the chromedriver
<meh`> fkchang, just wondering, because I have to start using $document.ready instead of 'dom:load'
<meh`> since it's not cross-browser compatible
<elia> the bug report right?
<meh`> yeah
ryanstout has joined #opal
travis-ci has joined #opal
<travis-ci> [travis-ci] Build details : http://travis-ci.org/opal/opal-browser/builds/17914572
<travis-ci> [travis-ci] opal/opal-browser#127 (master - 3239e9c : meh): The build was broken.
travis-ci has left #opal [#opal]
<meh`> mh
barry_ has quit [Remote host closed the connection]
barry_ has joined #opal
barry_ has quit [Ping timeout: 252 seconds]
Noldorin has joined #opal
elia has quit [Ping timeout: 264 seconds]
dleedev has joined #opal
GitHub74 has joined #opal
<GitHub74> [lissio] none pushed 3 new commits to master: http://git.io/lRLX1g
GitHub74 has left #opal [#opal]
<GitHub74> lissio/master 9264b8d jibi: component/autocomplete: implement autocompleter standard component
<GitHub74> lissio/master 0e25f23 meh: server: use Rack::Deflater
<GitHub74> lissio/master cdb7134 meh: lissio: update to latest opal-browser
DrShoggoth has joined #opal
<fkchang> meh`: how do you do stuff like the followin in the css DSL -webkit-border-top-left-radius: 10px;
<meh`> fkchang, the border radius is already magically implemented, IIRC
<meh`> fkchang, let me check
<meh`> fkchang, yes, it is
<meh`> fkchang, border radius: { left: { top: 10.px } }
<meh`> fkchang, for future reference, you can also put raw stuff in the DSL
<meh`> style 'key', 'value'
<meh`> fkchang, but most things should be implemented, if something isn't it's a bug
<meh`> I mean, I know many things aren't
<meh`> but I usually just add them as I go
<meh`> and I really don't like the extension mechanism for for the CSS DSL, but I still haven't figured out a good way
<ryanstout> can someone explain bridged types to me? Like I noticed passing a opal string to google maps causes some issues. But I thought opal strings were just normal JS strings
<ryanstout> .to_n fixed the issue
<meh`> ryanstout, that's not an issue with bridged types
<meh`> ryanstout, if you try to pass a new String("whatever") to Google maps
<meh`> you'll get the same thing
<meh`> it's a retardation inside js
<ryanstout> interesting
<meh`> if you call a method on a literal that returns this
<ryanstout> so are they doing typeof(val)
<meh`> the this becomes an object
<meh`> yes
<ryanstout> === 'string'
<meh`> #to_n calls .valueOf
<ryanstout> ok, thats what I figured
<meh`> so you get a literal back
<ryanstout> cool, thanks for the info. So opal strings are created with new String('...') ?
<meh`> ryanstout, nope
<meh`> they're literals
<meh`> but many methods return self
<ryanstout> ok
<meh`> it's an internal js thing
<ryanstout> got it
<ryanstout> thanks for the info
barry has joined #opal
<ryanstout> man, thats weird
<meh`> js is weird
<ryanstout> yea
<meh`> same goes with numbers
<meh`> or booleans
<ryanstout> its amazing, I've been doing JS since the netscape days, but still learning new things
<ryanstout> mostly weird things
<ryanstout> :-)
<meh`> yeah, developing Opal is hell :)
<ryanstout> I bet
<ryanstout> well, thanks for working so hard on it :-)
<meh`> for a javascript semantic retardation free world :P
<ryanstout> yea
barry has quit [Remote host closed the connection]
Kilo`byte has quit [Ping timeout: 264 seconds]
barry has joined #opal
<meh`> ryanstout, that's also why I don't see much point in @rubys way of doing things, or coffeescript, or typescript
<meh`> what's broken with JavaScript isn't the syntax or the dynamic typing
<ryanstout> yea, the opal way definitely buys you a ton more
barry has quit [Ping timeout: 264 seconds]
<meh`> it's the whole range of semantic ambiguity
<ryanstout> yea
<meh`> and even if you limit yourself to "the good parts"
<meh`> you're still going to fall for weird shit
<ryanstout> yea
<meh`> ryanstout, but you do raise a good point about the String methods
<meh`> I think it could be valuable to return self.valueOf instead of self
<meh`> but we'd need to set up some benchmarking
<ryanstout> so is it that typeof for a boxed string returns object?
<meh`> yes
<meh`> and also comparison fails
<ryanstout> really?
<ryanstout> man, JS...
<meh`> > new String("lol") == new String("lol")
<meh`> false
<meh`> > "lol" == new String("lol")
<meh`> true
<meh`> it's obvious when you think about it
<meh`> new String IS an object
<ryanstout> man, comparisons in JS are broken in so many ways
<meh`> and two instances aren't the same instance
<meh`> ryanstout, did you know [].sort sorts alphabetically?
<meh`> in JS that is
<ryanstout> yea, I've seen that one
<meh`> but yeah, I can't stand the web
<meh`> I wish gopher won the protocol race
<ryanstout> hehe
<ryanstout> I wouldn't go that far
<ryanstout> its better than not being able to script
<ryanstout> :-)
barry has joined #opal
dleedev has quit [Quit: dleedev]
<meh`> adambeynon, ping
<adambeynon> meh`: hi
<meh`> adambeynon, when you have time, can you look into a bug in opal-browser?
dimaursu16 has joined #opal
marcandr_ has joined #opal
<adambeynon> meh`: what's broken? Block not being passed?
<meh`> adambeynon, I think so
<meh`> I'm not sure
<meh`> it just doesn't work
<meh`> while Kernel#delay does
GitHub87 has joined #opal
<GitHub87> opal-browser/master 5a30272 meh: http/headers: cleanup some documentation
<GitHub87> opal-browser/master c98c1b1 meh: http/request: cleanup some documentation
GitHub87 has left #opal [#opal]
<GitHub87> opal-browser/master 74b17e8 meh: effects: add documentation
<GitHub87> [opal-browser] meh pushed 4 new commits to master: http://git.io/ws1fAg
<meh`> adambeynon, I think it's that runtime block passing bug
<meh`> yeah
<adambeynon> meh`: probably the same bug as before. Bridged methods getting overridden by those on Object
marcandre has quit [Ping timeout: 252 seconds]
<meh`> adambeynon, where is it coming from?
<meh`> from Kernel?
<meh`> you may be right
<meh`> adambeynon, I was thinking
<meh`> we really need to fix bridged classes
<meh`> starting from the way donation works
<meh`> it shouldn't be hardcoded
<meh`> it should be something like this
<meh`> bridge_class('ClassName', *donation_chain)
<meh`> so bridge_class('String', Object, BasicObject)
<meh`> derp
<meh`> so bridge_class(String, 'String', Object, BasicObject)
<meh`> so bridge_class(Number, 'Number', Numeric, Object, BasicObject)
<meh`> and we check on donation if the method is present in any "parent" class
<meh`> so we don't override it
<meh`> this way we get Numeric to work properly, and the override to work properly as well
<meh`> also Kernel
<meh`> but you get the gist
GitHub119 has joined #opal
<GitHub119> [opal-browser] meh pushed 2 new commits to master: http://git.io/vcwnEA
<GitHub119> opal-browser/master 1249105 meh: delay: fix Proc#after and add specs
GitHub119 has left #opal [#opal]
<GitHub119> opal-browser/master 2dcb257 meh: interval: fix Proc#every and add specs
<adambeynon> meh`: yeah, be nice to get method_added() working then as well
<meh`> adambeynon, yeah, I really need it in the future, for some crazy stuff with parslet
<meh`> I think I broke something in the runner
<meh`> or browserstack is being dicks
GitHub68 has joined #opal
GitHub68 has left #opal [#opal]
<GitHub68> opal-browser/master 9c4f61e meh: spec/runner: catch timeouts in the specs
<GitHub68> [opal-browser] meh pushed 1 new commit to master: http://git.io/lK8V7Q
travis-ci has joined #opal
<travis-ci> [travis-ci] Build details : http://travis-ci.org/opal/opal-browser/builds/17928079
<travis-ci> [travis-ci] opal/opal-browser#128 (master - f4a734c : meh): The build was canceled.
travis-ci has left #opal [#opal]
marcandr_ has quit [Remote host closed the connection]
marcandre has joined #opal
GitHub73 has joined #opal
<GitHub73> [lissio] meh pushed 1 new commit to master: http://git.io/jQV5FA
GitHub73 has left #opal [#opal]
<GitHub73> lissio/master a1034ed meh: component: fix instance events
<adambeynon> ryanstout: in voltrb, what is the best way for binding a value, but having it formatted
<adambeynon> format an integer into a currency, for example
<adambeynon> im still reading through the docs, so maybe I havent got the whole concept yet
GitHub109 has joined #opal
<GitHub109> [opal-browser] meh pushed 1 new commit to master: http://git.io/3M8hAA
<GitHub109> opal-browser/master 20f2051 meh: spec/socket: require location
GitHub109 has left #opal [#opal]
dleedev has joined #opal
<meh`> god, I hate this spec loading differences from local to travis
GitHub74 has joined #opal
GitHub74 has left #opal [#opal]
<GitHub74> [opal-browser] meh pushed 1 new commit to master: http://git.io/YsIAJQ
<GitHub74> opal-browser/master c2cd547 meh: spec/runner: revert to failure by default
marcandre has quit [Remote host closed the connection]
GitHub50 has joined #opal
GitHub50 has left #opal [#opal]
<GitHub50> opal-browser/master ebffdb9 meh: spec/index: improve error reporting
<GitHub50> [opal-browser] meh pushed 1 new commit to master: http://git.io/PqDEvg
travis-ci has joined #opal
<travis-ci> [travis-ci] opal/opal-browser#132 (master - c2cd547 : meh): The build was canceled.
travis-ci has left #opal [#opal]
<travis-ci> [travis-ci] Build details : http://travis-ci.org/opal/opal-browser/builds/17931308
travis-ci has joined #opal
<travis-ci> [travis-ci] Build details : http://travis-ci.org/opal/opal-browser/builds/17931520
<travis-ci> [travis-ci] opal/opal-browser#133 (master - ebffdb9 : meh): The build passed.
travis-ci has left #opal [#opal]
GitHub128 has joined #opal
GitHub128 has left #opal [#opal]
<GitHub128> opal-browser/master 0b74e56 meh: animation_frame: add Kernel#animation_frame
<GitHub128> opal-browser/master 56e3c33 meh: window: don't require interval and delay
<GitHub128> opal-browser/master c3146b5 meh: immediate: add Kernel#defer
<GitHub128> [opal-browser] meh pushed 3 new commits to master: http://git.io/2XxaJw
<meh`> fkchang, a note, Proc#after and Proc#every now work
<meh`> fkchang, it was another opal bug that we know about, and it has a workaround
<fkchang> meh`: oh, cool, I'll keep it in mind when I need it
<adambeynon> meh`: I need you to come up with some genius way to allow haml/erb templates to have local variables
<adambeynon> i.e. the compiler needs to know how to treat variables as being passed into the template
<meh`> adambeynon, I'll think about it
<meh`> fkchang, also in lissio, if you're defining #initialize in components, make sure to call super
<meh`> now it actually does something
<meh`> it setups the instance events
<adambeynon> meh`: worth noting: when being compiled, we invoke the compiler directly, so we can use compiler options etc just for templates
<fkchang> meh`: I've been calling it, does it matter if super if 1st or last?
<meh`> (ie. when you call #on on a component instance)
<meh`> fkchang, it matters if you're calling #on inside initialize
<meh`> otherwise it's irrelevant
<meh`> in short, call super() before any #on call inside #initialize
<meh`> or it will assplode
<fkchang> meh`: adambeynon -- I think the solution templates having variables will help with the binding/reactivity and templates
<adambeynon> fkchang: exactly why I need them :) I wanted to have a #partial() method and pass in local vars for a bound_each() loop
<adambeynon> fkchang: ooo, hang on
<adambeynon> we introduced irb_vars to solve this problem
<adambeynon> lets a var be a method or a variable
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/17933498
<travis-ci> [travis-ci] opal/opal-browser#134 (master - 0b74e56 : meh): The build has errored.
<meh`> fucking travis
<meh`> no, fucking browserstack
<meh`> this is why we can't have nice things
<fkchang> meh`: next time, when u r cursing travis, js, IE, opera, etc. do it in italian, I'm curious to see how that looks :)
<meh`> lol
<meh`> it would include a lot of heresy
<ryanstout> adambeynon: sorry, I wasn't around. All code in the views evaluates in the context of the controller. So you could just make a controller method. (still need to figure out if I want to do it another way). As long as that method also returns a reactive value, it will updated in the binding. So you could do something like:
<ryanstout> so normally you could do something like:
<ryanstout> def format_with_breaks(str)
<ryanstout> str.gsub("\n", "<br />")
<ryanstout> end
<ryanstout> or you could just put the gsub in the binding
<ryanstout> but there's one issue with .to_s, which is that ruby basically requires that you return an instance of string. So to_s is weird in volt.
<adambeynon> ryanstout: the str you pass into that method will be the reactive value, yeh? (so gsub is just another chained call)
<ryanstout> so for formatting a number, you have to use .with, which takes a block that passes in the current value for the ReactiveValue, and the return value is used in a new ReactiveValue, with the dependencies set.
<ryanstout> so you could do this:
<ryanstout> def format_number(number)
<ryanstout> number.with {|s| s.reverse.gsub(/(\d{3})(?=\d)/, '\\1,').reverse }
<ryanstout> end
<adambeynon> ahh, right I see. yeah, that makes sense
<ryanstout> so anything in a binding is basically just ruby code, and the value returned from it is what the binding binds to
<ryanstout> {format_number _number}
<ryanstout> sorry, this part of Volt needs some work still I think
<ryanstout> adambeynon: thanks for checking it out.
<ryanstout> let me know what else is confusing, its still pretty new
<ryanstout> I should have the data store layer working next week.
<adambeynon> ryanstout: Im enjoying reading the README, then digging through the code
<adambeynon> the array stuff is really neat
<ryanstout> thanks. It should really DRY up a lot of front-end code
<meh`> ryanstout, you lost the chance of calling it voltorb
<ryanstout> I need to do some video tutorial and demo apps
<meh`> I'm disappoint
<ryanstout> thats pokeymon right? sorry, I'm out of touch
<meh`> yeah
<meh`> one of the best http://bulbapedia.bulbagarden.net/wiki/Voltorb_(Pokémon) it explodes
RoxasShadowRS has quit [Read error: Connection reset by peer]
RoxasShadowRS has joined #opal
barry has quit [Remote host closed the connection]
barry has joined #opal
barry__ has joined #opal
barry has quit [Ping timeout: 252 seconds]
<dleedev> where's ReactiveValue from?
<ryanstout> dleedev: we were chatting about a framework I'm working on: https://github.com/voltrb/volt
<ryanstout> lots of people building opal frameworks right now :-)
<dleedev> ryanstout: what are the other ones?
<ryanstout> dleedev: meh is working on lissio https://github.com/meh/lissio and Adam is doing one called Vienna https://github.com/opal/vienna
<ryanstout> and I think maybe someone else is working on one, sorry whoever I forgot :-)
<ryanstout> dleedev: here's a bit old video introing Volt http://www.youtube.com/watch?v=M1V-9Q_NYFg
<ryanstout> I need to do another one
<dleedev> ryanstout: I guess I need to make one too, then :)
<ryanstout> dleedev: yea :-)
<ryanstout> dleedev: if you're interested, check out Volt. I would love some more feedback on it. Its still really early, but the basics for the front-end are there.
<ryanstout> anyone know if its possible to redefine new in opal?
<adambeynon> ryanstout: yeap, it is
<ryanstout> adambeynon: thanks, must be another issue then
<ryanstout> adambeynon: does allocate work?
<adambeynon> ryanstout: it should do
<adambeynon> what class are you changing it in?
<ryanstout> just a custom class of mine
<ryanstout> not inheriting from anything
<adambeynon> strange
<ryanstout> I'll keep messing with it, maybe I'm just doing something wrong
<adambeynon> what error are you getting?
<ryanstout> Cannot call method '$new' of undefined
<ryanstout> let me try this on MRI
<adambeynon> ryanstout: are you calling super in that method?
<ryanstout> no
<ryanstout> its a class method
<adambeynon> ryanstout: it might even be that the constant is missing
<ryanstout> new is
<ryanstout> humm, that would be weird
<adambeynon> ryanstout: on master, const_missing is off by default, so a missing constant is likely to cause that error
<adambeynon> sure its required?
<ryanstout> adambeynon: ok, yea, I think it isn't for some reason
<ryanstout> thanks
<ryanstout> yea, sorry, that was it
<adambeynon> ryanstout: back to reactive stuff, ever seen frappuccino?
<ryanstout> yea
<ryanstout> adambeynon: yea, my stuff is somewhat similar
<ryanstout> though I tried to make it feel like writing normal ruby
<ryanstout> also, its more event oriented than stream
<adambeynon> yeah. I see similarities. I always found ruby's Observable really awkward to use, so frappuccino felt very limited
<ryanstout> adambeynon: yep, I have very similar thoughts
[o__o] has left #opal [#opal]
[o__o] has joined #opal
[o__o] has left #opal [#opal]
[o__o] has joined #opal
<fkchang> meh`: seems like when I override css in a lissio component, it overrides the parent
<fkchang> meh`: I see, it's because I override the css for background color, but the tag class is the same as the parent
<fkchang> so the last one wins
<fkchang> so I thought I'd try tag class: "card bug-card", which generates the class on the parent div correctly, but not the generated css, i.e. <style type="text/css">.card bug-card {background: red;}</style>
<fkchang> is there a way to specify a higher level css than starting from the component parent?
<meh`> fkchang, tag class: [:card, 'bug-card']
<meh`> fkchang, also, how old is the lissio version?
<meh`> because it should magically assign inheritance missing classes
dleedev has quit [Quit: dleedev]
<fkchang> meh`: cool, the array of classes worked. Lissio is probably about a week old
<meh`> I don't remember if I fixed that before or after
<meh`> fkchang, in general, now, you could even go without assigning a class to the component
<meh`> it will create one itself
<meh`> I still use classes because it makes your life easier when inspecting the document tho
<meh`> basically it adds a lissio-#{Component.object_id} class
<meh`> and it goes up the inheritance chain
<meh`> I could probably use the name of the class as well
<meh`> to make it more understandable
<meh`> but there may very well be a bug in the tag inference
<meh`> it tries to just use the assigned class in #tag if it can
<meh`> I'll go for a smoke and see if there's anything wrong going on
<meh`> and add the other attribute support to #tag
<fkchang> meh`: I'd probably also like to override behavior. It seems when I add css or on to the subclass, the parent get those too
<fkchang> I just put an on :click on the child, and the behavior showed up on the parent
<fkchang> somehow there should be a way to pick include parent behavior or override
<fkchang> maybe super the way do it in methods
<meh`> fkchang, that shouldn't be the case
<fkchang> I'll update lissio and see
<meh`> no wait
<meh`> you're right, somewhat
<meh`> let me ask you something
<meh`> do you mean that when you define an #on on a subclass
<meh`> you get the behaviour even when you create a parent component
<meh`> or that when you define an #on on a subclass, you get both behaviors?
<meh`> the parent and the subclass behavior
<meh`> fkchang, ^
<fkchang> meh`: in my case, I added another on :click to the child, and both child and parent classes show both behaviors
<meh`> fkchang, ok that's definitely a bug, so yeah, try updating
<meh`> because from the current code, it shouldn't happen at all
<meh`> unless
<meh`> fkchang, are you defining those #on in #initialize?
<meh`> or on the class?
<meh`> no wait, it wouldn't make sense either
<meh`> yeah, it doesn't make sense with the current code