In article <2024Apr21.130030@mips.complang.tuwien.ac.at>,   
   Anton Ertl wrote:   
   >albert@spenarnc.xs4all.nl writes:   
      
   >>Are working directory relative file names mentionned in the standard?   
   >   
   >Forth-94 and Forth-2012 do not give any guarantees with respect to   
   >file names. I.e., a system is allowed to produce, e.g., an ior of -37   
   >(File I/O exception) when you call OPEN-FILE with every name, and   
   >produce an Error -37 on every INCLUDE. I wanted to change this, but   
   >one person actively opposed my proposals. I tried to cut down my   
   >proposal to a minimum (just defining directory separators and valid   
   >file names), but the opposition was still there, while the support   
   >that existed for my larger proposal evaporated.   
   >   
   >So this is not about standards requirements, this is about whether a   
   >system behaves in a useful way. Working-directory-relative filenames   
   >are a low bar, and appbench has been designed to cope with Forth   
   >systems that provide only that. In particular, the shell scripts for   
   >running the benchmarks always "cd" into the directory of the   
   >individual benchmark, because otherwise the INCLUDEs in the benchmarks   
   >would fail on VFX, SwiftForth, and iforth-2.1.   
   >   
   >But iForth-5.1-mini does not meet even this low bar:   
   >   
   >[c8:~/nfstmp/gforth-amd64:103150] /bin/pwd   
   >/nfs/nfstmp/anton/gforth-amd64   
   >[c8:~/nfstmp/gforth-amd64:103151] ls -l siev.fs   
   >-rw-r--r-- 1 anton 29015 572 Feb 13 2023 siev.fs   
   >[c8:~/nfstmp/gforth-amd64:103152] iforth   
   >AMD Ryzen 7 5800X 8-Core Processor x16 , TICKS-GET uses os time &   
   PROCESSOR-CLOC   
   >K 3000Mhz   
   > Do: < n TO PROCESSOR-CLOCK RECALIBRATE>   
   >   
   >FORTH> include siev.fs   
   >No such file or directory `siev.fs'   
   >Error -37   
   >can't open ?   
   >   
   >At least using an absolute file name works:   
   >   
   >FORTH> include /nfs/nfstmp/anton/gforth-amd64/siev.fs ok   
   >   
   >When I asked about that a while ago, IIRC the answer was that I should   
   >always be using absolute file names in iForth. As a result, I don't   
   >run any Forth programs consisting of more than one file on iForth (and   
   >often not Forth programs consisting of one file; if it's more than I   
   >usually cut and paste, iForth is too cumbersome).   
      
   That is astonishing.   
   My most simplistic OPEN-FILE works in the example you give.   
      
   >   
   >- anton   
      
   Groetjes Albert   
   --   
   Don't praise the day before the evening. One swallow doesn't make spring.   
   You must not say "hey" before you have crossed the bridge. Don't sell the   
   hide of the bear until you shot it. Better one bird in the hand than ten in   
   the air. First gain is a cat purring. - the Wise from Antrim -   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|