[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SOFTWARE-TYPE, SOFTWARE-VERSION, ...
While we're on the subject, let me say that my experience in trying to port
Macsyma has suggested that we have not been specific enough in the description
of what SOFTWARE-TYPE should return for it to be very useful even in the range
of things for which I think it was intended. For example,...
LISP-IMPLEMENTATION-TYPE
Not enough examples are given to figure out what this might return.
I believe this should have been defined as the vendor. It's dumb for
a 3600 to respond "Zetalisp" since the trend on the 3600 is for Zetalisp
to be supported as a Common Lisp compatibility thing and not vice versa.
Because the manual cites the example of "Zetalisp", it's hard to imagine
us not returning that value. I still think it should return "Symbolics".
Also, it doesn't say whether the word "lisp" will get included. It leaves
one open to return "Franz" or "Lucid".
It would have been better to actually give an example sentence into which
the result of functions like this item should have fit. eg,
(FORMAT T "~&This is the ~A implementation of Common Lisp."
(LISP-IMPLEMENTATION-TYPE))
LISP-IMPLEMENTATION-VERSION
Some lisps return something fairly short so you could imagine doing:
(FORMAT T "~&This is Macsyma in ~A ~A."
(LISP-IMPLEMENTATION-TYPE) (LISP-IMPLEMENTATION-VERSION))
but it isn't suggested that this might be something you'd want to do so
the 3600 Release 6 implementation I'm running returns something like:
"Release 6.1, System 271.216, Hardcopy 46.34, Zmail 107.25, Experimental Something 12.36, IP-TCP 29.13, SCRC 5.26, Something Else 60.0, Experimental Something More 389.0, microcode IFU-IO4-XSQ-COL-MIC 353, FEP 127, FEP0:>v127-lisp.flod(4), FEP0:>v127-loaders.flod(4), FEP0:>v127-i-cache.flod(29), FEP0:>v127-debug.flod(10), FEP0:>v127-info.flod(4)"
and it would look really yucky to use that format string because of the
line over-run that would result.
MACHINE-TYPE
This is one of the only things that I think is adequately constrained.
MACHINE-VERSION
This isn't very well-constrained. For example, I can't imagine writing
(FORMAT T "This is Common Lisp on a ~A ~A"
(MACHINE-TYPE) (MACHINE-VERSION))
even with the examples you've given. eg, it might come out as:
"This is Common Lisp on a DEC PDP-10 KL10, microcode 9"
In other words, isn't "KL10" part of the machine-type, not the version?
Maybe it's really well-formed -- I've just never seen it referred to that way.
Again, saying in the documentation that operations like the FORMAT I've just
given should produce meaningful, non-cluttered output would be very handy.
MACHINE-INSTANCE
It was dumb given that any of these operations can return NIL if it doesn't
have something meaningful to return to say that this could return either a
serial number or a host-id. We should have had a HOST-NAME and a
MACHINE-UNIQUE-ID. The former should have returned the host name for the purpose
of things like
(FORMAT T "~&From: ~A@~A~%"
(USER-ID) ;we forgot to include this but it should be added
(HOST-NAME))
SOFTWARE-TYPE
It doesn't indicate at what level the supporting software is. eg, your examples
seem to imply that you want the operating system type. What if LUCID had a lisp
that ran under VMS. Would you want "VMS", "DEC", or "LUCID"? If you can't be specific
about this, then how can you expect it to be meaningfully used in portable code?
We return "Lisp Machine", which seems pretty random, but I'm not sure what we could
do that is better.
SOFTWARE-VERSION
This suffers from the same vagueness problems. We return
"Pre-release Symbolics Common Lisp" in Release 6. What can I do with this?
I can write:
(FORMAT T "~&You are being supported by ~A ~A"
(SOFTWARE-TYPE) (SOFTWARE-VERSION))
Can you imagine how well this will port? On our implementation, this will
produce:
You are being supported by Lisp Machine Pre-release Symbolics Common Lisp.
which looks pretty dumb... and that's using it in the least committal way
possible. Imagine if I wanted to include it into any other output in a more
specific way.
SHORT-SITE-NAME
LONG-SITE-NAME
Nothing specifies whether "site" means "host" or "community". The Symbolics
community distinguishes these terms. A site to us would be like "MIT" or
the "MIT AI Lab". A host is a specific machine at a site. I'm told by friends
at DEC that (SHORT-SITE-NAME) is treated more like "host". Without standardizing
on this term, the description is fairly meaningless.
I was amazingly disappointed when I found out how poorly these were specified
and how little-useful they were going to be in portable code. The only way I
can think to use this information in a portable way is to do:
(FORMAT T "Random debugging data:~{~@[~%~1{~A: ~A~}~]~}"
(MAPCAR #'(LAMBDA (X) (LET ((Y (FUNCALL X))) (IF Y (LIST X Y))))
'(LISP-IMPLEMENTATION-TYPE LISP-IMPLEMENTATION-VERSION ...)))
That's pretty weak.