Code generation [was Re: Cameras Re: [Boston.pm] Tech/Social Meeting w/ Randal Schwartz]

2004-10-05 Thread Gyepi SAM
On Mon, Oct 04, 2004 at 10:32:51PM -0400, Mitchell N Charity wrote: Obligatory perl comment - TIMTOWTDI, and sometimes, a good way, regards both clarity and speed, is having perl read a BNF and write a parser in prolog, which does the parsing, and writes an AST in perl, which

Re: [Boston.pm] Re: Code generation

2004-10-05 Thread Kripa Sundar
Dear Gyepi, #!/bin/sh type=$1 if [ $type eq do ]; then groupadd bar useradd foo ... gpasswd -a foo bar ... elif [ $type eq undo ]; then userdel foo groupdel bar ... fi Thanks for the example. This is certainly an interesting technique. But

Re: [Boston.pm] Re: Code generation

2004-10-05 Thread Gyepi SAM
On Tue, Oct 05, 2004 at 08:48:28PM -0400, Kripa Sundar wrote: Thanks for the example. This is certainly an interesting technique. But I still fail to see why going from perl to sh(1) makes it easier to undo something. As it turns out, I have also implemented 'atomic' operations on groups of