gverri has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
DrShoggoth has quit [Quit: Leaving]
fkchang has joined #opal
<fkchang>
adambeynon: ping
e_dub has quit [Quit: It's a hard knock life]
e_dub has joined #opal
<adambeynon>
hi fkchang
dfranciosi has joined #opal
elia has joined #opal
<fkchang>
adambeynon: having a hard time getting opal-rspec to run out of a different directory than spec (in a rails project, don't want it to run the rails specs), I tried making a custom erb file as main in the rake task which doesn't seem to take.
<adambeynon>
fkchang: how are you running it? through the raketask? or config.ru?
<adambeynon>
fkchang: have you seen the rails controller for opal-rspec? allows you to run the specs in the browser
<fkchang>
tried to do both
<fkchang>
rake and a custom *.ru file
<fkchang>
rake task times out, rspec.ru complains about AssetPaths not being part of ActionView
<fkchang>
haven't seen the rails controller. That'd be a start but I'd like to do it w/rake and phantomjs
meh` has joined #opal
<fkchang>
adambeynon: gotta sleep, it's 2am, appreciate any tips
<adambeynon>
fkchang: I'm out and about, but I will try it myself when I'm home. I will email or gist any solution. I haven't actually tried it myself, but il sure it should be able to work
<meh`>
what are we talking about?
kludge` has quit [Ping timeout: 252 seconds]
<fkchang>
opal-rspec in a directory other than spec (cuz my rails specs r there), via phantomjs
<fkchang>
g'nit
<fkchang>
e
kludge` has joined #opal
fkchang has quit [Ping timeout: 260 seconds]
elia has quit [Quit: Computer has gone to sleep.]
DouweM has joined #opal
elia has joined #opal
dfranciosi has quit [Remote host closed the connection]
dfranciosi has joined #opal
GitHub35 has joined #opal
GitHub35 has left #opal [#opal]
<GitHub35>
opal/master b0573f9 Elia Schito: Let's try again with jruby/rubinius
<adambeynon>
elia: looks to be a bug with StringScanner when parsing in rubinius if there is unicode characters
<adambeynon>
it doesnt handle the unicode characters correctly
<adambeynon>
and the index in the scanner seems to be wrong for scanner.peek()
<elia>
cc: brixen
<adambeynon>
for each unicode character the index is 1 less than it should be
<adambeynon>
maybe #check() would work instead
<adambeynon>
i will try that
<elia>
adambeynon, if there's a bug I'm quite sure rbx guy are more than eager to have it fixed :)
<adambeynon>
elia: yeap. just confirmed that scanner.check(/::/) works, but scanner.peek() has the wrong index
<adambeynon>
I will write an isolated test case to show it
<adambeynon>
and open an issue
<adambeynon>
(and to 100% confirm it is that, not something stupid im missing ;)
fkchang has joined #opal
<adambeynon>
elia: Should I push a fix for rubinius+strscan? its basically changing a method from peek() to check(). the parser uses check() in all other cases anyway
<adambeynon>
can still open an issue for rubinius
<adambeynon>
but atleast we will have a working gem on rbz
<adambeynon>
rbx*
<meh`>
I vote for both
<adambeynon>
pushing now
GitHub122 has joined #opal
GitHub122 has left #opal [#opal]
<GitHub122>
[opal] adambeynon pushed 1 new commit to master: http://git.io/6bDtgw
<GitHub122>
opal/master 5f7ec71 Adam Beynon: Replace use of scanner.peek with scanner.check to fix rbx parse bug...
<adambeynon>
of course, the strscan code is now in the rubysl-strscan gem
<adambeynon>
so its actually outside of rubinius
<elia>
adambeynon, I agree with meh`
travis-ci has joined #opal
<travis-ci>
[travis-ci] opal/opal#1593 (master - 5f7ec71 : Adam Beynon): The build passed.
<meh`>
now I only have to make the DSLs a bit more solid
<meh`>
then scrap the opal-browser stuff
<meh`>
and use paggio inside opal-browser
<meh`>
since it creates an usable middle thingy
<meh`>
and on top of it you can transform it into a string at all times
<meh`>
which will obviously be good for opal-inspector
<meh`>
fkchang, but it's pretty nice standalone too, I had to make a single page static website and I'd usually go with HAML/SCSS, but I was too lazy to remind myself how HAML and SCSS work so I wrote paggio instead
<elia>
"[…] so I wrote paggio instead" → classic meh`
<meh`>
lol
marcandre has quit [Remote host closed the connection]
marcandre has joined #opal
marcandre has quit [Remote host closed the connection]
ryanstout has quit [Quit: ryanstout]
<fkchang>
meh`: I can wait on the back port. I was going to build into opal-inspector stuff to preview markup and stuff, or markup generated.
<fkchang>
adambeynon: any progress w/storing the code/comments in opal?
<meh`>
fkchang, well, I'm doing it now :)
<fkchang>
nice, how's coming
<fkchang>
I'm curious as to how we'll handle stuff defined on the class level, say inldes, attr_accessor, etc.
elia has quit [Read error: Connection reset by peer]
elia has joined #opal
<adambeynon>
fkchang: the parts I am struggling with are the comments for things like attr_accessor etc? simple defs inside modules and classes are easy
<adambeynon>
How to deliver this all to a browser session is also tricky though...
<meh`>
adambeynon, I was thinking
<meh`>
adambeynon, we really need some kind of simple stupid tool to transform a gem to a self-contained javascript file
<adambeynon>
meh`: would you want it to go through and include all requires?
<adambeynon>
e.g. corelib and stlib stuff
<adambeynon>
and other gems
<adambeynon>
stdlib*
<adambeynon>
I have thought of something similar, but could never decide on how to handle requires()
<adambeynon>
e.g. I wanted a quick way to create an opal-jquery.js file for a "quick start at using opal"
<adambeynon>
but then you could end up with 3 files all including set.rb
<meh`>
adambeynon, no
<meh`>
adambeynon, single things
<meh`>
a gem, an stdlib, opal itsel
<meh`>
opal-parser
<meh`>
so you can generate them on the go
<meh`>
and include them
<meh`>
I'm specifically thinking about paggio here
<meh`>
where I include the gems separately
<adambeynon>
opal-parser requires 3 stdlib files, so getting that working, for example, would be a pain
<meh`>
adambeynon, well, actually, yes
<meh`>
adambeynon, yeah, just realized that
<meh`>
mmh
<adambeynon>
meh`: as much of a pain as sprockets is, using it as a kind of standard build system does keep things ticking over nicely...
<fkchang>
adambeynon: so part of the whole "smalltalk like" experience of opal browser is to develop in the browser, then I'd want to send the changed code back to the server. At the moment, I imagine something similar to diffs/monkey patching. I thought an easy first step would be "show all the code and comments for a class", which is where I'd see comments and code at the class level. per the inspector editing, getting the code/comments per
<fkchang>
method is straight forward, not certain where I'd put the editing for the in class stuff exactly
<adambeynon>
(also, I hate client side require systems like requirejs)
<meh`>
(yeah, I agree)
<adambeynon>
fkchang: I wonder if workspaces in google chrome devtools might offer some help
<adambeynon>
or even some APIs to interact with the server based stuff
<adambeynon>
I havent looked into Workspaces much, but Im sure I have seen a presentation of a guy editing scss code in chrome
<adambeynon>
and pushing it back up to remote
<fkchang>
adambeynon: hmm, that could work, off of edubkendo's chrome page i though maybe working over there, but thought the ability to run tools in any browser that supports opal also is a benefit (can you say IE?)
<fkchang>
At the simplest level, if we were doing just methods only, it'd be simple lookup, for X method what is the combined code/comments?
<fkchang>
but Ruby isn't only methods
<fkchang>
We could still do everything if we could generate unique names
<fkchang>
I could push such a thing to the server too, though would have to support some way of monkeypatching code into the server. A quick short cut is to be able to generate the "what does the whole class look like now" and then paste that into a file
<adambeynon>
fkchang: well, if we take one method at a time, we know the original start and end line numbers, so a simple diff between the two could be easy enough to push up
<adambeynon>
even a simple 'replace line x...y with "this new code"'
elia has quit [Quit: Computer has gone to sleep.]
<fkchang>
Yeah, at one point I was thinking of diffs and PR's, possible even a PR like system for you to go back on the server and "pick" what changes you want to keep
<fkchang>
also thought about just outsource that to git on the server side
gverri has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<fkchang>
that might be too hard to get out quickly, but I thought about, "show me what this class looks like now", or maybe "show me the complete code for every class that has changed" -- that could be quick to develop, and then tackle the more complicated stuff later
<adambeynon>
fkchang: yep
<adambeynon>
fkchang: btw, did you get the opal-rspec working?
<adambeynon>
a custom runner.erb file should be able to do the trick