Hacker News new | ask | show | jobs
by samatman 825 days ago
This is meant to be a friendly comment, because I think what you're doing here is cool and useful.

When I see "impressive thing in only a few lines of C", I think someone has invented a new way to crash my computer if I don't color inside invisible, underspecified lines.

What I'd want to see, if I were looking for a library like this, is tests. I see that you do have a test suite: that's good. I also see that it covers the basic functionality: that's a good start. There are a number of excellent tools for testing for the various woes which C code is prone to, consider integrating them.

C code doesn't have to be full of goblins which will venture forth at midnight and eat the candy out of your nose. But it should be suspected of such goblins until demonstrated otherwise. Few lines is actually good! And the test suite suggests you've implemented a good surface area here.

And 350 lines means you probably only need a couple thousand more to really, very thoroughly test the code. It will take some time but it's well worth it.