bashing away

Matthew Fluet mfluet@intertrust.com
Sat, 28 Jul 2001 20:12:24 -0700 (PDT)


> Sounds good, although I really hate program that write to files provided as
> arguments in general.  How about having
> 	tokenizeMeaning -write
> just write to standard output, and if any argument is given it reads from it,
> but otherwise stdin.

Easy enough.

> (I don't care to much about the reading, but the
> writing can be significant).
> Actually, is the check really any faster than comparing the output?
> I.e., have a single program which just takes SML/NG on stdin and produces some
> encoded meaning on stdout such that identical meanings will be bit-for-bit
> identical.  Now I can save the meaning and just do the compared myself.
> I guess to be safe I would do it each time I find a smaller file in the
> directory before I remove the old winner.

Yes, but if all you want to do is check, then we don't need to write the
input document's meaning at all; for each decorated char, we read from the
reference meaning and do the comparison.  Now, it may be the case that
file IO in MLton is such that letting some external utility to the
comparison would be faster.  (Presumably working more than a word at a
time.)  Anyways, I can easily provide either one.