Write a pretty printer in Rust and win a bounty (console.algora.io)
from snaggen@programming.dev to rust@programming.dev on 17 Nov 2023 18:17
https://programming.dev/post/6018195

The Prettier Bounty is a challenge to write a prettier-compliant pretty printer in Rust

#rust

threaded - newest

RonSijm@programming.dev on 17 Nov 2023 20:59 collapse

$22k is pretty nice. Through I have no idea what “the prettier JavaScript tests” even means.

Is there a unit-test bootstap project someone could download that verifies this requirement? I’m already too confused deciphering what the contest even is

sugar_in_your_tea@sh.itjust.works on 17 Nov 2023 22:12 next collapse

Prettier is a Javascript code formatter, so it seems the challenge is to rewrite it in Rust.

Anders429@programming.dev on 18 Nov 2023 18:24 collapse

Wow, they really did not make that clear at all on the contest description.

sugar_in_your_tea@sh.itjust.works on 18 Nov 2023 19:49 next collapse

Yeah, “pretty printer” to me means some kind of pretty output library, like for terminal applications. I’d call this a “code formatter,” but whatever.

I guess this is what happens when your community doesn’t standardize on something early on. I guess I take cargo fmt for granted.

snaggen@programming.dev on 19 Nov 2023 11:24 collapse

They say you should pass 95% of the Prettier JavaScript tests to win the price.

Anders429@programming.dev on 19 Nov 2023 17:51 collapse

What tests? There is no hyperlink, for all I know, these are just some hidden tests that the owners of the competition run on the solutions to verify them. There is no link to Prettier at all, and at a first read it’s very unclear this is what they want you to do if you aren’t already familiar with the tool they want you to recreate.

snaggen@programming.dev on 19 Nov 2023 18:39 collapse

Ok, I don’t know what is more worrying, that a developer fails to find prettier on GitHub, or that a developer fails to Google it. But I guess that if you fail this, you were probably not the target audience for the challenge.

hascat@programming.dev on 19 Nov 2023 23:31 collapse

Nobody reading about the contest in the linked page should have to rely on Google to fully understand the parameters of the contest. Whoever authored this page is lazy.

Sigmatics@lemmy.ca on 18 Nov 2023 18:15 collapse

If you can do it in 2-3 months it’s worth it, else you’re probably not getting paid enough

RonSijm@programming.dev on 18 Nov 2023 18:24 collapse

It looks like a bunch of people from biomejs are already working on this:

github.com/biomejs/biome/commits/main

Not sure what they’re going to do with the money if it’s a team effort though

sukhmel@programming.dev on 21 Nov 2023 20:12 collapse

Split it maybe? After all, they’ve started before any prize was available for that, so it’ll be a nice bonus