<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
<GitHub149>
opal-activesupport/master 5aaf5be Elia Schito: Add assert_equal support
<GitHub149>
[opal-activesupport] elia pushed 3 new commits to master: http://git.io/xqvEzw
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
<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
<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: http://git.io/qLMXqg
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.