Live data from Hacker News

Wuffs: Wrangling Untrusted File Formats Safely

github.com

1–10 of 73 posts

Re: Wuffs: Wrangling Untrusted File Formats Safely

#7

This is one of my favorite attempts at better programming language safety, because it compiles down to C that can then be shipped like normal C, so you don't get the ecosystem friction like with ex. Rust.

It’s an interesting idea for sure but it isn’t a general purpose language, so the problem domains it can solve is very very different vs what Rust is trying to do.

Re: Wuffs: Wrangling Untrusted File Formats Safely

#8

Does anyone know of a tool that can do this for PDFs instead?

As soon as someone writes a Javascript interpreter in Wuffs..

Do you ever need a JS interpreter to parse a PDF? That's horrifying.

I understand PDF has a bunch of limbs, but I always assumed the JS stuff was at least separate from the parsing. (I am familiar with the PDF format at a lower level but I never touched any of the weird features.)

Re: Wuffs: Wrangling Untrusted File Formats Safely

#9

Does anyone know of a tool that can do this for PDFs instead?

There are PDF readers that do not support the scripting format extensions.

Note this does not prevent unscrupulous companies abusing dominant market positions to voluntarily embed machine and serial hash watermarks.

To be clear: formats like pdf, ps, webp, svg, and tiff are so badly implemented in some ecosystems... they can't _ever_ be assumed safe input formats. Thus, at some point people need to spin up an actual VM to transcode a "web" version, and scrub each stage of the rendering pipeline like a virus or header injection is already present.

"I never play where nice things are, and don't break things" (Eliza Mowry Blven, The Humanitarian Review, Volume 3, March, 1905)

Cheers =3

Re: Wuffs: Wrangling Untrusted File Formats Safely

#10

This is one of my favorite attempts at better programming language safety, because it compiles down to C that can then be shipped like normal C, so you don't get the ecosystem friction like with ex. Rust.

It’s an interesting idea for sure but it isn’t a general purpose language, so the problem domains it can solve is very very different vs what Rust is trying to do.

Nigel has said that emitting "unsafe" Rust is a reasonable thing for a hypothetical WUFFS 1.0 to be able to do as an alternative to C. As with good "unsafe" Rust written by humans WUFFS would know exactly why what it's doing is fine, it's just that the Rust compiler can't necessarily see that, hence the need to label it "unsafe".

Today C makes most sense given the WUFFS language is still in flux.

[Edited to fix a serious typo]

Post reply on HN