Just a basic programmer living in California

  • 19 Posts
  • 360 Comments
Joined 2 years ago
cake
Cake day: February 23rd, 2024

help-circle


  • I’m not an organizer for this community. But I also find the Quikscript literature compelling. Although an advantage of Shavian is that it has an established Unicode assignment, and corresponding fonts are in circulation. For example Shavian text renders correctly for me running the Thunder Lemmy client on Android without any special setup.

    The main criticism I’ve read of Shavian comes down to accommodating dialect differences. How you write "R"s and vowels is particularly issuous. You kinda have to pick a dialect as the one to canonicalize in spelling. But I think that applies to all phonetic alphabets - unless someone has come up with some very clever system of per-dialect glyph interpretation rules that I’m not aware of.



  • That’s not an unreasonable answer. But I find this thread a little frustrating. As I see it, it’s gone like this:

    • phpinjected: Why don’t I have a tool to do these non-hierarchical things?
    • frongt: You already have a tool that does those specific things.
    • hallettj: What could change to make that tool better suited for those non-hierarchical / tagging things?
    • frongt: Don’t use that tool to do tagging things. It’s the wrong tool.

    Why bring up hard links if people shouldn’t use them for the requested use case? I mean, I do think your original reply was interesting and relevant as a starting point to get to what I think OP has in mind. But that line of thinking does require getting into how to use hard links for a non-hierarchical workflow.

    I feel like OP was trying to start a discussion about what might be, if things were different. I tried to reply in the same spirit. I feel like I’m asking, “What if things were different?”, and I’m being told “It doesn’t work that way.” Which doesn’t feel like an especially helpful response to me.


  • We have hard links, but is there any good UI out there for them? I only know of using the ln command directly. Or put another way, do you know of anyone who actually uses hard links in a way similar to how a tagging filesystem would be used? What are the obstacles that prevent this use case from being easy or discoverable enough to be in common use?

    With a tagging system you can remove tags without fear of losing file data. But with hard links you could easily delete the last link without realizing that it’s the last link, and then the file is gone.

    That relates to another issue: in a tagging system you can look at file metadata to see all of the file’s tags. Is there a convenient way to do that with hard links? I see there is find . -samefile /path/to/one/link, but requiring a filesystem scan is not optimal.


  • Whoops! Guess I was wrong. After some experimenting it looks like the flake system parses, but does not evaluate flake.nix to read inputs. I also experimented with string concatenation, and that failed with the same error:

    nixpkgs.url = "github:nixos/nixpkgs" ++ "/nixos-25.05"; # error: expected a string or path, but got a thunk
    

    A “thunk” is an expression whose evaluation has been delayed. It’s a key piece of lazy evaluation. Remember that every expression in Nix is lazily evaluated.

    It looks only literal attribute set, string, and path expressions will work in inputs. I think that means it is not possible to split inputs over multiple files.



  • I think you can use import to load the expression from each file, and the // operator to combine imported attribute sets. Like this:

    Edit: This doesn’t work - see replies

    # flake.nix
    {
      inputs =
        import ./inputs/nixpkgs.nix //
        import ./inputs/nix-index.nix;
    
      # ...
    }
    
    # inputs/nixpkgs.nix
    {
      nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
      nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
    }
    
    # inputs/nix-index.nix
    {
      nix-index-database = {
        url = "github:Mic92/nix-index-database";
        inputs.nixpkgs.follows = "nixpkgs";
      };
    }
    




  • I haven’t tried it, but I know people use it to run Minecraft Bedrock Edition. Although I’m reading reports that that broke recently, so I’m not sure if it’s working at the moment.

    Minecraft BE is very frustrating - there is a native Linux build for Android, that works great when you can get it to run on a proper computer. But Microsoft’s authentication system makes it very difficult to do that. Minecraft Java Edition works without problems, and is probably the better Minecraft; but the two editions don’t interoperate without server mods, a lot of people run BE, and the kids want to be able to play online with their friends.




  • Oh yeah, I do find Helix interesting! I sometimes recommend it to people who don’t have a background with modal editing as a batteries-included option for getting started. I have tried it a little bit myself. It’s hard for me to give up leap.nvim and fugitive, which is holding me back.

    I’ve been meaning to try out dedicated git programs to see how comfortable I can be without fugitive. Tig is one that caught my eye. Or sometimes I even think about using Gitbutler because its virtual branch feature seems very useful, and I haven’t seen any other tool that does that.



  • I certainly see the value in this strategy! But I’m not going to give up my top-level aliases. I enjoy saving two keystrokes too much!

    Here are my most used aliases (these ones use Nushell syntax):

    alias st = git status
    alias sw = git switch
    alias ci = git commit
    alias lg = git log --color --graph '--pretty=format:%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
    alias push = git push
    

    I was also delighted to learn that I could get the same short aliases for corresponding fugitive commands in vim/neovim using the vim-alias plugin:

    -- This is a lazy.nvim plugin module
    return {
      'Konfekt/vim-alias',
      config = function()
        -- Shortcuts for git operations to match some of the shell aliases I have.
        -- For example, `:sw ` expands to `:Git switch `
        vim.cmd [[Alias sw Git\ switch]]
        vim.cmd [[Alias ci Git\ commit]]
        vim.cmd [[Alias pull Git\ pull]]
        vim.cmd [[Alias push Git\ push]]
        vim.cmd [[Alias show Git\ show]]
        vim.cmd [[Alias re Git\ restore]]
        vim.cmd [[Alias lg GV]]
      end,
    }
    

    Fugitive is very nice for integrating git workflows in the editor, and its commands have very nice tab completion for branches and such.


  • I have to dual boot for work, so every day I have to reboot into a different OS install. It’s on its own drive with its own bootloader, so I can’t use systemctl reboot --boot-loader-entry. But I was able get a smooth process using efibootmgr.

    This is my Nushell implementation:

    def boot-to [
      device: string@boot-devices # Identifier of device to boot to (e.g. 0003)
    ] {
      sudo efibootmgr --bootnext $device
      systemctl reboot
    }
    
    # This function exists to provide tab completion for boot-to
    def boot-devices [] {
      efibootmgr | parse --regex 'Boot(?<value>\S+)\* (?<description>(?:\w+ )*\w+)'
    }
    

  • I like mkcd! I have the same thing. Although what I use more is a function I pair with it that specifically creates a temporary directory, and cds to it. It’s useful for temporary work, like extracting from a zip file.

    These are my Nushell implementations:

    # Create a directory, and immediately cd into it.
    # The --env flag propagates the PWD environment variable to the caller, which is
    # necessary to make the directory change stick.
    def --env dir [dirname: string] {
      mkdir $dirname
      cd $dirname
    }
    
    # Create a temporary directory, and cd into it.
    def --env tmp [
      dirname?: string # the name of the directory - if omitted the directory is named randomly
    ] {
      if ($dirname != null) {
        dir $"/tmp/($dirname)"
      } else {
        cd (mktemp -d)
      }
    }