frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Open in hackernews

Poltergeist: File watcher with auto-rebuild for any language or build system

https://github.com/steipete/poltergeist
18•jshchnz•3d ago

Comments

dataflow•3h ago
If only life was so simple.

So file A gets saved... a rebuild starts... and now file B gets saved a few seconds later.

What do you do? Do you kill the build and start a new one? Do you wait for it to finish?

What about the race conditions - what if half the build process sees the old contents and the other half sees the new contents of some of the files - do you contaminate the output/cache? Do you even detect it to tell the user?

brendoncarroll•3h ago
All of those issues can be solved by doing an import of the changed file into the build system's content addressed store, and creating a new version of the entire input tree. You also don't need to choose between cancelling, waiting, or dropping. You can do 2 builds simultaneously, and anything consuming results can show the user the first one until a more recent one is available. If the builds are at all similar, then the similar components can be deduplicated at runtime.

These techniques are used in a build system that I work on[0]. Although it does not do automatic rebuilds like Poltergeist.

[0] https://github.com/wantbuild/want

dataflow•1h ago
> All of those issues can be solved

I've yet to see any build system solve these.

> by doing an import of the changed file into the build system's content addressed store, and creating a new version of the entire input tree.

That's going to be unusably slow and heavyweight for automatic rebuilds on a large repo. Maybe if you optimize it for a specific COW filesystem implementation that overlays things cleverly, it'd be able to scale. Or if your build tree avoids large directories and all your build tools handle symlinks fine, then you could symlink most things that don't change quickly. But I absolutely do not see this working on a large repo with the everyday filesystems people use. Not for a generic build system that allows arbitrary commands, anyway.

> You also don't need to choose between cancelling, waiting, or dropping. You can do 2 builds simultaneously

Do you have infinite CPU and RAM and money and time or something? Or are you just compiling Hello World programs? In my universe with limited resources this would not work... at all.

> These techniques are used in a build system that I work on[0].

And how exactly do you scale it the way you're describing with automatic rebuilds?

> Although it does not do automatic rebuilds like Poltergeist.

...ah.

flashgordon•1h ago
Nice. I built something similar but to be like the Air tool but instead of being only for Golang, it was for all my artifacts in a project. Very unopinionated, fast and light weight:

https://github.com/panyam/devloop

I want everything local – Building my offline AI workspace

https://instavm.io/blog/building-my-offline-ai-workspace
438•mkagenius•7h ago•136 comments

Ultrathin business card runs a fluid simulation

https://github.com/Nicholas-L-Johnson/flip-card
855•wompapumpum•13h ago•171 comments

Little-known leguminous plant can increase beef production by 60% (2022)

https://www.embrapa.br/en/busca-de-noticias/-/noticia/75361634/little-known-leguminous-plant-can-increase-beef-production-by-60
40•littlexsparkee•2h ago•10 comments

What makes a SuperAger?

https://news.northwestern.edu/stories/2025/08/what-makes-a-superager/
7•hhs•25m ago•1 comments

Tor: How a military project became a lifeline for privacy

https://thereader.mitpress.mit.edu/the-secret-history-of-tor-how-a-military-project-became-a-lifeline-for-privacy/
238•anarbadalov•9h ago•125 comments

Jim Lovell, Apollo 13 commander, has died

https://www.nasa.gov/news-release/acting-nasa-administrator-reflects-on-legacy-of-astronaut-jim-lovell/
358•LorenDB•6h ago•72 comments

Efrit: A native elisp coding agent running in Emacs

https://github.com/steveyegge/efrit
79•simonpure•6h ago•15 comments

Hacking Diffusion into Qwen3 for the Arc Challenge

https://www.matthewnewton.com/blog/arc-challenge-diffusion
40•mattnewton•3d ago•1 comments

Ask HN: How can ChatGPT serve 700M users when I can't run one GPT-4 locally?

266•superasn•5h ago•181 comments

Unmasking the Sea Star Killer

https://www.biographic.com/unmasking-the-sea-star-killer/
27•sohkamyung•3d ago•5 comments

How we replaced Elasticsearch and MongoDB with Rust and RocksDB

https://radar.com/blog/high-performance-geocoding-in-rust
185•j_kao•12h ago•48 comments

The surprise deprecation of GPT-4o for ChatGPT consumers

https://simonwillison.net/2025/Aug/8/surprise-deprecation-of-gpt-4o/
280•tosh•7h ago•250 comments

Build durable workflows with Postgres

https://www.dbos.dev/blog/why-postgres-durable-execution
92•KraftyOne•5h ago•35 comments

Astronomy Photographer of the Year 2025 shortlist

https://www.rmg.co.uk/whats-on/astronomy-photographer-year/galleries/2025-shortlist
161•speckx•10h ago•24 comments

My DIY modular charging station

https://arun.is/blog/diy-modular-charging-station/
14•surprisetalk•2d ago•5 comments

Why building a self-hosted SaaS is harder

https://www.getlago.com/blog/self-hosted-saas
16•FinnLobsien•3d ago•4 comments

Fire hazard of WHY2025 badge due to 18650 Li-Ion cells

https://wiki.why2025.org/Badge/Fire_hazard
74•fjfaase•2d ago•71 comments

Getting good results from Claude Code

https://www.dzombak.com/blog/2025/08/getting-good-results-from-claude-code/
233•ingve•11h ago•106 comments

Overengineering my homelab so I don't pay cloud providers

https://ergaster.org/posts/2025/08/04-overegineering-homelab/
196•JNRowe•4d ago•163 comments

The Day Novartis Chose Discovery

https://www.alexkesin.com/p/the-day-novartis-chose-discovery
6•quadrin•3d ago•1 comments

Window Activation

https://blog.broulik.de/2025/08/on-window-activation/
174•LorenDB•4d ago•94 comments

Apple's history is hiding in a Mac font

https://www.spacebar.news/apple-history-hiding-in-mac-font/
118•rbanffy•4d ago•23 comments

A robust, open-source framework for Spiking Neural Networks on low-end FPGAs

https://arxiv.org/abs/2507.07284
37•PaulHoule•4d ago•1 comments

Poltergeist: File watcher with auto-rebuild for any language or build system

https://github.com/steipete/poltergeist
18•jshchnz•3d ago•5 comments

Open SWE: An open-source asynchronous coding agent

https://blog.langchain.com/introducing-open-swe-an-open-source-asynchronous-coding-agent/
63•palashshah•9h ago•19 comments

HRT's Python fork: Leveraging PEP 690 for faster imports

https://www.hudsonrivertrading.com/hrtbeat/inside-hrts-python-fork/
64•davidteather•9h ago•82 comments

Telefon Hírmondó

https://en.wikipedia.org/wiki/Telefon_H%C3%ADrmond%C3%B3
77•csense•4d ago•16 comments

Backpropagating through a maze with candle and WASM

https://yberreby.com/discrete-maze-backprop-candle-wasm/
6•yberreby•2d ago•2 comments

Json2dir: a JSON-to-directory converter, a fast alternative to home-manager

https://github.com/alurm/json2dir
39•alurm•6h ago•15 comments

GPU-rich labs have won: What's left for the rest of us is distillation

https://inference.net/blog/what-s-left-is-distillation
66•npmipg•5h ago•35 comments