[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Configuration management, revision 3



Wichert Akkerman wrote:
> I happen to like playing around with parsers and compilers. I'll see if
> I can come up with a nice design :). Even if the parser is (somewhat)
> complicated, we only need to implement it once.

Won't each frontend have to implement it?

I think we're going off on a pointless tangent. Let me ask you: how is this
proposal for a language implemented in the frontend different that the
original proposal for a shell script that that communicates with the
frontend? I don't see any significant differences. We've moved the language
into the frontend and changed the language from shell to something we think
up, those are the only differences I see.

Why don't we then just send the frontend a lump of shell code and use that
as our implementation language? The only reason I see why not is that then
the frontend would have to parse the shell code. Well, then, why not make
there be an interface between the shell code and the frontend (like the one
originally proposed, say) and the frontend just pasres that? Ok, if there's 
an interface we can move the shell code out of the frontend and into the 
backend, and we're back to the original proposal.

> (datum metoo/foo                                                                
>   (type yesno)                                                                  
>   (query "Do you want me to do foo?")                                           
>   (default yes))                                                                
> (if (yes? metoo/foo)                                                            
>   ((datum metoo/foo2                                                            
>      (type yesno)                                                               
>      (query "Do you want me to do foo2 as well?")                               
>      (default no))                                                              
>    (datum metoo/foo3                                                            
>      (type yesno)                                                               
>      (query "What about foo3?")                                                 
>      (default yes)))                                                            
>   (datum metoo/bar                                                              
>      (type yesno)                                                               
>      (query "Well then do you want me to do bar?")                              
>      (default yes)))                                                            

How is this different from:

#!/bin/sh -e
echo 'INPUT "Do you want me to do foo?" yesno metoo/foo'
echo 'GO'
echo 'RESET'
echo 'GET metoo/foo'
read foo
if [ "$foo" == yes ]; then
	echo 'BEGINBLOCK'
	echo 'INPUT "Do you want me to do foo2 as well?" yesno metoo/foo2'
	echo 'INPUT "What about foo3?" yesno metoo/foo3'
	echo 'ENDBLOCK'
	echo 'GO'
	echo 'RESET'
else
	echo 'INPUT "Well then do you want me to do bar?" yesno metoo/bar'
	echo 'GO'
	echo 'RESET'
fi


--  
To UNSUBSCRIBE, email to debian-policy-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org


Reply to: