/C-Examples

System programming example usage of the exec family of functions in conjunction with forking, file descriptor manipulation, threading, semaphores, and sockets.

Primary LanguageC

C Examples

The exec family of functions in conjunction with forking, file descriptors, threading, and sockets.

hackr.io C Tutorials and Courses

The Descent to C

  • This article attempts to give a sort of ‘orientation tour’ for people whose previous programming background is in high (ish) level languages such as Java or Python, and who now find that they need or want to learn C. https://www.chiark.greenend.org.uk/~sgtatham/cdescent/

The Archive of Interesting Code

Summary of C/C++ integer rules

Garbage Collection Algorithms

Single-file public-domain/open source libraries with minimal dependencies

Building Your Own C Interpreter

C Tutorials and Courses

Getting started with C programming

Learn C

How to implement a hash table (in C)

Modern C++ for C Programmers: part 1

Type-safe generic data structures in C

Synthetic Separation Logic

C++: The Good Parts

Orthodox C++

How C++ Resolves a Function Call

Conan - A package manager for C/C++

Cosmopolitan libc

CompCert

  • The CompCert C verified compiler is a compiler for a large subset of the C programming language that generates code for the PowerPC, ARM, x86 and RISC-V processors. https://github.com/AbsInt/CompCert

concurrencpp, the C++ concurrency library

Choosing Java instead of C++ for low-latency systems

Ray Tracing in pure CMake

How Does a C Debugger Work? (GDB Ptrace/x86 example)

Bit Manipulation with C++20

libcu++

  • the NVIDIA C++ Standard Library, is the C++ Standard Library for your entire system. It provides a heterogeneous implementation of the C++ Standard Library that can be used in and between CPU and GPU code. https://github.com/NVIDIA/libcudacxx

The Little Things

How expensive is integer-overflow trapping in C++?

SCC

  • SCC is a limited C compiler producing tiny-model DOS COM files. It should run on most operating systems and can self-host under DOS2.0+ compatible systems with 128K RAM https://github.com/mras0/scc

w64devkit

Urkel

chibicc: A Small C Compiler

  • chibicc is yet another small C compiler that implements most C11 features. Even though it still probably falls into the "toy compilers" category just like other small compilers do, chibicc can compile several real-world programs, including Git, SQLite and libpng, without making modifications to the compiled programs. https://github.com/rui314/chibicc

Frama-C

ztd.text and Unicode for C++

RISC-V userspace emulator library

A little puzzle with printf() and C argument passing

Nuklear

  • A minimal-state, immediate-mode graphical user interface toolkit written in ANSI C and licensed under public domain. It was designed as a simple embeddable user interface for application and does not have any dependencies https://github.com/Immediate-Mode-UI/Nuklear

enkiTS: A C and C++ Task Scheduler for creating parallel programs

Alternative operator representations

Althttpd: The Althttpd Webserver

Let's Build a Simple Database


Linear Algebra

Eigen

XTensor


Articles

  1. Macros on Steroids, Or: How Can Pure C Benefit From Metaprogramming https://hirrolot.github.io/posts/macros-on-steroids-or-how-can-pure-c-benefit-from-metaprogramming.html
  2. C++ Dev Ecosystem 2021 https://www.jetbrains.com/lp/devecosystem-2021/cpp/
  3. Metaprogramming custom control structures in C https://www.chiark.greenend.org.uk/~sgtatham/mp/
  4. Goodbye C developers: The future of programming with certified program synthesis https://gopiandcode.uk/logs/log-certified-synthesis.html
  5. When static makes your C code 10 times faster https://mazzo.li/posts/c-performance-anecdote.html
  6. Correctly implementing a spinlock in C++ https://rigtorp.se/spinlock/
  7. Goodbye C++, Hello C https://momentsingraphics.de/ToyRenderer1KeepItSimple.html
  8. Summer 2021 ISO C++ standards meeting https://herbsutter.com/2021/06/09/trip-report-summer-2021-iso-c-standards-meeting-virtual/
  9. Why I still like C and strongly dislike C++ https://codecs.multimedia.cx/2021/05/why-i-still-like-c-and-strongly-dislike-cpp/
  10. Modern C for C++ Peeps https://floooh.github.io/2019/09/27/modern-c-for-cpp-peeps.html
  11. Undefined behavior in C is a reading error. https://www.yodaiken.com/2021/05/19/undefined-behavior-in-c-is-a-reading-error/
  12. Instant replay: Debugging C and C++ programs with rr https://developers.redhat.com/blog/2021/05/03/instant-replay-debugging-c-and-c-programs-with-rr/
  13. C++ Constructors, Memory, and Lifetimes https://erikmcclure.com/blog/cpp-constructors-memory-and-lifetimes/
  14. Modern C++ Won't Save Us https://alexgaynor.net/2019/apr/21/modern-c++-wont-save-us/
  15. Learn X in Y minutes https://learnxinyminutes.com/docs/c/
  16. How you can handle The Diamond with CMake http://beza1e1.tuxen.de/cmake_diamond.html
  17. A "BETTER C" BENCHMARK https://zserge.com/posts/better-c-benchmark/
  18. Making Your Own Container Compatible With C++20 Ranges https://www.reedbeta.com/blog/ranges-compatible-containers/
  19. Parsing floating-point numbers really fast in C# https://lemire.me/blog/2021/02/22/parsing-floating-point-numbers-really-fast-in-c/
  20. David Mazieres' tutorial and take on C++20 coroutines https://www.scs.stanford.edu/~dm/blog/c++-coroutines.html
  21. Cross-language interfaces between C and C++ https://gustedt.wordpress.com/2017/08/08/cross-language-interfaces-between-c-and-c/
  22. Is the C runtime and library a legitimate part of the Unix API? https://utcc.utoronto.ca/~cks/space/blog/unix/UnixAPIAndCRuntime
  23. What does I/O bound really mean? Erik Engbrecht's Blog http://erikengbrecht.blogspot.com/2008/06/what-does-io-bound-really-mean.html?m=1
  24. The Jim Roskind C/C++ Grammar https://blog.robertelder.org/jim-roskind-grammar/
  25. A Special Kind of Hell - intmax_t in C and C++ https://thephd.github.io/intmax_t-hell-c++-c
  26. Overloading by Return Type in C++ https://artificial-mind.net/blog/2020/10/10/return-type-overloading
  27. Does C++ still deserve the bad rap it has had for so long? https://nibblestew.blogspot.com/2020/10/does-c-still-deserve-bad-rap-it-has-had.html
  28. No, C++ still isn't cutting it. https://da-data.blogspot.com/2020/10/no-c-still-isnt-cutting-it.html
  29. What's Wrong with C++ Templates? http://people.cs.uchicago.edu/~jacobm/pubs/templates.html
  30. Multi-Level Break in C++ via IIFE https://artificial-mind.net/blog/2020/10/28/multi-level-break-iife
  31. Fast programming languages: C, C++, Rust, and Assembly http://tempesta-tech.com/blog/fast-programming-languages-c-c++-rust-assembly
  32. Why nullable types? https://medium.com/dartlang/why-nullable-types-7dd93c28c87a

Papers

  1. SIMD for C++ Developers http://const.me/articles/simd/simd.pdf
  2. Improve type generic programming proposal for C23 http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2638.pdf
  3. Toward Unseating the Unsafe C Programming Language https://www.computer.org/csdl/magazine/sp/2021/02/09382362/1saZSnqpzz2
  4. Some Were Meant for C https://www.cs.kent.ac.uk/people/staff/srk21/research/papers/kell17some-preprint.pdf
  5. The Evolution of C Programming Practices: A Study of the Unix Operating System 1973-2015 https://ieeexplore.ieee.org/abstract/document/7886953
  6. C source-to-source compiler enhancement from within https://hal.inria.fr/hal-02998412
  7. Compiling without Continuations https://dl.acm.org/doi/10.1145/3062341.3062380
  8. HardBound: Architectural Support for Spatial Safety of the C Programming Language https://dl.acm.org/doi/pdf/10.1145/1353535.1346295
  9. Program Analysis and Specialization for the C Programming Language https://www.semanticscholar.org/paper/Program-Analysis-and-Specialization-for-the-C-Andersen-Lee/b7efe971a34a0f2482e0b2520ffb31062dcdde62
  10. The Semantics of the C Programming Language http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.29.6755&rep=rep1&type=pdf

Books

  1. Thriving in a Crowded and Changing World: C++ 2006–2020 https://www.stroustrup.com/hopl20main-p5-p-bfc9cd4--final.pdf
  2. Beej’s Guide to C Programming http://beej.us/guide/bgc/pdf/bgc_usl_c_1.pdf