10 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. Barney
    Link
    I took a short break from working on my anime tracker and decided to tackle one of the issues that's been bugging me lately: my application windows not being centred automatically. So wrote a...

    I took a short break from working on my anime tracker and decided to tackle one of the issues that's been bugging me lately: my application windows not being centred automatically.

    So wrote a little applet for the Niri compositor that reads the event stream and centres all visible columns whenever something changes. Turns out this was much easier to do than I initially anticipated, and the result made my experience much better.

    https://codeberg.org/Sylphrena/Niri-auto-centre-columns

    Aparte: This also serves as a reminder than if something is bothering you, before putting it off, at least evaluate the effort it would take to fix. Chances are, it's less than you think!

    6 votes
  2. [3]
    Apos
    Link
    I'm been doing more iterations on my chess variant: https://apostolique.github.io/AposChess/ The neural net that I'm training is getting better though gains are starting to slow down by a lot. I...

    I'm been doing more iterations on my chess variant: https://apostolique.github.io/AposChess/

    The neural net that I'm training is getting better though gains are starting to slow down by a lot.

    I had done a similar project back in 2012. Chess projects are huge rabbit holes. Nowadays, the state of the art of writing chess engines is NNUE. It's really cool how you're not training the engine to learn to play the game, but to evaluate a position. It doesn't know anything about what a valid move is. You feed it a bunch of board positions and then it evaluates the board. And a trick to improve the evaluation is to only train on quiet board positions. You remove all the boards after a piece captures or when there are checks.

    I also got an engine that plays the worst move every time. (It's in handcrafted -> Lemming.)

    Developing this using an LLM is pretty interesting, it feels more like I'm playing a game of Civilization than development. It's like a turn by turn game. Starting a new game is fast, but then you spend a lot of time moving your pieces into the late game and you realize you're a few hours later.

    2 votes
    1. [2]
      bitshift
      Link Parent
      That NNUE link is pretty neat, thanks! I knew neural networks were being used in chess engines, but that was my first time reading about practical details. Out of curiosity, how are you liking...

      That NNUE link is pretty neat, thanks! I knew neural networks were being used in chess engines, but that was my first time reading about practical details.

      Out of curiosity, how are you liking Zig? I saw you were using it for generating WASM; I've been itching to try Zig but haven't yet found the right place to use it.

      1 vote
      1. Apos
        Link Parent
        I'm a big fan. I haven't used it too much yet, but I really like where it's going. Been following it for at least 5 years. Andrew Kelley's posts and interviews are great to listen to. In this...

        I'm a big fan. I haven't used it too much yet, but I really like where it's going. Been following it for at least 5 years. Andrew Kelley's posts and interviews are great to listen to.

        In this project, it's not only for wasm, I also run the engine locality to generate a lot of data to train the neural net on. It's sooooo much faster than the JavaScript version.

        1 vote
  3. skybrian
    Link
    I changed the front page of my personal links website from two columns to one. It’s roughly reverse-chronological order except that posts are grouped by subject. The groups are just tags that I...

    I changed the front page of my personal links website from two columns to one. It’s roughly reverse-chronological order except that posts are grouped by subject. The groups are just tags that I have pinned.

    1 vote
  4. edoceo
    Link
    Aggrigating together deals and reviews of cannabis brands and products. It started because shopping for my preferred tincture required visiting five different slow ass sites, with crappy search to...

    Aggrigating together deals and reviews of cannabis brands and products. It started because shopping for my preferred tincture required visiting five different slow ass sites, with crappy search to see who had availability - and what price. It's got some feature creep happening now.

    1 vote
  5. text_garden
    Link
    I'm making a general utility for MIDI processing with JACK. I've ended up writing a few single-purpose utilities for MIDI (e.g. for splitting a keyboard across two channels and there are a bunch...

    I'm making a general utility for MIDI processing with JACK. I've ended up writing a few single-purpose utilities for MIDI (e.g. for splitting a keyboard across two channels and there are a bunch more I would make if I could be arsed to do this kind of setup every time. So the idea of a generalized processing utility came to mind.

    I'm building a virtual machine and a simple dynamically typed language for the purpose. Mostly for the fun of it, but also because the program will run in the audio callback, so it's good if it's predictable and free of heap allocations which I can design for. The idea is that it should only allow heap and stack allocations, and the only datatypes are floats and string constants. Maybe not even strings, but it's on the table for now because they could be useful for logging.

    As a challenge to myself that I can't justify techincally, I also want to make the compiler itself free of heap allocations. In terms of my design this means that source code will be loaded into one big buffer, and VM instructions will be emitted to another. Parsing is done using a tokenizer with a fixed-size lookahead queue of tokens and a recursive descent parser where leaf functions generate code to the output buffer directly, and a stack of name-address/stack offset assignments. I remember reading that this is how Turbo Pascal works; there's no intermediate abstract representation of the source beyond the tokenization.

    I've only written the tokenizer so far, and a wrapper which provides the lookahead queue.

    1 vote
  6. kej
    Link
    My job wants us using Claude Code, and one day I was bored and told it to spend the rest of the session talking like an old timey pirate. It made the boring computer interaction slightly more...

    My job wants us using Claude Code, and one day I was bored and told it to spend the rest of the session talking like an old timey pirate. It made the boring computer interaction slightly more entertaining, so that turned into a project to make it pick a different silly personality every time it starts: https://www.github.com/x-kej/claudius