pottery
Stockfish
pottery | Stockfish | |
---|---|---|
14 | 150 | |
119 | 10,528 | |
- | 1.6% | |
1.8 | 9.6 | |
about 2 years ago | 3 days ago | |
C | C++ | |
MIT License | GNU General Public License v3.0 only |
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.
pottery
-
Popular Data Structure Libraries in C ?
Pottery - The page for open hash map reads "Documentation still needs to be written. In the meantime check out the examples."
-
So what's the best data structures and algorithms library for C?
"Using macros" is a broad description that covers multiple paradigms. There are libraries that use macros in combination with typed pointers and functions that take void* parameters to provide some degree of API genericity and type safety at the same time (e.g. stb_ds and, as you mentioned, my own CC). There are libraries that use macros (or #include directives) to manually instantiate templates (e.g. STC, M*LIB, and Pottery). And then there are libraries that are implemented entirely or almost entirely as macros (e.g. uthash).
-
Better C Generics: The Extendible _Generic
The prototype of CC used this mechanism to provide a generic API for types instantiated via templates (so basically like other container libraries, but with an extendible-_Generic-based API laid over the top of the generated types). This approach has some significant advantages over the approach CC now uses, but I got a bit obsessed with eliminating the need to manually instantiate templates.
- C_dictionary: A simple dynamically typed and sized hashmap in C - feedback welcome
-
Common libraries and data structures for C
I think it's common for C programmers to roll their own. I did the same [0].
I went pretty deep into composable C templates to build mine so it's more powerful than most. The containers can handle non-bitwise-movable types with full C++-style lifecycle functions and such, and the sort algorithms can handle dynamic and non-contiguous arrays (they are powerful enough to implement qsort() [1], which is more than I can say for any other C sort templates I've seen.) My reasoning for the complexity at the time was that any powerful container library is going to be reasonably complex in implementation (as anyone who's looked at STL source code knows), so it just needs to be encapsulated behind a good interface.
I'm not so sure that's true anymore. These sorts of simpler libraries like the one linked here definitely seem to be more popular among C programmers. I think if people are using C, it's not just the C++ language complexity they want to get away from, but also the implementation complexity of libraries and such. There's a balance to be had for sure, and I think the balance varies from person to person, which is why no library has emerged as the de facto standard for containers in C.
[0]: https://github.com/ludocode/pottery
- C++ containers but in C
- Pottery – A pure C, include-only, type-safe, algorithm template library
- Ask HN: What you up to? (Who doesn't want to be hired?)
-
Type-safe generic data structures in C
Yes! The include style of templates in C is way better than the old way of huge macros to instantiate code. The template code can look mostly like idiomatic C, it interacts way better with a debugger, it gives better compiler errors... everything about it is better and it's finally starting to become more popular.
I've open sourced my own C template library here:
https://github.com/ludocode/pottery
Not only does it use the #include style of templates, but it actually makes the templates composable. It takes this idea pretty far, for example having a lifecycle template that lets you define operations on your type like move, copy, destroy, etc. This way the containers can fully manage the lifecycles of your types even if they're not bitwise movable.
There's also this other more popular C template library, one that tries to more directly port C++ templates to C but with a lot less features:
https://github.com/glouw/ctl/
-
Beating Up on Qsort (2019)
This article doesn't really make it clear but the merge sort discussion is specifically about glibc's implementation of qsort(). glibc's qsort() and Wine's qsort() are the only ones I know of that use merge sort to implement qsort(). Most implementations use quick sort.
I recently did my own benchmarking on various qsort()s since I was trying to implement a faster one. The various BSDs and macOS qsort() are all faster than glibc at sorting integers and they don't allocate memory:
https://github.com/ludocode/pottery/tree/master/examples/pot...
Of course sorting is much faster if you can inline the comparator so a templated sort algorithm is always going to be faster than a function that takes a function pointer. But this does not require C++; it can be done in plain C. The templated intro_sort from Pottery (linked above) is competitive with std::sort, as are the excellent swensort/sort templates:
https://github.com/swenson/sort
Stockfish
-
Manipulating the Internal World Model of a Chess Playing Language Model
The Stockfish program can be set to play at strength level 0-20. Estimates of the levels' Elo is provided here: https://github.com/official-stockfish/Stockfish/commit/a08b8...
-
A chess terminal user interface implementation
- and handicapped Stockfish (https://stockfishchess.org).
The whole thing is at https://github.com/magv/bchess, and can be installed with just 'pip install bchess'.
- What could I contribute to chess as a developer?
-
posttest-cli beta testers wanted
This was the result searching for all the 35 stockfish benchmark positions to depth 6.
-
How many positions can the top GMs analyze per second? In engine terms what is the highest nps for humans?
Stockfish doesn't have a classical evaluation anymore. And before this, most of the time (around 90%), NNUE was used to evaluate.
-
Stockfish 16 Released +47 Elo gain over Stockfish 15 (Single threaded, UHO)
If you use ChessBase on a MacBook through Parallels, there's an issue where people have posted Apple Silicon compiles for Windows: https://github.com/official-stockfish/Stockfish/issues/4241
-
Stockfish 16 is ready!
Progress can be found here https://github.com/official-stockfish/Stockfish/wiki/Regression-Tests At 1 thread it has gained +18.3 elo on a balanced book, and +47.03 on UHO (unbalanced) book as well as +39.4 elo for FRC and +65.56 for DFRC. At 8 threads it has gained +14.33 elo on a balanced book and +49.46 on UHO (unbalanced book). Also testing was done on 8 threads with 180+1.8 (this is considered very long time control for fishtest standards) and progress was +9.45 on balanced book and +49.65 on UHO.
-
Stockfish 16 is ready
Downloads are available temporarily here https://github.com/official-stockfish/Stockfish/releases/tag/stockfish-dev-20230622-a49b3ba7
-
Is there an engine stronger than Stockfish 15.1?
The strongest version of Stockfish is the latest development version of Stockfish
-
How to integrate Stockfish chess engine into React Native app (for both Android and iOS)
I am trying to implement Stockfish (a popular chess engine) into my React Native app.
What are some alternatives?
mpack - MPack - A C encoder/decoder for the MessagePack serialization format / msgpack.org[C]
nibbler - Chess analysis GUI for UCI engines, with extra features for Leela (Lc0) in particular.
pdqsort - Pattern-defeating quicksort.
nnue-pytorch - Stockfish NNUE (Chess evaluation) trainer in Pytorch
mavis - opinionated typing library for elixir
lc0 - The rewritten engine, originally for tensorflow. Now all other backends have been ported here.
sc - Common libraries and data structures for C.
fishtest - The Stockfish testing framework
Klib - A standalone and lightweight C library
maia-chess - Maia is a human-like neural network chess engine trained on millions of human games.
ctl - My variant of the C Template Library
Ciphey - ⚡ Automatically decrypt encryptions without knowing the key or cipher, decode encodings, and crack hashes ⚡