home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / lisp / mcl / 1636 < prev    next >
Encoding:
Internet Message Format  |  1992-11-19  |  2.5 KB

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!darwin.sura.net!wupost!cs.utexas.edu!sun-barr!ames!data.nas.nasa.gov!taligent!apple!cambridge.apple.com!kieras%kirk.engin.umich.edu@srvr2.engin.umich.edu
  2. From: kieras@engin.umich.edu (David Kieras)
  3. Newsgroups: comp.lang.lisp.mcl
  4. Subject: file access FAQ
  5. Message-ID: <5c76363ca.000fb61@kirk.engin.umich.edu>
  6. Date: 19 Nov 92 14:40:28 GMT
  7. Sender: info-mcl-request@cambridge.apple.com
  8. Lines: 40
  9. Approved: comp.lang.lisp.mcl@Cambridge.Apple.C0M
  10.  
  11. This should be an FAQ:  What's a good way to access files in
  12. different directories in MCL, in a way that will not require code
  13. changes to run in other CL implementations or on other  Macs, and
  14. allows some independence of the directory hierarchy?   
  15.  
  16. That is, my code consists of many projects, which I like to keep
  17. in their own folders and sub-folders, but which share code which
  18. I want to have only a single copy of, and which exists at more
  19. than one level.  Some of the shared code is used by two or more
  20. different families of projects, and each family shares code
  21. internally as well. The loading for a project is done by a set of
  22. loads in a file for each project.   So when I load up a project,
  23. I need to load code not just from the local directory, but from
  24. all over the place.  
  25.  
  26. Furthermore, I move the code between different Macs, and would
  27. like to be able to move it to different CL implementations and
  28. platforms, with no changes in the loading code.
  29.  
  30. On my Apollos, this is easy: the loads describe a file whose path
  31. was of the form "link-name/file-name" and then with the shell I
  32. would just define links to point to whatever directories the
  33. files were in on that machine (even to a different machine on the
  34. network) and so the lisp code didn't have to be changed to
  35. reflect the file structure of the machine, or even which lisp
  36. implementation on which kind of unix machine it was on.   
  37.  
  38. It isn't intuitively obvious how to do this in MCL in a way that
  39. will allow the code to similarly load correctly without being
  40. changed across machines or platforms. So the solution has to be
  41. pure CL, but using aliases to mimic links would be fine too. 
  42.  
  43. E.g. the ugly thing I am doing now is to spell out the complete
  44. path in the loads, and then when I move the code to another Mac
  45. or machine, I alter the paths in the code with a global
  46. substitution;  I constrain the Macs to have isomorphic file
  47. structures, so only the name of the disk drive has to be changed.
  48. Expedient, but ugly, and a constant nuisance.
  49.  
  50. A better approach would be appreciated!
  51.