adambeynon 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 http://irclog.whitequark.org/opal
eventualbuddha has quit [Ping timeout: 272 seconds]
eventualbuddha has joined #opal
eventualbuddha has quit [Ping timeout: 245 seconds]
e_dub has quit [Quit: It's a hard knock life]
e_dub has joined #opal
GitHub119 has joined #opal
<GitHub119> [opal] meh pushed 13 new commits to master: http://git.io/849ALQ
<GitHub119> opal/master f87c77b meh: Cleanup and compliancy fixes for Time.local
GitHub119 has left #opal [#opal]
<GitHub119> opal/master fac12a8 meh: Define special variables inside the Time class
<GitHub119> opal/master 54c77b0 meh: Cleanup Time.new
travis-ci has joined #opal
travis-ci has left #opal [#opal]
<travis-ci> [travis-ci] Build details : http://travis-ci.org/opal/opal/builds/13134599
<travis-ci> [travis-ci] opal/opal#1282 (master - 72e6f32 : meh): The build passed.
meh` has quit [Ping timeout: 272 seconds]
ryanstout has joined #opal
eventualbuddha has joined #opal
eventualbuddha has quit [Ping timeout: 272 seconds]
eventualbuddha has joined #opal
eventualbuddha has quit [Ping timeout: 245 seconds]
<ryanstout> hello, I may have asked a similar question before, but does anyone know how to go from an opal hash to a normal javascript object?
ryanstout has quit [Quit: ryanstout]
ryanstout has joined #opal
ryanstout has quit [Quit: ryanstout]
ryanstout has joined #opal
ryanstout has quit [Client Quit]
GitHub40 has joined #opal
<GitHub40> opal/master e292b33 Adam Beynon: Add Time.parse() back for now
GitHub40 has left #opal [#opal]
<GitHub40> [opal] adambeynon pushed 1 new commit to master: http://git.io/uI2jUw
adambeynon has joined #opal
travis-ci has joined #opal
<travis-ci> [travis-ci] Build details : http://travis-ci.org/opal/opal/builds/13141253
travis-ci has left #opal [#opal]
<travis-ci> [travis-ci] opal/opal#1283 (master - e292b33 : Adam Beynon): The build passed.
adambeynon has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
adambeynon has joined #opal
elia has joined #opal
GitHub31 has joined #opal
<GitHub31> [opal-rspec] adambeynon pushed 1 new commit to master: http://git.io/W7KpxQ
GitHub31 has left #opal [#opal]
<GitHub31> opal-rspec/master e4d9f76 Adam Beynon: Add basic specs for respond_to, match and == matchers
kludge` has quit [Ping timeout: 245 seconds]
kludge` has joined #opal
GitHub129 has joined #opal
<GitHub129> [opal] adambeynon pushed 1 new commit to master: http://git.io/2oErsg
<GitHub129> opal/master a946edc Adam Beynon: Fix for Time#- not returning when given a time
GitHub129 has left #opal [#opal]
travis-ci has joined #opal
<travis-ci> [travis-ci] Build details : http://travis-ci.org/opal/opal/builds/13145483
<travis-ci> [travis-ci] opal/opal#1284 (master - a946edc : Adam Beynon): The build passed.
travis-ci has left #opal [#opal]
DouweM has quit [Ping timeout: 272 seconds]
elia has quit [Quit: Computer has gone to sleep.]
elia has joined #opal
[spoiler] has joined #opal
gawaine has joined #opal
gawaine has quit [Quit: Leaving]
gawaine has joined #opal
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
GitHub122 has joined #opal
<GitHub122> [opal-sprockets] adambeynon pushed 1 new commit to master: http://git.io/v3kHaQ
GitHub122 has left #opal [#opal]
<GitHub122> opal-sprockets/master aae051b Adam Beynon: Add basic running instructions to README
travis-ci has joined #opal
travis-ci has left #opal [#opal]
<travis-ci> [travis-ci] opal/opal-sprockets#8 (master - aae051b : Adam Beynon): The build passed.
<travis-ci> [travis-ci] Build details : http://travis-ci.org/opal/opal-sprockets/builds/13149289
adambeynon has joined #opal
DouweM has joined #opal
[spoiler] has quit [Ping timeout: 248 seconds]
meh` has joined #opal
<meh`> adambeynon, yo
<adambeynon> morning!
GitHub17 has joined #opal
GitHub17 has left #opal [#opal]
<GitHub17> opal-sprockets/master e1cdd73 Adam Beynon: Add info on require
<GitHub17> [opal-sprockets] adambeynon pushed 1 new commit to master: http://git.io/VaWDvQ
<meh`> adambeynon, the Time.parse code is wrong
<meh`> it should return a new date, not the epoch
travis-ci has joined #opal
<travis-ci> [travis-ci] opal/opal-sprockets#9 (master - e1cdd73 : Adam Beynon): The build passed.
<travis-ci> [travis-ci] Build details : http://travis-ci.org/opal/opal-sprockets/builds/13150492
travis-ci has left #opal [#opal]
GitHub7 has joined #opal
<GitHub7> opal/master f22ee6b meh: Move Date.parse to the stdlib section and make it compliant
<GitHub7> [opal] meh pushed 1 new commit to master: http://git.io/zHaYRA
GitHub7 has left #opal [#opal]
travis-ci has joined #opal
<travis-ci> [travis-ci] Build details : http://travis-ci.org/opal/opal/builds/13150967
travis-ci has left #opal [#opal]
<travis-ci> [travis-ci] opal/opal#1285 (master - f22ee6b : meh): The build passed.
<meh`> adambeynon, did you stop using the #as_json's ?
<adambeynon> not yet
<meh`> adambeynon, are you using Time.parse correctly?
<meh`> because it shouldn't return an epoch
<meh`> and I fixed it to be compliant
GitHub178 has joined #opal
GitHub178 has left #opal [#opal]
<GitHub178> opal/master 7c7a6e4 meh: Cleanup Boolean#to_json
<GitHub178> opal/master b5a3240 meh: Cleanup special calls in JSON
<GitHub178> [opal] meh pushed 5 new commits to master: http://git.io/lxcxHg
<GitHub178> opal/master f628680 meh: Cleanup Array#to_json
<meh`> also Time#to_json was wrong, so if you're using it before, it's gonna return the right thing now
travis-ci has joined #opal
<travis-ci> [travis-ci] opal/opal#1286 (master - d46fe15 : meh): The build passed.
<travis-ci> [travis-ci] Build details : http://travis-ci.org/opal/opal/builds/13151283
travis-ci has left #opal [#opal]
GitHub148 has joined #opal
<GitHub148> opal/master 9312d8f Adam Beynon: Move stub files from stdlib
<GitHub148> [opal] adambeynon pushed 1 new commit to master: http://git.io/5sWryA
GitHub148 has left #opal [#opal]
travis-ci has joined #opal
travis-ci has left #opal [#opal]
<travis-ci> [travis-ci] opal/opal#1287 (master - 9312d8f : Adam Beynon): The build passed.
<travis-ci> [travis-ci] Build details : http://travis-ci.org/opal/opal/builds/13151594
elia has quit [Quit: (IRC Client: textualapp.com)]
GitHub110 has joined #opal
<GitHub110> [opal-sprockets] adambeynon pushed 1 new commit to master: http://git.io/rZaB6Q
GitHub110 has left #opal [#opal]
<GitHub110> opal-sprockets/master a1e149d Adam Beynon: Allow certain assets to be stubbed
GitHub18 has joined #opal
<GitHub18> opal/master 6d25a78 Adam Beynon: Stub out required stdlib files using Opal::Processor
<GitHub18> [opal] adambeynon pushed 1 new commit to master: http://git.io/xgrdbQ
GitHub18 has left #opal [#opal]
GitHub67 has joined #opal
GitHub67 has left #opal [#opal]
<GitHub67> opal-rspec/master 7bba990 Adam Beynon: Stub some required stdlib files using Opal::Processor
<GitHub67> [opal-rspec] adambeynon pushed 1 new commit to master: http://git.io/u0XFfg
travis-ci has joined #opal
<travis-ci> [travis-ci] opal/opal#1288 (master - 6d25a78 : Adam Beynon): The build passed.
<travis-ci> [travis-ci] Build details : http://travis-ci.org/opal/opal/builds/13152591
travis-ci has left #opal [#opal]
elia has joined #opal
<meh`> adambeynon, do if's ever get wrapped in functions?
freck has joined #opal
<freck> hello everyone, I'm pretty new to using opal and jquery (i dont know javascript or jquery very well) and I'm trying to figure out how to use the .html() function jquery implements. When I write element.html('string') in ruby it compiles to $html('string') in javascript which does not work because of the dollar sign, it does work without the dollar sign. What do i need to write in ruby in order to compile to javascript without the
<meh`> freck, are you using opal-jquery?
<meh`> Opal compiles Ruby to its own thing, it's not a seamless bridge between Ruby and JavaScript
<meh`> you can either wrap the objects in a native Native(`js stuff`)
<meh`> or use opal-jquery that does the bridging itself
<freck> ok, yeah i am using opal-jquery though, sorry i forgot to mention that
<meh`> how are you accessing the element?
<freck> so while using opal-jquery how do i access the .html() function? other functions like find are working without an issue
<freck> Element.find('div.demo-container').html('something')
<meh`> elia, ^
<meh`> freck, I use opal-browser instead of opal-jquery, so I don't know much about it
<freck> ok, it seems to be that by default Element.find('div.demo-container').html('something') compiles to …..$find("div.demo-container").$html("something"); when really i need …..$find("div.demo-container").html("something"); basically no dollar sign
<meh`> freck, that's normal
<freck> yeah,
<elia> freck, it's done in a more rubyish way
<elia> Element.find('div.demo-container').html = 'something'
<freck> ohh ok yes this makes sense
<freck> i really appreciate it
<freck> wow this is exactly what i was looking for! still learning where to find these things…. great!
<elia> freck, you're welcome :)
freck has left #opal [#opal]
freck has joined #opal
freck has quit [Remote host closed the connection]
freck has joined #opal
freck has quit [Remote host closed the connection]
freck has joined #opal
freck has quit [Client Quit]
freck has joined #opal
freck has quit [Remote host closed the connection]
elia has quit [Quit: Computer has gone to sleep.]
freck has joined #opal
freck has left #opal [#opal]
freck has joined #opal
freck has quit [Client Quit]
freck has joined #opal
freck has quit [Remote host closed the connection]
GitHub54 has joined #opal
GitHub54 has left #opal [#opal]
<GitHub54> [opal] meh pushed 1 new commit to master: http://git.io/22zVKA
<GitHub54> opal/master 365aed5 meh: Implement Enumerable#slice_before
travis-ci has joined #opal
<travis-ci> [travis-ci] opal/opal#1289 (master - 365aed5 : meh): The build passed.
travis-ci has left #opal [#opal]
<travis-ci> [travis-ci] Build details : http://travis-ci.org/opal/opal/builds/13155950
<adambeynon> meh`: yeah, if does get wrapped when used as an expression
<meh`> adambeynon, does next work properly inside it?
<adambeynon> not if it gets wrapped, no
<meh`> can it be fixed?
<meh`> I think I'm hitting that bug
<adambeynon> meh`: not sure - haven't tried to fix it before
<meh`> well, it could just act like break
<meh`> it's in the same family
<adambeynon> for blocks, a try/catch would be needed just inside the function body, I think
<adambeynon> and just inside the while() body for while/until
elia has joined #opal
<adambeynon> opal-rspec> bundle exec rake sizes
<adambeynon> development: 948464, minified: 519677
<adambeynon> rspec is hugee
<adambeynon> 500kb minified
<meh`> yeah
<meh`> adambeynon, do we have char in the list of reserved words?
<meh`> a guy I know said the closure compiler was whining about it
<meh`> but it probably comes from its usage in string.rb
<meh`> I'll fix it later
<adambeynon> no, doesnt look like we do
<meh`> yeah, add it, it's reserved
<meh`> I was reading eloquent javascript for shits and giggles earlier and it mentioned it
<meh`> adambeynon, there were many more warnings with the closure compiler by the way
<meh`> adambeynon, you might want to run it on the corelib to see where the compiler can be improved
<meh`> most warnings were about never reached code
<meh`> possibly the `return nil` we always add at the end
<adambeynon> meh`: is there anything else you wanted in opal 0.4.5 before I publish a release?
<meh`> adambeynon, the super fixes? :)
<meh`> and I'm still cleaning
<meh`> most is done
<meh`> but the cleaning can wait, I use master anyway
<meh`> but I'd really like the 3 super bugs I reported to be fixed
<adambeynon> meh`: not sure if im going to be able to get around to those anytime soon
<meh`> :(
<adambeynon> they probably require a big super() rewrite
<meh`> I see
<meh`> what about the escape disabling on %x and ``?
<meh`> too early?
<meh`> adambeynon, you can bump whenever by me
<meh`> I think it's better to keep those changes for the next
<meh`> runtime cleanup, super fixes, and completed corelib cleanup
<meh`> adambeynon, oh, but wait
<meh`> let me commit the leftover time.rb cleanups
<adambeynon> meh`: before I release, I do need to find a way to dynamically pick the runtime - I have a fork of runtime.js that Im now using in all my apps
<adambeynon> classes as functions
<meh`> I see
<adambeynon> although, there would need to be changes to class.rb and module.rb as well
<adambeynon> so its all kinda tricky
<meh`> what's the advantage of classes as functions?
<adambeynon> cleaner runtime, basically
<adambeynon> .prototype
<adambeynon> instead of lots of ._proto bits n bobs
<meh`> I see
<meh`> what are the downsides?
<adambeynon> no method_missing on classes/modules
<meh`> ah
<meh`> but that's important :(
<adambeynon> I appreciate that, which is why there should be a way to choose which you would prefer
<adambeynon> but for me, I dont need method_missing at a class level
<adambeynon> and dont really use method_missing in production either
[spoiler] has joined #opal
<meh`> I repropose having an opal/lean
<meh`> for that kind of need
<meh`> instead of making maintaining opal even harder
GitHub99 has joined #opal
<GitHub99> opal/master 99ef436 meh: Cleanup Time#inspect
GitHub99 has left #opal [#opal]
<GitHub99> [opal] meh pushed 17 new commits to master: http://git.io/lPe46Q
<GitHub99> opal/master 9ea8c6c meh: Cleanup Time#friday?
<GitHub99> opal/master 1051199 meh: Cleanup Time#hour
<adambeynon> meh`: yeah, but at the same time, I dont really have an interest in maintaining code I dont want/use/support there
fkchang has joined #opal
elia has quit [Quit: Computer has gone to sleep.]
elia has joined #opal
<meh`> adambeynon, the thing is, I think compliancy should be the most pressing concern for Opal, and we shouldn't add complexity to the main repo for the sake of either one of us
<meh`> adambeynon, but if it's just a flag that gives it a different path for the runtime, I have nothing against it
<meh`> I just don't want to start seeing different versions of everything to accomodate the needs of one
travis-ci has joined #opal
<travis-ci> [travis-ci] opal/opal#1290 (master - 7a1e0a7 : meh): The build passed.
<travis-ci> [travis-ci] Build details : http://travis-ci.org/opal/opal/builds/13158007
travis-ci has left #opal [#opal]
<adambeynon> meh`: but my aims for opal wern't to aim for 100% compliancy, they are to make a ruby-ish runtime in javascript. and loosing method_missing support at a class level is an acceptable trade off for me
<meh`> adambeynon, doing that you lose a lot of DSL capabilities
<meh`> and if your reason is "I don't use method_missing anyway" it doesn't sound like a good argument to me
<meh`> what I'm saying is, what's the huge upside that makes it worth not having method missing on classes and modules?
<meh`> Opal should be as close to Ruby as possible, if it's not Ruby and we don't have real limitations to implement such features, we need a good explanation for it
<meh`> as in, why would people want to use Opal?
<meh`> in my opinion the biggest selling point of Opal is "this is Ruby, on the browser"
DrShoggoth has joined #opal
eventualbuddha has joined #opal
<e_dub> The thing about opal that most impressed me was how compliant it was. My question is, is it really important that the javascript be clean? Opal code is never gonna compile to javascript as clean as as something like the javascript coffeescript produces, the semantics are just too different. Personally, I think focusing on making debugging it via source maps and being able to use javascript debugging tools really really good, and NOT have to
<e_dub> ever , or almost never , look at the javascript. Treat that stuff like assembly, it's super low level and if you are messing around in it, you know what you are doing anyways.
<e_dub> just my opinion. I don't have any problem with being able to turn various features on and off though, whatever someone's reasons are
<meh`> e_dub, I think code tidyness is very important in debug mode, no matter how advanced our debugging tools can be, you'll always end up reading the javascript code
<meh`> e_dub, but that can be easily achieved with helpers like $yield, $if, and others
<meh`> but as I said, I think compliancy should be the major priority for Opal
<meh`> if it's not Ruby, there's no point in using it
<fkchang> I came into this in the middle, so I don't know what technical issue is being discussed exactly, but I would have to say the appeal of Opal is that it's ruby in the browser.
<meh`> fkchang, the gist of what I understood adam wants to do, is removing method missing support from classes/modules
<meh`> but I use it in lissio
<meh`> but he didn't make what his plans are very clear
<fkchang> meh`: probably coz something is ugly or hard, I'm sure. If knew that sort of stuff, I'd be happy to help
<meh`> fkchang, ugly most likely, but if it makes method_missing work on class and module it's a worth downside
elia has quit [Ping timeout: 245 seconds]
<meh`> adn I think with that change it would be impossible to do the Array inheritance trick
<fkchang> not that it should influence adam, but I have a bullet in my preso that there is an opal goal of 100% rubyspec compliance, coz I thought that was the idea. I'll just need to change that
<meh`> I thought that was the idea too
<meh`> fkchang, wait for adam first
<meh`> maybe we'll convince him :D
<fkchang> I suppose implementing would convince him
<meh`> fkchang, but anyway, 100% rubyspec is impossible to achieve
<meh`> some things just cannot be implemented in js
<meh`> but I think a good 90% can be achieved
<meh`> in the past week I've done A LOT of work toward compliancy
<meh`> in the corelib mostly
<brixen> meh`: we already have the with_feature :stuff guard
<fkchang> I think "striving for 100%" is a good thing to publicize, if it's true
<brixen> meh`: so please let me know what things can't be supported so we can properly wrap them in features
<brixen> fkchang: even MRI isn't "100%" because eg no fork() on Windows
<meh`> brixen, wait a sec, I'll link the filters to you
<brixen> it's more a matter of compliance with a set of features
<meh`> the array_sublcasses will be supported soon tho
<meh`> I've written a patch that makes it work
<meh`> but trusted, tainted and frozen are impossible
<brixen> meh`: ah ok, that's the first I looked at and was like... :)
<brixen> meh`: yay :)
<brixen> to both :)
<meh`> then there's the mutable string issue, I'm going to work on that too
<meh`> but it cannot be achieved fully, for speed reasons
<brixen> if you want my opinion, just go full immutable String
<brixen> you already have a proper segment of the Ruby market and immutable String is a good thing
<brixen> Rubinius X will have immutable String, too
<meh`> then I'll just work on String inheritance
<meh`> we use StringIO for mutable stuff anyway
<brixen> we had to make what, one change to mspec for immutable String?
<meh`> brixen, there are other usages in rubyspec
<brixen> in the specs themselves, right?
<meh`> yes
<brixen> yeah, those are coincidental
<brixen> they can be removed
<brixen> we can even wrap the relevant String specs in with_feature :mutable_string
<brixen> happy to merge a PR with that addition :)
<meh`> oh also we can't support encoding fully
<brixen> yeah, again, I don't think that's a big issue
<brixen> MRI's encoding system is completely bonkers
<brixen> more pressure to make it saner is a good thing
<brixen> honestly, after many years of doing this, the last thing you should be worried about is "people won't use Opal because we don't have X"
<brixen> it's total bullshit fear talking, I've been there :)
<brixen> make what you can offer really good and people will use it
<brixen> but don't take my word for it, look at RubyMotion
<meh`> well, I think method missing on class and module is kind of important
<meh`> also the array subclassing
<brixen> probably a lot more than encoding or mutable String for sure
<meh`> with classes as js functions I think there's no way to make it work
shurizzle has quit [Quit: bye.]
elia has joined #opal
<meh`> nice, firefox doesn't handle date parsing like chrome
gawaine has quit [Quit: This computer has gone to sleep]
<adambeynon> meh`: work like chrome? why that would make things too simple wouldnt it ;)
<adambeynon> so, yes, method_missing on classes is fine. I will look at other ways to clean up runtime
<meh`> \o/
<meh`> thanks
<meh`> adambeynon, are you fine if we merge the array-subclass shim after the release?
<meh`> doesn't sound like a good idea to do it before
GitHub172 has joined #opal
<GitHub172> opal/master e32fd7e meh: Use ISO8601 in Time#to_json
GitHub172 has left #opal [#opal]
<GitHub172> [opal] meh pushed 1 new commit to master: http://git.io/Qwyyjg
<adambeynon> meh`: if it is working, I say merge it now - aslong as we can enable a lot of specs that should now work with it
<adambeynon> meh`:
<adambeynon> actually
<adambeynon> I had a thought about it
<adambeynon> (let me just find the code a sec)
<adambeynon> ah yes
<adambeynon> Array::Wrapper
<adambeynon> should we inherit from BasicObject
<adambeynon> otherwise any Object/Kernel method that Array overrides will be lost
<adambeynon> I noticed you had to override #==
<adambeynon> then method_missing will handle the rest
<meh`> adambeynon, you're right
<meh`> I'm doing it
<meh`> and enabling the disabled spec
<meh`> and ensure it all passes
<meh`> and merge it
<adambeynon> awesome. I realised eql? would be another method that didnt work, but yeah
<meh`> adambeynon, also
<meh`> BasicObject is inconsistent from MRI
<meh`> or not
<meh`> or yes
<meh`> yes
<meh`> adambeynon, constants are accessible withuot being toplevel constants
travis-ci has joined #opal
<travis-ci> [travis-ci] opal/opal#1291 (master - e32fd7e : meh): The build passed.
travis-ci has left #opal [#opal]
<travis-ci> [travis-ci] Build details : http://travis-ci.org/opal/opal/builds/13164713
<adambeynon> meh`: ok, will look into that
<adambeynon> I think we alias the scope betwene Object and BasicObject
<adambeynon> can be fixed though
<adambeynon> fkchang: how is the rubyconf presentation going? I havent had time to look at the methods/json stuff yet, sorry
<meh`> fkchang, a remainder of things you should publicize, Enumerable is almost fully implement and all relevant specs pass, only few methods are missing and I'll finish those by next week probably
<meh`> fkchang, also Opal supports coercion now
<meh`> fkchang, and my demo app is almost done
<adambeynon> and we can run rspec with only 10 1-liner modifications
<adambeynon> should be 3 by next week
<adambeynon> once heredocs stop ruining my evenings
<meh`> lol
GitHub52 has joined #opal
GitHub52 has left #opal [#opal]
<GitHub52> opal/master ef6ec53 Adam Beynon: Add 'char' as a reserved javascript keyword
<GitHub52> [opal] adambeynon pushed 1 new commit to master: http://git.io/fFVAyQ
<meh`> adambeynon, did anything change in the runtime?
<meh`> oh oh
elia has quit [Quit: Computer has gone to sleep.]
<meh`> adambeynon, it didn't, but with BasicObject the proto magic doesn't work
<meh`> any clue?
elia has joined #opal
<adambeynon> thats...really odd
<adambeynon> erm
<adambeynon> ahh
<adambeynon> well
<adambeynon> actually, no it shouldnt matter
<meh`> wait
<meh`> I know
<fkchang> adambeynon: rubyconf preso pretty decent. I did a dry run for ocruby with probably 80+% of the content I intend on having. I could use a proofread/any things you guys want to publicize.
<meh`> adambeynon, does BasicObject have a different allocate?
<meh`> because I'm using it
<adambeynon> meh`: nope, same allocate for all classes
<fkchang> adambeynon: oh, and corrections/additions to any facts too
<meh`> adambeynon, http://sprunge.us/DRCF the diff if you want to try
<adambeynon> I'll have a look around
<meh`> if you remove < BasicObject, it works
<adambeynon> fkchang: sure thing, send it over, or link it to me, and I will read through it :)
travis-ci has joined #opal
<travis-ci> [travis-ci] opal/opal#1292 (master - ef6ec53 : Adam Beynon): The build passed.
<travis-ci> [travis-ci] Build details : http://travis-ci.org/opal/opal/builds/13165521
travis-ci has left #opal [#opal]
<adambeynon> meh`: do you get consistent error messages with it?
<meh`> adambeynon, the thing is, there are no errors :D
<meh`> but the class is wrong
gawaine has joined #opal
<meh`> it says the class is Array
<adambeynon> ahhh
<adambeynon> yes
<adambeynon> because BasicObject doesnt have #class
<meh`> oh
<meh`> hue
<adambeynon> it is getting sent to the literal
<meh`> ok, that's easy
<adambeynon> lolz
<fkchang> adambeynon: you have keynote?
gawaine has quit [Client Quit]
<adambeynon> fkchang: of course, or what is left of it after they upgraded it last week
<fkchang> meh`: elia can u shoot me an email address?
<meh`> fkchang, sent as a notice
<fkchang> hmm, I think erc doesn't support that
<meh`> lol
<meh`> fkchang, well, check my github
<meh`> it's the same
<elia> elia@schito.me
<fkchang> ok, got it
elia has quit [Quit: (IRC Client: textualapp.com)]
<fkchang> meh`: is linux though, should I export a pdf then
<meh`> fkchang, what format is it?
<fkchang> keynote. Though so you miss all the multimedia and effects, though I probably won't attach all that anyways
<fkchang> pdf looks good
<meh`> yes, thanks
<fkchang> arg, pdf too big for an attachment
<meh`> lol
<meh`> technology
<adambeynon> dropbox share maybe?
<adambeynon> ..if you have dropbox/similar
<fkchang> gzip to the rescue
DrShoggoth has quit [Remote host closed the connection]
<fkchang> ok, "you got mail.."
<fkchang> and however long it takes to transfer an 25MB attachment
<fkchang> elia: ought to love the 1st 3 multimedia things
<fkchang> meh`: your email system bounced my email, file too bog
<fkchang> big
<fkchang> I guess dropbox
<meh`> fkchang, yeah, I guess autistici.org doesn't like it
<fkchang> ok, email w/dropbox
<adambeynon> fkchang: im only 4 minutes in, and it is awesome :D
<fkchang> adambeynon: thx, though I realize the 1st 2 min are the 1st video
<meh`> fkchang, by the way there's also Element#append_to
<meh`> DOM { }.append_to $document.body
<meh`> fkchang, also inner_dom, it takes the same DOM builder and replaces the inside of the element with the resulting built DOM
<meh`> $document.body.inner_dom { builder stuff }
<meh`> fkchang, typo, persistent rpal objects
<meh`> page I have no clue
<meh`> OPAL-INSPECTOR is the title
<meh`> adambeynon, ping
<adambeynon> hi meh`
<adambeynon> fkchang: just finished the video and slides, looking really good
<meh`> is there any way to load the specs in an opal-repl instance?
<meh`> I'm getting a failing spec I have no clue why it's failing
<adambeynon> anything you need for opal-irb/opal-inspector demos, just give me a nudge
<meh`> it "returns an Array or a subclass instance" do
<meh`> [].send(@method).should be_an_instance_of(Array)
<meh`> end
<meh`> ArraySpecs::MyArray[1, 2].send(@method).should be_an_instance_of(ArraySpecs::MyArray)
<meh`> oh
<meh`> wait
<meh`> disregard that
<meh`> I was testing for the wrong thing
<meh`> ◕ ◡ ◔
<adambeynon> meh`: lolz
<meh`> no ok, it's still failing
<meh`> but now I have no clue why
<meh`> (again)
<meh`> adambeynon, is there a reason for #is_a? to reimplement Module#=== ?
<meh`> *Kernel#is_a?
<adambeynon> meh`: it is possible for a class to override #=== I suppose
<meh`> right
<meh`> best way to use Kernel#is_a? in a BasicObject?
<meh`> without killing myself
<meh`> adambeynon, I think it's a bad idea to use BasicObject
<meh`> or not
<meh`> but it's creating more problems than not
<meh`> ◕ ◡ ◔
<adambeynon> well, we dotn have to use BasicObject, but, we need to make sure that we reimplement every important method that array overrides
<adambeynon> ==, eql
<adambeynon> etc
<adambeynon> <=>
<meh`> yeah, that's true
<adambeynon> dup, clone
<meh`> I think with #is_a? all is done
<meh`> thoughts on how to tackle it?
<meh`> using `klass === self` doesn't work
<meh`> something tells me we should have an Opal.is_a?
<meh`> and use it in both, and here too
<adambeynon> it uses a while loop which would be quite awkward to inline
<adambeynon> as it is only 1 case though
<meh`> adambeynon, I'm not thinking about inlining here
<meh`> adambeynon, it's in 3 places
<meh`> Kernel, Module, and Array::Wrapper
<meh`> and it will be in String::Wrapper too
<meh`> but it won't work
<meh`> maybe an helper in the runtime rather than an inlined
<fkchang> meh`: opal inspector are talking to slides, of how it's basically insipred by smalltalk's class/object browser. Rpal objects, is an artifact of the starwars font I'm using, Capital O looks like an R type character
<meh`> fkchang, oooh
<meh`> fkchang, makes sense
<meh`> adambeynon, is Opal.to_ary used anywhere?
<meh`> I can't find it
<adambeynon> meh`: compiled code uses it
<meh`> oh
<adambeynon> for masgn
<meh`> oooh
<fkchang> adambeynon: Yeah, so any additional facts/selling points are appreciated, or corrections, if my interpretation is wrong. I have you as having 3 apps in production, but all private
<adambeynon> a, b, c = d
<meh`> ok
<adambeynon> tod = to_ary(d)
<fkchang> meh`: 's app is the "coming soon" video, as far as I can tell
<fkchang> adambeynon: also percentage of rubyspecs passing could be a good metric
<adambeynon> fkchang: sure.. by then we should have lots more rubyspecs
<adambeynon> and opal-rspec will be finished/released
<fkchang> adambeynon: if you ever get around to being able to provide a basic lookup code for method for precomipled and live, I would add that feature and demonstrate, finding a method, changing the code in the browser, demonstrating the changed code, etc. to give a better feel of development in the browser
<adambeynon> seems a good target date for our new release @meh`
<meh`> adambeynon, yeah
<adambeynon> fkchang: how complete is opal-irb
<meh`> we'll have inheritable Array and String by then
<meh`> lol
<meh`> fucking aliases
<meh`> I just did this all for nothing
<meh`> kind_of? was still referring to the Array is_a
<meh`> but I still think the opal runtime helper for is_a DRYs it up
<fkchang> Also the whole section "doing things the ruby way", I wanted to have a bunch of JS : cubmersome way, Ruby and Opal, really awesome way. I only did it w/the modules, but I wanted to have a bunch of those using the the vader, yoda, luke backgrounds. In general I want to strengthen the JS == evil empire, Opal == jedi/rebel alliance
<adambeynon> meh`: in fairness, I think a lot of Module belongs in the runtime
<adambeynon> fkchang: a comparison of our todomvc vs. backbone might be nice
<adambeynon> to show off the different coding styles
<adambeynon> we could even push it more towards emphasizing ruby nice-ness
<adambeynon> and erb templates..
<adambeynon> backbone todomvc uses a lot of underscore, so a comparison perhaps of underscore vs. Enumerable
<fkchang> adambeynon: opal-irb is has most of the features I want in the near future, I wanted to get the live code editing on opal-inspector going before I went back and added more to opal-irb. I'll note, some weird behavior for codemirror wrt 'd' and 'e' going to the beginning of line has been introduced since I upgraded opal-irb to point to head instead of 0.4.4
<meh`> adambeynon, agree
<fkchang> adambeynon: I'd do a backbone vs vienna comparison, except I still don't know how to use vienna
<adambeynon> or meh` is doing a lissio demo app
<adambeynon> that would do
<meh`> I am, but it's not a todo app because that sounded boring
<fkchang> meh`: has given a few sprunge gists that look really good for lissio. I was thinking of putting sample lissio code for future (coz I like the define a component in 1 place thing he's doing), and that gist where you wrote the opal code on the ruby side, which is sort of meteor like
<fkchang> I'd like to get enough savvy to do lissio or vienna stuff live, though I do need to cap it at 40 min, so maybe I'll do only canned coding
<meh`> adambeynon, also, I think we should name all the runtime methods with $
<fkchang> The current presentation is about 40 w/o a bunch of additions, so I'll be trimming stuff, I think I'll drastically cut short the code review of opal-inspector
<meh`> adambeynon, we can't use certain names anyway
<fkchang> meh`: u should watch the video when u get a chance, might clear up some stuff.
<adambeynon> fkchang, meh` : I've got to go, be back later
<meh`> fkchang, where can I find it?
<adambeynon> will have a think about the json/methods for opal-inspector..
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<fkchang> if any of you guys has a good code example that u'd want me to show, I'd gladly take it. I'm loathe to research the js way of doing a bunch of stuff
<fkchang> meh`: I realize the email that had the link bounced coz of the attachment, I'll send it
<meh`> fkchang, thanks
<meh`> fkchang, also I think anything that has to do with Enumerable and Enumerator would be nice
<fkchang> meh`: u got mail..
<meh`> except I now realize the fibonacci example wouldn't work
<meh`> we don't play well with infinite enumerators
<fkchang> meh`: is inner_dom new?
<meh`> fkchang, yes, quite recent
<meh`> needed it in lissio and it seemed like a good idea
<meh`> there's inner_text, inner_html and inner_dom
eventualbuddha has quit [Ping timeout: 248 seconds]
<fkchang> makes sense, not in my most recently compiled version of opal-irb, though inner_text and inner_html are
<fkchang> yah, my codemirror went away w/a bundle update
<fkchang> though unnerving too
urizen has joined #opal
<urizen> quick question about the opal project
<meh`> ask away
<urizen> how mature is the project? is it considered too early for use in production projects?
<meh`> urizen, it's used in production in some important places
<urizen> ok cool
<urizen> it currently doesnt support all of ruby, right? things like eval?
<meh`> eval is supported
<meh`> but you have to include opal-parser.js in the page
<urizen> i see
<meh`> which happens to be bigger than opal itself when compiled
<meh`> so I'd suggest not using it in production
<urizen> ok thanks
<urizen> how much of the ruby language is supported with opal-parser included?
<urizen> all of it?
<meh`> opal-parser only adds eval support
<meh`> the only things we can't support are taint, freeze, mutable strings and encodings
<meh`> urizen, https://github.com/meh/shekels have a look at that code, it's opal
<urizen> are those planned to be supported in the future or are there technical reasons whey they cant be supported?
<meh`> and it uses a lot of magic
<meh`> urizen, for technical reasons we can't support them
<meh`> mostly performance related
<meh`> except encodings, those are basically impossible with javascript strings
<meh`> since they're UCS-2 by default, and you can't do anything about it
<urizen> very interesting. If i wanted to learn more about these limitations are there any resources available talking about the limitations?
<urizen> like online documentation?
<meh`> urizen, the current documentation is kind of sad, most of the stuff is outdated, but it's being worked on
<meh`> the best way to know that stuff is asking here for now
<urizen> ok thanks
<meh`> or well
<meh`> you could look at spec/filters
<fkchang> ack... bundle update now has everything just returning s-expressions...
<meh`> those are the filtered rubyspecs
<meh`> fkchang, adam rewrote the whole compiler few days ago
<fkchang> did he make a version before then?
<meh`> haha, versions, we don't know that word
<meh`> fkchang, sadly no
<meh`> he really should have
<meh`> fkchang, but you can find the commit
<fkchang> this one ? Use Opal::Compiler as main compiler class
<meh`> brb dinner
<meh`> brixen, does the be_an_instance_of check do anything weird in mspec?
<meh`> brixen, it keeps failing but #instance_of? works
<meh`> and reading the code, it shouldn't do anything weird
<brixen> hm, shouldn't be weird afaik
<meh`> it's absolutely weird
<meh`> I check the result of instance_of? before the should be_an_instance_of
<meh`> and it's true
<fkchang> meh`: do u know what version of opal-sprockets works w/the opal commit u gave me
<meh`> but then the spec fails
<meh`> fkchang, yes, gimme a sec
<meh`> yeah, fkchang v0.2.1 should do
<meh`> he bumped opal-sprockets but not opal
<fkchang> meh`: do I need a specific version of opal-browser too
<meh`> fkchang, mmh, I think yes
<fkchang> getting unexpected token on the return line of
<fkchang> def.$char = function() {
<fkchang> var self = this, $a;
<fkchang> return self['native'].char || self['native'].charCode || if (($a = self.$code()) !== false && $a !== nil) {
<fkchang> self.$code().$chr()
<fkchang> } else {
<fkchang> nil
<fkchang> };
<fkchang> };
<meh`> let me check
<meh`> this bug is making me crazy
<meh`> :((
<fkchang> meh`: progress, thank you
<meh`> fkchang, np
<fkchang> grazie
<meh`> :)
<fkchang> bummer, the code mirror weirdness is back w/that combo though, I'll track that later
<meh`> fkchang, anyway, I think showing the tooltip and alert code from the lissio standard components might give a good idea of how lissio components are made
eventualbuddha has joined #opal
<fkchang> I can finally run your inner_dom example. . Mi piace molto
<fkchang> I also like the lissio example
<meh`> yeah, it's pretty nice to use overall
<meh`> way better than any js alternative I had to use anyway
<fkchang> it will make a good darth vs luke slide for me
<fkchang> though I should find a decent js lib to compare against, otherwise it's just not fair
<meh`> true dat
<fkchang> u use any? I remember reading about a dom builder sort of js framework, but don't remember
<meh`> there are some builders, but they're all awkward really
<meh`> I'd usually go with backbone and friends
<fkchang> this one is not too bad
<meh`> looks damn ugly
<fkchang> compared to ruby
<meh`> and nowhere near as functional
<meh`> let me show you something
<fkchang> looks good, I need to remember to save all your sprunges
<meh`> that's part of shekels
<meh`> so it will be on github
<meh`> I still have to find a good way to show the data
<meh`> and now I'm stuck trying to debug a bug in mspec or opal or both
<fkchang> meh`: in the inner_dom block, looks like I can't call any methods or variables
<fkchang> http://fkchang.github.io/opal-irb/index-embeddable.html#code:class%20Foo%0A%20%20def%20shopping_list(items)%0A%20%20%20%20DOM%20do%0A%20%20%20%20%20%20ul%20do%0A%20%20%20%20%20%20%20%20items.each%20do%7Citem%7C%0A%20%20%20%20%20%20%20%20%20%20li%20item%0A%20%20%20%20%20%20%20%20end%0A%20%20%20%20%20%20end%0A%20%20%20%20end%0A%20%20end%0A%20%20%0A%20%20def%20test_inner_dom_with_variable%0A%20%20%20%20sl%20%3D%20shopping_list(%25w(one%20two%20th
<fkchang> f.test_shopping_list works as expected, f.test_inner_dom_with_variable, interprets s1 as the element type to make
<meh`> that green on red is deadly
<meh`> fkchang, yes, you're using it the wrong way
<meh`> fkchang, if you don't pass a block with a parameter
<meh`> it's instance_exec'd
<meh`> see in the shekels example how I use inner_dom { |d| }?
<meh`> d is the builder
<meh`> and the block is called normally
<meh`> so you still have the self and everything safe
<meh`> fkchang, that behaviour is pervasive in opal-browser and lissio
<meh`> no parameter, instance_exec, yes parameter, call
<fkchang> so I thought this would work
<fkchang> http://fkchang.github.io/opal-irb/index-embeddable.html#code:class%20Foo%0A%20%20def%20shopping_list(items)%0A%20%20%20%20DOM%20do%0A%20%20%20%20%20%20ul%20do%0A%20%20%20%20%20%20%20%20items.each%20do%7Citem%7C%0A%20%20%20%20%20%20%20%20%20%20li%20item%0A%20%20%20%20%20%20%20%20end%0A%20%20%20%20%20%20end%0A%20%20%20%20end%0A%20%20end%0A%20%20%0A%20%20def%20test_inner_dom_with_variable%0A%20%20%20%20sl%20%3D%20%0A%20%20%20%20%24document%5B%22m
<fkchang> if you hit ctl-p or up arrow, you can edit it
<fkchang> hit ctl-m to bring up multi line editor
<meh`> DOM { |d| d.ul { items.each { |item| d.li item } } }
<fkchang> I know the inline works
<meh`> I'm not getting the full link
<meh`> IRC is limited to ~500 chars per line
<meh`> yeah, that's not supposed to work
<meh`> but I can add inner_dom= so you can set a value as sole DOM node
<meh`> so you'd do $document["mydiv"].inner_dom = shopping_list(...)
<meh`> fkchang, does that sound ok?
<meh`> you can't easily compose builders
<fkchang> meh`: that sounds fine. I was mostly just trying to explore how I might use inner_dom to compose complicated things, and extracting methods for common things just made sense
<fkchang> In general, I'd like to abstract away from dom at the application level and just state my intentions like VBox { title; questionaire }, which is sort of along the lines of shopping list
meh` has quit [Ping timeout: 246 seconds]
meh` has joined #opal
<fkchang> meh`: is event handling built into opal-browser, or lissio ala d.a.href("/person/#{payment.recipient.name}").do(payment.recipient.name).
<fkchang> 35 on :click do |e|
<fkchang> 37 end
<fkchang> 36 e.stop!; Shekels.navigate(e.target[:href])
<fkchang> line 35 of ur sprunge
<meh`> fkchang, that's opal-browser
<fkchang> meh`: so I think something like this would work http://fkchang.github.io/opal-irb/index-embeddable.html#code:DOM%20%7B%20%0A%20%20h1(%22yo%22).on%20%3Aclick%20do%20%7Ce%7C%0A%20%20%20%20alert%20%22hi%22%20%0A%20%20end%20%0A%7D.append_to%20%24document%5B%22mydiv%22%5D
<fkchang> hope that's under 500 chars
<meh`> fkchang, yes
<meh`> fkchang, but I think you need a more recent version of opal-browser
<meh`> I don't remember when I added that
<meh`> it was around the time I added <A> support
<meh`> later for sure
<meh`> 828dad69 it was added on this commit
<meh`> if it's not working, it's probably that bug with blocks we're still trying to pinpoint
<meh`> I had an issue where it wasn't working
<meh`> I had to use the syntax you saw in the example for it to work
adambeynon has joined #opal
fkchang has quit [Ping timeout: 265 seconds]
GitHub21 has joined #opal
<GitHub21> opal/array-inheritance c60c34e meh: Cleanup and compliancy fixes for Array#<=>
GitHub21 has left #opal [#opal]
<GitHub21> opal/array-inheritance 5dbc5b2 meh: Fix Array.new behaviour with subclasses
<GitHub21> [opal] meh force-pushed array-inheritance from 6bbce45 to af2ae97: http://git.io/5RUpjg
<GitHub21> opal/array-inheritance c81546f meh: Fix typo in Array#*
GitHub129 has joined #opal
<GitHub129> opal/master 5fec442 meh: Fix typo in Array#*
<GitHub129> opal/master 23393da meh: Cleanup and compliancy fixes for Array#<=>
GitHub129 has left #opal [#opal]
<GitHub129> opal/master a217855 meh: Fix Array.new behaviour with subclasses
<GitHub129> [opal] meh pushed 5 new commits to master: http://git.io/eb9hAw
GitHub134 has joined #opal
<GitHub134> opal/array-inheritance 5953692 meh: WIP
<GitHub134> [opal] meh force-pushed array-inheritance from af2ae97 to 5953692: http://git.io/5RUpjg
GitHub134 has left #opal [#opal]
travis-ci has joined #opal
<travis-ci> [travis-ci] opal/opal#1293 (array-inheritance - af2ae97 : meh): The build has errored.
<travis-ci> [travis-ci] Build details : http://travis-ci.org/opal/opal/builds/13177117
travis-ci has left #opal [#opal]
fkchang has joined #opal
<fkchang> meh`: ok, so I have to wait until the compiler is working for me to test that out
travis-ci has joined #opal
travis-ci has left #opal [#opal]
<travis-ci> [travis-ci] opal/opal#1294 (master - d0422e0 : meh): The build passed.
<travis-ci> [travis-ci] Build details : http://travis-ci.org/opal/opal/builds/13177218
travis-ci has joined #opal
<travis-ci> [travis-ci] Build details : http://travis-ci.org/opal/opal/builds/13177283
<travis-ci> [travis-ci] opal/opal#1295 (array-inheritance - 5953692 : meh): The build was broken.
travis-ci has left #opal [#opal]
adambeynon has quit [Quit: Textual IRC Client: www.textualapp.com]
DrShoggoth has joined #opal
DrShoggoth has quit [Remote host closed the connection]
adrocknaphobia has quit [Read error: Connection reset by peer]
adrocknaphobia has joined #opal
eventualbuddha has quit [Read error: Connection reset by peer]
omninonsense has joined #opal
[spoiler] has quit [Ping timeout: 268 seconds]
omninonsense is now known as [spoiler]
eventualbuddha has joined #opal