PSL-oddities.txt 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. (1) Two different definitions of a FOR macro with quite different
  2. behaviour. In nonkernel/loop-macros.sl and util/for-loop.sl. I suspect
  3. that some parts of the PSL source depend on one and other parts on the
  4. other. Eg util/if.sl uses NEXT which is defined in loop-macros.sl while
  5. I found quite early some other parts of PSL that needed util/for-loop.sl.
  6. (3) lexing of numbers is inconsistent. 1+ gets parsed as a symbol while
  7. 2#1+ is a number followed by the isolated +. 1#33 raises an error
  8. rather than parsing as a symbol. The issue of # within symbols is
  9. not that clearly consistent everywhere. Unimportant - this is merely
  10. a note I put in when considering how well I can make VSL and possibly
  11. CSL consistent with PSL in full detail!
  12. (4) printf/bldmsg are defined using some LAP code and word operations
  13. rendering them strongly dependent on low level PSL in a way that
  14. probably exceeds needs.
  15. [Not as much as it seems. The arguments are pushed on the stack, and the
  16. address of the first on the stack is loaded into register 1, ot be passed
  17. as argument to printf2. The arguments on the stack are then accessed as
  18. an array of lisp items, using wgetv.
  19. One might try to define printf as an nexpr instead. ]
  20. [It is a sensible and efficient way to do it, but for my purposes using
  21. vsl I do not have "arguments in registers" to push and do not have
  22. raw access to a stack, or wgetv. But that is JUST an issue for looking
  23. at bootstrapping - use of an nexpr would use more consing. Perhaps a
  24. better way for me to express things is that the implementation takes
  25. advantage of the power of syslisp!]
  26. (5) PSL supports IF with more than 3 arguments, and my initial implementation
  27. followed Common Lisp and had not, leading to misery. What is worse the
  28. documentation of PSL suggests that symbols to be thought of as keywords
  29. migh be recognized with IF...
  30. [Yes, there are two forms: the simple one with an implicit progn around
  31. the third and following arguments, and a more general form with keywords:
  32. (IF condition1
  33. THEN then1
  34. ELSE condition2 then2
  35. ...
  36. ELSE ... )
  37. ]
  38. [Thank you - I now include the file that defines that version of IF. I
  39. can not find it in the PSL manual but I do see places where it is used
  40. in the source. OK once I had spotted it, but the code there really looks
  41. to me as if it belonged to people who had not "got" Lisp and who really
  42. wanted to code in a different language!]
  43. (6) There is a file AMD64/comp-dec.sl that is just a copy of comp-decls.sl
  44. presumably to cope with 8-character file names at some stage in the past?