17
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’m slowly but surely continuing work on my “cozy web” community site, plots.club. I bought the domain name last year to be safe, and have been sitting on it doing nothing since then, but since I’m actually using its name out loud now, I felt obligated to spend a little time this week actually putting something out there so anyone curious enough to visit the site didn’t just receive a bad host response. Toying around with a new DNS provider is always a little harrowing (I chose not to use the ones I’m familiar with from my job), but it’s been a fun learning experience, and I’m happy to have a static “preview page” set up there. I also added some finagling so users can visit plots.club with or without the "www" and it’ll redirect them to the full HTTPS / www URL either way. Funny enough, I didn’t even realize that wasn’t an out-of-the-box thing with URLs. Lots to learn here!
I also took the opportunity to use the domain for some email alias routing, which means that now I have my own @ plots.club email address, and I don’t have to put my personal address out there for the world to see.
This is all terribly old news for anyone who has self-hosted a site before (and I imagine there are a lot of you on Tildes, especially if you're reading this thread), but for me it's been a fun foray into something I haven't spent much time with.
I'm just now starting to dig into overriding some of Django's user authentication patterns with my own custom authentication via htmx implementation, but that's going to have to wait until next week to discuss more, since I have lots to learn there yet.
As a person that also does hobby web dev with Django and htmx, good luck to you. I see that you're planning to let people generate their own sites and content. What are your plans for moderation? That's always something that have kept me from creating a service where people can post whatever they want.
Edit: Also wanted to say I really like the idea.
Hey, thank you for checking it out! Would love to see anything you’ve worked on with that stack if you’re willing to share.
Those are some great questions about moderation. As of now, user plots are strictly relegated to a single textarea that’s saved off as a big CharField in the model. So, assuming that the site won’t explode, my hope is that it will be easy enough to query all extent plots by their content model and do some quick text analyses to see if there is any questionable / harmful language. Of course, it’s entirely possible to write hateful or hurtful things without using explicitly bad language, and so I also hope that I can implement some sort of report functionality so the users can help me moderate on a case-by-case basis too.
This week, I've been working on loadouts for my game. I wanted players to have 3 loadouts/kits they can bring with them to a fight, and then be able to swap between them during battle.
Here's what it looks like:
It was a little intimidating putting this together, since I had to scoop out some of my project's guts to get multiple loadouts working. I wanted to do this before working on save files or any other thing that would need refactoring if I did this later.
I also changed the placeholder environment tiles to from "dirt" to "grass" - I have this suspicion that the dirt background wasn't very easy on the eyes.
If y'all watched the clips above and have time to respond:
I'm not much of a gamer, but it looks okay to me. I think the animations of the attack effects looks good.
Is the third loadout a pigeon? How about S.A.P. (Slime Antelope Pigeon)?
Thanks! That's reassuring.
It's supposed to be a swan hehe, but as long as people think its some kind of bird I think it'll be okay.
That's an interesting suggestion. The player is supposed to be able to swap out what kinda creatures they can transform into, so maybe I should lean more into the transformation bit as an inspiration for a title 🤔
I think the change to the grass looks great. The text on attack seems fine although might be too much on every attack. Maybe you could have the text appear when a critical hit happens or something? Then it's a bit more "special". As far as the name, I'm not sure it's that important now. You could give it a placeholder but it's hard not to get attached to one once you start using it.
Do you already have some kind of plotline? Will it flow battle to battle or will there be an over world or cut scenes?
Overall, looking great.
Woot, that's good to hear.
Got it! The text was added on post... mostly to draw attention on Bluesky. Maybe I shouldn't include it for posts here. I have been thinking of making the enemies do a little quip sometimes whenever they attack the player, but now I'm wondering if I should do that for the player's character as well
like this!
I do have a working title (for the repo name, project name), but I'm not sure if it's what I should go with so I don't use it. I'm not sure if it's okay to use either heh.
Not really! I have some ideas but haven't written anything down. I'm thinking of having dialogues in both in and out of combat.
Now that my day job has started picking up steam, I'm having a hard time working on my game project. Though in a twist of ironic fate, I am now learning Unity to teach an introductory class in it.
I'm continuing my next Minecraft mod that I started in last week's thread (effectively being able to put multiple small flowers into the same block space). So much of the game is driven by JSON files, but there's also a lot that is based on static references which is completely different from the code I'm used to writing.
As I was implementing the first flower type I realised how the multipart model system worked, which meant I wouldn't get a combinatorial explosion of blockstate definitions of I tried to allow mixing of flower types. So that's what I've done, skipped over the slightly easier version to go straight for what I wanted in the first place. Was it a good idea? By now I think the answer is yes.
The combinatorial explosion problem that is no more
Minecraft has two ways of storing data about blocks: block states and block entities. Block states are good for simple information like which direction a block is facing, while block entities are how you store complex information like inventories. In my case, I wanted to use block states because it's just the right tool for the job.
In particular, my block state has 5 properties defined: an enum for the direction the block is facing, and 4 properties of another enum that defines which flower type is in that position. This flower variant enum (currently) has 17 values (plus an empty value), one for each small flower and one for the existing pink petals block.
The thing about block states is that you need to define them up-front at compile time. It first I was worried that I would have to define each possible combination, so that's 4×(17+17²+17³+17⁴) (edit: fixed maths) which is... too many. If I instead made 17 different block types (one for each flower, then just had an integer property from 1-4 for how many of those are present) then there's only be 4 (directions) × 17 (types of block) × 4 (number of flowers in block) block states in total, which is totally fine. This is how the Pink Petals already work.
It wasn't until I'd been staring at the Pink Petals' block states definition that I saw how the system actually worked. The multipart definitions meant I only needed to check each property for each value once, e.g. if the 3rd flower is a dandelion then include this model when rendering. Of course that then needs to be done for each facing direction, which brings us back to 4 (directions) × 4 (positions) × 17 (variants). That's the same number as above, but I can mix flower types again.
Fabric (the modloader I'm using) has a way of generating these definition files, so I don't have to write it by hand (and possibly include mistakes).
I'm currently dealing with issues when trying to mix my flowers with the base game's Pink Petals. I'm halfway through solving that; I can add pink petals to my new block but the inverse is proving to be trickier. It involves using the mixin system, which I have enough exposure with to not be scared, but perhaps with more time I'll go back to being scared of it.
I'm definitely putting off the hard part (modelling/texturing), so I'd better get on to that before I do all the fun stuff and get left with all the bits I've avoided at the end.
This week I set up my r730xd with immich and it's been busy churning ~50 million images. Had to bump up the nodejs RAM limit but other than that it seems to keep chugging along.
Early in the week I wrote a script to download metadata from the Getty Museum. They have quite a few public domain images:
Only takes a day or so to download everything so I've added those as well to my collection...
Yesterday, I wrote a pretty handy script that helps to automate finding files on remote servers and moving them to the local host. It's a pretty bare-bones script (
plocate
is doing all the dirty work). I'll likely need to add an --exclude flag or fzf-like file/folder selection to filter out unwanted files (or maybe I'll just re-use this readline code: 1, 2 -- I wonder if that works on Windows if people installpyreadline3
)Another very primitive toy that I put together is a little
tail
command for SQLite: bin/sqlite_tail.py. Fun! But not super usefulHeck yeah, home servers. How/where did you acquire the R730xd, and what else are you using it for?
Also, how did you get 50 million images? Are they from certain datasets or something? I'm having a hard time believing they're just something like photos straight from your cellphone or something.
I've been downloading a lot of public domain imagery over the past ten years. I forgot why I started originally--but that's only about 20% of my collection. Another 10% or so are Creative Commons, or unknown status collections that I've downloaded over the years from curated collections (usually small websites but also flickr, DeviantArt, and similar platforms). The rest is mostly downloaded from various subreddits (just for example: wtfstockphotos, thomastheplankengine, printmaking, papertowns, thegrittypast). Some SFW, some not. I take around 15,000 photos per year--so not a whole lot compared to my broadcatching activities.
eBay. LabGopher definitely helped a bit, though I don't remember if I found the specific listing from there. Looking at the iDRAC history it looks like this one used to be a Hadoop cluster for Sears Holdings--kinda neat... It's nice to have 384 GB of ECC RAM but also it is pretty loud! So definitely know what you are signing up for beforehand. It's nice to have a closet or basement to hide the noise away. I got it because it was a really good deal and I wanted to play around with BMC/DRAC...
My digital audio player project has stalled pretty heavily this week. I have been trying to source a e-Ink display around 5" that is a touch screen. It seems like I can only find displays that meet any two of those three requirements. So the past few days I have been trying to decide how to approach this issue, and since a touch e-Ink display was one of the few self-imposed requirements for the project, I am trying to articulate what exactly my goals for this project is. Without it being an e-Ink display, there is not much that separates it from consumer available digital audio players. This has been an interesting challenge, as it is my first time really playing around with tech hardware so it is all uncharted territory for me.
Detailed thoughts on why I initially wanted e-Ink
Thought I would share more of my thoughts on why I am doing this project and why I wanted e-Ink. This project of making a dedicate audio player is part of the now 1.5 year process of gradually moving towards separate physical devices instead of the do-it-all smartphone. Audio has been kind of the last thing I need to migrate off of my phone, an then all that it will need to be used for is texting and calling. Most digital audio players are android devices without phone capabilities and higher end audio components. I don't want my audio player to just be another smartphone. Therefore, having it be an e-Ink display kind of branches it into a separate device. With it being e-Ink, it would not be a good YouTube player and web browsing/social media would be limited (although Tildes would still work well which I am fine with). So now I am just navigating this issue on how best to approach it, as just slapping an LCD on it makes it be just like most other digital audio players in that it works similarly to a smartphoneI like e-Ink and alternative display technologies too. What places have you looked for sourcing the displays?
I have been looking as many places as possible. I have tried Waveshare (
which appears to be down as of time of writingit is working now), BuyDisplay, DigiKey, as well as Amazon, AliExpress, an Google Shopping. It seems like all those places have the exact same models to choose from (except DigiKey with even less options), with the biggest touchscreen e-Ink offered around 3".So after some more research, I am considering trying to implement an iPod clickwheel for the interface instead of a touchscreen. I need to do some more research, but I am thinking that running a clickwheel and a small non-touch e-Ink display would make for a great possible solution. This weekend I need to do some preliminary research to figure out if the clickwheel would work, and if it is looking possible I may just order it and then start getting some hands on experience
Some friends of mine who also built a (much smaller) dedicated music player did a writeup on their touchwheel design, which may be of interest to you.
They also have design files available for this wheel button thing.
That write up was really interesting, and their project sounds really cool. I think a click wheel based design might make the most sense, so I will keep those resources on hand as I research more on the feasibility of implementing it for my project.
My wife and I have a lot of cookbooks which is great but creates the problem where you have certain ingredients in the fridge and have to dig through a bunch of books to find recipes that match your ingredients.
It is pretty quick to flick through a book and take photos of the recipes with your phone. I'm then building a tool that runs the photos of the recipes through Gemini, which OCRs the text and turns it into a structured format. The plan is then to turn this into an index where you can find recipes by searching for one or more ingredients, and it will tell you the book and page number to go to.
I generally have a pretty dim view of AI stuff but this feels like a good use-case to me.
Initially I was just going to use photos of the index, rather than of individual recipe but I figured indexing the full recipes could allow for some interesting features down the line like vector search across the index for things like a "a light and easy soup with carrots in it that takes 30 mins to cook".
I also like that this still allows for using the recipe books, I much prefer to cook from a book than a screen, and our books are filled with notes in pencil about recipe alterations and often a note of what event the dish was cooked for.
This sounds really cool! I’m a big fan of the app Paprika, but my biggest gripe is the lack of a way to (quickly and efficiently) input data from my cookbooks. Would love to keep hearing updates on this as you learn more.
Is this your first time messing around with Gemini / AI-adjacent stuff in this way?
I'm generally pretty slow chipping away at this sort of thing but I'll try and post updates on here as I go :)
I've mostly avoided AI stuff as I hate the way it takes away creativity, but the new capabilities of programmatic interfaces and the ability to define response schemas makes it undeniably handy for this sort of data collection and transformation that would otherwise involve some very tedious manual steps.
I wouldn't be surprised if an app like paprika added this as a feature soon.
If you want to avoid AI (or at least generative AI) take a look at Google cloud OCR (I forget the exact name) and AWS textract. They allow you to give the expected layout of the text, and then return the OCR text in a structured way. For example you tell it where the ingredients list and steps are, and it outputs the ingredients separate from the steps. I have run a few thousand images through the Google cloud version for a dollar or two, so pricing should not be an issue.
I feel like we’re in pretty similar boats from an AI perspective, but I think the use case you’ve found here makes good sense. Am I reading your initial post correctly that the image-capturing is all done, and you’re onto the filing / retrieval system at this point? That’s exciting!
Ah nah, I've only taken enough photos to test it out as a proof of concept. Once I've got a pipeline working I'll go back and photograph all the books. Though something that's still unknown is how much it'll all cost, Gemini's pricing is a bit hard to understand. Won't be worth doing if it costs more than a couple of bucks per cook-book.
We use RecipeSage, and have been happy with their import methods. We can take a picture of a page and it’ll automatically import the ingredients and steps separately, usually without mistakes. It also can import from many websites.
To the ops point about continuing to use books, we note in the app which book and page it comes out of.
I haven’t used paprika, so I can’t really talk about feature differences.
Nice; I had managed to miss RecipeSage as I researched apps like this. If it’s free I’ll definitely have to give it a try and see how it compares with Paprika from a UX standpoint. It’d be worth it if it came even close with the added image capturing capability. Thanks for sharing!
Mentioning “Mela” as an alternative (it’s what I currently use). https://mela.recipes/
I mainly use it to grab recipes off the web, not from photos (but I believe it can do so). My main use case is frankly using it to auto populate my grocery list (in the iOS reminders app) from a given recipe (with the ability to easily not include ingredients I already have).
I think it can import from Paprika but not 100% sure. I also can’t remember if it has a free version or what features are locked out of the free version off the top of my head.
I've been exploring the idea of debug UIs -- custom interactive graphics that are not intended to be seen by others, that don't have to be high quality, that are easy to create and help you think about what's going on inside your program. Here's a 4-minute video talk with a nice transcript.
I also built a simple single-file html page that you can paste some text into that you want to read, annotate as you read, then save as a local html file for yourself. No server required.