Hello guys
I'm here to share a new software I made (open source) for competitive programming. After being a bit frustrated with the vanilla sdiff
and diff
I decided to create my own stuff, since I didn't find anything simple like I wanted.
https://github.com/ChrisVilches/cpdiff
Usage is also quite easy, like (there are more ways of using it, as stated in the readme):
./your_program < data.in | cpdiff data.out
Basically the idea is to have a more ad-hoc diff tool for competitive programming. Also it has green text when all answers are correct, and who doesn't like seeing more green on screen? lol
It can be installed via NPM as the readme says.
Some features: * Ignores extra spaces and lines (kind of opinionated, but the main priority in my program is to get the calculations correct rather than focusing on avoiding presentation errors) * When a numeric line is detected, it does a comparison using a certain error (currently 10^-5 is hardcoded. Configuration may come in the future). Therefore you can still get the "Accepted" text but with a warning that some numbers might be inaccurate. If the line contains many numbers, they are all compared to their counterparts in the compared file. * When a line is detected to be non-numeric, a raw vanilla string comparison is done.
There are still several things that I'd like to add, but it's kind of beta right now. I might continue to add features if I have more users. Contributions are also welcome.