<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Nnamdi Okpala</title>
    <description>The latest articles on DEV Community by Nnamdi Okpala (@okpalan).</description>
    <link>https://dev.to/okpalan</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1803696%2F2d789dca-efed-426b-8493-c045ed7fb9bd.jpg</url>
      <title>DEV Community: Nnamdi Okpala</title>
      <link>https://dev.to/okpalan</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/okpalan"/>
    <language>en</language>
    <item>
      <title>Return of the Riches, Riches of the Return</title>
      <dc:creator>Nnamdi Okpala</dc:creator>
      <pubDate>Sun, 20 Sep 2026 18:16:46 +0000</pubDate>
      <link>https://dev.to/okpalan/return-of-the-riches-riches-of-the-return-1fjl</link>
      <guid>https://dev.to/okpalan/return-of-the-riches-riches-of-the-return-1fjl</guid>
      <description>&lt;h2&gt;
  
  
  An Autobiographical Sketch of Nnamdi Michael Okpala
&lt;/h2&gt;

&lt;p&gt;My name is &lt;strong&gt;Nnamdi Michael Okpala&lt;/strong&gt;. I am Nigerian, from Anambra State, and although I have spent part of my life in the United Kingdom, I have never stopped thinking of Nigeria as home.&lt;/p&gt;

&lt;p&gt;There is a difference between living somewhere and belonging somewhere. The United Kingdom has been where I studied and where I built part of my life, but Nigeria is the place that lives inside me. I think about the land itself. I remember the soil, the heat, and the golden sand. I remember making sand angels—not snow angels, but sand angels, pressing myself into the earth beneath the Nigerian sun.&lt;/p&gt;

&lt;p&gt;Those memories might sound small to somebody else. To me, they are not small at all.&lt;/p&gt;

&lt;p&gt;I think about how fertile the land can be, how quickly something planted can become something living. That image has stayed with me: soil becoming food, land sustaining people, the earth giving something back. Sometimes I have described my relationship to Nigeria in intense ways, imagining that even after death I would want to become part of that soil. Beneath those words is something simple: I want to belong to the land that produced me.&lt;/p&gt;

&lt;p&gt;Living in Britain has gradually made that feeling stronger.&lt;/p&gt;

&lt;p&gt;At times I have felt stuck here. I came to study, but eventually I found myself asking what I was still doing in the United Kingdom. I have a house here and things I have built here, yet possessions do not automatically create belonging. I have experienced difficult periods in Britain, including experiences I describe as abuse and years of my life that I feel were taken from me. There came a point when I began thinking, &lt;em&gt;I have had enough. I want to go home.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I do not think of myself as British simply because I have lived in Britain. When people describe me that way, something in me immediately pushes back.&lt;/p&gt;

&lt;p&gt;I am Nigerian.&lt;/p&gt;

&lt;p&gt;I am Igbo.&lt;/p&gt;

&lt;p&gt;My roots are in Anambra.&lt;/p&gt;

&lt;p&gt;And I want to reconnect with them. &lt;/p&gt;

&lt;p&gt;That desire led me to something surprisingly ordinary: looking for people to talk to.&lt;/p&gt;

&lt;p&gt;I began creating an account on InterPals because I wanted Nigerian pen pals. I wanted conversations with people at home and with Nigerians in the diaspora. I searched for people from Nigeria and Anambra and looked for Igbo speakers. It felt slightly ridiculous that a person could feel so deeply connected to a country and still find himself staring at filters on a website trying to select “Nigeria,” “Anambra,” “Igbo,” and “friendship.” Human civilisation has apparently advanced all the way to drop-down menus.&lt;/p&gt;

&lt;p&gt;But it mattered to me.&lt;/p&gt;

&lt;p&gt;I wanted real conversation.&lt;/p&gt;

&lt;p&gt;One of the people I met was Charles, whose Igbo name is Ikechukwu. We began talking about where we came from. He told me he was born in Onitsha and had connections in Anambra State. I told him about myself. We exchanged pieces of Igbo.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Aha m bụ Nnamdi Michael Okpala.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;My name is Nnamdi Michael Okpala.&lt;/p&gt;

&lt;p&gt;Even something as simple as speaking Igbo with another person felt meaningful. It was a reminder that language is more than vocabulary. A language carries jokes, childhoods, families, villages, names, memories, and ways of seeing the world.&lt;/p&gt;

&lt;p&gt;I began telling people that I wanted to return to Nigeria. Sometimes I simply said that I was stuck in the United Kingdom and had come here to study. I told Charles that I needed to get back because I had people who cared about me.&lt;/p&gt;

&lt;p&gt;That sentence captured more than I realised.&lt;/p&gt;

&lt;p&gt;I wanted community.&lt;/p&gt;

&lt;p&gt;I wanted home.&lt;/p&gt;

&lt;p&gt;I wanted to stop feeling as though my real life was somewhere else waiting for me to return to it. &lt;/p&gt;

&lt;p&gt;At the same time, reconnecting with people online forced me to think carefully about trust.&lt;/p&gt;

&lt;p&gt;Conversations about travel quickly become conversations about money. Coming to Britain can involve passports, visas, education, work, accommodation and fees. I spoke with people who wanted opportunities abroad, and I understood why. Life in Nigeria can be difficult.&lt;/p&gt;

&lt;p&gt;But I also learned to set boundaries.&lt;/p&gt;

&lt;p&gt;I do not want friendships based on sending money. In the past, I lent £250 to someone I considered a friend and was not repaid. That experience stayed with me. It made me more cautious about people asking me for financial help.&lt;/p&gt;

&lt;p&gt;I can care about somebody without becoming their bank.&lt;/p&gt;

&lt;p&gt;I can want somebody to succeed without paying for their life.&lt;/p&gt;

&lt;p&gt;I can be somebody's friend without having to prove that friendship through money.&lt;/p&gt;

&lt;p&gt;That distinction became important as I started meeting more people online. I wanted relationships based on conversation, culture, ideas and mutual respect rather than transactions. &lt;/p&gt;

&lt;p&gt;My ambitions go beyond simply returning home.&lt;/p&gt;

&lt;p&gt;I call one of my ideas &lt;strong&gt;“Return of the Riches.”&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To me, returning should not mean simply arriving at an airport with luggage and saying that I am home. I want to return with knowledge, skills, ideas and resources that can be useful.&lt;/p&gt;

&lt;p&gt;I think about food.&lt;/p&gt;

&lt;p&gt;I think about water.&lt;/p&gt;

&lt;p&gt;I think about shelter.&lt;/p&gt;

&lt;p&gt;I think about technology.&lt;/p&gt;

&lt;p&gt;I think about what I have learned through STEM, computing and building software. I have worked on computer programs and online projects. I have spoken about my OBINexus and Orion ideas and about creating systems that could eventually become something larger than myself.&lt;/p&gt;

&lt;p&gt;I want whatever I build to mean something.&lt;/p&gt;

&lt;p&gt;I do not want achievement merely so I can point at a screen and say, &lt;em&gt;Look what I made.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I want creation to become contribution.&lt;/p&gt;

&lt;p&gt;That is what “Return of the Riches” means to me: taking whatever knowledge, experience or resources I have gained and asking how they can travel back with me. &lt;/p&gt;

&lt;p&gt;My thoughts about Biafra are also connected to this sense of identity and responsibility. At times my language about Biafra, conflict and sacrifice has been extremely intense. I have spoken about warfare, history, weapons, dying for the land and becoming part of its soil.&lt;/p&gt;

&lt;p&gt;Those words reflect how strongly I can feel about history, belonging and injustice. But beneath the imagery of war is another question that matters more to the life I actually want to build:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What can I create for my people while I am alive?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Food is more useful when people can eat it.&lt;/p&gt;

&lt;p&gt;Water matters when people can drink it.&lt;/p&gt;

&lt;p&gt;Shelter matters when families can live beneath it.&lt;/p&gt;

&lt;p&gt;Technology matters when it makes somebody's life better.&lt;/p&gt;

&lt;p&gt;A country is not only its wars. It is also the conversations between strangers, the names parents give their children, the languages spoken in homes, the businesses people create, the farms people cultivate and the friendships people build.&lt;/p&gt;

&lt;p&gt;My return, therefore, cannot merely be about what I oppose.&lt;/p&gt;

&lt;p&gt;It has to be about what I build. &lt;/p&gt;

&lt;p&gt;I am still working out exactly what returning to Nigeria will look like.&lt;/p&gt;

&lt;p&gt;I have talked about packing my belongings and sending things through a port. I have imagined returning around the end of the year. I have thought about what I would leave behind in Britain and what I would carry with me.&lt;/p&gt;

&lt;p&gt;Some questions remain unresolved.&lt;/p&gt;

&lt;p&gt;Where exactly will I settle?&lt;/p&gt;

&lt;p&gt;What will I build first?&lt;/p&gt;

&lt;p&gt;How will my projects develop?&lt;/p&gt;

&lt;p&gt;Which friendships will survive beyond an online chat window?&lt;/p&gt;

&lt;p&gt;I do not yet have every answer.&lt;/p&gt;

&lt;p&gt;But I know what keeps pulling me back.&lt;/p&gt;

&lt;p&gt;The soil.&lt;/p&gt;

&lt;p&gt;The language.&lt;/p&gt;

&lt;p&gt;The names.&lt;/p&gt;

&lt;p&gt;The people.&lt;/p&gt;

&lt;p&gt;The feeling of being somewhere and knowing that the land beneath my feet is connected to the story I tell about myself.&lt;/p&gt;

&lt;p&gt;I am Nnamdi Michael Okpala.&lt;/p&gt;

&lt;p&gt;I have lived in the United Kingdom, studied, struggled, created things, met people, lost trust in some people and tried to rebuild it with others. I have spent nights online looking for Nigerians simply because I wanted somebody from home to speak to.&lt;/p&gt;

&lt;p&gt;And somewhere beneath all the complicated plans, technical frameworks, arguments about visas, online conversations and enormous ideas is a much simpler image:&lt;/p&gt;

&lt;p&gt;golden Nigerian soil,&lt;/p&gt;

&lt;p&gt;a person lying down in it,&lt;/p&gt;

&lt;p&gt;arms and legs moving across the sand,&lt;/p&gt;

&lt;p&gt;making an angel in the earth,&lt;/p&gt;

&lt;p&gt;and remembering where he belongs. &lt;/p&gt;

</description>
    </item>
    <item>
      <title>The Polyglot Bridge: Mastering Cross-Language Calls with LibPolyCall</title>
      <dc:creator>Nnamdi Okpala</dc:creator>
      <pubDate>Sun, 20 Sep 2026 14:23:02 +0000</pubDate>
      <link>https://dev.to/okpalan/the-polyglot-bridge-mastering-cross-language-calls-with-libpolycall-1lnm</link>
      <guid>https://dev.to/okpalan/the-polyglot-bridge-mastering-cross-language-calls-with-libpolycall-1lnm</guid>
      <description>&lt;h1&gt;
  
  
  The Polyglot Bridge: Mastering Cross-Language Calls with LibPolyCall
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;By Obi (Obinexus) | &lt;a class="mentioned-user" href="https://dev.to/obinexus"&gt;@obinexus&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Hello everyone, welcome back! I'm Obi from the Obi Nexus computing team. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpqw6u5pusi5c6uv98eh9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpqw6u5pusi5c6uv98eh9.png" alt=" " width="800" height="425"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Today, I want to introduce a tool that is a massive milestone in API development and legacy modernization: &lt;strong&gt;LibPolyCall&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;If you've ever tried to integrate a legacy C++ rendering engine with a modern Python microservice, you know the pain. You end up writing custom ctypes, FFI bindings, or brittle glue code for every single language pair. LibPolyCall solves this by acting as a "program-first" polyglot runtime broker. It provides a stable C ABI that eliminates language barriers.&lt;/p&gt;

&lt;p&gt;But getting started with a new architecture can be tricky. In this tutorial, I'm going to walk you through exactly how to set up LibPolyCall, navigate its port architecture, and successfully execute a polyglot call.&lt;/p&gt;




&lt;h2&gt;
  
  
  🏗️ Understanding the Architecture
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6bk92nle2aimturn95az.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6bk92nle2aimturn95az.png" alt=" " width="799" height="249"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Before writing code, we need to understand the LibPolyCall topology. It operates on a &lt;strong&gt;zero-trust, broker-based model&lt;/strong&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;&lt;code&gt;polycall.exe&lt;/code&gt; (The Runtime/Broker):&lt;/strong&gt; This is the central bouncer. It doesn't run your code; it routes requests between language adapters.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;&lt;code&gt;Polycallfile&lt;/code&gt; (The Map):&lt;/strong&gt; A configuration file that tells the runtime what language servers exist and what ports they &lt;em&gt;should&lt;/em&gt; use.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Language Adapters (The Bindings):&lt;/strong&gt; Thin client libraries (like &lt;code&gt;pypolycall&lt;/code&gt;) that connect your actual Python, Node, or C++ logic to the runtime.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;The CLI (The Admin):&lt;/strong&gt; The command-line interface used to start the runtime and execute one-off calls.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  🚨 The #1 Gotcha: The Ports
&lt;/h3&gt;

&lt;p&gt;When you start the runtime using &lt;code&gt;polycall.exe --config .\Polycallfile start&lt;/code&gt;, it will output something like: &lt;br&gt;
&lt;code&gt;polycall start: listening on 127.0.0.1:56862&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do not confuse this with your language server ports!&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Port &lt;code&gt;56862&lt;/code&gt; (or similar):&lt;/strong&gt; This is the &lt;strong&gt;CLI Control Port&lt;/strong&gt;. It is used &lt;em&gt;only&lt;/em&gt; for administrative commands (&lt;code&gt;start&lt;/code&gt;, &lt;code&gt;stop&lt;/code&gt;, &lt;code&gt;call&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Port &lt;code&gt;8084&lt;/code&gt; (from your Polycallfile):&lt;/strong&gt; This is the &lt;strong&gt;Runtime Adapter Port&lt;/strong&gt;. Your Python and C++ scripts will connect to &lt;em&gt;this&lt;/em&gt; port to register their logic with the broker.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you try to make a CLI call pointing to &lt;code&gt;8084&lt;/code&gt;, it will fail. The CLI must always target the control port.&lt;/p&gt;


&lt;h2&gt;
  
  
  🐍 Step 1: The Python Adapter
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;pypolycall&lt;/code&gt; binding is an adapter, not a server framework. Its job is to connect to the runtime, authenticate, and execute operations. &lt;/p&gt;

&lt;p&gt;Create a file named &lt;code&gt;python_service.py&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;asyncio&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;pypolycall.core&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;ProtocolBinding&lt;/span&gt;

&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
    &lt;span class="c1"&gt;# Initialize the binding to connect to the polycall.exe runtime.
&lt;/span&gt;    &lt;span class="c1"&gt;# Note: We use port 8084 here (the Adapter Port), NOT the CLI control port.
&lt;/span&gt;    &lt;span class="n"&gt;binding&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;ProtocolBinding&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;polycall_host&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;localhost&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;polycall_port&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;8084&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="k"&gt;try&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="c1"&gt;# 1. Connect to the runtime
&lt;/span&gt;        &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;binding&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;connect&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
        &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;✓ Connected to polycall.exe runtime on port 8084&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

        &lt;span class="c1"&gt;# 2. Authenticate (Zero-trust is mandatory)
&lt;/span&gt;        &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;binding&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;authenticate&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
            &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;username&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;developer&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;api_key&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;dev-key&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;scope&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;binding-access&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
        &lt;span class="p"&gt;})&lt;/span&gt;
        &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;✓ Authentication successful&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

        &lt;span class="c1"&gt;# 3. Execute an operation
&lt;/span&gt;        &lt;span class="c1"&gt;# Operations use the namespace convention: language.function_name
&lt;/span&gt;        &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;binding&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;execute_operation&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
            &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;python.hello_world&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;name&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Nnamdi&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;✓ Result: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="k"&gt;except&lt;/span&gt; &lt;span class="nb"&gt;Exception&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Protocol error: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;finally&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;binding&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;shutdown&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;__name__&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;__main__&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;asyncio&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;Note: Don't make the mistake I did by trying to use &lt;code&gt;register_handler&lt;/code&gt; or &lt;code&gt;register_operation&lt;/code&gt;. Those methods don't exist. The binding uses &lt;code&gt;execute_operation&lt;/code&gt; to invoke logic that the runtime already knows about.&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Running the Setup
&lt;/h3&gt;

&lt;p&gt;Open &lt;strong&gt;Terminal 1&lt;/strong&gt; (The Runtime):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;\polycall.exe&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--config&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;\Polycallfile&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;start&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="c"&gt;# Output: polycall start: listening on 127.0.0.1:56862 (Ctrl-C to stop)&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Open &lt;strong&gt;Terminal 2&lt;/strong&gt; (The Python Adapter):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;python&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;python_service.py&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="c"&gt;# Output: &lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="c"&gt;# ✓ Connected to polycall.exe runtime on port 8084&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="c"&gt;# ✓ Authentication successful&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="c"&gt;# ✓ Result: {'status': 'success', 'operation': 'python.hello_world', 'params': {'name': 'Nnamdi'}}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You have just successfully executed a polyglot operation through the LibPolyCall broker!&lt;/p&gt;




&lt;h2&gt;
  
  
  🚀 Step 2: The Ultimate Goal - Bridging to C++
&lt;/h2&gt;

&lt;p&gt;Now that you understand the adapter pattern, you can achieve the true goal: &lt;strong&gt;Modern Python calling Legacy C++&lt;/strong&gt;.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Write the C++ Adapter (&lt;code&gt;cpp_service.cpp&lt;/code&gt;):&lt;/strong&gt;&lt;br&gt;
You would compile a C++ program using the &lt;code&gt;obinexus&lt;/code&gt; C++ binding headers. It will connect to the runtime on port &lt;code&gt;8084&lt;/code&gt; (just like Python did) and register the &lt;code&gt;cpp.render_frame&lt;/code&gt; operation.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Execute the Call:&lt;/strong&gt;&lt;br&gt;
Once your C++ adapter is running and authenticated, you can use the CLI in &lt;strong&gt;Terminal 3&lt;/strong&gt; to call it:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;\polycall.exe&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;call&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;cpp&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;render_frame&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--endpoint&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;localhost:56862&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--input-value&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;'{\"width\":1920,\"height\":1080}'&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--format&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;json&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Or call it from Python:&lt;/strong&gt;&lt;br&gt;
Simply change your Python script to &lt;code&gt;result = await binding.execute_operation("cpp.render_frame", {"width": 1920, "height": 1080})&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  🏁 Conclusion
&lt;/h2&gt;

&lt;p&gt;LibPolyCall solves the "API development nightmare" by decoupling your business logic from the language it's written in. It doesn't care if you're passing data from Python to Node, or Python to Legacy COBOL. It just gives you the data seamlessly.&lt;/p&gt;

&lt;p&gt;The runtime handles the security, the telemetry, and the routing. You just write your bindings.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Get Started:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GitHub:&lt;/strong&gt; &lt;a href="https://github.com/obinexus/libpolycall" rel="noopener noreferrer"&gt;github.com/obinexus/libpolycall&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;PyPolyCall:&lt;/strong&gt; &lt;a href="https://github.com/obinexus/pypolycall" rel="noopener noreferrer"&gt;github.com/obinexus/pypolycall&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you're building with LibPolyCall, let me know in the comments! &lt;/p&gt;

&lt;p&gt;Like, share, and subscribe. May the power of polycore be with you! 🚀&lt;/p&gt;

</description>
      <category>api</category>
      <category>architecture</category>
      <category>programming</category>
      <category>softwaredevelopment</category>
    </item>
    <item>
      <title>Building a Thread-Safe HTTP Server in Python with in depth analysis exploring the exploit.</title>
      <dc:creator>Nnamdi Okpala</dc:creator>
      <pubDate>Mon, 14 Sep 2026 12:40:04 +0000</pubDate>
      <link>https://dev.to/okpalan/building-a-thread-safe-http-server-in-python-5g7n</link>
      <guid>https://dev.to/okpalan/building-a-thread-safe-http-server-in-python-5g7n</guid>
      <description>&lt;h1&gt;
  
  
  Building a Thread-Safe HTTP Server in&amp;nbsp;Python with in depth analysis exploring the exploit.
&lt;/h1&gt;

&lt;p&gt;Python is a great language for building servers, especially for quick projects and prototyping.&lt;/p&gt;

&lt;p&gt;However, one common challenge that arises when dealing with servers is thread safety. If you're building a web server that can handle multiple users at once, you need to make sure it's thread-safe—that is, able to handle multiple operations concurrently without crashing or exposing security vulnerabilities.&lt;/p&gt;

&lt;p&gt;In this tutorial, we'll explore what thread safety means, dive into Python's threading system, and then build a simple threaded HTTP server that can serve multiple clients simultaneously. Let's break it down for beginners so you can follow along even if you're new to threading.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Thread Safety?
&lt;/h2&gt;

&lt;p&gt;Thread safety means that your program works correctly even when multiple threads (small units of a program) are running at the same time. When multiple threads are modifying the same data or resource, there's a risk that they will interfere with each other and cause bugs, crashes, or security issues.&lt;/p&gt;

&lt;p&gt;Imagine a bank with several ATMs. If two customers try to withdraw money at the same time and the system isn't careful about keeping track of each transaction, one person might take out more money than they should, or data might get corrupted.&lt;/p&gt;

&lt;p&gt;In programming, this kind of problem happens when multiple threads access shared data or resources without proper coordination. A thread-safe program avoids these problems by making sure that threads don't interfere with each other in ways that can lead to bugs.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is a Thread?
&lt;/h2&gt;

&lt;p&gt;A thread is a smaller unit of a process that can run independently. Think of a process as a program running on your computer, and a thread as a single task within that program. Many programs use multiple threads to handle different tasks at the same time. For example, your web browser might download files in one thread while displaying a webpage in another.&lt;/p&gt;

&lt;p&gt;In Python, threading allows your program to run multiple tasks at the same time. This can make your server more efficient, as it can handle multiple client requests concurrently without waiting for one to finish before starting another.&lt;/p&gt;

&lt;p&gt;Now, let's build a simple threaded HTTP server to illustrate how threading works and how you can handle requests concurrently.&lt;/p&gt;

&lt;h2&gt;
  
  
  Building a Threaded HTTP Server in Python
&lt;/h2&gt;

&lt;p&gt;We'll start by using Python's built-in &lt;code&gt;http.server&lt;/code&gt; module and extend it with threading to make it more efficient. By making the server thread-safe, we allow it to handle multiple requests simultaneously, meaning it can serve multiple clients at once.&lt;/p&gt;

&lt;p&gt;Here's the basic code to get started:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Basic HTTP Server
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;http.server&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;BaseHTTPRequestHandler&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;HTTPServer&lt;/span&gt;


&lt;span class="c1"&gt;# Define the HTTP request handler class
&lt;/span&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;SimpleHTTPRequestHandler&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;BaseHTTPRequestHandler&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="c1"&gt;# Override the do_GET method to handle GET requests
&lt;/span&gt;    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;do_GET&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="c1"&gt;# Set the response status code
&lt;/span&gt;        &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;send_response&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

        &lt;span class="c1"&gt;# Set the response headers
&lt;/span&gt;        &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;send_header&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;Content-type&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;text/html&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;end_headers&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

        &lt;span class="c1"&gt;# Write the response content
&lt;/span&gt;        &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;wfile&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;write&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;b&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Hello, world!&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;


&lt;span class="c1"&gt;# Main function to run the server
&lt;/span&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
    &lt;span class="c1"&gt;# Define the server address and port
&lt;/span&gt;    &lt;span class="n"&gt;server_address&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;''&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;8000&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="c1"&gt;# Create an instance of the HTTP server
&lt;/span&gt;    &lt;span class="n"&gt;httpd&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;HTTPServer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;server_address&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;SimpleHTTPRequestHandler&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Server started on port 8000…&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="c1"&gt;# Start serving HTTP requests
&lt;/span&gt;    &lt;span class="n"&gt;httpd&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;serve_forever&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;


&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;__name__&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;__main__&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this basic version, the server can only handle one request at a time. If two users try to access it simultaneously, one will have to wait until the other's request is complete. This isn't efficient for real-world use, especially with multiple users.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Introducing Threading
&lt;/h3&gt;

&lt;p&gt;To allow our server to handle multiple requests simultaneously, we can introduce threading. Python's &lt;code&gt;socketserver&lt;/code&gt; module has a &lt;code&gt;ThreadingMixIn&lt;/code&gt; class that makes it easy to create a multi-threaded server.&lt;/p&gt;

&lt;p&gt;Here's the updated version:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;threading&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;http.server&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;BaseHTTPRequestHandler&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;HTTPServer&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;socketserver&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;ThreadingMixIn&lt;/span&gt;


&lt;span class="c1"&gt;# Define the HTTP request handler class
&lt;/span&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;SimpleHTTPRequestHandler&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;BaseHTTPRequestHandler&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="c1"&gt;# Override the do_GET method to handle GET requests
&lt;/span&gt;    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;do_GET&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="c1"&gt;# Set the response status code
&lt;/span&gt;        &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;send_response&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

        &lt;span class="c1"&gt;# Set the response headers
&lt;/span&gt;        &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;send_header&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;Content-type&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;text/html&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;end_headers&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

        &lt;span class="c1"&gt;# Write the response content
&lt;/span&gt;        &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;wfile&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;write&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;b&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Hello, world!&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;


&lt;span class="c1"&gt;# Define a threaded HTTP server using ThreadingMixIn
&lt;/span&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;ThreadedHTTPServer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ThreadingMixIn&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;HTTPServer&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;daemon_threads&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="bp"&gt;True&lt;/span&gt;  &lt;span class="c1"&gt;# Ensures threads exit when the server shuts down
&lt;/span&gt;

&lt;span class="c1"&gt;# Main function to run the server
&lt;/span&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
    &lt;span class="c1"&gt;# Define the server address and port
&lt;/span&gt;    &lt;span class="n"&gt;server_address&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;''&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;8000&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="c1"&gt;# Create an instance of the threaded HTTP server
&lt;/span&gt;    &lt;span class="n"&gt;httpd&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;ThreadedHTTPServer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;server_address&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;SimpleHTTPRequestHandler&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Server started on port 8000…&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="k"&gt;try&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="c1"&gt;# Start serving HTTP requests
&lt;/span&gt;        &lt;span class="n"&gt;httpd&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;serve_forever&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="k"&gt;except&lt;/span&gt; &lt;span class="nb"&gt;KeyboardInterrupt&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;pass&lt;/span&gt;
    &lt;span class="k"&gt;finally&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="c1"&gt;# Shutdown the server gracefully
&lt;/span&gt;        &lt;span class="n"&gt;httpd&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;server_close&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
        &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Server stopped.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;


&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;__name__&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;__main__&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  What's New?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;ThreadingMixIn:&lt;/strong&gt; This class allows our server to handle each request in a new thread. By doing this, multiple clients can be served simultaneously.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Daemon Threads:&lt;/strong&gt; By setting &lt;code&gt;daemon_threads = True&lt;/code&gt;, we make sure that the server's threads are cleaned up automatically when the server is stopped.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Graceful Shutdown:&lt;/strong&gt; We handle shutdowns correctly by catching the &lt;code&gt;KeyboardInterrupt&lt;/code&gt; (Ctrl+C) and closing the server gracefully.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Thread Safety in Practice
&lt;/h2&gt;

&lt;p&gt;By using threading, our server can now serve multiple clients at once. However, this also introduces the risk of thread interference. If two threads modify shared data without synchronization, unexpected behavior can occur.&lt;/p&gt;

&lt;p&gt;In our simple HTTP server, there isn't shared data being modified, so thread safety isn't a big concern. But if you had a shared resource, such as a database or file that multiple threads were accessing, you'd need to make sure only one thread can access it at a time to avoid data corruption. This is usually done with locks or semaphores.&lt;/p&gt;

&lt;p&gt;Here's an example of how you'd use a lock to prevent multiple threads from accessing a shared resource at the same time:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;threading&lt;/span&gt;

&lt;span class="n"&gt;lock&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;threading&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Lock&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;


&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;safe_method&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
    &lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="n"&gt;lock&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="c1"&gt;# Critical section of code that only one thread can access at a time
&lt;/span&gt;        &lt;span class="k"&gt;pass&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Testing the Threaded Server
&lt;/h2&gt;

&lt;p&gt;You can test the server by running the script and opening multiple browser tabs to &lt;a href="http://localhost:8000/" rel="noopener noreferrer"&gt;http://localhost:8000&lt;/a&gt;. Each request should be handled by a separate thread, allowing the server to handle multiple requests at the same time.&lt;/p&gt;

&lt;p&gt;You can even test this with tools like cURL or &lt;code&gt;ab&lt;/code&gt; (Apache Benchmark) to simulate multiple concurrent users:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ab &lt;span class="nt"&gt;-n&lt;/span&gt; 100 &lt;span class="nt"&gt;-c&lt;/span&gt; 10 http://localhost:8000/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This command sends 100 requests with 10 concurrent users. You should see that all requests are handled successfully, demonstrating the server's ability to handle multiple clients simultaneously.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;In this tutorial, we've explored the basics of threading in Python and built a simple, thread-safe HTTP server that can handle multiple clients at once. While this server is a great starting point, remember that real-world servers require more security and robustness, especially if you're dealing with sensitive data or complex operations.&lt;/p&gt;

&lt;h3&gt;
  
  
  Key Takeaways
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Thread Safety:&lt;/strong&gt; Ensures that multiple threads don't interfere with each other, especially when accessing shared resources.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ThreadingMixIn:&lt;/strong&gt; Makes it easy to create multi-threaded servers in Python.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Locks:&lt;/strong&gt; Used to prevent multiple threads from accessing shared resources simultaneously.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With the concepts of threading and thread safety under your belt, you can now build more advanced, scalable, and secure applications in Python.&lt;/p&gt;




&lt;h2&gt;
  
  
  Exploits in Modern Servers: Timing and Thread-Based Attacks
&lt;/h2&gt;

&lt;p&gt;After exploring how to build a thread-safe HTTP server in Python, it's important to dive deeper into the security vulnerabilities that modern servers face. One of the most significant challenges in today's web environment is the bypass attack, where attackers exploit weaknesses in multi-threaded servers, specifically targeting the way these systems handle concurrency and timing.&lt;/p&gt;

&lt;p&gt;In this article, we will uncover how attackers can bypass authentication mechanisms by using thread-based exploits and timing attacks. Understanding these vulnerabilities will help developers secure their servers against such attacks, ensuring robust, thread-safe applications.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Nature of the Bypass Attack
&lt;/h2&gt;

&lt;p&gt;At its core, a bypass attack occurs when an attacker finds a way to circumvent the normal authentication process. In traditional, non-threaded servers, operations are handled one at a time. However, modern servers, especially multi-threaded ones, handle multiple requests concurrently, which opens the door for timing vulnerabilities.&lt;/p&gt;

&lt;p&gt;Imagine an attacker attempting to log in with two simultaneous threads:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Thread 1&lt;/strong&gt; initiates the login process with legitimate credentials or a partially completed authentication request.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Thread 2&lt;/strong&gt; sends a secondary request designed to manipulate the state of the server, targeting the moment when critical data (like session tokens or credentials) is being verified.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If the timing between these two threads is precisely managed, the attacker may successfully authenticate without ever providing the correct credentials.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Thread-Based Exploits Work
&lt;/h2&gt;

&lt;p&gt;When servers are handling multiple threads that interact with shared data—such as login credentials, session tokens, or sensitive account information—there's always a risk that race conditions will occur. In a race condition, two or more threads attempt to modify shared data at the same time, which can lead to unexpected behavior, including allowing unauthorized access.&lt;/p&gt;

&lt;p&gt;For example, consider the following scenario in a poorly implemented multi-threaded server:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Thread 1&lt;/strong&gt; starts a login attempt, entering a username and password.&lt;/li&gt;
&lt;li&gt;Before Thread 1 can fully complete the authentication process, &lt;strong&gt;Thread 2&lt;/strong&gt; sends another request that tricks the server into assuming authentication is complete.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This can be done by exploiting the timing between the two threads, which could manipulate the server's logic to grant access without proper verification. These types of attacks fall under the broader category of race condition exploits.&lt;/p&gt;

&lt;h3&gt;
  
  
  Works on Non Threaded Too. Synchronis Thread 2 into Thread 1
&lt;/h3&gt;

&lt;h2&gt;
  
  
  The Role of Timing Attacks
&lt;/h2&gt;

&lt;p&gt;Timing attacks take advantage of how servers process data over time, and when combined with thread-based exploits, they can be particularly dangerous.&lt;/p&gt;

&lt;p&gt;A timing attack measures how long certain operations take, allowing an attacker to reverse-engineer security processes, such as password hashing or token verification. By combining timing attacks with thread-based concurrency, attackers can craft sophisticated exploits.&lt;/p&gt;

&lt;p&gt;For example, an attacker might:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Initiate a normal login request with valid credentials.&lt;/li&gt;
&lt;li&gt;Use a second thread to start a timed request to alter the server's state, sending a secondary request just before the authentication check is finalized.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If the server's logic is not properly secured, the second request could force the server to authenticate the user without completing all necessary checks. This kind of exploit targets the delicate balance between threads and timing in modern servers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Preventing Bypass Attacks: Best Practices
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Locking Shared Resources:&lt;/strong&gt; One of the most effective ways to prevent thread-based exploits is to use locks (like Python's &lt;code&gt;threading.Lock&lt;/code&gt;) to control access to shared resources. This ensures that only one thread can modify sensitive data (such as session tokens or credentials) at any given time, preventing race conditions.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Implementing Session Tokens Properly:&lt;/strong&gt; Ensuring that session tokens are assigned only after complete and successful authentication is crucial. This means that partial logins or incomplete authentication should not create a valid session. Each request should verify the token's validity without assumptions based on concurrent threads.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Rate-Limiting Login Attempts:&lt;/strong&gt; Timing attacks often rely on being able to send multiple requests in quick succession. Implementing rate-limiting for sensitive operations, such as login attempts, can reduce the likelihood of a successful bypass attack.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Secure Cookie Management:&lt;/strong&gt; Make sure that sensitive data, such as session cookies, are transmitted using secure flags (like &lt;code&gt;HttpOnly&lt;/code&gt; and &lt;code&gt;Secure&lt;/code&gt;). This limits the attack surface for hijacking or manipulating session information during a multi-threaded attack.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Conducting Penetration Testing:&lt;/strong&gt; Regular penetration tests are essential for identifying potential vulnerabilities in server logic, especially regarding concurrency and timing. By simulating real-world attacks, you can spot weak points in your server's handling of multiple threads and timing exploits.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion: Thread-Based Exploits in Modern Servers
&lt;/h2&gt;

&lt;p&gt;In today's multi-threaded server environments, understanding the risks of timing attacks and thread-based exploits is essential for creating secure applications.&lt;/p&gt;

&lt;p&gt;As we've seen, an attacker can exploit timing and concurrency to bypass authentication and access sensitive information.&lt;/p&gt;

&lt;p&gt;While building multi-threaded, thread-safe servers is an important step toward improving performance and user experience, developers must be vigilant about the security implications of concurrency. Implementing proper locking mechanisms, rate limiting, and robust session management are key practices to securing your server against these modern-day threats.&lt;/p&gt;

&lt;p&gt;By taking the necessary steps to secure shared resources and prevent race conditions, you can safeguard your server against timing and thread-based exploits, ensuring that your application remains secure even in a multi-threaded world.&lt;/p&gt;

</description>
      <category>backend</category>
      <category>beginners</category>
      <category>python</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Isomorphic Reduction — Not a Bug, But a Feature</title>
      <dc:creator>Nnamdi Okpala</dc:creator>
      <pubDate>Mon, 14 Sep 2026 12:33:10 +0000</pubDate>
      <link>https://dev.to/okpalan/isomorphic-reduction-not-a-bug-but-a-feature-4akd</link>
      <guid>https://dev.to/okpalan/isomorphic-reduction-not-a-bug-but-a-feature-4akd</guid>
      <description>&lt;h2&gt;
  
  
  “Is isomorphic reduction of algorithms a feature or a bug?”
&lt;/h2&gt;

&lt;p&gt;In traditional language engines, differences in grammar and semantics are often treated as distinct problems. This approach creates unnecessary complexity, overhead, and potential for bugs. But what if these differences are structurally equivalent?&lt;/p&gt;

&lt;h2&gt;
  
  
  ⚙️ Key Concept: Isomorphic Reduction
&lt;/h2&gt;

&lt;p&gt;Isomorphic Reduction is the mapping of algorithms or automata to equivalent structures across different language classes (e.g., regular, context-free, context-sensitive). This enables:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Simplification&lt;/li&gt;
&lt;li&gt;Minimization&lt;/li&gt;
&lt;li&gt;Cross-language reuse&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In automata:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Minimization&lt;/strong&gt; ensures identical behavior from fewer states.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In ASTs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Reduction&lt;/strong&gt; preserves semantics while simplifying node structures&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  🧠 Insight
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;“If a language engine supports isomorphic reduction, it’s not a bug. It’s a feature.”&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;With this approach:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Legacy syntax, DSLs, and compilers become &lt;strong&gt;structurally equivalent&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Semantics are preserved, not duplicated&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  📐 Formalization
&lt;/h2&gt;

&lt;p&gt;From automata theory:&lt;/p&gt;

&lt;p&gt;A language is regular if the number of distinguishable state transitions is finite (Myhill-Nerode).&lt;/p&gt;

&lt;p&gt;Let and be languages from different Chomsky levels. If:&lt;/p&gt;

&lt;p&gt;Then:&lt;/p&gt;

&lt;p&gt;This defines &lt;strong&gt;unification of language classes&lt;/strong&gt;, allowing &lt;strong&gt;portability across formalisms&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  AST Minimization
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Uses AST-aware automata (like in the tennis case study)&lt;/li&gt;
&lt;li&gt;Removes redundant transitions&lt;/li&gt;
&lt;li&gt;Maintains semantic equivalence&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  🧩 Language Engineer’s Perspective
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;“We only want features reduced to the language, not overhead that can cause bugs.”&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Benefits of Isomorphic Reduction
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Formalizes equivalence across DSLs, token sequences, grammar levels&lt;/li&gt;
&lt;li&gt;Optimizes without sacrificing expressivity&lt;/li&gt;
&lt;li&gt;Prevents semantic drift&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  💾 Case Study: Tennis Tracker
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Program A (Conventional)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Tracks every state&lt;/li&gt;
&lt;li&gt;Memory-heavy, redundant&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Program B (Optimized)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Tracks only scoring events&lt;/li&gt;
&lt;li&gt;Infers non-scoring states&lt;/li&gt;
&lt;li&gt;Faster, smaller, semantically intact&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Both produce the same result, but one is minimal, efficient, and reduced — thanks to isomorphic reduction.&lt;/p&gt;

&lt;h2&gt;
  
  
  🧭 Practical Application: Character Set Exploits and Unicode Attacks
&lt;/h2&gt;

&lt;p&gt;Unicode character sets are powerful — but they can be manipulated to exploit structural features of languages and compilers. This class of exploits is known as &lt;strong&gt;character set vector attacks&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Unicode Abuse in the Wild
&lt;/h3&gt;

&lt;p&gt;When an application decodes input, the process assumes that encoded characters (like &lt;code&gt;%2e%2e%2f&lt;/code&gt;) are safe. But attackers use &lt;strong&gt;Unicode obfuscation&lt;/strong&gt; (e.g., &lt;code&gt;%c0%af&lt;/code&gt; for &lt;code&gt;/&lt;/code&gt;) to bypass path traversal checks.&lt;/p&gt;

&lt;p&gt;For instance:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;%2e%2e%2f&lt;/code&gt; → &lt;code&gt;../&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;%c0%af&lt;/code&gt; → &lt;code&gt;/&lt;/code&gt; (after Unicode decoding)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This enables attackers to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Bypass filters&lt;/li&gt;
&lt;li&gt;Access unauthorized directories&lt;/li&gt;
&lt;li&gt;Escalate privileges&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Language-Level Exploits
&lt;/h3&gt;

&lt;p&gt;Unicode attacks exploit bugs that exist &lt;em&gt;at the language level&lt;/em&gt; — these are &lt;strong&gt;features misused as bugs&lt;/strong&gt;. Because Unicode characters can be interpreted differently across contexts, isomorphic mismatches become security flaws.&lt;/p&gt;

&lt;p&gt;An encoded character might appear harmless during initial validation, but after decoding, it becomes malicious — much like a parser mismatch between ASTs and final runtime behaviour.&lt;/p&gt;

&lt;h3&gt;
  
  
  Isomorphic Solution: Treat Character Sets Structurally
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Model character encodings and decoding as automata transitions&lt;/li&gt;
&lt;li&gt;Use state minimization to identify and normalize all structurally equivalent characters&lt;/li&gt;
&lt;li&gt;Validate &lt;strong&gt;decoded&lt;/strong&gt; input before use&lt;/li&gt;
&lt;li&gt;Reject mixed or ambiguous encodings&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  System Design Takeaway
&lt;/h3&gt;

&lt;p&gt;The same logic that enables AST or automaton minimization also prevents character set exploits:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Treat every decoded form as a state&lt;/li&gt;
&lt;li&gt;Classify equivalence using transition paths&lt;/li&gt;
&lt;li&gt;Detect anomalies using formal grammar rules&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Security and language engineering aren’t separate domains — they’re both about structure.&lt;/p&gt;

&lt;h2&gt;
  
  
  🧪 Demonstration: Mitigating Unicode Exploit via Language Isomorphism
&lt;/h2&gt;

&lt;p&gt;Suppose you are building a web filter that protects against path traversal attacks. A conventional approach checks for hardcoded patterns like &lt;code&gt;../&lt;/code&gt;. But an attacker encodes it as &lt;code&gt;%2e%2e%2f&lt;/code&gt; or &lt;code&gt;%c0%af&lt;/code&gt;, bypassing this check.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Instead, use isomorphic reduction to mitigate the attack:&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: Normalize all inputs to decoded forms
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;urllib.parse&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;normalize_input&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;user_input&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;urllib&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;unquote&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;user_input&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 2: Build a minimal finite automaton that accepts only safe paths
&lt;/h3&gt;

&lt;p&gt;Define states that validate &lt;code&gt;/allowed/&lt;/code&gt; subpaths, rejecting any transitions outside the schema — no matter how encoded.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3: Canonicalize equivalent transitions
&lt;/h3&gt;

&lt;p&gt;Map all encoded sequences to a canonical set (&lt;code&gt;../&lt;/code&gt;, &lt;code&gt;..\&lt;/code&gt;) using a precomputed transition table.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;transition_map&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;%2e%2e%2f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;../&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;%c0%af&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;/&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;%2e%2e%5c&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;..&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;safe&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;lambda&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="nf"&gt;any&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;normalize_input&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;startswith&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;../&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;..&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 4: Validate decoded structure via automaton
&lt;/h3&gt;

&lt;p&gt;Use a state machine that validates allowed structure post-normalization, rejecting malformed or mixed-encoding paths.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Result:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Exploit vectors collapse into known transitions&lt;/li&gt;
&lt;li&gt;Redundant encodings become equivalent&lt;/li&gt;
&lt;li&gt;Security is enforced structurally, not heuristically&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is not patching bugs — it’s &lt;strong&gt;defining structure&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  🧾 OBINexus Conclusion: From Structure to Security
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;By OBINexus Nnamdi Michael Okpala&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;What if hacking a language was simply misunderstanding its structure?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The real vulnerability isn’t the character — it’s the context. Not the syntax — but the shape it takes. Unicode exploits, misused regex, bloated ASTs — all are symptoms of the same illness: a failure to recognize structural equivalence.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Isomorphic reduction is not just an optimization trick. It is a language-aware tool.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It empowers engineers to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Collapse noisy variance into clean semantics&lt;/li&gt;
&lt;li&gt;Harden their systems against syntax-based exploits&lt;/li&gt;
&lt;li&gt;Reuse logic across formal boundaries&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We don’t need more rules. We need better structure.&lt;/p&gt;

&lt;p&gt;And that is the OBINexus philosophy — treat structure as the source of truth, and bugs become just unoptimized features.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Structure is the final syntax.&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>algorithms</category>
      <category>computerscience</category>
      <category>programming</category>
      <category>softwareengineering</category>
    </item>
    <item>
      <title>How to Create and Back Up a VHD on Microsoft Windows 11 for Cross-Platform Virtual Machine Development</title>
      <dc:creator>Nnamdi Okpala</dc:creator>
      <pubDate>Mon, 14 Sep 2026 12:25:02 +0000</pubDate>
      <link>https://dev.to/okpalan/how-to-create-and-back-up-a-vhd-on-microsoft-windows-11-for-cross-platform-virtual-machine-3olj</link>
      <guid>https://dev.to/okpalan/how-to-create-and-back-up-a-vhd-on-microsoft-windows-11-for-cross-platform-virtual-machine-3olj</guid>
      <description>&lt;p&gt;By Nnamdi Michael Okpala&lt;/p&gt;

&lt;h2&gt;
  
  
  Cross-Platform Development on Microsoft Windows using VHD
&lt;/h2&gt;

&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;In today's world, virtual environments (e.g., Oracle VirtualBox, Microsoft Hyper-V) are vital for developers. They allow resource sharing and simultaneous data storage allocation to host and guest machines. To ensure the progress of work is secure, periodic backups are crucial.&lt;/p&gt;

&lt;p&gt;This guide systematically explores methods to back up and share data between Kubuntu on Oracle VirtualBox (Guest OS) and Microsoft Windows 11 (Host OS). These steps are useful for cross-platform tool and app development for Windows, macOS, and Linux.&lt;/p&gt;

&lt;p&gt;Although focused on Windows 11 and Kubuntu, these methods apply to Windows 10+ with Debian/Ubuntu systems using Winget (&lt;code&gt;winget&lt;/code&gt;) and APT (&lt;code&gt;apt&lt;/code&gt;).&lt;/p&gt;

&lt;h2&gt;
  
  
  First Steps (Download and Install Software)
&lt;/h2&gt;

&lt;p&gt;Install the following utilities to simplify the backup process:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;NSSM:&lt;/strong&gt; The Non-Sucking Service Manager enables easy management of Windows services.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Oracle VirtualBox (Optional):&lt;/strong&gt; An open-source virtual machine emulator.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Winget:&lt;/strong&gt; Microsoft’s command-line package manager for Windows.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Commands:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;winget&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;install&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-e&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--id&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;NSSM.NSSM&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;winget&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;install&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-e&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--id&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Oracle.VirtualBox&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run these in PowerShell, accepting terms during installation.&lt;/p&gt;

&lt;h2&gt;
  
  
  Creating a Virtual Hard Disk (VHD)
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Open Windows Disk Management.&lt;/li&gt;
&lt;li&gt;Create a new Virtual Hard Disk (VHD or VHDX).&lt;/li&gt;
&lt;li&gt;Assign a drive letter (e.g., B for Backup).&lt;/li&gt;
&lt;li&gt;Save the file in a dedicated directory.&lt;/li&gt;
&lt;li&gt;Mount the VHD using Disk Management.&lt;/li&gt;
&lt;li&gt;Periodically copy the VHD file to a separate location for redundancy.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Using VSS for VHD Backups
&lt;/h2&gt;

&lt;p&gt;Volume Shadow Copy Service (VSS) allows you to create and manage snapshots of your volumes, including those containing VHDs.&lt;/p&gt;

&lt;h3&gt;
  
  
  Key Commands
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;1. List Existing Shadows:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;vssadmin&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;list&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;shadows&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;2. Create a Shadow Copy:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;vssadmin&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;create&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;shadow&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;/for&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;C:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Replace &lt;code&gt;C:&lt;/code&gt; with the drive containing the VHD.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Delete Old Shadows:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;vssadmin&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;delete&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;shadows&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;/for&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;C:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;/oldest&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;4. Resize Shadow Storage:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;vssadmin&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;resize&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;shadowstorage&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;/for&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;C:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;/on&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;C:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;/maxsize&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="n"&gt;GB&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Adjust the &lt;code&gt;maxsize&lt;/code&gt; parameter based on your storage needs.&lt;/p&gt;

&lt;h3&gt;
  
  
  Automating Snapshots
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Use Task Scheduler to periodically run the &lt;code&gt;vssadmin create shadow&lt;/code&gt; command.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Restoring from a Snapshot
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Mount the shadow copy as a backup source:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   mklink /d &amp;lt;Mount_Point&amp;gt; \?\GLOBALROOT\Device\HarddiskVolumeShadowCopy&amp;lt;Shadow_ID&amp;gt;\
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Copy data from the mounted snapshot to your backup directory.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Setting Up NSSM for Automated Backup
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Download NSSM and place it in a directory accessible from the command line.&lt;/li&gt;
&lt;li&gt;Create a PowerShell script (&lt;code&gt;BackupServiceScript.ps1&lt;/code&gt;) for backing up your VHD.&lt;/li&gt;
&lt;li&gt;Register the script as a service using NSSM:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="n"&gt;nssm&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;install&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;BackupService&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Configure the parameters as follows:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Path:&lt;/strong&gt; &lt;code&gt;powershell.exe&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Arguments:&lt;/strong&gt; &lt;code&gt;-ExecutionPolicy Bypass -File "C:\path\to\BackupServiceScript.ps1"&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;




</description>
      <category>devops</category>
      <category>softwaredevelopment</category>
      <category>tools</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Technical Specification: Isomorphic Binding Architecture</title>
      <dc:creator>Nnamdi Okpala</dc:creator>
      <pubDate>Mon, 14 Sep 2026 12:18:12 +0000</pubDate>
      <link>https://dev.to/okpalan/technical-specification-isomorphic-binding-architecture-3nei</link>
      <guid>https://dev.to/okpalan/technical-specification-isomorphic-binding-architecture-3nei</guid>
      <description>&lt;h1&gt;
  
  
  Technical Specification: Isomorphic Binding Architecture
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Core Philosophy: "All Bindings Are Drivers"
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;SQUARE &lt;span class="o"&gt;(&lt;/span&gt;Perfect Binding&lt;span class="o"&gt;)&lt;/span&gt;:
┌────────────┐
│            │  All 4 sides equal
│   Binding  │  &lt;span class="o"&gt;=&lt;/span&gt; Symmetric process
│            │  &lt;span class="o"&gt;=&lt;/span&gt; Bidirectional FFI
└────────────┘

RECTANGLE &lt;span class="o"&gt;(&lt;/span&gt;Driver&lt;span class="o"&gt;)&lt;/span&gt;:
┌──────────────────┐
│                  │  2 pairs of equal sides
│     Driver       │  &lt;span class="o"&gt;=&lt;/span&gt; Asymmetric interface
│                  │  &lt;span class="o"&gt;=&lt;/span&gt; Request/Response pairs
└──────────────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Shape&lt;/th&gt;
&lt;th&gt;Representation&lt;/th&gt;
&lt;th&gt;Properties&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Square (Perfect Binding)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Binding&lt;/td&gt;
&lt;td&gt;All 4 sides equal = Symmetric process = Bidirectional FFI&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Rectangle (Driver)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Driver&lt;/td&gt;
&lt;td&gt;2 pairs of equal sides = Asymmetric interface = Request/Response pairs&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Polyglot Interaction Diagram
&lt;/h2&gt;



&lt;pre data-lang="mermaid"&gt;&lt;code&gt;graph TD
    subgraph "LibPolyCall Core (C)"
        DRIVER["DRIVER Daemon — Port 3005→8085"]
        FFI["FFI Layer — libpolycall.so"]
    end

    subgraph "Language Bindings"
        COBOL["COBOL — cbl-polycall"]
        GO["Go — golang"]
        PY["Python — py-polycall"]
        JS["Node.js — node-polycall"]
        JAVA["Java — java-polycall"]
    end

    subgraph "Schema Transform"
        AST["AST Isomorphism — Huffman-AVL"]
        IR["Canonical IR"]
    end

    COBOL --&amp;gt;|JCL/VSAM| FFI
    GO --&amp;gt;|"struct{}"| FFI
    PY --&amp;gt;|dict/tuple| FFI
    JS --&amp;gt;|JSON| FFI
    JAVA --&amp;gt;|Object| FFI

    FFI --&amp;gt; AST
    AST --&amp;gt; IR
    IR --&amp;gt; DRIVER&lt;/code&gt;&lt;/pre&gt;



&lt;h2&gt;
  
  
  Isomorphic Transform Rules
&lt;/h2&gt;

&lt;p&gt;For your example &lt;code&gt;{x: 20.5, y: 70}&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight c"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Canonical Intermediate Representation (CIR)&lt;/span&gt;
&lt;span class="k"&gt;typedef&lt;/span&gt; &lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;enum&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;FLOAT64&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;INT64&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;STRING&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;NESTED&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="n"&gt;type&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;union&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="kt"&gt;double&lt;/span&gt; &lt;span class="n"&gt;f64&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="kt"&gt;int64_t&lt;/span&gt; &lt;span class="n"&gt;i64&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="kt"&gt;char&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;str&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="kt"&gt;void&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;nested&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="n"&gt;CIR_Value&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;typedef&lt;/span&gt; &lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kt"&gt;char&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="n"&gt;CIR_Value&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="n"&gt;CIR_Field&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;typedef&lt;/span&gt; &lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;CIR_Field&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;fields&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kt"&gt;size_t&lt;/span&gt; &lt;span class="n"&gt;field_count&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="n"&gt;CIR_Object&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Language-Specific Mappings
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Language&lt;/th&gt;
&lt;th&gt;Native Type&lt;/th&gt;
&lt;th&gt;CIR Transform&lt;/th&gt;
&lt;th&gt;Driver Format&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Python&lt;/td&gt;
&lt;td&gt;&lt;code&gt;{"x": 20.5, "y": 70}&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;CIR_Object&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Binary protocol&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Go&lt;/td&gt;
&lt;td&gt;&lt;code&gt;struct{X float64; Y int}&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;CIR_Object&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Binary protocol&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;COBOL&lt;/td&gt;
&lt;td&gt;&lt;code&gt;01 POINT. 05 X PIC 9(2)V9. 05 Y PIC 9(2).&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;CIR_Object&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Binary protocol&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Java&lt;/td&gt;
&lt;td&gt;&lt;code&gt;class Point{Float x; Integer y;}&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;CIR_Object&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Binary protocol&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Zero-Trust Protocol
&lt;/h2&gt;

&lt;p&gt;Each binding registers with cryptographically-seeded GUID:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight c"&gt;&lt;code&gt;&lt;span class="k"&gt;typedef&lt;/span&gt; &lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kt"&gt;uint8_t&lt;/span&gt; &lt;span class="n"&gt;seed&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;32&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;  &lt;span class="c1"&gt;// Cryptographic seed&lt;/span&gt;
    &lt;span class="kt"&gt;uint64_t&lt;/span&gt; &lt;span class="n"&gt;session&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;  &lt;span class="c1"&gt;// Session identifier&lt;/span&gt;
    &lt;span class="kt"&gt;uint32_t&lt;/span&gt; &lt;span class="n"&gt;sequence&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// Message sequence&lt;/span&gt;
    &lt;span class="kt"&gt;uint16_t&lt;/span&gt; &lt;span class="n"&gt;checksum&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// Data integrity&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="n"&gt;PolyCall_Header&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Build Orchestration
&lt;/h2&gt;

&lt;p&gt;The unified Makefile ensures all bindings compile to the same ABI:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight make"&gt;&lt;code&gt;&lt;span class="nv"&gt;POLYCALL_ABI&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nt"&gt;-fPIC&lt;/span&gt; &lt;span class="nt"&gt;-shared&lt;/span&gt; &lt;span class="nt"&gt;-Wl&lt;/span&gt;,-soname,lib&lt;span class="nv"&gt;$@&lt;/span&gt;.so.1
&lt;span class="nv"&gt;CANONICAL_IR&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nt"&gt;-DUSE_CANONICAL_IR&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;1

&lt;span class="nl"&gt;%.so&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;%.c&lt;/span&gt;
    &lt;span class="p"&gt;$(&lt;/span&gt;CC&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;$(&lt;/span&gt;CFLAGS&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;$(&lt;/span&gt;POLYCALL_ABI&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;$(&lt;/span&gt;CANONICAL_IR&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="nv"&gt;$&amp;lt;&lt;/span&gt; &lt;span class="nt"&gt;-o&lt;/span&gt; &lt;span class="nv"&gt;$@&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  State Machine Mapping
&lt;/h2&gt;

&lt;p&gt;Every cross-language call follows this state progression:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Parse&lt;/strong&gt; → Language-specific AST&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Transform&lt;/strong&gt; → Canonical IR (lossless)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Validate&lt;/strong&gt; → Type coercion matrix&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Marshal&lt;/strong&gt; → Binary protocol&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Route&lt;/strong&gt; → DRIVER daemon&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Unmarshal&lt;/strong&gt; → Target language&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Execute&lt;/strong&gt; → Native invocation&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Return&lt;/strong&gt; → Reverse transform&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This ensures the "square perfect" binding where input/output maintain structural equivalence across all supported languages.&lt;/p&gt;

&lt;p&gt;The key insight: by treating all bindings as drivers with paired interfaces (rectangle), we achieve the perfect square of bidirectional communication without data loss.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>polyglot</category>
    </item>
    <item>
      <title>How I side-stepped a 5-year migration with 40 lines of C and a Unix daemon trick.</title>
      <dc:creator>Nnamdi Okpala</dc:creator>
      <pubDate>Mon, 14 Sep 2026 12:10:06 +0000</pubDate>
      <link>https://dev.to/okpalan/how-i-side-stepped-a-5-year-migration-with-40-lines-of-c-and-a-unix-daemon-trick-3gm7</link>
      <guid>https://dev.to/okpalan/how-i-side-stepped-a-5-year-migration-with-40-lines-of-c-and-a-unix-daemon-trick-3gm7</guid>
      <description>&lt;h1&gt;
  
  
  How I side-stepped a 5-year migration with 40 lines of C and a Unix daemon trick.
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://dev.to/t/webdev"&gt;#webdev&lt;/a&gt; &lt;a href="https://dev.to/t/polyglot"&gt;#polyglot&lt;/a&gt; &lt;a href="https://dev.to/t/programming"&gt;#programming&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  I Built a Banking System That Talks COBOL… and My Boss Didn't Notice
&lt;/h1&gt;

&lt;p&gt;&lt;em&gt;How I side-stepped a 5-year migration with 40 lines of C and a Unix daemon trick&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I used to think "daemon" meant demon—until last night when I finally wired a 1960s mainframe into a React dashboard without restarting a single job.&lt;/p&gt;

&lt;p&gt;Here's the 3-minute story (and the 40-line C file) that let me leave the office before midnight.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem That Kept Me Up
&lt;/h2&gt;

&lt;p&gt;Our core wire-transfer flow is still a COBOL batch JOB card. Every night at 02:00 it:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Reads a VSAM file&lt;/li&gt;
&lt;li&gt;Calls &lt;code&gt;DFH$MONEY&lt;/code&gt; (CICS)&lt;/li&gt;
&lt;li&gt;Prints a 400-page JES report&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;New requirement:&lt;/strong&gt; Expose it as a REST endpoint so the fintech front-end can trigger it on-demand.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Constraints:&lt;/strong&gt; Zero outage, zero JCL changes, zero budget.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Resources:&lt;/strong&gt; One intern (me), one Red Bull, one MacBook.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Unix Daemon Trick Nobody Talks About
&lt;/h2&gt;

&lt;p&gt;Here's what blew my mind: a daemon isn't magic—it's just a process that &lt;strong&gt;double-forks&lt;/strong&gt; so the terminal can die without taking it down.&lt;/p&gt;

&lt;p&gt;When you run a program normally:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;./my-service

&lt;span class="c"&gt;# Close terminal = service dies 💀&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Your service is a child of your shell. Kill the parent, kill the child. Basic Unix genealogy.&lt;/p&gt;

&lt;p&gt;But a daemon? It cuts the umbilical cord:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight c"&gt;&lt;code&gt;&lt;span class="n"&gt;pid_t&lt;/span&gt; &lt;span class="n"&gt;pid&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;fork&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;pid&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;exit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Parent peace out&lt;/span&gt;

&lt;span class="n"&gt;setsid&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="c1"&gt;// New session, new life&lt;/span&gt;

&lt;span class="n"&gt;pid&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;fork&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="c1"&gt;// Fork again (trust me)&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;pid&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;exit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// Now we're immortal 🚀&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  The 40-Line Warhead
&lt;/h2&gt;

&lt;p&gt;Instead of rewriting millions of lines of COBOL, I built a tiny bridge:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight c"&gt;&lt;code&gt;&lt;span class="c1"&gt;// main.c – libpolycall-cobol FFI&lt;/span&gt;
&lt;span class="kt"&gt;char&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="nf"&gt;cobol_job_invoke&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;const&lt;/span&gt; &lt;span class="kt"&gt;char&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;jcl_path&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;const&lt;/span&gt; &lt;span class="kt"&gt;char&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;parm&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
    &lt;span class="k"&gt;static&lt;/span&gt; &lt;span class="kt"&gt;char&lt;/span&gt; &lt;span class="n"&gt;reply&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;65536&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
    &lt;span class="kt"&gt;char&lt;/span&gt; &lt;span class="n"&gt;cmd&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1024&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;

    &lt;span class="n"&gt;snprintf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;cmd&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;sizeof&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;cmd&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
             &lt;span class="s"&gt;"tsocmd 'submit %s parm(%s)' 2&amp;gt;&amp;amp;1"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
             &lt;span class="n"&gt;jcl_path&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;parm&lt;/span&gt; &lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="n"&gt;parm&lt;/span&gt; &lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s"&gt;""&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="kt"&gt;FILE&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;fp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;popen&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;cmd&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"r"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="kt"&gt;size_t&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;fread&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;reply&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;sizeof&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;reply&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;fp&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="n"&gt;pclose&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fp&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="n"&gt;reply&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sc"&gt;'\0'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;reply&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Compile → &lt;code&gt;libpolycall-cobol.so&lt;/code&gt; → drop in &lt;code&gt;/usr/lib/polycall/&lt;/code&gt; → &lt;strong&gt;done&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;No root access needed. No recompile of legacy code. No new ports on the mainframe.&lt;/p&gt;

&lt;h2&gt;
  
  
  The One-Makefile Pipeline
&lt;/h2&gt;

&lt;p&gt;I went full polyglot and glued every language into a single build:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight make"&gt;&lt;code&gt;&lt;span class="nl"&gt;all&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;driver cobol go python java lua node&lt;/span&gt;
    &lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"🚀 All bindings compiled. DRIVER ready on port 3005→8085"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;One &lt;code&gt;make all&lt;/code&gt; spits out:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;libpolycall-cobol.so&lt;/code&gt; ← tonight's hero&lt;/li&gt;
&lt;li&gt;&lt;code&gt;libpolycall-go.so&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;libpolycall-python.so&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;see 'How I side-stepped a 5-year migration with 40 lines of C and a Unix daemon trick.'&lt;/li&gt;
&lt;li&gt;Plus Java, Node, Lua...&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All register with the &lt;strong&gt;same C DRIVER&lt;/strong&gt; daemon. One process, six languages, zero manual config.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Demo That Shut Everyone Up
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Open browser → &lt;code&gt;http://localhost:8084&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Drag &lt;strong&gt;any .jcl file&lt;/strong&gt; into the drop zone&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;"Submit"&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Watch &lt;strong&gt;JESMSGLG&lt;/strong&gt; appear in real-time&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Boss:&lt;/strong&gt; "Wait… that's our production JOB?"&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Me:&lt;/strong&gt; "Yep, and I didn't touch a single PROC."&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Boss:&lt;/strong&gt; &lt;em&gt;[confused silence]&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why This Actually Matters
&lt;/h2&gt;

&lt;p&gt;Traditional "modernization" means a &lt;strong&gt;5-year, $50M rewrite&lt;/strong&gt; ending in &lt;strong&gt;Chernobyl-level outage&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;We just &lt;strong&gt;side-carred&lt;/strong&gt; the beast:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Legacy keeps running untouched&lt;/li&gt;
&lt;li&gt;New features ship in Go/React/whatever&lt;/li&gt;
&lt;li&gt;Rollback = &lt;code&gt;pkill -f server.py&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And because we daemonized the bridge, the terminal could close, my SSH session could die, and the DRIVER would still route REST calls into JES at 02:00.&lt;/p&gt;

&lt;p&gt;No babysitting. No forgotten &lt;code&gt;nohup&lt;/code&gt;. No &lt;code&gt;&amp;amp;&lt;/code&gt; typed in panic.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Real Unix Lesson
&lt;/h2&gt;

&lt;p&gt;If your service dies when you close the laptop, you don't have a service—you have a &lt;strong&gt;shell child&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Add the double-fork. Redirect stdout. Write a PID file. Let the parent exit gracefully.&lt;/p&gt;

&lt;p&gt;That's literally all a daemon is. Not demon magic. Just good parenting.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's Next?
&lt;/h2&gt;

&lt;p&gt;Tonight I'm swapping the drag-drop for a &lt;strong&gt;GraphQL mutation&lt;/strong&gt; so the React kids can trigger million-dollar wires with type safety.&lt;/p&gt;

&lt;p&gt;The mainframe ops team still thinks I'm "just running tests." 😇&lt;/p&gt;

&lt;p&gt;And libpolycall? It's getting proper &lt;code&gt;--detach&lt;/code&gt; support. Because polling in attached mode is for services that haven't grown up yet.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Follow me for more "I can't believe this still runs the world" moments. Currently wiring OBINexus projects that make legacy systems feel like serverless functions.&lt;/em&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  COBOL #Unix #Daemons #LegacyModernization #SystemsProgramming #Mainframe #DevOps #BankingTech #LibPolyCall
&lt;/h1&gt;

</description>
      <category>architecture</category>
      <category>backend</category>
      <category>c</category>
      <category>programming</category>
    </item>
    <item>
      <title>I Built a Banking System That Talks COBOL and My Boss Didn't Notice</title>
      <dc:creator>Nnamdi Okpala</dc:creator>
      <pubDate>Mon, 14 Sep 2026 09:27:18 +0000</pubDate>
      <link>https://dev.to/okpalan/i-built-a-banking-system-that-talks-cobol-and-my-boss-didnt-notice-528i</link>
      <guid>https://dev.to/okpalan/i-built-a-banking-system-that-talks-cobol-and-my-boss-didnt-notice-528i</guid>
      <description>&lt;h1&gt;
  
  
  I Built a Banking System That Talks COBOL… and My Boss Didn't Notice
&lt;/h1&gt;

&lt;h2&gt;
  
  
  How I side-stepped a 5-year migration with 40 lines of C and a Unix daemon trick
&lt;/h2&gt;

&lt;p&gt;I used to think "daemon" meant demon—until last night when I finally wired a 1960s mainframe into a React dashboard without restarting a single job.&lt;/p&gt;

&lt;p&gt;Here's the 3-minute story (and the 40-line C file) that let me leave the office before midnight.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem That Kept Me Up
&lt;/h2&gt;

&lt;p&gt;Our core wire-transfer flow is still a COBOL batch JOB card. Every night at 02:00 it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Reads a VSAM file&lt;/li&gt;
&lt;li&gt;Calls DFH$MONEY (CICS)&lt;/li&gt;
&lt;li&gt;Prints a 400-page JES report&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;New requirement:&lt;/strong&gt; Expose it as a REST endpoint so the fintech front-end can trigger it on-demand.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Constraints:&lt;/strong&gt; Zero outage, zero JCL changes, zero budget.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Resources:&lt;/strong&gt; One intern (me), one Red Bull, one MacBook.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Unix Daemon Trick Nobody Talks About
&lt;/h2&gt;

&lt;p&gt;Here's what blew my mind: a daemon isn't magic—it's just a process that double-forks so the terminal can die without taking it down.&lt;/p&gt;

&lt;p&gt;When you run a program normally:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;./my-service

Close terminal &lt;span class="o"&gt;=&lt;/span&gt; service dies 💀
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Your service is a child of your shell. Kill the parent, kill the child. Basic Unix genealogy.&lt;/p&gt;

&lt;p&gt;But a daemon? It cuts the umbilical cord:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight c"&gt;&lt;code&gt;&lt;span class="n"&gt;pid_t&lt;/span&gt; &lt;span class="n"&gt;pid&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;fork&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;pid&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;exit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Parent peace out&lt;/span&gt;

&lt;span class="n"&gt;setsid&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="c1"&gt;// New session, new life&lt;/span&gt;

&lt;span class="n"&gt;pid&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;fork&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="c1"&gt;// Fork again (trust me)&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;pid&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;exit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// Now we're immortal 🚀&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  The 40-Line Warhead
&lt;/h2&gt;

&lt;p&gt;Instead of rewriting millions of lines of COBOL, I built a tiny bridge:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight c"&gt;&lt;code&gt;&lt;span class="c1"&gt;// main.c – libpolycall-cobol FFI&lt;/span&gt;
&lt;span class="kt"&gt;char&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="nf"&gt;cobol_job_invoke&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;const&lt;/span&gt; &lt;span class="kt"&gt;char&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;jcl_path&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;const&lt;/span&gt; &lt;span class="kt"&gt;char&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;parm&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
    &lt;span class="k"&gt;static&lt;/span&gt; &lt;span class="kt"&gt;char&lt;/span&gt; &lt;span class="n"&gt;reply&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;65536&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
    &lt;span class="kt"&gt;char&lt;/span&gt; &lt;span class="n"&gt;cmd&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1024&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;

    &lt;span class="n"&gt;snprintf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;cmd&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;sizeof&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;cmd&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
             &lt;span class="s"&gt;"tsocmd 'submit %s parm(%s)' 2&amp;gt;&amp;amp;1"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
             &lt;span class="n"&gt;jcl_path&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;parm&lt;/span&gt; &lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="n"&gt;parm&lt;/span&gt; &lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s"&gt;""&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="kt"&gt;FILE&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;fp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;popen&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;cmd&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"r"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="kt"&gt;size_t&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;fread&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;reply&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;sizeof&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;reply&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;fp&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="n"&gt;pclose&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fp&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="n"&gt;reply&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sc"&gt;'\0'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;reply&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Compile → &lt;code&gt;libpolycall-cobol.so&lt;/code&gt; → drop in &lt;code&gt;/usr/lib/polycall/&lt;/code&gt; → done.&lt;/p&gt;

&lt;p&gt;No root access needed. No recompile of legacy code. No new ports on the mainframe.&lt;/p&gt;

&lt;h2&gt;
  
  
  The One-Makefile Pipeline
&lt;/h2&gt;

&lt;p&gt;I went full polyglot and glued every language into a single build:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight make"&gt;&lt;code&gt;&lt;span class="nl"&gt;all&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;driver cobol go python java lua node&lt;/span&gt;
    &lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"🚀 All bindings compiled. DRIVER ready on port 3005→8085"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;One &lt;code&gt;make all&lt;/code&gt; spits out:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;libpolycall-cobol.so&lt;/code&gt; ← tonight's hero&lt;/li&gt;
&lt;li&gt;&lt;code&gt;libpolycall-go.so&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;libpolycall-python.so&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Plus Java, Node, Lua...&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All register with the same C DRIVER daemon. One process, six languages, zero manual config.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Demo That Shut Everyone Up
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Open browser → &lt;a href="http://localhost:8084" rel="noopener noreferrer"&gt;http://localhost:8084&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Drag any &lt;code&gt;.jcl&lt;/code&gt; file into the drop zone&lt;/li&gt;
&lt;li&gt;Click "Submit"&lt;/li&gt;
&lt;li&gt;Watch JESMSGLG appear in real-time&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Boss:&lt;/strong&gt; "Wait… that's our production JOB?"&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Me:&lt;/strong&gt; "Yep, and I didn't touch a single PROC."&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Boss:&lt;/strong&gt; [confused silence]&lt;/p&gt;

&lt;h2&gt;
  
  
  Why This Actually Matters
&lt;/h2&gt;

&lt;p&gt;Traditional "modernization" means a 5-year, $50M rewrite ending in Chernobyl-level outage.&lt;/p&gt;

&lt;p&gt;We just side-carred the beast:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Legacy keeps running untouched&lt;/li&gt;
&lt;li&gt;New features ship in Go/React/whatever&lt;/li&gt;
&lt;li&gt;Rollback = &lt;code&gt;pkill -f server.py&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And because we daemonized the bridge, the terminal could close, my SSH session could die, and the DRIVER would still route REST calls into JES at 02:00.&lt;/p&gt;

&lt;p&gt;No babysitting. No forgotten &lt;code&gt;nohup&lt;/code&gt;. No &lt;code&gt;&amp;amp;&lt;/code&gt; typed in panic.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Real Unix Lesson
&lt;/h2&gt;

&lt;p&gt;If your service dies when you close the laptop, you don't have a service—you have a shell child.&lt;/p&gt;

&lt;p&gt;Add the double-fork. Redirect stdout. Write a PID file. Let the parent exit gracefully.&lt;/p&gt;

&lt;p&gt;That's literally all a daemon is. Not demon magic. Just good parenting.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's Next?
&lt;/h2&gt;

&lt;p&gt;Tonight I'm swapping the drag-drop for a GraphQL mutation so the React kids can trigger million-dollar wires with type safety.&lt;/p&gt;

&lt;p&gt;The mainframe ops team still thinks I'm "just running tests." 😇&lt;/p&gt;

&lt;p&gt;And libpolycall? It's getting proper &lt;code&gt;--detach&lt;/code&gt; support. Because polling in attached mode is for services that haven't grown up yet.&lt;/p&gt;

&lt;p&gt;Follow me for more "I can't believe this still runs the world" moments. Currently wiring OBINexus projects that make legacy systems feel like serverless functions.&lt;/p&gt;

&lt;p&gt;COBOL #Unix #Daemons #LegacyModernization #SystemsProgramming #Mainframe #DevOps #BankingTech #LibPolyCall&lt;/p&gt;

</description>
      <category>programming</category>
      <category>polyglot</category>
      <category>webdev</category>
    </item>
    <item>
      <title>How To Setup C Build Tools for Unix-Like Development on Windows (MSYS2 + GCC)</title>
      <dc:creator>Nnamdi Okpala</dc:creator>
      <pubDate>Mon, 14 Sep 2026 09:17:30 +0000</pubDate>
      <link>https://dev.to/okpalan/how-to-setup-c-build-tools-for-unix-like-development-on-windows-msys2-gcc-5bpg</link>
      <guid>https://dev.to/okpalan/how-to-setup-c-build-tools-for-unix-like-development-on-windows-msys2-gcc-5bpg</guid>
      <description>&lt;p&gt;If you want a real Unix-like C/C++ development environment on Windows, one of the best setups is MSYS2 with the MinGW-w64 toolchain.&lt;/p&gt;

&lt;p&gt;This gives you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;GCC and G++&lt;/li&gt;
&lt;li&gt;Binutils&lt;/li&gt;
&lt;li&gt;Make&lt;/li&gt;
&lt;li&gt;GDB&lt;/li&gt;
&lt;li&gt;Unix shell tooling&lt;/li&gt;
&lt;li&gt;A package manager (&lt;code&gt;pacman&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;A workflow close to Linux development&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is the same type of environment many systems programmers, compiler developers, emulator developers, and operating system engineers use on Windows.&lt;/p&gt;




&lt;h1&gt;
  
  
  Step 1 — Install MSYS2
&lt;/h1&gt;

&lt;p&gt;Download and install MSYS2 from:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.msys2.org/" rel="noopener noreferrer"&gt;https://www.msys2.org/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After installation, open:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;MSYS2 MINGW64
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Do not use regular CMD for this setup.&lt;/p&gt;




&lt;h1&gt;
  
  
  Step 2 — Update the System
&lt;/h1&gt;

&lt;p&gt;Run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pacman &lt;span class="nt"&gt;-Syu&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This updates the core MSYS2 packages.&lt;/p&gt;

&lt;p&gt;Sometimes MSYS2 will ask you to close the terminal after the first update.&lt;/p&gt;

&lt;p&gt;If that happens:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Close the terminal&lt;/li&gt;
&lt;li&gt;Reopen &lt;code&gt;MSYS2 MINGW64&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Continue with:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pacman &lt;span class="nt"&gt;-Su&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h1&gt;
  
  
  Step 3 — Install Build Essentials
&lt;/h1&gt;

&lt;p&gt;Now install the Unix build tools:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pacman &lt;span class="nt"&gt;-S&lt;/span&gt; &lt;span class="nt"&gt;--needed&lt;/span&gt; base-devel mingw-w64-x86_64-toolchain
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This installs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;GCC&lt;/li&gt;
&lt;li&gt;G++&lt;/li&gt;
&lt;li&gt;Binutils&lt;/li&gt;
&lt;li&gt;Make&lt;/li&gt;
&lt;li&gt;GDB&lt;/li&gt;
&lt;li&gt;Headers&lt;/li&gt;
&lt;li&gt;Runtime libraries&lt;/li&gt;
&lt;li&gt;pkg-config&lt;/li&gt;
&lt;li&gt;Unix build utilities&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When prompted:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;Enter a selection &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;default&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;all&lt;span class="o"&gt;)&lt;/span&gt;:
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Just press:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;Enter
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;to install everything.&lt;/p&gt;




&lt;h1&gt;
  
  
  Step 4 — Verify Installation
&lt;/h1&gt;

&lt;p&gt;Check the tools:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gcc &lt;span class="nt"&gt;--version&lt;/span&gt;
g++ &lt;span class="nt"&gt;--version&lt;/span&gt;
ld &lt;span class="nt"&gt;--version&lt;/span&gt;
make &lt;span class="nt"&gt;--version&lt;/span&gt;
gdb &lt;span class="nt"&gt;--version&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You should now see installed versions.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gcc &lt;span class="o"&gt;(&lt;/span&gt;Rev10, Built by MSYS2 project&lt;span class="o"&gt;)&lt;/span&gt; 16.x.x
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h1&gt;
  
  
  Step 5 — Compile Your First C Program
&lt;/h1&gt;

&lt;p&gt;Create a file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nano hello.c
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Paste:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight c"&gt;&lt;code&gt;&lt;span class="cp"&gt;#include&lt;/span&gt; &lt;span class="cpf"&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;
&lt;/span&gt;
&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;printf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Hello from GCC on MSYS2&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Save with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;CTRL + O
ENTER
CTRL + X
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Compile:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gcc hello.c &lt;span class="nt"&gt;-o&lt;/span&gt; hello.exe
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;./hello.exe
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;Hello from GCC on MSYS2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h1&gt;
  
  
  Step 6 — Compile C++
&lt;/h1&gt;

&lt;p&gt;Create:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nano hello.cpp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Paste:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="cp"&gt;#include&lt;/span&gt; &lt;span class="cpf"&gt;&amp;lt;iostream&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;
&lt;/span&gt;
&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;std&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;cout&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="s"&gt;"Hello C++"&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;std&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;endl&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Compile:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;g++ hello.cpp &lt;span class="nt"&gt;-o&lt;/span&gt; hello.exe
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;./hello.exe
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h1&gt;
  
  
  What You Installed
&lt;/h1&gt;

&lt;h2&gt;
  
  
  GCC
&lt;/h2&gt;

&lt;p&gt;The GNU Compiler Collection.&lt;/p&gt;

&lt;p&gt;Used for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;C&lt;/li&gt;
&lt;li&gt;C++&lt;/li&gt;
&lt;li&gt;Objective-C&lt;/li&gt;
&lt;li&gt;low-level systems programming&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Binutils
&lt;/h2&gt;

&lt;p&gt;The low-level binary tooling:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;ld&lt;/code&gt; → linker&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;as&lt;/code&gt; → assembler&lt;/li&gt;
&lt;li&gt;&lt;code&gt;objdump&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;nm&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ar&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These tools are essential for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;OS development&lt;/li&gt;
&lt;li&gt;reverse engineering&lt;/li&gt;
&lt;li&gt;embedded systems&lt;/li&gt;
&lt;li&gt;compiler work&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Make
&lt;/h2&gt;

&lt;p&gt;Build automation.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight make"&gt;&lt;code&gt;&lt;span class="nl"&gt;all&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;
    gcc main.c &lt;span class="nt"&gt;-o&lt;/span&gt; app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;make
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  GDB
&lt;/h2&gt;

&lt;p&gt;The GNU Debugger.&lt;/p&gt;

&lt;p&gt;Debug programs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gdb ./hello.exe
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h1&gt;
  
  
  Why MSYS2 Is Powerful
&lt;/h1&gt;

&lt;p&gt;MSYS2 gives Windows a Unix-style developer workflow.&lt;/p&gt;

&lt;p&gt;You get:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Bash shell&lt;/li&gt;
&lt;li&gt;Linux-like package management&lt;/li&gt;
&lt;li&gt;GCC toolchains&lt;/li&gt;
&lt;li&gt;POSIX tooling&lt;/li&gt;
&lt;li&gt;easier open-source development&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is especially useful for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;compiler development&lt;/li&gt;
&lt;li&gt;kernels&lt;/li&gt;
&lt;li&gt;emulators&lt;/li&gt;
&lt;li&gt;game engines&lt;/li&gt;
&lt;li&gt;systems software&lt;/li&gt;
&lt;li&gt;runtime environments&lt;/li&gt;
&lt;li&gt;custom operating systems&lt;/li&gt;
&lt;/ul&gt;




&lt;h1&gt;
  
  
  Bonus — Useful Packages
&lt;/h1&gt;

&lt;p&gt;Install Git:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pacman &lt;span class="nt"&gt;-S&lt;/span&gt; git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Install CMake:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pacman &lt;span class="nt"&gt;-S&lt;/span&gt; mingw-w64-x86_64-cmake
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Install NASM:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pacman &lt;span class="nt"&gt;-S&lt;/span&gt; nasm
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Install Clang:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pacman &lt;span class="nt"&gt;-S&lt;/span&gt; mingw-w64-x86_64-clang
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h1&gt;
  
  
  Final Thoughts
&lt;/h1&gt;

&lt;p&gt;Learning C build tooling is one of the most important steps toward understanding how software actually works underneath modern frameworks.&lt;/p&gt;

&lt;p&gt;Once you understand:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;compilers&lt;/li&gt;
&lt;li&gt;assemblers&lt;/li&gt;
&lt;li&gt;linkers&lt;/li&gt;
&lt;li&gt;object files&lt;/li&gt;
&lt;li&gt;runtimes&lt;/li&gt;
&lt;li&gt;loaders&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;you stop treating software like magic. You start seeing the machine underneath the abstraction.&lt;/p&gt;

</description>
      <category>c</category>
      <category>cpp</category>
      <category>tools</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>MMUKO-BOOT: Understanding a Nonpolar, Nonlinear Boot Sequence</title>
      <dc:creator>Nnamdi Okpala</dc:creator>
      <pubDate>Mon, 07 Sep 2026 16:11:23 +0000</pubDate>
      <link>https://dev.to/okpalan/mmuko-boot-understanding-a-nonpolar-nonlinear-boot-sequence-1ggi</link>
      <guid>https://dev.to/okpalan/mmuko-boot-understanding-a-nonpolar-nonlinear-boot-sequence-1ggi</guid>
      <description>&lt;h1&gt;
  
  
  MMUKO-BOOT: Understanding a Nonpolar, Nonlinear Boot Sequence
&lt;/h1&gt;

&lt;p&gt;&lt;em&gt;By Nnamdi Michael Okpala — Obinexus Uche, OBINexus R&amp;amp;D&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Repository: &lt;a href="https://github.com/obinexus/mmuko-boot" rel="noopener noreferrer"&gt;github.com/obinexus/mmuko-boot&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This article describes the supplied &lt;code&gt;0.1-qemu&lt;/code&gt; source snapshot. It separates the ringbooting concept, the current implementation, and the work needed to connect them.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Begin with a room, not a computer
&lt;/h2&gt;

&lt;p&gt;Imagine that eight people are sitting around a circular table.&lt;/p&gt;

&lt;p&gt;Each person holds a card showing either &lt;strong&gt;0&lt;/strong&gt; or &lt;strong&gt;1&lt;/strong&gt;. If you only want to record the cards, you can write down eight digits and call the job finished.&lt;/p&gt;

&lt;p&gt;But suppose the relationships matter too.&lt;/p&gt;

&lt;p&gt;Who is beside whom? Which people are paired? Where should the group consider its starting point? If everyone changes position, what should remain the same?&lt;/p&gt;

&lt;p&gt;Now you are describing more than a collection of values. You are describing values together with a structure.&lt;/p&gt;

&lt;p&gt;That is the simplest way into MMUKO-BOOT.&lt;/p&gt;

&lt;p&gt;An ordinary byte contains eight bits. MMUKO represents those bits using an eight-position &lt;strong&gt;cubit ring&lt;/strong&gt;, attaching direction, state and relationship information to each position.&lt;/p&gt;

&lt;p&gt;The question behind the project is:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Can startup establish and check a useful arrangement of relationships before handing control to the next program?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I call the broader exploration &lt;strong&gt;ringbooting&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;To understand it, we need to keep three things separate: how the processor starts, how the software represents information, and what its checks actually establish.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. What happens when a computer boots?
&lt;/h2&gt;

&lt;p&gt;When you turn on a computer, it cannot immediately run an ordinary application. Some earlier software must prepare the conditions that application depends on.&lt;/p&gt;

&lt;p&gt;A simplified startup story is:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Firmware begins running.&lt;/li&gt;
&lt;li&gt;A loader places the kernel in memory.&lt;/li&gt;
&lt;li&gt;The processor enters the required execution environment.&lt;/li&gt;
&lt;li&gt;The kernel initializes enough of the machine to continue.&lt;/li&gt;
&lt;li&gt;A program or service receives control.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Think of opening a workshop. Before anyone can use the tools, someone must unlock the building, turn on the lights and check the equipment.&lt;/p&gt;

&lt;p&gt;Real boot systems can already support fallback paths, recovery and verification. They are more capable than a single fragile chain.&lt;/p&gt;

&lt;p&gt;MMUKO-BOOT explores a particular additional layer: an explicit model of oriented bits and their relationships during kernel initialization.&lt;/p&gt;

&lt;p&gt;Its current hardware entry remains conventional.&lt;/p&gt;

&lt;p&gt;In the direct BIOS path, &lt;code&gt;boot16.s&lt;/code&gt; loads the kernel from disk into memory at &lt;code&gt;0x10000&lt;/code&gt;, switches into 32-bit protected mode and transfers control to the kernel entry code. That entry code calls &lt;code&gt;kernel_main()&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The alternative path uses GRUB Multiboot to reach the kernel.&lt;/p&gt;

&lt;p&gt;Both paths lead to the same MMUKO initialization model. The processor continues to execute ordinary instructions.&lt;/p&gt;

&lt;p&gt;The experiment begins in how the kernel organizes and resolves its software state.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. A cubit is a bit with additional information
&lt;/h2&gt;

&lt;p&gt;Let us return to the circular table.&lt;/p&gt;

&lt;p&gt;A person's card is the bit value. Their seat is the index. Their assigned compass label is the direction. Their relationship to another person is the pairing.&lt;/p&gt;

&lt;p&gt;In the source, a cubit carries information including:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Field&lt;/th&gt;
&lt;th&gt;Plain-language meaning&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;value&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The underlying bit: 0 or 1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;index&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Its position in the eight-element ring&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;direction&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Its assigned compass label&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;state&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;A classification derived initially from neighboring bits&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;spin_mrad&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;A stored angular tag&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;entangled_with&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The index of a designated partner, or no partner&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The eight direction labels are North, Northeast, East, Southeast, South, Southwest, West and Northwest.&lt;/p&gt;

&lt;p&gt;They are software labels. The computer does not need a physical compass.&lt;/p&gt;

&lt;p&gt;Likewise, &lt;strong&gt;cubit&lt;/strong&gt; is this project's term for a decorated bit. It does not imply a quantum processor. The implementation stores ordinary integers, enumerations and Boolean values.&lt;/p&gt;

&lt;p&gt;Words such as &lt;em&gt;spin&lt;/em&gt;, &lt;em&gt;superposition&lt;/em&gt; and &lt;em&gt;entanglement&lt;/em&gt; provide conceptual vocabulary, but their computational meanings must remain explicit.&lt;/p&gt;

&lt;p&gt;In this implementation:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Spin&lt;/strong&gt; is a stored angular tag.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Superposition&lt;/strong&gt; includes an ordered pair of direction labels.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Entanglement&lt;/strong&gt; refers to a local pairing rule within a byte.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There are no quantum probability amplitudes or quantum measurements in these structures.&lt;/p&gt;

&lt;p&gt;The representation also costs memory. An &lt;code&gt;MMUKO_Byte&lt;/code&gt; occupies more space than one ordinary byte because it stores eight cubit records and additional metadata. The scaffold models 16 raw byte values; it does not map the machine's entire RAM into rings.&lt;/p&gt;

&lt;p&gt;These definitions are visible in &lt;a href="https://github.com/obinexus/mmuko-boot/blob/main/kernel.c" rel="noopener noreferrer"&gt;&lt;code&gt;kernel.c&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. How does a bit acquire a state?
&lt;/h2&gt;

&lt;p&gt;The initial state rule is small enough to explain without specialist knowledge.&lt;/p&gt;

&lt;p&gt;Look at one bit. Then look at the next bit around the ring.&lt;/p&gt;

&lt;p&gt;The pair determines the state:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Current bit&lt;/th&gt;
&lt;th&gt;Next bit&lt;/th&gt;
&lt;th&gt;Initial state&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;code&gt;UP&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;&lt;code&gt;CHARM&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;code&gt;STRANGE&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;&lt;code&gt;DOWN&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The final position wraps around to the first position. That wraparound makes the neighborhood circular.&lt;/p&gt;

&lt;p&gt;For example, if your card says &lt;strong&gt;1&lt;/strong&gt; and your neighbor's card says &lt;strong&gt;0&lt;/strong&gt;, your initial label is &lt;code&gt;CHARM&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The name is a label for a particular input combination. The useful computational fact is the relationship between two bits.&lt;/p&gt;

&lt;p&gt;The state enumeration also includes &lt;code&gt;LEFT&lt;/code&gt; and &lt;code&gt;RIGHT&lt;/code&gt;, although this initialization rule produces the four states shown above.&lt;/p&gt;

&lt;p&gt;This is an important habit when explaining a system: start with the actual rule, then attach the vocabulary to it.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. What do I mean by “nonpolar”?
&lt;/h2&gt;

&lt;p&gt;Imagine putting a map on the circular table.&lt;/p&gt;

&lt;p&gt;You can turn the map without changing which towns connect to which roads. However, everyone needs to know which orientation they are currently using.&lt;/p&gt;

&lt;p&gt;The nonpolar design idea is to make orientation explicit and, eventually, changeable without confusing a coordinate choice with the underlying relationships.&lt;/p&gt;

&lt;p&gt;That ambition needs a qualification in this version.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The current kernel chooses a fixed anchor.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;During frame centering, it looks up base &lt;code&gt;6&lt;/code&gt;. That table entry contains Southwest as the primary direction and East as the secondary direction. The system therefore adopts Southwest as its frame of reference.&lt;/p&gt;

&lt;p&gt;Executing that lookup at runtime does not make the choice adaptive. With the supplied table and code, it selects the same anchor.&lt;/p&gt;

&lt;p&gt;So the accurate description is that MMUKO-BOOT explores a nonpolar representation while the present scaffold uses a fixed reference policy.&lt;/p&gt;

&lt;p&gt;A stronger implementation would need to demonstrate what happens when that policy changes. If we consistently relabel the directions, do the relevant relationships and outcomes remain equivalent?&lt;/p&gt;

&lt;p&gt;That is something we can test. The word &lt;em&gt;nonpolar&lt;/em&gt; alone does not establish it.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. What do I mean by “nonlinear”?
&lt;/h2&gt;

&lt;p&gt;Think about inspecting a building.&lt;/p&gt;

&lt;p&gt;You might check water, then electrical power, then access routes, then structural supports. The useful order need not match the order in which the rooms are numbered.&lt;/p&gt;

&lt;p&gt;MMUKO's diamond traversal visits its selected base labels in this order:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;12 → 6 → 8 → 4 → 10 → 2 → 1&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Here, &lt;em&gt;base&lt;/em&gt; means a classification label used by the model. It does not mean that the processor changes between number systems such as binary, octal and hexadecimal.&lt;/p&gt;

&lt;p&gt;The kernel initially calculates a byte's label using:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight c"&gt;&lt;code&gt;&lt;span class="n"&gt;base_index&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;raw_value&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="mi"&gt;12&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This produces labels from 1 through 12.&lt;/p&gt;

&lt;p&gt;Phase 5 then visits the seven selected labels in the diamond order. For each label, it scans the modeled bytes and updates the direction pair of those with an exact matching &lt;code&gt;base_index&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The implementation still executes sequentially. Its loops still scan the memory array in ordinary index order.&lt;/p&gt;

&lt;p&gt;Consequently, &lt;strong&gt;“nonlinear” currently describes the project's chosen nonascending resolution order, rather than a demonstrated nonlinear dynamical system.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The code has no adaptive phase scheduler or feedback-driven convergence loop yet.&lt;/p&gt;

&lt;p&gt;Those distinctions help us formulate the next engineering question: what should determine which unresolved relationship is processed next?&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Walking through the actual boot phases
&lt;/h2&gt;

&lt;p&gt;The uploaded kernel implements phases &lt;strong&gt;0 through 7&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The four words &lt;em&gt;SPARSE, REMEMBER, ACTIVE&lt;/em&gt; and &lt;em&gt;VERIFY&lt;/em&gt; can be useful conceptual groupings, but they are not the phase labels emitted by this source snapshot.&lt;/p&gt;

&lt;p&gt;Here is the implemented sequence:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Phase&lt;/th&gt;
&lt;th&gt;Operation&lt;/th&gt;
&lt;th&gt;Everyday explanation&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;Initialize the vacuum medium&lt;/td&gt;
&lt;td&gt;Set the background configuration&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;Initialize cubit rings&lt;/td&gt;
&lt;td&gt;Give every modeled bit its position and metadata&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;Align compass directions&lt;/td&gt;
&lt;td&gt;Resolve direction labels where necessary&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;Resolve paired states&lt;/td&gt;
&lt;td&gt;Apply the rule for designated partners&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;Center the reference frame&lt;/td&gt;
&lt;td&gt;Establish the shared orientation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;Traverse selected bases&lt;/td&gt;
&lt;td&gt;Apply direction pairs in the diamond order&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;6&lt;/td&gt;
&lt;td&gt;Check double rotation&lt;/td&gt;
&lt;td&gt;Check a particular reversible bit operation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;7&lt;/td&gt;
&lt;td&gt;Mark boot complete&lt;/td&gt;
&lt;td&gt;Permit the example program to run&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Phase 0: establish the background
&lt;/h3&gt;

&lt;p&gt;The “vacuum medium” is a structure containing three constants.&lt;/p&gt;

&lt;p&gt;The kernel initializes &lt;code&gt;gravity_milli&lt;/code&gt; to &lt;code&gt;9800&lt;/code&gt;, and the air and water fields to zero.&lt;/p&gt;

&lt;p&gt;In the workshop analogy, this is preparing a configuration sheet. It does not create a physical vacuum or simulate gravity acting on memory.&lt;/p&gt;

&lt;p&gt;These fields provide vocabulary and storage for future environmental policies. The present boot logic does not use them to implement a physical model.&lt;/p&gt;

&lt;h3&gt;
  
  
  Phase 1: build the rings
&lt;/h3&gt;

&lt;p&gt;For each modeled raw byte, the kernel extracts the eight bit values and assigns their metadata.&lt;/p&gt;

&lt;p&gt;Imagine giving everyone at the table a seat number, a direction label and a relationship card.&lt;/p&gt;

&lt;p&gt;The ring is now a concrete data structure that later phases can inspect.&lt;/p&gt;

&lt;h3&gt;
  
  
  Phase 2: establish direction
&lt;/h3&gt;

&lt;p&gt;If a cubit's direction is undefined, the kernel examines its two neighboring directions.&lt;/p&gt;

&lt;p&gt;The exact fallback behavior matters here. The current function can select a neighboring direction, favors the first examined neighbor when the counts tie, and defaults to North when neither neighbor supplies a direction.&lt;/p&gt;

&lt;p&gt;It does not preserve all unresolved cases as uncertainty.&lt;/p&gt;

&lt;p&gt;Furthermore, normal initialization already assigns every direction. The ordinary demonstration therefore does not exercise this repair path.&lt;/p&gt;

&lt;p&gt;To demonstrate meaningful uncertainty handling, a future test must deliberately introduce missing or conflicting information and check the resulting decision.&lt;/p&gt;

&lt;h3&gt;
  
  
  Phase 3: apply the pairing rule
&lt;/h3&gt;

&lt;p&gt;The kernel pairs positions &lt;code&gt;0↔7&lt;/code&gt;, &lt;code&gt;1↔6&lt;/code&gt; and &lt;code&gt;2↔5&lt;/code&gt;. Positions 3 and 4 have no designated partner.&lt;/p&gt;

&lt;p&gt;These are the actual lookup-table relationships. They are not all geometrically opposite compass positions.&lt;/p&gt;

&lt;p&gt;When paired cubits have the same state, the kernel changes the partner's state through &lt;code&gt;flip_state()&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;For example, &lt;code&gt;UP&lt;/code&gt; flips to &lt;code&gt;DOWN&lt;/code&gt;, while &lt;code&gt;CHARM&lt;/code&gt; flips to &lt;code&gt;STRANGE&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;This changes state metadata. It does not automatically change the underlying bit value.&lt;/p&gt;

&lt;p&gt;The engineering consequence is that we must specify what the state field means after resolution: it can no longer be understood solely as the original neighboring-bit classification.&lt;/p&gt;

&lt;h3&gt;
  
  
  Phase 4: choose a shared reference
&lt;/h3&gt;

&lt;p&gt;The kernel selects the base-6 Southwest/East pair and copies it into every modeled byte. Southwest becomes the system frame.&lt;/p&gt;

&lt;p&gt;At the table, everyone now knows which way the shared map is facing.&lt;/p&gt;

&lt;p&gt;The choice is explicit and inspectable, although currently fixed.&lt;/p&gt;

&lt;h3&gt;
  
  
  Phase 5: follow the diamond traversal
&lt;/h3&gt;

&lt;p&gt;The kernel visits the seven selected base labels and writes their corresponding direction pairs into matching bytes.&lt;/p&gt;

&lt;p&gt;There is a useful edge case here.&lt;/p&gt;

&lt;p&gt;Initialization can produce labels &lt;code&gt;3&lt;/code&gt;, &lt;code&gt;5&lt;/code&gt;, &lt;code&gt;7&lt;/code&gt;, &lt;code&gt;9&lt;/code&gt; and &lt;code&gt;11&lt;/code&gt;, but the traversal does not visit those labels directly.&lt;/p&gt;

&lt;p&gt;Because Phase 4 has already assigned its common pair to every byte, those unmatched labels retain that pair in the current kernel.&lt;/p&gt;

&lt;p&gt;An initial nearest-known-base lookup is not the same thing as later resolving every original label.&lt;/p&gt;

&lt;p&gt;This is precisely the kind of detail that turns a conceptual explanation into an inspectable specification.&lt;/p&gt;

&lt;h3&gt;
  
  
  Phase 6: perform the rotation check
&lt;/h3&gt;

&lt;p&gt;The kernel takes each cubit's stored value, rotates it four bit positions, rotates it another four positions, and compares it with the original.&lt;/p&gt;

&lt;p&gt;That brings us to the most important distinction in the verification story.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Returning to the beginning is a limited test
&lt;/h2&gt;

&lt;p&gt;Turn a circular arrangement halfway around. Then turn it halfway around again.&lt;/p&gt;

&lt;p&gt;You have completed a full turn.&lt;/p&gt;

&lt;p&gt;For an eight-bit rotation operation:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;rotate(rotate(x, 4), 4) == x
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This identity holds for every eight-bit value when the operation is implemented correctly.&lt;/p&gt;

&lt;p&gt;The current check applies that operation to each cubit's value, which is normally 0 or 1. It does not rotate the entire cubit structure and validate all its direction, state and pairing relationships.&lt;/p&gt;

&lt;p&gt;What does it establish?&lt;/p&gt;

&lt;p&gt;It checks a simple property of the implemented bit operation.&lt;/p&gt;

&lt;p&gt;It does &lt;strong&gt;not&lt;/strong&gt; establish that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the whole system will continue making progress;&lt;/li&gt;
&lt;li&gt;all metadata remains consistent;&lt;/li&gt;
&lt;li&gt;hardware is healthy;&lt;/li&gt;
&lt;li&gt;tampering has been detected;&lt;/li&gt;
&lt;li&gt;every required boot transition can complete.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A useful analogy is opening a door and closing it again. That demonstrates something about the door's movement. It does not demonstrate that the whole building is safe.&lt;/p&gt;

&lt;p&gt;Even a proposed test requiring eight distinct rotations would need care. The valid pattern &lt;code&gt;01010101&lt;/code&gt; repeats after two positions. Its symmetry is not a fault.&lt;/p&gt;

&lt;p&gt;A stronger verifier must define which transformations are permitted, which relationships must remain consistent, and which repeated patterns are valid.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Verification becomes meaningful when the property being checked is stated precisely.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  8. What happens after boot succeeds?
&lt;/h2&gt;

&lt;p&gt;The boot routine returns &lt;code&gt;BOOT_OK&lt;/code&gt; only after its implemented phases have completed successfully.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;kernel_main()&lt;/code&gt; then calls the example &lt;code&gt;mmuko_program_main()&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;That program rotates the first raw byte by one bit position, rebuilds its cubit ring, prints a checksum and displays selected cubit metadata.&lt;/p&gt;

&lt;p&gt;The initial first byte is &lt;code&gt;0x2A&lt;/code&gt;, or decimal 42. A one-position right rotation produces &lt;code&gt;0x15&lt;/code&gt;, or decimal 21.&lt;/p&gt;

&lt;p&gt;This provides a concrete demonstration that the scaffold can enter its kernel, run the phase pipeline and launch a small program afterward.&lt;/p&gt;

&lt;p&gt;It is still an early kernel scaffold. It does not yet supply a general application environment, scheduler or comprehensive hardware recovery system.&lt;/p&gt;

&lt;p&gt;After the example, the kernel enters a halt loop.&lt;/p&gt;

&lt;p&gt;The source also needs to maintain consistency when a raw value changes. Rebuilding its cubits is one part of that job; recomputing any dependent base classification is another.&lt;/p&gt;

&lt;p&gt;That is a practical next step for developing the model beyond initialization.&lt;/p&gt;

&lt;h2&gt;
  
  
  9. Where does NSIGII belong?
&lt;/h2&gt;

&lt;p&gt;In the wider design discussion, NSIGII represents a verification boundary.&lt;/p&gt;

&lt;p&gt;The relevant aspiration is that a component's claim of success should be supported by evidence that another part of the system can evaluate.&lt;/p&gt;

&lt;p&gt;However, this uploaded &lt;code&gt;mmuko-boot&lt;/code&gt; snapshot does not implement an NSIGII verification protocol or emit &lt;code&gt;NSIGII_VERIFIED&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Its printed checksum is not a cryptographic attestation, and a success message is not an independent proof.&lt;/p&gt;

&lt;p&gt;A future integration should specify:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;what evidence a boot phase produces;&lt;/li&gt;
&lt;li&gt;which component checks that evidence;&lt;/li&gt;
&lt;li&gt;which failures the check can detect;&lt;/li&gt;
&lt;li&gt;how uncertainty remains visible;&lt;/li&gt;
&lt;li&gt;what action follows a failed check.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That would give the verification boundary an explicit contract.&lt;/p&gt;

&lt;p&gt;The current scaffold provides places where those checks could be added.&lt;/p&gt;

&lt;h2&gt;
  
  
  10. Trying the experiment
&lt;/h2&gt;

&lt;p&gt;The repository contains several ways to explore the model.&lt;/p&gt;

&lt;p&gt;For the Python simulator:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python mmuko_bootsim.py &lt;span class="nt"&gt;--bytes&lt;/span&gt; 00 ff 2a &lt;span class="nt"&gt;--bases&lt;/span&gt; 12 6 8
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This runs a hosted simulation. It does not boot a machine.&lt;/p&gt;

&lt;p&gt;The simulator and kernel also have differences, including their default base assignment and some resolution behavior. They should be treated as related implementations that need conformance tests.&lt;/p&gt;

&lt;p&gt;For the Windows direct BIOS image, with the required toolchain installed:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;\build-direct.ps1&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;qemu-system-i386&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-drive&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;format&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;raw&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nx"&gt;file&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;build\mmuko-direct.img&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nx"&gt;if&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;ide&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nx"&gt;index&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-display&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;none&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-serial&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;stdio&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-no-reboot&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For the GRUB path, with its cross-compiler and supporting tools:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;make
make run
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The supplied Makefile also contains &lt;code&gt;direct&lt;/code&gt; and &lt;code&gt;run-direct&lt;/code&gt; targets. It does not contain a &lt;code&gt;ringboot&lt;/code&gt; target.&lt;/p&gt;

&lt;p&gt;The exact entry paths and prerequisites are documented in the repository's &lt;a href="https://github.com/obinexus/mmuko-boot/blob/main/README.md" rel="noopener noreferrer"&gt;README&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  11. What would make the next version stronger?
&lt;/h2&gt;

&lt;p&gt;The next useful advance is to make the model's promises measurable.&lt;/p&gt;

&lt;p&gt;First, define how every field changes when a ring rotates. Specify what happens to indexes, direction labels, pairing references and derived state.&lt;/p&gt;

&lt;p&gt;Second, test different reference frames. A configurable anchor is useful; evidence that the system behaves consistently under the intended changes of orientation is stronger.&lt;/p&gt;

&lt;p&gt;Third, give unresolved information an explicit policy. A default direction may be acceptable in one situation and unsafe in another. The code should make that distinction visible.&lt;/p&gt;

&lt;p&gt;Fourth, specify bounded repair. If resolving one relationship affects another, the system needs a rule for revisiting it, a stopping condition and a clear outcome when convergence fails. Repeating phases alone does not prove convergence or mathematical nonlinearity.&lt;/p&gt;

&lt;p&gt;Finally, compare implementations against the same examples. A simulator, hosted C model and freestanding kernel should agree wherever they claim to implement the same semantics.&lt;/p&gt;

&lt;p&gt;These steps would let us move from a vocabulary for ringbooting toward a reproducible account of its behavior.&lt;/p&gt;

&lt;h2&gt;
  
  
  12. The idea I want readers to carry away
&lt;/h2&gt;

&lt;p&gt;Return once more to the eight people around the table.&lt;/p&gt;

&lt;p&gt;The cards matter. So do the seats, the relationships and the shared understanding of direction.&lt;/p&gt;

&lt;p&gt;MMUKO-BOOT explores how to make those additional relationships part of a startup model that can be represented, inspected and tested.&lt;/p&gt;

&lt;p&gt;Today, the implementation is a small freestanding x86 scaffold with a deterministic phase pipeline. Its nonpolar and nonlinear ambitions extend beyond what that scaffold currently demonstrates.&lt;/p&gt;

&lt;p&gt;The work is to connect the two through precise rules and evidence.&lt;/p&gt;

&lt;p&gt;For me, the central question remains:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Before a system continues, can it explain how its parts relate—and show exactly what it has checked?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That is the direction of MMUKO ringbooting: an explicit model of orientation and relationships, followed by verification whose meaning we can examine together.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Nnamdi Michael Okpala&lt;/em&gt;&lt;br&gt;
&lt;em&gt;Obinexus Uche · OBINexus Axis R&amp;amp;D&lt;/em&gt;&lt;br&gt;
&lt;em&gt;&lt;a href="https://github.com/obinexus/mmuko-boot" rel="noopener noreferrer"&gt;MMUKO-BOOT&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>architecture</category>
      <category>computerscience</category>
      <category>opensource</category>
      <category>programming</category>
    </item>
    <item>
      <title>How I minimized a state machine.</title>
      <dc:creator>Nnamdi Okpala</dc:creator>
      <pubDate>Thu, 19 Dec 2024 02:38:12 +0000</pubDate>
      <link>https://dev.to/okpalan/how-i-minimized-a-state-machine-5gk4</link>
      <guid>https://dev.to/okpalan/how-i-minimized-a-state-machine-5gk4</guid>
      <description>&lt;p&gt;Hi, my name is Nnamdi Michael Okpala, and I’m a researcher passionate about solving problems efficiently. Today, I’m going to share how I minimized a state machine, and optimized an abstract syntax tree (AST) using something we’re all familiar with: a game of tennis.&lt;/p&gt;

&lt;p&gt;Note that this technology is patented from data of references in formal documentation in of github repo.&lt;br&gt;
The Problem: Keeping Track of Tennis Scores&lt;/p&gt;

&lt;p&gt;Imagine you and I are playing a game of tennis. The goal is simple — to win. In tennis, the score progresses like this:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;0 (Love)
15
30
40
Game Point (1)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Now let’s say you’re a professional tennis player, and I’m a complete beginner. We agree to play 5 games, and every time, you win all 5 games while I score nothing.&lt;/p&gt;

&lt;p&gt;A program to track this game could be designed in two ways:&lt;br&gt;
Program A: Keeping Track of Everything&lt;/p&gt;

&lt;p&gt;Program A would track every single event during the game. It would record:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Each point you score.
Every time I fail to score (which is a lot).
All transitions from one state (score) to another.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Game 1:
You: 0 → 15 → 30 → 40 → 1 Point
Me: 0 → 0 → 0 → 0 → 0
Game 2, 3, 4, 5:
Similar redundant records.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;This approach stores everything, even the fact that my score remains stuck at 0 (Love). It works, but it’s wasteful. It uses too much memory and spends unnecessary time keeping track of things that don’t change.&lt;br&gt;
Program B: A Smarter Way&lt;/p&gt;

&lt;p&gt;Now, let’s think smarter. Program B keeps track only of what matters:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;It starts by recording the scores at 0 (Love).
It tracks when you score points and advances your score through 15, 30, 40, and 1 Point.
It doesn’t track my score every time because it knows I’m stuck at 0 (Love).
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Game 1:
You: 0 → 15 → 30 → 40 → 1 Point
Game 2, 3, 4, 5:
Same efficient record.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;This program is smaller, faster, and doesn’t waste time storing unnecessary information.&lt;br&gt;
The Automaton and AST Connection&lt;/p&gt;

&lt;p&gt;This tennis game is like a state machine — a system that moves between states based on input. In our case:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;States: Scores like 0, 15, 30, 40, and 1 Point.
Transitions: Events like scoring a point.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;In Program A, the state machine tracks all states and transitions, including redundant ones. In Program B, I applied minimization techniques to:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Combine Redundant States: For example, “Me at 0” is constant and doesn’t need to be tracked repeatedly.
Focus on Important Transitions: The program tracks only your scoring events.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Now, the AST (abstract syntax tree) represents the structure of these transitions. Imagine the AST as a tree where:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Each branch represents a transition.
Each node represents a state (like 15 or 30).
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;By optimizing the AST, I:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Removed unnecessary nodes (e.g., “Me at 0”).
Simplified the tree so it only showed meaningful transitions (your scoring path).
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Why Does This Matter?&lt;/p&gt;

&lt;p&gt;Minimizing the state machine and optimizing the AST saved both memory and computation time. The program became faster and leaner while still delivering the correct result: You win all 5 games.&lt;br&gt;
The Bigger Picture&lt;/p&gt;

&lt;p&gt;This idea isn’t just about tennis. It’s how we can make programs smarter and more efficient in real-world applications. Whether it’s managing network traffic, optimizing a website, or building AI systems, state minimization and AST optimization make everything run smoother.&lt;/p&gt;

&lt;p&gt;So next time you’re watching a tennis match, think about how scores move between states — and remember that even in simplicity, there’s power.&lt;/p&gt;

&lt;p&gt;Thanks for reading!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>HTTP Authentication: Understanding Tokens, Sessions, and OAuth 2.0</title>
      <dc:creator>Nnamdi Okpala</dc:creator>
      <pubDate>Wed, 20 Nov 2024 20:32:25 +0000</pubDate>
      <link>https://dev.to/okpalan/http-authentication-understanding-tokens-sessions-and-oauth-20-597g</link>
      <guid>https://dev.to/okpalan/http-authentication-understanding-tokens-sessions-and-oauth-20-597g</guid>
      <description>&lt;h1&gt;
  
  
  HTTP Authentication: Understanding Tokens, Sessions, and OAuth 2.0
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Introduction to APIs
&lt;/h2&gt;

&lt;p&gt;An API (Application Programming Interface) acts as a bridge between different software systems. Like a TV remote control communicating with a television, APIs allow applications to interact without needing to understand each other's internal workings. When you make an HTTP/HTTPS request to an API endpoint, it processes your request and returns the desired results.&lt;/p&gt;

&lt;h2&gt;
  
  
  Authentication Methods
&lt;/h2&gt;

&lt;h3&gt;
  
  
  API Tokens
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;A unique identifier assigned to applications requesting access to a service&lt;/li&gt;
&lt;li&gt;Generated by the service provider and used for authentication&lt;/li&gt;
&lt;li&gt;Functions similarly to a username/password combination&lt;/li&gt;
&lt;li&gt;Must be included with each API request&lt;/li&gt;
&lt;li&gt;Provides a more secure alternative to sending credentials over HTTP&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Session IDs
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Created after successful user authorization&lt;/li&gt;
&lt;li&gt;Maintains user state throughout their interaction&lt;/li&gt;
&lt;li&gt;Not used for initial authentication&lt;/li&gt;
&lt;li&gt;Typically stored as cookies in the browser&lt;/li&gt;
&lt;li&gt;Helps track user activity and maintain login state&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  OAuth 2.0
&lt;/h2&gt;

&lt;p&gt;OAuth 2.0 provides a secure framework for API authentication through a token refresh mechanism. Here's how it works:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Initial Authorization Request&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Client sends credentials to the service&lt;/li&gt;
&lt;li&gt;Service validates the credentials&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Authorization Code&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Service returns an authorization code&lt;/li&gt;
&lt;li&gt;Code is temporary and single-use&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Token Exchange&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Client exchanges authorization code for access token&lt;/li&gt;
&lt;li&gt;Access token has limited scope and lifetime&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;API Access&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Client uses access token for API requests&lt;/li&gt;
&lt;li&gt;Token can be refreshed when it expires&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Security Considerations
&lt;/h2&gt;

&lt;h3&gt;
  
  
  API Token Security
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Always transmit tokens over HTTPS&lt;/li&gt;
&lt;li&gt;Store tokens securely&lt;/li&gt;
&lt;li&gt;Implement token expiration&lt;/li&gt;
&lt;li&gt;Use refresh tokens for long-term access&lt;/li&gt;
&lt;li&gt;Monitor token usage for suspicious activity&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Benefits of OAuth 2.0
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Reduced risk of credential exposure&lt;/li&gt;
&lt;li&gt;Fine-grained access control&lt;/li&gt;
&lt;li&gt;Token refresh mechanism&lt;/li&gt;
&lt;li&gt;Widely adopted by major service providers&lt;/li&gt;
&lt;li&gt;Industry-standard security protocol&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Best Practices
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Never send tokens in URLs&lt;/li&gt;
&lt;li&gt;Implement rate limiting&lt;/li&gt;
&lt;li&gt;Use short-lived tokens&lt;/li&gt;
&lt;li&gt;Enable token revocation&lt;/li&gt;
&lt;li&gt;Monitor failed authentication attempts&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;OAuth 2.0 has become the de facto standard for API security, offering a robust balance between security and usability. While not perfect, it provides a well-tested framework for secure API authentication and authorization.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
