The Advantages of UV over PIP

Let's go through the advantages of uv (github) over pip with the following a few aspects.PositioninpiThe default Python package manager, officially recommendeuA fast Python package manager and virtual environment tool from Astral (the team behind ruff and ryePerformancpiPure python implementatioDependency resolution and installation can be sloDownloads and installs wheels sequentialluWr... Read More

How the Kubernetes ClusterIP Service Works

A ClusterIP Service is the default Kubernetes service type. It provides a virtual IP address (VIP) inside the cluster to allow pods to communicate with each other. It is internal-only, meaning it is not accessible from outside the cluster.Example ManifestapiVersion: apps/vkind: Deploymenmetadataname: my-apspecreplicas: selectormatchLabelsapp: my-aptemplatemetadatalabelsapp: my-apspec... Read More

From Polling to QUIC: How Modern Web Communication Works

Today, I’m revisiting client-server communication mechanisms. The main methods are outlined in the table below for easier understanding.MechanismBased onDirectionProsConsTypical Use CasesPollingHTTP/1.xClient → Server• Very simple to implement• Works everywhere• High latency (depends on interval)• High overhead (many HTTP headers & TCP handshakes)• Wastes resourcesPeriodic updates, legacy apps... Read More

[Learning Notes] Course: How Transformer LLMs Work

Course Link: How Transformer LLMs Wor2025-08-1chapter: understanding language models: language as a Bag-of-Wordnon-transformer, encoder-only, decoder-only, encoder-decodedecoder-only: such GPtokenization -> tokens -> vocabulary -> vector embeddingchapter: understanding language models: (word) embeddingword2vec, the way to express the natural meaning is an array of floatsuch as cats [.91, -... Read More

New Features from C++20 Release

I recently did a quick study of the new features introduced in C++20, and I’d like to summarize what I’ve learned here.Core Languages Enhancementconstinit & consteval & enhanced constexpThe above three keywords enable code to be evaluated or initialized at compile time.The main goal of these keywords, from my perspective, are shown as followingconstiniensure deterministic initialization of glob... Read More

Duolingo to Replace Contractors with AI

Today, I came across an internal email from Duolingo's all-hands, announcing that Duolingo is going to make a significant platform shift - AI-first. Luis, the CEO, believes that AI is happening and changing much of how they work today, they can't wait until the AI is 100% perfect, and would rather move with urgency and take occasional small hits on quality. Also some constructive constraints are r... Read More

How to Terminate Other Child Threads Based on the Processing Result of Some One Child Thread in Java

ProbleIn the parent thread, several child threads will be forked. It needs to determine whether to terminate the execution of other child threads based on the processing result of some one child thread.Requirement AssumptioAfter each child thread finishes execution, it can decide to terminate or wait for the execution of other child threads based on its resulEach child thread has an "order" att... Read More

Home Assistant Add-on: FRP Client

BackgroundI’m trying to enable remote access to my local Home Assistant OS installed on my Raspberry Pi 4, so that I can upload my location to the HAOS while I’m outside.Therefore, I’ve authored an add-on to achieve that by leveraging the FRP software, which can forward traffic from my online server with public IP to the local HAOS.ArchitecturArchitecture of hass-addon-frp-clienGithub RepoGitHub... Read More

60 分钟搞定 Tarjan 算法求解无向图的割点与桥

本人在学习 Tarjan 算法求解无向图的割点与桥的问题时,很快发现了一篇简洁易懂的文章。很顺利地了解算法的思路,并写出了“高效”的代码,此时内心飘过 —— So Easy。然而,当我翻开《算法竞赛进阶指南》这本书的有关篇章时,我发现其中经过精简优化的代码有几条语句让我不得其所。以至于,花了较多心思和时间来思考🤔这段真正高效的 Tarjan 算法的工作原理以及代码的编写。关于 Tarjan 算法,我将会写若干篇系列文章,来完整系统地介绍 Tarjan 算法的原理以及其主要解决的问题。而在本章我主要讲一个问题 —— 如何使用 Tarjan 算法求解无向图的割点与桥。在讲述问题之前,我们先来简单地了解下什么是 Tarjan 算法?Tarjan 算法Tarjan 算法是基于深度优先搜索的算法,用于求解图的连通性问题。Tarjan 算法可以在线性时间内求出无向图的割点与桥,进一步地可以求解无向图的... Read More