RSSAmplifier

Blog

The Cloudlet

Notes on compilers, systems programming, and functional programming

thecloudlet.github.ioRSS feed ↗19 posts

Latest posts

Emacs Setup for LLVM and MLIR Compiler Work

Intro After five weeks of NPU compiler work across several codebases, I ended up keeping a small set of Emacs changes that made the MLIR/LLVM editing loop smoother. Open Model Artifacts from Dired Compiler debugging produces model artifacts next to logs, generated IR, and temporary directories. Opening an .onnx file usually means leaving Dired, switching to a file manager, starting Netron, and…

Work as Play; 4 weeks onboarding.

The First Few Weeks This Friday, I suddenly realized I hadn’t opened League of Legends for several days. Normally I would queue one or two ARAM games almost every evening, but instead I just lay on the living room floor, staring at the ceiling and spacing out. It felt strange — and strangely peaceful. For the first few days, I threw myself into setting up the environment. Thanks to GNU Stow , I…

From Pixels to Tensors, Part 3: Symbolic AI

Intro Part 1 covered 2D rendering and Part 2 built the 3D pipeline into a massively parallel machine. That machine runs one kind of AI well and is almost useless for another. Two separate things are worth keeping apart here. Symbolic AI failed for reasons that have nothing to do with hardware, which this part spends most of its length on. The parallel machine's role was narrower: not to defeat the…

Machine Learning is Just Data Flowing Through Operators

Something clicked today during my ML onboarding — a lightbulb moment. Here is the angle it came from. I was staring at an ONNX operator graph, learning how to use our test framework to check whether our MLIR compiler had correctly optimized that graph, when it suddenly hit me: the essence of machine learning — of deep learning — is that you throw in a huge blob of data, push it through an enormous…

From Pixels to Tensors, Part 2: The 3D Graphics Pipeline

Part 1 describes how 2D graphics works. In summary, it can be reduced to two operations, rasterize and composite. Now I am curious about how 3D graphics works, and want to gradually work toward AI computation. In the 2D world, the primitives that represent graphics are points, lines, and rectangles. However, when we move to 3D graphics, the primitives become points, lines, and triangles . The…

From Pixels to Tensors, Part 1: 2D Rendering Baselines

I started this series because I wanted to understand how ML compiler stacks built on MLIR actually work — not just the API surface, but why they are shaped the way they are. The trail goes back to GPU architecture, to the 3D pipeline, to the fixed-function hardware that preceded it. This is that backward journey. It starts at 2D rendering — font rasterization, geometry primitives, the NES PPU —…

Migrating a Zola blog from Markdown to Org-mode — with a lint/export/check pipeline to keep them in sync

For the first year, I wrote in Markdown. The reasons were practical: Zola reads Markdown natively, and I was not sure I would keep writing long enough to justify setting up a more elaborate workflow. Fifteen articles later, I am still writing. The friction of editing .md files in Emacs — jumping between Markdown conventions and Org muscle memory — became annoying enough to act on. So I migrated…

What "Memory Compiler" Actually Means: From Bitcells to GDS Tiling

Most people see the name "memory compiler" and have no idea what it actually does. 1. Compiler Representation The classical representation is the T-diagram (or Tombstone diagram). It characterizes a compiler by three languages: the source language it reads (A), the target language it emits (B), and the implementation language it is written in (C): ┌───┬───┐ │ A → B │ └───┴───┘ │ C Read it as: "a…

TIL: Reading Gmail in Emacs with mu4e on macOS

I like writing email in plain text and I wanted to read email without leaving Emacs. Most guides I found either target Linux or go straight to OAuth2 — which involves registering a Google Cloud project, setting up credentials, and running a local token server. That felt like too much for something that should be simple. Turns out App Password is enough, and the setup takes about 20 minutes. What…

Emacs Internal #04: Interval Trees — Balancing by Text Length, Not Node Count

It has been a while since my last update. Recently, I lost my job and stepped into the undefined space of looking for the next one. I didn't expect the friction of this state change to be so mentally taxing, but I'll try to keep the blue side up —observing the turbulence without fighting it too hard. I had actually planned to write about Emacs' Interval Trees a couple of months ago. But I found my…

Plane Spotting, Non-Euclidean Geometry, and Cultural Runtimes

Just watching the metal birds take-off. Sorry for the grainy photo. Whenever I feel emotionally tired, I decide to go to the airport for some plane spotting. I love planes, for no reason. Watching a big chunk of metal carrying people around just satisfies me. Today, I went to the local airport, watched planes alongside the approach air traffic control, and had some reflections in the back of my…

Emacs Internal #03: Tagged Union, Tagged Pointer, and Poor Man's Inheritance

[Update 2026-03-17] Thanks to the Hacker News community (discussion id=47349780) for valuable architectural context, highlighting the C++ UB on raw pointers, Rust's Strict Provenance API, and modern LLVM CastInfo RTTI (specifically ndesaulniers , internet_points , tialaramex , trws , jcranmer , shadowgovt , and mshockwave ). Also, thanks to the Reddit community (specifically GuDzpoz ) for…

Emacs Internal #02: Data First — Deconstructing Lisp_Object in C

Source: Mohit Mishra In the first part of this GNU Emacs series, I focused on the history and explains why there is a Lisp interpreter embedded inside a text editor. Before diving into this part, I recommend reading the previous post: Emacs Internal #01: Emacs is a Lisp Runtime in C, Not an Editor In this post, I want to look at GNU Emacs from a higher system-design perspective. The Mathematical…

Emacs Internal #01: is a Lisp Runtime in C, Not an Editor

I tried to move to an LLM-friendly platform like VSCode or Cursor, but I kept returning to GNU Emacs. After reading other users' stories, I realized this is a common pattern. Very few tools survive 40 years and still feel hard to leave. I read parts of the source code and discovered that Emacs is not just a code editor. There is design philosophy , system software trade-offs , and code that still…

Wishful Thinking from SICP, Practically

This is not a pure technical blog post. It is an attempt to connect engineering principles to real life. I've been trying to understand my anxiety and self-doubt through engineering principles. Structure and Interpretation of Computer Programs (SICP) wishful thinking gave me a framework to think about this. But I'm learning that understanding a pattern intellectually doesn't mean I've solved it…

Stratum: Architecting a Configurable Cache Simulator with C++ and Racket

The Interview That Changed Everything During a recent interview, the conversation started well. The interviewer asked about my open-source contribution to rv32emu —specifically, how I achieved 52% faster lookups and 35% faster insertions in the red-black tree implementation ( commit 434c466 ). My brain immediately started searching for the answer from /memory/—both the biological kind and the DRAM…

About: Yi-Ping Pan (Cloudlet)

Yi-Ping Pan (Cloudlet) is a Staff Engineer at Kneron working on NPU compiler infrastructure — an MLIR-based pipeline targeting RISC-V hardware, from ONNX ingestion through tiling and memory lowering to codegen. Previously at Synopsys, he reduced a production VHDL/RTL compilation pipeline from 26 hours to 15 minutes. He writes about compilers, systems, and hardware at thecloudlet.github.io. His…

Introducing Coogle: Bringing Haskell's Hoogle to C++

Why I Started This Project? The story started in 2024, when I decided to review basic algorithms and data structures. I started a repository called " From Zero to Leetcode Hero ." My intention was to learn and solve LeetCode problems using C++ and Haskell together. Playing with both languages was fun. I discovered that tail recursion and iteration share almost the same control flow. The main…

Back to Basics: From C char to string_view (Notes from building Coogle)

Background When I was implementing Coogle , I discovered something bizarre about C++ strings. That is why I wrote this note to summarize what I learned about C++ strings. Coogle is a search engine that I implemented in C++. It is designed to quickly and efficiently find function signatures in large codebases—especially useful for 30-year-old C++ codebases that were migrated from C and mixed with…