Skip to content

Comment on I wrote a commercial game in C in 2025parent

Comments

a sufficiently complex C project (6000 lines, more or less)

Is there a 0 missing? 6k lines of C is on the lower end of things, especially given how verbose vanilla C can be for basic stuff...

Is there a 0 missing? 6k lines of C is on the lower end of things, especially given how verbose vanilla C can be for basic stuff...

No zero missing. Routines for dynamic arrays/vectors, hashmaps, strings, etc (i.e. the basic stuff) are already in precompiled libraries (*.so).

The programs (there were two) consisted of an agent that sat on a remote box gathering packet traces and listening for commands to start/stop/change expression for capture, and would store+forward that capture to a server, which saved the capture in a format wireshark was able to read.

6000 lines is about right for something of that complexity.

AST representation of 6k LoC could probably fit for the most of its part into the L3 cache of modern CPUs. C and C++ build process is mostly a memory-bound problem.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.