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
- The Archive of Interesting Code is an effort on my part to code up interesting algorithms and data structures. https://www.keithschwarz.com/interesting/
Summary of C/C++ integer rules
- A basic integer type is specified using some legal sequence of keywords drawn from the set {char, short, int, long, signed, unsigned}. https://www.nayuki.io/page/summary-of-c-cpp-integer-rules
Garbage Collection Algorithms
- http://dmitrysoshnikov.com/courses/essentials-of-garbage-collectors/
- Writing a Memory Allocator
- This is the 6th lecture from the Garbage Collection Algorithms class, devoted to the automatic memory management. http://dmitrysoshnikov.com/compilers/writing-a-memory-allocator/
- Writing a Memory Allocator
Single-file public-domain/open source libraries with minimal dependencies
- a list of small, easy-to-integrate, portable libraries which are usable from C and/or C++ https://github.com/nothings/single_file_libs
Building Your Own C Interpreter
C Tutorials and Courses
- Learn C programming online from the best C tutorials submitted and voted by the programming community. https://hackr.io/tutorials/learn-c
Getting started with C programming
- A mac based lightning-fast start for absolute beginners https://not.cafe/2020/10/12/getting-started-with-c-programming.html
Learn C
- As C is a veteran programming languages there are tons of C communities, forums and tutorials. Top 10 Best C Tutorials. https://medium.com/hackr-io/learn-c-best-c-tutorials-for-beginners-949835f3f20a
How to implement a hash table (in C)
- An explanation of how to implement a simple hash table data structure using the C programming language. https://benhoyt.com/writings/hash-table-in-c/
Modern C++ for C Programmers: part 1
- C and C++ are actually very close relatives, to the point that many compilers have unified infrastructure for both languages. https://berthub.eu/articles/posts/c++-1/
Type-safe generic data structures in C
- The rise of a new generation of low-level programming languages like Rust, Go and Zig has caused C and its primitive type system to fall into some disrepute. https://iafisher.com/blog/2020/06/type-safe-generics-in-c
Synthetic Separation Logic
- Synthesis of Heap-Manipulating Programs from Separation Logic Specifications https://github.com/TyGuS/suslik/tree/certification
C++: The Good Parts
- Jordan DeLong overviews the past, current and near future "good parts" of C++'s functional side through the colored lens of his biases. https://www.infoq.com/presentations/c-plus-plus-pros/?itm_source=presentations_about_CPlusPlus
Orthodox C++
- Orthodox C++ (sometimes referred as C+) is minimal subset of C++ that improves C, but avoids all unnecessary things from so called Modern C++. https://gist.github.com/bkaradzic/2e39896bc7d8c34e042b#file-orthodoxc-md
How C++ Resolves a Function Call
- C is a simple language. You’re only allowed to have one function with each name. C++, on the other hand, gives you much more flexibility. https://preshing.com/20210315/how-cpp-resolves-a-function-call/
Conan - A package manager for C/C++
- Conan is a software package manager for C and C++ developers. https://en.terminalroot.com.br/conan-a-package-manager-for-cc/
Cosmopolitan libc
- Build-once run-anywhere c without devops https://justine.lol/cosmopolitan/index.html
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
- concurrencpp is a tasking library for C++ allowing developers to write highly concurrent applications easily and safely by using tasks, executors and coroutines. https://github.com/David-Haim/concurrencpp
Choosing Java instead of C++ for low-latency systems
- When it comes to developing low latency software systems, the received wisdom is that you would be crazy to use anything but C++ because anything else has too high a latency. https://stackoverflow.blog/2021/02/22/choosing-java-instead-of-c-for-low-latency-systems/
Ray Tracing in pure CMake
- A basic whitted ray tracer, complete with multicore rendering, written in 100% pure CMake https://64.github.io/cmake-raytracer/
How Does a C Debugger Work? (GDB Ptrace/x86 example)
- Linux ptrace API allows a (debugger) process to access low-level information about another process (the debuggee). https://blog.0x972.info/?d=2014/11/13/10/40/50-how-does-a-debugger-work
Bit Manipulation with C++20
- the class std::source_location http://www.modernescpp.com/index.php/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
- Speeding up C++ compilation https://codingnest.com/the-little-things-speeding-up-c-compilation/
How expensive is integer-overflow trapping in C++?
- Integers in programming languages have a valid range but arithmetic operations can result in values that exceed such ranges. For example, adding two large integers can result in an integer that cannot be represented in the integer type. We often refer to such error conditions as overflows. https://lemire.me/blog/2020/09/23/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
- Portable C and C++ Development Kit for x64 Windows https://nullprogram.com/blog/2020/09/25/
Urkel
- An optimized and cryptographically provable key-value store. Written in C. https://github.com/chjj/liburkel
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
- An extensible and collaborative platform dedicated to source-code analysis of C software. http://frama-c.com/index.html
ztd.text and Unicode for C++
- The goal of the library is simple: text encoding, decoding, transcoding, and related operations are single function calls, entirely painless, and infinitely extensible. https://thephd.dev/any-encoding-ever-ztd-text-unicode-cpp https://github.com/soasis/text
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
- A permissively licensed C and C++ Task Scheduler for creating parallel programs. https://github.com/dougbinks/enkiTS
Alternative operator representations
- C++ defines the following alternatives composed of ISO 646 compatible characters. https://en.cppreference.com/w/cpp/language/operator_alternative
Althttpd: The Althttpd Webserver
- Althttpd is a simple webserver that has run the https://sqlite.org/ website since 2004. Althttpd strives for simplicity, security, and low resource usage. https://sqlite.org/althttpd/doc/trunk/althttpd.md
Let's Build a Simple Database
- Writing a sqlite clone from scratch in C https://cstack.github.io/db_tutorial/
- Are there any C++ (or C) libs that have NumPy-like arrays with support for slicing, vectorized operations, adding and subtracting contents element-by-element, etc.? https://stackoverflow.com/questions/11169418/numpy-style-arrays-for-c/40448758
Eigen
- Eigen is a C++ template library for linear algebra: matrices, vectors, numerical solvers, and related algorithms. http://eigen.tuxfamily.org/ https://gitlab.com/libeigen/eigen
XTensor
- Linear Algebra In C++ With XTensor Is Just Like Numpy https://towardsdatascience.com/linear-algebra-in-c-with-xtensor-is-just-like-numpy-1a6b1ee00736
- The C++ Iceberg https://fouronnes.github.io/cppiceberg/
- The road to hell is paved with good intentions and C++ modules https://nibblestew.blogspot.com/2023/10/the-road-to-hell-is-paved-with-good.html
- 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
- C++ Dev Ecosystem 2021 https://www.jetbrains.com/lp/devecosystem-2021/cpp/
- Metaprogramming custom control structures in C https://www.chiark.greenend.org.uk/~sgtatham/mp/
- Goodbye C developers: The future of programming with certified program synthesis https://gopiandcode.uk/logs/log-certified-synthesis.html
- When static makes your C code 10 times faster https://mazzo.li/posts/c-performance-anecdote.html
- Correctly implementing a spinlock in C++ https://rigtorp.se/spinlock/
- Goodbye C++, Hello C https://momentsingraphics.de/ToyRenderer1KeepItSimple.html
- Summer 2021 ISO C++ standards meeting https://herbsutter.com/2021/06/09/trip-report-summer-2021-iso-c-standards-meeting-virtual/
- Why I still like C and strongly dislike C++ https://codecs.multimedia.cx/2021/05/why-i-still-like-c-and-strongly-dislike-cpp/
- Modern C for C++ Peeps https://floooh.github.io/2019/09/27/modern-c-for-cpp-peeps.html
- Undefined behavior in C is a reading error. https://www.yodaiken.com/2021/05/19/undefined-behavior-in-c-is-a-reading-error/
- 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/
- C++ Constructors, Memory, and Lifetimes https://erikmcclure.com/blog/cpp-constructors-memory-and-lifetimes/
- Modern C++ Won't Save Us https://alexgaynor.net/2019/apr/21/modern-c++-wont-save-us/
- Learn X in Y minutes https://learnxinyminutes.com/docs/c/
- How you can handle The Diamond with CMake http://beza1e1.tuxen.de/cmake_diamond.html
- A "BETTER C" BENCHMARK https://zserge.com/posts/better-c-benchmark/
- Making Your Own Container Compatible With C++20 Ranges https://www.reedbeta.com/blog/ranges-compatible-containers/
- Parsing floating-point numbers really fast in C# https://lemire.me/blog/2021/02/22/parsing-floating-point-numbers-really-fast-in-c/
- David Mazieres' tutorial and take on C++20 coroutines https://www.scs.stanford.edu/~dm/blog/c++-coroutines.html
- Cross-language interfaces between C and C++ https://gustedt.wordpress.com/2017/08/08/cross-language-interfaces-between-c-and-c/
- Is the C runtime and library a legitimate part of the Unix API? https://utcc.utoronto.ca/~cks/space/blog/unix/UnixAPIAndCRuntime
- 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
- The Jim Roskind C/C++ Grammar https://blog.robertelder.org/jim-roskind-grammar/
- A Special Kind of Hell - intmax_t in C and C++ https://thephd.github.io/intmax_t-hell-c++-c
- Overloading by Return Type in C++ https://artificial-mind.net/blog/2020/10/10/return-type-overloading
- 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
- No, C++ still isn't cutting it. https://da-data.blogspot.com/2020/10/no-c-still-isnt-cutting-it.html
- What's Wrong with C++ Templates? http://people.cs.uchicago.edu/~jacobm/pubs/templates.html
- Multi-Level Break in C++ via IIFE https://artificial-mind.net/blog/2020/10/28/multi-level-break-iife
- Fast programming languages: C, C++, Rust, and Assembly http://tempesta-tech.com/blog/fast-programming-languages-c-c++-rust-assembly
- Why nullable types? https://medium.com/dartlang/why-nullable-types-7dd93c28c87a
- Qt and Trivial Relocation https://www.kdab.com/qt-and-trivial-relocation-part-1/
- SIMD for C++ Developers http://const.me/articles/simd/simd.pdf
- Improve type generic programming proposal for C23 http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2638.pdf
- Toward Unseating the Unsafe C Programming Language https://www.computer.org/csdl/magazine/sp/2021/02/09382362/1saZSnqpzz2
- Some Were Meant for C https://www.cs.kent.ac.uk/people/staff/srk21/research/papers/kell17some-preprint.pdf
- The Evolution of C Programming Practices: A Study of the Unix Operating System 1973-2015 https://ieeexplore.ieee.org/abstract/document/7886953
- C source-to-source compiler enhancement from within https://hal.inria.fr/hal-02998412
- Compiling without Continuations https://dl.acm.org/doi/10.1145/3062341.3062380
- HardBound: Architectural Support for Spatial Safety of the C Programming Language https://dl.acm.org/doi/pdf/10.1145/1353535.1346295
- Program Analysis and Specialization for the C Programming Language https://www.semanticscholar.org/paper/Program-Analysis-and-Specialization-for-the-C-Andersen-Lee/b7efe971a34a0f2482e0b2520ffb31062dcdde62
- The Semantics of the C Programming Language http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.29.6755&rep=rep1&type=pdf
- Thriving in a Crowded and Changing World: C++ 2006–2020 https://www.stroustrup.com/hopl20main-p5-p-bfc9cd4--final.pdf
- Beej’s Guide to C Programming http://beej.us/guide/bgc/pdf/bgc_usl_c_1.pdf