End of W2

Built another game (memory) in python. Chose this game because I was interested in printing color in the terminal and so I learned about ANSI escape codes in the process.

  • Added save/load feature + timer in minesweeper

  • During the hour of doing hard things on Wednesday, I worked on moving my distributed training project forward. I will be using pytorch's DDP to enable data parallel training. Because of python's global interpreter lock (GIL) which is a mutex that prevents multiple threads from accessing a shared resource -- in this case a python interpreter -- so DDP's work around is to spin up multiple processes (usually 1 process per GPU) where each instance has a python interpreter.

    • This is different from using the num_workers parameter in pytorch's dataloader as that is also doing multi-processing but for I/O and pre-processing data and making sure that the GPU is not waiting on the CPU while DDP is replicating the computation graph across each process but with each process having a distinct slice of the data, working in parallel to calculate the gradients for the learning process. And finally DDP uses an NCCL backend to synchronize the gradients across processes.

  • @Kevan Hollbach (he) (SP1'26) @Mike Cugini (they/he) (SP1'26) We got Zork running on a floppy disk for the Apple 2!

    • It's so analog. We sent data via audio from out laptops which was then stored as bits in memory and we could see the bits represented as hex when we ran the debugger. It also has a very small RAM so we needed to write Zork onto floppy.

    • I also got to print some for loops and plot in BASIC. Fun!

    • We ran into the issue of getting the data from our laptops to the apple 2. After a lot of patient debugging, we realized it was because our modern laptops combine the microphones and headphones jack whereas the Apple 2 had separate jacks for each source. So by using a splitter to disambiguate the microphone and headphone source from our modern laptops, we were able to write Zork on the floppy disk for Apple 2.

    • Finally getting to play Zork on the Apple 2 was so satisfying. Have I picked up a new interest in retro computing ? :eyes:

  • Pair programmed with @Mike Cugini (they/he) (SP1'26) on his Z machine in rust. And we found one bug and fixed it together.

  • Pair programmed with @Shalini Pyapali (she) (W2'26) where she helped me conceptualize how to webify tictactoe as we came up with the data schema together for a small database to track different game sessions.

I think I might spend the rest of today trying to get that out onto the web. I am doing this side quest since I never got exposed to web programming in school and think it is a powerful skill to be able to bring something online. After all, it is the OG distributed systems right?

Previous
Previous

W3D1

Next
Next

W2D1