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.
A chronological list of all articles is also kept at: Section "Updates".
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.
- 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)"?
- 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. 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?
Without subnormals: +---+---+-------+---------------+-------------------------------+ exponent | ? | 0 | 1 | 2 | 3 | +---+---+-------+---------------+-------------------------------+ | | | | | | v v v v v v ----------------------------------------------------------------- floats * **** * * * * * * * * * * * * ----------------------------------------------------------------- ^ ^ ^ ^ ^ ^ | | | | | | 0 | 2^-126 2^-125 2^-124 2^-123 | 2^-127 With subnormals: +-------+-------+---------------+-------------------------------+ 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
- Is it necessary for NP problems to be decision problems?
- Polynomial time and exponential time. Answered focusing on the definition of "exponential time".
- What is the smallest Turing machine where it is unknown if it halts or not?. Answer focusing on "blank tape" initial condition only. Large parts of it are summarizing the Busy Beaver Challenge, but some additions were made.
- 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
- Web technology
- OpenGL
- What are shaders in OpenGL?
- Why do we use 4x4 matrices to transform things in 3D?
- Image Processing with GLSL shaders? Compared the CPU and GPU for a simple blur algorithm.
- Node.js
- Ruby on Rails
- POSIX
- What is POSIX? Huge classified overview of the most important things that POSIX specifies.
- Systems programming
- What do the terms "CPU bound" and "I/O bound" mean?
+--------+ +------------+ +------+ | device |>---------------->| function 0 |>----->| BAR0 | | | | | +------+ | |>------------+ | | | | | | | +------+ ... ... | | |>----->| BAR1 | | | | | | +------+ | |>--------+ | | | +--------+ | | ... ... ... | | | | | | | | +------+ | | | |>----->| BAR5 | | | +------------+ +------+ | | | | | | +------------+ +------+ | +--->| function 1 |>----->| BAR0 | | | | +------+ | | | | | | +------+ | | |>----->| BAR1 | | | | +------+ | | | | ... ... ... | | | | | | +------+ | | |>----->| BAR5 | | +------------+ +------+ | | | ... | | | +------------+ +------+ +------->| function 7 |>----->| BAR0 | | | +------+ | | | | +------+ | |>----->| BAR1 | | | +------+ | | ... ... ... | | | | +------+ | |>----->| BAR5 | +------------+ +------+
- Electronics
- Computer security
- Media
- 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
- Computational physics
- Register transfer level languages like Verilog and VHDL
- Android
- Debugging
- Program optimization
- Data
- Mathematics
- Section "Formalization of mathematics": some early thoughts that could be expanded. Ciro almost had a stroke when he understood this stuff in his teens.
- Network programming
- Physics
- Biology
- Quantum computing
- Bitcoin
- GIMP
- Home DIY
- China
60,000 28x28 grayscale images of hand-written digits 0-9, i.e. 10 categories.
This is THE "OG" computer vision dataset.
Playing with it is the de-facto computer vision hello world.
But it is important to note that as of the 2010's, the benchmark had become too easy for many application.
The dataset can be downloaded from yann.lecun.com/exdb/mnist/:but doing so is kind of pointless as both files use some crazy single-file custom binary format to store all images and labels. OMG!
wget \
http://yann.lecun.com/exdb/mnist/train-images-idx3-ubyte.gz \
http://yann.lecun.com/exdb/mnist/train-labels-idx1-ubyte.gz \
http://yann.lecun.com/exdb/mnist/t10k-images-idx3-ubyte.gz \
http://yann.lecun.com/exdb/mnist/t10k-labels-idx1-ubyte.gz
OK-ish data explorer: knowyourdata-tfds.withgoogle.com/#tab=STATS&dataset=mnist
Ciro Santilli is actively looking for donations and contracts so he can continue to work full time on OurBigBook.com sustainably, and develop free hardcore university-level STEM education for all ages!
At 100k USD, I quit my job to work full time on it for one year. During this year I will use my contacts with STEM students of a world leading university near where I live and solve as many of their problem sheets as possible, mostly by referring to OurBigBook.com articles I'll be writing. The goal is to get as much STEM knowledge as possible into the world, and highlight how flawed presencial and sequential Higher Education is, while positioning OurBigBook.com as an alternative way to organize humanity's knowledge. Quite grand.
Status: ~144k / 200k USD reached. 1st year locked in and started 1st June 2024 to 31st May 2025[ref], 2nd year stretch goal open. A second year greatly improve chances of success: year one I solve a bunch of courses, year two I come guns blazing with the content and expand further. Donation breakdown:More details: Section "Accounting method"
- 2024-03-18: $126,352 (!!!): anonymous 1000 Monero donation to self-custody wallet. Further comments: 1000 Monero donation.
- 2024-03-13: $1,375: anonymous 10 Monero donation to self-custody wallet
- 2023-11-20: $14.563: anonymous 100 Monero donation to Binance wallet
- 2023-09: $810: anonymous 0.032 Bitcoin donation to Coinbase wallet
- subscriptions up to 2024-01: $143,795
At 1M USD I retire and work on open STEM education forever.
Note to potential anonymous crypto donors: anonymous donations incur a regulatory risk. I cash out most of such donations and announce it very clearly to the government and banks. For example, at one point Barclays even froze my UK account. But things seem manageable for now. On one hand, such donations serve as a fun test of the financial system. But on the other, if all banks reject my money or if the government decides to take it, I will write off the anonymous donation at zero.
How to give:And if you have a different preferred payment mechanism not listed above, please contact Ciro, and he will set it up.
- one time donations:
- cryptocurrency: note that Ciro is not a regular crypto user, so you might want to make a smaller test donation and confirm that it worked by contacting Ciro before going for colossal amounts (one can dream):
- Monero address: 4A1KK4uyLQX7EBgN7uFgUeGt6PPksi91e87xobNq7bT2j4V6LqZHKnkGJTUuCC7TjDNnKpxDd8b9DeNBpSxim8wpSczQvzf. Secret view key: 7ccaf885ff5540b0ff18927e6ac5da30130afb1eaee09ad95d3c4536a6337e0f. This is a self-custody wallet on a "clean" dedicated Monero laptop connected the Internet. I check for incoming transactions from my dirty main laptop via a view-only wallet each weekend. The cash out method used is latest simplest thing that wasn't yet blocked in my country on a given week, the last time that was centralized swappers[ref]. The fact that the cash out method changes weekly confirms that Monero privacy hadn't yet been broken by countries and that Monero is still one of the most useful cryptocurrencies: Section "Are cryptocurrencies useful?". For transparency, I announce all non-trivial transactions on social media, and the full list of transactions can be seen by anyone with the secret view key provided. I previously had different addresses, so pre-existing donations on older addresses will not be visible there.
- Bitcoin address: 3KRk7f2JgekF6x7QBqPHdZ3pPDuMdY3eWR. This is a Coinbase wallet, off-chain transactions with no transaction fees accepted from other Coinbase users. This method has been tested, I have been able to receive funds from this address in 2023. Fees: non-fixed trading fees[ref] + 0% withdrawal fee on top of any Bitcoin network for on-chain transactions[ref]
- Ethereum address: 0x44cF8C9C015F46d3b2Df730b6492823FD7A91044. Test transaction recommended.
- Solana address: DjdaGawoVFdqxJEqpBGsSWuR4G4MVFNiNkAEu89HuKcE. Test transaction recommended.
- TransferWise tag: wise.com/pay/me/cirod3. It shows as "Ciro Duran Santilli" and that's correct. No fees apparently? Love it!
- PayPal: paypal.me/cirosantilli. Note that dots in Gmail address are ignored, and it is perfectly normal if the email you see has some extra dots in it. Fees: 2.9% + 0.30 GBP[ref].
- cryptocurrency: note that Ciro is not a regular crypto user, so you might want to make a smaller test donation and confirm that it worked by contacting Ciro before going for colossal amounts (one can dream):
- monthly subscriptions of 1$/month or more on either:Symbolic 1 dollar/month donation are extremely welcome to signal your interest! This way if a certain critical mass of sponsors is ever reached (~100?), Ciro can start to more actively asking slightly higher amounts to really try to achieve full time self sufficiency.
- GitHub Sponsors: github.com/sponsors/cirosantilli. Fees: 0% for individuals, up to 6% for organizations[ref]
- Patreon: www.patreon.com/cirosantilli. Fees: 8% pro plan + 1% PayPal withdrawal capped at 20 USD[ref]. We are waiting to reach the cap to withdraw!
- larger grants/contracts from filthy rich individuals or organizations: contact Ciro as mentioned at: Section "How to contact Ciro Santilli" to discuss.Ciro is interested in contracts/voluntary work that would be compatible/synergic with the OurBigBook.com project. Some possibilities include:
- interacting directly with classes of university students to help them learn the class subject, while at the same time spreading the university knowledge outside of the university walls
- one-to-one mentoring of individuals of any age that are looking to make an impact in the world, and not just pass their exams
- fixing specific bugs in related projects Ciro has experience in. These could be either via one-off contracts, or on platforms such as:
Ciro's current ambitions require him to remain in developed countries, because Ciro wants to document advanced science and technology by liaising with top universities, and there is not nearly as much high technology in poor countries. Remaining in developed countries is also a required due to family reasons.
If you would like public acknowledgement for your support, Ciro will very gladly give it, just let Ciro know how you'd prefer it. Due to Ciro Santilli's campaign for freedom of speech in China, many supporters have chosen to be anonymous, and that is totally fine, not everyone is interested in politics, or has a situation where going public is acceptable, so we don't have a standard setup yet, let's build it together. A acknowledgement section at the bottom of this page would be a minimum, but I for larger donations we could add a your advertisement in a locations such as:
- near the top of of the accounts controlled by Ciro Santilli, e.g. one of Ciro Santilli's Twitter accounts, github.com/cirosantilli or stackoverflow.com/users/895245
- near the top of cirosantilli.com
100k USD/year is a semi arbitrary amount that sounds nice. My last day job total compensation as of 2024 was about 150k USD/year.
Contains several computer vision models, e.g. ResNet, all of them including pre-trained versions on some dataset, which is quite sweet.
Documentation: pytorch.org/vision/stable/index.html