Ge

Generic and variadic printing library in C

Hacker News

Generic and variadic printing library in C

I was making a printf wrapper with some extra features when I thought "hey, now that C has _Generic, is there any way to combine that with varargs?". The closest solution I found online was this: https://github.com/exebook/generic-print Which works, but only under GCC (since it uses an extension instead of _Generic) and its not very robust in general. So, I rolled my own, with a different macro hack and I think it came out reasonably well. Its not documented yet, because I'm unsure about the interface, but extending it with user structs is also possible without editing the header. (Example in 'example-user-type.c'.)

Share card

Actual performance

4points
Did not reach leaderboard

Launch Intel predictions

Analyze your own launch →
TrustMRRFits verified-revenue profile · Strong signals: way · Missing: mobile apps, ios, personal
62%62% predicted probability of success on TrustMRR, based on ML models trained on real launch data.
best fitHighest predicted score across all platforms for this description.
AppSumoStrong fit for a featured deal · Strong signals: interface · Missing: plus, platform, intuitive
51%51% predicted probability of success on AppSumo, based on ML models trained on real launch data.
Hacker NewsMay not resonate with HN audience · Strong signals: io · Missing: https docs, excited, just released
48%48% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
Indie HackersIH features products with proven revenue · Missing: supports, reddit linkedin, podcasting
47%47% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.
Product HuntUnlikely to reach the leaderboard · Strong signals: mac, user · Missing: agents, macos, agent
36%36% predicted probability of success on Product Hunt, based on ML models trained on real launch data.
Acquire.comPre-revenue stage for this audience · Missing: arr, mrr, revenue
11%11% predicted probability of success on Acquire.com, based on ML models trained on real launch data.
BetaListMay not resonate with beta-testers · Missing: web3, chat, crypto
0%0% predicted probability of success on BetaList, based on ML models trained on real launch data.

Correct prediction on native model

Similar products

3D
3D printing molds for pressed dough (speculoos)50%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

3D printing molds for pressed dough (speculoos)

Hacker News1
Ma
Makely – 3D Printing for Everyone50%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Makely – 3D Printing for Everyone

Hacker News4
Ma
Makely – 3D Printing for Everyone50%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Makely – 3D Printing for Everyone

Hacker News10
iT
iTunes for 3D printing48%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

iTunes for 3D printing

Hacker News46
Th
The Economics of the 3D Printing Bureau50%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

The Economics of the 3D Printing Bureau

Hacker News1
DO3Dimension
DO3Dimension78%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Artisan Keycaps and 3D Printing

Indie Hackers1$300/moart
printrite
printrite38%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

An online printing platform

Indie Hackerscommitment-full-time
I
I wrote a library to read/write/export 3D printing STL files41%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

I wrote a library to read/write/export 3D printing STL files

Hacker News4
Claydo
Claydo57%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

3d modelling and printing app

Indie Hackers
ma
mario.py, a convenience library for i/o35%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

mario.py, a convenience library for i/o

Hacker News2