C Programming Langauge
The thing after A, and B.
Created:
Why C?
“The Endurance of an Unmanageable Language” - Some Were Meant for C; via ATS As a Systems Programming Language.
Learning
- youtube lectures on C programming by Prof Jerry Cain, structured around the book Computer Systems: A programmer’s Perspective by Bryant & O’Hallaron.
- Charles Cabergs - YouTube
Tooling
Why not C?
C Is Not a Low-level Language - ACM Queue
Books
- Learn C Programming With 9 Excellent Open Source Books - OSS Blog
- Learn C programming | Lulu’s blog; 14 chapters with examples and quizzes.
- comp.lang.c Frequently Asked Questions
- C Craft notes by Ben Lynn on C vs many other languages. “C is the desert island language”
- Object Oriented C, 1993 by Axel-Tobias Schreiner
People and blogs
- https://c9x.me/ by Quentin Carbonneaux. qbe compiler backend etc.,
- The Jim Roskind C/C++ Grammar
Important
- cdecl; C gibberish ↔︎ English
- ~sircmpwn/cstyle – style guidelines on the lines of “SHOULD” and “SHOULD NOT”s.
C libraries
- Better String library
- Valgrind
- zeromq
- lock-free data structure library
- uthash – simple data structures
- Compilers targetting C
- TrustInSoft/tis-interpreter: An interpreter for finding subtle bugs in programs written in standard C
Memory Management
- Untangling Lifetimes: The Arena Allocator; making performant dynamic manual memory management in C feel almost like garbage collection by Ryan Fleury.
C programming practices
- C Programming Substance Guidelines from the Stronglink (a searchable, syncable, content-addressable notetaking system) project
- Lecture notes on Practical Programming in C.
- A rant on C (not by me)
- a critique of “how not to c”; Jan 2016.
- how to c; HN
Another interesting approach to learning C if you already know Python is to re-implement the C compiler described in this article. If you’re looking for a way to learn 10 things while also learning C then this 500 line Python complier is A++.
Cool stuff
- How I wrote a self-hosting C compiler in 40 days
- How to read C declarations.. say
int *(*func())();
– C Right-Left Rule (Rick Ord’s CSE 30 - UC San Diego) – “func is function returning pointer to function returning pointer to int”. - Memory Allocation at samwho.dev – intuitive visual guide on how memory allocation works step by step.
- Writing a C compiler in 500 lines of Python
- Writing a simple 16 bit VM in less than 125 lines of C | andreinc
Programming Language Theory
- Subtleties of the ANSI/ISO C standard by Robbert Krebbers, Freek Wiedijk of Radboud University Nijmegen.
we argue that the C standard does not allow Turing complete implementations, and that its evaluation semantics does not preserve typing. Finally, we claim that no strictly conforming programs exist. That is, there is no C program for which the standard can guarantee that it will not crash.
Discussions
- Comments on The cost of forsaking C | Hacker News
Safe C
Xr0 is a new verifier for the C programming language that eliminates many classes of undefined behaviour, such as use-after-frees (of which double frees are a special case), dangling and null pointer dereferences, memory leaks and the use of uninitialised memory. Most importantly, we believe Xr0 is on a clear trajectory towards enabling programming in C with no undefined behaviour whatever.