Skip to content

chore: port from zig to go#50

Merged
water-sucks merged 141 commits intomainfrom
rewrite
Apr 28, 2025
Merged

chore: port from zig to go#50
water-sucks merged 141 commits intomainfrom
rewrite

Conversation

@water-sucks
Copy link
Copy Markdown
Collaborator

@water-sucks water-sucks commented Jan 9, 2025

I've decided to rewrite this application from Zig to Go.

Go suits this tool's much better, due to:

  • Interfaces (for abstractions like remote vs. local systems, flake vs. legacy systems/configs, etc.)
  • Command-line parsing and completions using cobra
  • Better semantics for higher-level stuff like efficient string concatenation without needing to think about lower-level details
  • bubbletea for more complex TUIs
  • Lack of need for a Nix FFI interface (that we can then bring in later with gonix)

And much more.

Completion for flags does not have to be handrolled here, and I can use
the same struct strategies. I will have to rethink context usage, but
this will work in the long run, considering the track record of GitHub
CLI (gh) and Hugo and other large applications using Cobra.
Well, turns out making --config and --color-always persistent flags
broke other commands using "-c" and "-C" shorthands, so I
removed them for now, since they should be rather uncommon to use
for most people.

Also, I forgor to update the Nix hash. Oops. I fucked up. Lol.
Also, make sure the chroot gets exec'ed properly.
This brings in horizontal scrolling support for viewports.
This was messing with the search placeholder, and would only render
the first character until this was fixed.
@water-sucks water-sucks marked this pull request as ready for review April 28, 2025 05:14
@water-sucks water-sucks merged commit 9c73406 into main Apr 28, 2025
1 check passed
@water-sucks water-sucks deleted the rewrite branch April 28, 2025 05:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant