News for hackers. Stuff that matters.
Re:Announcing CoffeeScript 2 by no_wizard on Monday September 18, 2017 @03:14PM (#15278647)
I figured jQuery would be fine. Now that I think about it, I can't imagine why most things wouldn't really, since all javascript libraries are just extensions of those things.

Does CoffeeScript just convert the modules methods/functions accordingly when needing to be called?

Just curious how that works.

Since so much of JavaScript development, especially nowadays, ties into a lot of frameworks/libraries (modules? I'm not always sure what we want to call it), I just didn't see a reference (maybe I missed it) on their page in regards to what it actually looks like to invoke module/framework/library specific things.

Re:Announcing CoffeeScript 2 by syntheticcdo on Monday September 18, 2017 @11:00PM (#15281460)
I work with a 100% CS code base and lodash chains are a dream working in CS as opposed to vanilla JS, something like:

  capitalStringsWithX = _.chain array
    .map (item) -> item.toUpperCase()
    .filter (item) -> item.includes "X"
    .value()
as opposed to:

  var capitalStringsWithX = _.chain(array)
    .map(function(item) { return item.toUpperCase(); })
    .filter(function(item) { return item.includes("X"); })
    .value();
Re:Announcing CoffeeScript 2 by ralmidani on Monday September 18, 2017 @03:26PM (#15278744)
CoffeeScript does not do anything framework- or library-specific. It simply compiles your code to JavaScript, which is then parsed and executed as usual.
Re:Announcing CoffeeScript 2 by no_wizard on Monday September 18, 2017 @04:44PM (#15279376)
Good point. I guess I'm not making myself clear. If I'm working with jQuery, for instance, do I need to do anything different than I do now in terms of invoking say, the simplest thing, $(function({_..code here.._}) (or for you old schoolers $document.ready({_..code here.._}). Thats what I guess I mean. Maybe I just need to toy with it. I suspect I might be overthinking this in my head.
Re:Announcing CoffeeScript 2 by maxscam on Monday September 18, 2017 @05:03PM (#15279556)
Its actually a great example of Coffeesctipt conciseness, the jQuery ready function is just $ ->
Re:Announcing CoffeeScript 2 by ralmidani on Monday September 18, 2017 @05:06PM (#15279582)
Yeah, play around with the online compiler on the website.

Your jQuery example would simply be written:

$ -> _..code here.._