Na

Nanosecond C message logger

Hacker News

Nanosecond C message logger

Hello, Some time ago I did a data logger for fun, just to check if I could beat the performance of an old C++ project of mine (mini-async-log) and to avoid letting my multithreading-C skills rust when on a non-programming gig (using Yocto/OE, very little programming). This project is a BSD licensed, producer-wait-free (when using thread-local storage) generic message logger with high performance, decent test coverage, and type-safe C strings (requires C11 or C++ compiler). It was a shame to let this project to die unknown, as I think that it has potential to be used on some niches as network programs, HFT, games, etc. so here I am sharing it. https://github.com/RafaGago/mini-async-log This was an evolution of a similar logger I did, this time I wanted to achieve wait-free producers, so this implementation can use thread-local storage to achieve that. Some other non allocation-free strategies are also available. I still aimed for as easy as possible usage/learning curve and maintenance vs lots of features. It has some interesting things too: -It has one modification on Djukov's MPMC queue to make it MPSC and accepting variable (but limited) bucket size allocations (at the expense of unfairness towards bigger buckets). There are more modifications/variations on this Djukov queue on the library where I'm collecting all the generic stuff that I use when developing C programs. -The project still maintains automatic type detection of the string formatters by using "clever" hardcore C preprocessor abuse mixed with C11 type-generic expressions. It still accepts most non-type printf modifiers. This is at the same time beautiful and ugly (you know what I mean), for the uglyness part, automated testing is available. NOTE: Untested on Windows.

Share card

Actual performance

131points
9comments
Made the leaderboard

Launch Intel predictions

Analyze your own launch →
Indie HackersFits the IH revenue-focused audience · Missing: supports, reddit linkedin, podcasting
78%78% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.
best fitHighest predicted score across all platforms for this description.
Product HuntUnlikely to reach the leaderboard · Strong signals: using · Missing: mac, agents, macos
50%50% predicted probability of success on Product Hunt, 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
50%50% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
AppSumoMay struggle as an AppSumo deal · Missing: plus, platform, intuitive
43%43% predicted probability of success on AppSumo, based on ML models trained on real launch data.
TrustMRRLess likely to generate early MRR · Missing: mobile apps, ios, personal
42%42% predicted probability of success on TrustMRR, based on ML models trained on real launch data.
Acquire.comPre-revenue stage for this audience · Missing: arr, mrr, revenue
12%12% 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.

Incorrect prediction on native model

Similar products

Ba
Bare Message Encoding48%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Bare Message Encoding

Hacker News2
Th
The Bare Message Encoding48%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

The Bare Message Encoding

Hacker News36
Th
Throw Your Message into the Void58%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Throw Your Message into the Void

Hacker News4
So
SocioLotto (app) Your chance to get your message broadcast to everyone53%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

SocioLotto (app) Your chance to get your message broadcast to everyone

Hacker News3
Fa
Fast Java Classes for Message Digests (SHA, MD5, BLAKE, etc.)27%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Fast Java Classes for Message Digests (SHA, MD5, BLAKE, etc.)

Hacker News2
Cr
Creatively Share Your Message46%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Creatively Share Your Message

Hacker News2
Po
Pollux – A Message Passing Cloud Orchestrator51%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Pollux – A Message Passing Cloud Orchestrator

Hacker News5
Fe
Feedahead.com – Separating the Message from the Mesenger41%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Feedahead.com – Separating the Message from the Mesenger

Hacker News1
Pi
Pipecat – Connect message queues with Unix pipes51%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Pipecat – Connect message queues with Unix pipes

Hacker News48
Me
Message that expresses the essence of why a customer buys43%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Message that expresses the essence of why a customer buys

Hacker News1