Hacker News

Subscribe to Hacker News feed
Hacker News RSS
Updated: 56 min 47 sec ago

Ask HN: How do you model temporarily invalid data structures

Tue, 05/26/2026 - 3:56pm

Say you’re making a chess game. A valid board only has one piece per square, or zero. But, you have an algo that generates boards by moving pieces around and during that algo you may move a piece on top of another and then later decide to move one of them to get back to valid.

Do you try to use some existing Board type and just avoid in your algo those invalid states (like by using a stack or some data structure to avoid iteratively moving pieces one at a time).

Do you have a separate InvalidBoard type that allows multiple pieces per square?

I think it’s context dependent but I’m curious how you’ve seen this handled in different ways.

Comments URL: https://news.ycombinator.com/item?id=48285139

Points: 1

# Comments: 0

Categories: Hacker News

Sinclair-O-Matic

Tue, 05/26/2026 - 3:55pm

Article URL: https://dpt.github.io/SinclairLogo/

Comments URL: https://news.ycombinator.com/item?id=48285123

Points: 2

# Comments: 0

Categories: Hacker News

Show HN: Privacy-first notification blocker for Android ad-free

Tue, 05/26/2026 - 3:54pm

Article URL: https://permly.app

Comments URL: https://news.ycombinator.com/item?id=48285116

Points: 1

# Comments: 0

Categories: Hacker News

Llamas on the Web

Tue, 05/26/2026 - 3:13pm
Categories: Hacker News

Show HN: TUI to keep track of local GSD (get-shit-done) projects

Tue, 05/26/2026 - 3:12pm

GSD is great for project management making it possible to run multiple projects at once. My multi-tasking skills can't keep up at the same pace, hence a utility to help me keep track of the projects.

cargo install gsd-meta-manager

TUI for: - GSD milestone and phase progress - git history - open milestones - backlog - browser for the GSD markdown artifacts - tmux support to quickly jump into the project's running claude instance

All feedback, improvements, PR and questions are welcome.

Comments URL: https://news.ycombinator.com/item?id=48284484

Points: 2

# Comments: 0

Categories: Hacker News

Pages