These are the best articles ever authored by Ciro Santilli, most of them in the format of Stack Overflow answers.
Ciro posts update about new articles on his Twitter accounts.
Some random generally less technical in-tree essays will be present at: Section "Essays by Ciro Santilli".
- Trended on Hacker News:
- CIA 2010 covert communication websites on 2023-06-11. 190 points, a mild success.
- x86 Bare Metal Examples on 2019-03-19. 513 points. The third time something related to that repo trends. Hacker news people really like that repo!
- again 2020-06-27 (archive). 200 points, repository traffic jumped from 25 daily unique visitors to 4.6k unique visitors on the day
- How to run a program without an operating system? on 2018-11-26 (archive). 394 points. Covers x86 and ARM
- ELF Hello World Tutorial on 2017-05-17 (archive). 334 points.
- x86 Paging Tutorial on 2017-03-02. Number 1 Google search result for "x86 Paging" in 2017-08. 142 points.
Figure 1. BIOS bare metal hello world running on a Lenovo ThinkPad T430. Source.
- x86 assembly
- What does "multicore" assembly language look like?
- What is the function of the push / pop instructions used on registers in x86 assembly? Going down to memory spills, register allocation and graph coloring.
- Linux kernel
- What do the flags in /proc/cpuinfo mean?
- How does kernel get an executable binary file running under linux?
- How to debug the Linux kernel with GDB and QEMU?
- Can the sys_execve() system call in the Linux kernel receive both absolute or relative paths?
- What is the difference between the kernel space and the user space?
- Is there any API for determining the physical address from virtual address in Linux?
- Why do people write the
#!/usr/bin/env
python shebang on the first line of a Python script? - How to solve "Kernel Panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)"?
Figure 2. Path from init/main.c until bzImage in the Linux kernel 4.19. Source. - Single program Linux distro
- QEMU
- gcc and Binutils:
- How do linkers and address relocation works?
- What is incremental linking or partial linking?
- GOLD (
-fuse-ld=gold
) linker vs the traditional GNU ld and LLVM ldd - What is the -fPIE option for position-independent executables in GCC and ld? Concrete examples by running program through GDB twice, and an assembly hello world with absolute vs PC relative load.
- How many GCC optimization levels are there?
- Why does GCC create a shared object instead of an executable binary according to file?
- C/C++: almost all of those fall into "disassemble all the things" category. Ciro also does "standards dissection" and "a new version of the standard is out" answers, but those are boring:
- What does "static" mean in a C program?
- In C++ source, what is the effect of
extern "C"
? - Char array vs Char Pointer in C
- How to compile glibc from source and use it?
- When should
static_cast
,dynamic_cast
,const_cast
andreinterpret_cast
be used? - What exactly is
std::atomic
in C++?. This answer was originally more appropriately entitled "Let's disassemble some stuff", and got three downvotes, so Ciro changed it to a more professional title, and it started getting upvotes. People judge books by their covers. - Code 1.
nm
outputs showing that objects are redefined multiple times across files if you don't use template instantiation properly.notmain.o 0000000000000000 0000000000000017 W MyTemplate<int>::f(int) main.o 0000000000000000 0000000000000017 W MyTemplate<int>::f(int)
- IEEE 754
- What is difference between quiet NaN and signaling NaN?
- In Java, what does NaN mean?
- Code 2. Visualization of subnormal floating point numbers vs what IEEE 754 would look like without them.
+---+---+-------+---------------+-------------------------------+ exponent | ? | 0 | 1 | 2 | 3 | +---+---+-------+---------------+-------------------------------+ | | | | | | v v v v v v ----------------------------------------------------------------- floats * **** * * * * * * * * * * * * ----------------------------------------------------------------- ^ ^ ^ ^ ^ ^ | | | | | | 0 | 2^-126 2^-125 2^-124 2^-123 | 2^-127 +-------+-------+---------------+-------------------------------+ exponent | 0 | 1 | 2 | 3 | +-------+-------+---------------+-------------------------------+ | | | | | v v v v v ----------------------------------------------------------------- floats * * * * * * * * * * * * * * * * * ----------------------------------------------------------------- ^ ^ ^ ^ ^ ^ | | | | | | 0 | 2^-126 2^-125 2^-124 2^-123 | 2^-127
- Computer science
- Algorithms
- Heap vs Binary Search Tree (BST). Compared Heap vs BST vs Hash Maps.
Figure 5. Source.
- Is it necessary for NP problems to be decision problems?
- Polynomial time and exponential time. Answered focusing on the definition of "exponential time".
- Algorithms
- Git
| 0 | 4 | 8 | C | |-------------|--------------|-------------|----------------| 0 | DIRC | Version | File count | ctime ...| 0 | ... | mtime | device | 2 | inode | mode | UID | GID | 2 | File size | Entry SHA-1 ...| 4 | ... | Flags | Index SHA-1 ...| 4 | ... |
tree {tree_sha} {parents} author {author_name} <{author_email}> {author_date_seconds} {author_date_timezone} committer {committer_name} <{committer_email}> {committer_date_seconds} {committer_date_timezone} {commit message}
- How do I clone a subdirectory only of a Git repository?
- Python
- What is the difference between old style and new style classes in Python?
- What is a mixin in Python, and why are they useful?
Figure 6. Python Threads vs Processes with 8 hyperthreads. Source.
- Web
Figure 9. Source. - What are shaders in OpenGL?
- Why do we use 4x4 matrices to transform things in 3D?
- Is it possible to build a heatmap from point data at 60 times per second? Compared CPU vs GPU shaders.
Figure 10. Source. - Image Processing with GLSL shaders? Compared the CPU and GPU for a simple blur algorithm.
Figure 11. Source. Video 1. OpenGL GPU GLSL fragment shader real time v4l2 Linux webcam computer vision box blur vs CPU. Source.
- Node.js
- Ruby on Rails
- POSIX
- What is POSIX? Huge classified overview of the most important things that POSIX specifies.
- Systems programming
- Electronics
- Raspberry Pi
Figure 13. Raspberry Pi 2 directly connected to a laptop with an Ethernet cable. Image from answer to: How to hook up a Raspberry Pi via Ethernet to a laptop without a router? Figure 14. Raspberry Pi 2 connected to a laptop with an USB UART adapter. Image from answer to: How to hook up a Raspberry Pi via Ethernet to a laptop without a router? Figure 15. Raspberry Pi OS being emulated on QEMU 2.5.0 on Ubuntu 16.04 with a modified kernel. Image from answer to: How to emulate the Raspberry Pi 2 on QEMU? Figure 16. Bare metal LED blinker program running on a Raspberry Pi 2. Image from answer to: How to run a C program with no OS on the Raspberry Pi?
- Raspberry Pi
- Computer security
- Media
- How is audio represented with numbers in computers?. Original question deleted, lol...: How to programmatically synthesize music?
Video 2. Canon in D in C. Source. - How to resize a picture using ffmpeg's sws_scale()?
- Is there any decent speech recognition software for Linux? ran a few examples manually on
vosk-api
and compared to ground truth.
- Eclipse
- Computer hardware
- Scientific visualization software
- Numerical analysis
Video 3. Real-time heat equation OpenGL visualization with interactive mouse cursor using relaxation method by Ciro Santilli (2016) Source.
- Computational physics
- Register transfer level languages like Verilog and VHDL
- Android
- Debugging
- Software optimization
- What is tail call optimization?
- How can I profile C++ code running on Linux? Compares gprof, valgrind callgrind, perf and gperftools on a simple executable.
Figure 21. gprof2dot image generated from the gprof data of a simple test program. Source.
- Mathematics
Figure 22. Diagram of the fundamental theorem on homomorphisms by Ciro Santilli, showing the relationship between group homomorphisms and normal subgroups. - formalization of mathematics
- Network programming
- Physics
- What is the difference between plutonium and uranium?
Figure 23. Spacetime diagram illustrating how faster-than-light travel implies time travel.
- Biology
Figure 24. Top view of an open Oxford Nanopore MinION. Source. Figure 25. Mass fractions in a minimal growth medium vs an amino acid cut in a simulation of the E. Coli Whole Cell Model by Covert Lab. Source.
- Quantum computing
- quantum computing is just matrix multiplication
- Understanding the Bloch sphere, see also: Bloch sphere
Figure 26. Visualization of the continuous deformation of states as we walk around the Bloch sphere represented as photon polarization arrows.
- Bitcoin
- GIMP
Figure 27. Step in the demonstration of how to combine two images side-by-side in GIMP?.
- Home DIY
- China