7 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. [10]
    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.

    3 votes
    1. [9]
      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. [8]
        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. [7]
          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.

          1 vote
          1. [6]
            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. [5]
              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. [4]
                lynxy
                Link Parent
                Wow is st fast, but unfortunately- same issue occurs!

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

                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. [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. 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/...
                      1 vote
  2. [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.

    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.

        1 vote
  3. [3]
    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!

    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.