Hacker News new | past | comments | ask | show | jobs | submit login
CoffeeScript in Firefox console with DOM support (github.com/paulmillr)
54 points by paulmillr on Feb 25, 2013 | hide | past | favorite | 17 comments



Thank you. I've been wanting to get better at CoffeeScript but my workflow depends on being able to run JS in the console. This is great.

Can you make it for Chrome too? I've tried some of the Chrome extensions that claim to let you use CoffeeScript, but none of them work as nicely as this.


Actually, I tried, just when CoffeeConsole was released.

https://github.com/snookca/CoffeeConsole/issues/2

Back then I failed. It seemed like Chrome didn’t exposed full console and window api to extensions or so. I doubt things have changed since then. But i’ll try anyway.

I had also advocated for improving built-in Safari web inspector, to make it expose reasonable APIs for extensions like this (radar issue #11653556). Unfortunately, without any result.


Looks great, but the 2.x series seems like it requires Firefox 20. Do I need to get on the beta or is it just an addon version requirement mixup?


It's needed. This addon uses an API only available with Firefox 20.


Thanks for the clarification :)



As i’ve noticed in repository readme, Chrome coffeescript addons cannot manipulate DOM or play nicely (or even reasonably) with window properties. They’re just shortcuts for coffeescript.org, which just compiles coffee down to JS. This seems useless to me, because I want coffeescript as first-class browser citizen.


I know this is probably hugely unpopular here, but I really wish coffeescript would go away, but perhaps some of it's best features get integrated into the next version if JavaScript.


Even if you don't like CoffeeScript, i think you should take a moment to consider the value of this tool: it integrates a language that is not natively supported by browsers into the REPL of the browsers themselves, letting you have awesome interaction with the webpage in that foreign language. These are exactly the kind of things we need to make using other languages than JS for front-end web development less painful.


That's a valid point. Though I wonder if it really is a step in that direction, or if it will only be relevant for languages that compile down to Javascript?


Do you dislike the language itself (like in the criticism of http://blog.izs.me/post/10213512387/javascript-is-not-web-as...) or the community?


I don't really know much about the coffeescript community, although being totally honest, as a detached observer I do get a whiff of a "chip on the shoulder" kinda attitude. Perhaps no different from any language though.

I use Backbone.js quite a lot, though, so I suppose you could say I am a fan of Jeremy Ashkenas' work, even though I don't like coffeescript. It doesn't solve anything for me - it just makes things a little different without offering any major benefit for me. The article you linked to was an interesting read, I hadn't really thought about it enough to put it into words.

I don't really like being a naysayer about technology or sticking my head in the sand. I think the best parts of coffeescript will eventually make their way into Javascript and then coffeescript won't be necessary anymore (unless it also continues to evolve). In which case, browser support for it seems unnecessary to me.

Or, perhaps it'll become a first class language in the browser and then in two years we'll have some other language that compiles to coffeescript...? It seems ridiculous to me, but I don't see why that wouldn't happen.


    > I think the best parts of coffeescript will eventually make 
    > their way into Javascript and then coffeescript won't be 
    > necessary anymore [...]
For what it's worth, that also sounds just fine to me ;)


hehe, love HN!


If you don't like it, don't use it. Why is that so difficult? Troll elsewhere.


Well , coffee-script exists because it brings some choice to front-end scripting.

If javascript was good there would be no need for all these langages that compiles down to javascript.

Anyway, i did not not the "then" trick with classes , like

new class then constructor:-> @param="something


I like Javascript. It took me some time to fully understand it, but it is rewarding.

Coffeescript feels to me like the icing on the cake for anyone who understands what the resulting JS will function like.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: