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?
...
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.
...
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. So instead I opted to just make a rounded square, using the first-radius
value to round the corners with an ellipse shape rather than a circle. After all, we’re going for the vibe, not a 1:1 recreation. After hours of tinkering with just the shape, I added the gradient background, as well as a <span>
on top of everything to add the “glossy” effect. You can see the code on CodePen🔗.
...
Web 1.0 revival is pretty popular these days in the smallweb circles, but one aspect of it should have remained in the grave: the 88x31 button.
...
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. I’m really rusty in C compared to my college days, but improving my C skills and learning about programming languages has been quite an enjoyable experience, regardless. It’s neat to see real applications for some of the topics covered in automata class.
...
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. I decided to start with Jellyfin🔗 because I have been starting to manage my own music library locally again, to supplement my usage of Spotify. Jellyfin was attractive because it solves a long-time gripe I’ve had with Spotify: management of local media files is absolute shit.
...
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🔗. I thought it was a super cool idea so I implemented a version myself. The code will also soon power my real-name site!
...