Re:CoffeeScript2 - A Redesign of the CoffeeScript Compiler
by michaelficarra on Saturday June 02, 2012 @08:05PM
(#4059610)
Fear not. The re-implementation will be completely backwards compatible. It just a smoother compilation pipeline, and adds some output configurability. But regardless, Jeremy and I have decided it would be best to change the name.
Re:CoffeeScript2 - A Redesign of the CoffeeScript Compiler
by michaelficarra on Saturday June 02, 2012 @09:10PM
(#4059730)
The names I suggested were "CoffeeScript: Reloaded", "CoffeeScript Episode II: Attack of the Clones", "The CoffeeScript Supremacy", and "Live Free or CoffeeScript Hard". Technically, right now it's "CoffeeScript II: The Wrath of Khan". Jeremy suggested CoffeeScript Redux. That's probably the best choice, though a little boring.
Re:CoffeeScript2 - A Redesign of the CoffeeScript Compiler
by almost on Sunday June 03, 2012 @07:19AM
(#4060526)
Maybe a name that distinguishes this compiler for CoffeeScript from CoffeeScript-the-language would be better? There may be other CoffeeScript compilers int the future, should they really all have the same name and be numbered? "CoffeeScript 2" (or any whimsical name that contains "CoffeeScript") would be confusing, it implies that it's the second version of the original CoffeeScript compiler, which it isn't.
Re:CoffeeScript2 - A Redesign of the CoffeeScript Compiler
by mistercow on Saturday June 02, 2012 @07:16PM
(#4059495)
I would be surprised if he didn't have Ashkenas's blessing on the name, since he's been the second biggest contributor to the main CoffeeScript project.
Re:CoffeeScript2 - A Redesign of the CoffeeScript Compiler
by michaelficarra on Saturday June 02, 2012 @08:11PM
(#4059626)
That would just be a default in my fork. Since the output will be massively configurable, you can use any style you can imagine, including a single line with all the braces and semicolons and whitespace you want. See http://oai.cwi.nl/oai/asset/10876/10876D.pdf for a resource on defining grammars for AST to CST transformations.
Re:CoffeeScript2 - A Redesign of the CoffeeScript Compiler
by ajross on Sunday June 03, 2012 @10:58AM
(#4060876)
Yes yes, but some do, it was a giant flame war, and I'll admit that it can be a practical issue (if not a correctness one) for javascript to rely on automatic semicolon insertion if it means you can't use your minifier of choice.
But trying to use a "validator" that validates a languages other than the one you are writing is just plain insane.
Re:CoffeeScript2 - A Redesign of the CoffeeScript Compiler
by mistercow on Saturday June 02, 2012 @08:36PM
(#4059675)
I'm not sure I agree that ASI is an "error-correction feature". Die-hard always-semicolon advocates certainly would like to paint it that way, but I think that may be rewriting history a bit.
Re:CoffeeScript2 - A Redesign of the CoffeeScript Compiler
by tomku on Saturday June 02, 2012 @09:23PM
(#4059750)
The ECMAscript standard[1] and the creator of the language[2] are pretty clear about it. From what I know of parsing, anything phrased in terms of adding tokens post-lexing in order to make an invalid parse tree valid as opposed to encoding the semantics in the grammar itself is most definitely an error correction method.
I think that a lot of the confusion comes from taking the term "error" personally. Nobody wants to be told that their programming style relies on "error correction" to be parsed, but it's just an implementation detail of the parser, not some kind of qualitative statement about your programming skills. Changing the name does not change how the parser works, and does not make anyone involved a better or worse programmer.
Re:CoffeeScript2 - A Redesign of the CoffeeScript Compiler
by mistercow on Saturday June 02, 2012 @11:28PM
(#4059973)
Fair enough, but a statement like "compiled output shouldn't be relying on an error-correction feature" is only (self-evidently) true if we're using the informal, taking-it-personally connotations of "error correction".
Re:CoffeeScript2 - A Redesign of the CoffeeScript Compiler
by michaelficarra on Saturday June 02, 2012 @08:02PM
(#4059604)
I just want to make sure people know that those changes are bound for a fork once I reach full compliance with the current compiler. The project's one and only goal is to implement the language exactly as Jeremy's compiler does, but be prettier underneath (more extensible, versatile, configurable, robust, etc).
Re:CoffeeScript2 - A Redesign of the CoffeeScript Compiler
by GeZe on Saturday June 02, 2012 @07:19PM
(#4059504)
For those who don't want to wait, most of the public-facing changes listed there are already in LiveScript (http://gkz.github.com/LiveScript/) - though with a few more (in my opinion well justified) incompatibilities.
Re:CoffeeScript2 - A Redesign of the CoffeeScript Compiler
by sirclueless on Saturday June 02, 2012 @06:28PM
(#4059389)
Forgive me for being skeptical, but it seems to me that CoffeeScript is going the way of Lisp: a language by hackers for hackers, with way too many incompatible implementations because each implementer has their own pet features that must be included.
Re:CoffeeScript2 - A Redesign of the CoffeeScript Compiler
by jashkenas on Saturday June 02, 2012 @07:25PM
(#4059512)
Whoops -- I think you're missing a big part of the point of compiling into "standard" JavaScript. Not only is CoffeeScript code fully compatible with any JS library ... it's also compatible with code generated by any version of the compiler, and with code generated by alterna-compilers like Coco, and eventually this project as well. The semantic compatibility exists at the "plain 'ol" JS level.
Re:CoffeeScript2 - A Redesign of the CoffeeScript Compiler
by streptomycin on Saturday June 02, 2012 @10:56PM
(#4059895)
That only solves part of the problem. It's still a big pain to have different syntax dialects and different tools that have to be used for different projects that are ostensibly written with the same language, even if they are compatible after you compile them to JS.
Re:CoffeeScript2 - A Redesign of the CoffeeScript Compiler
by yuchi on Saturday June 02, 2012 @07:05PM
(#4059469)
There's already a production ready transpiler, and a big bunch of production code to test against every new transpiler. Why do you think this is going to be a reason for fragmentation?
And, by the way, coffeescript is not intended to be a language for hackers (I mean, only for hackers) but for Ruby programmers moving to javascript, JS programmers looking for a more terse syntax and programmers with an eye for terseness.
In my opinion it has only two big flaws that need to be targeted by new transpilers: 1) for --> each 2) parens free chainable syntax.
Re:CoffeeScript2 - A Redesign of the CoffeeScript Compiler
by mistercow on Saturday June 02, 2012 @07:41PM
(#4059554)
Well, one reason that it could go that way is that the attitude that the maintainers has had toward feature-creep is "just make your own fork!" That's why we now have more dialects than we can shake a stick at, but it has kept the main branch from becoming PHP.
Re:CoffeeScript2 - A Redesign of the CoffeeScript Compiler
by mistercow on Sunday June 03, 2012 @09:59AM
(#4060739)
"Transpiler" is a subset of "compiler", so it can hardly be a demeaning term. A transpiler is simply a compiler that translates code from language A to language B where A and B have roughly the same abstraction level. It is true that CoffeeScript is slightly more abstract than JavaScript in a few features (although JavaScript's inheritance model is more abstract than CoffeeScript's classes, for example), but any difference in abstraction level is tiny compared to the difference between, say, C and assembly.
Re:CoffeeScript2 - A Redesign of the CoffeeScript Compiler
by pbiggar on Saturday June 02, 2012 @11:34PM
(#4059983)
The phrase "proper compiler-design principles" really gets on my nerves for some reason. It instantly makes me doubt the ability of the person saying it. It seems to say "I've heard of Lex/Yacc and once glanced at the Dragon Book".
Anyway, I gather the OP is a coffeescript core contributor, so my default opinion is probably wrong in this case, hopefully.
Re:CoffeeScript2 - A Redesign of the CoffeeScript Compiler
by tferris on Sunday June 03, 2012 @12:57AM
(#4060103)
This and nine more CoffeeScript derivates* from people who rather like to fragment a landscape with marginal improvements instead of supporting the leading pack are the reasons that CoffeScript hasn't reach critical mass and will fail as a standard.
Re:CoffeeScript2 - A Redesign of the CoffeeScript Compiler
by johnfn on Sunday June 03, 2012 @01:26AM
(#4060146)
CoffeeScript hasn't attained critical mass? It's the 10th most popular language on github[1], over a decade younger than all the other contenders, and growing quickly.
Even if CoffeeScript was as niche as you argue, I'm not convinced that that would have any bearing on its success. CoffeeScript doesn't need a wide community to achieve success because it compiles to and is completely interoperable with JavaScript, the most popular programming language.
Re:CoffeeScript2 - A Redesign of the CoffeeScript Compiler
by tferris on Sunday June 03, 2012 @02:27AM
(#4060227)
Regarding the front end side the CoffeeScript adoption is high and mainly driven by Rails but if you look at the back end it's different: CoffeeScript could not established with Node (most npm packages are in plain JS) and mixing Coffee and JS on the backend does not really work out (it's possible though).
Re:CoffeeScript2 - A Redesign of the CoffeeScript Compiler
by almost on Sunday June 03, 2012 @06:48AM
(#4060497)
CoffeeScript relies heavily on the underlying JavaScript semantics (which is one of the main reasons it's so useful: It's Just JavaScript) so other backends would most likely be a lot harder to do than the JS one.
Re:CoffeeScript2 - A Redesign of the CoffeeScript Compiler
by rjd on Sunday June 03, 2012 @02:23AM
(#4060222)
So... I hope this isn't the future of updates to open source projects... crowd fund us or we won't do it... starting to see a pattern projects using this technique (albeit none are out rightly saying them won't its just implied)... not sure its a healthy development myself.
Re:CoffeeScript2 - A Redesign of the CoffeeScript Compiler
by tinco on Sunday June 03, 2012 @07:54AM
(#4060567)
It is an excellent development. It means developers can finally start to live from _independent_ open source development.
This is not and never will be a replacement for hobby opensource, because that is done by developers who just want to do it, it would not make sense for them to threaten to not do it if we don't give them money.
This is for the people who contribute to opensource, but also have a day job developing low-impact closed source commercial software, who don't have time or energy for large refactorings and rewrites.
"Crowd fund us or we won't do it" sure is a lot better than "We won't do it".
Re:CoffeeScript2 - A Redesign of the CoffeeScript Compiler
by emp_ on Saturday June 02, 2012 @07:52PM
(#4059579)
When I saw the empty repo (just with the README) and before reading the kickstarter page or comments here, I thought it was another vapor.js-like joke as a compliment to the original compiler, which IMO does it very well.
I feel that it implies that it's an official project, but it's actually a re-implementation and separate project.
And if they're not backwards compatible it could lead to a ton of confusion and a fragmented language.
I think if you want your own project then you should at the very least get your own name.
That would be the fourth version of CoffeeScript. The 2nd version would be "CoffeeScript 2: Script Harder" which is much more awesome.
Since naming after desserts and alliterative animals has already been done, I wholeheartedly support action film naming conventions.
https://github.com/michaelficarra/coffee-of-my-dreams
Is he nuts? The compiled output shouldn't be relying on an error-correction feature. Especially since it might break minifiers and validators.
But trying to use a "validator" that validates a languages other than the one you are writing is just plain insane.
I think that a lot of the confusion comes from taking the term "error" personally. Nobody wants to be told that their programming style relies on "error correction" to be parsed, but it's just an implementation detail of the parser, not some kind of qualitative statement about your programming skills. Changing the name does not change how the parser works, and does not make anyone involved a better or worse programmer.
[1]: http://www.ecma-international.org/publications/files/ECMA-ST... (PDF) , section 7.9
[2]: http://brendaneich.com/2012/04/the-infernal-semicolon/, specifically "The moral of this story: ASI is (formally speaking) a syntactic error correction procedure."
And, by the way, coffeescript is not intended to be a language for hackers (I mean, only for hackers) but for Ruby programmers moving to javascript, JS programmers looking for a more terse syntax and programmers with an eye for terseness.
In my opinion it has only two big flaws that need to be targeted by new transpilers: 1) for --> each 2) parens free chainable syntax.
Anyway, I gather the OP is a coffeescript core contributor, so my default opinion is probably wrong in this case, hopefully.
* https://github.com/jashkenas/coffee-script/wiki/List-of-lang...
Even if CoffeeScript was as niche as you argue, I'm not convinced that that would have any bearing on its success. CoffeeScript doesn't need a wide community to achieve success because it compiles to and is completely interoperable with JavaScript, the most popular programming language.
[1]: https://github.com/languages
Thanks Groupon and others for supporting this, I would agree with commenters that name is confusing.
How about multiple backend support? Perhaps then someone could add a dart or NaCl backend.
"Crowd fund us or we won't do it" sure is a lot better than "We won't do it".