Topic

C

C programming discussions covering systems programming, memory management, and embedded development. Our digest aggregates undefined behavior, compiler optimizations, and embedded systems from developer communities.

What this topic tracks

  • Language releases and proposals
  • Libraries, tooling, and ecosystem updates
  • Performance, idioms, and production lessons

C · 248 stories

Recent stories

Each story's summary, with the places it was discussed.

Summaries are written by AI from the linked sources. Open the source for full context.

20 stories

Community firmware for the Xteink X4 e-paper reader

github.com · 5 May

C · Hardware · Open Source

CrossPoint Reader is an open-source firmware for the Xteink X4 e-paper reader.

Built using PlatformIO for the ESP32-C3, it provides a customizable EPUB reading experience with features like KOReader Sync, font customization, and Wi-Fi support. The project optimizes performance for the device's constrained RAM by caching data on the SD card.

SDCC – Small Device C Compiler

sdcc.sourceforge.net · 19 Sept

C · Programming Languages · Open Source

SDCC is a free, retargettable, optimizing Standard C compiler suite for numerous 8-bit microprocessors and microcontrollers, including MCS-51, Z80, STM8, HC08, Rabbit, Padauk, and 6502 families.

Its GPL-based tools include a compiler, assembler, linker, simulator, debugger, and libraries. SDCC 4.6.0 adds C2y/C23 features, new ports, improved code generation, and funded security and optimization work.

FPS.cob: A first person shooter in COBOL

github.com · 11 Jun

C · Linux · Programming Languages

FPS.cob is a retro-style first-person shooter game implemented entirely in COBOL.

It supports both Wolf3D-style grid maps and DOOM-like sector maps with variable heights. The game utilizes cobc for compilation and ffplay for rendering, offering a unique, experimental look at legacy programming language capability in modern game development.

Microgpt in pure C hits 10M tps on Apple m5

github.com · 18 Aug

C · GPT · Machine Learning

A dependency-free C implementation trains and runs inference for a character-level GPT in one file using only libc.

With 4,192 parameters, it learns names from a 32,033-item corpus, generalizes beyond training data, and reaches up to 10.2 million tokens per second on NEON. It supports macOS, Linux, Windows, ARM64, and x86-64.

I thought I was building a C replacement. I was wrong

c3-lang.org · 16 Aug

C · Design Patterns · Programming Languages

C3's creator realized that calling it a “C alternative” misrepresented its goal.

Inspired by Turbo Pascal and procedural programming, he seeks C’s simplicity and performance with modern ergonomics—dynamic data structures, convenient abstractions, and fast development—without OOP’s up-front architectural coupling. C3 is intended for general-purpose applications, not merely C’s current niches such as systems and embedded software.

Cessation of public development of Kefir C compiler

kefir.protopopov.lv · 31 May

C · Programming Languages · Open Source

The author of the C compiler project Kefir has announced they are shifting development to a private model.

Citing sustainability issues, resource constraints, and concerns regarding large language model training, future significant updates will no longer be public. Ongoing maintenance and bug fixes will continue to be addressed for the existing open-source codebase.

FreeBSD Device Drivers Book

github.com · 26 Apr

C · Operating Systems · Open Source

FreeBSD Device Drivers: From First Steps to Kernel Mastery is a comprehensive, open-source guide for learning kernel development.

Spanning 38 chapters, it focuses on hands-on labs and practical experience. It covers everything from C and UNIX basics to advanced topics like DMA, interrupts, and driver submission to the FreeBSD Project, targeting FreeBSD 14.x compatibility.

WireGuard for Windows Reaches v1.0

lists.zx2c4.com · 21 Apr

Cybersecurity · C · Windows

Jason A. Donenfeld announced the v1.0 release of WireGuard for Windows and WireGuardNT.

Key improvements include reliable adapter context handling using NdisWdfGetAdapterContextFromAdapterHandle, a reverse-engineered solution for instant MTU change notifications replacing inefficient polling, and enhanced legacy DNS configuration for older Windows versions. The project now compiles in C23 mode.

WinCE64 – Windows CE 2.11 for N64

github.com · 9 May

C · C++ · Low-Level Programming

This project implements a custom port of Windows CE 2.11 for the Nintendo 64.

By creating a custom HAL, display driver, and SD file system, the system runs on actual hardware using an EverDrive-64 X7. It enables a functional Win9x-style desktop, taskbar, file browser, and support for running third-party MIPS executables directly from an SD card.

µ-Wire – USB on an ATtiny 10

cpldcpu.com · 18 Nov

C · Hardware · Low-Level Programming

The µ-Wire project turns Atmel’s six-pin ATtiny10 into a USB-compatible controller for one WS2812 LED while preserving little-wire protocol compatibility.

Because its 1KB flash and 32B SRAM cannot fit standard V-USB, the firmware uses an interrupt-free, heavily reduced implementation that skips a USB packet during LED output and relies on retransmission. Manual register-access assembly compensates for AVR-GCC inefficiency. The firmware uses 988B flash and 30B SRAM, with limited USB reset and request support.

WiFi Time

mitxela.com · 31 May

C · Hardware · AI Agents

This abandoned project aimed to create an ESP8266-based 'fake' GPS module using WiFi and NTP to provide precision timing.

Despite achieving millisecond-level accuracy through rigorous control loop experiments and oscillator disciplining, the project highlights the significant impact of network jitter and hardware limitations. The author shares these findings as a practical case study in custom timing hardware development.

Megadev: A Development Kit for the Sega Mega Drive and Mega CD Hardware

github.com · 14 Mar

C · Hardware · Low-Level Programming

Megadev is a comprehensive development kit for Sega Mega Drive and Mega CD hardware, featuring utilities, headers, and documentation.

Targeted at experienced C and M68k assembly programmers, it simplifies complex embedded development. The project emphasizes flexibility for skilled developers, offering an unofficial, non-profit framework for professional-grade homebrew creation on classic console hardware.

Reducing undefined behavior in the C language

lwn.net · 9 Oct

C · Low-Level Programming · Programming Languages

At Kernel Recipes, Martin Uecker argued that C can substantially reduce undefined behavior and improve memory safety, though full safety remains difficult.

The C standard has about 100 undefined-behavior cases, while the C2y draft removes 45. Warnings, static analyzers, sanitizers, annotations, architectures such as CHERI, and formal verification can improve type, spatial, and temporal safety. C23 already removed problematic legacy features; C2y will add further “demon removal,” but restricted languages and verification remain necessary for the strongest guarantees.

Inverse Kinematics and Foot Locking

theorangeduck.com · 7 Sept

Algorithms · C · Computer Science

The article presents practical recipes for eliminating foot sliding in character animation.

It explains a two-bone inverse kinematics leg solver that preserves existing poses, toe targeting, soft extension limits, and ground collision handling. Runtime foot locking combines contact detection with cubic inertialization; an offline position-based dynamics method distributes corrections across clips. It emphasizes preserving toe velocity over rigid physical locking.

Show HN: A Project Oberon System version running on RISC-V instead of RISC-5

github.com · 9 Aug

C · Programming Languages · Software Architecture

This project migrates the Project Oberon system from RISC-5 to a RISC-V architecture.

By utilizing the OP2 compiler and adapting Oberon-07 code to Oberon 90, the developer successfully runs the system on an emulated RV32 machine, preserving Niklaus Wirth's original design principles while enabling execution on contemporary, widely available hardware platforms.

Linux on ESP32

github.com · 28 Jul

C · Linux · Low-Level Programming

This experimental project demonstrates a port of Linux 6.12 to the ESP32-S31 microcontroller, utilizing Sv32 virtual memory, Supervisor mode, and XIP with a Buildroot userspace.

The port uses a custom CLIC driver and includes modifications for non-standard RISC-V interrupt handling. It is a proof-of-concept for research purposes, not intended for production usage.

How Do I Profile eBPF Code?

naveensrinivasan.com · 22 Jul

Artificial Intelligence · C · Linux

This post explains how to profile eBPF code to measure performance overhead.

By using a lightweight C test harness for file open operations, developers can baseline system performance. It details enabling BPF symbols with JIT settings and using the perf tool to collect call graphs, helping identify specific bottlenecks within eBPF hooks for targeted optimizations.

The Underhanded C Contest

underhanded-c.org · 1 Jul

Cybersecurity · C · Programming Languages

The 2015 Underhanded C Contest challenged participants to write secure code for nuclear verification, focusing on subtle, realistic vulnerabilities.

The winner, Linus Åkesson, utilized a clever float-to-double type confusion exploit. The contest highlighted how memory-unsafe languages like C require extreme rigor to prevent data-triggered and environment-triggered attacks that bypass security checks.

C array types are weird

anselmschueler.com · 25 May

C · Programming Languages · Computer Science

This article explores the confusing nature of arrays in C, specifically how they decay into pointers.

The author proposes a redesign where arrays behave like structs to improve clarity and safety. The piece also discusses GDB's '@' operator as a potential mechanism for converting pointers to arrays and highlights the benefits of wide pointers.

Where it came fromHacker NewsLobstersCreate a Snapbyte.dev digest and choose C as one of your topics.Build your digest