Live data from Hacker News

$20k bounty was claimed

prettier.io

161–170 of 345 posts

Re: $20k bounty was claimed

#162
post #152
post #140

Earlier quoted context omitted.

> Why not set a bounty to improve Prettier instead of building a competing project just to increase the motivation to improve Prettier? There are three reasons, I think: 1. Writing a rust compiler is separate from prettier project because of its nature. Prettier is not written in Rust, and Rust has proven to be a robust option to write a formatter, so the goal really is to write a formatter in Rust itself, and it can…

>Great programmer who has the skill to answer this bounty get paid at least $200 an hour (extremely conservative estimate) Dang! What do you base this estimate on? The Rust aspect, or parsing aspect, or intersection of both?

A freelance developer can easily ask $250/hour, similar for a contract agency, and that is kind of a low amount. It sounds like a lot for a single developer but if one considers all of the non-billed time of chasing leads and bills it's maybe a different picture.

Re: $20k bounty was claimed

#163

Earlier quoted context omitted.

Prettier is very opinionated about line length which gofmt isn't. That's the only complaint I have and it's bad enough I just refuse to use it. Add one character to a line and enjoy a ten-line diff. Edit: See a contrived example of something gofmt doesn't touch (the behavior I want): https://go.dev/play/p/cKMKnFwT8tq

Funny, that's the one thing I complain about gofmt. I can cope with the occasional diff noise but avoid kilometer-long lines. This is especially noticeable for function names that get long quite quickly. Also, this means that there is more than one way to format the code, which stands pretty weird given the philosophy of Go.

Line breaks often carry meaning, for example many people like to line up things that belong together but which live on separate lines, and gofmt helps with this. Having many ways to format a given AST (unlike Prettier) is not against the Go philosphy which I would say is "be pragmatic".

If you want a line to be shorter because you as a human find it easier to read that way then you can add a linebreak yourself, and trust that your meaning will be preserved.

Re: $20k bounty was claimed

#164
post #146

Earlier quoted context omitted.

I don't want to disparage prettier, but to call it a foundational piece...

Maybe essential is a better word.

That is still far too much an exaggeration. This is an opinionated beautifier. Its a vanity item with some downstream utility benefits.

Re: $20k bounty was claimed

#165
post #8

> One question you are probably wondering is why would the Prettier team fund another project!? In practice, Prettier has been the dominant code formatter for JavaScript and as a result of a lack of competition, there has been little incentive to push on performance and fix various edge cases. I was indeed wondering that but the answer doesn't really answer the question for me. Why not set a bounty to improve Prettie…

> Why not set a bounty to improve Prettier instead of building a competing project just to increase the motivation to improve Prettier?

That's a good question. But a new, Rust (or whatever is fast) version of prettier is effectively Prettier. If it has the same config, switches, and defaults, it's Prettier.

The value of prettier is that it's a standard most of JS/TS agrees on, saving discussions for more important topics. The code that gets us there is a side effect.

Re: $20k bounty was claimed

#166
post #152
post #140

Earlier quoted context omitted.

> Why not set a bounty to improve Prettier instead of building a competing project just to increase the motivation to improve Prettier? There are three reasons, I think: 1. Writing a rust compiler is separate from prettier project because of its nature. Prettier is not written in Rust, and Rust has proven to be a robust option to write a formatter, so the goal really is to write a formatter in Rust itself, and it can…

>Great programmer who has the skill to answer this bounty get paid at least $200 an hour (extremely conservative estimate) Dang! What do you base this estimate on? The Rust aspect, or parsing aspect, or intersection of both?

[deleted]

Re: $20k bounty was claimed

#167

Earlier quoted context omitted.

Prettier is very opinionated about line length which gofmt isn't. That's the only complaint I have and it's bad enough I just refuse to use it. Add one character to a line and enjoy a ten-line diff. Edit: See a contrived example of something gofmt doesn't touch (the behavior I want): https://go.dev/play/p/cKMKnFwT8tq

What should Prettier should do in this case? I think we can all agree there should be a line length limit, it has to enforce it eventually. You could say “it’s just a couple more characters” until the line is 200 characters long. Semantic diff is maybe the solution.

It can safely ignore the line length, gofmt does this and I've never heard anyone complain about it. The VSCode formatter also doesn't touch line breaks and it works fine.

Last time I looked into it, the only reason I can't turn it off is that Prettier works off an AST that doesn't keep the line breaks that the user put into the code at all, and it "rebuilds" the whole code from this AST.

The problem is not the diff per se, the real problem is that I can't find a configuration of Prettier where I can have long lines where it makes sense and short ones where that makes sense.

Re: $20k bounty was claimed

#168

Maybe I missed it but I don't get how this improves the JS implementation Are they planning to run Rust in the browser? Or make some sort of node module that calls down into rust?

There are node modules already that call into WASM-wrapped rust. (One of the most common source map generation packages does exactly that and it is very heavily installed by a lot of frameworks and packagers today.)

I don't think prettier is intending to do that in this case, they seem to want to continue to compete as a pure JS implementation but having a "worst case, we WASM wrap biome as the future of prettier" possibility opens up future opportunities and pushes "internal" competition.

Re: $20k bounty was claimed

#169
post #146

Earlier quoted context omitted.

Maybe essential is a better word.

That is still far too much an exaggeration. This is an opinionated beautifier. Its a vanity item with some downstream utility benefits.

A formatter is pretty essential when working in a team. It saves tons of time wasted on code formatting in code reviews.

Re: $20k bounty was claimed

#170
post #96

I'm incredibly excited for this. The Biome team has been remarkably fast on achieving 95% compatibility with Prettier [1]. This will help to bring maximum speed to formatting Javascript thanks to Rust, following the ruff (Python formatter) trend. Just as a note, as it was not mentioned in the article, Wasmer [2] also participated with a $2,500 bounty to compile Biome to WASIX [3], and it has been awesome to see how t…

This is the first time I've come across WASIX. Upon reading about it, I can't help but see it as a reincarnation of the JVM. Is that accurate? What advantage is there to executing code in WASIX if it can access the system and isn't actually in a sandbox?

WASIX is similar to the JVM in the sense that is able to use a common abstraction for all operating systems, and it uses a VM under the hood (Wasm).

But the main difference is that it has sandboxed capabilities (similar to docker), do you can granularly add permissions to only certain directories or even disable networking when running.

Post reply on HN