News for hackers. Stuff that matters.
Re:The Chrome Javascript editor can do hot swapping by ryanackley on Sunday February 10, 2013 @04:07PM (#5197913)
I wrote an extension that does both live reload and saving from devtools: http://tin.cr. To address the comment below with regard to extensions not working, it's Chrome's fault. It will fail to hotswap JavaScript occasionally and it doesn't communicate the reason to the user or extensions built on top of it.

Speaking from experience, hot swapping JS sounds much better than it actually is in practice. First, as mentioned above it randomly fails with no explanation from Chrome. Also, I find a lot of code I want to hotswap runs on DOM ready and assumes that the page has just been loaded.

On the other hand, CSS hotswapping in Chrome works really well.

Re:The Chrome Javascript editor can do hot swapping by wubbfindel on Sunday February 10, 2013 @05:30PM (#5198255)
"I find a lot of code I want to hotswap runs on DOM ready and assumes that the page has just been loaded."

Maybe it would be possible to put all your "setup" code into a single myscript.load() function and then when you've edited your js in chrome devtools, then call myscript.load() in the console to reboot all your DOM events and so on.

Just an idea, completely not tested.

P.S. Just tried your extension using vim to edit a Sass file, while compass watch is running, and your extension is watching my CSS output directory. Awesome to see changes in vim almost immediately appear in my browser!

EDIT: Formatting. Adding P.S.

Re:The Chrome Javascript editor can do hot swapping by ensmotko on Sunday February 10, 2013 @04:41PM (#5198039)
I think your extension was one of the few I tried. Sorry for the slight bashing, I appreciate what you're doing and I'd actually like to help you out in any way I can!

Have you tried getting in touch with Chrome developers? Printing out info when hot swapping failed would really make you extension useful.

Weirdly, I haven't noticed failures while using the Chrome editor. Might be that I just haven't logged enough hours with it yet, but so far it was working flawlessly.

Re:The Chrome Javascript editor can do hot swapping by skrebbel on Monday February 11, 2013 @02:11AM (#5199773)
It probably works great for games, though put your render() function in the hotswapped code, and hooray. ctrl+s updates the view.
Re:The Chrome Javascript editor can do hot swapping by rococo on Sunday February 10, 2013 @04:41PM (#5198040)
That is fantastic, thank you for this.