I make things: electronics and software and music and stories and all sorts of other things.

  • 0 Posts
  • 45 Comments
Joined 1 year ago
cake
Cake day: June 14th, 2023

help-circle



  • And yeah I know about NixOS but I like to distro hop and experiment

    If you know about NixOS, then you probably know this, but Nix, the package manager/the language behind NixOS, is cross-platform.

    I daily drive NixOS, but I also use Nix (and home-manager) on my Fedora music laptop, my Ubuntu home file-server, and my work Windows machine (WSL) to install and configure neovim automatically instead of copying a config, installing all the packages, and running check health over and over again until everything is set up.

    I just copy my neovim.nix file over (also other things like zsh.nix) and run home-manager switch

    You don’t have to use NixOS to take advantage of its benefits.















  • Here’s how I think it works

    In formal language, what it means to accept a verification means does the result fall into the list of acceptable values.

    Consider adding two 2-bit numbers:

    • Alphabet: { 0, 1}
    • Language: x x consists of four binary digits representing two 2-bit binary numbers where the result of adding these two numbers is a valid 2-bit binary number (i.e. falls between 00 and 11)
    • Then you have an automata that will:
      • Start from the rightmost bit
      • Add the corresponding bits (+ carry from any previous iterations)
      • Carry over to the left if needed
      • Repeat for both bits
      • Check for acceptance
    • Machine as a whole simply checks did the inputs produce a valid 2-bit number, so it just accepts or rejects

    The machine itself simply holds this automata and language, so all it does is take input and reject/accept end state. I think you’re just getting caught up in definitions

    A sum of a list of numbers I think would be something like

    • Alphabet: digits 0-9 and ‘,’
    • Language: a single string of digits or a single string of digits followed by a comma and another valid string
    • Automata:
      • Are we a single string of digits? If yes, accept
      • Sum the last number into the first and remove the comma
      • Repeat
    • Machine: Does the some operation result in a valid string?

    Machines accept a valid state or hit an error state (accept/reject). The computation happens between the input and accept/reject.

    But maybe I don’t understand it either. It’s been a while since I poked around at this stuff.