here you goThings I’ve made, read and saved — shared here.

Archive

9,609 entries: 53 from X, 8,925 from Pinboard, saved 1998 to 2026.

Browse by tag, site, author, folder or language

Tags

Sites

Authors

Folders

Languages

39 entries#c ×

2024

C3 Programming Language

C3 programming language. Full C ABI compatibility, Module system, Generic modules, Design by contract, Zero overhead errors, Semantic macro system, First-class SIMD vector types, Struct subtyping, Safe array access using slices, Easy to use inline assembly, Cross-platform standard library which includes dynamic containers and strings, LLVM backend.

C3 Tutorial; has online playground.

C3 Blog by the creator, Christoffer Lernö

Also look at dlang's betterC - Better C - D Programming Language

notes#c#programming-language

Xr0

xr0.dev

Xr0 is a verifier for C. It eliminates many stubborn instances of undefined behaviour, like use-after-frees, double frees, null pointer dereferences and the use of uninitialised memory.

2022

Redbean

Redbean single-file distributable web server is built using cosmopolitan.

Redbean's home page does a great job of explaining what the software does:

rebean is an open source webserver in a zip executable that runs on six operating systems. The basic idea is if you want to build a web app that runs anywhere, then you download the redbean.com file, put your .html and .lua files inside it using the zip command, and then you've got a hermetic app you can deploy and share.

redbean embeds Lua, SQLite, and MbedTLS into a fork() driven application server that benchmarks at 1.1 million qps on a personal computer. It's got a live bestline REPL with code completion and a UNIX module too, that lets you directly use the Cosmopolitan Libc system call interface. redbean furthermore provides sandboxing and system call tracing for security. This makes redbean a great fit for when you want to build an app that's vertically integrated into a single tiny file that runs on nearly all PCs and servers.

--

Deploying a redbean app to Fly from Simon Willison’s TILs

Redbean Tiddlywiki Saver: rpdillon.net; Nov 2022.

shmup/awesome-cosmopolitan: List of Cosmopolitan Libc related resources and projects

Fullmoon is a Fast and minimalistic Redbean-based Lua web framework in one file by Paul Kulchenko, the creator of ZeroBraneStudio, a Lua IDE.

notes#c#embedded#lua#sqlite#webserver

Dive into Systems

diveintosystems.org

Dive into Systems is a free, online textbook that serves as a gentle introduction to computer systems, computer organization, and parallel computing. The book is intended for an audience that has only a CS1 background. It guides readers through a vertical slice of a computer to develop an understanding of a variety of systems topics, including:

how a computer runs a program, from a program expressed in a high-level language to low-level binary representation and circuits

programming in C and Assembly, assuming a CS1 background

introduction to operating systems and the systems costs that affect program performance (the memory hierarchy, caching, and code optimization)

introduction to parallel computing with shared memory and pthreads

2020

C Programming Langauge

Why C?

"The Endurance of an Unmanageable Language" - Some Were Meant for C; via ATS As a Systems Programming Language.

Learning

Tooling

Why not C?

C Is Not a Low-level Language - ACM Queue

Books

People and blogs

Important

  • cdecl; C gibberish ↔ English
  • ~sircmpwn/cstyle -- style guidelines on the lines of "SHOULD" and "SHOULD NOT"s.

C libraries

Memory Management

C programming practices

Cool stuff

Programming Language Theory

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

Safe C

A Tour of Xr0 - Xr0

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.

notes#c#programming-language

2017

2015

2014

2012

2011

2010

picoc - Project Hosting on Google Code

code.google.com

PicoC is a very small C interpreter for scripting. It was originally written for scripting a UAV's on-board flight system and it's also very suitable for other robotic, embedded and non-embedded applications too.

The core C source code is around 4000 lines of code. It's not intended to be a complete implementation of ISO C but it has all the essentials. When compiled it only takes a few k of code space and is also very sparing of data space. This means it can work well in small embedded devices. It's also a fun example of how to create a very small language implementation while still keeping the code readable.

picoc has been tested on x86-32, x86-64, powerpc, arm, ultrasparc, HP-PA and blackfin processors and is easy to port to new targets.

2009

2007

2006

2005