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

32 comments

  1. [11]
    lynxy
    Link
    I've finally purchased a couple of YubiKey devices and I'm working on learning a little about OpenPGP using GnuPG- so that I may sign / verify / encrypt / decrypt documents, but also for...

    I've finally purchased a couple of YubiKey devices and I'm working on learning a little about OpenPGP using GnuPG- so that I may sign / verify / encrypt / decrypt documents, but also for authentication (specifically SSH). I've got a working setup with both keys (primary ECC with a set of three subkeys for signing, encrypting, and authenticating respectively), and the pubkey component hosted on one or more of my domains, but I'm struggling a little with the intricacies of SSH PGP agent forwarding.

    I much prefer to use a CLI or TUI for passphrase entry, so I'm forcing pinentry-curses usage, but when I'm connected to a remote device with PGP agent forwarding enabled and I attempt to sign a document, the curses interface only catches some of the key-presses- the rest are consumed or lost, only to be spat out on exit. It's a really weird issue, and the only leads I've found so far are two posts on unix.stackexchange (63010/325021) which describe my issue perfectly, but are unresolved.

    Otherwise, I'm gearing up for the next semester of university, and trying to convince the lecturer of the Introduction to Cryptography Bachelor unit to let me take it as a remedial during my Master Programme, as my university didn't mention cryptography much at all and I'd love to do the Advanced Cryptography unit later.

    6 votes
    1. [10]
      xk3
      Link Parent
      What terminal do you use and what is the TERM env var set to?

      curses interface only catches some of the key-presses- the rest are consumed or lost, only to be spat out on exit

      What terminal do you use and what is the TERM env var set to?

      1 vote
      1. [9]
        lynxy
        Link Parent
        Alacritty, and TERM=xterm-256color on both local and remote devices. I am using tmux on the local machine- could that be causing issues? I was wondering if it was some form of conflict between the...

        Alacritty, and TERM=xterm-256color on both local and remote devices. I am using tmux on the local machine- could that be causing issues? I was wondering if it was some form of conflict between the remote GPG agent and the forwarded one, but at this point I'm totally lost.

        1 vote
        1. [8]
          xk3
          Link Parent
          maybe: https://news.ycombinator.com/item?id=27075659 I would try it in a few different terminals to see if that could be the root cause It could also potentially be tmux! Tmux has to effectively...

          could that be causing issues

          maybe: https://news.ycombinator.com/item?id=27075659

          I would try it in a few different terminals to see if that could be the root cause

          It could also potentially be tmux! Tmux has to effectively translate everything: all keyboard input, all program output, etc to enable multiplexing. You could try without tmux to see if it is any different.

          2 votes
          1. [7]
            lynxy
            Link Parent
            It's an interesting theory, but I've just experimented with Alacritty sans-tmux, as well as both Kitty & Ghostty, and I seem to experience the exact same issues. Are there any terminals you might...

            It's an interesting theory, but I've just experimented with Alacritty sans-tmux, as well as both Kitty & Ghostty, and I seem to experience the exact same issues. Are there any terminals you might recommend that don't do anything weird and potentially breaking?

            1 vote
            1. [6]
              xk3
              Link Parent
              any of the non "modern" ones lol maybe st? https://st.suckless.org/

              any of the non "modern" ones lol

              maybe st?

              https://st.suckless.org/

              1 vote
              1. [5]
                lynxy
                Link Parent
                Wow is st fast, but unfortunately- same issue occurs!

                Wow is st fast, but unfortunately- same issue occurs!

                1 vote
                1. [3]
                  xk3
                  (edited )
                  Link Parent
                  st is not particularly fast but it is simple (or maybe you're talking about startup speed? rather than throughput/render speed). Modern terminals like the ones you mentioned (and foot) do more...

                  st is not particularly fast but it is simple (or maybe you're talking about startup speed? rather than throughput/render speed). Modern terminals like the ones you mentioned (and foot) do more things to be faster.

                  So the problem is pretty much isolated to the program that you are typing into. There is probably a bug in that

                  1 vote
                  1. [2]
                    lynxy
                    Link Parent
                    Yes- startup speed, resize speed. I don't have the experience with it to know how throughput handles, though I've read the suckless page on it and understand the criticism. A few of the other...

                    Yes- startup speed, resize speed. I don't have the experience with it to know how throughput handles, though I've read the suckless page on it and understand the criticism. A few of the other terminals I tried out felt quite sluggish when interacting with them, though.

                    By the "program you're typing into", I assume you mean pinentry-curses?

                    1 vote
                    1. xk3
                      Link Parent
                      Yes. It looks like it is somewhat buggy in general: https://github.com/sindresorhus/pure/issues/366 https://old.reddit.com/r/swaywm/comments/eyhvql/solved_gpg2_pinentry_delay/...
                      2 votes
                2. lhamil64
                  Link Parent
                  Are you on Linux? You could try with a plain old tty (Ctrl+Alt+F1) and see if you still have the problem. That could rule out whether it's an issue with the specific terminal emulator or something...

                  Are you on Linux? You could try with a plain old tty (Ctrl+Alt+F1) and see if you still have the problem. That could rule out whether it's an issue with the specific terminal emulator or something else.

  2. [4]
    secretfire
    Link
    I'm currently researching parts to build a small home server, basically just for Jellyfin (media server) and backing up important stuff. I've built PCs before but servers require a whole different...

    I'm currently researching parts to build a small home server, basically just for Jellyfin (media server) and backing up important stuff. I've built PCs before but servers require a whole different way of thinking when choosing parts and whatnot; I don't particularly care if my gaming PC isn't the most efficient machine in the world when idling, but for a server running (more or less) 24/7 the difference between 40W idle and 50W idle can be a few bucks a month, and that adds up. So I'm having to find parts that are powerful enough to do what I want with it, but not too powerful (for upfront cost as well as power draw), that are also energy efficient.

    Fortunately it takes basically nothing to run a half decent media server; you can make a perfectly functional one with decade-old hardware. But I'm the kind of person who always wants to do things right the first time round, which inevitably leads me to always jumping down enormous rabbitholes of research for meagre levels of optimisation.

    Currently my thinking is to make an Intel-based mITX build: Intel for better video transcoding (compared to AMD processors, which kinda suck at it), mITX for convenience and aesthetics and fun. Haven't quite landed on what exact processor to get but I don't think the fine details matter too much honestly, basically any processor made in the last 5 years could do the job here. Will probably get an 11th-12th gen i5, but I'm also thinking about going with ECC-supported parts which would require me to get either a 9th gen or a 14th-15th gen (not to mention trying to find obscure compatible motherboards from the deep recesses of aliexpress). Or I could go with an AMD processor (they're way better with ECC support) and a cheap GPU of some kind, but that's probably way overkill and would make having an energy-efficient build basically impossible. The ECC vs no ECC debate is one of those tech things where a lot of people have extremely strong opinions on either side and idk man im just a guy who doesn't want his data to get destroyed, I have no idea whether or not to bother with it. Forgoing ECC makes picking parts a hell of a lot easier at least, not to mention way cheaper.

    Once I've settled on a CPU/motherboard combo everything else just sorta falls into place. I get some half decent memory, a few NAS HDDs, an M.2. SSD, high-quality PSU, etc, etc, and then I move onto software, which is where the fun really begins.

    3 votes
    1. Nsutdwa
      Link Parent
      I sometimes fantasy-spec a home server (but what if I win the lottery? I have to be ready!) and honestly, trying to make ECC work is always a nightmare. I fully agree with leaving it out for a...

      I sometimes fantasy-spec a home server (but what if I win the lottery? I have to be ready!) and honestly, trying to make ECC work is always a nightmare. I fully agree with leaving it out for a budget- and sanity-friendly home build.

      3 votes
    2. [2]
      ogre
      Link Parent
      How serious is the risk of data being destroyed without ECC?

      How serious is the risk of data being destroyed without ECC?

      1 vote
      1. secretfire
        Link Parent
        Not particularly serious; most of what I'll be storing on there will be downloaded TV shows, books, etc., things that I could fairly easily download again if needed. There'll be important stuff...

        Not particularly serious; most of what I'll be storing on there will be downloaded TV shows, books, etc., things that I could fairly easily download again if needed. There'll be important stuff backed on it too though, photos, work documents, creative projects, but most of that I'll have on my main computer as well. Considering getting some quality cloud storage to complete the 3-2-1 backup system, but non-Google cloud storage isn't cheap unfortunately.

        With ECC it's mostly for peace of mind. Yeah the chances of me losing important data from RAM corruption on a non-ECC NAS are extremely low, but if I'm investing the time and money into building a NAS then it seems like it'd be more sensible to go for ECC support just to have it and then not have to worry about it at all. The problem, of course, is that you're vastly more limited with parts in an ECC supported system, and those parts will be more expensive. Realistically it's not an important thing to have, but for every 10 people on the internet saying "it's a tiny thing that makes zero difference for a home server, don't bother", there's someone else saying "I lost a ton of data from RAM corruption, I'm never building a non-ECC system again". It's all a game of risk in the end I suppose, how much money I'm willing to throw at a thing versus the amount I'm willing to risk losing a bunch of files, even from an incredibly unlikely issue.

        2 votes
  3. [3]
    Eji1700
    Link
    Local server part 2, local access. They claim you can just throw a .local url on an app and it'll handle it in mdns. In practice....not so much. Still figuring out that part.

    Local server part 2, local access.

    They claim you can just throw a .local url on an app and it'll handle it in mdns. In practice....not so much. Still figuring out that part.

    2 votes
    1. [2]
      zestier
      (edited )
      Link Parent
      In my experience the roughest part of using .local URLs is that some clients don't handle it by default. The first time this bit me I spent a lot of time thinking I'd configured it wrong somehow...

      In my experience the roughest part of using .local URLs is that some clients don't handle it by default. The first time this bit me I spent a lot of time thinking I'd configured it wrong somehow before finally realizing it was just that I needed to install something else on the client machine because it wasn't even attempting to support .local with the default resolution settings.

      1 vote
      1. Eji1700
        Link Parent
        So in theory Cosmos Cloud handles it, and has a nice little "check this box" for it, but I believe it's the router not playing nice with it. The local box has the .local domain, i have, once, been...

        So in theory Cosmos Cloud handles it, and has a nice little "check this box" for it, but I believe it's the router not playing nice with it.

        The local box has the .local domain, i have, once, been able to access a .local domain from another machine on another vlan, as intended, but i haven't been able to replicate. Not even sure where to go for logs on this one so i'm probably doing my writeup soon and then i'll see what people say.

        2 votes
  4. [5]
    googs
    Link
    Last week I started experimenting with building a map viewer for creating and viewing maps for TTRPG games. Something akin to Roll20 or other VTTs but with a focus on supporting larger world maps...

    Last week I started experimenting with building a map viewer for creating and viewing maps for TTRPG games. Something akin to Roll20 or other VTTs but with a focus on supporting larger world maps and serving large resolution map images with good performance. I'm inspired by this Map Genie website that lets you view video game maps. I'd like to create something similar, but for my own custom maps.

    I originally started building something in React and got pretty far with a tiling system for viewing map tiles, but then discovered MapBox. From what I can tell, that Map Genie website is using MapBox under the hood as well which is why I think it might be a viable solution.

    Over the weekend, I got stuck trying to set up my own map tiles service. There are some tools I found for doing this and I started trying to load some large images into PostGIS (postgres database with mapping/geo extension), but was running into a lot of issues (queries timing out, commands not working on Windows, among others). I'll probably try to pick it back up soon, but if anyone here has MapBox/PostGIS experience and is willing to share, I'd love to learn!

    2 votes
    1. [2]
      xk3
      (edited )
      Link Parent
      PostGIS is great for vector data but for images it's a lot easier to use a tile server: https://github.com/DHI/terracotta https://github.com/developmentseed/titiler...

      PostGIS is great for vector data but for images it's a lot easier to use a tile server:

      Just use QGIS or gdal_translate to save your images to something like Cloud Optimized GeoTIFF first

      ALTHOUGH! I read this the other day and it seems like what you might want:

      https://news.ycombinator.com/item?id=45382300

      The idea is to use ST_GeneratePoints and ST_VoronoiPolygons. Two vector PostGIS functions to randomly build land

      2 votes
      1. googs
        Link Parent
        Awesome, thank you! I'll have to give those tools a try this weekend.

        Awesome, thank you! I'll have to give those tools a try this weekend.

    2. [2]
      Gazook89
      Link Parent
      So this is for creating world maps? Just want to clarify, since there is a big difference between viewing and creating. I tinkered for a brief moment with a TTRPG map viewer that was going to use...

      So this is for creating world maps? Just want to clarify, since there is a big difference between viewing and creating.

      I tinkered for a brief moment with a TTRPG map viewer that was going to use leaflet.js. It would allow importing a larger world map, and then at closer zoom levels display battle maps, so you could smoothly zoom from large world view to a specific battle or town map. And, set the maps to certain time periods on a unified timeline, so as you shift through the timeline battlemaps would appear or disappear, allowing for changing environments.

      This was a couple of days of just trying to get started, but then i had a second child and I stopped all hobby stuff for a bit, and now i'm back to just the normal open source ttrpg project i contribute to (and by the way we are participating in Hacktoberfest).

      1 vote
      1. googs
        Link Parent
        This is really more me experimenting than anything else :) With that said, I started working on it because a friend and I were talking about running a sort-of "elden ring inspired" campaign, part...

        This is really more me experimenting than anything else :)

        With that said, I started working on it because a friend and I were talking about running a sort-of "elden ring inspired" campaign, part of the idea being that players would have a large world to explore with lots of optional points of interest. I thought it would be cool to make a map tool that gives players a shared map that expands as they explore. So, definitely more for world maps.

        I think I'm most interested in setting up the map viewer, but if I have the time/will, I think it would be cool to make a UI for creating maps, allowing me to upload images, mark points of interest, add tokens, etc.

  5. [6]
    zakhar
    Link
    Two recent personal projects. (1) I built a fictional ghost inspired web implementation of a popular word game involving a 4x4 grid of letters. (i.e. a multiplayer boggle clone named Booggle)...

    Two recent personal projects.

    (1) I built a fictional ghost inspired web implementation of a popular word game involving a 4x4 grid of letters. (i.e. a multiplayer boggle clone named Booggle) several years ago, but revamped it recently to try out a new to me tech stack (Deno, Vite, React, TS, etc) and make it look a little nicer. I also added a solver at the end to show you the words everyone missed and built a cool rainbow slider to pick your Boo's color.

    I also went down a weird internet rabbit hole when upgrading my dictionary from NWL2020 to NWL2023 and noticed that the word rhinoceroi had been removed. In their draft report (pdf) they noted that

    “rhinocerotes” is the newly added correct Greek plural, “rhinoceroi”* was erroneously added to Wiktionary in 2006 and subsequently added to dictionary.com

    On wiktionary, you can see the internet debate from that time, as well as the other hypercorrect words that the user had added (like avocadi, agendae, scenarii, and platypi).

    (2) I launched my first app today to the ios app store! It's a step counting game named Sherwalk that uses your real world step count to travel in game to various locations and follows pretty closely a couple Sherlock Holmes short stories (for now just The Red-Headed League, The Adventure of Silver Blaze, and The Adventure of the Speckled Band).

    There is tons of room for improvement, but after not touching it for about a month, I figured I should probably put it out there and see if there is any interest in me building it out further and adding new features and/or adventures.

    2 votes
    1. [5]
      jmpavlec
      Link Parent
      Do you have a link for the boggle game? Would love to try that out.

      Do you have a link for the boggle game? Would love to try that out.

      1. [4]
        zakhar
        Link Parent
        Sure! It’s at https://ari.blumenthal.dev/booggle/
        1 vote
        1. [3]
          jmpavlec
          Link Parent
          Gave it a go: https://imgur.com/a/KNOy9EB Seemed to work pretty well. Is there a concept of a room or something? Or is it a singleton instance? (Like anyone who goes to the site at that time joins...

          Gave it a go: https://imgur.com/a/KNOy9EB

          Seemed to work pretty well. Is there a concept of a room or something? Or is it a singleton instance? (Like anyone who goes to the site at that time joins the same game?). Would also be fun to see the count of words the other players are getting.

          I liked the post game stats and timeline of points. Well done!

          A page refresh wipes out the player so I had to start again.

          It plays a bit like the games I have been working on at https://gametje.com

          May try to make something similar for my own website 🙂.

          Thanks for sharing.

          1 vote
          1. [2]
            zakhar
            Link Parent
            Thanks for trying it out! Yeah, it's just a singleton instance right now. I probably should add some sort of lobby setup to it, but since it's usually just me and a couple friends playing, it...

            Thanks for trying it out!

            Yeah, it's just a singleton instance right now. I probably should add some sort of lobby setup to it, but since it's usually just me and a couple friends playing, it hadn't really warranted it.

            gametje looks really cool! If it is helpful at all for your site, the source code for Booggle is available at https://github.com/zkhr/booggle

            1 vote
            1. jmpavlec
              Link Parent
              Thanks! That will definitely help as a reference.

              Thanks! That will definitely help as a reference.

              1 vote
  6. [3]
    tomf
    Link
    this is hardly technical, but I'm so excited about it. Long story short, I have a 1440p screen as my main and I wanted a second monitor, but I don't really need a full monitor. I just need a...

    this is hardly technical, but I'm so excited about it. Long story short, I have a 1440p screen as my main and I wanted a second monitor, but I don't really need a full monitor. I just need a display for notes and stuff --- always text. I knew I wanted to run a super small monitor in portrait.

    Anyway, as it happens, a friend's partner installs signs and stuff and last year he removed a bunch of Samsung QBR13 displays from a store and they asked him to simply recycle them. These are relatively new displays -- not the best panel, but fine. They're 1080p, 13", and have a VESA mount.

    He kept a few of them but put them in a box in a closet, thinking they didn't work. Well, they work -- you just need to change the source. Now I have a mounted 13" monitor beside my screen and its a perfect fit. Vertically its almost the same size as my main screen -- a remarkable coincidence and perfect for my purpose.

    Its an IPS panel, so tweaking it to not look like a light-leaking mess took a little time, but I'm happy with it.

    tldr; got a 13" 1080p display with a VESA mount and HDMI.

    1 vote
    1. [2]
      Nsutdwa
      Link Parent
      This is a great idea - how do you get it to always display the notes you want it to? Do you ever turn it off (software or hardware)? Edit: perhaps my first question isn't very clear. Do you have...

      This is a great idea - how do you get it to always display the notes you want it to? Do you ever turn it off (software or hardware)?

      Edit: perhaps my first question isn't very clear. Do you have some way of forcing your OS to not use that monitor for whatever it fancies in the moment but only the note (app?) you want it to display there?

      1 vote
      1. tomf
        Link Parent
        i’m always going to have it on, but i can just turn it off and call it a day. i can also control it with a samsung remote. it runs like any other monitor, just smaller and more loved than the others.

        i’m always going to have it on, but i can just turn it off and call it a day. i can also control it with a samsung remote.

        it runs like any other monitor, just smaller and more loved than the others.

        1 vote