Sign in

iiinova is part of the Atmosphere — an open, public network where you own your identity.

Chris Vincent

@machinesareforpeople.com
17 followers 42 following 111 posts

Software craftsman of over 20 years. Love Elixir, Gleam, NixOS, NeoVim, and Jujutsu. Been getting to know Rust. Currently migrating a legacy codebase to Elixir from Ruby. Machines are for people, not the other way around.

PostsRepliesMedia
Chris Vincent @machinesareforpeople.com · 11/08/2026
Today I found dbslice, an amazing tool for grabbing an anonymized slice of production data with referential integrity: github.com/nabroleonx/d... And here's a #Nix package for it you can throw into a devshell:
        dbslice = pkgs.python3.pkgs.buildPythonApplication {
          pname = "dbslice";
          version = "1.0.1"; # Replace with the version you need
          src = pkgs.python3.pkgs.fetchPypi {
            pname = "dbslice";
            version = "1.0.1";
            sha256 = "sha256-gyvQT1UPK+ft8OTgQFTAb73RNP24YjQJxVXsBFCj2fM=";
          };
          doCheck = false;
          pyproject = true;
          build-system = [ pkgs.python3.pkgs.hatchling ];
          dependencies = with pkgs.python3.pkgs; [
            faker
            psycopg2-binary
            pyyaml
            rich
            typer
          ];
        };
010 1
Chris Vincent @machinesareforpeople.com · 08/08/2026
My favorite little function I define in all of my Elixir projects. #elixir-lang
Elixir code:

  def maybe(input, true, fun), do: fun.(input)
  def maybe(input, false, fun), do: input
030 3
Chris Vincent @machinesareforpeople.com · 25/07/2026
Finally, I have blessed iex with sane keybinds, a problem that has bothered me for _years_. Now it behaves a bit more like most shells, for easier context switching. Just a dash of tmux config. #elixir-lang
A bit of Nix extending some tmux config:

hm.programs.tmux.extraConfig = ''
  set-option -g @iex_check \
    "ps -o state= -o comm= -t '#{pane_tty}' | grep -iqE 'beam.smp'"
                                                                    
  bind-key -n C-d if-shell -F "#{E:@iex_check}" \
    "send-keys C-c" \
    "send-keys C-d"
                                                                    
  bind-key -n C-c if-shell -F "#{E:@iex_check}" \
    "send-keys '#iex:break' ENTER" \
    "send-keys C-c"
'';
110 1
Chris Vincent @machinesareforpeople.com · 13/07/2026
I have released vdir-calendar-notifier 0.2.0! - If a URL is parsed from the event, clicking the notification opens that URL - User-configurable snooze presets - Optional "Edit" button to open the iCalendar file in your default application - Refined relative time display tangled.org/machinesaref...
Example of a calendar event reminder notification.

An icon of a clock with an exclamation point.

Event is titled "test location", followed by https://asdf.com/ in the notification body, to test the event URL parsing.

The next line in the body is "in 57 seconds", indicating time remaining until the event start time.

Several possible notification actions are given:

- Snooze for 5 minutes
- Snooze for 10 minutes
- Snooze until 5 minutes before start
- Snooze until 10 minutes before start
- Edit
110 1
Chris Vincent @machinesareforpeople.com · 07/06/2026
I am unwell
      systemd.user.services.swaync.Service.ExecStart = lib.mkForce (
        toString (lib.getExe swaync.scripts.swaync-start)
      );
110 1
Chris Vincent @machinesareforpeople.com · 23/05/2026
This example is using jj.nvim to open a previous version of the file in the current buffer, optionally in a split, and optionally in diff mode with scrollbind. The fzf_file_change_ids is just a simple wrapper script that looks like this:
file="$1"
shift

jj log -r "files($file)" --color=always --ignore-working-copy -T fzf |
  grep -v "(elided revisions)" |
  fzf --ansi --height=~50% --delimiter='|' --with-nth='{1}' --accept-nth='{2}' "$@"
100 1
Chris Vincent @machinesareforpeople.com · 23/05/2026
An example of the picker in action. You just call it with a `cmd` that calls `fzf`, optionally some expected keys, and a callback that will be called with the selection and the key used, and will not be called at all if the picker was closed.
      vim.keymap.set("n", "<leader><c-a>", function()
        local path = vim.fn.expand("%")

        local key_to_split = {
          enter = "",
          ["ctrl-v"] = "wincmd v",
          ["ctrl-s"] = "wincmd s",
          ["ctrl-t"] = "tabnew %",
          ["alt-v"] = "wincmd v",
          ["alt-s"] = "wincmd s",
          ["alt-t"] = "tabnew %",
        }

        picker({
          cmd = NixToNvim.jj.fzf_file_change_ids .. " " .. path,

          expected_keys = {
            "enter",
            "ctrl-v", "ctrl-s", "ctrl-t",
            "alt-v", "alt-s", "alt-t",
          },

          callback = function(key, change_id)
            local diff = key:match("^alt-") ~= nil

            local setup_diff = function()
              if diff then
                vim.cmd.diffthis()
                vim.cmd("set scrollbind")
              end
            end

            vim.api.nvim_create_autocmd("BufEnter", {
              pattern = path,
              once = true,
              callback = vim.schedule_wrap(function()
                setup_diff()

                vim.cmd(key_to_split[key])
                file.open_target({ rev = change_id, path = path, })

                -- Couldn't get an autocommand to trigger, but this works
                vim.defer_fn(setup_diff, 10)
              end),
            })
          end,
        })
      end)
100 1