home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / misc / 3851 < prev    next >
Encoding:
Internet Message Format  |  1992-11-23  |  3.7 KB

  1. Path: sparky!uunet!psinntp!dg-rtp!sheol!throopw
  2. From: throopw@sheol.UUCP (Wayne Throop)
  3. Newsgroups: comp.lang.misc
  4. Subject: Re: languages which allow the introduction of new operators
  5. Summary: clarification would be useful
  6. Message-ID: <722575664@sheol.UUCP>
  7. Date: 24 Nov 92 00:32:58 GMT
  8. References: <Bxz8px.FBx@mentor.cc.purdue.edu> <722322705@sheol.UUCP> <By4EM9.7qn@mentor.cc.purdue.edu>
  9. Lines: 68
  10.  
  11. It might help this subthread if Herman Rubin would reveal whether he's
  12. talking about problems of internal floating point formats or not.  
  13. He starts out with
  14.  
  15. ::::: The semantic model of the language can, however, greatly inhibit the
  16. ::::: programmer.  Try communicating floating binary from one machine to
  17. ::::: another
  18.  
  19. Now we have this curious pair of exchanges:
  20.  
  21. :::: From: carroll@dori.cis.udel.edu (Mark C. Carroll)
  22. :::: Message-ID: <1992Nov18.154754.1848@udel.edu>
  23. :::: What does that have to do with the semantic model of the language?
  24. :::: That's a very hardware related issue.
  25. ::: From: hrubin@pop.stat.purdue.edu (Herman Rubin)
  26. ::: Message-ID: <Bxz8px.FBx@mentor.cc.purdue.edu>
  27. ::: Did I say anything about matching the internal representations of
  28. ::: the numbers?  [...] there are many situations
  29. ::: in which people may wish to communicate non-integers in hex.
  30.  
  31. :: From: throopw@sheol.UUCP (Wayne Throop)
  32. :: Message-ID: <722322705@sheol.UUCP>
  33. :: So, what does this have to do with the semantic model of the language?
  34. :: What prevents one from converting the floats to binary representation
  35. :: in ascii, transmitting that, reading the result, and doing the
  36. :: inverse conversion?
  37. : From: hrubin@pop.stat.purdue.edu (Herman Rubin)
  38. : Message-ID: <By4EM9.7qn@mentor.cc.purdue.edu>
  39. : This will not do the job.   The binary representations of floats on
  40. : CRAYs, CYBERs, VAXen, RS/6000s, etc., are all different.
  41.  
  42. (Note that by "binary representation in ascii" above, I was talking
  43. about a radix-2 internal-format-independent ascii string representing
  44. the number in question.  I could just as easily have said "hex", meaning
  45. a radix-16 notation.)
  46.  
  47. So... are we talking about internal representations or not?  In ANY
  48. event, we do NOT seem to be talking about the semantic model of any
  49. language.  I listed examples of things I believe fall into this area,
  50. and Herman Rubin ignored them, and seemed to contradict his earlier
  51. position, as per above.
  52.  
  53. : But now how do you do this if one is not interested in
  54. : communicating the decimal representation, but the hex or octal?
  55. : If one is writing a program, the non-integral constants often should be
  56. : given in octal or hex for various reasons.  This means that the language
  57. : in which that program is written must have some way to read them.
  58.  
  59. If not already in the language, one writes standard
  60. convert-to/from-radix-N routines, and employs them at runtime in the
  61. usual way, or at compile time as custom macro expansions.  (In C or
  62. other such languages, via a target-specific preprocessing step.
  63. Variant-radix specifications are already available in Lisp and Ada at
  64. least, as I recall. )
  65.  
  66. This applies whether or not Herman Rubin is talking about hardware
  67. formats.  In either event, one thing Herman ISN'T talking about is the
  68. language's semantic model, though he apparently still thinks he is.
  69.  
  70. Specifically, if the problem of compile-time recognition of
  71. flexible-radix notations is meant, that's an issue of the language's
  72. lexical form.  If the problem of run-time IO of flexible-radix
  73. notations is meant, that's an issue of the language's application area
  74. coverage.  If the problem of varying internal formats is meant, that's
  75. an issue of hardware architecture.  Again, in NO event are ANY of these
  76. problems ones of a language's semantic model.
  77. --
  78. Wayne Throop  ...!mcnc!dg-rtp!sheol!throopw
  79.