[TUHS] [COFF] Code/comment Ratios Style

Larry McVoy lm at mcvoy.com
Tue Jul 22 05:40:15 AEST 2025


Dan is spot on, almost, see below.

On Mon, Jul 21, 2025 at 02:37:04PM -0400, Dan Cross wrote:
> On Mon, Jul 21, 2025 at 1:32???PM Douglas McIlroy
> <douglas.mcilroy at dartmouth.edu> wrote:
> > Larry McVoy wrote
> > > Well, we had begin and end blocks.  And other than that, the whole thing
> > > is a wad that is called per line.  That was definitely awk inspired.
> >
> > The way I have used m4, a program is executed just once from top to bottom.
> > [snip]
> 
> I do not believe Larry is referring (directly) to M4 with this
> comment, but rather, referring to the language he used for the example
> he posted earlier, at:
> http://mcvoy.com/lm/bkdocs/dspec-changes-json-v.txt
> 
> That language is, if I understand correctly, an invention of Larry's,
> that drew inspiration from awk, and that he saw as an improvement over
> M4 for the purpose of making bitkeeper emit JSON.

It's a general purpose output language for stuff contained in BitKeeper.
:WHATEVER: digs the current graph nodes n->whatever.

The json dspec is an example of that language being told to emit JSON, 
but you can write dspecs for anything.  
Think git log --dspec-file=/path/to/dspec 
and now you can have any output format you like.

I sort of mislead people when I said it was like awk, it sort of is,
but each awk line is a revision in the graph you are looking at.
So the dspec runs on each revsision.
-- 
---
Larry McVoy           Retired to fishing          http://www.mcvoy.com/lm/boat


More information about the TUHS mailing list