[m-users.] GitHub release: mercury-rinse-repeat. A simplistic file watcher -- action runner
Richard O'Keefe
raoknz at gmail.com
Mon Aug 15 20:25:39 AEST 2022
I liked the idea so much that I wrote my own 'rr'
in another language. There are problems, which I
noticed in my own program first. One I don't see
a way around is the distinction between 'this
file has changed in some way' and 'the series of
changes to this file has now reached a new stable
state where it is safe to look at.'
Of course the inotifywait(1) command, which relies
on the Linux inotify(7) interface, has precisely
the same issue. It can tell when a file that was
opened for writing has just been closed, so is
presumably in a stable state, but it can't tell
whether a file is in a stable state if it HASN'T
been closed, and just because file X is now ready
to look at doesn't mean that a connected series
of updates to X Y and Z have now reached a stable
point.
make(1) leaves the problem in the user's hands.
What we really need is a notion of "transaction"
built into the file system. (Oh, and a 50 cent
supercomputer would be nice too. (:-))
On Mon, 15 Aug 2022 at 18:21, Volker Wysk <post at volker-wysk.de> wrote:
> Thanks for sharing!
>
> Volker
>
> Am Sonntag, dem 14.08.2022 um 20:05 +0100 schrieb Sean Charles
> (emacstheviking):
> > Hi,
> >
> > In case anybody might be looking for some simple code that shows how
> > to call "C" code and also have a utility that watches files for their
> > modification timestamp(s) to change, then run a command and rinse-
> > repeat forever.
> >
> > It builds on a sample program I released last week, if you find it
> > useful my name was Sean, if not, my name was Donald.
> >
> > https://github.com/emacstheviking/mercury-rinse-repeat
> >
> > I wrote it to drive my Literate Programming tangle/weave tool which I
> > am almost ready to publish as well, it just needs some very minor
> > tweaks before it passes muster. It's fashioned after `noweb`, in fact
> > the syntax for blocks is the same, I took inspiration from it as I
> > have used it in the past to produce working sellable Drupal modules
> > back in the bad old days.
> >
> > The program is VERY simple and VERY naive but that's all I needed and
> > it works for me.
> >
> > Thanks for all the comments along the way,
> >
> > Sean.
> >
> > _______________________________________________
> > users mailing list
> > users at lists.mercurylang.org
> > https://lists.mercurylang.org/listinfo/users
>
> _______________________________________________
> users mailing list
> users at lists.mercurylang.org
> https://lists.mercurylang.org/listinfo/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurylang.org/archives/users/attachments/20220815/e426853b/attachment.html>
More information about the users
mailing list