Reading is essential for learning and understanding

I continue with reading hard science-fiction books as planned. Recently, I’ve bought a number of used and new books, some I borrowed in the library. In my mind reading is essential for learning and understanding, for it’s possible to have a rudimentary understanding of things without knowing how to read or write, but there is a threshold which you won’t be able to pass if you don’t read.

Reading hard sci-fi books makes you think

Photo by NASA on Unsplash

Since my last post where I mentioned I enjoyed reading hard science-fictions books I made some progress. I’ve discovered and read another batch of very good quality books that make you think about our place in the Universe and think about what is possible and what could have been.

The books below vary in their style, themes and length, but all of them worth your time and money unless you have a public library access. But this doesn’t guarantee they have all the books below. In my case library doesn’t have a paper version of books by Greg Bear, Stephen Baxter and Peter F. Hamilton which is strange to say the least.

Very good books I recently read

Some AI generated statistics

Book Page Count Breakdown

Book TitleAuthorPages Read Full Book Length
Children of TimeAdrian Tchaikovsky600600
Fahrenheit 451Ray Bradbury190190
A View From the StarsCixin Liu224224
To Hold up the SkyCixin Liu334334
The Wandering Earth (First 1/3)Cixin Liu160480
RingStephen Baxter512512
EonGreg Bear504504
Pandora’s Star (In Progress)Peter F. Hamilton400986
TOTAL2,9244,330

Total Pages Read:

  • Actual progress: 2,924 pages.

Average Pages Per Book:

  • Current average progress: 365.5 pages per book.

What’s next?

Digital prison of focus. How social media is the same as ultra-processed food.

Photo by Vitaly Gariev on Unsplash

Learning Windows NT internals just for fun

Photo by Philip Oroni on Unsplash

How has it all started as far as I can recall?

Last year I started to look for technical books on Windows that described design, architecture and hands-on details of the OS. There are only a few books that exist on the subject. Among the best known ones is Windows Internals series of books that had a number of editions since 1992 when Inside Windows NT book by Helen Custer was published. As of today, the latest edition of the two part Windows Internals series is 7th from 2016. These books are not cheap, but they are written by the experts in the field, such as Pavel Yosifovich, Alex Ionescu, Mark Russinovich, David Solomon and Andrea Alliev.

1. The “Gold Standard” for Theory

“Operating System Concepts” by Silberschatz, Galvin, and Gagne (Often called “The Dinosaur Book” because of its cover)

  • Why it’s great: This is the most widely used textbook in the world. It explains the “why” behind OS design—how CPU scheduling works, why we need virtual memory, and how file systems are structured.
  • Best for: A high-level, comprehensive overview of all concepts.
  • Note: It is very theoretical. You won’t see much actual code, but you will understand the logic that applies to all operating systems.

2. The Practical “In the Trenches” Choice

“Operating Systems: Three Easy Pieces” (OSTEP) by Remzi and Andrea Arpaci-Dusseau

  • Why it’s great: This book is legendary for being readable, witty, and free (available online). It breaks the OS down into three pillars: Virtualization, Concurrency, and Persistence.
  • Best for: Someone who finds traditional textbooks dry. It includes homework assignments and coding projects that make the concepts “click.”
  • Link to Electronics: It does a fantastic job explaining how software abstractions interact with physical hardware (RAM and Disk).

3. For the Hardcore Implementation

“Modern Operating Systems” by Andrew S. Tanenbaum

Best for: Understanding the “Microkernel vs. Monolithic” debate you’ve been looking into. It provides a very detailed look at the interface between hardware and software.

Why it’s great: Tanenbaum is the creator of MINIX, the OS that inspired Linux. This book is famous for its depth. It doesn’t just tell you how a kernel works; it shows you the trade-offs involved in building one.

Resources

Technical tutorials

Open Source clone of Windows NT that you haven’t heard about

ReactOS is primarily a re‑implementation of the Windows NT 5.2 architecture — the version used in Windows Server 2003.

Books

YouTube videos

A two part interview with David Cutler

An interview with David Cutler by Dave Plummer

Developing Kernel Drivers with Modern C++ – Pavel Yosifovich

How using GenAI tools blindly makes you dumb

In the age of GenAI tools dominance it is easy to use these tools blindly, without thinking how the tools come up with their answers.

The main issue with treating these tools as a black box is the fact that people learn by making mistakes, while they apply what they try to learn. The problem with GenAI tools is that they give you a complete answer without you exerting any effort in trying to solve the problem on your own. Hence, you miss a critical step in a learning process, which is without a challenge there is no gain.

I can say this based on my own experience with using GenAI tools at work and at home for dozens if not hundreds times a day. The main issue with using GenAI tools at work, such as M365 Copilot Chat and the like, for software development tasks, is what I’ve mentioned above. These tools may give you a complete implementation that works, but you don’t learn anything new as a result, since you don’t try to implement that same thing on your own.

A good example, can be a situation where you’d like to have a Python script that can transform data from one format into another.
Recently, I needed to transform an OWASP Dependency Check plugin JSON report into a more user friendly format, specifically into a CSV file (aka Excel) to be able to see security vulnerabilities at a glance and to be able to sort them by the NVD last updated date.

To write such a script in Python would take me some time for sure. For I need to understand how to parse JSON file, extract various fields and then write the data in to CSV file. I had a bright idea to use GenAI to do it quickly to save time and effort. Indeed, after a few back and forth iterations with M365 Copilot Chat I had a working Python script that delivered what I needed, without me even looking into the implementation. It was what I’ve mentioned a black box treatment of the GenAI response. It worked and I didn’t care how. But, the main point was, that I didn’t learn anything in the process and felt actually as I was cheating.

I needed to update the script in the end, so I did indeed look at the implementation. And it took me some time to figure out how it worked. It was written well and in a modular fashion. But, I think I’d never do it in a similar way as a GenAI model did.
I was able to understand and adapt the code enough for it to work, but it didn’t work quite well. So, I said to myself, well it’s time to save my effort and asked GenAI to refactor it, which it did correctly first time.

So, in the end, I did save time on that script, and I did learn how it worked, since I was curious, but I didn’t get the same amount of experience, should I implement it on my own from start to finish.

In this case, I am not talking about GitHub Copilot, for I don’t use it currently. But, even using free GenAI tools can be harmful in the long run, if you treat them as black boxes, instead of tools that help you think better. They cannot substitute thinking, for then you become dumber in the process.

Also, with recent improvements in Anthropic Claude agents, people such as Andrej Karpathy state that we are in the new era of software programming. It sounds that it’s a valid statement to make, since he’s not the only one noticing this change in performance of GenAI agents, but the crucial point is that people who didn’t have software programming experience before starting to use such tools will certainly have a gap in programming skills, for they didn’t face challenges that taught them how to really think. Karpathy is a good example, since he was a programmer before GenAI tools where on the horizon.

In the end, GenAI tools can be very helpful and effective in helping you learn whatever topic you want, but they can be as effective in preventing you from gaining valuable experience while you master the subject.

Reading hard sci-fi books inspired by 3I/ATLAS

Photo by NASA on Unsplash

How it started

Statistics

What’s next?

Circuits, Symmetry, and Category Theory: A Fresh Look at the Memristor

Image generated by ChatGPT.

As it sometime happens to me while I was checking what’s new on YouTube the suggestions algorithm had a video about Memristor which was a forth basic electrical element that had a memory in it. While I was watching that interesting video that was created by prof. Giordano Scarciotti I saw the symmetry diagram that prof. Leon Chua came up with back in 1971. In that paper he proposed Memristor as a missing fundamental component in electrical circuit theory. So, what’s interesting about that diagram that it very much resembles diagrams in Category Theory.

Introduction

  • Resistor: relates voltage V and current i.
  • Capacitor: relates voltage V and charge q.
  • Inductor: relates current i and magnetic flux φ.

But in 1971, Leon Chua predicted a missing fourth element — the memristor — which connects charge q and flux φ. This completed the symmetry among the four fundamental electrical quantities.

🔎 Constitutive Relations and the “=0” Notation

In advanced circuit theory, each element is defined by a constitutive relation: a constraint between two variables. Instead of writing explicit formulas like Ohm’s Law (V = R·i), theorists often use an implicit form:

  • Resistor: R(V, i) = 0
  • Capacitor: C(V, q) = 0
  • Inductor: L(i, φ) = 0
  • Memristor: M(q, φ) = 0

This doesn’t mean resistance is zero. It means: the pair of variables must satisfy some relation enforced by the element. For a linear resistor, that relation is V − R·i = 0. For nonlinear devices, the relation could be more complex. The implicit form is powerful because it generalizes to nonlinear, time-varying, and memory-dependent behaviors.

🔄 Symmetry and Completeness

Chua’s insight was that with four fundamental quantities (V, i, q, φ), there should be six possible pairings. Three were already realized by resistor, capacitor, and inductor. The missing link — charge to flux — was filled by the memristor. This symmetry is what makes the framework elegant: every pair of quantities is connected by a constitutive relation.

🧩 A Category-Theoretic Perspective

Here’s where the categorical flavor comes in. The symmetry looks a lot like category theory:

  • Objects: The four quantities (V, i, q, φ).
  • Morphisms: The four elements (resistor, capacitor, inductor, memristor).
  • Composition: Just as morphisms compose in category theory, circuit elements combine to form networks.
  • Commutativity: The square diagram commutes:
    L ∘ R = M ∘ C
    meaning that whether voltage is mapped to flux via current (resistor → inductor) or via charge (capacitor → memristor), the structural mapping is consistent.

🖼️ ASCII Diagrams

Fundamental Square of Relations

   V ──R──▶ i
   │        │
   C        L
   │        │
   ▼        ▼
   q ──M──▶ φ
  • R : V → i (Resistor)
  • C : V → q (Capacitor)
  • L : i → φ (Inductor)
  • M : q → φ (Memristor)

Commutative Diagram

        V
       / \
      R   C
     /     \
    i       q
     \     /
      L   M
       \ /
        φ

Here, the two paths from V to φ are equivalent:
L ∘ R = M ∘ C

✨ Why This Matters

Thinking categorically opens new doors:

  • Circuits can be modeled as categories of physical quantities.
  • Functorial translations could connect circuit categories to computational categories (logic, automata).
  • Neuromorphic computing, where memristors play a central role, might benefit from categorical semantics.

The memristor isn’t just a missing device — it’s the morphism that makes the diagram commute, completing the symmetry both physically and mathematically.

🧠 The Main Idea

By reframing Chua’s symmetry in categorical terms, we see circuits not just as physical devices but as mathematical structures. The memristor completes not only the physics of passive elements but also the mathematics of a commutative square.

Understand any programing language using chatbots

Generated by Windows Copilot

Using chatbots wisely

Original post

I suppose there’s a whole class of programmers for whom a compiler is akin to magic, but knowing what’s getting emitted and how it works is fundamental to your success over the long haul. Write some assembly. Read the Dragon book on an airplane. AI will still be here when you get back. In five years, anyone capable of structured thought will be able to become a prompt engineer, but only 1% of software developers will actually be able to debug the stuff that comes out the other end. Be the 1%

What did I do next?

Here’s the full transcription of the PDP-11 assembly code using MACRO-11 syntax, followed by a detailed explanation:
Transcribed Code

.TITLE  BTOA                ; Program title
.MCALL  .PRINT,.EXIT,.TTYOUT ; System macros

HELLOMSG: .ASCIZ /BTOA Example/

        .EVEN               ; Ensure we're on a word boundary

START:  .PRINT  #HELLOMSG
        MOV     #12345., R0 ; Number to convert
        JSR     PC, BTOA
        .EXIT

BTOA:
        MOV     R0, -(SP)   ; Save R0 on stack
        MOV     R1, -(SP)   ; Save R1 on stack
        MOV     R2, -(SP)   ; Save R2 on stack

        MOV     R0, R1      ; Move number to R1 (low part of dividend)
        CLR     R0          ; Clear R0 (high part of dividend)
        DIV     #10., R0    ; Divide R0:R1 by 10, quotient in R0, remainder in R1

        TST     R0          ; Check if quotient is 0
        BEQ     PRINT       ; If quotient is 0, print digit
        JSR     PC, BTOA    ; Recursive call with quotient

PRINT:  ADD     #'0, R1     ; Convert remainder to ASCII
        MOV     R1, R0      ; Move ASCII digit to R0
        .TTYOUT R0          ; Print the digit

        MOV     (SP)+, R2   ; Restore R2
        MOV     (SP)+, R1   ; Restore R1
        MOV     (SP)+, R0   ; Restore R0
        RTS     PC          ; Return

.END    START

🧠 Explanation

This program converts a binary number (in this case, 12345) to its ASCII decimal representation and prints it to the terminal.

🔹 Header and Setup

  • .TITLE BTOA: Sets the title of the program.
  • .MCALL .PRINT,.EXIT,.TTYOUT: Declares macros for printing, exiting, and terminal output.
  • HELLOMSG: .ASCIZ /BTOA Example/: Defines a null-terminated string.
  • .EVEN: Ensures the next instruction is aligned on a word boundary.

🔹 Main Routine (START)

  • .PRINT #HELLOMSG: Prints the greeting message.
  • MOV #12345., R0: Loads the number 12345 into register R0.
  • JSR PC, BTOA: Calls the BTOA subroutine to convert and print the number.
  • .EXIT: Ends the program.

🔹 Subroutine (BTOA)

  • Saves registers R0, R1, and R2 to the stack.
  • Sets up for division: moves the number to R1, clears R0 to form a 32-bit dividend.
  • DIV #10., R0: Divides R0:R1 by 10. Quotient goes to R0, remainder to R1.
  • TST R0: Tests if quotient is zero.
    • If yes, go to PRINT.
    • If not, recursively call BTOA with the quotient.
  • PRINT: Converts the remainder (digit) to ASCII by adding '0', then outputs it using .TTYOUT.
  • Restores registers from the stack and returns.

This recursive approach ensures digits are printed in the correct order (most significant to least significant). Would you like to see how this would look in C or another language for comparison?


Great question! 🧠

BTOA stands for Binary To ASCII. It’s a common abbreviation used in programming to describe the process of converting a binary (or numeric) value into its ASCII character representation, typically for display or output purposes.

🔍 What does “Binary to ASCII” mean?

  • Binary: In this context, it refers to a numeric value stored in binary format (e.g., the number 12345 in machine-readable form).
  • ASCII: The American Standard Code for Information Interchange — a character encoding standard that maps numbers to printable characters like '0' to '9', 'A' to 'Z', etc.

        MOV     R0, R1      ; Move number to R1 (low part of dividend)
        CLR     R0          ; Clear R0 (high part of dividend)
        DIV     #10., R0    ; Divide R0:R1 by 10, quotient in R0, remainder in R1

        TST     R0          ; Check if quotient is 0
        BEQ     PRINT       ; If quotient is 0, print digit
        JSR     PC, BTOA    ; Recursive call with quotient

This block of PDP-11 assembly code is the core of the binary-to-ASCII conversion logic. It performs division by 10 to extract digits from a number and uses recursion to print them in the correct order. Here’s a breakdown of each line:

🔍 Line-by-Line Explanation

18 MOV R0, R1 ; Move number to R1 (low part of dividend)
  • Copies the number from R0 to R1.
  • This sets up the 32-bit dividend for division: R0:R1 (high:low).
19 CLR R0 ; Clear R0 (high part of dividend)
  • Clears R0 to zero.
  • Now the full dividend is 0:R1, effectively treating the original number as a 32-bit value with high word = 0.
20 DIV #10., R0 ; Divide R0:R1 by 10, quotient in R0, remainder in R1
  • Performs a 32-bit division of R0:R1 by 10.
  • After this:
  • R0 contains the quotient (i.e., number / 10)
  • R1 contains the remainder (i.e., number % 10), which is the rightmost digit
22 TST R0 ; Check if quotient is 0
  • Tests if the quotient is zero.
  • This determines whether there are more digits to process.
23 BEQ PRINT ; If quotient is 0, print digit
  • If R0 is zero, it means this is the last digit.
  • Branches to PRINT to output the digit.
24 JSR PC, BTOA ; Recursive call with quotient
  • If R0 is not zero, it means there are more digits.
  • Recursively calls BTOA with the quotient in R0, continuing the process.

🧠 Summary

This block:

  • Extracts the least significant digit of the number.
  • Uses division and recursion to process digits from most significant to least significant.
  • Ensures digits are printed in the correct order by printing only after recursion unwinds.

Conclusion

Developing Creative Imagination in a structured way

Examples of the operators in sci-fi movies

Supersize me

  • Honey, I Shrunk the Kids (1989),

  • Honey, I Blew Up the Kid (1992)

Superman

Intelligence Enhancement

The Invisible Man


Time Travel

Anti-gravity

Capitan’s Log

Solve everyday issues with GenAI assistant

In this post I’d like to provide a short example of how chatbots, in particular Windows Copilot, can help you address issues related to web browsing, programming, reverse engineering, intelligent internet searching (aka semantic searching) etc.

The issue

In this case I wanted to check what sci-fi writer Pavel Amnuel had on his website. Even though that website looks dated and it is, the information it contains is still relevant to this day. There you can find his essays on hard science fiction, a “A Course of Lectures on TRIZ and the Development of Creative Imagination (PTB)” and more.

That course on Development of Creative Imagination consists of thirteen parts, and it turns out that the 11th one has incorrect encoding and looks like this at the time of writing

ÐÒ – ÝÒÎ Î×ÅÍÜ ÏÐÎÑÒÎ!

Ï.Àìíóýëü

Êóðñ ëåêöèé ïî ðàçâèòèþ òâîð÷åñêîãî âîîáðàæåíèÿ è òåîðèè ðåøåíèÿ èçîáðåòàòåëüñêèõ çàäà÷ äëÿ íà÷èíàþùèõ.
(Ïðîäîëæåíèå 11)


 òåêñòå èñïîëüçîâàíû íåêîòîðûå çàäà÷è ïî ÒÐÈÇ è ÐÒ èç êíèã è ñòàòåé Ã.Ñ.Àëüòøóëëåðà, Á.Ë.Çëîòèíà, À.Â.Çóñìàí è äðóãèõ àâòîðîâ.
 

ÝÒÈ ÔÀÍÒÀÑÒÈ×ÅÑÊÈÅ ÎÒÊÐÛÒÈß

Ìû ãîâîðèëè îá “îòêðûòèÿõ”, êîòîðûå äåëàåò ñàìà ïðèðîäà. Íî è â ÷åëîâå÷åñêîì îáùåñòâå íå îäíè ëèøü ðàáîòíèêè íàóêè ñîâåðøàþò îòêðûòèÿ. Íå íóæíî çàáûâàòü î êîíêóðåíòàõ – ïèñàòåëÿõ-ôàíòàñòàõ. Òîíêîñòÿìè íàó÷íûõ çíàíèé îíè âëàäåþò äàëåêî íå âñåãäà, íî ïðàâèëàìè ôàíòàçèðîâàíèÿ ïîëüçóþòñÿ êóäà ëó÷øå ó÷åíûõ.

How to fix it with GenAI?

So, what I did I’ve posted a part of it in Windows Copilot and asked about the encoding issue. It came up with a correct explanation right away.

prompt: fix encoding of this text …

response:
The text you’ve provided appears to be Cyrillic text misinterpreted as Latin characters due to incorrect character encoding. Most likely, it was originally written in Russian using Windows-1251 encoding, but then read or displayed using Windows-1252 (Latin-1) or UTF-8 without proper conversion.

🔍 Correct Encoding: Windows-1251 (Cyrillic)

When decoded properly, the text reads as:
РТВ — ЭТО ОЧЕНЬ ПРОСТО!
Г. Альтшуллер
Курс лекций по развитию творческого воображения и теории решения изобретательских задач для начинающих.
(Proverb 11)

В тексте есть некоторые задачи по ТРИЗ из РТВ, из книг и статей Г.С. Альтшуллера, Б.Л. Злотина, А.В.В. Асмана и других авторов.

🛠 How to fix encoding issues

If you encounter similar garbled text:

  1. Identify the original encoding — in this case, Windows-1251.
  2. Use a text editor or converter that allows you to change encoding (e.g., Notepad++, Sublime Text, iconv).
  3. Convert from Windows-1251 to UTF-8 to make it readable across modern systems.

Would you like me to help you convert a file or more text like this?


I’ve tried a couple of approaches, again, using Copilot’s assistance. In the end what I’ve ended up doing is saving the page as html file and updating the head element with the following meta tag below which provided correct Cyrillic encoding instead of the Latin one.

<meta charset=”windows-1251″>

This is how the properly encoded version looks like


I’ve also notified the author about this issue, and hopefully, by the time you are reading this post it will be fixed already.

Bonus

One more thing, if you’ve noticed the link to Pavel Amnuel’s website opens that page in English. This is no coincidence. The page is originally in Russian, but Copilot helped me to discover that Google Translate allows to translate a web page into a specific language and get a link to that translated page. How neat is that?


prompt: I mean I need a link that I can share after it was translated
response:
Ah, got it! You want a sharable link to the translated version of the page. Here’s how to do that using Google Translate:

✅ Create a sharable translated link

Use this format:
https://translate.google.com/translate?hl=en&sl=ru&u=https://milkyway2.com/amnuel/Rtv.htm
This link:

  • Can be shared with anyone — they’ll see the English version of the Russian page
  • Translates the page from Russian (sl=ru) to English (hl=en)
  • Automatically opens the translated version in Google Translate

By the way, while on that website you can right click on the mouse button and translate any of the articles into English. Nowadays, translations are of a very high quality.
Also, I saw that when you navigate to a translated page link, other linked pages are translated automatically!

Summary

Here you have it Windows Copilot or any other similar tool can do wonders if you ask it to help.