Turing machine regex tape notation Updated 2025-07-16
Turing machine regex tape notation is Ciro Santilli's made up name for the notation used e.g. at:Most of it is just regular regular expression notation, with a few differences:
- denotes the right or left edge of the (zero initialized) tape. It is often omitted as we always just assume it is always present on both sides of every regex
A
,B
,C
,D
andE
denotes the current machine state. This is especially common notation in the context of the BB(5) problem<
and>
next to the state indicate if the head is on top of the left or right element. E.g.:indicates that the head11 (01)^n <A 00 (0011)^{n+2}
A
is on top of the last1
of the last sequence of n01
s to the left of the head.
This notation is very useful, as it helps compress long repeated sequences of Turing machine tape and extract higher level patterns from them, which is how you go about understanding a Turing machine in order to apply Turing machine acceleration.
x86 Paging Tutorial Page faults Updated 2025-07-16
When an exception happens, the CPU jumps to an address that the OS had previously registered as the fault handler. This is usually done at boot time by the OS.
This could happen for example due to a programming error:but there are cases where it is not a bug, for example in Linux when:
int *is = malloc(1);
is[2] = 1;
- the program wants to increase its stack.
- the page was swapped to disk.The OS will need to do some work behind the processes back to get the page back into RAM.
x86 Paging Tutorial Page size choice Updated 2025-07-16
Turing machine that halts if and only if Collatz conjecture is false Updated 2025-07-16
mathoverflow.net/questions/309044/is-there-a-known-turing-machine-which-halts-if-and-only-if-the-collatz-conjectur suggests one does not exist. Amazing.
Intuitively we see that the situation is fundamentally different from the Turing machine that halts if and only if the Goldbach conjecture is false because for Collatz the counter example must go off into infinity, while in Goldbach conjecture we can finitely check any failures.
Amazing.
TuxGuitar Updated 2025-07-16
Just use MuseScore instead.
Can import from: MIDI.
Ubuntu 20.04:
sudo apt install tuxguitar tuxguitar-alsa tuxguitar-jsa tuxguitar-oss
tuxguitar-jsa
was needed, otherwise no sound: askubuntu.com/questions/457321/tuxguitar-no-sound-in-14-04Has OK step sequencer non-realtime up/down/left/right guitar based composition interface.
Has chord insertion.
Has bend editor.
Could be more amazing, but it is OK.
A bit limited by being very "guitar oriented". Shows you guitar strings, and you enter offset to each string. So to enter two adjacent notes you need to use two seprate strings and thing about the offsets. If only it had a more piano based interface.
Drum notation is also atrocious, you have to go to the top chord, and use high numbers starting at 36.
x86 Paging Tutorial PAE Updated 2025-07-16
Physical address extension.
With 32 bits, only 4GB RAM can be addressed.
This started becoming a limitation for large servers, so Intel introduced the PAE mechanism to Pentium Pro.
Page table structure is also altered if PAE is on. The exact way in which it is altered depends on weather PSE is on or off.
Polish a turd Updated 2025-07-16
Ciro Santilli learned this expression from Angry Video Game Nerd.
Twin paradox Updated 2025-07-16
The key question is: why is this not symmetrical?
One answer is: because one of the twin accelerates, and therefore changes inertial frames.
But the better answer is: understand what happens when the stationary twin sends light signals at constant time intervals to each other. When does the travelling twin receives them?
Another way of understanding it is: you have to make all calculations on a single inertial frame for the entire trip.
Supposing the sibling quickly accelerates out (or magically starts moving at constant speed), travels at constant speed, and quickly accelerates back, and travels at constant speed setup, there are three frames that seem reasonable:
- the frame of the non-accelerating sibling
- the outgoing trip of the accelerating sibling
- the return trip of the accelerating sibling
If you do that, all three calculations give the exact same result, which is reassuring.
Another way to understand it is to do explicit integrations of the acceleration: physics.stackexchange.com/questions/242043/what-is-the-proper-way-to-explain-the-twin-paradox/242044#242044 This is the least insightful however :-)
Bibliography:
x86 Paging Tutorial Page table entries Updated 2025-07-16
The exact format of table entries is fixed by the hardware.
The page table is then an array of
struct
.On this simplified example, the page table entries contain only two fields:so in this example the hardware designers could have chosen the size of the page table to b
bits function
----- -----------------------------------------
20 physical address of the start of the page
1 present flag
21
instead of 32
as we've used so far.All real page table entries have other fields, notably fields to set pages to read-only for Copy-on-write. This will be explained elsewhere.
It would be impractical to align things at 21 bits since memory is addressable by bytes and not bits. Therefore, even in only 21 bits are needed in this case, hardware designers would probably choose 32 to make access faster, and just reserve bits the remaining bits for later usage. The actual value on x86 is 32 bits.
Here is a screenshot from the Intel manual image "Formats of CR3 and Paging-Structure Entries with 32-Bit Paging" showing the structure of a page table in all its glory: Figure 1. "x86 page entry format".
The fields are explained in the manual just after.
Nuclear weapon Updated 2025-07-16
A weapons-grade ring of electrorefined plutonium, typical of the rings refined at Los Alamos and sent to Rocky Flats for fabrication
. Source. The ring has a purity of 99.96%, weighs 5.3 kg, and is approx 11 cm in diameter. It is enough plutonium for one bomb core. Which city shall we blow up today?Ciro Santilli is mildly obsessed by nuclear reactions, because they are so quirky. How can a little ball destroy a city? How can putting too much of it together produce criticality and kill people like in the Slotin accident or the Tokaimura criticality accident. It is mind blowing really.
More fun nuclear stuff to watch:
- Dr. Strangelove (1964)
- en.wikipedia.org/wiki/Chernobyl_(miniseries)
- The World Of Enrico Fermi by Harvard Project Physics (1970)
- Fat Man and Little Boy (1987) shows a possibly reasonably realistic of the history of the development of the Trinity
The Ultimate Guide to Nuclear Weapons by hypohystericalhistory (2022)
Source. Good overall summary. Some interesting points:- youtu.be/8uIPQBOCJ64?t=2946 talks about the difference between tactical and strategic nuclear weapons
- youtu.be/8uIPQBOCJ64?t=3291 mentions variable yield devices, this is the main new thing Ciro Santilli learned from this video
- youtu.be/8uIPQBOCJ64?t=3416 discusses if a strategic nuclear weapon usage would inevitably lead to tactical nuclear weapon escalation. It then mentions one case in which a possibly comparable escalation didn't happen: the abstinence of using chemical weapon during World War II.
Toffoli gate Updated 2025-07-16
x86 Paging Tutorial Process memory layout Updated 2025-07-16
For each process, the virtual address space looks like this:
------------------ 2^32 - 1
Stack (grows down)
v v v v v v v v v
------------------
(unmapped)
------------------ Maximum stack size.
(unmapped)
-------------------
mmap
-------------------
(unmapped)
-------------------
^^^^^^^^^^^^^^^^^^^
brk (grows up)
-------------------
BSS
-------------------
Data
-------------------
Text
-------------------
------------------- 0
The kernel maintains a list of pages that belong to each process, and synchronizes that with the paging.
If the program accesses memory that does not belong to it, the kernel handles a page-fault, and decides what to do:
When an ELF file is loaded by the kernel to start a program with the
exec
system call, the kernel automatically registers text, data, BSS and stack for the program.The
brk
and mmap
areas can be modified by request of the program through the brk
and mmap
system calls. But the kernel can also deny the program those areas if there is not enough memory.brk
and mmap
can be used to implement malloc
, or the so called "heap".mmap
is also used to load dynamically loaded libraries into the program's memory so that it can access and run it.Stack allocation: stackoverflow.com/questions/17671423/stack-allocation-for-process
Calculating exact addresses Things are complicated by:
- Address Space Layout Randomization.
- the fact that environment variables, CLI arguments, and some ELF header data take up initial stack space: unix.stackexchange.com/questions/145557/how-does-stack-allocation-work-in-linux/239323#239323
Why the text does not start at 0: stackoverflow.com/questions/14795164/why-do-linux-program-text-sections-start-at-0x0804800-and-stack-tops-start-at-0
x86 Paging Tutorial PSE Updated 2025-07-16
x86 Paging Tutorial Segmentation Updated 2025-07-16
In x86 systems, there may actually be 2 address translation steps:like this:
- first segmentation
- then paging
(logical) ------------------> (linear) ------------> (physical)
segmentation paging
The major difference between paging and segmentation is that:
- paging splits RAM into equal sized chunks called pages
- segmentation splits memory into chunks of arbitrary sizes
This is the main advantage of paging, since equal sized chunks make things more manageable by reducing memory fragmentation problems. See also:
Paging came after segmentation historically, and largely replaced it for the implementation of virtual memory in modern OSs.
Paging has become so much more popular that support for segmentation was dropped in x86-64 in 64-bit mode, the main mode of operation for new software, where it only exists in compatibility mode, which emulates IA-32.
Francis Crick Institute Updated 2025-07-16
History of the World Wide Web Updated 2025-07-16
Janelia Research Campus Updated 2025-07-16
MAC address Updated 2025-07-16
Hardcoded and unique network addresses for every single device on Earth.
Started with 48 bits (6 bytes), usually given as 01:23:45:67:89:AB but people now encouraged to use 64-bit ones.
How they are assigned: www.quora.com/How-are-MAC-addresses-assigned Basically IEEE gives out the 3 first bytes to device manufacturers that register, this is called the organizationally unique identifier, and then each manufacturer keeps their own devices unique.
National Institute for Medical Research Updated 2025-07-16
Neon Updated 2025-07-16
There are unlisted articles, also show them or only show them.