Skip to main content
Fisher Sun 🎣

My blog

Welcome to my blog! You can subscribe via RSS.

July 2025

  1. Finally, a proper comments system
    Preview: Okay, I admit it, having a mailto link at the bottom of each post is not an ingenious comments system. I’ve added Giscus to this blog: now, under each blog post, you’ll find a discussion section where you can react and comment, and comments there will be visible publicly. I’d been considering adding…

February 2025

  1. Astro v5: Cannot access '$$Image' before initialization
    Preview: Yesterday, I migrated this site from Astro v4 to Astro v5 to make use of the experimental SVG components. I followed the update guide. It seemed like all I needed to do was change the collections code to work with the new Content Layer API. All was going well with the Content Layer API in dev mode, so…

January 2025

  1. TIL: Python's double slash is not integer division
    Preview: I was working on LeetCode 150. Evaluate Reverse Polish Notation, which specifies: The division between two integers always truncates toward zero. “Ah, this is trivial. If I were using Java, I would just use /, but since I’m using Python, I’ll use the equivalent, //.” So I had the following code in…

December 2024

  1. We have println at home
    Preview: While working through Crafting Interpreters in C++, I wanted to explore as many modern C++ features as I could. One of the features I was the most hyped for was print and println. Finally, a normal way to print things! I provided std::formatter specializations for my TokenType and Token classes, and…
  2. C++20 Modules with CLion and CMake
    Preview: I’ve been working through Crafting Interpreters in C++20, so I tried out using the new modules. There were a couple of unintuitive things with using modules with CLion and CMake, so I’ll document them here so that it may help future me (and maybe other people too). Skip to finished CMakeLists.txt Creating…

November 2024

  1. Running out of memory on Bluefin
    Preview: Last month, I found my laptop running Bluefin constantly freezing. These freezes weren’t minor one-second freezes: the entire OS would lock up, and waiting did nothing. Every time it happened, I would have to hold the power button to trigger a force-shut down. This should not have been happening: I had…

August 2024

  1. Using a built-in binding that's shadowed
    Preview: The other day, I was getting TypeScript errors when I tried to use a built-in Map in some legacy code. It turns out, the module had imported the Immutable.js Map, shadowing the built-in one. How could I keep the existing usages of the Immutable.js Map and use the built-in Map at the same time? Approach…

March 2024

  1. Setting up VSCode for GNOME and Wayland
    Preview: If you install VSCode on Ubuntu 22 LTS, it’ll look like this: Unfortunately, things don’t Just Work (tm); VSCode has a few quirks with GNOME and Wayland. Here are the steps to fix them. Restoring the integrated title bar On Windows and macOS, VSCode integrates its window decorations, menubar, and search…

February 2024

  1. Margin widths different for the same content width
    Preview: Yesterday, I guess I was feeling a little vain, because I was clicking around my own website, admiring my own work. And it was nice, until I realized, my content was shifting between pages. Now that I know what the problem is, it seems so obvious. And if you, dear reader, have developed on Windows or…
  2. TIL: ESM equivalent of if __name__ == "__main__"
    Preview: While developing this website, I wanted to write a little script to automate creating blog post files and generating frontmatter blocks. I thought it could be a good way to get some practice using JavaScript for scripting—to learn how to do all the stuff I usually do with Python. Translating how I normally…
  3. The new fishersun.com
    Preview: Welcome to the new version of my website! I’ve decided to completely rewrite it, migrating it from Jekyll to Astro. I’ll explain more in a future post, but in the meantime, enjoy! I’ve added a homepage, and I finally made a portfolio. As for the blog, it’s more bare-bones currently, but the plan is to…