News for hackers. Stuff that matters.
Re:Watchman: Execute a command when something changes by jitl on Wednesday October 05, 2022 @09:35AM (#33095389)
Not to be confused with Facebook’s file watch daemon, also names watchman, which does the same sort of thing but is more complicated. There’s a bunch of tools that integrate Facebook’s watchman for more efficient change tracking.

Advantages of Facebook’s watchman:

1. Implements efficient file system event watches on macOS and Windows

2. IPC/daemon system reduces resource use because overlapping watches/triggers don’t use more inotify slots.

3. Denounces / waits for changes to settle

4. Client libraries in a few different languages for scripting purposes

https://facebook.github.io/watchman/

Re:Watchman: Execute a command when something changes by martincmartin on Wednesday October 05, 2022 @11:17AM (#33096653)
If you sign up for notifications on both github projects, you can watch the watchmen.
Re:Watchman: Execute a command when something changes by c54 on Wednesday October 05, 2022 @11:59PM (#33104230)
use facebook's watchman to watch changes to the source for OPs watchman to commit changes to the source of facebook's watchman to commit changes to OP's
Re:Watchman: Execute a command when something changes by Manu40 on Wednesday October 05, 2022 @01:05PM (#33098219)
But then, who watches the watcher?
Re:Watchman: Execute a command when something changes by adhesive_wombat on Wednesday October 05, 2022 @01:51PM (#33098878)
Microsoft, via the analytics on GitHub.
Re:Watchman: Execute a command when something changes by MengerSponge on Wednesday October 05, 2022 @05:56PM (#33101698)
Ok, but then who watches the watchmen watcher?
Re:Watchman: Execute a command when something changes by Wherecombinator on Thursday October 06, 2022 @03:39AM (#33105555)
Coastguard
Re:Watchman: Execute a command when something changes by kbenson on Wednesday October 05, 2022 @10:23PM (#33103585)
The SEC.

Oh, who am I kidding. Nobody, obviously.

Re:Watchman: Execute a command when something changes by Manu40 on Wednesday October 05, 2022 @02:15PM (#33099175)
Hardly comforting, but okay.
Re:Watchman: Execute a command when something changes by jinnko on Wednesday October 05, 2022 @04:39PM (#33101004)
Q
Re:Watchman: Execute a command when something changes by dustymcp on Thursday October 06, 2022 @06:26AM (#33106567)
Dr. dre ofcourse.
Re:Watchman: Execute a command when something changes by graypegg on Wednesday October 05, 2022 @11:28AM (#33096809)
It’s a good day when I can get a laugh out of HN heh
Re:Watchman: Execute a command when something changes by dec0dedab0de on Wednesday October 05, 2022 @10:35AM (#33096094)
Also not to be confused with watchdog and it's command watchmedo, which is what I thought this was when I first read the headline. I don't know what the differences are, but I use watchdog to restart my local celery workers when I make changes. It's scripted out so I don't ever use the command directly.

https://pypi.org/project/watchdog/

https://github.com/gorakhargosh/watchdog

EDIT: Now I'm wondering how often I miss out on something because I confuse it for something I already use. Maybe there is room for a "things I use" or "things I know about" browser plugin.

Re:Watchman: Execute a command when something changes by ghassanmas on Wednesday October 05, 2022 @11:09AM (#33096537)
Also to note "watchdog" the term. Is used also in hardware/software context. Usually as a way to mitgate or recover system faulate. I first I heard of this term while taking in a course about PIC microcontroller[1].

> The Watchdog Timer in the PIC16F819 The watchdog timer can be a real source of pain and can also make a PIC system incredibly robust and reliable. But what exactly is the watchdog timer? Simply put, the watchdog timer is a hardware timer in the PIC that, if not constantly reset by the software, will cause the PIC to reset. This feature can be incredibly useful if the PIC should hang due to a hardware or software issue and guarantees that the PIC will restart from the beginning. Not only does it reset the system, it also flags a bit that can be used to determine if the system just crashed.

Ref: https://maker.pro/pic/tutorial/how-to-get-started-with-pic-m...

[1]: PIC microcontroller, is a small hardware simliar to arduino but more on a lower level.

Re:Watchman: Execute a command when something changes by damagednoob on Wednesday October 05, 2022 @05:03PM (#33101230)
Also not to be confused with watchexec (my tool of choice for executing commands on file changes):

https://github.com/watchexec/watchexec

Re:Watchman: Execute a command when something changes by hamparawa on Thursday October 06, 2022 @01:17AM (#33104633)
Not to be confused with the Watchmen; the comic :)
Re:Watchman: Execute a command when something changes by HelloNurse on Wednesday October 05, 2022 @10:17AM (#33095867)
5. Windows is supported.
Re:Watchman: Execute a command when something changes by Semiapies on Wednesday October 05, 2022 @02:33PM (#33099472)
Alternately, Facebook's project is not to be confused with this significantly older one.
Re:Watchman: Execute a command when something changes by amenghra on Wednesday October 05, 2022 @05:49PM (#33101634)
Both projects are from around 2014.
Re:Watchman: Execute a command when something changes by jsmeaton on Wednesday October 05, 2022 @11:26PM (#33104017)
The Python integration seems to be abandoned unfortunately and isn’t keeping up with the parent. No longer works with django filewatching.
Re:Watchman: Execute a command when something changes by electromech on Wednesday October 05, 2022 @08:45PM (#33103024)
PSA: it doesn't work on Ubuntu 22.04. I wanted to use it a few months ago, and it's not yet fixed.
Re:Watchman: Execute a command when something changes by malkia on Wednesday October 05, 2022 @12:56PM (#33098098)
Also support for other OS's - like Windows.
Re:Watchman: Execute a command when something changes by giantg2 on Wednesday October 05, 2022 @01:00PM (#33098146)
I have just used some Power Shell scripts for stuff like this in the past on Windows.