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
Ciro Santilli's energy throughout the day varies as follows:
- morning: highest
- 11AM: peak exercise performance
- after lunch: brain death. Possibly due to Ciro's partial Spanish descent?
- late afternoon and evening: can do some stuff
Ciro has low tolerance to sleep deprivation which makes him very irritable, and low ability to sleep if there is any light. It must have to do with those damned ganglion cell photoreceptors. On the other hand, Ciro Santilli's wife can sleep without any problems with some morning light! It is definitely genetic. Ciro conjectures that people from very Northern parts of the world must have a gene that allows them to sleep even if there is some light, while more equatorial people don't. Maybe: pubmed.ncbi.nlm.nih.gov/33049062/
Ciro has mild olfactory synesthesia for star anise (八角, bajiao), which is widely used in Chinese cuisine and makes Ciro think uncontrollably of the color blue. Ciro does not have any other known synesthesias. He is also prone to nerd sniping form time to time.
Ciro is a reptilian-like being with cold hands and feet and low blood pressure. For this reason he believes that he will die of cancer or some respiratory problem. If the Chinese government doesn't get him first that is. This also partly explains why Ciro is not a big fan of swimming.
Besides Chinese food, Ciro really likes eating fruits and roasted nuts, maybe partly because he was born in Brazil, and partly because of monkey nature, see his Chinese name. At home he is known as "水果大王" (the big king of the fruits). Ciro is also a sucker for yoghurt (natural without added sugars and full fat, fat-tree yoghurt is terrible, often eaten with fruits). Ciro's "favorite drink" could be tonic water with freshly squeezed lemon. Tied with fresh fruit juices. Chocolate-wise, although not a huge fanatic, a Lindt dark chocolate with whole hazelnut pieces bar will do the job.
Ciro does not like receiving or giving gifts on expected social situations like birthdays or Christmas. Ciro believes that every day is equally precious, and can be a day to give, be it through awesome open source software contributions, or if you find something that your friend will like
Ciro has some respiratory allergies. When he was around 5, he had relatively serious asthma crisis which scared his parents to death. Throughout his life, he appears to be allergic at an intermediate level to: mold or dust mites (or whatever it is that old books/pillows have), cats (itching on touch), hay fever (in May in the UK, likely grass pollen). But even outside of hayfever season, Ciro's nose is constantly either running in the cold, or often partially blocked while sleeping throughout the year. Ciro believes however that this also gives him higher resistance to viral infections, since it has been many many years since he had a cold/flu, and when everyone in the office is going down with it, he's just fine. Ciro wonders if his active immune system will actually kill off cancers early, which he ranks as his most likely causes of death, along with respiratory and gastro-intestinal problems. Ciro has low blood pressure and cannot get fat, so cardio vascular problems seem much less likely.
Ciro is generally democrat due to his high compassion level. He believes that politics is highly genetically determined, and that just like you enter a room full of people and immediately like some and dislike others, the same goes for politics. People just vote for whoever they want to see more of because their way of speaking makes them feel good. There is not rationality involved in it at all.
Ciro self diagnoses a slight graphomania in the early 2020's. This is largely what led him to create OurBigBook.com, and contribute to Stack Overflow. Literature Nobel Prize laureate Naguib Mahfouz also suffers from the condition however, so maybe good can also come out of it:
If the urge to write should ever leave me, I want that day to be my last.
When Ciro was quite young, maybe around 7-10, when he got very angry or sad for some stupid reason (bullying perhaps? Ciro forgot), he would have a psychosomatic manifestation: his spine would become visibly curved sideways (scoliosis). While writing this paragraph, Ciro Googled it, and found e.g. medium.com/@michaelrosen_94192/the-root-cause-of-scoliosis-5c461002b634 that describes:so it is a somewhat well known thing! Incredible. Can you imagine the level of the passions that lead to such physical deformations? But of course, it was all for nothing.
The Root Cause of Idiopathic ScoliosisIt is proposed that Adolescent Idiopathic Scoliosis (AIS) is a condition created by emotional stress. Evidence is presented that unresolved emotional stress can cause unbalanced tensions in the fascia and growing muscles that gradually deform the spinal column.