I've just finished my first semester at CMU. Here's some research/class stuff I did:

  • Spent a lot of time on the first project of 17-770, Ben's class on VMs/Runtimes.
    • The first project was writing a minimal (still like 80 bytecodes) WASM VM, which I've done several times before, so I decided to make it harder for myself which I definitely regretted at the time.
    • Instead of using an easy control stack or the well documented Wizard sidetable scheme, I came up with my own which makes WASM's syntactical blocks more explicit. It was a huge pain to debug but it made me think a lot about WASM control flow which turned out to be helpful for CBD and the 770 final project.
    • I didn't wanna write any tests, so I got a 33% on the first grading, but then Ben and Arjun let us do corrections for half credit so it ended up being fine.
  • 770 project two was pretty easy and I don't really remember much, but I had to learn how hardware caches work since I guess I never did before
  • For project 3 we had a choice between a WASM JIT compiler or GC, I hate GCs so I went with the JIT.
    • I forgot everything about x86 calling conventions, but I just used WASM's stack layout and calling convention. It was a pain calling into the main function from inline assembly in Rust, but it worked out.
    • I also wanted to use Rust closures to call into the runtime memory stuff, I hated the idea of passing any arguments at runtime if they could've been done at compile time, but Rust's calling convention is undefined so it was pretty scuffed. It kind of worked but took a while to figure out.
    • I used a combo of godbolt and claude to figure out most of the codegen stuff, claude never got it quite right or even very close but it told me which instructions to use, and then was helpful at giving me the spec for each instruction.
  • Project 4 was too ambitious and there's a report but I'm tired of writing about it so I won't
  • The core course was super chill, I didn't do more than skim any of the readings but it was nice to pick the profs' brains
    • Security, testing, and modularization were the most interesting to me
    • It was funny noticing when everyone in the cohort turned in assignments minutes before or after the deadline
  • My research project started with trying to add partial evaluation to Wizard
    • I've only thought of partial evaluation in terms of functional languages, so there was a little mismatch.
    • Ben imagined it being driven by the compiler, but I always thought of the interpreter first. I tried both and each was pretty unsatisfying, so we decided to start the CBD project
    • CBD is going pretty well, it's fun that I'm just prototyping and showing the results to my advisors week by week
    • It's a little scary that we don't have a clear idea where this project will go, but I'd like a a first-author paper when applying for internships next year
    • I like getting to think about staging and metaprogramming a lot, I'm also kind of directly solving the problem that made me hesitant to do WASM research in the first place.
  • Overall I've learned a lot more about VM performance and generating performant code, next semester I'm taking HOT compilation where I'll hopefully learn a lot more
  • I think I'm learning a lot more with a lot less stress than undergrad
  • I also messed with 3D printing a lot, I was planning a cool project but then I got sidetracked making cool gears and then I decided to make a brushed motor.
  • Near the start I wrote this cool shader, and accidentally rediscovered fractional bases: https://www.shadertoy.com/view/4fSBDw
    • FabriceNeyret decided to stunt on me by golfing it