<<< Date Index >>>     <<< Thread Index >>>

Re: Poll: personal convenience vs. global improvement of docs



* Derek Martin <invalid@xxxxxxxxxxxxxx> [2006-05-26 06:58 -0400]:
> On Fri, May 26, 2006 at 11:15:56AM +0200, Nicolas Rachinsky wrote:
> > No. You can't reliably convert an awk script generating mutt config
> > files. You can't reliably convert variable names in macros or push
> > commands.
> 
> For every one existing variable name, there will be exactly one new
> variable name.  How can you not reliably convert any text document
> which contains them if that is true?

Because awk is turing complete (halting problem etc.).

The variable name must not be in one string constant, it can be
cunstructed from multiple ones.

You can not know, wether a string constant is the name of a variable
or something else.

And in different languages string constants might look different
(e.g. perl's quote-like operators or the shell's here document).

completely made up and probably quite useless:
--
#!/usr/bin/perl

for(qw(mime_forward hide_missing))
{
        open IN,"<folder_$_";
        print "folder-hook . set $_=no\n";
        while($a=<IN>)
        {
                chomp $a;
                print "folder-hook $a set $_=yes\n";
        }
        close IN;
}
--

Nicolas

-- 
http://www.rachinsky.de/nicolas