Skip to main content

Show HN: Nanosecond C message logger http://bit.ly/2DmJViN

Show HN: 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. http://bit.ly/2nOlMGV 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. January 20, 2019 at 09:07AM

Comments

Popular posts from this blog

Launch HN: Simmer (YC W19) – Reviews for Delivery Dishes https://ift.tt/2Y4sD67

Launch HN: Simmer (YC W19) – Reviews for Delivery Dishes Hi HackerNews community! We’re Vaibhav and Richard, founders of Simmer ( https://usesimmer.com ). Simmer aggregates dishes from DoorDash, Caviar, GrubHub, and basically every other delivery platform out there, and tells users the best dishes across the board. We do this by providing dish-level reviews. Users find highly reviewed dishes on Simmer, choose the delivery platform of their liking, and we deep link them into their chosen delivery app. We essentially lead gen to delivery. We started working on Simmer because we loved trying new restaurants, but never knew what to order. Especially, when there’s a 5 page menu. We always asked ourselves, “Why aren’t there ratings for individual dishes?” We launched our app with this restaurant-centric use case (reviews for every dish at every restaurant), but when we rolled out delivery integrations, we realized that users resonated most with the delivery angle. They found it particularly ...