Re: [nhc-bugs] Building nhc98 on Windows 2000

The file-removal assumes the unix-like property that you can unlink a file while it still has a (lazy) reader attached to it, and the file contents will stick around until the reader has finished with it. It is perfectly possible to create a new (different) file with the same name as the old one whilst the old one is still being read.
Ah, I had almost forgotten about that old magic:) Old wizards used to say: don't use magic for ordinary tasks.
Magic? It's just data-structure persistence and automatic garbage collection, both of which are ideas we love in functional programming. Should I avoid higher-order functions and laziness, since many imperative programmers regard them as magic too?
"Any sufficiently advanced technology is indistinguishable from magic." Sir Arthur C., I think;-)
It may be cute that it works on real systems, but it isn't really needed here, so why not go for the ordinary, boring way?
Working out a decent way of forcing exactly the right degree of evaluation to match the broken operating system is much harder than doing it the natural lazy way!
One of the author's of the three additions to Asimov's Foundation series managed to let one of the characters paraphrase the above: "Any technology distinguishable from magic is insufficiently advanced." Seems to fit some overblown window-managers.. But wouldn't it be possible to imitate the unix behaviour by making temporary copies (using tmpnam & system cp, if neccessary), at least for readFile & hGetContents, and omitting that indirection step on "real" oss (which do all that behind the scenes)?
Btw, thanks for your help in tracking down these issues, Claus. It never fails to surprise me how many seemingly-small incompatibilities there are between Cygwin and real Unix, and how easy it is to trip over them.
You're welcome. I wouldn't want you to give up on including windows in portability considerations:-) And without Cygwin&co., I couldn't survive for long on windows systems (imagine having to buy each and every tool, starting from compilers..). Often, I wait until others find and fix the new-release bugs; this time, it's my turn to help.. Cheers, Claus
participants (1)
-
C.Reinke