







Stephen Dolan works on Jane Street’s Tools and Compilers team where he focuses on the OCaml compiler. In this episode, Stephen and Ron take a trip down memory lane, discussing how to manage computer memory efficiently and safely. They consider trade-offs between reference counting and garbage collection, the surprising gains achieved by prefetching, and how new language features like local allocation and unboxed types could give OCaml users more control over their memory.
Unix system programming in OCaml
Translation by Daniel C. Bünzli, Eric Cooper, Eliot Handelman, Priya Hattiangdi, Thad Meyer, Prashanth Mundkur, Richard Paradies, Till Varoquaux, Mark Wong-VanHaren
Why I chose OCaml as my primary language
A detailed explanation of why I chose OCaml as the ‘default’ programming language for every project.

OCaml Programming: Correct + Efficient + Beautiful — OCaml Programming: Correct + Efficient + Beautiful
A textbook on functional programming and data structures in OCaml, with an emphasis on semantics and software engineering. This book is the textbook for CS 3110 Data Structures and Functional Programming at Cornell University. A past title of this book was “Functional Programming in OCaml”.
Andrew Kelley: A Practical Guide to Applying Data Oriented Design (DoD)
Comparing the memory implementations of Claude and ChatGPT
Shlok Khemani has been doing excellent work reverse-engineering LLM systems and documenting his discoveries. Last week he wrote about ChatGPT memory. This week it's Claude. Claude's memory system has two …
Copilot memory early access for Pro and Pro+ - GitHub Changelog
Copilot memory is now available in public preview for GitHub Copilot Pro and Pro+ users, with support in Copilot coding agent and Copilot code review. Copilot memory Copilot memory enables…

Compiling knowledge, not retrieving it: a hands-on deep dive into llm-wiki-compiler
The thesis of this piece is simple and uncomfortable: the problem of making an LLM “remember” what you’ve read isn’t solved with more…
ChatGPT Memory and the Bitter Lesson
I reverse-engineered ChatGPT's memory system to understand what it stores, how it works (spoiler: not RAG!), and why OpenAI built it this way. Complete with prompts you can try yourself to explore your own ChatGPT memory.

Don't Forget To Flush by Andrew Kelley
Garbage Collection for Systems Programmers
Yet another programming blog. Thoughts on software and related misadventures.

The Address is Not The Place: Object Residency in C++26 - Laurie Kirk - CppCon 2026
Boomerang | Proceedings of the 35th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Bidirectional programming languages are a practical approach to the view update problem. Programs in these languages, called lenses, define both a view and an update policy - i.e., every program can be read as a function mapping sources to views as well ...

Pointers Are Complicated, or: What's in a Byte?
This summer, I am again working on Rust full-time, and again I will work (amongst other things) on a “memory model” for Rust/MIR. However, before I can talk about the ideas I have for this ...

MemGPT: Towards LLMs as Operating Systems
Large language models (LLMs) have revolutionized AI, but are constrained by limited context windows, hindering their utility in tasks like extended conversations and document analysis. To enable using context beyond limited context windows, we propose virtual context management, a technique drawing inspiration from hierarchical memory systems in traditional operating systems that provide the appearance of large memory resources through data movement between fast and slow memory. Using this technique, we introduce MemGPT (Memory-GPT), a system that intelligently manages different memory tiers in order to effectively provide extended context within the LLM's limited context window, and utilizes interrupts to manage control flow between itself and the user. We evaluate our OS-inspired design in two domains where the limited context windows of modern LLMs severely handicaps their performance: document analysis, where MemGPT is able to analyze large documents that far exceed the underlying LLM's context window, and multi-session chat, where MemGPT can create conversational agents that remember, reflect, and evolve dynamically through long-term interactions with their users. We release MemGPT code and data for our experiments at https://memgpt.ai.

R. S. Doiel, Software Engineer/Analyst — Robert's ramblings
By R. S. Doiel, 2026-02-21 (revised: 2026-03-03, epilogue added 2026-03-27)