Random Link ¯\_(ツ)_/¯ | ||
Nov 28, 2022 | » | C++ Meta-Programming
4 min; updated Nov 28, 2022
Clang, LLVM, GCC, and MSVC LLVM is an umbrella project, with several sub-projects, e.g. LLVM Core and Clang. LLVM Core libraries provide an optimizer and code generator for different CPUs. Clang is an “LLVM native” C/C++/Objective-C compiler which aims for fast compilation, useful error and warning messages, and a platform for building source-level tools. The Clang Static Analyzer and clang-tidy are examples of such tools. So if I were to create a programming language, I can define a transformation into LLVM intermediate representation (LLVM IR), and that will make use of LLVM core to optimize it?... |
Nov 7, 2021 | » | Bloom Filters
5 min; updated Sep 5, 2022
Bloom Filters In true fashion to Stigler’s Law of Eponymy (no scientific discovery is named after its original discoverer ), Ross Ashby (1960) did a probabilistic analysis of Calvin Mooers’s Zatocoding (1947) (coding system for library cards). This predates Burton Bloom’s work (1970). Motivation A Bloom filter for a set \(X: \{x_1, x_2, …, x_n\} \) from some universe \(\mathbb{U}\) allows one to test whether a given item \(x \in \mathbb{B}\) is an element of \(X\).... |
Jul 2, 2022 | » | Debugging
7 min; updated Sep 5, 2022
Debugging 101 Definition? Debugging involves inspecting a program’s internal state. printf Debugging and Logging In printf debugging, one adds print statements and keeps iterating until enough information has been extracted. Using logging has several advantages over printf debugging: varying logging destinations (e.g. standard output, files, sockets, remote servers, etc.); severity levels (e.g. INFO, DEBUG, WARN, ERROR, &c) that support filtering of output; color-coding for readability. Terminals have varying levels of color support: plain color; ANSI escape codes (16 color codes with bold/italic and background); 256 color palette; 24-bit truecolor (“888” colors, aka 16 million, e.... |