Klib
C++ Format
Our great sponsors
Klib | C++ Format | |
---|---|---|
14 | 83 | |
3,586 | 14,424 | |
- | 2.8% | |
0.4 | 9.7 | |
5 months ago | 2 days ago | |
C | C++ | |
MIT License | GNU General Public License v3.0 or later |
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.
Klib
- C++ containers but in C
-
Im looking for a good hashtable fonction to use
If you want a generic, extremely high performance implementation. I really recommend khash: https://github.com/attractivechaos/klib/blob/master/khashl.h
- What if Linus Torvalds used C++ instead of C
-
sqzlib - kseq compatible DNA fastA/Q encoding and compression library
Most importantly, sqzlib is fully compatible with klib/kseq.h one of the highest performance fastA/Q parsers. This means that any application that uses kseq.h for fastA/Q parsing, can be easily modified to use sqzlib instead. You can find patched versions of seqstats, minimap2, and bwa-mem2 in my github, or you can patch them yourself with the included patches.
-
"Implementing Hash Tables in C" (an article I've drafter a few years ago, but never published it until... now)
I don;t know if you are aware of khash? It's a very nifty hash table implementation. It is one of the fastest hash table implementations out there. Heavily used in bioinformatics. You said in your post that you are a macro guy, well, you are in for a treat with this library.
- Metaprogramming custom control structures in C
- I still like C and strongly dislike C++
-
Type-safe generic data structures in C
This is in fact a pretty common pattern in production code.
Here's an entire suit of type safe generic data structures in C: https://github.com/attractivechaos/klib
-
How to structure C code? It appears to reward shallow functions and doing everything in the global scope, whereas other languages let you go as deep as you want at no cost.
You will probably want to invest some time into either finding a good data structures library (preferable) or writing your own data structures (fine to do but not a good use of your time if you're starting out). You can try SGLIB or klib.
- Performance comparison: counting words in Python, Go, C++, C, AWK, Forth, and Rust
C++ Format
-
Is there a way to automate file naming when creating and writing to new files?
use fmt https://github.com/fmtlib/fmt it can be used header only and gives you safe string formatting that you can use for the filename.
-
C++ {fmt} Library Overview & Cheat Sheets
{fmt} is a fast(er) and safe(r) alternative to C stdio (printf,...) and C++ iostreams (std::cout,...) that uses a Pythonesque format string syntax and is the origin and inspiration of C++20's std::format and C++23's upcoming std::print.
-
C++ vs Python runtime
Look at another library that implements printing in C++, fmt, especially to part dedicated to benchmarks, you will see that this library is much faster then std::ostream (which is cout) so there is definitely room for improvement.
-
Print statement in JaVa
Any idea how it compares to FMT?
-
Store formatted value inside std::string
std::format unfortunately is only supported by MSVC at this point, so if you’re on gcc/clang/other you’ll need to stick to fmt
-
Maybe take the course before creating this advert ._.
And overall slower than some alternatives like fmt library which I highly recomend
Here is link number 1 - Previous text "fmt"
-
I cannot for the life of me figure out how to get libraries working
Conan or Vcpkg are probably the best way forward to begin with. Seriously, stop what you are doing and go try those out on something simpler first, e.g. A hello world using fmtfmt, or a unit test using catch2.
- std::cout << "Hello, world!" << std::endl
- CMake + Poco + FetchContent build options problem
What are some alternatives?
spdlog - Fast C++ logging library.
FastFormat - The fastest, most robust C++ formatting library
ZXing - ZXing ("Zebra Crossing") barcode scanning library for Java, Android
Better Enums - C++ compile-time enum to string, iteration, in a single header file
compiler-explorer - Run compilers interactively from your web browser and interact with the assembly
dragonbox - Reference implementation of Dragonbox in C++
ZBar - Clone of the mercurial repository http://zbar.hg.sourceforge.net:8000/hgroot/zbar/zbar
Scintilla
cxx-prettyprint - A header-only library for C++(0x) that allows automagic pretty-printing of any container.
Cppcheck - static analysis of C/C++ code
ZLib - A massively spiffy yet delicately unobtrusive compression library.
HTTP Parser - http request/response parser for c