Our great sponsors
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
stricks
-
Buffet
> I was thinking about Simple Dynamic Strings but I like this better.
Oh! here's my chance to plug https://github.com/alcover/stricks ! It follows the same principle as SDS (i.e user-facing type is char*) but is much faster (see bench) and frankly nicer to read through.
Not as feature complete, though.
-
Speeding past Redis/SDS strings
Mine is also variable (see https://github.com/alcover/stricks/blob/main/src/stx.c). Maybe they switch more often that necessary ?
The threads were very interesting. I got back to work and it's time to talk speed ! https://github.com/alcover/stricks#speed
- Show HN: Stricks, managed C strings library
nbdkit
- TIL: You Can Stop Updating Copyright Attribution Years (2021)
- Starting October 19, storage limit will be enforced on all Gitlab Free accounts
-
The C/C++ preprocessor iceberg with explanations
We use this (trick taken from stackoverflow) to make __COUNTER__ usefully provide unique names:
https://gitlab.com/nbdkit/nbdkit/-/blob/master/common/includ...
Example use:
https://gitlab.com/nbdkit/nbdkit/-/blob/master/common/includ...
I don't know what __EXP_COUNTER__ would add.
- Buffet
-
A 100LOC C impl of memset, that is faster than glibc's
This is an interesting related problem - how do you efficiently test if a buffer contains zeroes? There's actually no standard C function for this. My colleagues came up with the following nice trick though. It reuses the (presumably already maximally optimized) memcmp function from libc:
https://gitlab.com/nbdkit/nbdkit/-/blob/b31859402d1404ba0433...
static inline bool __attribute__((__nonnull__ (1)))
-
Imaging mounted disk volumes under duress
It's a shame that Linux doesn't have APIs as comprehensive as Windows VSS. One of the several features is something called Volume Shadow Copy which lets you take backups of block devices which are in use, similar to this but more supported.
[Also if you are playing with block devices in Linux -- mounted or otherwise but not /dev/sda -- https://gitlab.com/nbdkit/nbdkit]
- Transmission torrent client ported to C++
What are some alternatives?
qemu
libnbd
dattobd - kernel module for taking block-level snapshots and incremental backups of Linux block devices
transgui - 🧲 A feature rich cross platform Transmission BitTorrent client. Faster and has more functionality than the built-in web GUI.
bfg-repo-cleaner - Removes large or troublesome blobs like git-filter-branch does, but faster. And written in Scala
abseil-cpp - Abseil Common Libraries (C++)
glibc - GNU Libc
git-filter-repo - Quickly rewrite git repository history (filter-branch replacement)
memset_benchmark - This repository contains high-performance implementations of memset and memcpy in assembly.
buffet - All-inclusive Buffer for C
aria2 - aria2 is a lightweight multi-protocol & multi-source, cross platform download utility operated in command-line. It supports HTTP/HTTPS, FTP, SFTP, BitTorrent and Metalink.
safeclib - safec libc extension with all C11 Annex K functions