Manage all types of time series data in a single, purpose-built database. Run at any scale in any environment in the cloud, on-premises, or at the edge. Learn more →
Top 23 C C99 Projects
A fast entity component system (ECS) for C & C++Project mention: What's your way to create an ECS? | /r/gamedev | 2023-11-05
I'm trying to optimize my workflow as much as possible, and came across this thing called an ECS. After doing a little bit more digging I found some decent guides on how you would make one, I also found one premade called FLECS. FLECS is nice and all, but I was looking for something more simple that just has the bare bones of what I need and is also configurable. I haven't been able to really find anything like that, so I was wondering if anyone had an example of maybe their way of implementing an ECS. I know how to go about it, but I'm unsure of exactly what the code would look like.
An implementation of the TLS/SSL protocolsProject mention: OpenSSL 1.1.1 End of Life | news.ycombinator.com | 2023-09-11
I think GnuTLS is probably the second most popular TLS library, after openssl.
I'll also mentions s2n and rustls-ffi for completeness as C libraries, though the former isn't widely used, and the latter is very experimental still. https://github.com/aws/s2n-tls and https://github.com/rustls/rustls-ffi respectively.
Learn any GitHub repo in 59 seconds. Onboard AI learns any GitHub repo in minutes and lets you chat with it to locate functionality, understand different parts, and generate new code. Use it for free at www.getonboard.dev.
:diamond_shape_with_a_dot_inside: Single-file glTF 2.0 loader and writer written in C99Project mention: Confused in terms of where to start with framework/technology etc. Need help picking between learning ShaderToy v/s OpenGL v/s WebGL | /r/GraphicsProgramming | 2023-06-20
If you want to go all the way, https://learnopengl.com/ is a favorite around here. You could build a glTF viewer from scratch starting from that tutorial and https://github.com/jkuhlmann/cgltf and eventually building towards https://google.github.io/filament/Filament.html or whatever wacky artsy direction you like.
C99, header-only framework for games and multimedia applications
:herb: Fast streaming XML parser written in C99 with >90% test coverage; moved from SourceForge to GitHub
A collection of tools and algorithms for developing traditional roguelikes. Such as field-of-view, pathfinding, and a tile-based terminal emulator.Project mention: Sharing Saturday #459 | /r/roguelikedev | 2023-03-24
libtcod | GitHub | Issues | Forum | Changelog | Documentation | Template
A mini-preprocessor library to demostrate the recursive capabilites of the preprocessor (by pfultz2)Project mention: Object-oriented Programming with ANSI-C [pdf] | news.ycombinator.com | 2023-06-21
Where cloak.h is https://github.com/pfultz2/Cloak/blob/master/cloak.h
The above macros are admitttedly very hairy. If C had a better preprocessor, but was otherwise unchanged, they could look a lot nicer.
> I never said such a thing. Would appreciate if you didn't put words in my mouth.
A normal part of dialogue is, "I'm going to repeat your point back to you in my own words, and you can either agree with my restating of it, or point out at which point I've misunderstood you". That's what I was doing. "Would appreciate if you didn't put words in my mouth" is unnecessary hostility.
> In my concrete example, given that FILE and DIR were classified as objects, to which of the so-called objects does F(const char*, FILE, DIR) belong?
Take any language which you agree is "OO". Add one new feature (if it isn't already there): functions/methods which don't belong to any class/object. Now the function you are talking about is possible in that language. Did the language thereby suddenly cease to be OO when we added that feature? Most people would disagree with "Yes". But if "No", what is the actual difference between C and that language?
Collect and Analyze Billions of Data Points in Real Time. Manage all types of time series data in a single, purpose-built database. Run at any scale in any environment in the cloud, on-premises, or at the edge.
Algebraic data types for C99Project mention: Future of high-level languages | /r/ProgrammingLanguages | 2023-04-24
Sum types and pattern matching have already been hacked together in a preprocessor macro in C; see https://github.com/Hirrolot/datatype99.
Full-blown preprocessor metaprogrammingProject mention: How to convert an enum to string in C++ | news.ycombinator.com | 2023-09-30
There are also other approaches. Macro variants making use of `__VA_ARGS__` would be probably the best trade-off. If you want a slightly more ergonomic syntax, something like Metalang99  will help (and the author even wrote a post about this exact subject ). Codegen is another option which may work better than other options depending on the situation and exact implementation strategy. And there is always the Reflection TS , which may or may not be incorporated to C++26...
Simple, modern libpng alternativeProject mention: libpng VS libspng - a user suggested alternative | libhunt.com/r/libpng | 2023-10-30
libspng is already in LibHunt. I'm surprised there is no comparison with libpng.
A tiny programming language that transpiles to C, C++, Java, TypeScript, Python, C#, Swift, Lua and WebAssembly 🚀
Header only mesh voxelizer in c99
x86 PC emulator that runs both natively and in the browser, via WebAssembly
A C99 SDK for connecting devices to Microsoft Azure IoT servicesProject mention: I'm trying to communicate with the iot hub via an edge gateway device | /r/AZURE | 2023-03-29
I'm trying to send data via an edge gateway device. I have set up my edge device which is a linux machine (https://learn.microsoft.com/en-us/azure/iot-edge/how-to-provision-devices-at-scale-linux-symmetric?view=iotedge-1.4&tabs=individual-enrollment%2Cubuntu), now I need to send data from an esp32 device to the iot hub via the edge gateway device. The example code given in the azure iot edge documentation is in C (https://github.com/Azure/azure-iot-sdk-c/blob/main/iothub_client/samples/iotedge_downstream_device_sample/iotedge_downstream_device_sample.c), I need it in the arduino framework for my esp32 device.
A C99 3D game engine
Small & portable byte-aligned LZ77 compression (by ariya)
single header C(99) library to implement client-server network code for gamesProject mention: Networking and multiplayer | /r/raylib | 2023-04-28
There's examples and on YT theres some videos showing off the lib.
C99 parser and frontend for libfirm (by libfirm)Project mention: Cparser – A C99 parser (with GNU extensions) (2020) | news.ycombinator.com | 2023-08-15
Full-featured interfaces for C99
A hash array-mapped trie implementation in CProject mention: Visual Introduction to Hash-Array Mapped Tries (HAMTs) | news.ycombinator.com | 2023-08-24
This isn't a very good explanation. The wikipedia article isn't great either. I like this description:
The name does tell you quite a bit about what these are:
* Hash - rather than directly using the keys to navigate the structure, the keys are hashed, and the hashes are used for navigation. This turns potentially long, poorly-distributed keys into short, well-distributed keys. However, that does mean you have to compute a hash on every access, and have to deal with hash collisions. The mkirchner implementation above calls collisions "hash exhaustion", and deals with them using some generational hashing scheme. I think i'd fall back to collision lists until that was conclusively proven to be too slow.
* Trie - the tree is navigated by indexing nodes using chunks of the (hash of the) key, rather than comparing the keys in the node
* Array mapped - sparse nodes are compressed, using a bitmap to indicate which logical slots are occupied, and then only storing those. The bitmaps live in the parent node, rather than the node itself, i think? Presumably helps with fetching.
A HAMT contains a lot of small nodes. If every entry is a bitmap plus a pointer, then it's two words, and if we use five-bit chunks, then each node can be up to 32 entries, but i would imagine the majority are small, so a typical node might be 64 bytes. I worry that doing a malloc for each one would end up with a lot of overhead. Are HAMTs often implemented with some more custom memory management? Can you allocate a big block and then carve it up?
Could you do a slightly relaxed HAMT where nodes are not always fully compact, but sized to the smallest suitable power of two entries? That might let you use some sort of buddy allocation scheme. It would also let you insert and delete without having to reallocate the node. Although i suppose you can already do that by mapping a few empty slots.
simple java virtual machineProject mention: Simple Open-Source Java Virtual Machine in C | news.ycombinator.com | 2023-09-19
Unintrusive algorithms for C arrays OR a C implementation of <algorithm> from C++Project mention: A header-only C implementation of C++ &lt;algorithm&gt; | /r/patient_hackernews | 2023-07-04
Notcurses-based software rasterizer inspired by OpenGL 1.X that renders directly to the terminal
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
C C99 related posts
What's your way to create an ECS?
1 project | /r/gamedev | 5 Nov 2023
libpng VS libspng - a user suggested alternative
2 projects | 30 Oct 2023
Simple Open-Source Java Virtual Machine in C
2 projects | news.ycombinator.com | 19 Sep 2023
Visual Introduction to Hash-Array Mapped Tries (HAMTs)
2 projects | news.ycombinator.com | 24 Aug 2023
A header-only C implementation of C++ &lt;algorithm&gt;
1 project | /r/patient_hackernews | 4 Jul 2023
A header-only C implementation of C++ <algorithm>
1 project | /r/hackernews | 4 Jul 2023
A header-only C implementation of C++ <algorithm>
2 projects | news.ycombinator.com | 3 Jul 2023
A note from our sponsor - InfluxDB
www.influxdata.com | 1 Dec 2023
What are some of the best open-source C99 projects in C? This list will help you: