Re:CoffeeScriptLineMatcher
by showell30 on Tuesday March 06, 2012 @10:59AM
(#3671549)
CoffeeScriptLineMatcher lets you see CoffeeScript/JavaScript code side by side. It's mostly geared toward debugging, but it also helps you examine the transformations made by the CS transcompiler.
Re:CoffeeScriptLineMatcher
by phren0logy on Tuesday March 06, 2012 @11:38AM
(#3671727)
Nice to see this, as it seems to address one of the most common concerns about using CoffeeScript. I have to wonder, though, how many minds will it really change? Maybe a lot, but I'm wondering how this will pan out. I'm guessing some people provide line matching for debugging as a concern but will continue to move the goal posts as this and other barriers are removed.
I feel like that's a pattern I see around here, which is odd because if you'd rather just use javascript that seems totally reasonable without an excuse.
Re:CoffeeScriptLineMatcher
by showell30 on Tuesday March 06, 2012 @11:51AM
(#3671785)
I agree with you that are some skeptics who will continue to move the goalposts. I also think that the tool itself won't change any minds.
My hope is that it can help early adopters get over the initial debugging barrier, which, despite the hype, is a legitimate concern. The tool can also be an aid for advocates in teaching coffeescript.
Re:CoffeeScriptLineMatcher
by jhrobert on Tuesday March 06, 2012 @12:06PM
(#3671842)
Great.
Based on that, what would be even more useful still is a way to browse my code from a within the editor itself. Something with say line numbers on some left pane synchronized with the corresponding file section on the right pane.
Some editors already provide a similar feature using line numbers from compilers ; that's usefull to fix syntax errors typically.
Re:CoffeeScriptLineMatcher
by showell30 on Tuesday March 06, 2012 @12:30PM
(#3671959)
Yup, there is some support for editor integration, although it's still up to you to actually glue it into your editor of choice. See the issue below for more discussion.
Re:CoffeeScriptLineMatcher
by mike-cardwell on Tuesday March 06, 2012 @12:34PM
(#3671975)
I just tried this out and the web interface it provides is awful. You're better off opening the .js and .coffee files in vi and finding things manually. The page is twice the width of my browser as I'm looking at it now.
Re:CoffeeScriptLineMatcher
by Timmy_C on Tuesday March 06, 2012 @12:43PM
(#3672005)
I think you should fork it and rewrite the CSS for the dashboard. The markup for the code snippets is just <pre> elements. You could set the white-space to 'pre-line' for those elements to take care of the width issue.
Re:CoffeeScriptLineMatcher
by showell30 on Tuesday March 06, 2012 @01:09PM
(#3672101)
The tool obviously works best with a fairly wide browser window, but patches are more than welcome to improve the CSS, which is obviously kind of primitive. For simple stuff, filing an issue would be great--no need for a full-blown pull request.
I feel like that's a pattern I see around here, which is odd because if you'd rather just use javascript that seems totally reasonable without an excuse.
My hope is that it can help early adopters get over the initial debugging barrier, which, despite the hype, is a legitimate concern. The tool can also be an aid for advocates in teaching coffeescript.
Based on that, what would be even more useful still is a way to browse my code from a within the editor itself. Something with say line numbers on some left pane synchronized with the corresponding file section on the right pane.
Some editors already provide a similar feature using line numbers from compilers ; that's usefull to fix syntax errors typically.
https://github.com/showell/CoffeeScriptLineMatcher/issues/13