c-programming

Tag

Cards List
#c-programming

the lost malloc()

Lobsters Hottest ↗ · 2026-11-02 Cached

A blog post doing 'Unix archaeology' on how early Unix versions (V4, 1973) handled memory allocation, from a primitive linear allocator using sbrk() to Dennis Ritchie's malloc()/mfree() map-based precursor in /usr/sys/dmr/malloc.c.

0 favorites 0 likes
#c-programming

No AI, 52 min. Build all Linux Files utils in C by Hand

Lobsters Hottest ↗ · 2026-11-01 Cached

A YouTube video demonstrating how to build all Linux file utilities from scratch in C by hand in 52 minutes, without using AI assistance. Shared via Lobsters with discussion from the developer community.

0 favorites 0 likes
#c-programming

GOTO Considered Totally Sick (for error handling in C)

Lobsters Hottest ↗ · 2026-10-28 Cached

作者从 Go 和 Zig 回到 C 编程时,反思了错误处理和资源清理的痛点,并介绍了受 John Carmack 邮件启发的使用 goto 统一清理出口的写法,让 C 的错误处理更简洁。

0 favorites 0 likes
#c-programming

Iterating Backwards in C

Hacker News Top ↗ · 2026-10-26 Cached

The author explains the common mistakes when iterating backwards in C and presents the clean idiom `for(size_t i = count; i--; )`, which avoids signed-index and wrap-around pitfalls, especially as LLM-generated code repeats the buggy versions.

0 favorites 0 likes
#c-programming

POSIX wordexp(3) is dangerous

Lobsters Hottest ↗ · 2026-10-25 Cached

一篇 TIL 博客指出 POSIX 的 wordexp(3) 默认启用命令替换,即使传入 WRDE_NOCMD,musl 和 macOS 的 libc 实现也可能被绕过,建议不要在不可信输入上使用它。

0 favorites 0 likes
#c-programming

Integer to String Conversion (2014)

Hacker News Top ↗ · 2026-10-18 Cached

A 2014 blog post by L. Pereira exploring increasingly optimized ways to convert integers to strings in C, comparing naive division-based approaches, an in-place reverse-free variant used in Lwan, and Facebook's pair-of-digits lookup table trick that roughly halves the number of divisions for a ~31% speedup.

0 favorites 0 likes
#c-programming

My C23 Conventions

Lobsters Hottest ↗ · 2026-10-15 Cached

作者分享了在 C23 标准下采用的三种现代 C 编码约定,包括使用 [[nodiscard]] 与 [[maybe_unused]] 处理未使用返回值、C23 中 union 初始化行为的变化,以及借助 auto 简化代码的新模式。

0 favorites 0 likes
#c-programming

Fixing C Strings With String Views

Lobsters Hottest ↗ · 2026-10-14 Cached

A blog post explaining the problems of NUL-terminated strings in C and introducing a small single-file C library that provides str_view and str_owned structs for safer, more efficient string handling.

0 favorites 0 likes
#c-programming

yet another place where a linux man page is inaccurate

Lobsters Hottest ↗ · 2026-10-14 Cached

博主更正了此前关于 glibc 中 initstate() 不遵循 POSIX 错误返回规范的说法:该 bug 早在 2013 年就已修复,只是 initstate(3) man page 至今未更新,且页面还遗漏了 POSIX 实际上并未为该函数定义任何错误条件这一关键信息。

0 favorites 0 likes
#c-programming

Arena Allocators in C

Lobsters Hottest ↗ · 2026-10-11 Cached

一篇讲解 C 语言中 Arena 分配器的技术指南,介绍如何通过批量分配内存块来替代传统的 malloc/free 模式,从而提升性能并减少内存泄漏。

0 favorites 0 likes
#c-programming

Zeroization, part 1: Wiping can make things worse

Lobsters Hottest ↗ · 2026-10-07 Cached

技术博客文章探讨了在C代码中对秘密数据进行零化(memset/secure_zero)的常见做法为何可能适得其反:编译器优化会删除memset,而volatile字节写入或不透明的wipe函数反而可能引入新的秘密副本并让其残留在寄存器中。

0 favorites 0 likes
#c-programming

Type Safe Generic Data Structures in C

Hacker News Top ↗ · 2026-10-03 Cached

A technical blog post exploring techniques for writing type-safe generic data structures in C, progressing from header-inclusion macros and void pointers to unions and inline storage, illustrated with a linked list implementation.

0 favorites 0 likes
#c-programming

mantle.nes breakdown blog part 1

Lobsters Hottest ↗ · 2026-09-27 Cached

This blog post details the author's process of creating a NES demake fangame of Deltarune Chapter 3, covering technical aspects like NES development tools and workflow.

0 favorites 0 likes
#c-programming

@TrisH0x2A: a professor at Illinois got frustrated with existing systems programming textbooks so he started a Wikibook with studen…

X AI KOLs Timeline ↗ · 2026-09-25 Cached

A professor at Illinois initiated a collaborative Wikibook with students to provide a free, comprehensive guide covering systems programming topics such as C, processes, threads, and security.

0 favorites 0 likes
#c-programming

LinearSolveBench: new benchmark for linear solvers [P]

Reddit r/MachineLearning ↗ · 2026-09-22

LinearSolveBench is a new benchmark for evaluating linear solvers in C, focusing on speed, accuracy, and generality for large sparse systems to promote algorithmic advances.

0 favorites 0 likes
#c-programming

Show HN: Npunlock – Run custom C kernels for Intel NPUs

Hacker News Top ↗ · 2026-09-22 Cached

Npunlock is a tool that enables running custom C kernels on Intel NPUs by reconstructing the path from C code to runnable kernels, with verification on Meteor Lake hardware.

0 favorites 0 likes
#c-programming

Type Punning in C and C++

Hacker News Top ↗ · 2026-09-22 Cached

This article explains type punning in C and C++, warning about the undefined behavior of pointer casts due to strict aliasing rules and recommending unions or memcpy for safe type punning.

0 favorites 0 likes
#c-programming

@huihoo: Free book《Computing Systems Organization》CC License (Computing Systems Organization) Composed of 16 independent documen…

X AI KOLs Timeline ↗ · 2026-09-21 Cached

A free book titled 'Computing Systems Organization' by Dr. Carl Burch is released under CC License, comprising 16 documents on modern computing system concepts.

0 favorites 0 likes
#c-programming

SDCC – Small Device C Compiler

Hacker News Top ↗ · 2026-09-19

SDCC is a Small Device C Compiler, a development tool for programming small and embedded systems in the C language.

0 favorites 0 likes
#c-programming

C*: Unifying Programming and Verification in C

Hacker News Top ↗ · 2026-09-08 Cached

This paper introduces C*, a proof-integrated language that unifies C programming with formal verification, enabling real-time verification through embedded proof-code blocks.

0 favorites 0 likes
Next →
← Back to home

Submit Feedback