meh` changed the topic of #opal to: - Ruby runtime and library on top of Javascript | 1.0.0 is near | This channel is logged at
wmnnd has quit [Quit: wmnnd]
DrShoggoth has quit [Quit: Leaving]
Noldorin has joined #opal
elia has quit [Quit: Computer has gone to sleep.]
dimaursu16 has quit [Ping timeout: 252 seconds]
dimaursu16 has joined #opal
ryanstout has quit [Quit: ryanstout]
dleedev has quit [Quit: dleedev]
e_dub has joined #opal
ryanstout has joined #opal
e_dub has quit [Client Quit]
dimaursu16 has quit [Ping timeout: 260 seconds]
chesterbr has joined #opal
Noldorin has quit []
<chesterbr> Hi! Anyone here is using the latest Opal master? I'm having a hard time matching versions with opal-rspec and opal-sprockets (which seems to be locked to 0.5.x, but master is 0.6.0)
<chesterbr> can check out and change version requirements on gemspecs, but first wanted to check if this is the right thing to do :-)
e_dub has joined #opal
e_dub has quit [Quit: It's a hard knock life]
<chesterbr> ah, chat logs pointed me to opal-rspec '0.3.0.betaX'. That allowed me to run the build task, but the rake breaks at the first require of spec_helper...
<chesterbr> ...which made me realize I can't require 3rd party gems on my specs, unless there is a special trick for that. Well, will try to do without them. FWIW, I'm trying to make run in Opal (currently can boot Pitfall!, but crashes and I need the specs to figure out why)
chesterbr has quit [Quit: chesterbr]
e_dub has joined #opal
e_dub has quit [Client Quit]
<ryanstout> chesterbr: I'm running opal-rspec 0.3.0.beta2 on a project. Maybe its something in spec_helper causing it to fail?
ryanstout has quit [Quit: ryanstout]
dimaursu16 has joined #opal
dleedev has joined #opal
RoxasShadowRS has joined #opal
elia has joined #opal
wmnnd has joined #opal
dimaursu16 has quit [Ping timeout: 245 seconds]
dimaursu16 has joined #opal
RoxasShadow has joined #opal
RoxasShadowRS has quit [Ping timeout: 245 seconds]
RoxasShadow has quit [Quit: Leaving]
RoxasShadowRS has joined #opal
kludge` has quit [Ping timeout: 272 seconds]
kludge` has joined #opal
<adambeynon> elia: how much benefit would you find in being able to call methods on js objects directly?
<adambeynon> and getting/setting properties
<adambeynon> (im thinking opal-jquery being a good example of something that could be removed)
<elia> err, re-reading to understand
<elia> adambeynon, k, :) so what you're scheming?
<adambeynon> elia: a method call would compile without a '$' prefix
<adambeynon> #[] and #[]= would be "special methods"
<elia> adambeynon, anyway having that ability would make things a lot easier
<adambeynon> elia: the only problem I have atm is having nil == null
<adambeynon> I think that is too difficult
<elia> lower the barrier, so even if now I don't feel pressure by not being able to do that seems good idea
<elia> adambeynon, on the other side depends on the details
<elia> adambeynon, what would be the impl?
<adambeynon> elia: well, there are always gotchas :)
<adambeynon> we would have to special case a lot of methods, i.e. ones that might clash on Array.prototype
<adambeynon> Array#push acts differently to Array.prototype.push
<adambeynon> two options: either a runtime helper method for special methods
<adambeynon> or some ugly generated code
<adambeynon> (object.opal_push || object.push).call(object, 1, 2, 3)
<adambeynon> which brings nightmares of the old method_missing days
<elia> ugh, have to think about it
<adambeynon> if it was just 1 or 2 methods, it would be fine, but array has a lot of methods that could clash
wmnnd has quit [Quit: wmnnd]
DouweM has quit [Ping timeout: 246 seconds]
<adambeynon> elia: then again, with all the extra dispatch stuff, I do wonder how much performance it would cost compared to using Native::Object
<adambeynon> and, wrappers have the benefit of having nicer ruby apis..
meh` has joined #opal
<adambeynon> meh`: I have been digging through rspec regarding the async stuff
<adambeynon> I think im going to write a custom runner, and not use rspec built in one
<adambeynon> means we dont have to fight against rspec anymore for async examples
<adambeynon> if I start monkey patching the runner then any small change on their part will break it
<adambeynon> so easier just to copy one from opal-spec
<meh`> adambeynon, fine by me
dleedev has quit [Quit: dleedev]
GitHub126 has joined #opal
<GitHub126> [opal-browser] meh pushed 1 new commit to master:
GitHub126 has left #opal [#opal]
<GitHub126> opal-browser/master 297750b meh: dom/attribute: cleanup code
GitHub125 has joined #opal
<GitHub125> [opal-browser] meh closed pull request #13: Add Attribute#value= (master...attribute_value_setter)
GitHub125 has left #opal [#opal]
<elia> adambeynon, here I am, I was in a call
<elia> adambeynon, maybe we can make the use of native wrappers super smooth
<elia> if they become a no brainer we can achieve the same result
<elia> smoothing means also extensive docs
<meh`> what's the topic?
<elia> meh`, ditching $ from methods
<meh`> isn't that going to break things?
<elia> the issue is with clashing on native methods with the same name
<meh`> and ivars
<elia> elia: well, there are always gotchas :)
<elia> we would have to special case a lot of methods, i.e. ones that might clash on Array.prototype
<elia> Array#push acts differently to Array.prototype.push
<elia> two options: either a runtime helper method for special methods
<elia> or some ugly generated code
<elia> (object.opal_push || object.push).call(object, 1, 2, 3)
<elia> which brings nightmares of the old method_missing days
<elia> cit.
<meh`> I don't think it's worthwhile to remove $
<elia> me too
<elia> and I thinks adambeynon is on the same line
<elia> meh`, my proposal is to smooth out as much as possible the Native experiece (extensive docs, more helper methods)
<meh`> elia, I agree
<meh`> Native is already very functional, except nobody knows about it
<elia> the same goes for native bridging that sometimes makes more sense (Array, String, jQuery, …)
<meh`> how do you mean?
<elia> eg. opal-jquery could become something like: class Element < `$`; expose_native_methods!; end
<elia> +methodmissing
<elia> we need to start writing articles / blog too
<elia> or clone rails guides site
<elia> and make it light blue
<meh`> lol
<elia> also a good idea we can steal is to migrate the ML to stackoverflow
<elia> in light of the fact that the first google result is always from SO
<adambeynon> elia: I completely agree with mailing list => stackoverflow
<elia> adambeynon, ok, so new policy: "reply asking to post on SO"?
<elia> and fix the readme
travis-ci has joined #opal
<travis-ci> [travis-ci] opal/opal-browser#167 (master - 297750b : meh): The build has errored.
<travis-ci> [travis-ci] Build details :
travis-ci has left #opal [#opal]
GitHub191 has joined #opal
<GitHub191> opal-browser/master cba801a meh: spec/runner: cleanup the job order
GitHub191 has left #opal [#opal]
<GitHub191> [opal-browser] meh pushed 2 new commits to master:
<GitHub191> opal-browser/master abed806 meh: dom/attribute: polyfill #id?
GitHub19 has joined #opal
<GitHub19> opal-browser/master dc146cd meh: support: fix Attr.isId check
GitHub19 has left #opal [#opal]
<GitHub19> [opal-browser] meh pushed 1 new commit to master:
GitHub136 has joined #opal
GitHub136 has left #opal [#opal]
<GitHub136> opal-browser/master 6a9c15e meh: spec/runner: try to fix some weird tunnel failures
<GitHub136> [opal-browser] meh pushed 1 new commit to master:
dimaursu16 has quit [Read error: Operation timed out]
travis-ci has joined #opal
<travis-ci> [travis-ci] opal/opal-browser#170 (master - 6a9c15e : meh): The build passed.
<travis-ci> [travis-ci] Build details :
travis-ci has left #opal [#opal]
<adambeynon> module ObservableArray
<adambeynon> class << array
<adambeynon> alias :old_push :<<
<adambeynon> def self.infect(array)
<adambeynon> alias :old_clear :clear
adambeynon has quit [Excess Flood]
adambeynon has joined #opal
<adambeynon> errrrrrrrrrr, oops
dimaursu16 has joined #opal
fkchang has joined #opal
<fkchang> adambeynon: meh` any notions on where source/comments lookups will be, now that I've embedded opal-irb into a lissio app, I have the momentum to add opal-inspector features
<meh`> no clue here
<fkchang> meh`: did I remember right that adambeynon delegated that to you?
<meh`> nope, still on him
DrShoggoth has joined #opal
<elia> adambeynon, <3 infect
<adambeynon> elia: :D since ryanstout posted his react stuff, I have been adding some bits of observable objects/arrays, also inspired by cocoa keyvalueobserving
<adambeynon> elia: I will post it soon
<adambeynon> buts its really slick
<elia> adambeynon, what react stuff?
* elia browses ryanstout gh profile
<adambeynon> elia: yep. Im not using his stuff (didnt have time to learn it), but same idea
<adambeynon> but instead of wrapper objects, you can observe changes to an actual array instance
<adambeynon> [1,2,3, 4].add_observer(:empty?) { puts "array is now empty" }
<adambeynon> that kinda thing
<adambeynon> useful for hooking up dom changes to reflect models
<elia> adambeynon, do you have any pointers, can't find anything among his repos
<adambeynon> elia: <- that is the full framework he is working on
<adambeynon> does server + client
<adambeynon> he also has a handlebars style template language for hooking into the dom
<elia> whoa missed a bunch of stuff!
<elia> awesome name btw
<adambeynon> yeh :) the video he has shows it off really nicely
<adambeynon> trying to find a link now
<adambeynon> hmm, can't find it
<adambeynon> ahh, yeah, thats the one :)
<elia> that's awesome! how did I miss that
<adambeynon> I haven't had a chance to actually use it yet, so hopefully the weekend will let me explore it a little more
<adambeynon> hes american though, so im never around when hes online to ask him about it :/
ryanstout has joined #opal
e_dub has joined #opal
<fkchang> adambeynon: any thoughts on code/comment lookup? I thought there was a gist you wanted to show me a little while back.
<fkchang> I think I'm itching to add some light table inspired goodness into opal-inspector
<adambeynon> fkchang: I scrapped the old stuff - it was very hacky. The compiler now is also much better as it doesnt destroy the old sexp tree
<adambeynon> I think its a better idea to walk that sexp tree instead
<adambeynon> and look for each class, module and def
<adambeynon> each sexp has the line number and source file
<adambeynon> so we can track back from there
<adambeynon> keep a stack of where we are
<adambeynon> each time we enter a module or class
<adambeynon> dynamic methods might be tricky
<adambeynon> but, attr_accessor and friends will be easy to find
<adambeynon> if sexp.type == :call and sexp[1] == :attr_accessor; ... ; end
<adambeynon> I think it would be safe to assume attr_accessor doesnt get overriden
<adambeynon> fkchang: whether or not I can work on a full implementation is a different matter, but I can write a simple proof of concept extension to the compiler which should get you on your way
<adambeynon> you can then take that and work out what is the best json format to export
<adambeynon> fkchang: I am also not sure how you would integrate with Opal::Server and/or rails server and/or lissio server
<adambeynon> I would think basing it on sourcemaps would be a good idea
<adambeynon> i.e. a rack middleware that can be mounted
<adambeynon> like we have /__opal_source_maps/* we could have /__opal_code_inspector/* or something
<fkchang> adambeynon: the rack/ __opal_code_inspector__ seems like a good approach. On the front end, I anticipate "caching" that info, as the stuff you change in the browser would take precedence over what's on the server. By the same measure need a mechanism to push changes back to the server -- in my mind I sort of saw some sort of diff/pull request-ish mechanism that a user could ultimately accept or reject
<fkchang> on the nature "like source maps", isn't source maps almost the same basic notion, i.e. give me opal code for this bit of js, where we'd pass it code "entitye" (i.e. method, inst variable) index instead of at file/line blah
<fkchang> adambeynon: on the browser side, I imagine we'd use the same sexp walking mechanism. Maybe it's easier to work out the client side that will do that on the client side in a rudimentary form, and I can start with that w/the eventuality that it will pull in code from the server down the road, but that'd allow me to have an interface and at least show off functionality w/code written from within the browser
edub has joined #opal
e_dub has quit [Ping timeout: 272 seconds]
dleedev has joined #opal
<fkchang> meh`: dunno if you saw from the other day
elia has quit [Quit: Computer has gone to sleep.]
<ryanstout> fkchang: I have been looking at integrating opal-orb into Volt. I was hoping to make it so you could hit ESC or something to get the console. Is there a good way to load it in after the initial page load?
<ryanstout> fkchang: like I just need the files included from OpalIrbUtils.include_opal_irb_jqconsole_requirements and then load an opal file with required jqconsole, opal_irb_jqconsole_css and opal_irb_jqconsole>
<fkchang> ryanstout: if you look at the lissio intergration, you could probably do the something very similar to those. I can spike a way to default it hidden response to the esc
<ryanstout> fkchang: I mostly just don't want to have to pay the cost of loading opal-parser unless its necessary
<ryanstout> hence wanting to only load it when requested
<fkchang> I tried to make it loadable solely via code, but I could sync the loading of external js (meh` adambeynon this was my question from 2 days ago ) to be right -- it'd be nice to be able to load it all on demand
Kilo`byte has quit [Max SendQ exceeded]
<fkchang> ryanstout: how about bringing up an iframe that loads all that stuff, though I'm not sure that we can see the js engine from the parent widnow
<ryanstout> fkchang: interesting idea, it would be tricky to have to always do `parent`
<ryanstout> `window.parent`
<ryanstout> fkchang: basically though, if I find a way to load all of that after the fact and figure out when its loaded, that would work right?
Kilo`byte has joined #opal
<fkchang> ryanstout: it should work if you can get it loaded
dleedev has quit [Quit: dleedev]
dleedev has joined #opal
dleedev has quit [Client Quit]
<ryanstout> fkchang: cool, thanks for the help
<fkchang> ryanstout: sure
<ryanstout> question, has anyone tested the opal compiler for thread saftey
<ryanstout> I'm seeing a weird issue sometimes when loading two pages at once
<ryanstout> sprockets is returning: throw Error("EOFError: end of file reached")
<ryanstout> in my .js file (which is loading an opal file)
ryanstout has quit [Quit: ryanstout]
ryanstout has joined #opal
edub has quit [Quit: It's a hard knock life]
<meh`> ryanstout, no thread safety
<meh`> javascript is not threaded
<meh`> no wait
<meh`> the compiler
<meh`> disregard everything :D
<ryanstout> meh`: yea, the compiler
<ryanstout> it could be sprockets also
<meh`> from what I remember, it shouldn't be a problem
Steve445 has joined #opal
<Steve445> Meh online?
<Steve445> Meh: online?
<meh`> Steve445, yeah, I'm here
<Steve445> Hey. StepheOTT from github. Just wanted to follow up real quick on my question from Lissio repo
<Steve445> about the lissio new command that is in the read me
<meh`> Steve445, did you install the gem from github?
<Steve445> Yes
<meh`> is it giving any error?
<Steve445> But terminal is not picking it up after install
<meh`> oh, are you sure you have the gem binaries path in your PATH?
<Steve445> mmmm. thats prob it. Was expecting it to be pre-configured
<meh`> Steve445, anyways, two example lissio apps are and
<Steve445> Great will trace a look. Just trying to get lissio new to run
<meh`> Steve445, what OS are you on?
<Steve445> don't know the command changes off top of head. so just looking up how to make the changes
<Steve445> osx
<Steve445> gem is installed but does not get added to the Executable Directory
<meh`> it should be ~/.gem/ruby/2.1.0/bin
ryanstout has quit [Quit: ryanstout]
<adambeynon> Steve445: are you using a ruby manager (rbenv, rvm, etc) or just the system ruby?
<Steve445> rvm
<Steve445> I ran gem build
<Steve445> then gem install
<Steve445> either way, Readme can be updated with some more explicit instructions. I will write something up after figured out
<meh`> that's just the standard ruby way
<Steve445> Ya ya
<Steve445> agreed
ryanstout has joined #opal
Noldorin has joined #opal
DrShoggoth has quit [Quit: Leaving]
Noldorin has quit []
<meh`> adambeynon, any ETA on the Array runtime fixes?
Noldorin has joined #opal
<Steve445> mmm it seems that lissio-0.1.0.beta3.gem was not installing correctly
<ryanstout> has anyone else run into this issue?
<ryanstout> issue #500, ftw :-)
<meh`> Steve445, wait, I know
<meh`> Steve445, or I think I know
<Steve445> I also did not run rake, that may be part of the issue
<Steve445> just noticed the rake file
<meh`> Steve445, I'm a tinfoil hat and I have all my home dir as only usable by the user
<meh`> maybe you installed as root
<meh`> and the user couldn't see the binary
<Steve445> When i looked in thte Ruby gems folder in the ruby dvm folder, the hand rolled gems folders were empty.
<Steve445> I am pretty sure i just forgot a step when hand rolling gems
<meh`> that doesn't sound like it then
<Steve445> going to reinstall
<Steve445> When you planning to do a push to RubyGems?
<meh`> Steve445, when 0.6 for opal is released
<meh`> I could push one, but there's no 0.6 on rubygems, so it would be pretty pointless
<Steve445> timeline?
<Steve445> (just curious)
<meh`> soon™
<meh`> should have been a month or so ago
<Steve445> :)
<Steve445> love the tm
ryanstout has quit [Quit: ryanstout]