Hacker News with Generative AI: C

Why is this site built with C (marcelofern.com)
Learning from these two past mistakes, I came up with a set of requirements for my next (and hopefully final) website:
Writing a Bash builtin in C to parse INI configs (mbuki-mvuki.org)
Shell languages such as Bash excel at certain tasks, such as gluing programs together or quickly automating a set of command line steps. In contrast to those strengths, using a Shell to parse an INI config file is a bit like writing a poem in mud, you might succeed, but the result will probably be inscrutable and your swear jar will be full!
C and C++ prioritize performance over correctness (2023) (swtch.com)
The original ANSI C standard, C89, introduced the concept of “undefined behavior,” which was used both to describe the effect of outright bugs like accessing memory in a freed object and also to capture the fact that existing implementations differed about handling certain aspects of the language, including use of uninitialized values, signed integer overflow, and null pointer handling.
Show HN: I made a C program to create a vanity SHA-1 hash for a text file (github.com)
Let's Build a Simple Database (cstack.github.io)
I’m building a clone of sqlite from scratch in C in order to understand, and I’m going to document my process as I go.
The earliest versions of the first C compiler known to exist (github.com/mortdeus)
The earliest versions of the very first c compiler known to exist in the wild written by the late legend himself dmr.
Stupid Smart Pointers in C (kevinalbs.com)
Managing memory in C is difficult and error prone. C++ solves this with smart pointers like std::unique_ptr and std::shared_ptr. This article demonstrates a proof-of-concept (aka stupid) smart pointer in C with very little code. Along the way we'll look at the layout of the 32-bit x86 call stack and write assembly in a C program.
Implementing Generic Types in C (btmc.substack.com)
One of the most annoying things about programming in C is the lack of support for generic types, also known as parametric polymorphism.
The Defer Technical Specification: It Is Time (thephd.dev)
After the Graz, Austria February 2025 WG14 Meeting, I am now confident in the final status of the defer TS, and it is now time.
A Guide to Undefined Behavior in C and C++ (2010) (regehr.org)
Programming languages typically make a distinction between normal program actions and erroneous actions. For Turing-complete languages we cannot reliably decide offline whether a program has the potential to execute an error; we have to just run it and see.
Show HN: Object-Oriented Programming with ANSI-C (github.com/shichao-an)
Sources for "Object-Oriented Programming with ANSI-C" (rerelease 02-01-04 and 14-01-03) Copyright (c) 1993 Axel T. Schreiner, University of Osnabrueck, Germany
Reverse engineering OpenAI code execution to make it run C and JavaScript (twitter.com)
Something went wrong, but don’t fret — let’s give it another shot.
I stopped everything and started writing C again (kmx.io)
I've been a good student for 5 years at a French computer school. I've been a good freelance developer for 20 years. I've used Ruby on Rails exclusively however never writing my own code always for clients.
Dmap: A C hashmap that's stupid simple and surprisingly fast (github.com/jamesnolanverran)
Dmap is a flexible, lightweight, zero-friction dynamic hashmap implementation in C, designed to be user-friendly without sacrificing performance.
C-Language.org (c-language.org)
C is a general-purpose high-level programming language suitable for low-level programming, in other words: a system programming language.
Show HN: I built a JSON and JSON5 parser with MISRA C conformance (railgunlabs.com)
Rust inadequate for text compression codecs? (palaiologos.rocks)
I wrote this blog post to answer a frequent question that I receive from strangers on the internet: why do I choose to implement codecs in C? The answer is far from straightforward; if you are interested in the details, please read on.
Exploring Polymorphism in C: Lessons from Linux and FFmpeg's Code Design (2019) (leandromoreira.com)
Learn how Linux/FFmpeg C partial codebase is organized to be extensible and act as if it were meant to have “polymorphism”. Specifically, we’re going to briefly explore how Linux concept of everything is a file works at the source code level as well as how FFmpeg can add support fast and easy for new formats and codecs.
Abusing C to implement JSON parsing with struct methods (xnacly.me)
Build a JSON parser in cInstead of using by itself functions: attach functions to a struct and use these as methodsmake it C issue family free (segfaults, leaks, stack overflows, etc…)provide an ergonomic API
Imposing memory security in C [video] (fosdem.org)
They say that Rust is going to replace C. I don't believe that and I wanna share how we're doing memory-safe operations in BIRD's C code with no need to enforce this by the language paradigm. It's obviously possible to override that, yet with the right policies and processes in place, it is almost impossible.
Standard proposal for memory-Safety in C (2024) [pdf] (open-std.org)
Zlib-Rs Is Not Only Safer but Now Outperforming Zlib C Implementations (phoronix.com)
Zlib-rs as a Rust programming language implementation of the Zlib file format for better safety is now beginning to outperform the C implementations of the widely-used Zlib.
Ask HN: A retrofitted C dialect? (ycombinator.com)
Hi I'm Anqur, a senior software engineer with different backgrounds where development in C was often an important part of my work. E.g.<p>1) Game: A Chinese/Vietnam game with C/C++ for making server/client, Lua for scripting [1]. 2) Embedded systems: Switch/router with network stack all written in C [2]. 3) (Networked) file system: Ceph FS client, which is a kernel module.
Julia: C codegen considered unnecessary: go directly to binary, do not pass C (arxiv.org)
Since time immemorial an old adage has always seemed to ring true: you cannot use a high-level productive programming language like Python or R for real-time control and embedded-systems programming, you must rewrite your program in C.
F8 – an 8 bit architecture designed for C and memory efficiency [video] (fosdem.org)
Even in modern devices, 8-bit processors are found, but the architectures used are often not well-suited to programming in high-level languages, such as C. E.g. MCS-51 (8051, 8052) based microcontrollers in the Realtek WiFi chipsets. The f8 is an architecture based on the experience and lessons learned from maintaining Small Device C Compiler (SDCC) and the many 8-bit architectures it supports.
Type safe variadic printf (stranger.systems)
While C can provide "convenient" string formatting by having hideously unsafe variadics, and dynamic languages, like python, can do the same, many type safe languages, such as Rust, are forced to provide such functionality through the use of a macro. Dependently typed languages, like Idris, can provide a printf like formatting interface, while maintaining both memory and type safety, without the need for macros. We will explore this by implementing a simplified version of printf in Idris from scratch.
Zig; what I think after months of using it (strongly-typed-thoughts.net)
Ah, Zig. I have a love-hate relationship with this one. A “new” (reading: appeared a couple years ago, already — yes, already), language with high ambitions. Zig was made to run at low-level, with a simple design to solve many problems C has (macros, allocators, error handling, more powerful types like baked-in tagged unions and bitsets, a better build system, no hidden control flow, etc.).
No-Panic Rust: A Nice Technique for Systems Programming (reverberate.org)
Can Rust replace C? This is a question that has been on my mind for many years, as I created and now am tech lead for upb, a C library for Protocol Buffers. There is an understandable push to bring memory safety to all parts of the software stack, and this would suggest a port of upb to Rust.
I Wrote a WebAssembly VM in C (irreducible.io)
For the last 6 months, I’ve been spending my (limited) free time on evenings and weekends writing a WebAssembly VM in C.
C is not suited to SIMD (2019) (vmchale.com)
C (C++) is used to write performant software, however it is ill-suited to SIMD. In particular, its compilation of stepped reduction with lexical scoping opposes parallel execution.