News for hackers. Stuff that matters.
Re:Intro to CoffeeScript by sergiotapia on Sunday August 04, 2013 @10:29PM (#6158092)
Is CoffeeScript used much outside of Rails? If not, wouldn't it be a better idea to focus on mastering javascript so it applies globally?
Re:Intro to CoffeeScript by zbruhnke on Sunday August 04, 2013 @10:53PM (#6158164)
We've built a product in coffee-script that is made for navigating websites and forms logging and scraping and pulling in data.

It's quite useful outside of rails in that sense I'd say. It could have just as easily been done in JavaScript but I'm not a fan of the syntax(fuck curly braces)

I'd maintain that just about anything out there can be used outside of the context you think of it in.

Asking if coffeescript is useful outside of rails is similar to asking is perl is useful outside of scripting, it's a poor and misguided conception that languages can only be used in a certain way or with a certain tool.

I'd say that's true much more often than not that if you know a language well you can build complex applications with it.

Re:Intro to CoffeeScript by aseemk on Sunday August 04, 2013 @10:41PM (#6158118)
I don't know Rails personally. Both at FiftyThree and with Thingdom, we use CoffeeScript with Node, both on the server-side and client-side.
Re:Intro to CoffeeScript by davidbanham on Monday August 05, 2013 @05:29AM (#6159156)
I would recommend against using any CoffeeScript before you're proficient with JavaScript. It can be a great boon to productivity, but if you don't understand what it's doing underneath you'll shoot yourself in the foot a lot.
Re:Intro to CoffeeScript by tlrobinson on Monday August 05, 2013 @05:49AM (#6159216)
I like CoffeeScript but I agree with this.

Also, yes, plenty of people outside of the Rails community use CoffeeScript (I'm one of them)

Re:Intro to CoffeeScript by bdcravens on Sunday August 04, 2013 @10:59PM (#6158186)
After you load up the CoffeeScript module in your app.js (server.js etc) you can actually write an entire node.js app in CoffeeScript.
Re:Intro to CoffeeScript by tlrobinson on Monday August 05, 2013 @05:58AM (#6159241)
(Or just run the .coffee with "coffee" instead of "node")
Re:Intro to CoffeeScript by bdcravens on Monday August 05, 2013 @04:27PM (#6162719)
True, I was thinking about universal deployment to PaaSes, etc
Re:Intro to CoffeeScript by brightsize on Monday August 05, 2013 @01:27AM (#6158618)
CS support is built-in to the Play! framework (Scala). By that I mean that it detects your CS files and compiles them for you as needed, then puts the resultant JS where it belongs amidst your static resources.
Re:Intro to CoffeeScript by woofyman on Sunday August 04, 2013 @10:54PM (#6158167)
We use CoffeeScript with both Ember and Angular. Rails is not used.
Re:Intro to CoffeeScript by pjscott on Monday August 05, 2013 @05:15AM (#6159116)
CoffeeScript is, essentially, an unofficial Javascript 2.0. It's not at all tied to Rails.
Re:Intro to CoffeeScript by ihsw on Sunday August 04, 2013 @11:39PM (#6158296)
I'm working on a Symfony/CoffeeScript/AngularJS/Bootstrap3 project right now. Haven't tried Ruby or Rails yet.
Re:Intro to CoffeeScript by cuttooth on Sunday August 04, 2013 @10:36PM (#6158108)
The presentation is very well put together, but CoffeeScript is a hack built on top of JS in order to use Ruby semantics. You're correct in that it's not really used outside of Rails, and not knowing JS proper (not that I personally recommend using it for much more than jQuery and a couple other libraries, when you absolutely must) poses a problem for when someone runs into the 97% of code that is JS.
Re:Intro to CoffeeScript by justinsteele on Sunday August 04, 2013 @10:50PM (#6158152)
"Not really used outside of Rails" - Do you have any source to back that up, or is it simply what you've seen? I first used CoffeeScript in a Python shop, personally.
Re:Intro to CoffeeScript by tlrobinson on Monday August 05, 2013 @06:05AM (#6159265)
Pretty much everything in this comment is wrong (though I do recommend learning JavaScript before CoffeeScript)

CoffeeScript is no more of a "hack" than any compiler. Compilers take one language and turn it into another.

I think you mean Ruby syntax, not semantics. CoffeeScript's semantics are much closer to JavaScript than Ruby in almost every way.

It may have it's roots in the Ruby world, but I'd wager more non-Rubyists use CS at this point than Rubyists. I'm one of them.

Re:Intro to CoffeeScript by davidbanham on Monday August 05, 2013 @05:31AM (#6159161)
I write CS for nodeJS apps every day. The only Ruby I write is for Chef and it usually makes me mad. I've never written a Rails app.
Re:Intro to CoffeeScript by bdcravens on Sunday August 04, 2013 @10:58PM (#6158184)
You could possibly argue the semantics thing about Ember.
Re:Intro to CoffeeScript by joshuacc on Monday August 05, 2013 @10:13AM (#6160180)
I'm currently using CoffeeScript on an Angular project with a Java Spring backend.
Re:Intro to CoffeeScript by derengel on Sunday August 04, 2013 @11:03PM (#6158199)
Well, surely JS is a better bet than CS, if that is what you mean.