fkchang has quit [Ping timeout: 245 seconds]
ryanstout has joined #opal
<ryanstout> hello, quick question. What is the status of the opal cli? If I run without options, it tries to run my file, but doesn't do requires (require 'opal' for example). I see there's some mention of opal-sprockets in the cli code, but it doesn't seem to work. Running it with --server isn't working for me either. Thanks
ryanstout has quit [Quit: ryanstout]
[spoiler] has joined #opal
denysonique has quit [*.net *.split]
brixen has quit [*.net *.split]
brixen_ has joined #opal
denysonique has joined #opal
adambeynon has joined #opal
elia has joined #opal
<elia> adambeynon, I think those 2 issues are definitely a non priority
<adambeynon> elia: ah, thanks for updating them
<adambeynon> yeah, they look tricky to be fixed
<elia> adambeynon, any progress with rspec?
<elia> I started a local rails with some patches almost 100% related to dynamic requires…
<adambeynon> elia: yeah, the dynamic requires were causing the problem mostly
<adambeynon> and I had to stub lots of stdlib files
<adambeynon> rake etc
<elia> adambeynon, and that brought along some urge to restore the old system of registering closures to paths and then use real requires…
<elia> yeah, me too
<elia> adambeynon, r u willing to upload the work somewhere, so to avoid wasted efforts
<elia> ?
<adambeynon> elia: yeah, will do. Its on my other laptop, so I will put it up at lunch
<adambeynon> the heredoc stuff is another blocker
<adambeynon> but we can overcome that, for now
<elia> adambeynon, I think on rspec master at least one of them has been removed
<elia> adambeynon, also PR or fork are very good options here
kludge` has quit [Ping timeout: 240 seconds]
kludge` has joined #opal
<adambeynon> yeah, thats true. there is work to be done on it, but realistically, I think we can get rspec working in a couple of days
<adambeynon> when I introduce people to opal, its usually one of the first questions
<adambeynon> usually just after does method_missing work ;)
<adambeynon> elia: also, if we have to initially maintain some opal-rspec gem, I think that would be fine
<elia> sure
<elia> method_missing is a classic one
<elia> adambeynon, how do you feel about extending use_gem to runtime deps? (already done, just done just don't know if I can push)
<[spoiler]> Why do people care so much about Object#method_missing? I had to use it very rarely
<adambeynon> elia: how do you mean runtime deps?
<adambeynon> [spoiler]: persoanlly I only have it enabled during development
<adambeynon> I disable it in my production opal apps
<elia> [spoiler], agree, I think it's because that's sooo like Ruby
<[spoiler]> elia, I had a discussion yesterday with a friend on another channel, and came to the realisation that I'm not a "ruby purist." Hahaha
<elia> [spoiler], sure you're not :D
<elia> adambeynon, rewording (and recoding) what if I change use_gem to load runtime deps by default?
<adambeynon> elia: ahh, I see. yeah, Im happy with that
<adambeynon> elia: I have rspec-expectations compiling just fine
GitHub81 has joined #opal
<GitHub81> opal/master fcbfac5 Elia Schito: Opal.use_gem now loads runtime dependencies by default
GitHub81 has left #opal [#opal]
<GitHub81> [opal] elia pushed 1 new commit to master:
<elia> adambeynon, i'm tempted by railsrumble… are you going to participate?
travis-ci has joined #opal
<travis-ci> [travis-ci] Build details :
travis-ci has left #opal [#opal]
<travis-ci> [travis-ci] opal/opal#1071 (master - fcbfac5 : Elia Schito): The build passed.
<adambeynon> elia: I cant :( I have a wedding to attend over that weekend
<elia> adambeynon, me too, I have three kids to attend :D
<elia> adambeynon, willing to invest just 3-4 hours…
<adambeynon> it is tempting
<adambeynon> had any thoughts on what to build?
<adambeynon> elia: running in the browser!
<adambeynon> RSpec::Expectations::ExpectationNotMetError: expected: 4 got: main (using ==)
<adambeynon> we are getting there :)
hermeht has joined #opal
<adambeynon> hermeht: hi
<adambeynon> I have implemented that Module#autoload feature
<adambeynon> about to push it up
<hermeht> adambeynon, awesome
<adambeynon> hermeht: also, we have some progress on rspec
<adambeynon> 1. RSpec::Expectations::ExpectationNotMetError: expected: 10
<adambeynon> got: 1 (using ==)
<adambeynon> we have specs (partially) running in the browser!
<hermeht> nice
<hermeht> adambeynon, told ya #coerce was needed ( ≖‿≖)
<adambeynon> lol, yeh..
<adambeynon> hermeht: Im not all that familiar with it
<adambeynon> does it happen for EVERY operator call?
<adambeynon> regardless of the receiver?
<hermeht> adambeynon, I have no clue
<adambeynon> I just assumed it was some clever feature Numeric#+ and friends used
elia has quit [Ping timeout: 246 seconds]
elia has joined #opal
<adambeynon> so, "surprisingly", immutable strings is the biggest compatibility problem with rspec
<hermeht> lol
<elia> adambeynon, I created a team for railsrumble, as said it's meant to be a *soft* attempt, anna be added? /cc hermeht
<elia> the idea on what to do will come… 10days before competition start
<elia> *starts
GitHub137 has joined #opal
<GitHub137> opal/master a336419 Adam Beynon: Support Module#autoload in RequireParser
GitHub137 has left #opal [#opal]
<GitHub137> [opal] adambeynon pushed 1 new commit to master:
travis-ci has joined #opal
<travis-ci> [travis-ci] opal/opal#1072 (master - a336419 : Adam Beynon): The build passed.
<travis-ci> [travis-ci] Build details :
travis-ci has left #opal [#opal]
<adambeynon> elia: I decided to start again on the rspec support
<adambeynon> only working on rspec-expectations at the moment
<adambeynon> but my plan today is to try and get most of rspec working
<adambeynon> we can have our own dsl (describe + it + let) stuff on top of rspec-expectations for now
<adambeynon> but rspec-core shouldnt be too much more work
<elia> adambeynon, I think there's a good chance to get them to accept PRs related to string immutability too
<adambeynon> elia: hopefully so
<adambeynon> there are 4 bugs I have monkey patched
<adambeynon> 2 for strings
<adambeynon> and the other 2 are easily fixable
<adambeynon> infact 1 isnt even a bug, its rspec disabling :should by default on master
GitHub3 has joined #opal
<GitHub3> opal/master 442b7f5 Adam Beynon: Make sure alias_method donates new methods to module includees
GitHub3 has left #opal [#opal]
<GitHub3> [opal] adambeynon pushed 1 new commit to master:
omninonsense has joined #opal
travis-ci has joined #opal
<travis-ci> [travis-ci] opal/opal#1073 (master - 442b7f5 : Adam Beynon): The build passed.
<travis-ci> [travis-ci] Build details :
travis-ci has left #opal [#opal]
[spoiler] has quit [Disconnected by services]
omninonsense is now known as [spoiler]
DrShoggoth has joined #opal
elia has quit [Read error: Operation timed out]
brixen_ is now known as brixen
<hermeht> brixen, ping
<adambeynon> hermeht: if we fix HEREDOCS, we can run rspec pretty much unmodified
<hermeht> adambeynon, nice
zmike123 has joined #opal
GitHub149 has joined #opal
<GitHub149> opal-activesupport/master 44d6e0a Elia Schito: Add time calculations/conversion to Numeric
<GitHub149> opal-activesupport/master 16ab01d Elia Schito: Remove debug output
GitHub149 has left #opal [#opal]
<GitHub149> opal-activesupport/master 5aaf5be Elia Schito: Add assert_equal support
<GitHub149> [opal-activesupport] elia pushed 3 new commits to master:
ryanstout has joined #opal
DrShoggoth has quit [Read error: Connection reset by peer]
<hermeht> ryanstout, we're still trying to figure out the semantics of coercion
<ryanstout> cool
<hermeht> ryanstout, do you know if there's some thorough documentation about it?
<ryanstout> let me google
<hermeht> adambeynon didn't even know it existed until I brought it up few nights ago
<ryanstout> yea, I know how to use it, but I'm not 100% sure on the mechanics
<hermeht> and I'm pretty sure few know about its existence at all
<ryanstout> yea, its very useful for a bunch of things
<hermeht> indeed, I need it for the CSS DSL in opal-browser
<hermeht> so I'm pretty sure we'll add it one way or another
<ryanstout> yea, might make since as another compiler flag
<ryanstout> so I think the mechanic is if you have a method call (a + b for example) and a doesn't have the + method, but b has a coerce method, it will run coerce on b, passing in a. That returns two variables which basically replace a and b, then the call happens again with the replaced values.
<ryanstout> or I think thats how it works
<hermeht> ryanstout, I don't think the check is about method presence, since Numeric#+ exists
<ryanstout> oh, right
<ryanstout> yea, maybe it gets called from inside of the number classes and stuff
<hermeht> and I think it's limited to operators
<ryanstout> let me see if I can find it in the rubinius source or something
<ryanstout> Numeric's coerce method for rubinius is here:
<ryanstout> but it looks like a normal coerce method, so maybe in ruby its handled as a language construct directly
GitHub11 has joined #opal
GitHub11 has left #opal [#opal]
<GitHub11> opal/master e86256b Adam Beynon: Support meta/singleton classes in super hierarchy chains
<GitHub11> [opal] adambeynon pushed 1 new commit to master:
<ryanstout> ok, here's the * in rubinius on Float. Looks like it called #math_coerce first before doing multiplication: Here is #math_coerce:
<hermeht> ok
<hermeht> so it's all in userland
<hermeht> good to know
<hermeht> it should be extremely easy to do
travis-ci has left #opal [#opal]
<travis-ci> [travis-ci] Build details :
travis-ci has joined #opal
<travis-ci> [travis-ci] opal/opal#1074 (master - e86256b : Adam Beynon): The build passed.
<hermeht> and we're already calling a js function for operators, adding another won't kill anyone
<hermeht> adambeynon, I'll get to work on the coerce stuff if you don't mind
<ryanstout> @hermeht thanks for the help. Let me know if you need anything.
<adambeynon> so we have to add all that for every math operator?
<ryanstout> I think so. might make since to add a compiler flag for it?
<hermeht> adambeynon, yep
<hermeht> ryanstout, I wouldn't
<hermeht> adambeynon, sincerely I don't think it will slow down it much
<hermeht> I mean, it's already pretty slow
<hermeht> it would be a better idea to add a math operations pragma/block/whatever
<hermeht> adambeynon, and I think the JS engine can optimize out a check on a number
<hermeht> any half-assed tracing jit can keep track of numbers
<hermeht> and we can always benchmark it when I'm done
<hermeht> I have to finish this thing first anyway
<adambeynon> ok, I will have a look at those links in a minute
<adambeynon> (also, I wish I had never started trying to get rspec working)
<ryanstout> I worked on getting rspec going for a while too :-)
<ryanstout> its probably a good exercise though, I found a bunch of issues once I got things compiling.
<ryanstout> its crazy how much code rspec and mini-test are
<adambeynon> thats the thing. they are HUGE. I appreciate that they are good at what they do, but rspec is so bloated
<ryanstout> yea
<adambeynon> minitest I can appreciate, it is a lot smaller than rspec
<ryanstout> tons of dependencies
<adambeynon> but, I have rspec tests running now in the browser
<adambeynon> so we are close
<ryanstout> cool
<ryanstout> that will be super nice to have
<adambeynon> yeah. I want to get minitest working as well. would be nice to have the choice
<adambeynon> and it might get dhh a little closer to using opal ;)
<ryanstout> yea
<adambeynon> so, rspec: most things are working now apart from mocks
<ryanstout> did you have to release it as a fork? I know it had a bunch of conditional requires in it
<adambeynon> ryanstout: realistically, we are going to have to use a fork. with some hand rolled changes. the plan is to release opal-rspec with the rspec stuff precompiled
<adambeynon> so you dont have 2 versions of rspec in the same Gemfile
<ryanstout> cool, that would work
<adambeynon> ryanstout: seems the easiest way. opal-rspec can also include custom formatters, so we get nice html output in the browser
[spoiler] has quit [Read error: Connection reset by peer]
<ryanstout> I'm not sure what most people's use case is, but for me, I have a lot of code that will be running in opal, but doesn't need the dom.
[spoiler] has joined #opal
<ryanstout> let me know when you get to building the "runner" part
<adambeynon> ryanstout: will do. Im finishing up for today, but might be back later
<adambeynon> I reckon tomorrow evening we will have a version ready for usage
<ryanstout> @adambeynon cool, I should be around
<ryanstout> cool
<ryanstout> great work on opal
<adambeynon> cheers :) we are getting there slowly
<adambeynon> back later
adambeynon has quit [Quit: ["Textual IRC Client:"]]
<hermeht> fucking CORS, I finally defeated you
<hermeht> I hope
<hermeht> lol
<hermeht> I managed to make firefox crash too
<hermeht> good, I won :D
zmike123 has quit [Quit: ~]
elia has joined #opal
adambeynon has joined #opal
<hermeht> adambeynon, any ETA on fixing the default arguments issues?
<hermeht> it's getting really annoying
<adambeynon> default arguments? they should be working?
<adambeynon> oh
<adambeynon> post args?
<adambeynon> def foo(a = 100, b, c)
<hermeht> yes
<adambeynon> im really keen to get a version of rspec working, which should be tomorrow morning (by the looks of it)
<adambeynon> so I will add that as my next to do
GitHub97 has joined #opal
<GitHub97> opal/master ef4b5d3 Adam Beynon: Add some stub files for common stdlib sources
GitHub97 has left #opal [#opal]
<GitHub97> [opal] adambeynon pushed 1 new commit to master:
travis-ci has joined #opal
<travis-ci> [travis-ci] opal/opal#1075 (master - ef4b5d3 : Adam Beynon): The build was broken.
<travis-ci> [travis-ci] Build details :
travis-ci has left #opal [#opal]
GitHub48 has joined #opal
<GitHub48> opal/master 0b906ff Adam Beynon: meta classes need _methods property to allow singleton def methods
<GitHub48> [opal] adambeynon pushed 1 new commit to master:
GitHub48 has left #opal [#opal]
elia has quit [Quit: Computer has gone to sleep.]
<adambeynon> hermeht: as annoying as it is that rspec is really complicated, it is a very good way to find corner bugs that "normal" code doesnt really pickup
<hermeht> adambeynon, yeah
<hermeht> but it would be nice if you fixed the already known corner cases ( ≖‿≖)
<ryanstout> I'm glad you're working on it. I tried, but I think I would have had to learn most of the opal internals to get it working :-)
travis-ci has joined #opal
<travis-ci> [travis-ci] opal/opal#1076 (master - 0b906ff : Adam Beynon): The build was fixed.
travis-ci has left #opal [#opal]
<travis-ci> [travis-ci] Build details :
<hermeht> adambeynon, I made Lissio::Component::Tooltip a bit more awesome
<hermeht> Lissio::Component::Tooltip.customize background: 'green'
<hermeht> gives you a new Tooltip class with the changes
<hermeht> and you can pass a block to define other CSS inside it
<hermeht> and you can further inherit if you want to do other magic :D
<hermeht> try and do that bootstrap ( ≖‿≖)
<adambeynon> haha, nice one.
<adambeynon> hermeht: I was thinking about using some of your CSS dsl for opal-rspec
<adambeynon> ryanstout: the opal internals are definitely not very fun to work with
<adambeynon> it used to be based on mri
<adambeynon> but that was very slow
<hermeht> adambeynon, go for it, it shouldn't create any issues
<ryanstout> interesting
elia has joined #opal
<hermeht> adambeynon, but I don't ensure IE support for now
fkchang has joined #opal
<hermeht> unless it's IE10
<hermeht> in IE10 all specs pass IIRC
GitHub74 has joined #opal
<GitHub74> opal/master a206e46 Adam Beynon: Fix Kernel#instance_variables to prefix vars with '@'
GitHub74 has left #opal [#opal]
<GitHub74> [opal] adambeynon pushed 1 new commit to master:
<adambeynon> hermeht: do you mind if I offer some IE6/7/8 fixes?
<adambeynon> hermeht: thats awesome, fair does
<hermeht> adambeynon, not at all, but do them right
<hermeht> I think I wrote in the README how compatibility stuff is done
<adambeynon> hermeht: sure thing
<hermeht> just look around in opal/browser/compatibility how the rest is done
<hermeht> adambeynon, basically right now in IE<10 events don't work, at all
<hermeht> and event delegation doesn't work in any IE
travis-ci has joined #opal
<travis-ci> [travis-ci] opal/opal#1077 (master - a206e46 : Adam Beynon): The build passed.
travis-ci has left #opal [#opal]
<travis-ci> [travis-ci] Build details :
<hermeht> the former just needs the attachEvent and friends stuff
<hermeht> the latter needs a MutationObserver polyfill which I already started working on
<hermeht> I wonder why I love DSLs so much
<hermeht> I'm swimming in DSLs both on the backend and frontend
<ryanstout> I'm kind of the same, I think it lets you express things in a logical way thats easy to parse when you read it
GitHub85 has joined #opal
GitHub85 has left #opal [#opal]
<GitHub85> opal/master 050f137 Adam Beynon: Kernel#=== should call == on recv with other
<GitHub85> [opal] adambeynon pushed 1 new commit to master:
travis-ci has joined #opal
<travis-ci> [travis-ci] Build details :
<travis-ci> [travis-ci] opal/opal#1078 (master - 050f137 : Adam Beynon): The build passed.
travis-ci has left #opal [#opal]
adambeynon has quit [Quit: Textual IRC Client:]
[spoiler] has quit [Quit: Leaving]
elia has quit [Read error: Connection reset by peer]
elia has joined #opal
<hermeht> damn you adam
GitHub69 has joined #opal
GitHub69 has left #opal [#opal]
<GitHub69> [opal] meh pushed 1 new commit to master:
<GitHub69> opal/master c7a7047 meh: Fix constant name regex in Module methods
travis-ci has joined #opal
<travis-ci> [travis-ci] Build details :
<travis-ci> [travis-ci] opal/opal#1079 (master - c7a7047 : meh): The build passed.
travis-ci has left #opal [#opal]
elia has quit [Quit: Computer has gone to sleep.]