
Show HN: Mini_printf – minimal, self-contained and verified printf() - wkoszek
https://github.com/wkoszek/mini_printf
======
DanWaterworth
Calling it verified seems like a stretch. When I think verified, I think seL4,
CompCert, etc. The role of testing isn't verification, it's falsification.

~~~
wkoszek
I agree it's a mistake. I made the change to the README.md and gave you a
credit for spotting it.

[https://github.com/wkoszek/mini_printf/commit/fb096cabb5dcba...](https://github.com/wkoszek/mini_printf/commit/fb096cabb5dcba3a1e081a68d9d3f1001ccc5f23)

------
markrages

      typedef unsigned int	u32;
      typedef unsigned long	u64;
    

This does not look like portable code.

~~~
wkoszek
The problem is that I didn't want to make this code depend on stdint.h

So yeah - depending on the platform you will need to make u32/u64 point to
things from your stdint.h (or whatever that is) and the code should work.

~~~
jotux
>I didn't want to make this code depend on stdint.h

Why?

~~~
wkoszek
Some environments don't have stdint.h

------
rffn
Your code does not seem to mention its license anywhere. This makes it
impossible to use in most projects. For commercial embedded a BSD-style
license seems to be better. For using it in GPL software GPL would work
better. IANAL but without a license and a copyright notice depending on the
country the viewer is in it might be even up for grabs for them to put on
their own copyright and license.

~~~
wkoszek
Good point, since I forgot. It's a BSDv2 code. Credit goes to you:

[https://github.com/wkoszek/mini_printf/commit/1fbf606cb23f2e...](https://github.com/wkoszek/mini_printf/commit/1fbf606cb23f2e0f9b0746b697c8355c11078c4a)

