In October 2023, I had the pleasure of watching a live performance of Anoushka Shankar’s quintet. While I had heard her albums before, listening to it live is a whole different experience. I decided soon after that I would start learning the sitar. I also started listening to more and more Hindustani classical recordings around this time, by artists including Ali Akbar Khan, Ravi Shankar and…
This is a guide to enabling encryption on an existing unencrypted Ubuntu 24.04 partition. Assumptions: 
 
 / and /boot are on different partitions. While it is possible to have a single partition with both the root / and /boot (GRUB), I wasn’t able to get this to work seamlessly, and so spent some time moving /boot to its own partition. We will also assume there’s an EFI…
The USS Midway is an aircraft carrier that served the US Navy from 1945 to 1992. Now, its a museum in San Diego which is well worth a visit. The entire flight deck, the ship’s island, and many sections of the crews’ and officers’ quarters are accessible to the public. 
 
 
 
 
 
 
 Right off the bat, I was impressed by how huge it was from the outside.…
I’ve been spending an unreasonable amount of time trying to understanding performance jitters in a C++ application I’m working on. I have been measuring the time taken to execute a physics update as part of a graphics loop, something like: 
 void update () { 
 // Need to analyze performance of this function:
 step_physics (); 
 
 // Regular OpenGL drawing stuff,…

 
 
 <div style="display: flex; justify-content: flex-end;">
 <button class="btn btn-primary" style="" id="reset-btn">Reset</button>
</div>
 
 
 Bead sort 1 is a sorting algorithm powered by gravity! 
 
 For each number x in the array we want to sort, we arrange x beads in a row. 
 Let them all drop. 
 Count the number of beads in each row from top…
I came across an interesting approach in Anders Hoff’s writings : 
 
 When experimenting with generative algorithms it is sometimes useful to start with a highly organized structure. Then try to find interesting ways to gradually disrupt it. 
 
 Let’s try this out. Here’s a starting point: 
 
 let there be particles arranged on the circumference of a…
While scouring the internet for ways to track memory usage of processes, I found a lot of resources on valgrind(+massif). While valgrind is useful, it slows down your program significantly. This is particularly problematic when you have a memory leak that takes a long time to occur or balloon into a large amount. In my experience, heaptrack runs much faster 1 . Some approaches modify calls to new…
While building GPU accelerated cellular automata, I needed a quick way to dump a numpy array of pixels onto the screen. This is pretty simple to do with pygame’s surfarray API. You run this in the main drawing loop: 
 # Z is a numpy array 
 surf = pygame . surfarray . make_surface ( Z ) 
 self . display . blit ( surf , ( 0 , 0 )) 
 
 pygame . display . update () 
…
Over the past few days, I’ve been working on a SPH fluid simulator with rust, compiled to wasm. The goal here is more “real-time & pretty-looking” than “offline and accurate”. sandspiel was a great motivator to start working on this. 
 Update: You can check out the demo here, or the source code here 
 I like the way cargo and rust handle having different…
I trained a pix2pix model to denoise images rendered by Blender’s cycles renderer. Here is a validation example from the 400th(and final) epoch: 
 
 
 
 
 
 
 Running it on a completely different view(compared to the training data): 
 
 
 
 
 
 
 A butchered, yet cool image resulted from running it on an unrelated scene: 
 
…