Readit News logoReadit News
yar-kravtsov commented on Show HN: Write Go code in JavaScript files   npmjs.com/package/vite-pl... · Posted by u/yar-kravtsov
nsonha · 2 months ago
seems like an unintuitive idea that could have only come from someone infected by react/vercel. The natural way that most would think about this is just write go in a go file and have an import attribute or macro
yar-kravtsov · 2 months ago
Fair take! Though, this was literally built as a joke in response to @ibuildthecloud's tweet. Sometimes the dumbest ideas are the most fun to prototype.
yar-kravtsov commented on Show HN: Lnk – Git-native dotfiles manager   github.com/yarlson/lnk... · Posted by u/yar-kravtsov
peterhadlaw · 7 months ago
How is this different from GNU stow?
yar-kravtsov · 7 months ago
Great question! GNU Stow and lnk solve similar problems but with different approaches:

GNU Stow: - Package-based structure: Requires organizing dotfiles into "packages" (subdirectories) - Symlink-only: Just handles symlinking, no version control integration - Manual Git: You manage Git separately (git clone → stow package-name) - Perl dependency: Requires Perl to be installed - No safety net: No atomic operations or rollback if something goes wrong

lnk: - File-based workflow: Takes your existing dotfiles as-is, moves them to managed location - Git-integrated: Wraps Git commands (lnk push, lnk pull) for seamless workflow - Atomic operations: If something fails, automatically rolls back changes - Single binary: No dependencies, just download and run - New machine workflow: lnk init -r repo && lnk pull handles clone + restore in one step

Key Difference in Workflow:

Stow approach: # Organize files into packages first mkdir -p ~/.dotfiles/vim/.config/nvim mv ~/.config/nvim/init.lua ~/.dotfiles/vim/.config/nvim/ git add . && git commit # On new machine: git clone repo ~/.dotfiles stow vim # Creates symlinks

lnk approach: # Start with files where they are lnk add ~/.config/nvim/init.lua # Moves and links automatically lnk push "added nvim config" # On new machine: lnk init -r repo && lnk pull # Clone + restore in one command

Bottom line: Stow is a pure symlinking tool that you combine with Git manually. lnk is an opinionated workflow that handles the entire dotfiles lifecycle (move → version → sync → restore).

Deleted Comment

u/yar-kravtsov

KarmaCake day72April 21, 2024View Original