Some Python Notes | King Weekly

The Global Interpreter Lock (GIL) At its core, the Global Interpreter Lock, or GIL, is a lock that only allows one thread to execute Python bytecode at a time within a single process. This means that even on a multi-core processor, a standard Python program with multiple threads will only utilize a single core for executing Python code. It is also for compatibility with large number extension modules written in C. These C extensions may not have built-in thread safety mechanisms, so GIL provides a safety net to ensure that they are executed in a single-threaded environment. The primary reason for the GIL’s existence lies in Python’s memory management. ...

June 30, 2025 · 3 min · King Jin

Bitcoin Basic | King Weekly

Bitcoin The legend of Bitcoin has shown its magic for a long time. Recently, I have started to explore this field, and this is a record of my learning. The Blockchain⛓️ The blockchain is the foundational technology of Bitcoin. Think of it as a public, digital ledger or receipt book that is shared across thousands of computers worldwide. It’s a Chain of Blocks: Each “block” contains a list of recent transactions. When a new block is created, it is cryptographically linked to the previous one, forming an unbroken chain leading all the way back to the very first block. It’s Immutable: Because each block is linked to the one before it, changing a transaction in an old block would require re-doing all the work for every single block that came after it. This makes the ledger permanent and tamper-proof. This structure is what proves each coin’s history and prevents fraud like double-spending. The Genesis Block📜 The very first block, known as the Genesis Block, was mined on 2009.01.04, by Bitcoin’s mysterious creator, Satoshi Nakamoto. This single block was the start of the entire Bitcoin network. Once it was created, the race to mine the second block began, and the chain has been growing continuously ever since. ...

May 30, 2025 · 6 min · King Jin

For UNIX Week | King Weekly

Book - Unix: A History and a Memoir Recently, I read this fantastic book. It bring me back to that 1960s - a period without modern computer and how the most clever minds in this world changed the world. During the reading, I found many answers to the “why” questions I had when I learning linux system. AT&T built Bell Labs and invited some of the most brilliant people in the world to do the most advanced scientific work. There was no limit on funding and no fixed goals for individuals. The system developed before Unix was called Multics. Since “Multics” already used “multi,” the early name of Unix was “Unics.” Unix was first written on the PDP-7. The next version, written in C, was developed on the PDP-11. Fortunately, it wasn’t written for the PDP-10. Tools like the shell, grep, regular expressions, the C language, the C compiler, yacc, lex, make, sed, awk, and troff were all invented at Bell Labs. Unix eventually declined due to copyright issues. AT&T sold it as a product and made it proprietary, which gave rise to open-source Unix-like systems. GNU is a Unix-like project that provides free and open-source alternatives. Under the GNU license, if you modify the source code of a project, the modified version must also remain open-source. MacOS is based on BSD, which is a Unix-like system. The Linux kernel combined with GNU forms GNU/Linux. They both follow POSIX. In the early days, operating systems were not portable. This changed with the invention of the C language and its compiler. MINIX was widely used because it was embedded in Intel chips. The working environment at Bell Labs in the 1970s are of hard problems, brilliant colleagues with shared dreams, and a unique management style that encouraged innovation. Microsoft once had its 3own Unix-like system. Another completely different path from Unix was MS-DOS, which eventually evolved into today’s Windows. You can also get to know the geniuses of that era, like Ken Thompson, Richard Stallman, and Brian Kernighan. “Everything is a file” is one of the core principles of Unix. The KISS principle (“Keep It Simple, Stupid”) is a fundamental part of Unix philosophy. The UNIX philosophy is very similar to some programming concepts I’ve recently learned at university. That’s why, Its impact not only on system desisgn but also software deveopemnt and beyond. ...

April 21, 2025 · 4 min · King Jin

Jarvis Will Coming Soon | King Weekly

Model Context Protocol overview MCP (Model Context Protocol) can be understood as a “universal language” for communication between AI and external tools. It’s like a translator, allowing different AI applications (such as chatbots, code assistants) and different tools (like databases, GitHub, calendars) to easily communicate without needing to develop a new interface every time. Why is MCP needed? In the past, if you wanted an AI assistant to access different tools, like a calendar, email, or task manager, you would need to develop a separate interface for each tool (function calling), which resulted in a huge amount of work (N AI applications × M tools = N×M interfaces). MCP simplifies everything: all AI applications only need to support MCP, and all tools only need to support MCP. This way, they can communicate with each other, reducing development costs (N+M interfaces). ...

April 3, 2025 · 4 min · King Jin

Start | King Weekly

Email sending and receiving system The main system is build based on three protocols: SMTP, POP3 and IMAP. SMTP is used for sending emails to the recipient’s email server, but it does not handle receiving emails. User1 sends an email via an email client, and the email is first sent to User1’s email server using SMTP. Then, the email server forwards it to the recipient’s email server using SMTP as well. ...

March 9, 2025 · 5 min · King Jin