18
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?
A few months back, I found my old metal 160GB iPod Classic 7 and thought it was great to experience this time capsule from the 2010s. However, the battery life only allowed for 30 minutes of playback, and I suspected a swollen battery.
Then I got sucked into the iPod modding community and tried to pry open the iPod... Apparently, the 7th edition is notorious for being difficult to open. Long story short, I scratched up the front and broke the screen.
I then purchased a busted iPod Classic 5th, which was way easier to open, and I installed a new (larger) battery and a 256GB SD card. Now, playback on the stock firmware sometimes lags, which is to be expected since the database file for this type of iPod isn’t designed for my 100+GB of songs.
So, I installed Rockbox on it, but it constantly freezes.
In the end, this has taken way more time and caused more headaches than I expected, but it's nice to tinker around with it.
I’d really like to tell you to pick up a newer MP3 player but it really seems that everything on the market is either actually new old stock garbage leftover Chinese no-name stuff from the aughts or just severely pared down Android smartphones with wildly varying levels of quality.
What you may actually end up liking more is some hobbyist-made device. They will not be as polished as the iPods of yore but they might have the physicality and simplicity that I assume you are looking for.
Stupid thing is now that I intermittently use the ipod (when it’s not frozen) I don't even know id I really like the walled off experience of just listening to “my” music.
I tend to listen to a lot of different music and having the keyboard on a phone to search for music is really handy. Also having to download new music can be a hassle.
I do like to take on these projects as it tends to answer questions for myself as “Is Spotify worth it for me?”.
Interestingly, this is what my technical project I have been working on lately has been addressing. The biggest problem in the market for audio players, is there is not really a market for it since everyone just uses their phones. The few audiophile music players that currently exist are android devices with good DACs and amps, with the biggest brand in this space being FiiO. Nothing against these devices, but they do not meet my criteria due to repairability concerns and not wanting to carry around another Android device. Modded iPods are making a comeback, and honestly that might have been a better direction for me to go down rather than my current approach of making my own device.
What a weird coincidence. I started using my 80GB iPod 5.5G again after getting angry about the Spotify Unwrapped posts. Since then I've been on a CD buying spree, filling the gap between my existing CD collection and what has been released since I started using Spotify. It has been very fulfilling!
One thing that's bugging me are the dead pixel lines on the screen of the iPod. It's not in the way, but it's just not that nice. The iPod is also pretty slow with the original HDD. Battery life is still decent at, and I'm guessing here, more than 10 hours.
This past few days I've been contemplating opening it up and upgrading. I was looking at a iFlash Solo, a 3000mAh battery and a new screen. It's not cheap, which is why I haven't pulled the trigger yet. But now that I read your comment I'm wondering if it will be a good idea. The way it is right now, with it's minor flaws, is fine for me. If the upgrades mean it'll be worse, that would be very disappointing. Which SD card upgrade are you using? And which iPod 5G have you upgraded? I've read there are important differences between the 30GB (thin) and 60/80GB (thick) versions.
EDIT: I found this guide extremely useful
I've tried modding my original iPod 7gen 160GB but broke the screen, still yet to open this one to replace the screen.
I read that the gen 5 was way easier to open so bought a second hand busted up 5th gen iPod thin 30gb.
Installed a 2000mAh battery and a dual micro SD card adapter with a 256 GB SanDisk micro SD card.
It's running stock firmware fine, except for the intermittent playback issues due to the database file not being able to handle my ~90 GB music collection.
Rockbox is constantly freezing up and it's unclear why it's causing issues. Possibly some issues on the SD card.
I'm now going to open it back up and completely repartition the SD card just to ensure there's no issues on the card. I'll also replace the front for a clear plate and fix the 30 pin connector frame as it's busted.
If I would've done it again I would purchase a SD card adapter from iFlash and use a Samsung SD card as these seem to cause less issues.
That sucks. I’m going to think about it some more before deciding.
Don't let my issues deter you.
There're many people modding iPods with less issues than I'm having.
Modding hardware will always come with issues and drawbacks.
In the end I'll learn a lot from it which is also valuable.
I am once again here to talk about the progress of my game.
Missing Update from Last Week - Save Files
I wasn't able to post last week when I was working on setting up save files for my game. Right now, there's just auto-saves at the end of each battle, then the player can opt to either continue from the latest save file they have, or to load one of the 5 latest auto-saves (I discard the oldest and limit it to 5... it's arbitrary, but also I'm too lazy to implement scrolling right now).
Eventually, I want the player to be able to save scum to their heart's content, but that's for later (serializing the battle state is intimidating because I didn't plan ahead for that, my bad).
Failure to Communicate
I attempted to make a video demonstrating this functionality (along with another one), but I bit off more than I could chew and ended up with a long video with lots of sped-up portions that nobody could understand, so I'm not going to offend your eyeballs with that here. I have to keep my videos bite-sized or no one will want to watch 'em.
Overwriting Save Files
From my understanding, the standard practice when dealing with save files seems to be to use atomic operations whenever possible. So... when there's a pre-existing save file that you're overwriting:
Some VFX Work
This week was more about setting up VFX for a "summon field" ability. The idea is that the player can place fields with customized effects that get applied on characters that stay on them at the end of the turn. Here's what it looks like so far (just 11 secs): https://imgur.com/qJGEvoK. The icons that float around in the field indicate what effect gets applied (or at least, I'm hoping players would understand it that way).
Curious to know how much of the battle state you want to save. Is it strictly all the data necessary to load and start playing from that exact moment, or does it include previous moves etc. Almost like a rewind machine?
Happy to be offended.
I like the graphics in your latest gif/video. Are the colors significant? I see you wrote something about the icons but in your example they all seem to be two swords (increased attack?). Either way, looks pretty neat. Would the characters take on a bit of the hue to show they have the effect applied?
Just this! I'm hoping it won't be too bad. It'll be mostly a bag of numbers per character on the scene, and maybe de/buff states.
Yay, thanks for the feedback! Re: the colors, I should have mentioned that the VFX colors are based on two things:
If the damage type is neutral and there's no curse to apply, the ability would look mostly gray.
For curses, yes :D I have to figure out a good VFX for poison/damage-over-time effects.
Yeah the sample just includes one effect for everything (deal damage). A poison effect would be a skull, a defense debuff would be a broken shield, etc. I'm planning to do a clip explaining how the player can apply different effects and that should have more icons on 'em.
Here you go haha, sorry in advance: https://imgur.com/8QXeSRk, but thank you for being interested in watching it!
Now I wish I could slow it down to process everything I am seeing. imgur doesn't seem to allow that so I was pausing and playing.
Is the 2d "map" where you are rolling dice and building rooms like an overworld? Rolling/setting stuff up takes time (days?) and enemies can move and then can attack you?
Yeah... I crammed too much info, and because I was concerned over the length of the video I had to speed everything up to the point that it all became hard to understand. Thanks for taking the time to try and absorb the info in it. I'll try to do better next time and maybe do more bite-sized videos.
Yes! It's the "dungeon" where the player's character lives. The idea was to drive game progression by building and upgrading rooms... I sometimes feel like I might have a much easier time if I did a simple skill tree instead.
Yeah, that's right. Each day you spend doing a thing in the dungeon is one tile worth of movement for all adventuring parties that approach your "boss room".
I started a new wikipedia backup last weekend.
During college I had used kiwix to make myself an offline backup just for funsies, but these days it seems that project might actually be of some use.
I used a backup from jan 2022, I cant decide if I want any of the post gen-ai backups or not.
This is cool, may I ask you some questions? I’ve heard about kiwix, but never actually used it.
You would think Wikipedia is one of the places where its use isn’t as rampart, or am I mistaken?
oh man someone is interested in a thing I did! This never happens.
1.1 When I first did it, as a early 20s adult in the middle of a computer science degree, I think it took me a few weekends to get it sorted out. Most of the time was just spent meddling around with various linux errors, because I was also new to Linux at the time.
This time around, it took me maybe four hours last Saturday. I run linux mint 20ish and I've been using it for a few years now, chat gpt exists, and the distro is just plain better than it used to be.
1.2 This time I found kiwix on the software manager, >2.0 version, and it worked. I got lucky. My second option would have been to download the flatpack from https://kiwix.org/en/applications/
These days, once you get kiwix, you just download the content you want from within the application. It tells you the size and everything. You don't have to bother with going to wiki and getting an official backup unless you want something niche (the reason it took me most of a Saturday instead of 5 mins + download time is because the kiwix download options only have the 2024.1 backup, and I wanted 2022 data because pre-gen ai was important to me)
2. Its about 109 G for the 2024.1 backup, earlier backups are a little less, later backups are a little more. I run several cause the original plan was to try to write some kinda diffcheck to see what articles changed the most over time and... that's still on the todo list.
There's a way you can do a multimedia backup where it only extracts what it needs currently into memory and the rest is zipped but... that sounds complicated, and so fragile, and while it's cool I think I'll just stick to the fully expanded copy.
So the big thing here is memory. You gotta have some beefy RAM I think, fast, and a lot of it. I run 64GB because I analyze data for fun and that's just what I have, I have no idea how well it will perform on less than that.
3. I run it on a 5tb HDD. It's a backup, I'm not attached to it, I don't need it to be fast and I know how to rebuild it if I lose it. Its alone on that hard drive.
This is a very minor thing, but I massively improved the LaTeX "build process" for a (pretty non-technical) friend currently working on their thesis. Now it consists of just running
make
, whereas before, well…That was all it really took to "automate" this process away, plus a new
.gitignore
entry:First of all, for some (probably arcane 80s leftover) reason, using BibTeX seems to require at minimum two compilation passes, and you have to do them manually due to the in-between step.
Secondly, this effort is also made to have the nearly dozen auxiliary files "disappear" as best as possible from cluttering their directory (and the logging messages from cluttering their Terminal window). Today’s computers are fast enough that taking the performance "hit" from not reusing them (I’m assuming this is what they are for, at least partially?) is forgettable.
P.S.: Should anyone be interested in getting started with TeX, I can do nothing but highly recommend the short-ish Modern LaTeX book. It’s really not all that difficult, and if you’ve ever been annoyed by Word and the like, well, you already have a reason to try it out!
I usually compile, spam BibTex a few times, recompile, and repeat until my citations are all correct. I've always wondered why that was.
Recommendation: Task is an excellent alternative to make for thinks like this - full featured and the syntax (yaml) is much more readable for less experienced folks to tweak later.
The auxiliary files are used to store information between runs: things like the citations, table of contents, page references and so on. I'm not sure why BibTeX requires two passes, however I think you may need one more run of latex, i.e.
latex -> bibtex -> latex -> latex
to get everything right. See https://tex.stackexchange.com/a/53236.I don't know if this was considered and rejected due to other constraints, but since you don't mention it, I will bring up a more conventional solution (in the LaTeX circles that is) in
latexmk
, which completely automates all of this (you can even set the temp files to be stored in a directory if you wish). This is also what Overleaf uses (although heavily customised via the configuration file).I could have sworn that that was the book I originally used to learn LaTeX but the copyright date suggests otherwise. I think it must have come out some time around when I had completely forgotten the last macro.
In spite of my non-use, I still think there isn’t anything better than LaTeX and it’s annoying to me that it’s not omnipresent in computing fields. After all, TeX is a gift from our lord and savior Don Kneuth. But that is a name I do not think is known much in this era. And besides that I don’t think people are likely to actually print their documentation and whatnot anymore either, and PDF is not ideal for screen reading on one quarter of a cluttered desktop.
Yeah, Knuth’s work today feels, hm, under-appreciated? (though to be fair, I’ve been meaning to start reading TAOCP forever now myself and not gotten around to it)
Or a mobile phone screen…
I did start reading The Art of Computer Programming. And while I appreciate what he was trying to accomplish with it, it’s understandably left in the past. He takes a purely mathematical approach to understanding programming and while I do like it to a point you basically need to get a college degree before you start reading. If you didn’t get a 100% in algebra before starting to read the first book you will be hopelessly lost.
Still working on Gametje. Previously posted Show Tildes. It is a bit like a jackbox games. I had taken a break creating new games for a while to focus on the main page branding and basic UX experience but now I have started tinkering with a couple ideas in the new year.
One is a more child friendly game (to play with my kids) involving sort of a digital hide-and-seek + memory game. One player is the seeker, and all other players are trying to hide. The hiders will have objects they can hide behind and move between. The seeker must watch each player's avatar carefully and try to remember where they are hiding. The hiders are free to move about before the timer runs out. After the hiding is done, the seeker is asked to tell where each specific player is hiding. If they are right, they score points, if they are wrong, the hider scores points. Each person gets a chance at being the seeker (where the most potential points are scored). So far, I have only the frontend stuff somewhat working using some "borrowed" assets. If they weren't borrowed I'd share s screenshot/gif. I still need to design a few maps and assets to hide behind etc. Then I need to design the backend db and APIs.
Also working on another game. It is a bit farther along and is a different take on the mind meld game concept. In my version, 2-10 people can play. First, two random words are chosen (from player submissions). Each player is given the same 2 words and tries to come up with a new word/phrase that associates/relates to both words. Then everyone's submissions are checked to see if anyone matched. Players that match with each other (sometimes more than 2 at a time) score points and are done for the round. Players that did not match will continue. When at least 2 people haven't matched, two new words are selected from the previous guesses and used for the next "level". If everyone has matched or 1 person is left unmatched then the round ends. A new round starts with random submissions from all players.
Scoring is based on matching with at least 1 other player and doing it quickly. The longer it takes you to match, the less points you score. It's roughly:
Base round score / (Math.max(1, (level - 1) * 2))
= net score.e.g. Base round score: 1000
Level 1 match: 1000
Level 2 match 500
Level 3 match 250
Level 4 match 125
The backend is nearly completely done (API/cache/db etc), still working on the frontend. Should be playable by alpha testers in the next couple weeks if I find time. (To become an alpha tester, you need to signup and enable it in your profile).
Overall happy with my progress.
The hide and seek game sounds interesting! Mind meld definitely sounds promising as a party game as well. You could try to find some CC0 assets so you won't have to worry about sharing GIFs.
It's not that recent but I haven't posted it before. A while ago, I made https://whendnd.com/ for helping my D&D group schedule times. The pitch is that it's good at scheduling for a group with very low friction. There's no login required and it's totally anonymous. For an example game, see https://whendnd.com/g/tildes
I did this project partly to learn about SolidJS, which I've found that I like quite a bit. I still have gripes with it, but less so than Svelte 5 and SvelteKit (I used to use Svelte wherever I could). Recently, though, I turned the whole thing into an Astro site, and was impressed! Astro lets you add in components with SSR support, which is very handy, and the site got a lot faster with Astro than as only a SolidJS SPA. I'm leaning towards using Astro+Solid in other projects - we'll see how it goes...
From the home page:
This made my laugh out loud. Seems useful and loads really quick.
I think I found a minor bug, if you click 'show another week' and then mark your availability on one of those days, then refresh the page. At first glance, that data is lost. If you then mark availability anywhere else, it loads that data in. Perhaps, it needs to trigger a re-render if there is data in the extra weeks. Also if someone has marked availability in a week after the current one (which doesn't display by default), I'd expect that to be open so everyone else can see that data.
Edit: video of the bug: https://imgur.com/4Vkt5Ak
Good catch! Now player count is loaded for future weeks as well, and loads data for a week when you show it.
A week or two ago I had said jokingly that the hardest part of my game engine was done, and naturally things have immediately gotten more difficult and I have made almost no visible progress.
So when I started the project, I had picked up three libraries that I thought I would need. The first one is called classic, which was supposed to be a simplistic implementation of classes and objects in Lua, which intentionally doesn’t have it. But in my struggles to understand the essentials of game logic and as I started to understand some of the less obvious Lua-isms, I actually ended up more or less recreating objects from first principles, so I haven’t really used it.
Actually the first one I decided to use was a löve specific Tiled map library. And while I don’t think I could have gotten this far without it, the library ended up having a critical bug in it that prevented referencing tile properties on “infinite” maps due to their chunked data structure. I submitted an issue and said that maybe the library should flatten it to the same format as fixed maps during loading to simplify the library, and a day later the author said he’d like to see my PR. A few hours later I did - a rather simple patch that only took about 10 to 20 lines that will probably be rejected because I was lazy and didn’t remove the rest of the chunk-related code that I had obsoleted.
Honestly the real reason I am upset about this was because it lead to me realizing that the codebase I had been doing these tests on had both an off-by-one error and in one place I had actually confused X and Y coordinates, and that took three times as long to fix.
The third library is for pathfinding. And now that I’m approaching the point of implementing it I am realizing that since I only need to traverse small areas the much bigger problem is figuring out the AI to determine where to actually move to and because of the somewhat weird data structures I have been working with it might be easier to write my own pathfinding algorithm.
My writing about this probably sounds like I’m bitching about it. I can’t help but see it like an outsider and look at the visuals and be disappointed. But the reality of it is that the more I look at my code the more I see the ugliness of it, and I think that’s fantastic. Yes, it’s a bummer because that means I’m almost certainly going to refactor it. But every single bit of ugliness that I see is proof of a lesson learned. When I started I was rather desperately looking for resources to learn the patterns necessary for game development. Now I am that resource. And I have come to realize that this is the first programming project I have really felt any pride in in years.
Unfortunately DuckDB fts doesn't have a trigram tokenizer which is useful for some of my programs. But this isn't a complete blocker so I'm still evaluating it.
I made a script to make searching fts. It even can create an fts index for you:
DuckDB has a lot of friendly syntax, and I must say a very beautiful
EXPLAIN ANALYZE
, but there are still quite a few rough edges.For example:
I get this error until I add all the referenced columns to the GROUP BY:
If I change the last line to:
I get results... but this is not the same thing. I want to get the most recent playhead value, but I guess that's not possible without making it a separate CTE or subquery:
I've also had quite a bit of trouble converting existing DBs to duckdb because some of my file paths are not UTF-8 so I end up with invalid duckdb files and partial parquet: https://github.com/duckdb/duckdb/discussions/16049
The Minecraft mod I've been working on over the past few weeks is released!
Someone from the Fabric modding server took the time to test it and found a couple of things I'd missed, so I'm working on a little patch release to follow. After that I want to backport it to 1.21.1 at which point it'll basically be complete. I do want to maintain it for at least a year or to, so here' hoping Mojang doesn't do any gigantic rewrites in between now and then.
I'm also here too! Good work on the mod :)
Oh awesome! Thanks again for your help. I honestly had no idea where to start with the block particles, so you saved me a lot of
trial anderror.This is cute!
Back in December I got a Banana Pi BPI-F3, a neat little RISC-V board, to mess around with. I haven't had too much time so I'd just been running Luca Barbato's Gentoo image for it off an SD card but I've spent a couple of days trying to get it set up with my own Gentoo install on the eMMC. I've been struggling reading through lots of (bad) pages of documentation trying to understand opensbi and u-boot to get it to actually boot, but it's been interesting so far.
I've been having trouble with a lot of email marketing platforms, so I have just been implementing my own workflow for launching a landing page, storing email subscriptions, and sending out emails.
So I finally have the screen and rotary encoder for my DIY MP3 player that can run Spotify. However, it is my first time using a GPIO display (or even just GPIO pins at all) and am realizing that the display I got was cheap because documentation is quite sparse. After doing the install process, it is not displaying and documentation is slim for me to try and troubleshoot it. I am able to turn the backlight on/off so I do have some progress, but not much. Hopefully after figuring out the display I can start moving into the final stages of this project.
Edit: I feel like the best approach to figuring this out is to switch back from a CLI only version of RaspberryOS to one with a DE, and use that to help figure out display issues before going back to RaspberryOS Lite for the final product.
Edit 2:
Upon further reading, it seems like switching to the I2C may be a good path to go down, as it will use less of my GPIO pins, freeing them up for the clickwheel. The I2C pins are labelled well on the board, except the VCC does not specify whether it wants the 3.3 or 5V, and there is a fifth pin, labelled "int" which is probably an interrupt signal which is non-standard for I2C apparently.I read into I2C a bit more, seems like it is not what I would want. I think best approach is to return it since I ordered via Amazon due to poor documentation.