

Github: CoffeeScript cracks the top 10 languages  - martyman
https://github.com/languages

======
jashkenas
Whoops -- cancel the party folks. Apparently the rankings just count the
percentage of GitHub repos with _any_ amount of the language in it. I bet
CoffeeScript's recent rise has a lot to do with a handful of auto-generated-
by-default files in Rails projects.

Source: <https://twitter.com/joshpeek/status/205783659830198273>

------
timr
I don't get it.

I'm in the process of ripping the last bit of coffeescript out of our code.
The marginal benefits of the language don't exceed the costs of having another
build dependency, and another syntax to understand. For daily work, I
_already_ have to switch contexts between Javascript, CSS, SCSS, HTML, rHTML,
HAML and Ruby (not to mention other _tools_ like Bash, Rake, etc., along with
API knowledge like the Rails API, jQuery, and all of the various un- or
poorly-documented gems). Ultimately, it's a huge mental burden. Every new
thing is a _new thing_ that someone has to understand to be productive.

To justify the extra mental cost of another piece of technology, it has to do
something pretty amazing. A minor syntactical transformation of javascript
just doesn't cut it.

~~~
benatkin
It's more expressive. It's like going from having a 19" monitor with 1440x900
to a 24" monitor with 1920x1080. Sure, you can do all the things you can
normally do with the 24" monitor that you could do with the 19" monitor, but
it isn't as pleasant or efficient.

The place it best fits in right now is for in-house software development at a
place with a low turnover of developers. 37signals has a very low turnover, so
it shouldn't be surprising that it fits them well. That mental burden is low,
compared with the time saved using it.

~~~
timr
_"It's like going from having a 19" monitor with 1440x900 to a 24" monitor
with 1920x1080."_

Ehh....I think you're overstating it, but to each their own. To make the
comparison fair, you'd have to turn it into something more obtrusive: it's
like going from a 19" monitor to a 20" monitor that's driven by one of those
$300 USB video cards that gets really hot and eats up desk space and might
occasionally cause RFI problems with my wireless mouse.

Or more directly, it's like going from Ruby to Python, or vice-versa, by using
a tool that converts one to the other. They're different, and they have
different syntactical features, but the annoyances of either language balance
the benefits to the extent that I can't confidently exclaim that one is
better. And the auto-generation step would just cause pain.

The critical difference here is that to use coffeescript, I have to add
_another_ (IMNSHO) annoying step to my build process. Another layer of
indirection to obfuscate bugs. Another sprocket that can come unglued and bork
my app at any time. No thanks. I'll stick with my current complexity level,
and write my list comprehensions as loops.

~~~
Morg
Apart from the fact that Python can be infinitely faster than rails, I'd just
say that any more javascript is bad news, bee it coffee based or node based or
whatever. Someone forgot to go back in time and shoot John "javascript"
Connor.

On topic, your main problem is that you're playing the one man army with too
many tools, that is obviously unrelated to CS or any language.

It's likely you wouldn't mind the additional complexity if you were only
working on front-end.

~~~
FuzzyDunlop
> _"Apart from the fact that Python can be infinitely faster than rails"_

Don't you mean Ruby?

~~~
Morg
indeed.

------
jashkenas
It'd be nice to have someone from GitHub comment on how these rankings are
calculated. Raw LOC? Percentage of projects with at least one X language file
in them? Percentage of projects that have a plurality of source code in X
language?

~~~
kibwen
I second this request. Been wondering more about this process ever since I
noticed, sometime in January, that Rust (a nascent language with very little
use yet) was ranked in the low-20s for language popularity. The problem likely
had to do with how the Rust devs registered their language with Github's
Linguist[1] project; Rust's units of compilation ("crates") have the .rc
extension, and Github must have taken this to mean that _every_ project with a
.rc file (notably many Android-specific projects) contained Rust code. The
Rust devs have since revoked that association from Linguist[2], but since
Github takes a while to reevaluate a project's language breakdown, the
language's popularity ranking on Github is still artificially inflated
(sitting at #31 at the moment).

[1] <https://github.com/github/linguist>

[2] <https://github.com/mozilla/rust/issues/1512>

~~~
Tobu
.rc files don't dominate a project in file count or SLOC, so I think the
answer to jashkenas' question is something like this:

    
    
        pop[lang] = avg(loc(proj, lang) / loc(proj) for proj in projects)

~~~
kibwen
That depends on the project:

<https://github.com/CM7-GB/android_device_motorola_droid2we>

Note the language breakdown, under the Graphs tab.

But yes, it all hinges on how Github measures popularity. For one, I'm curious
how forked repositories are counted; if I have a 100kloc Blub project and it
gets forked 100 times, does Github count that as 100,000 or 10,000,000 lines
of Blub?

~~~
technomancy
defunkt has confirmed that at least in the past if you had a repo with 100
Perl files and one JavaScript file it would count equally towards both
languages.

------
TrevorBurnham
They said it couldn't be done, but CoffeeScript bumped Objective-C down to
#11.

Of course, I think it's fair to say that there's more Obj-C code than
CoffeeScript being written, but less of it is being open-sourced.

~~~
chrisaycock
Yeah, that seems like a good explanation. Obj-C has 85574 questions on
StackOverflow, CoffeeScript has 1476.

<http://stackoverflow.com/tags>

~~~
re_todd
You have to factor in all the newbies that here all this doom and gloom about
the job market in the media, and the last tidbit in the news story usually
mentions "but there is a lot of growth in iPhone and Android apps". This is
probably causing a lot of people new to programming to learn Objective-C, thus
many more questions.

~~~
Morg
You want newbies ? go javascript.

I can't believe I'm reading an argument favoring Obj-C over (any flavor of) js
as a noob turf...

The simple reason there's disparity is that github is not the center of the
world and objC people mostly code for money, that's all there is to it.

~~~
re_todd
I'm not saying newbies get very far with it.

------
tolmasky
I'm curious whether GitHub includes private repos in these statistics. If not,
then I'd be curious how it would change things if they did (not saying they
should, just curious to contemplate the difference).

~~~
technoweenie
We include only public repositories in those stats. I ran the numbers across
the site, and the rankings don't change much. Javascript and ruby are still at
the top, but Objective-C and Coffeescript are 10 and 11.

------
meanguy
<http://en.wikipedia.org/wiki/Selection_bias>

I don't think this says much about CoffeeScript, which I use. However I do
think it says quite a bit about how GitHub has plenty of room to grow as they
make themselves more attractive to a broader market.

A very interesting chart would be GitHub account revenue broken down by file
extension. Note that I didn't say language, as the real money is in assets,
not code.

------
JoachimSchipper
Isn't this simply a category error? C++98 and C++0x aren't separate languages,
nor are Python 2.x and 3.x. CoffeeScript has good branding, but is it really
its own language?

~~~
Me1000
Of course CoffeeScript is its own language. What kind of requirements do you
think a language requires that CoffeeScript doesn't meet?

~~~
raganwald
My suggestion:

For some language X where Y “compiles to “ X, Y is a new language if it
introduces _new semantics_. For example, pure functional semantics, or object-
orientation, or pattern matching, or method flavours, or static typing.

One easy test for this is to ask whether compiling Y to X can be done in small
chunks or whether it requires “Whole program rewriting.” For example,
transforming a program with continuations into CPS requires whole-program
rewriting. I would call any language that adds continuations to JavaScript a
new language on that basis alone.

CoffeeScript is almost entirely local transformations. I think of it as
JavaScript.

~~~
jonmrodriguez
Why is this downvoted? Seems like a reasonable suggestion, and I don't see the
haters suggesting alternative criteria...

~~~
endtime
I didn't downvote him, but one alternative is that a language is defined by a
grammar. Of course you'd want to group certain very similar grammars together
as one language (Python 2.x and 3.x), but the grammars of CoffeeScript and
JavaScript are significantly different.

~~~
raganwald
That’s also a reasonable definition. Since I didn’t say “if and only if,” both
definitions are compatible. By the grammar definition, we could make a
language with pure JavaScript semantics but Lisp-ish s-exprs, and it would be
a different language as well.

------
klapinat0r
Having coded in javascript for 4 or so years, and a recent love for NodeJS in
a couple of internal projects, I'm a bit torn between giving coffee a proper
go or not.

Can any one employee give a gist of how used it is in production? From what
I've seen I would love to use coffee (I've actually used coffee in reverse, to
tweak out a javascript function), but I'm wondering if I'd be lowering my
productivity.

What I mean by that is, if I wrote coffeescript, but everyone else worked in
javascript (or compiled coffee), then it'd be silly of me to continue doing
so. Similarly I've watched a lot of node module development over the past
year, and only once I've come across a module written in coffee.

I do of course realize NodeJS in itself is not "very" widespread yet, but are
there any node users who can shed some light on the possible future of coffee
in node?

~~~
danneu
Why are you so cautious to "give it a proper go"? It's not a big mental
investment.

------
Alex3917
Is this just for coffeescript proper or are they counting all the variants of
coffeescript as well?

~~~
Tobu
It needs to have the .coffee extension (or two variants):
[https://github.com/github/linguist/blob/master/lib/linguist/...](https://github.com/github/linguist/blob/master/lib/linguist/languages.yml#L232)

------
DigitalSea
Ugh, Coffeescript. Javascript doesn't need any further abstraction, we already
have jQuery which made everyone's lives easier but at the same time has
created a new-breed of developers who only know jQuery and not Javascript
itself. This is the exact same thing, people will know Coffeescript if it
takes off further in popularity but won't know Javascript.

------
arrowgunz
That is so sad. I am not a fan of CoffeeScript. The language is like Ruby and
When people try to make one language look like another, I don't like it. I
probably would have liked it if the syntax was a bit different. It looks more
like a ruby propaganda.

Incoming hatred.

~~~
chc
This is the weirdest, least substantial criticism I've ever seen of
CoffeeScript. Do you hate C for looking like B? Python for looking like a
cross between C and ABC? Haskell for looking like ML? Objective-C for looking
like both C and Smalltalk? Almost every mainstream language for pretty
strongly resembling ALGOL-68? Heck, Ruby itself was intentionally made to look
like Perl. Criticizing a language's syntax is often just an expression of
personal preference — but criticizing a language for using syntactic
conventions that are familiar and generally well-liked? That just makes no
sense.

