[Ur] Library for reading external files

Adam Chlipala adamc at impredicative.com
Tue Jan 10 08:25:44 EST 2012


Taru Karttunen wrote:
> On Mon, 09 Jan 2012 08:01:27 -0500, Adam Chlipala<adamc at impredicative.com>  wrote:
>    
>> Does your library maintain the transactional abstraction?  That is, if I
>> read a file twice within an Ur/Web page handler, and the file has been
>> modified from the outside between the first and second reads, will the
>> two blobs returned be different?
>>      
> They will be different. I think that reading the file is like getting a
> random number, something unknown will come out.
>    

That's certainly a well-defined semantics.  In some applications, one 
might want to maintain invariants across the contents of files, so that 
reading values x of file A and y of file B would always yield results 
such that P(x, y), for some invariant P.  You can't get that kind of 
semantics if you don't do some explicit work to present consistent 
snapshots of the full filesystem.  (Personally, I'm very against 
filesystems, period, which you can see reflected in the set of 
operations in the Ur/Web standard library. :])



More information about the Ur mailing list