9 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?

16 comments

  1. CrypticCuriosity629
    (edited )
    Link
    So there's a guy downstairs who's patio is beneath my bedroom window, and he keeps smoking on his patio which is strictly prohibited by the complex. He's got the sense to smoke on his patio and...

    So there's a guy downstairs who's patio is beneath my bedroom window, and he keeps smoking on his patio which is strictly prohibited by the complex.

    He's got the sense to smoke on his patio and close his sliding glass door behind him so his own apartment doesn't smell like cigarettes, but I guess fuck all of us neighbors who want to keep our windows open to let in the nice PNW summer breeze, because all his smoke goes straight into our apartments.

    Apartment management has sent him letters, threatened eviction, but turned out to be all bark and no bite because when he didn't stop, they never followed through with eviction. Just more letters he ignores.

    This year I took things into my own hands.

    I had a hidden camera looking out my window at the creek but to get evidence of his smoking that I'd send to the apartment management, so I repurposed the camera and hooked it up to an AI vision model trained on a few years of footage of him smoking so it would identify between when he is smoking or just hanging out.

    I hooked THAT up to a self hosted ComfyUI audio/voice cloning generation workflow on my home server and an uncensored Ollama instance to generate a personalized and nonstop stream of curse word filled and slightly humorous ridicule and beratement for smoking on his patio and how disrespectful it is to everyone around him and will stop when he stops smoking, ALL in the voice of either(randomly selected each time) Samuel L. Jackson, Morgan Freeman, Barack Obama, Denzel Washington, Michael B. Jordan, or Jamie Foxx. All of this plays through a solar powered bluetooth speaker I had lying around that I propped up on the roof ledge above my window.

    Basically for as long as he's smoking on his patio he will know no peace and will be relentlessly berated by the disembodied voices of famous black people. The moment he puts out his cigarette it stops.

    He can't complain to management because he's the one breaking the rules. He doesn't know where the voices come from so he doesn't know how or why it's happening, it happens 24/7 rain or shine, they're famous black actor voices so he looks like an idiot if he tries to argue with them and the voices give him no clue who's doing it.

    After years of dealing with his smoking crap, he's finally seemed to stopped and all the neighbors think it's hilarious. A few neighbors have seen him actually go to the designated smoking spots. I actually used to have it set up to only during the day, but when most of my neighbors said nah, they'd rather get woken up to the hilarious curse filled monologues on the disrespect of smoking on the patio, so I made it 24/7.

    Anyone know how a place to upload audio? I'll upload one of the monologues.

    7 votes
  2. [3]
    Macha
    (edited )
    Link
    I’m working on a farm sim/cozy game I started about two weeks ago. My attention span with these projects is often quite short but I’m actually feeling pretty good about this one. I’m using Godot,...

    I’m working on a farm sim/cozy game I started about two weeks ago. My attention span with these projects is often quite short but I’m actually feeling pretty good about this one.

    I’m using Godot, which I’ve used for several Ludum Dare jams before this point. Up to now I’ve got a basic game loop working. You can buy seeds, plant crops, water them, harvest them and sell them, then repeat.

    I think the core idea I have is it’s going to be a little like a more zoomed out big picture farming sim or a very zoomed in colony builder depending on how you look at it. You’ll use your progress in the farming/mining/fishing/etc. part of the game to build up the town and attract NPCs from a pool, while unlocking new features. This does mean the non-fixed NPCs are probably not going to be as individually deep as Stardew/Mistria NPCs but I’m aiming for deeper than Animal Crossing/Graveyard Keeper.

    The art style is pixel art based but I’m going slightly more detailed than stardew (48px npcs, 24px tiles). Kind of more in line with Graveyard Keeper’s level of detail. There is a little impulse going “But what if it’s isometric” because I have a vision of a really cool looking town with lots of verticality but I’m also aware that’ll make the art more time consuming and also make the controls annoying if you need to do stuff tile aligned like placing crops. I may end up doing a POC of that before I get into bulk assets though…

    This week I’ve spent time getting the core loop going but also set it up so I can load item/crop/shop definitions from TOML files in a kind of Minecraft resource pack style to facilitate addons/mods. Kind of a little ahead of a sensible time but it’s one of those things that easier to bake in than retrofit in.

    Also independent world and UI scaling which was kind of an ordeal. Spent a bunch of time on that but happy where it is now.

    Anyway, my short term task list is:

    • getting a basic NPC dialogue system in (probably going to use the Dialogue Manager addon for this)
    • getting zone transitions working so I can have buildings
    • getting a first iteration of the town zone set up, currently the single vendor stands next to your bed and 5 tiles away from your crop patch
    • getting a first draft of the NPC move in system going

    My day job is also software development and it’s so much less engaging in these days of AI, so its feeling pretty good to have the coding bug again

    5 votes
    1. [2]
      ShroudedScribe
      Link Parent
      I love these types of games, so keep us posted! While you're currently in the early part of the dev process, maybe consider if you want to incorporate multiplayer co-op one day? Thinking about...

      I love these types of games, so keep us posted!

      While you're currently in the early part of the dev process, maybe consider if you want to incorporate multiplayer co-op one day? Thinking about that from the start might help with future headaches.

      Or if you're designing a purely single player experience that's completely fine too! I'm just being selfish and looking for more of these games to play with my partner. :)

      2 votes
      1. Macha
        Link Parent
        Multiplayer is something I would like. I play a lot of these games with my brother personally. I've had a brief look at Godot's high level multiplayer and it's a bit too automagical for me to...

        Multiplayer is something I would like. I play a lot of these games with my brother personally. I've had a brief look at Godot's high level multiplayer and it's a bit too automagical for me to trust it but also I don't want to dive into deciding a lockstep vs server authoritative model and building a lot of networking code until I get a core loop that's fun by itself.

        1 vote
  3. [4]
    ShroudedScribe
    Link
    Ended up buying a 3D printer! The ~comp related use case I'm currently working on is printing parts for my server rack. I got a spool of ABS filament to handle the heat better than PLA - a...

    Ended up buying a 3D printer! The ~comp related use case I'm currently working on is printing parts for my server rack. I got a spool of ABS filament to handle the heat better than PLA - a previous print I had the library make for me started to sag/bend pretty quickly, and they only do PLA, so that was part of my motivation to buy a printer.

    It's been fun to learn how to use the slicer, develop an understanding of different materials and temps required, etc. Even with a modern printer, there's certainly some trial and error, to the point I'm still too afraid to print things overnight as I want to monitor the webcam at all times.

    4 votes
    1. [3]
      0x29A
      Link Parent
      Hell yeah, nice! Server rack parts is a great idea (I've also seen some cool completely-printed entire mini racks which are neat). I love 3D printing so much. Definitely a fun learning experience,...

      Hell yeah, nice! Server rack parts is a great idea (I've also seen some cool completely-printed entire mini racks which are neat). I love 3D printing so much. Definitely a fun learning experience, and I'm still fairly beginner level. Starting to learn CAD has been great too and yeah I've realized if I ever wanted to print something for outside or for my car or GPU or something, PLA won't be the right thing because enough proximity to heat for long enough and it's gonna be a problem.

      I don't know how easily I can print ABS with my setup, might be fine, I do think ABS is quite a bit more toxic while printing IIRC though which might not work for my particular situation. I am fascinated by how many different filaments and material types there are now- there are some really wacky ones out there. I watch Zack Freedman's videos and sources some of the most rare and strange ones and does videos on big batches of them and comments on each one, it's really interesting.

      ...this reminds me I need to make a list of links to all my favorite resources for 3D printing (videos/channels, CAD tutorials, etc) so i can easily share it or put it on my site

      It's been a super fun process overall to find and print others' functional designs and also design my own and upgrade/fix tons of stuff I need (adapters, attachments, clips, etc) among the occasional rare decorative print.

      Longest prints I've done are about eight hours and I definitely checked in on those periodically because they were so long, and one of them was PETG which is fussy to print for me, but it came out generally fine. I've definitely had some failed prints too, though.

      I've also done some inexpensive or basically free upgrades to my printer to make it better (both 3D printed mods and buying a replacement nozzle and build plate) and that's been fun too

      1 vote
      1. [2]
        ShroudedScribe
        Link Parent
        I've read to not bother unless you have an enclosure, though some have been successful with an open setup as long as they can keep temps stable and make sure there are no drafts, etc. For the...

        I don't know how easily I can print ABS with my setup, might be fine, I do think ABS is quite a bit more toxic while printing IIRC though which might not work for my particular situation.

        I've read to not bother unless you have an enclosure, though some have been successful with an open setup as long as they can keep temps stable and make sure there are no drafts, etc.

        For the safety of ABS, the enclosed printer has a carbon filter, and I'm running an air purifier in the room. We also are not in the room while it's printing ABS. From what I've read, this should be sufficient.

        1 vote
        1. 0x29A
          Link Parent
          Yeah, i have an open air printer though i know there are aftermarket enclosures. For now i think that's going deeper into things than I want to at the moment. I will probably stick to the safer...

          Yeah, i have an open air printer though i know there are aftermarket enclosures. For now i think that's going deeper into things than I want to at the moment. I will probably stick to the safer stuff for now. I do have a HEPA purifier with a carbon filter but it's not such a dire need I have to print stuff for hot temp environments anyway.

          It is a bit unfortunate that if i want to replace some small part in my car that might not be feasible. Maybe it's fine if it's in the trunk or glove box or somewhere not in direct sun but who knows. Either way it's inexpensive enough to try and test if it comes to that. That and I will make sure to print anything for those uses in white because that itself should make somewhat of a difference since it will absorb less

  4. moocow1452
    Link
    I am literally herding cats. I'm watching my brother's cat, and trying to do introductions to my own cat without them getting each other's goat. Mostly our living space is divided into two...

    I am literally herding cats.

    I'm watching my brother's cat, and trying to do introductions to my own cat without them getting each other's goat. Mostly our living space is divided into two sections, but both cats like to wander on the patio that's not connected to our AC. We were exploring everything from a physical vacant - in use sign to microchipped collars to determine if there was a cat on the porch, since group chat wasn't working that well.

    What we eventually decided on is a Home Assistant routine with smart plugs, connected to two different strings of Christmas lights on the back of the wall. One for one cat, one for another, so that anyone can do a voice trigger that a cat is on or off the porch and their light will turn on or off. Easy shopping list and a lot of what we already have as opposed to over complicating it or introducing systems that people would have to learn.

    2 votes
  5. json
    Link
    Doing moron* my self hosted personal finance web app. It's nz specific since it uses Akahu as the data source provider. I just added screenshots to the readme today, using some arbitrary personal...

    Doing moron* my self hosted personal finance web app. It's nz specific since it uses Akahu as the data source provider.

    I just added screenshots to the readme today, using some arbitrary personal finance dataset I found because I don't really want to share screenshots of my own financials.

    https://github.com/jason-s13r/money-next

    *Claude is doing more on it.

    1 vote
  6. 1338
    Link
    I've circled back on my older project recently, the map tile proxy/cache/gateway service. I hadn't worked much on it the past year, sort of let it in a weird pre-1.0 purgatory. But decided to take...

    I've circled back on my older project recently, the map tile proxy/cache/gateway service. I hadn't worked much on it the past year, sort of let it in a weird pre-1.0 purgatory. But decided to take a break from Brack to circle back on it. I've primarily been doing hardening/testing/productionizing things like upgrading dependencies, adding a helm chart, an e2e test harness (that runs against the binary itself), and making sure it shuts down gracefully. Also been adding in some functionality I hadn't gotten around to like some usage analytics (so you can have a Clickhouse table that shows Bob used 500 map tiles last month) and JWKS. Been nice to pick things up again, it's shocking how much Go context slipped out of my brain since 2024.

    I've also been iterating on my Book Tracker app. Hit some weird hiccup with the initial cold-start time (since it stores personal DBs on Object Storage and has to retrieve them when there's activity) causing some time outs. I decided to put in a proper loading screen and an async API vs having requests hang, but it doesn't seem to want to work right in prod (works perfect locally of course). Been mostly hitting my head on that, then the weird slowness disappeared so I'm still not totally sure what's going up. I added in instrumentation of the backend with NewRelic's free tier but haven't found a smoking gun yet. A bit frustrating. Only feature I've worked on the past couple weeks is adding the ability to generate an automatic description/alt-text for shareable chart images (so I can share my month's recap without needing to do a bunch of typing).

    1 vote
  7. [4]
    text_garden
    Link
    I've previously made an extensible Forth-like language with very few built-in primitives to facilitate calls, branching, returns and jumps, as well as corresponding syntax in the compiler for...

    I've previously made an extensible Forth-like language with very few built-in primitives to facilitate calls, branching, returns and jumps, as well as corresponding syntax in the compiler for looping, if statements and subroutine definitions, using Zig. At compile-time, a caller-defined set of primitives defined as functions can be injected which then get inlined into both the virtual machine and the compiler so that the functions appear as callable words in the interpreter. The first application of this was a WebAssembly module that could produce an array of lines via source code passed to it, used in a web application that presented a canvas where those lines were drawn and an interactive interpreter where you could define how, procedurally.

    I've also previously made a multithreaded mandelbrot fractal renderer. A thread pool is created and an array representing the output bitmap as an array of jobs, which the workers can allocate chunks from. Any contention over the bitmap is limited to a single atomic read-and-add operation after which they have exclusive access to the chunk.

    Last week, I combined these two projects into a multi-threaded interpreter of a significant subset of the Forth Haiku Salon Forth dialect. The workers again pull chunks of the output bitmap as jobs, and they each run an instance of the VM for the language and receive an instruction array at startup, so that compilation only happens once.

    The Forth Haiku Salon is presumably implemented using fragment shaders in WebGL which is an obvious choice for this kind problem where the value of an individual pixel is effectively a pure function of time and its location in the bitmap, but I have previously made a single threaded interpreter for the same language in C.

    The results were very good in my view, but I haven't benchmarked and compared it to my first interpreter yet. Implementation this time, not including the extensible language base and job queue stuff which I'd already implemented for other projects, took a couple of hours instead of a couple of days.

    One quality of my old interpreter that is different in the new one is that it doesn't have subroutines. The definitions are instead expanded in-place as macros. I wonder if this is good or detrimental for performance. Intuitively, jumps causing random access to the instruction array is slow, but maybe the programs also usually fit neatly into the cache, and have a better chance of doing so without expansion. There are too many other factors to test this in benchmarking.

    1. [3]
      text_garden
      Link Parent
      As a sidenote, Forth Haiku Salon is really cool. The primitives are quite simple, but with the right factoring you can produce intricate effects with very little code. I've made a bunch of stuff...

      As a sidenote, Forth Haiku Salon is really cool. The primitives are quite simple, but with the right factoring you can produce intricate effects with very little code. I've made a bunch of stuff with it over the years:

      As you can see my programs are also mostly "write-only" with this approach to naming things and factoring :)

      1 vote
      1. [2]
        marcus-aurelius
        Link Parent
        These look really amazing, which readding material would your recommend for someone who would like to get into tihs sort of programming?

        These look really amazing, which readding material would your recommend for someone who would like to get into tihs sort of programming?

        1 vote
        1. text_garden
          Link Parent
          Thanks! It's a difficult question because most of it has sunk in at a slow pace over a long time for me and I don't have a very focused learning approach, but a couple of books I've read that...

          Thanks! It's a difficult question because most of it has sunk in at a slow pace over a long time for me and I don't have a very focused learning approach, but a couple of books I've read that touch on this are Processing by Ira Greenberg (ISBN 978-1590596173), which contains some interesting creative programming art exercises for the Processing programming environment, and Thinking Forth by Leo Brodie (ISBN 978-0976458708) which mostly concerns software design using Forth. But Forth is a very niche way of approaching this kind of programming.

          In general for visual arts with programming I think it's to good to have a basic grasp of the basics of linear algebra and some trigonometry, so that you have a bit of a toolbox of concepts you can break things down into.

          With Forth Salon specifically, it's a very experimentation friendly environment and there's (or at least was) a quiet little community around it. When I was more active there we'd trade greetings via code comments, create derivative works and I imagine we all sat and tried to decipher each other's source code, which is quite difficult with these stupidly dense Forth programs.

          1 vote
  8. Bwerf
    Link
    I finished the little odin game that I wrote about a couple of weeks ago. The gameplay is rudimentary at best, and there's a large number of rough edges that could be filed off. But it's playable...

    I finished the little odin game that I wrote about a couple of weeks ago. The gameplay is rudimentary at best, and there's a large number of rough edges that could be filed off. But it's playable and has all the most important parts, and I learned the basics of odin. So I'm gonna declare it done and move on to the next thing, whatever that will be.

    Source at https://codefloe.com/bwerf/odin_game/ if anyone is curious.