<meh`>
if you don't have a hard-dependency on jquery using opal-browser would be a better idea
<meh`>
it will be the get-go library
<ashrewdmint>
IIRC the tutorials never said anything about having to load the actual jQuery JS file, but it makes sense.
<ashrewdmint>
Anyway, for my project I'll need to use jQuery anyway
<meh`>
in that case it's better to use opal-jquery, yeah :)
<ashrewdmint>
Has anyone done benchmarks on Opal?
<ashrewdmint>
Like, vanilla JS for stuff vs Opal's output?
<meh`>
we usually do synthetic benchmarks before implementing things
<meh`>
no overall benchmarks
<ashrewdmint>
Is it noticeably slower or just not consequential at all?
<meh`>
it's bearable
<meh`>
some of us have production stuff using opal
<meh`>
and didn't hear complaints about speed
<ashrewdmint>
Sounds good to me :)
<meh`>
it definitely has a relatively big overhead
<meh`>
but it's worth the production boost
<meh`>
*productivity
<ashrewdmint>
Yeah. Writing JS as Ruby makes me feel all warm and fuzzy inside.
<meh`>
the most important part to me is not having to deal with sprockets or require.js based stuff
<meh`>
both are hell to a certain degree
<ashrewdmint>
Yeah, I'm not sure why they went with that module loading syntax.
<ashrewdmint>
I wish they went with a hash/object instead of a list of paths, with a list of arguments in the function.
<ashrewdmint>
That's my main gripe with require.js
<elia>
meh`: ashrewdmint: probably we should add a meaningful error to opal-jquery if it can't find jquery.js
<meh`>
elia, yeah
<meh`>
ashrewdmint isn't the first to hit it
<adambeynon>
elia, meh` : have you used backbone or any other js mvc lib before?
<meh`>
adambeynon, I have
<meh`>
backbone
<elia>
adambeynon: tried the backbone router
<adambeynon>
did you like the router? im rewriting the controller part of my vienna blog post/guide, and think a "one controller per route" is a better option
<ashrewdmint>
elia: meh`: Yes, a meaningful error or a line in the web tutorial would help
<ashrewdmint>
I did end up looking at the example project in the opal-jquery repo
<elia>
adambeynon: I hated that they're not sequential (as is "with priority")
<ashrewdmint>
But I was too dumb to look at the index.html for that project
<meh`>
adambeynon, did you look into that constant missing thing?
<adambeynon>
meh`: cant figure it out, need more time to look into it
<meh`>
:<
<elia>
adambeynon: was talking about backbone routes, about the one controller per route I'd copy rails and let the user to decide
<adambeynon>
meh`: does Opal.Parslet end up being defined?
<adambeynon>
in javascript land
<meh`>
adambeynon, I don't know
<meh`>
it fails too early
<meh`>
adambeynon, it looks like an ordering issue or something
<meh`>
it's probably the requires getting called in the sprockets order biting us in the ass
<meh`>
Parslet is defined on line 19138
<meh`>
while the error is on line 16416
<meh`>
the more I see it the more I think using sprockets is an AWFUL idea
<meh`>
adambeynon, yeah, it's that
<meh`>
it defines the stuff in parslet.rb
<meh`>
and then requires at the end
<meh`>
dammit
<meh`>
adambeynon, basically it does class Parslet::Slice
<meh`>
and it can't find Parslet
<meh`>
because it's not there yet
elia has quit [Quit: Computer has gone to sleep.]
<meh`>
I'll try a workaround, but this is a pretty huge problem
<meh`>
adambeynon, even more issues, now with the constant inheritance and include, and more with the require
<meh`>
I'm doomed
<meh`>
I'll have to write a handwritten parser
adambeynon has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
adambeynon has joined #opal
<adambeynon>
meh`: we could write a better client side require() handler
<meh`>
adambeynon, I opened two issues
<meh`>
they're what's blocking Parslet for now
<meh`>
there's also a missing Kernel#fail, but I can work on that