Education Updated 2025-07-16
One of the causes Ciro Santilli care the most about: motivation.
How to improve education? Simple:
- tax the fuck out of the rich people and companies: wealth tax and invest it in education
- invest intelligently as mentioned at what poor countries have to do to get richer:
- focus on fewer higher excellence schools that select the most promising poor students, rather than giving crappy average to everyone
- use OurBigBook.com
Educational technology Updated 2025-07-16
Edward Teller Updated 2025-07-16
www.youtube.com/playlist?list=PLVV0r6CmEsFw1phnddYWXtVkRW8eUVlqx Edward Teller interview by Web of Stories (1996) Date shown at: www.webofstories.com/play/edward.teller/1. Listener: John H. Nuckolls
Edward Teller, An Early Time
. Source. Comissioned by the Los Alamos National Laboratory in 1979. Producer: Mario Balibreraa.- youtu.be/Goim-4MF_uE?t=338; holy fuck he almost cut his foot off on a stupid tram accident!
- youtu.be/Goim-4MF_uE?t=457: he plays the piano
- youtu.be/Goim-4MF_uE?t=965: he drove Szilard to propose to Einstein the Einstein-Szilard letter
Effective field theory Updated 2025-07-16
www.youtube.com/watch?v=WB8r7CU7clk&list=PLUl4u3cNGP60TvpbO5toEWC8y8w51dtvm by Iain Stewart. Basically starts by explaining how quantum field theory is so generic that it is hard to get any numerical results out of it :-)
eGroups Updated 2025-07-16
Company co-founded by Scott Hassan, early Google programmer at Stanford University, and Carl Victor Page, Jr., Larry Page's older brother.
The company was sold to Yahoo! in August 2000 for $432m and became Yahoo! Groups. They managed to miraculously dodge the Dot-com bubble, which mostly poppet in 2021. After the acquisition, Yahoo started to redirect them to: groups.yahoo.com as can be seen on the Wayback Machine: web.archive.org/web/20000401000000*/egroups.com The first archive of groups.yahoo.com is from February 2001: web.archive.org/web/20010202055100/http://groups.yahoo.com/ and it unsurprisingly looks basically exactly like eGroups.
eGroups logo
. From the earliest archive of their "about" page: web.archive.org/web/19991004062653/http://www.egroups.com/info/top.html in 1999. Electronic test equipment Updated 2025-07-16
Electron microscope Updated 2025-07-16
All of them need a vacuum because you can't shoot elecrons through air, as mentioned at Video "50,000,000x Magnification by AlphaPhoenix (2022)".
Electrum Updated 2025-07-16
For the love of God, on Ubuntu install from the official AppImage downloaded from electrum.org/#download, not this random outdated Snap snapcraft.io/electrum:
ELF Hello World Tutorial Backlinks Updated 2025-07-16
ELF Hello World Tutorial
.data
section Updated 2025-07-16.data
is section 1:00000080 01 00 00 00 01 00 00 00 03 00 00 00 00 00 00 00 |................|
00000090 00 00 00 00 00 00 00 00 00 02 00 00 00 00 00 00 |................|
000000a0 0d 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
000000b0 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
- 80 4:
sh_type
=01 00 00 00
:SHT_PROGBITS
: the section content is not specified by ELF, only by how the program interprets it. Normal since a.data
section. - 80 8:
sh_flags
=03
7x00
:SHF_WRITE
andSHF_ALLOC
: www.sco.com/developers/gabi/2003-12-17/ch4.sheader.html#sh_flags, as required from a.data
section - 90 0:
sh_addr
= 8x00
: TODO: standard says:but I don't understand it very well yet.If the section will appear in the memory image of a process, this member gives the address at which the section's first byte should reside. Otherwise, the member contains 0.
- 90 8:
sh_offset
=00 02 00 00 00 00 00 00
=0x200
: number of bytes from the start of the program to the first byte in this section 00000200 48 65 6c 6c 6f 20 77 6f 72 6c 64 21 0a 00 |Hello world!.. |
readelf -x .data hello_world.o
which outputs:Hex dump of section '.data': 0x00000000 48656c6c 6f20776f 726c6421 0a Hello world!.
NASM sets decent properties for that section because it treats.data
magically: www.nasm.us/doc/nasmdoc7.html#section-7.9.2Also note that this was a bad section choice: a good C compiler would put the string in.rodata
instead, because it is read-only and it would allow for further OS optimizations.- a0 8:
sh_link
andsh_info
= 8x 0: do not apply to this section type. www.sco.com/developers/gabi/2003-12-17/ch4.sheader.html#special_sections - b0 0:
sh_addralign
=04
= TODO: why is this alignment necessary? Is it only forsh_addr
, or also for symbols insidesh_addr
? - b0 8:
sh_entsize
=00
= the section does not contain a table. If != 0, it means that the section contains a table of fixed size entries. In this file, we see from thereadelf
output that this is the case for the.symtab
and.rela.text
sections.
- a0 8:
ELF Hello World Tutorial Dynamic linking sections Updated 2025-07-16
ELF Hello World Tutorial Global file structure Updated 2025-07-16
An ELF file contains the following parts:
- ELF header. Points to the position of the section header table and the program header table.
- Section header table (optional on executable). Each has
e_shnum
section headers, each pointing to the position of a section. - N sections, with
N <= e_shnum
(optional on executable) - Program header table (only on executable). Each has
e_phnum
program headers, each pointing to the position of a segment. - N segments, with
N <= e_phnum
(only on executable)
The order of those parts is not fixed: the only fixed thing is the ELF header that must be the first thing on the file: Generic docs say:
In pictures: sample object file with three sections:
+-------------------+
| ELF header |---+
+---------> +-------------------+ | e_shoff
| | |<--+
| Section | Section header 0 |
| | |---+ sh_offset
| Header +-------------------+ |
| | Section header 1 |---|--+ sh_offset
| Table +-------------------+ | |
| | Section header 2 |---|--|--+
+---------> +-------------------+ | | |
| Section 0 |<--+ | |
+-------------------+ | | sh_offset
| Section 1 |<-----+ |
+-------------------+ |
| Section 2 |<--------+
+-------------------+
But nothing (except sanity) prevents the following topology:
+-------------------+
| ELF header |---+ e_shoff
+-------------------+ |
| Section 1 |<--|--+
+---------> +-------------------+ | |
| | |<--+ | sh_offset
| Section | Section header 0 | |
| | |------|---------+
| Header +-------------------+ | |
| | Section header 1 |------+ |
| Table +-------------------+ |
| | Section header 2 |---+ | sh_offset
+---------> +-------------------+ | sh_offset |
| Section 2 |<--+ |
+-------------------+ |
| Section 0 |<---------------+
+-------------------+
But some newbies may prefer PNGs :-)
ELF Hello World Tutorial Implementations Updated 2025-07-16
- Compiler toolchains generate and read ELF files.
- Operating systems read and run ELF files.
- Specialized libraries. Examples:
ELF Hello World Tutorial Object hd Updated 2025-07-16
Running:gives:
hd hello_world.o
00000000 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00 |.ELF............|
00000010 01 00 3e 00 01 00 00 00 00 00 00 00 00 00 00 00 |..>.............|
00000020 00 00 00 00 00 00 00 00 40 00 00 00 00 00 00 00 |........@.......|
00000030 00 00 00 00 40 00 00 00 00 00 40 00 07 00 03 00 |....@.....@.....|
00000040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00000080 01 00 00 00 01 00 00 00 03 00 00 00 00 00 00 00 |................|
00000090 00 00 00 00 00 00 00 00 00 02 00 00 00 00 00 00 |................|
000000a0 0d 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
000000b0 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
000000c0 07 00 00 00 01 00 00 00 06 00 00 00 00 00 00 00 |................|
000000d0 00 00 00 00 00 00 00 00 10 02 00 00 00 00 00 00 |................|
000000e0 27 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |'...............|
000000f0 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000100 0d 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 |................|
00000110 00 00 00 00 00 00 00 00 40 02 00 00 00 00 00 00 |........@.......|
00000120 32 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |2...............|
00000130 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000140 17 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 |................|
00000150 00 00 00 00 00 00 00 00 80 02 00 00 00 00 00 00 |................|
00000160 a8 00 00 00 00 00 00 00 05 00 00 00 06 00 00 00 |................|
00000170 04 00 00 00 00 00 00 00 18 00 00 00 00 00 00 00 |................|
00000180 1f 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 |................|
00000190 00 00 00 00 00 00 00 00 30 03 00 00 00 00 00 00 |........0.......|
000001a0 34 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |4...............|
000001b0 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
000001c0 27 00 00 00 04 00 00 00 00 00 00 00 00 00 00 00 |'...............|
000001d0 00 00 00 00 00 00 00 00 70 03 00 00 00 00 00 00 |........p.......|
000001e0 18 00 00 00 00 00 00 00 04 00 00 00 02 00 00 00 |................|
000001f0 04 00 00 00 00 00 00 00 18 00 00 00 00 00 00 00 |................|
00000200 48 65 6c 6c 6f 20 77 6f 72 6c 64 21 0a 00 00 00 |Hello world!....|
00000210 b8 01 00 00 00 bf 01 00 00 00 48 be 00 00 00 00 |..........H.....|
00000220 00 00 00 00 ba 0d 00 00 00 0f 05 b8 3c 00 00 00 |............<...|
00000230 bf 00 00 00 00 0f 05 00 00 00 00 00 00 00 00 00 |................|
00000240 00 2e 64 61 74 61 00 2e 74 65 78 74 00 2e 73 68 |..data..text..sh|
00000250 73 74 72 74 61 62 00 2e 73 79 6d 74 61 62 00 2e |strtab..symtab..|
00000260 73 74 72 74 61 62 00 2e 72 65 6c 61 2e 74 65 78 |strtab..rela.tex|
00000270 74 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |t...............|
00000280 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000290 00 00 00 00 00 00 00 00 01 00 00 00 04 00 f1 ff |................|
000002a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
000002b0 00 00 00 00 03 00 01 00 00 00 00 00 00 00 00 00 |................|
000002c0 00 00 00 00 00 00 00 00 00 00 00 00 03 00 02 00 |................|
000002d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
000002e0 11 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 |................|
000002f0 00 00 00 00 00 00 00 00 1d 00 00 00 00 00 f1 ff |................|
00000300 0d 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000310 2d 00 00 00 10 00 02 00 00 00 00 00 00 00 00 00 |-...............|
00000320 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000330 00 68 65 6c 6c 6f 5f 77 6f 72 6c 64 2e 61 73 6d |.hello_world.asm|
00000340 00 68 65 6c 6c 6f 5f 77 6f 72 6c 64 00 68 65 6c |.hello_world.hel|
00000350 6c 6f 5f 77 6f 72 6c 64 5f 6c 65 6e 00 5f 73 74 |lo_world_len._st|
00000360 61 72 74 00 00 00 00 00 00 00 00 00 00 00 00 00 |art.............|
00000370 0c 00 00 00 00 00 00 00 01 00 00 00 02 00 00 00 |................|
00000380 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000390
ELF Hello World Tutorial Program header table Updated 2025-07-16
Only appears in the executable.
Contains information of how the executable should be put into the process virtual memory.
The executable is generated from object files by the linker. The main jobs that the linker does are:
- determine which sections of the object files will go into which segments of the executable.
- do relocation according to the
.rela.text
section. This depends on how the multiple sections are put into memory.
readelf -l hello_world.out
gives:Elf file type is EXEC (Executable file)
Entry point 0x4000b0
There are 2 program headers, starting at offset 64
Program Headers:
Type Offset VirtAddr PhysAddr
FileSiz MemSiz Flags Align
LOAD 0x0000000000000000 0x0000000000400000 0x0000000000400000
0x00000000000000d7 0x00000000000000d7 R E 200000
LOAD 0x00000000000000d8 0x00000000006000d8 0x00000000006000d8
0x000000000000000d 0x000000000000000d RW 200000
Section to Segment mapping:
Segment Sections...
00 .text
01 .data
On the ELF header, and:
e_phoff
, e_phnum
and e_phentsize
told us that there are 2 program headers, which start at 0x40
and are 0x38
bytes long each, so they are:00000040 01 00 00 00 05 00 00 00 00 00 00 00 00 00 00 00 |................|
00000050 00 00 40 00 00 00 00 00 00 00 40 00 00 00 00 00 |..@.......@.....|
00000060 d7 00 00 00 00 00 00 00 d7 00 00 00 00 00 00 00 |................|
00000070 00 00 20 00 00 00 00 00 |.. ..... |
00000070 01 00 00 00 06 00 00 00 | ........|
00000080 d8 00 00 00 00 00 00 00 d8 00 60 00 00 00 00 00 |..........`.....|
00000090 d8 00 60 00 00 00 00 00 0d 00 00 00 00 00 00 00 |..`.............|
000000a0 0d 00 00 00 00 00 00 00 00 00 20 00 00 00 00 00 |.......... .....|
Structure represented www.sco.com/developers/gabi/2003-12-17/ch5.pheader.html:
typedef struct {
Elf64_Word p_type;
Elf64_Word p_flags;
Elf64_Off p_offset;
Elf64_Addr p_vaddr;
Elf64_Addr p_paddr;
Elf64_Xword p_filesz;
Elf64_Xword p_memsz;
Elf64_Xword p_align;
} Elf64_Phdr;
Breakdown of the first one:
- 40 0:
p_type
=01 00 00 00
=PT_LOAD
: this is a regular segment that will get loaded in memory. - 40 4:
p_flags
=05 00 00 00
= execute and read permissions. No write: we cannot modify the text segment. A classic way to do this in C is with string literals: stackoverflow.com/a/30662565/895245 This allows kernels to do certain optimizations, like sharing the segment amongst processes. This member gives the offset from the beginning of the file at which the first byte of the segment resides.
But it looks like offsets from the beginning of segments, not file?- 50 0:
p_vaddr
=00 00 40 00 00 00 00 00
: initial virtual memory address to load this segment to - 50 8:
p_paddr
=00 00 40 00 00 00 00 00
: unspecified effect. Intended for systems in which physical addressing matters. TODO example? - 60 0:
p_filesz
=d7 00 00 00 00 00 00 00
: size that the segment occupies in memory. If smaller thanp_memsz
, the OS fills it with zeroes to fit when loading the program. This is how BSS data is implemented to save space on executable files. i368 ABI says onPT_LOAD
:The bytes from the file are mapped to the beginning of the memory segment. If the segment’s memory size (p_memsz) is larger than the file size (p_filesz), the ‘‘extra’’ bytes are defined to hold the value 0 and to follow the segment’s initialized area. The file size may not be larger than the memory size.
The second segment (
.data
) is analogous. TODO: why use offset 0x0000d8
and address 0x00000000006000d8
? Why not just use 0
and 0x00000000006000d8
?Then the:section of the
Section to Segment mapping:
readelf
tells us that:TODO where does this information come from? stackoverflow.com/questions/23018496/section-to-segment-mapping-in-elf-files
ELF Hello World Tutorial
.rela.text
Updated 2025-07-16Section type:
sh_type == SHT_RELA
.Common name: "relocation section".
.rela.text
holds relocation data which says how the address should be modified when the final executable is linked. This points to bytes of the text area that must be modified when linking happens to point to the correct memory locations.Basically, it translates the object text containing the placeholder 0x0 address:to the actual executable code containing the final 0x6000d8:
a: 48 be 00 00 00 00 00 movabs $0x0,%rsi
11: 00 00 00
4000ba: 48 be d8 00 60 00 00 movabs $0x6000d8,%rsi
4000c1: 00 00 00
It was pointed to by
sh_info
= 6
of the .symtab
section.readelf -r hello_world.o
outputs:Relocation section '.rela.text' at offset 0x3b0 contains 1 entries:
Offset Info Type Sym. Value Sym. Name + Addend
00000000000c 000200000001 R_X86_64_64 0000000000000000 .data + 0
The section does not exist in the executable.
The actual bytes are:
00000370 0c 00 00 00 00 00 00 00 01 00 00 00 02 00 00 00 |................|
00000380 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
The
struct
represented is:typedef struct {
Elf64_Addr r_offset;
Elf64_Xword r_info;
Elf64_Sxword r_addend;
} Elf64_Rela;
So:
- 370 0:
r_offset
= 0xC: address into the.text
whose address this relocation will modify - 370 8:
r_info
= 0x200000001. Contains 2 fields:ELF64_R_TYPE
= 0x1: meaning depends on the exact architecture.ELF64_R_SYM
= 0x2: index of the section to which the address points, so.data
which is at index 2.
The AMD64 ABI says that type1
is calledR_X86_64_64
and that it represents the operationS + A
where:This address is added to the section on which the relocation operates. - 380 0:
r_addend
= 0
ELF Hello World Tutorial
.shstrtab
Updated 2025-07-16Section type:
sh_type == SHT_STRTAB
.Common name: "section header string table".
This section gets pointed to by the
e_shstrnd
field of the ELF header itself.String indexes of this section are are pointed to by the
sh_name
field of section headers, which denote strings.This section does not have outputs:
SHF_ALLOC
marked, so it will not appear on the executing program.readelf -x .shstrtab hello_world.o
Hex dump of section '.shstrtab':
0x00000000 002e6461 7461002e 74657874 002e7368 ..data..text..sh
0x00000010 73747274 6162002e 73796d74 6162002e strtab..symtab..
0x00000020 73747274 6162002e 72656c61 2e746578 strtab..rela.tex
0x00000030 7400 t.
ELF Hello World Tutorial
SHT_STRTAB
Updated 2025-07-16Sections with
sh_type == SHT_STRTAB
are called string tables.They hold a null separated array of strings.
Such sections are used by other sections when string names are to be used. The using section says:
- which string table they are using
- what is the index on the target string table where the string starts
So for example, we could have a string table containing:
Data: \0 a b c \0 d e f \0
Index: 0 1 2 3 4 5 6 7 8
And if another section wants to use the string
d e f
, they have to point to index 5
of this section (letter d
).Notable string table sections:
.shstrtab
.strtab
ELF Hello World Tutorial
SHT_SYMTAB
on the executable Updated 2025-07-16 Entropy Updated 2025-07-16
OK, can someone please just stop the philosophy and give numerical predictions of how entropy helps you predict the future?
The Unexpected Side of Entropy by Daan Frenkel
. Source. 2021.The Biggest Ideas in the Universe | 20. Entropy and Information by Sean Carroll (2020)
Source. In usual Sean Carroll fashion, it glosses over the subject. This one might be worth watching. It mentions 4 possible definitions of entropy: Boltzmann, Gibbs, Shannon (information theory) and John von Neumann (quantum mechanics).- www.quantamagazine.org/what-is-entropy-a-measure-of-just-how-little-we-really-know-20241213/ What Is Entropy? A Measure of Just How Little We Really Know. on Quanta Magazine attempts to make the point that entropy is observer dependant. TODO details on that.
There are unlisted articles, also show them or only show them.