Hej! It’s Junxi!

Wow, welcome to my personal website!

  • I am a software engineer at Marqeta, working in the Continuous Integration team.
  • I code in Golang🐹, Python🐍, Rust🦀, and more.
  • No.1 fan of Real Madrid 🤍
  • 2500+ hours in Europa Universalis IV, achievements: 203/373

Functional Options in Go when constructing a struct

Composition over Inheritance From my understanding, there is no constructor in Go, since Go does not advocate the concept of Object-Oriented Programming. Go prefers the idea of composition, which is more flexible than inheritance. Also, this is how C works, and Go is a language that is inspired by C. How to construct structs? My personal ranking of these 3: Functional Options > Direct Field Access > “Constructors” 0. Setting Suppose we have this Pineapple struct, with 3 fields:...

June 9, 2024 · WithAuthor(Junxi)

Compiler Design: Graph-Based Greedy Register Allocation

Assembly Format All assembly code in this post follows Intel syntax: Operation Destination, Source x86-64 General Purpose Registers x86-64 architecture has 16 general purpose registers. 16 general purpose registers of x86-64 Special Registers Among the 16 general purpose registers, %rbp and %rsp has special meanings that are not recommended to be changed by program. %rsp is stack pointer, indicates the current address of the stack. %rbp is base pointer, indicates the start address of a stack frame....

January 22, 2024 · Junxi He (building Compiler with Zilong God)
MySQL Snapshot on EBS!

How to Create a MySQL Snapshot using EBS on AWS (Without using RDS!)

Target: Make a snapshot for MySQL and store it on AWS EBS Steps: Create and Mount EBS Create a new EBS volume within the same subnet as the EC2 instance running MysQL, and attach that EBS to the instance. Mount newly created EBS to MySQL’s default data directory, /var/lib/mysql. Using lsblk to see the name of the new EBS volume. sudo file -s /dev/SSD_Name to check if the SSD has data in it....

November 11, 2023 · Junxi He (struggling with Cloud Computing)

Parallel Programming: CPU Cache Coherence (Working)

Cache 101 We need cache because we want our computer to be fast and cheap. Cache maps from Cache Layout

September 12, 2023 · Junxi_1 and Junxi_2 at the same time