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?

14 comments

  1. hamstergeddon
    Link
    I've been slowly learning Go over the last few weeks. My first project's going to be a text adventure game and right now I'm just piecing together some basics like outputting text in a visually...

    I've been slowly learning Go over the last few weeks. My first project's going to be a text adventure game and right now I'm just piecing together some basics like outputting text in a visually pleasing way. So far it's literally just a way to output text boxes with different border styles and colors. My goal is to write as much of the code myself as possible, although I did use a library for parsing yaml files.

    I've been taking screenshots as I've expanded on that functionality and I'm hoping to keep a timeline of screenshots so I can showcase my progress while there isn't anything actually playable. My first day yielded a simple text box with a thick white border. My second day I added border colors and styles (configurable via a .yaml file). And my third day was rewriting some of the code to better handle line breaks. Prior to that update, it would line break at exactly the defined width of the dialogue box, even if that was in the middle of a word.

    Next goal is to figure out how to fit multiple paragraphs in a single dialogue box. Which may ultimately result in even more refactoring, but that's a fantastic learning exercise, so I don't mind.

    https://github.com/jd13313/GoHaveAnAdventure

    12 votes
  2. [3]
    FluffyKittens
    Link
    Posting here since this doesn’t warrant its own thread: Anyone have experience repasting their laptop CPU? If so, got any takes on the relative difficulty? I’ve got an ancient HP business line...

    Posting here since this doesn’t warrant its own thread: Anyone have experience repasting their laptop CPU? If so, got any takes on the relative difficulty?

    I’ve got an ancient HP business line laptop that’s about ten years old, and suddenly started throttling and pinning the fans at max speed under no load a few weeks ago. I have a good local repair shop, but they quoted me $120 to do a repaste, and the laptop was <$250 when I bought it used ~5 years ago.

    3 votes
    1. [2]
      Eji1700
      Link Parent
      It's basically two parts: How difficult is your laptop to take apart to get to the heatsink/cpu. Cleaning the heatsink/cpu and applying the paste. 1 obviously varies a ton by machine, and if your...

      It's basically two parts:

      1. How difficult is your laptop to take apart to get to the heatsink/cpu.
      2. Cleaning the heatsink/cpu and applying the paste.

      1 obviously varies a ton by machine, and if your machine is 10 years old, some wires/connectors might be fragile.

      2 isn't really that hard, it's just that even small mistakes basically brick the machine. You can follow any guide on it and see that it's mostly scraping the material off, using some kind of fine cloth with 90%+ alcohol to clean the rest off, and then reapplying like you would with any other cpu.

      How hard you find 2 is mostly going to depend on if you've ever applied paste to a CPU before and maybe a little bit of how obnoxious it is to get to the CPU in your laptop. In general it's not really "hard" so much as "obnoxious" with the side knowledge that if you screw up somewhere you've probably bricked the machine.

      5 votes
      1. FluffyKittens
        Link Parent
        This is exactly the sort of perspective I was hoping for - huge thanks!

        This is exactly the sort of perspective I was hoping for - huge thanks!

        3 votes
  3. knocklessmonster
    (edited )
    Link
    I wound up committing this week to Linux and containers by accident to focus on the Universal-Blue project and how I can interact with it. I'm going all-in on uBlue-based OSes on my stuff (for...

    I wound up committing this week to Linux and containers by accident to focus on the Universal-Blue project and how I can interact with it. I'm going all-in on uBlue-based OSes on my stuff (for Linux at least) because I like the model, especially with context-oriented OS images. I have a previous comment where I talked about my initial foray, but a week later it all makes more sense and I know what I'm doing now.

    The only issue I've had was my 2012 Macbook. I think its EFI stuff is causing weird issues with rpm-ostree+grub, so I stuck Bluefin on it and don't really plan to look back, unless I get the itch to use Aurora and have Plasma on it. But GNOME feels great on a laptop, tbh.

    My desktop is now running Bazzite. My initial thought towards "gaming" distros has always been an eyeroll, but I looked at the feature list and was impressed. They basically made Fedora-based SteamOS, but desktop-oriented (for their Desktop image, at least). There are some minor kernel patches I don't really care too much about, but I like the application list since it has stuff I've used in the past and want to have around just in case I need it (ProtonUp-QT, Input-Remapper), as well as all of Flathub. All uBlue images have Distrobox and proprietary drivers included, so that's a solved issue for most of my use cases. There are a bunch of pre-installed apps like ProtonUp-QT to manage WINE/Proton installs, Lutris (which I don't use, don't like any of their scripts I've interacted with), and a bunch of other utilities. When I see people saying they want SteamOS3 on a desktop I'll definitely point them at this.

    My Microsoft Surface Go is just running uBlue's kinoite-surface image. I wanted to keep that simple, but it'll make managing it so damn simple, I'll just use flatpaks and update the image periodically, and done.

    My next goal is rebuilding my Distrobox setups following the "cattle not pets" concept1. I'm unsure how to interact with Distrobox specifically, but figure a script to automate the guest OS for the container should be enough. I love the idea of being able to run a script, pull the latest Ubuntu version, and install the packages. Bazzite, at least, has a tool to manage updating containers, so that's a solved problem post-deployment. I mostly want access to the kxstudio repos, and an environment to run tidalcycles in, which are now completely trivial, since everything else I want is already in Flathub. The ptyxis terminal is also a surprisingly useful tool, providing a menu to access your containers instantly.

    This has solved so many problems for me. I want to have a second SSD on my desktop for playing with other images, like some Sway-based environments in Fedora Atomic, VanillaOS and EndlessOS to see what's up on the other side. This week has been as exciting as my first Ubuntu install fifteen years ago, with all of the knowledge I brought forward from then, and some new technology stacks and management philosophies to learn.

    I have to say this hasn't been bad for what started as an experiment to answer the question "What do I need to in order to live in Fedora Atomic?"

    1Distrobox has a manifest format, which makes sense for what I'm doing, I just slapped one together for Arch to run tidalcycles, which requires a haskell library, via its pacman package.

    3 votes
  4. TangibleLight
    Link
    I feel I've graduated from novice to intermediate in learning Zig. Still don't have a great sense for "The Zig Way" often times, but it's developing. I'm also starting to - and the same thing...

    I feel I've graduated from novice to intermediate in learning Zig. Still don't have a great sense for "The Zig Way" often times, but it's developing.

    I'm also starting to - and the same thing happens when learning any new skill - I hate my prior work. That UDP Protocol Implementation I've mentioned in the prior weeks of this thread, while it's functional, I'll certainly throw out. I kind of planned on that, though, that feeling is probably a good indicator that I'm learning.

    Another thing I'm running into is the classic blunder, I'm building a library without a use-case. Fine for learning the language fundamentals, but not great for learning more advanced paradigms. So, with Zig's promise of happy interop between C and Zig, I'm revisiting some of my early graphics code, since I know that problem a lot better, and then use that as an arena to play with the more unfamiliar architecture questions.


    Entirely unrelated, but I wasted a few hours stripping out the stylesheets on my personal blog. I'm always frustrated by bloated sites that screw up my usercss, so I'm trying to be the change I want to see in the world. However I know it's a waste of time because I hardly ever publish anything there, it's just a bunch of stuff sitting in my drafts, half-finished and unused.

    All I really want for the thing is to constrain the width of the content, mute the contrast a little bit, and switch to a sans font. And load katex for math rendering but that's not really part of the styles.

    3 votes
  5. Toric
    Link
    ive been learning nix, and making a config with the intent of switching my laptop to nixos eventually. Right now I have home-manager set up more or less how I want it, and have nixos running in a...

    ive been learning nix, and making a config with the intent of switching my laptop to nixos eventually. Right now I have home-manager set up more or less how I want it, and have nixos running in a VM while I make a config I can be really happy with.

    3 votes
  6. caliper
    Link
    I’ve been slowly working on setting up home assistant. We have a second home with a furnace from 2009 there that has a digital interface, but no internet capabilities. Luckily there have been many...

    I’ve been slowly working on setting up home assistant. We have a second home with a furnace from 2009 there that has a digital interface, but no internet capabilities. Luckily there have been many before me, so it’s a case of piecing together the parts I need and setting it up in a way I like.

    What’s fun about this project is that I’ve been slowly chugging along for months now. Usually my projects don’t last much longer than a weekend or two, in which I’m totally obsessed with it and try to spend every waking hour on it. And then I quickly lose interest.

    But this is fun for much longer and I’m not obsessing over it. So I’ll work on adding a VPN server for a couple of hours spread over some days, and just enjoy making slow progress. And it’s a great mix of low level software, hacking some hardware together and working on a nice UI when I feel like it. Even the setbacks are not getting to me; I’ve redone the interface with our furnace at home 3 times and don’t mind wasting time on it.

    The only thing I know is coming is keeping the thing running for years. With all the configuration it’s hard to keep everything neatly in a repo. I should be using Ansible or similar, but it feels like too big of a mountain to climb next to getting all the other stuff running.

    2 votes
  7. giraffedesigner
    Link
    I've been making a demo for an event my company is going to this week. It's pretty complex and I'm proud of my progress. The flow is as follows person takes selfie on booth ipad crop image to...

    I've been making a demo for an event my company is going to this week. It's pretty complex and I'm proud of my progress.

    The flow is as follows

    • person takes selfie on booth ipad
    • crop image to specified dimensions while focusing on their face (we need portrait photo and the ipad setup will be horizontal due to tripod needs)
    • remove image background
    • generate background from big list of prompts
    • composite person with background removed over generated background
    • run the composite through controlnet sdxl
    • add polaroid style frame and our logo to top
    • add dynamic text based on the prompt from earlier to bottom of frame
    • upload image to dropbox for booth attendant to print on request
    • send person their photo via intercom (they are added as a lead via API and a conversation is started)

    Probably the most complicated app I've done so far but I'm having a blast!

    2 votes
  8. Weldawadyathink
    Link
    My next project is going to be a pinochle scorecard. I have played pinochle with my family for years. We usually keep score on pen and paper, but I always felt that there should be a simple app or...

    My next project is going to be a pinochle scorecard. I have played pinochle with my family for years. We usually keep score on pen and paper, but I always felt that there should be a simple app or website to track score for you. I have toyed around with a project like this for years, but now I think I am going to focus on it and get something usable put together.

    I have a react website thrown together. The interface isn't complete, but its at like 90% of a minimum viable product. But then I got distracted with fun new features. I wanted a way to share and view other people's games. After considering a polling setup (with a brief aside to learn about http long polling), I decided that wasn't elegant enough for me. So then I started learning about websockets. And holy shit websockets are cool! I am using cloudflare workers and durable objects as a server for this project, and I already have a demo working with the game syncing between browsers in real time!

    I am planning on using cloudflare D1 to database the metadata for these durable objects. I am going to take the opportunity to learn Drizzle ORM. I have never used an ORM before, since I feel pretty comfortable with SQL and just write the queries myself. But I have definitely seen the limitations of this type of setup, and would like to use ORMs for future projects. This pinochle tracker definitely doesn't need an ORM (I think it will be 1 table and maybe 3 columns), but its a good opportunity to learn how they work.

    1 vote
  9. [3]
    UP8
    Link
    For my FraXiNUs image sorter: converted it all to synchronous Python, implemented a thumbnailer, converted the webcrawler to use Celery. I like how interactive it is now, but I am concerned that...

    For my FraXiNUs image sorter: converted it all to synchronous Python, implemented a thumbnailer, converted the webcrawler to use Celery. I like how interactive it is now, but I am concerned that Python's lack of threads will be a burden (it should be easy to have one copy of a 1GB machine learning model loaded into RAM that can be used simultaneously by any number of threads) There are a lot of processes to start to make it up but I have a set of serviced scripts for it.

    The browsing interface for BIGtags needs some work, I recently got enough tags in it that it is hard to find one, so I have to improve the browsing interface for tags themselves so I can use them to browse the collection, put in paginators, etc.

    Since I have had the image sorter I have relatively neglected my YOShInOn RSS reader which has given me a clearer view of where YOShInOn should go. YOShInOn runs on batch jobs that run every few days and between the two of us and our vendors there is considerable delay between an article getting published, my selecting one, and it getting published to social it can take days. If I am reading fewer articles the cycle runs slower so now it can take a week.

    For articles about dark matter, deforestation, science fiction and in fact most topics, this is no problem at all. It's a terrible problem in the domain of sports because the typical article in sports is of interest up until the next game. I even was disappointed when I read, a day late, that my team had won a tournament game and was playing an hour's drive away.

    From the FraXiNUs experience I know how to speed up many parts of the process, but I am still thinking about how to make the recommender run in a stream instead of a batch.

    1 vote
    1. [2]
      unkz
      Link Parent
      For doing inference, I usually set up a dedicated celery workers on their own message queue to keep memory usage low.

      I like how interactive it is now, but I am concerned that Python's lack of threads will be a burden

      For doing inference, I usually set up a dedicated celery workers on their own message queue to keep memory usage low.

      2 votes
      1. UP8
        Link Parent
        That's what I plan to do, but boy do I have a lot of serviced entries for a very simple app already.

        That's what I plan to do, but boy do I have a lot of serviced entries for a very simple app already.

  10. ogre
    Link
    I made an effort to learn the Crystal programming language this week. The allure is primarily for Ruby programmers who want the performance of a statically typed compiled language, but I am not a...

    I made an effort to learn the Crystal programming language this week. The allure is primarily for Ruby programmers who want the performance of a statically typed compiled language, but I am not a Ruby programmer so the syntax is quite alien to me. I didn’t realize how much I depend on lsp support for object oriented languages until this week lol. From what I read, there’s no interpreter for Crystal so it compiles your code each time you save to give syntax hints, but the compiler isn’t very performant so it’s practically useless imo. I wanted to learn the language because it’s primarily what powers Kagi’s search backend, but after spending a week with it I think I’d like to admire Kagi from afar rather than work on their backend lol. I had some fun with a few bits and pieces in Crystal but it’s not something I’ll return to in the future.

    Conversely, I picked up Nim last night and immediately fell in love after following along with the tutorial. I’ve been thinking about it all morning and I’m excited to get home to my keyboard tomorrow to write some more with it. I’ve never used meta programming/macros to bend a language like the docs say is possible, so I’d really like to learn how it works.

    Learning a new language for the joy of programming instead of pursuing a job is much more enjoyable.

    1 vote