[Swift-devel] Wishlist: array elements assignment

Yong Zhao yongzh at cs.uchicago.edu
Fri Mar 16 13:17:24 CDT 2007


Yeah, I actually thought about making the regexp_mapper to deal with an
array of items.

Yong.

On Fri, 16 Mar 2007, Tiberiu Stef-Praun wrote:

> -------- excerpts from the code ----
> (file out) solver (file in){
>     app{
>         solve @filename(in) stdout=filename(out)
>     }
> }
>
>
> (file solutions[]) problemset (file inputfiles[]){
>         // _input_ is the file item, _i_ is its index
>         foreach file input,i in inputfiles {
>                 //FIXME: this one is an alternative that it would be
> nice, because I could build the output filenames from input file names
> on the fly
>                 file
> solutions[i]<regexp_mapper;source=@input,match=(.*),transform="\1.out">;
>                 solutions[i]=solver(input);
>         }
> }
>
> file problems[]<filesys_mapper; prefix="X", suffix="*.gz">;
>
> //FIXME: alternative option for output file naming: declare them with
> a regexp-like mapper from the input files:
> file solutions[]<regexp_mapper;
> source=@filenames(problems),match=(.*), transform="\1,out">
>
> solutions=problemset(problems);
>
> -------------------------
>
> I'm open for alternatives
> I have N input files that I have to process, and generate N output files.
> I have complete control over the naming of the physical input and output files
> Currently, I was trying to do file  X.gz generates file X.gz.out
> (hence the regexp mapper, as a means of doing string concatenation).
>
> See the FIXME comments for my thoughts
>
> --
> Tiberiu (Tibi) Stef-Praun, PhD
> Research Staff, Computation Institute
> 5640 S. Ellis Ave, #405
> University of Chicago
> http://www-unix.mcs.anl.gov/~tiberius/
> _______________________________________________
> Swift-devel mailing list
> Swift-devel at ci.uchicago.edu
> http://mail.ci.uchicago.edu/mailman/listinfo/swift-devel
>



More information about the Swift-devel mailing list