yequari.com

I write code and occasionally blog posts.

Tech

Thinking About Databases

Let’s say you’re running a web service where users can add other users as friends. How do you store each user’s friends list in the database? The simplest solution would be to use one large table called “friends” with each row being an entry on one user’s friends list. How well does that perform if you scale up to millions of users? Are indexes applicable to speed things up here? Is there a better way to represent this data in the database?...

Customizing Vim

I’ve been using vim (specifically neovim) for over a year, I really enjoy how customizable it is, though up until today, I’ve only customized it through plugins made by other people. Today I wrote two Lua functions to streamline my workflow. I’m not very familiar with Lua but it was quite easy to pick up. First is a function to split my window so it would have two side by side, and a smaller one at the bottom, which gets turned into a terminal....

Recreating the Windows Live Messenger Avatar in CSS

This past week I’ve been working on a big redesign of my site. I’m trying to recreate the vibe of MSN / Windows Live Messenger around 2008-2011. Today, I spent most of the day recreating the avatar frame from WL Messenger in CSS. At first, I was trying really hard to recreate the kind of squircleđź”— shape from the login screen. It turns out this is quite difficult in CSS, and the only way I could possibly have done it is through creating an SVG path that I could use to clip the HTML element, but then I would lose access to the border and box-shadow properties....

Learning About Computers is Fun

Recently, I was working on a toy Linux shell to learn about the fork and exec system calls, and I got curious about how the popular shells like bash implement shell scripting languages, which led me down a rabbithole of lexers, parsers, and formal language definitions. It led me to Robert Nystrom’s Crafting Interpretersđź”—, a book that guides you through writing an interpreter for a toy language called Lox. Nystrom’s code is in Java, but I wanted to do it in C, which has been a bit of a headache....

Self-Hosted Jellyfin

I’ve been out of commission and stuck in bed for the past few weeks, and this weekend was the first time I could sit in at all in a few weeks, so I wanted to do a small project. There has been some chatter about self-hosting cloud services in the Yesterweb forumđź”—, and I decided I wanted to give it a shot. My home hardware situation is a little lacking, but I do have a Raspberry Pi 4 8GB with an external hard disk attached, which is sufficient for a few services....

Welcome

Welcome to my new site! This project was born out of stumbling upon the Yesterweb community and my need to split off my “““professional””” real-name website from my personal, hobby-oriented one. It is still very much under construction (probably perpetually) but I wanted to get something online. This website is built in Go and exists as a single binary on my webserver, inspired by Jes Olson’s post my website is one binaryđź”—....