13
votes
What programming/technical projects have you been working on?
This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's interesting about it? Are you having trouble with anything?
I started playing with spacetraders.io after it was posted here some months ago.
I wanted to use it as an excuse to put my React learning into actual practice and it's been incredibly educational.
It's been very fun to implement parts of the game in an agile fashion and the API is written in such a way that everything is its own little technical challenge.
I've got a list of ships up and have UI to have them display all their cargo and features. Plus some buttons and nice progress metres to show what they are up to.
Next step is to try and enumerate the market and shipyards so its easier to see where to shop in the sector.
Having a lot of fun with this one, highly recommend!
This week on repeatTest: finished up working on shrinking performance and I’m about to do a release.
Shrinking is a trial-and-error process where the library blindly tries removing data and checks if the test still fails. Most mutations get thrown away. Part of making it fast is using better algorithms (like binary search), but to make each attempt faster, there needs to be a cheap way to record what it did and then throw it away if the attempt isn’t committed. To avoid creating garbage in the inner loop, I ended up doing arena allocation, writing a log consisting of variable-length records to a buffer. Discarding it is just setting the length to zero. When committing, it iterates through the log and builds the new data structure.
Another issue I ran into is how to avoid exporting some methods in a TypeScript class (That is, making them not public outside the library) while still being usable within the same library. Turns out it’s pretty easy:
Last weekend I finally got around to trying out Nixos on my laptop. I have a fairly new Dell XPS 16 and I had been running Xubuntu on it with a newer kernel to make the audio work, but I hadn't managed yet to get the webcam operational. Since I use the laptop as my daily driver I didn't want to commit to switching distro in case it was too unstable or I didn't like it for some reason. So far so good though!
I now have a set up with Nixos running Hyprland and it was fairly smooth getting it running. I wrote a short blog post about the steps I needed to get the webcam working on the Dell XPS 16. It was a bit involved, but I got a lot less anxious now since Nixos has such a nice way of rolling back changes. I feel I'm a lot less worried about updates breaking things since I can the just roll back! This is also possible for other setups, but with my plain Xubuntu install that was not the case.
I haven't yet experimented with Home Manager, so that might be something I look into next. For now I've just set up my user config the classic way with a bunch of dotfiles. Neovim is installed to my liking with a few plugins I like. I did end up installing Rider for .Net development, the neovim setup with csharp-ls had showed a bunch of spurious errors. So I'll probably dig into that setup too to see if I can ditch it at some point. The refacoring tools on Rider is nice though; and it has a Vim plugin so might not be worth the effort.
Anyway, it was that special kind of nerd fun setting up my system from scratch again :)
I've futzed with WireGuard for a few hours a couple years ago but wasn't able to get it to do what I wanted. I think the main problem was that I didn't have IP forwarding enabled and firewalld was also blocking me but I didn't know that back then.
Recently, I tried tailscale and it's been pretty great! Not bad for a free service... their revenue play seems to be similar to CloudFlare so I'm not too worried about relying on it--in the worst case, I could swap out the server with Headscale which is a bit more setup but seems like a good alternative.
Now that my computers are setup as exit nodes it's very easy to "VPN" via computers that I own (faster and more reliable than OpenVPN, etc). I've started using Fedora IoT which is the atomic version of Fedora Server. It comes with greenboot which will automatically rollback any updates that bring down services (like the tailscale client daemon). Overall, it's been fun to use. I'm pretty impressed with it and I'm more confident in auto-updates now.
I’ve been playing around with tailnet, too. It seems useful, but confusing, and definitely not consumer-oriented. The documentation is extensive but does a bad job of putting things into context (what would you use this feature for).
Example: for people who who want to collaborate, the easiest way to get started is to use a gmail account to log in, but that means each person has their own tailnet. The tools for adding multiple people to the same tailnet are for organizations, not for you. Instead, you add your computers to your tailnet and they add computers to their tailnet, and there are ways to share computers between tailnets.
It looks like there are two separate mechanisms that work on all plans (including free). I'm curious if you could have 5 people via 2 tailnets able to access a shared machine on the free plan by combining both strategies:
Well, yes, there are invites. I remember trying that, since it seemed like a good way to set up a familiy network. But do they work, in the sense of accomplishing what you want to do? Not in my experience, but it might depend on what you're doing.
To go into more detail: last year, I found that initializing an Android client was confusing because it would automatically create a new tailnet based on the user's Google account (that is, their gmail address, since it wasn't a work account), and furthermore, there was no easy way to tell which tailnet they were on. So even thought I had added them as a user to my tailnet via an invite, it would just mysteriously not work for us (their device didn't show up), because I had the wrong mental model of how it worked and didn't realize that we were on different tailnets.
Maybe it's improved since then? Or maybe it's an Android-specific thing?
I've spent the last few weeks working on and off on an ESP32-S3 telnet server that I could use to play interactive fiction games. I was building it on the JZIP IF Z-machine C source that's been floating around the internet for next to forever. It's gone basically exactly like unorganized "fun projects" tend to go. I.e. I spend entirely too much time thinking about it, make some headway, then hit yet another snag. Just something fun to do.
It seems like it would be cool to set up the esp32 as an access point somewhere so that you had to physically be in the locality to play. Doubly cool if its multiplayer/turn based, so that people had to return to the location to play their turn / find out about progress.
You could adapt some of the old BBS "door" games, so instead of dialing in for your turn each day you have to revisit wherever the server is.
Hmm... now you have me thinking... What about an ESP32 that shared a choice based web game but that was only available on wifi...