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/
fkchang has joined #opal
DrShoggoth has quit [Quit: Leaving]
<fkchang> meh`: can you catch a js error in opal, or better to do it all inside of the xstring
<meh`> fkchang, rescue can catch js errors as well, IIRC
<meh`> fkchang, yeah, it does
Noldorin has joined #opal
kings has quit [Ping timeout: 272 seconds]
marcandre has quit [Remote host closed the connection]
barry has quit [Remote host closed the connection]
dleedev has quit [Quit: dleedev]
marcandre has joined #opal
elia has quit [Quit: Computer has gone to sleep.]
kings has joined #opal
<fkchang> sweet, my spike using lissio and jubilee is a success
<meh`> noice
<fkchang> meh`: kudos across the board for opal-browser and lissio -- the API's make a lot of sense and are very ruby-esque
<meh`> fkchang, thanks
<fkchang> and of course adambeynon: kudos on all other things opal, elia too
<fkchang> meh`: I'll say when I figure out what it is that I want to do, and then you tell me how it works in lissio, I'm not surprised. Priniciple of least surprise works pretty well in lissio
<fkchang> either that or we're both twisted in the same way
<meh`> lol
<fkchang> 615 lines (as counted by wc -l, includes html and css in lissio) both server and client for a kanban board that pulls from pivotal tracker, and shows changes real time (highlighting of cards, showing cards for just 1 uset)across all browse instances
<meh`> I always wonder how many more lines and convulted spaghetti code would a javascript solution be
<fkchang> it's a good question, I know when I first started just the lissio part, I was super impressed on how little code, and how clear the code was, certainly compared to a raw HTML, CSS, and JS solution. That I could think in objects from the get go is huge
<fkchang> and ruby objects vs js object at that
<meh`> what the heck, closing the Chrome inspector just shut down my monitor
<fkchang> weird
<meh`> for a moment I thought the monitor just broke
<meh`> greater panic
<meh`> but yeah, working with lissio is awesome compared to the messes I had to do with backbone and friends
[o__o] has left #opal [#opal]
GitHub159 has joined #opal
GitHub159 has left #opal [#opal]
<GitHub159> opal-browser/master 4d3c605 meh: dom/document: #cookies has been moved
<GitHub159> opal-browser/master 0d33215 meh: support: add some documentation
<GitHub159> [opal-browser] meh pushed 5 new commits to master: http://git.io/q9zxow
<GitHub159> opal-browser/master 80f20db meh: http: remove unused file
[o__o] has joined #opal
<meh`> fkchang, now we just have to convince the world Ruby in the browser isn't a crazy idea
RoxasShadowRS has quit [Read error: Connection reset by peer]
kings has quit [Read error: Connection reset by peer]
kings has joined #opal
<meh`> all green, time to sleep
meh` has quit [Read error: Operation timed out]
barry has joined #opal
barry has quit [Ping timeout: 240 seconds]
kings has quit [Ping timeout: 240 seconds]
barry has joined #opal
barry has quit [Ping timeout: 264 seconds]
kings has joined #opal
kings has quit [Ping timeout: 272 seconds]
e_dub has joined #opal
Noldorin has quit []
barry has joined #opal
barry has quit [Ping timeout: 248 seconds]
kings has joined #opal
kings has quit [Ping timeout: 252 seconds]
dimaursu16 has quit [Ping timeout: 264 seconds]
ryanstout has quit [Quit: ryanstout]
ryanstout has joined #opal
barry has joined #opal
barry has quit [Ping timeout: 272 seconds]
dleedev has joined #opal
<dleedev> hi, what version of ruby does opal target?
kings has joined #opal
kings has quit [Ping timeout: 248 seconds]
<fkchang> dleedev: that I know, it's mostly 1.9.3 compatible, I'm not sure what adambeynon's plans are on ruby 2 syntax
barry has joined #opal
barry has quit [Ping timeout: 252 seconds]
e_dub has quit [Quit: e_dub]
ryanstout has quit [Quit: ryanstout]
marcandre has quit [Remote host closed the connection]
e_dub has joined #opal
kings has joined #opal
meh` has joined #opal
barry_ has joined #opal
barry_ has quit [Ping timeout: 272 seconds]
kings has quit [Ping timeout: 272 seconds]
meh` has quit [Ping timeout: 260 seconds]
<adambeynon> dleedev, fkchang: on master (0.6.0 release) we are targetting ruby 2.0 specs
<adambeynon> keyword args are a go
<adambeynon> the only thing Im not sure on is refinements
<adambeynon> they are going to be tricky
<dleedev> opal doesn't seem to do argument count checking
<dleedev> is that intentional?
barry_ has joined #opal
barry_ has quit [Ping timeout: 248 seconds]
kings has joined #opal
kings has quit [Ping timeout: 265 seconds]
<adambeynon> dleedev: it is turned off by default
<adambeynon> you can enable it though
<adambeynon> dleedev: are you using rails?
<dleedev> adambeynon: no, why?
<dleedev> adambeynon: at least not for what I'm trying to use opal for
<dleedev> I do use rails in other contexts
<adambeynon> dleedev: just wondering about your setup for enabling the arg count checking
<adambeynon> Opal::Processor.arity_check_enabled = true
<adambeynon> dleedev: ^^^^ if you pop that somewhere, then all opal sources will be compiled with arg checking
<adambeynon> I usually put it in config.ru or a Rakefile for non-rails apps
<dleedev> is that a large performance hit?
<adambeynon> those are all the compiler options for various bits n pieces
<adambeynon> umm, not huge. it compiles this into every method: if (arguments.length != x) { Opal.ac(x, y) }
<adambeynon> its more because of the extra code that gets compiled
<adambeynon> dleedev: in rails apps, I make use of development.rb for all the compiler options
<adambeynon> so when compiling in production all the extra stuff gets omitted
elia has joined #opal
barry has joined #opal
barry has quit [Ping timeout: 272 seconds]
barry has joined #opal
barry_ has joined #opal
kings has joined #opal
barry has quit [Disconnected by services]
<dleedev> is there rspec for opal?
<elia> dleedev, github.com/opal/opal-rspec
barry_ has quit [Remote host closed the connection]
dimaursu16 has joined #opal
kings has quit [Ping timeout: 245 seconds]
barry_ has joined #opal
barry_ has quit [Ping timeout: 252 seconds]
barry_ has joined #opal
barry__ has joined #opal
barry_ has quit [Ping timeout: 248 seconds]
kludge` has quit [Ping timeout: 252 seconds]
kludge` has joined #opal
fkchang has quit [Ping timeout: 248 seconds]
dleedev has quit [Quit: dleedev]
kings has joined #opal
e_dub has quit [Quit: e_dub]
e_dub has joined #opal
kings has quit [Ping timeout: 264 seconds]
barry_ has joined #opal
RoxasShadowRS has joined #opal
barry_ has quit [Read error: Connection reset by peer]
barry_ has joined #opal
barry__ has quit [Ping timeout: 252 seconds]
barry_ has quit [Client Quit]
kings has joined #opal
e_dub has quit [Quit: e_dub]
kings has quit [Ping timeout: 272 seconds]
e_dub has joined #opal
e_dub has quit [Quit: e_dub]
marcandre has joined #opal
meh` has joined #opal
e_dub has joined #opal
kings has joined #opal
GitHub37 has joined #opal
<GitHub37> [opal] meh pushed 1 new commit to master: http://git.io/pRHGgQ
<GitHub37> opal/master 6ff4d55 meh: Also catch Errno::EPIPE in uglify and gzip
GitHub37 has left #opal [#opal]
travis-ci has joined #opal
<travis-ci> [travis-ci] opal/opal#1707 (master - 6ff4d55 : meh): The build passed.
<travis-ci> [travis-ci] Build details : http://travis-ci.org/opal/opal/builds/17836372
travis-ci has left #opal [#opal]
dfranciosi has quit []
dfranciosi has joined #opal
<adambeynon> meh`, elia: sprockets has a very handy "require_tree" directive. any objections into making it a special method name in opal?
<adambeynon> similar to how we handle require() ?
<elia> adambeynon, not at all
<elia> #require_tree ?
kings has quit [Ping timeout: 252 seconds]
<meh`> adambeynon, fine by me
dimaursu16 has quit [Read error: No route to host]
dimaursu16 has joined #opal
Oblivium has joined #opal
<Oblivium> Hi everyone. How do I access a simple ruby variable like stuff = "some characters" defined in the main scope of the file being compiled to Js with opal ? (the same file that has the require 'opal' at the beginning] ?
<meh`> Oblivium, I'm not sure I follow
<Oblivium> I'm just trying to access from the browser a variable I defined in the ruby script that I converted to .js
<meh`> you can't, variables are local to the file, like in Ruby
<Oblivium> local to the file meaning? Are you saying that, if in irb I require "somethingelse.rb" which has local variables in the main scope, then I would not be able to see such variables?
kings has joined #opal
<Oblivium> back to my case, what if I make it an @instance_variable? Then I would not still be able to access it from Js runtime?
<Oblivium> (I tried and it seems I can't?)
<meh`> use a global variable or a class
kings has quit [Ping timeout: 272 seconds]
e_dub has quit [Quit: e_dub]
<Oblivium> ok then how do I call it from Js ? alert(Opal.$my_glob_var); ?
<meh`> Opal.gvars.my_global_var
<Oblivium> meh`: yea thanks
Oblivium has quit [Quit: Page closed]
Oblivion has joined #opal
Oblivion is now known as Guest56384
Guest56384 is now known as Oblivion_n
<Oblivion_n> what if from Js runtime I want to call a function in rubyscript.js which is not defined in a class ? Can I still access it, maybe using ruby reflection?
<adambeynon> Oblivion_n: which object would it be defined on?
<adambeynon> just the top level?
emanuel has joined #opal
<Oblivion_n> adambeynon: yes toplevel
<Oblivion_n> is there a name for the toplevel Ruby scope?
<Oblivion_n> that i can call from Js
<Oblivion_n> so that I can call functions defined in toplevel not in a class ?
emanuel is now known as samurai___
<meh`> adambeynon, found the JSON problem
<meh`> rspec/core/formatters/progress_formatter.rb requires json
samurai___ is now known as samur4i
<meh`> and it gets required before the spec_helper
<meh`> adambeynon, any idea to fix this?
<meh`> adambeynon, or something like that, rspec is definitely requiring json
<adambeynon> Oblivion_n: yes, it is exposed as Opal.top
<adambeynon> so you can call methods like
<adambeynon> Opal.top.$my_method(1, 2, 3)
<meh`> I guess I will include them normally
<meh`> should fix it all
<adambeynon> meh`: I forget now, what was the problem with json?
<meh`> adambeynon, json was getting used/required before the polyfill
<meh`> but I fixed it
kings has joined #opal
<meh`> and chrome keeps shutting down my fucking monitor
<meh`> fuck this shit
<Oblivion_n> adambeynon: cool thanks, and that does not work for calling top level local variables because as meh` said they are only available to be called by ruby file which defines them right?
<adambeynon> Oblivion_n: yeap
<adambeynon> you could use globals/instance variables
<adambeynon> or even a constant
<Oblivion_n> kk, wait, i can call @instance variables ?
<adambeynon> yep. Say you have @foo = 100
<Oblivion_n> yea
<adambeynon> then: Opal.top.foo == 100
<Oblivion_n> oh yea k thanks
<meh`> >mfw specs are running in IE6
<meh`> fuck yeah
<meh`> and only 5 failures
<meh`> and they're all storage related
<meh`> easy peasy
<meh`> 1 failure
<adambeynon> \o/
<meh`> this is gonna be harder tho
<elia> meh`, whooooa
<meh`> something weird in the DOM::Builder with inner_html
<meh`> mh
<elia> meh`, memories of innerHTML not reliable/crossbro
<meh`> no I think it's actuall textContent/innerText
<meh`> expect(res.child.text).to eq('wut')
<meh`> this is failing
<meh`> but I added the innerText polyfill
<meh`> mmh
<meh`> and I have no developer tools for IE6
<meh`> and IE11 can't emulate IE6
<meh`> let's see if it works with IE5 emulation
<meh`> it does, lol
<elia> wat?
<meh`> fuck jquery, we IE5.5
<meh`> only 2 failures in IE5
<meh`> and one is with xpath
<meh`> yeah, it seems to be a bug in Browser.supports?
<elia> epic
<meh`> starting to think it's a bug with rspec and IE5 tho
<meh`> the result is consistent, but the failure happens
kings has quit [Ping timeout: 265 seconds]
<meh`> meh, I was looking at the wrong spec ◕ ◡ ◔
<meh`> adambeynon, ping
Oblivion_n has quit [Quit: Page closed]
GitHub164 has joined #opal
<GitHub164> opal-browser/master 721b1e9 meh: spec: enable specs in IE6 and IE7
<GitHub164> [opal-browser] meh pushed 3 new commits to master: http://git.io/iC4_Kw
GitHub164 has left #opal [#opal]
<GitHub164> opal-browser/master 2c93231 meh: dom/element: polyfill some attribute name differences
<GitHub164> opal-browser/master a44e9c5 meh: storage: $ is not allowed in names
<adambeynon> meh`: yo yo
<meh`> adambeynon, is it safe to use return in inline js inside a when clause?
<adambeynon> meh`: aslong as the case/when is a statement, not an expression
<adambeynon> meh`: so that return will just exit the case/when block, so it will set `support` as the result of the return value
<adambeynon> which looks like what you want it to
<meh`> adambeynon, good, that's what I want
<meh`> yes
<adambeynon> elia: opal-activesupport is going to get some Inflection support soon - makes REST calls with models much nicer for inferring endpoints
<elia> adambeynon, good, dhh will be super happy ;)
<meh`> travis is trolling me
<meh`> it stopped starting my jobs
<elia> throttling?
<meh`> yeah
<meh`> I guess they don't like a project with 15 rows
<meh`> even tho it does basically nothing on the workers
<meh`> it just waits for shit
<elia> meh`, wait. u weren't following me?!?
<elia> :D
<meh`> elia, yeah, I was surprised as well
<meh`> I was wondering why I wasn't see that jquery tweet
<meh`> *seeing
<meh`> oh oh, the IE6 job is starting, let's watch it fail
<elia> tuned in
<elia> meh`, I remember something about cacheing bundle installs on travis
<meh`> elia, already do it
<elia> k
<meh`> if you notice it's just installing instead of fetching
<meh`> except for the git deps
<elia> oh, I see
<meh`> fuck yeah green
<meh`> bam
<meh`> now let's see IE7
<adambeynon> "Category".pluralize # => "ies"
<adambeynon> I dont think thats quite right
<meh`> lol
kings has joined #opal
<meh`> there, 1 failure
<meh`> fuck
<meh`> guess I have to download the IE7 vm as well
<elia> adambeynon, err, almost?
<adambeynon> elia: I fixed it :D a slight copy-paste error :D
<elia> copy-pasting is a skill everyone needs to master
<adambeynon> def Model.url; "/#{self.name.downcase.pluralize}"; end
<adambeynon> ^^ happy days
<elia> great!
kings has quit [Ping timeout: 272 seconds]
travis-ci has joined #opal
<travis-ci> [travis-ci] Build details : http://travis-ci.org/opal/opal-browser/builds/17848871
travis-ci has left #opal [#opal]
<travis-ci> [travis-ci] opal/opal-browser#125 (master - 721b1e9 : meh): The build was broken.
elia has quit [Read error: Operation timed out]
GitHub133 has joined #opal
<GitHub133> [opal-browser] meh pushed 1 new commit to master: http://git.io/xKdmpA
GitHub133 has left #opal [#opal]
<GitHub133> opal-browser/master 1372a58 meh: dom/element: catch errors coming up from Sizzle in #css
<meh`> adambeynon, I think we should change the travis jobs
<meh`> adambeynon, for opal/opal
<meh`> have 6 rows that only run rake rspec
<meh`> and one that runs rake mspec
<meh`> so we can actually allow failures on all those 6
<meh`> since it's just the cli bullshit
<meh`> less resources taken from travis, faster responses for what matter
<meh`> s
<adambeynon> meh`: yeah, sounds a good idea
<meh`> adambeynon, I can do it
<meh`> I became a travis expert with the browserstack stuff
<adambeynon> lol :D
<adambeynon> go for it
GitHub153 has joined #opal
<GitHub153> opal/travis 87356f5 meh: WIP
GitHub153 has left #opal [#opal]
<GitHub153> [opal] meh created travis (+1 new commit): http://git.io/KzjN6A
GitHub87 has joined #opal
<GitHub87> opal/travis ab2657b meh: WIP
GitHub87 has left #opal [#opal]
<GitHub87> [opal] meh force-pushed travis from 87356f5 to ab2657b: http://git.io/cC8mow
GitHub167 has joined #opal
<GitHub167> opal/travis 0e5eeaf meh: WIP
<GitHub167> [opal] meh force-pushed travis from ab2657b to 0e5eeaf: http://git.io/cC8mow
GitHub167 has left #opal [#opal]
travis-ci has joined #opal
<travis-ci> [travis-ci] Build details : http://travis-ci.org/opal/opal-browser/builds/17852107
travis-ci has left #opal [#opal]
<travis-ci> [travis-ci] opal/opal-browser#126 (master - 1372a58 : meh): The build was fixed.
<meh`> we green baby
kings has joined #opal
DrShoggoth has joined #opal
GitHub84 has joined #opal
<GitHub84> [opal] meh force-pushed travis from 0e5eeaf to e2e0e17: http://git.io/cC8mow
GitHub84 has left #opal [#opal]
<GitHub84> opal/travis e2e0e17 meh: WIP
elia has joined #opal
kings has quit [Ping timeout: 252 seconds]
GitHub47 has joined #opal
<GitHub47> opal/travis b3cdccb meh: WIP
<GitHub47> [opal] meh force-pushed travis from e2e0e17 to b3cdccb: http://git.io/cC8mow
GitHub47 has left #opal [#opal]
<meh`> elia, can you tweet that opal-browser specs are passing in all relevant browsers? and maybe ask for some contribution in writing more specs
<elia> meh`, will do later tonight (unless you give me readymade 160chars or adambeynon does it first…)
<meh`> elia, yeah, no worries
<elia> meh`, :)
<elia> …or
<meh`> no, I'm awful at fitting in a single tweet, take your time
<elia> ask adambeynon for the password :P
elia has quit [Quit: Computer has gone to sleep.]
GitHub147 has joined #opal
<GitHub147> [opal] meh force-pushed travis from b3cdccb to a5a841f: http://git.io/cC8mow
<GitHub147> opal/travis a5a841f meh: WIP
GitHub147 has left #opal [#opal]
GitHub121 has joined #opal
<GitHub121> [opal] meh force-pushed travis from a5a841f to a86e619: http://git.io/cC8mow
<GitHub121> opal/travis a86e619 meh: WIP
GitHub121 has left #opal [#opal]
samur4i has quit [Remote host closed the connection]
samur4i has joined #opal
GitHub78 has joined #opal
<GitHub78> [opal] meh force-pushed travis from a86e619 to f87b7b8: http://git.io/cC8mow
GitHub78 has left #opal [#opal]
<GitHub78> opal/travis f87b7b8 meh: WIP
samur4i has quit [Remote host closed the connection]
kings has joined #opal
GitHub173 has joined #opal
<GitHub173> [opal] meh deleted travis at f87b7b8: http://git.io/1hIXBw
GitHub173 has left #opal [#opal]
GitHub183 has joined #opal
<GitHub183> opal/master d651da3 meh: Improve the Travis configuration...
<GitHub183> [opal] meh pushed 1 new commit to master: http://git.io/y8jIbA
GitHub183 has left #opal [#opal]
kings has quit [Ping timeout: 248 seconds]
samur4i has joined #opal
travis-ci has joined #opal
<travis-ci> [travis-ci] opal/opal#1724 (master - d651da3 : meh): The build passed.
<travis-ci> [travis-ci] Build details : http://travis-ci.org/opal/opal/builds/17860484
travis-ci has left #opal [#opal]
travis-ci has joined #opal
<travis-ci> [travis-ci] Build details : http://travis-ci.org/opal/opal/builds/17860484
travis-ci has left #opal [#opal]
<travis-ci> [travis-ci] opal/opal#1724 (master - d651da3 : meh): The build passed.
samur4i has quit []
travis-ci has joined #opal
travis-ci has left #opal [#opal]
<travis-ci> [travis-ci] Build details : http://travis-ci.org/opal/opal/builds/17860484
<travis-ci> [travis-ci] opal/opal#1724 (master - d651da3 : meh): The build passed.
<meh`> how many times does it have to notify it?
fkchang has joined #opal
travis-ci has joined #opal
<travis-ci> [travis-ci] opal/opal#1724 (master - d651da3 : meh): The build passed.
travis-ci has left #opal [#opal]
<travis-ci> [travis-ci] Build details : http://travis-ci.org/opal/opal/builds/17860484
DouweM_ has joined #opal
DouweM has quit [Ping timeout: 264 seconds]
kings has joined #opal
kings has quit [Ping timeout: 248 seconds]
<fkchang> meh`: u r super human, IE 6 and mostly IE 5.5. super human, or masochistic
<meh`> I like to think I am both
<meh`> but yeah, the core stuff is working, aka events
<meh`> the rest is easy peasy
kings has joined #opal
ryanstout has joined #opal
ryanstout has quit [Quit: ryanstout]
kings has quit [Ping timeout: 245 seconds]
DrShoggoth has quit [Quit: Leaving]
Noldorin has joined #opal
dleedev has joined #opal