e_dub has quit [Ping timeout: 245 seconds]
chap has quit [Quit: bb]
e_dub has joined #opal
fkchang has quit [Ping timeout: 240 seconds]
vwoo has joined #opal
vwoo has quit [Quit: Computer has gone to sleep.]
vwoo has joined #opal
vwoo has quit [Client Quit]
<denysonique> Is it possible to use Opal with an existing js library?
<denysonique> such as Backbone or moment.js?
e_dub has quit [Ping timeout: 264 seconds]
e_dub has joined #opal
<e_dub> denysonique, yes. HOW that is done is in flux at the moment though, and so I'm not sure what the current way to do it is
<e_dub> for a while we had a bridge where "$global" in Opal was equal to "window" or "global" in the js env
<e_dub> dunno if that is still working though
<e_dub> so, in that case, if you wanted to call, say jQuery, you would do, say $global.jQuery('div').css(blahblahblah)
<denysonique> e_dub: thanks
<denysonique> but thins like $global.Backbone.View won't work
<denysonique> things
<denysonique> I cannot access the View property of Backbone
<denysonique> even if I try $global.Backbone::View
<e_dub> hmm i dont know if thats because they have already started removing that to change it, or if its because its flaky (which is part of why its being removed)... lemme see if i can figure out
<e_dub> denysonique, yeah sorry, looks like they have removed that and started changing it in the latest opal. So, what you want is to wrap it with: https://github.com/opal/opal/blob/master/corelib/opal/native.rb
<denysonique> e_dub: thank you
<e_dub> and I'm not sure yet on how that works exactly. I'd just be reading the source code if I was to try to tell you
<e_dub> np
chap has joined #opal
e_dub has quit [Ping timeout: 245 seconds]
chap has quit [Quit: bb]
e_dub has joined #opal
elia has joined #opal
e_dub has quit [Quit: Leaving]
kludge` has quit [Ping timeout: 264 seconds]
kludge` has joined #opal
meh` has joined #opal
jurbat has joined #opal
adambeynon has joined #opal
<meh`> adambeynon, ping
<meh`> adambeynon, https://github.com/opal/opal/issues/334 can you fix this asap please?
<adambeynon> yo yo yo
<adambeynon> yeh, Il take a look in a minute
<adambeynon> strange bug though - I have similar code (-num as a command argument) which works ok
<adambeynon> I also think we need to find a way to merge Native and Native::Object
<adambeynon> the primary difference is method_missing support
<meh`> why merge them?
<meh`> Native is an interface to implement native wrappers
<meh`> Native::Object is a generic native object wrapper
<adambeynon> meh`:
<adambeynon> Opal.Enumerator.$singleton_class()._super
<adambeynon> undefined
<adambeynon> Opal.Enumerator.$singleton_class()._scope
<adambeynon> undefined
<adambeynon> I think thats our problem with Singleton
<meh`> sounds like it
<adambeynon> singleton classes are not getting a superclass or constants scope
<adambeynon> easy fix
<adambeynon> but need tests
<adambeynon> I assume they just keep the constant scope of their "super"
fkchang has joined #opal
<adambeynon> fkchang! just the guy I was looking for
<adambeynon> I was looking at the roadmap for opal-irb
<adambeynon> "Make embeddable in any app"
<adambeynon> I want/need to try and help with that
<adambeynon> got a demo I need to show somebody, and that would be a really nice feature to show client side debugging with a full repl
<adambeynon> meh`: trying to fix that parslet issue now
<meh`> adambeynon, thanks
<meh`> adambeynon, http://sprunge.us/UUJg?rb just look how cool parslet is :D
<meh`> having that in opal would be a killer
<meh`> imho
<meh`> and by in opal I mean working in opal
<meh`> adambeynon, we need a wiki page where we say what common gems work out of the box
elia has quit [Quit: (IRC Client: textualapp.com)]
elia has joined #opal
<adambeynon> meh`: that parser bug is going to take a lot longer than I thought
<adambeynon> we are going to totally need a numeric parsing code
<meh`> oh snap
<meh`> my dreams shattered
<adambeynon> it needs to be fixed
<adambeynon> but its also going to take many hours + lots of coffee
<fkchang> adambeynon: re: embeddable in any app. What I think I was going to do in that regard was something along the following steps
<fkchang> 1) have a method that creates the html elements to attach opal-irb to - something that shows up from the bottom and is open/closeable, right now you pass it the id of a div to run in
<meh`> adambeynon, I understand
<meh`> I'll try with master parslet
<meh`> I think I saw that line was changed
<fkchang> 2) take the inline css and make it a separate file. I was could put that in a file and include it, but I sort of like the idea of the creation method installing that into the dom, so the interface is something like OpalIrbJqconsole.createAtBottom(); which does all the js and css magic
<meh`> adambeynon, lol
<meh`> adambeynon, a different parser bug
<meh`> this one should be easy to fix tho
<fkchang> I'd want sort of the equivalent of Template["blah"].render, but like Css["blah"].render, so I could have a separate css file that my editor can give me css support on, but not have to include it in the html directly
<fkchang> 3) generate the standalone js file that one can include in their app and call the creation method
<fkchang> I think that's it. I have have the step 1 code in opal-inspector already
<fkchang> meh`: I'm late to the party. what's a parselt?
<fkchang> and what's int the lissio module
<meh`> fkchang, lissio is my MVC
<fkchang> is lissio on github?
<meh`> fkchang, yes
<meh`> I think
<meh`> I don't rememebr when I last pushed
<meh`> yeah, it's still in WIP
<meh`> as in, rebases will occur soon :)
<fkchang> curious to look at it. I've been able to build opal-inspector w/o any frameworks thus far - partly coz ruby in the browser is awesome, partly coz I haven't needed framework features, partly coz I haven't been able to figure out how vienna works
<fkchang> was thinking I might do something like FB's react lib for the View part - http://facebook.github.io/react/index.html, it seems to take a similar approach to what I've stared to do
<fkchang> meh`: looks like u pushed 4 days ago
<meh`> fkchang, yeah, I'm just writing what I need for my stuff
<meh`> adambeynon, sorry to bother, what are you working on now?
<adambeynon> bit of everything. working on a "technical demo" of opal for some potential collaborators
<adambeynon> whatever "technical demo" means
<adambeynon> why? whats up?
<meh`> adambeynon, the new parser bug I linked you above
<meh`> that shouldn't take much to fix
<adambeynon> ok, will get it fixed in a bit
<meh`> ok, thanks
<meh`> adambeynon, parser bugs everywhere :(
<meh`> found another inside parslet
<meh`> adambeynon, I think I'll open few issues
<meh`> or just one
<adambeynon> meh`: if they are unrelated, open 1 for each
GitHub173 has joined #opal
<GitHub173> opal/master 617461b Adam Beynon: Fix constant lookups on metaclass of objects
<GitHub173> [opal] adambeynon pushed 1 new commit to master: http://git.io/QS14PQ
GitHub173 has left #opal [#opal]
<adambeynon> easier to keep track of what needs doing then
<meh`> adambeynon, I was keeping them together because they're all related to getting parslet running
elia has quit [Ping timeout: 260 seconds]
<meh`> adambeynon, we don't have nested argument splats, do we?
<meh`> >> proc { |a, (b, c)| [a, b, c] }.call([1, [2, 3]])
<meh`> => [1, 2, 3]
<meh`> something tells me I'll be stuck with lissio for a while :(
<meh`> oh well, I'll go work on opal-browser a bit more
<meh`> hope it won't take weeks tho, I really need this stuff
travis-ci has joined #opal
<travis-ci> [travis-ci] opal/opal#775 (master - 617461b : Adam Beynon): The build passed.
<travis-ci> [travis-ci] Build details : http://travis-ci.org/opal/opal/builds/9656977
travis-ci has left #opal [#opal]
<adambeynon> meh`: we dont have them, no. really wish I had a day I could spend just fixing those sorts of bugs
<adambeynon> sooner we can compile 100% ruby, the faster we can move on
<adambeynon> having to be cautious about what ruby code I write can be a pian
<meh`> adambeynon, any forseeable date for you having time to fix that?
<meh`> or do I have to get dirty and fix them myself? :P
chap has joined #opal
<adambeynon> meh`: I dont know. atm im working 7 days a week, so its only like an hour here, or an hour there
<adambeynon> lol
<adambeynon> well
<adambeynon> try jumping in and see where you end up ;)
<meh`> will do
<adambeynon> parser.rb needs a cleanup
<adambeynon> but lexer.rb should be straighforward
<adambeynon> apart from @lex_state, which can get awkward
<meh`> or I could write a parslet parser :P
<meh`> just kidding
<adambeynon> lol :D
GitHub116 has joined #opal
<GitHub116> opal/master 8cb8dac meh: Add native handling to Struct
GitHub116 has left #opal [#opal]
<GitHub116> [opal] meh pushed 1 new commit to master: http://git.io/_WALQw
travis-ci has joined #opal
travis-ci has left #opal [#opal]
<travis-ci> [travis-ci] Build details : http://travis-ci.org/opal/opal/builds/9658222
<travis-ci> [travis-ci] opal/opal#776 (master - 8cb8dac : meh): The build passed.
<fkchang> adambeynon: what would the easiest way to export opal-irb for something to you to embed? Do I need to make some library that you add as <script src="blah"> on top of the doing the same for opal and opal-jquery - not certain what the non opal-sprockets option is, or just make the classes and assume u will use opal-sprockets and just include the right stuff?
<fkchang> adambeynon: the other thing I was hoping to figure out how to resolve was the other libs I depend on, codemirror and my fork of jqconsole
<fkchang> ideally, if I could have opal-irb smartly determine if they are present to not include them, that would work, or we make the embedder include those things
adambeynon has quit [Ping timeout: 240 seconds]
adambeynon has joined #opal
elia has joined #opal
<fkchang> adambeynon: catch my embeddable questions?
<adambeynon> fkchang: yep, thanks for that. the CSS is an interesting one - some way to embed css like we do wtih erb templates is a thought
GitHub26 has joined #opal
<GitHub26> opal/master d19a7ec Adam Beynon: Fix bug for parsing operators before \n in command calls (#334)
GitHub26 has left #opal [#opal]
<GitHub26> [opal] adambeynon pushed 1 new commit to master: http://git.io/v9N7dQ
<adambeynon> meh`: that should fix one of the bugs (for parsing >> before a new line)
<fkchang> adambeynon: I think I had a 2nd round of questions for you a 1/2 hour ago that might've been missed coz it looks like your irc connection fell asleep, did you get that? It's basically, how do I package opal-irb best for you (or anyone). I'm thinking on counting on opal-sprockets is a lower effort way
travis-ci has joined #opal
<travis-ci> [travis-ci] opal/opal#777 (master - d19a7ec : Adam Beynon): The build passed.
<travis-ci> [travis-ci] Build details : http://travis-ci.org/opal/opal/builds/9659147
travis-ci has left #opal [#opal]
<adambeynon> fkchang: I will have a look at the code and show you how
<adambeynon> the only part im not sure about is how to package the css
<adambeynon> in opal-spec, all the css is inside a ruby file
<adambeynon> but its not a nice way to handle it
elia has quit [Ping timeout: 268 seconds]
chap has quit [Ping timeout: 260 seconds]
<adambeynon> fkchang: Im thinking of perhaps adding some helper, similar to require
<adambeynon> e.g.
<adambeynon> require_css File.expand_path('../my_file.css')
<adambeynon> which would add that content to some CSS object, as you suggested
<fkchang> I'm making an embedded example, I will extract the css file as single file and add the methods to create the collapsable panel, which I think u should be able to use
<adambeynon> similar to the way we have Template[] for erb stuff
<adambeynon> or even, just overload require
<adambeynon> require "my_file.css"
<adambeynon> require "my_template.erb"
elia has joined #opal
<adambeynon> then custom gems, e.g. a haml compiler, can just register how opal should handle it
GitHub102 has joined #opal
<GitHub102> opal/master b05d6d2 Adam Beynon: Add some missing singleton class specs
GitHub102 has left #opal [#opal]
<GitHub102> [opal] adambeynon pushed 1 new commit to master: http://git.io/-Ywraw
travis-ci has joined #opal
<travis-ci> [travis-ci] opal/opal#778 (master - b05d6d2 : Adam Beynon): The build passed.
<travis-ci> [travis-ci] Build details : http://travis-ci.org/opal/opal/builds/9660431
travis-ci has left #opal [#opal]
elia has quit [Quit: Computer has gone to sleep.]
chap has joined #opal
chap has quit [Quit: bb]
<adambeynon> meh`: Singleton is on the way to being fixed
jurbat has quit [Quit: Computer has gone to sleep.]
<adambeynon> we cant use ruby mri implementation as it uses Mutex
<adambeynon> but Im copying it line for line otherwise
<adambeynon> aka ^^
GitHub99 has joined #opal
GitHub99 has left #opal [#opal]
<GitHub99> [opal] adambeynon pushed 1 new commit to master: http://git.io/90OynA
<GitHub99> opal/master 99f51d1 Adam Beynon: Initial fixes for Singleton module
travis-ci has joined #opal
<travis-ci> [travis-ci] opal/opal#779 (master - 99f51d1 : Adam Beynon): The build passed.
<travis-ci> [travis-ci] Build details : http://travis-ci.org/opal/opal/builds/9662600
travis-ci has left #opal [#opal]
<meh`> adambeynon, but my Singleton works
<meh`> what's wrong with it?
<adambeynon> I think the specs depended upon the mri implementation of it
<meh`> oh
<meh`> okay then
<adambeynon> im not sure
<adambeynon> again
<adambeynon> it depends on how many mri specs we aim to pass
<adambeynon> we wont pass them all as im sure there would be a spec for the mutex stuff
<fkchang> adambeynon: I just pushed an embeddable example to opal-irb, hopefully that's enough for you to embed it in your app
<adambeynon> fkchang: awesome, will check it out
<fkchang> index-embeddable.html and examples/app-embeddable.rb
<adambeynon> nice!
<meh`> fkchang, cool stuff
<meh`> adambeynon, oh right, now that I remember
<meh`> I've been having some issues with that spec helper you gave me
<fkchang> thx, if the markup wasn't such a mess I should push opal-inspector to github w/a similar embedded example , though there's a lot to do before I could do that, it's all 1 rb file at the moment
<meh`> I have to change the IDs I use in every spec or so because it's somehow slow in updating the DOM
<meh`> so I get failed tests because it's using the old elements
<meh`> nothing major, but a pain in the ass nontheless
<adambeynon> strange, I havent experienced that
<meh`> I'm using a 5 years old laptop :P
<adambeynon> oh right, sorry, I see what you mean now
<adambeynon> yeah, it does mean ripping the dom out on each spec
<meh`> if there was a way to wait or something it would be enough I think
<meh`> some way to have async before/after
<meh`> and god, these new HTML5 events are awful
<meh`> I have the feeling opal-browser will be the first library to handle events properly
<adambeynon> hope so! :D
<meh`> I saw jQuery's event handling
<meh`> it's awful
<meh`> the creationg/triggering is all wrong
<meh`> probably done for the sake of compatibility
<meh`> but with opal we have a way nicer way to handle that
<meh`> having browser specific files that monkeypatch everything to work
<meh`> so we can default to standards
<meh`> and add fixes incrementally
<meh`> without polluting the logic
DrShoggoth has joined #opal
<adambeynon> yeah, sounds good
vwoo has joined #opal
vwoo has quit [Client Quit]
vwoo has joined #opal
vwoo has quit [Client Quit]
vwoo has joined #opal
vwoo has quit [Client Quit]
vwoo has joined #opal
GitHub124 has joined #opal
<GitHub124> opal/master aa4f272 Adam Beynon: Parse operator calls as normal method calls
GitHub124 has left #opal [#opal]
<GitHub124> [opal] adambeynon pushed 1 new commit to master: http://git.io/Qt582A
travis-ci has joined #opal
travis-ci has left #opal [#opal]
<travis-ci> [travis-ci] Build details : http://travis-ci.org/opal/opal/builds/9665511
<travis-ci> [travis-ci] opal/opal#780 (master - aa4f272 : Adam Beynon): The build passed.
GitHub27 has joined #opal
<GitHub27> [opal] adambeynon pushed 1 new commit to master: http://git.io/BE0Ybg
GitHub27 has left #opal [#opal]
<GitHub27> opal/master 386e98a Adam Beynon: Some cleanup of parser.rb
DrShoggoth has quit [Quit: Leaving]
GitHub189 has joined #opal
<GitHub189> opal/master dae18e2 Adam Beynon: Start documenting some code generator nodes
<GitHub189> [opal] adambeynon pushed 1 new commit to master: http://git.io/1FTPpQ
GitHub189 has left #opal [#opal]
travis-ci has joined #opal
<travis-ci> [travis-ci] opal/opal#782 (master - dae18e2 : Adam Beynon): The build passed.
<travis-ci> [travis-ci] Build details : http://travis-ci.org/opal/opal/builds/9667031
travis-ci has left #opal [#opal]
GitHub185 has joined #opal
<GitHub185> opal/master 617e72e Adam Beynon: Add some more documentation to parser.rb
GitHub185 has left #opal [#opal]
<GitHub185> [opal] adambeynon pushed 1 new commit to master: http://git.io/pASN2w
e_dub has joined #opal
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
travis-ci has joined #opal
<travis-ci> [travis-ci] opal/opal#783 (master - 617e72e : Adam Beynon): The build passed.
travis-ci has left #opal [#opal]
<travis-ci> [travis-ci] Build details : http://travis-ci.org/opal/opal/builds/9667909
adambeynon has joined #opal
elia has joined #opal
adambeynon has quit [Quit: Textual IRC Client: www.textualapp.com]
<fkchang> what do you guys think about adding jsfiddle type features to opal-inspector or as a standalone?
<e_dub> fkchang, like, as a way to save and share small snippets and whatnot with others? sounds pretty awesome. we'll certainly eventually need somewhere for that sort of thing, since its unlikely existing solutions will make it available until opal grows more widespread
<fkchang> save and share snipped we can do already via opal-irb, which I feel is interesting in that I think of that feature as something like a live gist, you can mess/the code in irb, re edit the original, while persisting objects, which is something that none of the jsfiddle type apps can do. I was thinking the ability to mess w/share css and markup too would just level up the experience
<fkchang> opal-inspector inherits the existing capability from opal-irb
_whitelogger has joined #opal
<e_dub> fkchang, yeah ? that's awesome. i agree though, that making it easy to get into the css and markup is a good idea
meh` has quit [Ping timeout: 245 seconds]
elia has quit [Read error: Connection reset by peer]
elia has joined #opal
elia has quit [Read error: Connection reset by peer]
elia has joined #opal
vwoo has quit [Quit: Computer has gone to sleep.]
elia has quit [Quit: (IRC Client: textualapp.com)]
vwoo has joined #opal