Hacker News with Generative AI: C Programming

The 'Obfuscated C Code' Competition returns (thenewstack.io)
Getting silly with C, part (void*)2 (lcamtuf.substack.com)
In the previous installment of our introductory series about the C language, we introduced the syntax of the switch() statement (demo link):
"Why learning the C language is still a good idea" by Antirez (youtube.com)
C "clockwise/spiral" rule to understand declarations (c-faq.com)
There is a technique known as the ``Clockwise/Spiral Rule'' which enables any C programmer to parse in their head any C declaration!
Zero to Prod in C – Creating Server and Hosting (brightprogrammer.in)
I recently started looking into self-hosting, and after spending two almost sleepless nights, I finally have a solution to self host any service and link it to an endpoint with your domain name.
Fixing C Strings (thasso.xyz)
It’s well-known that null-terminated C strings are bug-prone and unsafe to use. They’re the stereotypical footgun. I’ve been tinkering in a bare-metal environment recently, writing all code myself, including the common types and routines you find in libc or similar. In all the code I wrote, there is not at single null-terminated string, and I have yet to encounter a bug related to bounds checking on strings or buffers.
In C some things aren't what they seem – The Craft of Coding (wordpress.com)
In C it is possible to make up things that don’t exist. For example this can lead to operators being created when they don’t exist, at least in the eyes of the programmer. Take the “–>” operator. This operator doesn’t exist, but can function as if it does. Here is an example program:
In C some things aren't what they seem (wordpress.com)
In C it is possible to make up things that don’t exist. For example this can lead to operators being created when they don’t exist, at least in the eyes of the programmer.
Using Libc for GPUs (llvm.org)
Once you have finished building the GPU C library it can be used to run libc or libm functions directly on the GPU. Currently, not all C standard functions are supported on the GPU. Consult the list of supported functions for a comprehensive list.
Memory-safe PNG decoders now outperform C PNG libraries (reddit.com)
In C, memory management begins – The Craft of Coding (wordpress.com)
When you learn to program in C, more often than not people side-step the issue of memory management. It’s the one language where you really have to get a handle on the concepts of memory from day one.
C, Just in Time (dyne.org)
CJIT is a lightweight C interpreter that lets you run C code instantly, without needing to build it first. Just use the executable interpreter: no extra tools, libs, or headers required.
'I'm running a Mud so I can learn C programming ' (1993) (githubusercontent.com)
C99 doesn't need function bodies: VLAs are Turing complete (lemon.rip)
The 1999 revision to the C programming language brought several interesting changes and additions to the standard. Among those are variable length arrays, or VLAs for short, which allow array types to have lengths that are determined at runtime.
Show HN: A dynamic C (Hot reloading) module-based Web Framework (github.com/joexbayer)
Welcome to c-web-modules, a modular and efficient approach to web development in C. Inspired by kernel modules and AWS Lambda, this project allows you to upload C code directly to the server, which compiles and deploys it at runtime. No precompilation is necessary, and the server can easily be upgraded to include more features or external libraries.
GenMC: Model checking for concurrent C programs (mpi-sws.org)
GenMC is an open-source state-of-the-art model checker for verifying concurrent C/C++ programs under the RC11, IMM, and LKMM memory models.
C Until It Is No Longer C (aartaka.me)
We have to admit that C is inherently/potentially ugly.
LibNSFB – Framebuffer (bitmap on screen) abstraction library, written in C (netsurf-browser.org)
LibNSFB is a framebuffer abstraction library, written in C. It is currently in development for use with NetSurf and is intended to be suitable for use in other projects too.
The C23 edition of Modern C (wordpress.com)
Secure CGI Applications in C on BSD (2016) (kristaps.bsd.lv)
Equip you with sufficient knowledge to build a (simple) secure web application. In C. On a BSD operating system.
OWASP C-Based Toolchain Hardening Cheat Sheet (owasp.org)
C-Based Toolchain Hardening is a treatment of project settings that will help you deliver reliable and secure code when using C, C++ and Objective C languages in a number of development environments.
snac2: Mastodon API ActivityPub instance in portable C (codeberg.org)
A simple, minimalistic ActivityPub instance written in portable C
Show HN: Compiling C in the browser using WebAssembly (wasmer.io)
We’ve reached a major milestone in making any software run with WebAssembly. Thanks to the newest release of Wasmer (4.4) and the Wasmer JS SDK (0.9.0) you can now run clang anywhere Wasmer runs!
Show HN: Hosting my website using my C web server (github.com/cozis)
This is a minimal web server designed to host my blog. It's built from scratch to be robust enough to face the public internet. No reverse proxies required! You can see it in action at http://playin.coz.is/index.html.
Rawdrawandroid – Build Android apps without any Java, in C and Make (github.com/cnlohr)
Ever wanted to write C code and run it on Android? Sick of multi-megabyte packages just to do the most basic of things. Well, this is a demo of how to make your own APKs and build, install and automatically run them in about 2 seconds, and with an apk size of about 25kB (with API 26). API 30 (Android R+) is unfortunately at 45kB to support ARM64 + ARM32.
Strtod Is Wild (festina-lente-productions.com)
The strtod function in the C standard library seems innocent enough: take a decimal representation of a number, such as "10.35" and return the nearest floating-point binary number (the double C type) [note 1].
Linux's Bedtime Routine (tookmund.com)
How does Linux move from an awake machine to a hibernating one? How does it then manage to restore all state? These questions led me to read way too much C in trying to figure out how this particular hardware/software boundary is navigated.
Undefined behavior in C is a reading error (2021) (yodaiken.com)
C Course Online (lucidar.me)
Show HN: A retro terminal text editor for GNU/Linux coded in C (C-edit) (github.com/velorek1)