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

8 comments

  1. BeardyHat
    Link
    I've been using AI recently to help me troubleshoot many things; from walking me through diagnosing my bad alternator with my multimeter to helping me figure out my new motor for my RC car...

    I've been using AI recently to help me troubleshoot many things; from walking me through diagnosing my bad alternator with my multimeter to helping me figure out my new motor for my RC car produces too much voltage and overloads my ESC. I also very much enjoy generating stupid pictures to send to my friends.

    That said, I don't feel great about using ChatGPT and Copilot for this given the environmental impacts of AI on our planet, so I started experimenting a few days ago with running local models on my mid-range Desktop PC, as well as my mid-range laptop. The laptop ended-up being significantly easier, as it has an Nvidia A3000 GPU, while my desktop is all AMD, so I've had to do some finagling with ZLUDA an open-source implementation of CUDA for AMD.

    It did end-up taking me about a day to get things working correctly, but I'm finally there and have been generating images and figuring out how to prompt Stable Diffusion correctly to more closely get what I want to when I generate pictures. It's hitting my GPU hard and generally takes about a minute to generate a 1024x1024 image, but it's working great and I'm happy with the results and happy knowing that my penchant for generating stupid images isn't costing the planet anything, given my house is solar powered.

    I've been using LM Studio for Inference AI initially it was hitting my CPU to generate responses, but after I got ZLUDA working with Stable Diffusion, it LM Studio actually started hitting my GPU as well, so I'm happy about that, through no real effort. I've tried several different models so far, finally landing on QWEN3-v1-8b, as it seems most similar to something like ChatGPT or Copilot for general use and troubleshooting. I haven't used it too extensively yet, but I have used it to help me with my Stable Diffusion prompts and so far, it's given me good advice on how I need to orient them to help me get things accurate.

    At any rate, I feel good about running this off my own power on my own compute, even if it's slower or more inaccurate. My next steps will be to make at least the Inference AI network facing, so I can access it on various devices in my house and then I finally have multiple reasons to setup my home VPN for when I'm out an about, which would give me access to Adblock with my PiHole, my file server and my own AI instance.

    4 votes
  2. xk3
    Link
    The code itself isn't that interesting, and it only works for content which shares the same parent tag (though perhaps I can extend this later), but it was really satisfying to add just a few...

    The code itself isn't that interesting, and it only works for content which shares the same parent tag (though perhaps I can extend this later), but it was really satisfying to add just a few dozen lines of code to extend the functionality of an existing subcommand so that something like this would be possible to add a bit more structure to text extraction:

    $ library text --firefox https://aaronson.org/full-moon-albums/ --select .album-artist,.album-title --sep ' - '
    Way Dynamic - Massive Shoe
    Scritti Politti - Cupid & Psyche 85
    YHWH Nailgun - 45 Pounds
    I Am Robot and Proud - Bird at Sunrise
    Water from Your Eyes - Long Days, No Dreams
    XTC - Skylarking
    ...
    

    Initially, I was writing a separate script that borrowed a lot of code from library text but once I had an MVP hardcoded for working with CSS classes I realized I could generalize it to work with other CSS selectors using Soup Sieve and at that point I realized it would be useful to have in the library text command.


    It's really satisfying when the solution to a problem is just a minor tweak. Last week I had a similar experience when adding archive.org/ghostarchive/preservetube as backup locations for when downloading directly from YouTube doesn't work. At first I felt dread because it seemed like something that would be brittle and difficult to add but after playing around with it for a bit it, a solution appears which turns out to be not so bad.

    Another satisfying simple thing that I finally sat down and made is a script to print out the layout of disks on my LFF r730xd. I've been buying cheaper-than-tape small-capacity SAS drives (3TB, 4TB, sometimes 8TB) from server farm surplus stores so I'm hot-swapping disks several times per week and relying on lsblk HCTL was growing a bit tedious as I don't want to accidentally eject a drive that's in-use.

    $ r730xd.disks
    [!] sda   b9 | [!] sdh  x19 | [!] sdc  b11 | [!] sdj  b10
    [!] sdb   b8 | [O] sde      | [ ]          | [!] sdk    d
    [!] sdg  x18 | [!] sdf  x15 | [!] sdi   b2 | [!] sdl   b4
    
    [O] = unmounted
    [ ] = empty bay
    

    It's beautiful.

    3 votes
  3. [4]
    text_garden
    (edited )
    Link
    I released an initial (fully functional) version of Pocket Acid, my software groovebox for cheap Chinese gaming handhelds (which I last mentioned here). It's all written in Zig and works nicely on...

    I released an initial (fully functional) version of Pocket Acid, my software groovebox for cheap Chinese gaming handhelds (which I last mentioned here). It's all written in Zig and works nicely on a range of aarch64 devices as well as PCs. There have been some requests for new features, so I've been working through those. Here's a demo and here's the GitHub repository. It seems a success in terms of response and I am happy with the functionality myself, but eventually I want it to support multiple workspaces.

    Meanwhile I've also started on my next project: adapting the Rogue clone found in e.g. NetBSD for gamepads and small screens. For those not familiar with the original game, it's a sort of minimal, turn-based, text-graphics dungeon crawler. It's the game which roguelikes are like, if that means anything to you. Verb actions on the environment and inventory are all bound to keyboard keys, making it utterly unsuitable for gamepad control as is. For example, to eat a piece of food, you press 'e' followed by a letter corresponding to an inventory slot. So there's a bunch of stuff that needs to be changed.

    The game uses Curses and imperatively presents options and prompts for keyboard input as it goes. Mostly for directions (e.g. when throwing something) or inventory items (like in the eating example above). I'm currently rewriting it so that there is a single runCmd function which accpepts a single command like eat, quaff, wield, move, drop etc. and may or may not return a request for input. It will only perform the action when all prerequisite requests are fulfilled. That way I get a lot of flexibility in terms of how the presentation layer is used to produce commands and fulfill requests, and I can drive the main loop myself instead.

    The next step is to replace Curses with my own implementation based on a virtual text screen. Rogue only uses some small subset of the full Curses functionality so it shouldn't be too hard.

    3 votes
    1. 0x29A
      Link Parent
      This is super cool. Gotta toss this on my Anbernic and play around

      This is super cool. Gotta toss this on my Anbernic and play around

      2 votes
    2. [2]
      moocow1452
      Link Parent
      Pocket Acid sounds sick. I'm definitely putting this on my 35XXSP and giving it a whirl. Will this be available on the Portmaster repository or is it for side loading only?

      Pocket Acid sounds sick. I'm definitely putting this on my 35XXSP and giving it a whirl. Will this be available on the Portmaster repository or is it for side loading only?

      1. text_garden
        Link Parent
        Thanks! It's only side loading for now, but once development slows down a bit I will try to get Portmaster to accept it. I'll give it maybe one or two more weeks depending on feature requests and...

        Thanks! It's only side loading for now, but once development slows down a bit I will try to get Portmaster to accept it. I'll give it maybe one or two more weeks depending on feature requests and bug reports. The release package follows all Portmaster convention so it shouldn't be too much work.

  4. Wes
    Link
    I was invited to a modded Minecraft server, where I've spent a few hours building an underwater base with a functioning airlock system using ComputerCraft. It uses player detectors on either side...

    I was invited to a modded Minecraft server, where I've spent a few hours building an underwater base with a functioning airlock system using ComputerCraft. It uses player detectors on either side to cycle the lock, flashes some lights, and if moving to the water-side, floods the chamber. The doors are controlled by modular routers, which extend and retract blocks when receiving a redstone signal.

    I'm using bundled cable for signaling, which encodes up to 16 bits of data. I assign each system a color, such as for the doors, lights, and water release systems.

    Color Dec Bin
    White 1 0000 0001
    Orange 2 0000 0010
    Magenta 4 0000 0100
    Light Blue 8 0000 1000
    ... ... ...

    This lets me send a combined signal by summing them, and later pull a color out by checking its associated binary digit. I'm using the mod More Red for this, but it's based on the original design of RedPower 2.

    I think I've worked out all the kinks now. The script is written in lua, which is not my favourite language, but I'm pretty happy with the end result.

    Screenshots of airlock and base exterior

    2 votes
  5. talesofweirdfl
    Link
    Last week I talked about writing the code for a text game which I submitted to an itch.io jam. That was such a great experience I've been working on making a much larger game, but to do that I had...

    Last week I talked about writing the code for a text game which I submitted to an itch.io jam. That was such a great experience I've been working on making a much larger game, but to do that I had to get to work on some visual studio code extensions to make the process easier.

    So, this week I'm back to say that I've been able to make a syntax highlighting extension and am looking into what it would take to port the "build" engine to visual studio.

    Sadly, the build tools are going to be more difficult. It feels like writing a vs code extension is both well-documented and surprisingly difficult to follow if you aren't a web person.

    Still, I soldier on. If that fails I might just write some shell scripts to do it. Not sure.

    1 vote