News for hackers. Stuff that matters.
Re:CoffeeConsole: A Chrome Extension by ricardobeat on Saturday April 07, 2012 @03:53AM (#3810280)
I just forked it and added a few things:

    * zero dependencies (except coffee-script.js of course)
    * REPL-style like the standard console
    * command history (up/down keys)
    * console capturing (pretty ugly as it is, the console API is not exposed)
    * on-the-fly syntax checking
    * fixed the icon :)
http://github.com/ricardobeat/CoffeeConsole

I messed too much with it to make a pull request. Sorry.

Re:CoffeeConsole: A Chrome Extension by snookca on Saturday April 07, 2012 @06:25AM (#3810516)
Of note, there's an experimental console API that you can use but it requires users to set a flag to use the extension and you wouldn't be able to add it to the chrome store (which I might do at some point).
Re:CoffeeConsole: A Chrome Extension by ricardobeat on Saturday April 07, 2012 @06:29AM (#3810521)
I ventured into that, but having to set a flag is a deal breaker. Let's hope it becomes official soon.
Re:CoffeeConsole: A Chrome Extension by snookca on Saturday April 07, 2012 @08:55AM (#3810737)
btw: I just had a chance to look at your implementation. It's definitely going in a different direction than I wanted to take it. I understand the desire to match the default console but I'd like to keep the more powerful editor (along with some other features I'm looking to add).

Great work, though.

Re:CoffeeConsole: A Chrome Extension by ricardobeat on Saturday April 07, 2012 @04:11AM (#3810311)
Didn't you find stupid that `chrome.devtools.inspectedWindow.eval` doesn't return the error object?
Re:CoffeeConsole: A Chrome Extension by roryokane on Saturday April 07, 2012 @01:37PM (#3811472)
Looks good, but I prefer Firefox for most of my debugging. I hope someone eventually makes a similar extension for Firefox, integrating with Firebug (see http://getfirebug.com/wiki/index.php/Firebug_Extensions). There is xqjs (https://addons.mozilla.org/en-US/firefox/addon/xqjs/), but it doesn't look nearly as polished as this.
Re:CoffeeConsole: A Chrome Extension by chr1 on Saturday April 07, 2012 @03:00PM (#3811774)
for firefox there is acebug (https://addons.mozilla.org/en-US/firefox/addon/acebug/) which is more polished (cells, autocompletion, better integration with firebug). it doesn't show converted js as you type but that's not very useful anyway
Re:CoffeeConsole: A Chrome Extension by nicholaides on Saturday April 07, 2012 @12:16AM (#3809952)
This extension made me realize that Chrome doesn't do syntax highlighting in the console. What a convenient feature!
Re:CoffeeConsole: A Chrome Extension by jwarzech on Saturday April 07, 2012 @11:23AM (#3811096)
As someone who is doing more and more coffeescript this is awesome. However debugging in the console seemed like the only way I was going to stay fresh in native javascript!
Re:CoffeeConsole: A Chrome Extension by christiangenco on Friday April 06, 2012 @11:20PM (#3809846)
Very interesting; I like it.

Could you add a keyboard shortcut for running the CoffeeScript? Perhaps "option+(enter|return)" inserts a carriage return while (enter|return) runs the code?

Second choice: command+B "builds" the code.

Re:CoffeeConsole: A Chrome Extension by snookca on Friday April 06, 2012 @11:29PM (#3809859)
I have it set that Cmd+Enter or Shift+Enter runs the code and Enter just creates a normal carriage return. I know this is a little backwards compared to the normal console, so it's definitely possible to switch it around. This just feels natural to me. (Down the road, having app preferences where this can be toggled might be good.)
Re:CoffeeConsole: A Chrome Extension by christiangenco on Friday April 06, 2012 @11:37PM (#3809884)
Ahh yes, just came back here to edit my comment after I found that in the source. I can get used to that.

I'd love to see this become a drop-in replacement for the console. CoffeeScript is so much nicer to deal with in development it's practically the only time I'm still writing plain js.

Re:CoffeeConsole: A Chrome Extension by zephjc on Saturday April 07, 2012 @12:26AM (#3809972)
Typically, when working with multiline inputs where return submits the input, option+return inserts a newline.
Re:CoffeeConsole: A Chrome Extension by danenania on Saturday April 07, 2012 @02:35AM (#3810188)
Nice work! I've wanted this for a long time. Giving it a try right now.