Works
Latest Projects
This is a project I started as a joke. I read that HTMX is terrible for very interactive apps, so I wanted to see how far I could push it. I thought, "Let's test that out..."
To test this, I created a classic Snake game using WebSockets, HTMX, and templates written in Go. The only extra dependency is Gorilla WebSocket. On the frontend, I aimed for zero JavaScript, but I needed event listeners for keyboard input, everything else is pure HTMX magic. I didn't focus much on styling, so I owe you that part.
Initially, I added multiplayer support for up to four players. Since I was playing often with friends, I decided to implement more features and improve the functionality like lobby creation, join/invite support, and the ability to rejoin a game after disconnection.
To maintain performance under these self-imposed constraints, I only send each client the squares that change on every tick, rather than the entire board. I also use go routines for the game loops, channel for send data between them and some mutexes to avoid race conditions the Go data race detector is amazing :chefkiss:.
The entire Docker image is around 20MB. I tested it with 10 full lobbies running simultaneously, and it was still using only about 12MB of RAM, so I consider that a success.
I wanted to have an easy way to check the wet bulb temperature for the day so I know the best time to run or if it will be dangerously hot
For that I used the open weather API and calculated the wet bulb temperature using the formula from ametsoc.org. I also added a simple chart to visualize the temperature throughout the day.
I used go to fetch the info from open weather API the and calculate the wet bulb temperature. For the frontend I used solidjs because I wanted to try it and I really like it, loved the signal implementation, how light and fast it is. Great DX.