A tool for file diff in competitive programming

Revision en2, by ChrisVilches, 2021-11-06 18:33:42

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.

Tags tools, debugging

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en6 English ChrisVilches 2021-11-06 19:01:03 4 formatting
en5 English ChrisVilches 2021-11-06 18:55:11 18 reword
en4 English ChrisVilches 2021-11-06 18:36:39 8
en3 English ChrisVilches 2021-11-06 18:34:13 40
en2 English ChrisVilches 2021-11-06 18:33:42 62
en1 English ChrisVilches 2021-11-06 18:33:27 1636 Initial revision (published)