Live data from Hacker News

$20k bounty was claimed

prettier.io

121–130 of 345 posts

Re: $20k bounty was claimed

#121
post #23

I feel like people complaining about Prettier being "heavily opinionated" are missing the point. Perhaps I'm biased by my decade of using Go, but not having to worry about superfluous stylistic choices is a welcome reduction in cognitive load. (Up to a point I guess, e.g. I'd never put up with K&R-style newline opening brackets).

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

Why throw out the tool when you can have the tool ignore [1] whatever is outside the common case?

[1] https://prettier.io/docs/en/ignore.html

Re: $20k bounty was claimed

#123
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?

It sounds the same to me: JVM, but with better browser support.

Re: $20k bounty was claimed

#124

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?

Rust can run in the browser via compiling down to, and running as, WebAssembly. So I don't see why not.

Prettier is run mostly on the serverside though, not the browser. I assume supporting both is still desirable though

Re: $20k bounty was claimed

#125
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…

I can't speak for the Prettier folks, but as an OSS maintainer, I'm more interested in the problem being solved than everyone using my particular solution . I actually don't benefit at all from you using my code; I did all the work to make the world a place where $PROBLEM has an accessible solution. So if I were passionate about, say, JS code formatting, I would be pretty happy if someone came along and solved that p…

I'd guess a significant proportion of OSS maintainers _are_ in it for some combination of ego-trip, or a misguided belief that it will make them rich. Both outcomes may seem less likely if you're just fixing somebody else's software for free.

Re: $20k bounty was claimed

#126
post #98

> You may not be aware but thanks to all those donations, we've been able to pay two people $1.5k/month for the past two years to keep shipping. Fisker Cheung and Sosuke Suzuki have done an incredible job! It's incredible how little money some people get paid to build foundational pieces in a multi-trillion dollar industry.

Like the others said, Prettier isn't foundational.

That said, it brings in _much_ more value than $1.5k/mo. It has eliminated styling arguments on teams that adopt it. The amount of time saved in PRs/reduction of bikeshedding is very valuable.

Re: $20k bounty was claimed

#127

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.

I don't understand the hate for "kilometer-long" lines (say in the 120-200 char range). My screen is much wider than it is long, so having longer lines allows me to fit more code onto the screen at once (which is fantastic for readability). Also, sometimes the extra content is uninteresting. And it makes sense to hide it away where it's only sometimes seen.

Re: $20k bounty was claimed

#128
post #33

While it's always great to see performance gains, my largest pain point with prettier was never performance. Instead my only gripe with prettier is the "line wrapping noise" it creates, illustrated here by Anthony Fu: https://antfu.me/posts/why-not-prettier#the-line-wrapping-no... Would it be realistic to expect a solution for this issue now that "prettier needs to step up it's game"?

Yes, Prettier largely won by not having many competitors strictly focused on formatting in a simple to consume package.

I don't think many people who are serious about high "signal to noise" code formatting are supportive of the design decisions prettier makes. e.g. the staggered import lines, left-shifting and up-shifting of implementation details, not allowing trailing comments on the same line

We can have consistent formatting and also avoid tons of visual noise that prettier produces... I've wanted to build a competing solution for awhile, but never made the time for it. Perhaps Anthony's project achieves that... I'll give it a try!

Re: $20k bounty was claimed

#129
post #112
post #63

Earlier quoted context omitted.

I'd rather have a strict line length limit, than having my coworker creating objects in lines 150 or 180 chars long. So we'd end up discussing what is the best choice. I bet I'd also end up discussing those things with Anthony Fu. If the limit is 80, then the limit is 80 , not 81. Come Prettier. No more discussions. I definitely buy the tiny amount of "noise" it brings, in exchange for freeing me from an immense amou…

80 character limit? Are we trying to relive the late 80s. Soon we'll move back to 40 characters. Screens can support higher resolutions now limiting lines to 80 so developers can turn their brains off seems silly. Turn your brain on and learn to filter the noise of 100 characters.

100 is OK. But better to wager for 80, so people complain about their preferred 120+, and ending up with an acceptable 100 as a middle ground.

On my screen with 1920x1080, 2 side-by-side panels can fit 100 chars, but only if the sidebar is hidden (project layout, list of open files, that kind of stuff).

On my laptop, 2 side-by-side files won't fit if they exceed 90 chars.

I just don't want to concede to those devs who use a single editor pane with an ultrawide monitor, and believe that everybody must work like they do.

Re: $20k bounty was claimed

#130
post #93

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

`lineWidth` is actually one of the available options in the biome formatter: https://biomejs.dev/formatter#configuration

Yeah, but if you increase the lineWidth then it will make all your lines that long, even if you don't want them to be. There is no possibility for variability of line lengths depending on the code at hand.
Post reply on HN