note / learning note

From operating systems to an SDL sketch

An oversized operating-system request narrowed into a small C++ wrapper that opened an SDL window and drew one rectangle.

I opened with an enormous request: a Unix-like operating system in C. The answer was a map of bootstrapping, memory, processes, files, devices, and other systems, not a kernel I could compile. I narrowed the question and the conversation eventually reached a smaller SDL graphics example. Opening a window and drawing one rectangle was far less ambitious, but it gave me a complete shape to inspect in one sitting.

That change in scale is the real thread of this note. The generated C++ wrapper around SDL was still only source text in the chat; I have no build result for it. It shows how a broad systems interest could turn into a limited graphics exercise, with specific initialization and cleanup points instead of another list of kernel subsystems.

What the graphics sketch actually did

The constructor initialized SDL video, created a centered window and accelerated renderer, and cleared the display to white. A drawRectangle method accepted position, size, and RGB values, built an SDL_Rect, filled it, and presented the renderer. The destructor destroyed the renderer and window before quitting SDL.

The example’s complete usage was this small:

GraphicsLibrary graphics(800, 600, "Simple Game");
graphics.drawRectangle(100, 100, 50, 50, 255, 0, 0);
SDL_Delay(3000);

That means an 800-by-600 window, one red square at (100, 100), and a three-second wait. The wrapper did not yet store images, load textures, handle input, or run an ongoing game loop. Its name was broader than the functionality shown.

A full Unix-like system never appeared from that first request. What I could inspect by the end was a much smaller generated SDL sketch, with concrete creation and cleanup steps and no reported compile or run result.

Related rabbit holes

PublishedOct 3, 2026
note / experiment

A thin-client Linux experiment

A network-boot question became a comparison of separate remote desktops and shared physical desktops, ending with a usable Linux thin-client session and working audio.

Documented activity: September 20, 2026 – September 26, 2026