Better HN
topnewbestaskshowjobs
Log inSign up

twp

981 karma · joined Oct 25, 2008 (18y ago) · 225 submissions

https://chezmoi.io https://github.com/twpayne
Submissions

comment 6d ago · link · parent

Print one of these. It makes the pogo pin connector much less annoying to use. https://www.printables.com/model/1816221-xteink-x4-pro-pogo-...

comment 2mo ago · link · parent

This reads like it was written by an LLM.

3.

The Unreadable Winter(drlennecefer.substack.com ↗)

2 points · by twp · 3mo ago · discuss

4.

Syncthing for Dotfiles: Sync vs. Manage(sumguy.com ↗)

17 points · by twp · 4mo ago · 3 comments

comment 7mo ago · link · parent

AI reviews are flaky - maybe correct 80% of the time - and everyone hates flakiness.

AI code reviews easily double the work in reviewing: you have to both review the original code and the AI code review. The AI code review can be 80% correct, but you never know which 80% is correct and which 20% is garbage, so you have to review all the AI's comments.

comment 11mo ago · link · parent

chezmoi has similar functionality, but it does install a binary on the target machine:

https://www.chezmoi.io/reference/commands/ssh/

7.

GitHub Actions broke caching on macOS(github.com ↗)

3 points · by twp · 1y ago · discuss

comment 1y ago · link · parent

deepwiki.com is untrustworthy AI slop. A true cancer.

deepwiki.com's generated page on my project contains several glaring errors. I hate to think of the extra support burden I will have to bear because of deepwiki.com publishing wrong information.

I asked the authors of the site (Andrew Gao) to remove their page on my project, but they ignored my request.

comment 1y ago · link · parent

This is really cool and innovative thinking, but anything aerodynamic does not scale linearly. It's really easy to make something light fall slowly. Baby spiders use "ballooning" -- a single thread -- to fall so slowly that they can travel far in thermal updrafts.

What's missing here is any evidence that the same cool parachutes will work on anything of significant mass, e.g. a parcel weighing 2kg or an average human weighing 80kg.

comment 1y ago · link · parent

Ah! Thank you! How can I update the story URL to point to GitHub's new dashboard feed?

comment 1y ago · link · parent

Original URL was https://github.com/dashboard-feed.

Presumably some HN mod changed the URL to point to something different?

12.

GitHub replaces dashbord feed with AI shit?(github.com ↗)

4 points · by twp · 1y ago · 6 comments

13.

Improving My Dotfiles Posture(benprisby.com ↗)

1 points · by twp · 1y ago · discuss

comment 1y ago · link · parent

> I know my way around emacs. vimdiff is a foreign country.

You don't have to use vimdiff. You can use any merge tool you want. See https://www.chezmoi.io/user-guide/tools/merge/.

> Often my changes are speculative or experimental. So I checkout, edit, apply and only then discover I’ve messed up. Or I can edit in place. Voila vimdiff!

> What’s the better way?

There are lots of options. See https://www.chezmoi.io/user-guide/frequently-asked-questions....

Personally, I tend to use `chezmoi edit` and then use git in my source directory to `git add -p . && git commit` the changes I want to keep and `git checkout` to discard the changes I don't want.

comment 1y ago · link · parent

Please can you open an issue or discussion for these questions on https://github.com/twpayne/chezmoi - this way more people will both be able to help and more people will see the answer.

comment 1y ago · link · parent

chezmoi includes secret scanning from https://gitleaks.io/ by default to catch when you accidentally add a file with a secret in it. To be even more confident, you should add gitleaks as a git hook to your repo however.

comment 1y ago · link · parent

https://www.chezmoi.io/reference/commands/merge-all/ might help you here - it opens your preferred merge tool for the dotfiles that have drifted.

comment 1y ago · link · parent

It's not a question of share everything or share nothing - with https://chezmoi.io you can choose exactly what you want to share:

* You can keep your entire dotfile repo secret by using any private git hosting, including your own git hosting or a private GitHub repo.

* You can keep individual files secret by using age or gpg encryption. If you repo is public, this only reveals the existence of the file, not its contents.

* You can keep individual parts of your dotfiles secrets, e.g. API keys, by encrypting them or storing them in your password manager. All popular password managers are supported.

Disclaimer: I'm the author of chezmoi.

comment 1y ago · link · parent

This is, without doubt, the greatest sequence of words on programming ever committed to magnetic storage.

comment 1y ago · link · parent

As the maintainer of several popular open source projects (e.g. https://chezmoi.io), the forms of help I appreciate the most are:

* User support. Answering questions in discussions, social media, and GitHub issues. This helps on multiple levels: it saves me time that I would otherwise have to spend, and builds a community around the project.

* Documentation improvements. Better documentation means less user support work and helps everybody.

* Issue reports with a clear, minimal, way to reproduce the problem.

* Pull requests that follow the contributing guidelines of the project. This means that they follow the project's conventions, include tests, don't break any existing tests, and so on.

I don't write open source software to make money. I write open source software because I enjoy building high-quality software and I get a buzz from helping people.

comment 1y ago · link · parent

Google are aware of the problem and are working on a fix: https://www.reddit.com/r/Chromecast/comments/1j7caui/comment...

Still very annoying.

comment 1y ago · link · parent

CLI tool to find duplicate files unbelievably quickly:

https://github.com/twpayne/find-duplicates

comment 1y ago · link · parent

Game of life implemented as sets in Clojure:

(defn neighbors [[x y]] #{[(dec x) (dec y)] [(dec x) y] [(dec x) (inc y)] [ x (dec y)] [ x (inc y)] [(inc x) (dec y)] [(inc x) y] [(inc x) (inc y)]})

(defn count-neighbors [world cell] (count (set/intersection (neighbors cell) world)))

(def rules #{[true 2] [true 3] [false 3]})

(defn live [world cell] (contains? rules [(contains? world cell) (count-neighbors world cell)]))

(defn evolve [world] (into #{} (filter #(live world %) (reduce set/union (map neighbors world)))))

Full source: https://github.com/twpayne/life/blob/master/clojure/src/life...

24.

Chezmoi adds policy on LLM-generated content to contributor guide(github.com ↗)

1 points · by twp · 1y ago · discuss

comment 2y ago · link · parent

How can I stop this bullshit from ever affecting my life?

comment 2y ago · link · parent

Keep a broad perspective: https://pivot-to-ai.com/

27.

Show HN: Generate Go structs from multiple JSON objects(github.com ↗)

1 points · by twp · 2y ago · discuss

comment 2y ago · link · parent

In my case, I have things like Github Personal Access Tokens stored in my password manager and then use chezmoi's templates to populate them in my dotfiles, for example:

https://github.com/twpayne/dotfiles/blob/master/home/dot_zsh...

This means that: 1. My secrets are safely stored in my password manager so I can share my dotfiles. 2. When I update the secret in my password manager it automatically gets updated in my dotfiles when I run `chezmoi apply`.

comment 2y ago · link · parent

stow's approach of using symlinks is extremely limiting. For example, it means you can't have templates (for small machine-to-machine differences and secrets) or encrypted files. chezmoi does have a symlink mode, like stow, but using symlinks has multiple downsides: https://www.chezmoi.io/user-guide/frequently-asked-questions...

chezmoi was actually inspired by Puppet, not stow.

Source: me, I'm the author of chezmoi.

12345
8