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

7 comments

  1. xk3
    Link
    I switched from Xfinity Now back to Xfinity to lock in the $55/mo price for 5 years for 400Mbps (and 1 year of Xfinity Mobile free) and one hiccup that I wasn't expecting was that routing the...

    I switched from Xfinity Now back to Xfinity to lock in the $55/mo price for 5 years for 400Mbps (and 1 year of Xfinity Mobile free) and one hiccup that I wasn't expecting was that routing the coaxial through my CyberPower CP1500AVRLCD UPS was causing signal issues so it wouldn't activate (the light on the XB6 would stay blinking green instead of blinking white) so I had to connect it without the UPS intermediary. I guess that is what happens when you buy refurbished UPS at steep discounts... (I think it was around $50)

    On that note I'm miffed that the house across the street has gigabit fiber for about the same price as what I'm paying... It's been like that for about five years. guess I'll join the army...

    7 votes
  2. Sunbutt23
    Link
    I’ve got my “AWS free tier ec2 pihole with Tailscale all deployed via terraform and workflows” in a stable place! Works like a charm! In 2 minutes I can deploy it and have the terraform script...

    I’ve got my “AWS free tier ec2 pihole with Tailscale all deployed via terraform and workflows” in a stable place! Works like a charm! In 2 minutes I can deploy it and have the terraform script insert the new pihole Tailscale ip as my tailnet name server and set override local dns on joining nodes. This is all automated with stored secrets to access Tailscale and AWS. I’m pretty proud.

    Next step is to implement OIDC so that I don’t need an AWS access key stored as a secret in my repo.

    Next next step is to duplicate the work to GCP and Azure. All free tier of course.

    As always, advice is welcome!

    5 votes
  3. Diff
    Link
    I've been working on a 3D SVG Editor built on the Zdog library. So far it's coming along pretty well. Toiling away at undo/redo history, it's a little bugged for editing properties, but I think...

    I've been working on a 3D SVG Editor built on the Zdog library.

    So far it's coming along pretty well. Toiling away at undo/redo history, it's a little bugged for editing properties, but I think soon it'll be ready to start creating Things™ in Zoodle directly rather than manually stuffing them in the side. Biggest hurdle left is somehow crafting a 3D equivalent of the classic vector pen tool. Maybe I'll do it like Blender and just expose and allow users to directly manipulate the control points.

    5 votes
  4. [3]
    Comment deleted by author
    Link
    1. [2]
      TangibleLight
      (edited )
      Link Parent
      The best advice I ever got was that smooth resizing is not worth the effort in Vulkan. I'm sure it's possible to do correctly but I never figured it out. I just drop whatever frames during the...

      Resizing a window invalidates the swapchain, but its not like it reports the desired dimensions when it does that

      The best advice I ever got was that smooth resizing is not worth the effort in Vulkan. I'm sure it's possible to do correctly but I never figured it out. I just drop whatever frames during the resize and recreate once it ends.

      This talk was a great resource for me: Vulkanised 2024: Common Mistakes When
      Learning Vulkan - Charles Giessen

      it gets stuck blocking when the application is minimized and not exposed

      Now that seems bizarre to me. You mentioned you're on AMD with official drivers on one machine and mesa drivers on the other - which drivers do you see that behavior? What display server and window manager/compositor do you use?

      Edit: Also, what present mode are you using? If you're in FIFO etc it might be waiting for vblank, and the display server or driver is clever enough to know it's not visible? That's my only guess. Try changing the present mode and see if behavior changes.

      1 vote
      1. [2]
        Comment deleted by author
        Link Parent
        1. TangibleLight
          Link Parent
          The closest thing I ever got to an "elegant" solution was something along these lines: Rough pseudocode-from-memory sci = swapchain create info { ... old_swapchain = .null_handle } sc =...

          At present the only place I ever create swapchains is right before rendering and it does that if it is flagged as invalid. The two places that seem able to invalidate the swapchain are vkAcquireNextImageKHR and vkQueuePresentKHR, which I currently have approximately at the start and end of my render processes. If the acquire fails on suboptimal I queue the recreate but let the render continue anyway, if the acquire fails on out-of-date I queue the recreate and also abandon the frame. The queue present though is so close to the end of the frame that it frankly doesn't matter what I do with its result (worst case it would handle the issue the next frame, but there aren't any more relevant Vulkan calls during the frame that could be affected), but I do queue a recreate if I get either of those anyway.

          The closest thing I ever got to an "elegant" solution was something along these lines:

          Rough pseudocode-from-memory
          sci = swapchain create info {
              ...
              old_swapchain = .null_handle
          }
          sc = .null_handle
          
          loop {
              if sc == .null_handle
                  sc = create swapchain (sci)
                  destroy sci.old_swapchain
                  sci.old_swapchain = sc
          
              ...
          
              try to acquire image; catch: {
                  sc = .null_handle
                  continue (consider frame "dropped")
              }
          
              ...
          
              try to present image; catch: {
                  sc = .null_handle
                  continue (consider frame "dropped")
              }
              
              consider frame "complete". Increment frame counter etc.
          
              ...
          }
          

          I seem to recall that it worked great on my laptop (XOrg with MESA intel drivers) but it caused some particular issues on my desktop (XOrg with proprietary Nvidia drivers) with certain present modes. I don't rememeber the details though.

          At some point I just gave up and simply do not attempt to render if the window is resizing. You still have to handle the invalidated swapchain, but it almost never occurs.


          In fact the way they implemented it has serious issues that lead to, potentially unavoidable, application hanging. [...]

          I think you are right.

          You're not guaranteed anything but FIFO, which is a portability issue in refusing to support it on Wayland.

          In most cases FIFO seems just fine; in my amateur usage there doesn't seem to be any reason not to use it unless you are building a microbenchmark. It is a shame that Wayland does this.

          1 vote
  5. lynxy
    Link
    I finally gave up on the Elegoo Neptune 4 Plus- I'm getting Y-slipping in maybe 50% of prints no matter what I do. I'm not certain bed-slingers were made for beds this large. At this point I...

    I finally gave up on the Elegoo Neptune 4 Plus- I'm getting Y-slipping in maybe 50% of prints no matter what I do. I'm not certain bed-slingers were made for beds this large. At this point I really don't care about speed, I just want something reliable- and so I've ordered a Prusa. It will be coming in 10 weeks, which is a while!

    In the mean-time, I'm trying to get what prints I can out of the Elegoo, including parts for an easy install-uninstall bug-net frame I'm putting together. It's getting warmer and mosquito season will soon be upon us.

    Otherwise, plenty of little projects that don't seem to go anywhere! Fiddling with driving multiple 7-segment displays through a shift-register, replacing the fans in a second-hand Eaton UPS with 80mm Noctua, debating switching to ZFS over MDADM.

    Actually, that last one is one that I really have choice-paralysis on. I've used MDADM for the longest time for simplicity, but my partner has been pestering me about using ZFS, and I admit it does offer a few features which sound useful (non-homogeneous disk handling, metadata caching on faster media, etc). I've had a few data scares with MDADM recently in which the arrays failed to come back up after a power cycle (hence the UPS I just got!), and ZFS has a reputation for data safety. Unfortunately it also seems like ZFS is ideal for enterprise, in that it's best used when you know (and own!) the full set of hardware you will eventually be using in prod. This isn't ideal for home-use, as I'd like to grow the array over time, not buy everything up-front. It seems VDEV expansion has been added in limited capacity at the end of last year / start of this year, after a multi-year effort. I don't know. As usual.

    4 votes
  6. IsildursBane
    Link
    I have finally got all the parts for my Raspberry Pi audio project, after having some issues with some battery cells. I did a battery longevity test on the 14500 cells, and the batteries only...

    I have finally got all the parts for my Raspberry Pi audio project, after having some issues with some battery cells. I did a battery longevity test on the 14500 cells, and the batteries only lasted 35min. I am thinking the packaging on the battery listing 2500 mAh is incorrect. I will need to upgrade to using 18650 cells to get the battery life I want. I do not need it to last 5hrs, but I do want it to be able to last at least one full album, which the 14500 battery could not.

    3 votes