The hardest tarball
84 points by stabbles
84 points by stabbles
an archive that can be constructed using a single GNU tar invocation, that is extracted in 8 distinct ways depending on what tool you use
Hm interesting, I like these examples. I might call this a "maximum parser differential". Or I also called it a Yahtzee because you're "rolling the dice", and ideally you want the results to be the same, but they are different.
This came up here: comment on A Design Space Exploration of Async/Await
e.g. a (pseudo-code) async-await program that has 4 different behaviors in 4 languages, starting with
async fn write_to_log():
...
async fn fire_and_forget():
...
And then my own example of a POSIX shell script that has 4 behaviors in 4 shells:
command -v echo ZZZ for
echo status=$?
https://github.com/bashix-spec/bashix/blob/main/yahtzee/4-command.sh
OK and now I see you have tested this recent parser from Astral:
A fast and secure tar parser for the Rust ecosystem
The goal is reducing uv's exposure to parser differentials and other security risks
Any other "Yahtzee" examples? In any language or data format
I have this one:
IFS=' :'; a='x '; b=':'; printf '<%s>' $a$b $(echo 'x ')$(echo ':y')
which gives
bash <x><x><y>
dash <x><><x><><y>
mksh <x><><x><y>
zsh <x :><x><><y>
There's the "YAML document from hell" which parses differently in various parsers... https://ruuda.nl/2023/the-yaml-document-from-hell
Some discussion of this one here https://lobste.rs/s/nsymer/yaml_document_from_hell
You might like an investigation into how different GIF decoders treat an animation frame that is outside the bounds of the first frame's bounds.
Interesting. On the Haskell issue, is that something easy to fix in a PR or some kind of weird issue deeply embedded?