Live data from Hacker News

Kickstarter: Make a Better CoffeeScript Compiler

kickstarter.com

21–30 of 56 posts

Re: Kickstarter: Make a Better CoffeeScript Compiler

#21
post #9

Is making those compiler features simple and easy? I was wondering why Rails.app need $25,000 while this is like half the price.

Not sure why you've been downvoted, because I somewhat agree with you. $12k is not bad for a few months if you happen to live in my country (Hungary, Middle Europe), but the expertise required by a full compiler rewrite is supposed to... cost more.

With that said, I don't mind Rails.app targeting $25k. Let the masses decide if that kind of budget is realistic.

Re: Kickstarter: Make a Better CoffeeScript Compiler

#24
post #10

Someone capable of writing this kind of software will earn much more than $3000 per month at a full time job. I understand that this is probably not a for-profit project but if the guy can dedicate 4 full time months to this than he: 1) Can work full time 2) Needs the money Why not find a regular programming job that will pay you much more?He is obviously skilled enough to be hired.

Fun fact: Money doesn't motivate everyone.

Maybe not, though if this project is successfull it will certainly increase his value. Eventually allowing him to earn more money!

Re: Kickstarter: Make a Better CoffeeScript Compiler

#25
post #2

I don't really see the benefits of this over the existing compiler. The changes sounds like they could be merged into the existing compiler as command line arguments with relative ease.

The author seems to believe that a complete rewrite is necessary to address fundamental design issues with the existing compiler. I don’t know much about CoffeeScript or its internals, but since he’s worked significantly on it, I’m inclined to trust his judgement.

Right. To elaborate, the benefits he enumerates are really things that he thinks will be easier after a complete rewrite into a more modular design.

Based on his description of the current CS compiler, it looks like the meat of the compilation from CS to JS is done in one step. After it's parsed into a CS AST, the AST is walked, and each node knows what JS it corresponds to. It prints it out as a string, and voila, you have JS.

A more orthodox and more robust design would parse the CS into an AST, and then push that AST through a series of stages. Each stage would transform the AST and have a narrowly defined purpose (flattening, uniqueification, etc), which should bring the AST closer and closer to a JS AST. The last step would be walking the AST and outputting strings.

So, one benefit he mentioned is that you can "define multiple sets of (CS)AST -> (JS)AST transformation rules for multiple compilation targets." What this means is that since the entire transformation won't be done in one step, this will allow the modularization of stages. So, suppose there's some stage that's making the JS more IE friendly, but you don't care about IE. No problem. Remove that stage, swap in something else.

Having multiple stages will also decouple parts of the design, and lessen the need for special casing. So, hopefully less bugs and more extensibility.

He also wants the JS AST to conform to some Mozilla standard, so existing tools will be able to operate on it. In fact, it sounds like his strategy for printing the JS AST into JS concrete syntax is to use an existing project that operates on these mozilla ASTs.

Re: Kickstarter: Make a Better CoffeeScript Compiler

#26

Separate to the idea itself, this KS made me realise there's an art to choosing the right rewards and levels. Some KS are just irrestible to donate to partly because they get the rewards just right. Others, like this one IMHO, don't make the most of it.

Kickstarter allows me to add rewards after the project has started. What kind of rewards would you like to see?

Re: Kickstarter: Make a Better CoffeeScript Compiler

#27
post #10

Someone capable of writing this kind of software will earn much more than $3000 per month at a full time job. I understand that this is probably not a for-profit project but if the guy can dedicate 4 full time months to this than he: 1) Can work full time 2) Needs the money Why not find a regular programming job that will pay you much more?He is obviously skilled enough to be hired.

You're completely missing the point. He's not proposing to write a compiler as a way to make money; he's trying to get his living expenses covered so he can write this compiler that he wants to write, and which he believes will be useful to others.

Thank you, you are exactly right. Working on CoffeeScript is my passion. I don't need any financial incentive to do it, I just need food, a place to live, and some cash to hold off my student loan creditors.

Re: Kickstarter: Make a Better CoffeeScript Compiler

#28

Separate to the idea itself, this KS made me realise there's an art to choosing the right rewards and levels. Some KS are just irrestible to donate to partly because they get the rewards just right. Others, like this one IMHO, don't make the most of it.

Kickstarter allows me to add rewards after the project has started. What kind of rewards would you like to see?

+ You want to have rewards in lower donation brackets. Right now there's nothing between $25 and $200 — if I were to donate, I'd likely donate more than 25, but less than 200. You probably want rewards at the 50, 75, 150 levels.

+ Most projects offer tangible rewards (posters, booklets, figurines, keychains, tees-shirts etc.) that are just cool to have for any self-respecting geek. Unfortunately you're a software enterprise so it's not that evident for you, but I'm sure you can be creative in that space.

Re: Kickstarter: Make a Better CoffeeScript Compiler

#29
post #28

Earlier quoted context omitted.

Kickstarter allows me to add rewards after the project has started. What kind of rewards would you like to see?

+ You want to have rewards in lower donation brackets. Right now there's nothing between $25 and $200 — if I were to donate, I'd likely donate more than 25, but less than 200. You probably want rewards at the 50, 75, 150 levels. + Most projects offer tangible rewards (posters, booklets, figurines, keychains, tees-shirts etc.) that are just cool to have for any self-respecting geek. Unfortunately you're a software ent…

That's a good idea. Michael, you should look into doing a run of CoffeeScript coffee mugs. These ones were much-loved and are no longer available: http://www.etsy.com/listing/93595042/coffeescript-mug

Re: Kickstarter: Make a Better CoffeeScript Compiler

#30
post #23

Is there any reason the compiler should be written in Javascript? I know it's pretty cool to have a language's compiler written in itself, but what if Javascript isn't the best environment to write a compiler?

What's really nice about the compiler being in JavaScript is that you can run JavaScript anywhere: in the browser, on any OS, embedded in any major web framework. If the compiler were written in any other language, you'd have to worry about dependencies.

This applies to HTML and CSS preprocessors as well: I'd advocate Jade over Haml and Stylus or Less over Sass, simply because Jade and Stylus/Less aren't tied to the Ruby ecosystem. JS is the real deal for "Write Once, Run Anywhere."

Post reply on HN