Harry Ohlsen wrote:

> On Sun, 12 Jan 2003 07:47, Louis Krupp wrote:
> 
>>The problem:  Read a structured file (the details are irrelevant)
>>and generate a program which, when run, would produce the original
>>file.  Modify the program, re-run it, and you have a relatively
>>easy way to change the original structured file.
> 
> I'm not going to second-guess you, because I assume you've thought about your 
> specific problem a heck of a lot, but perhaps there's a different approach 
> that would avoid the issue you've been hitting altogether.
> 
> It might be worthwhile giving a small example of the type of data you're 
> playing with and the kind of things you want to do by modifying the program.

The original data is binary, all shapes and sizes -- 8 bits, 16 bits,
32 bits, signed and unsigned integers, IEEE floating point.  Parsing
it isn't the problem.  Generating a program to reproduce the original
file isn't the problem.  The problem is running the monster once I've
created it;  g++ won't touch a program this big, and Ruby takes too
long to parse monster arrays.

We've been using generated C++ programs for a few years now, and
people like that approach.

I probably could have done this in Perl, but my boss would have been
less than pleased.  I could have learned Python, I suppose, but why
would I want to do that when I could be learning Ruby?

Louis