[cdr-discuss] [cdr-announce] CDR 10 accepted

Sam Steingold sds at gnu.org
Wed May 23 20:33:50 UTC 2012


> * Nick Levine <aqy-YuQg+Lki2tvVhJE1T4mvbN at choyvp.tznar.bet> [2012-05-23 10:05:10 +0100]:
>
> #+clisp
> (defun abi-version ()
>   (car (system::version)))
>
> is incompatible with 
>
> (abi-version &optional object)

thanks.

(defun abi-version (&optional (object nil supplied-p))
  (if supplied-p
      (handler-case (progn (system::version (list object)) t)
        (error (e) nil))
      (car (system::version))))

>> It's not at all clear to me from reading CDR document 10
>> <http://cdr.eurolisp.org/document/10/compiled-file-p.html> what an
>> ABI version is (as in "the argument identifies an ABI version which
>> can be consumed by the implementation"). Further examples of
>> abi-version (in particular, one which shows a possible input or
>> output value rather than just piping the two together) would make
>> this clearer.

in clisp 2.49:
(abi-version)
==> 20080430
(abi-version 20080430)
==> T
(abi-version "foo")
==> NIL

in a hypothetical lisp implementation MyCL v7 with a native compiler:
(abi-version)
==> :x86_64-7 ; or, say, 64007.
(abi-version :x86_64-7)
==> T
(abi-version :x86_64-6)
==> T ; if files compiled by v6 are acceptable for v7
(abi-version :x86_64-8)
==> NIL ; since forward compatibility cannot be assumed
(abi-version :sparc-7)
==> NIL ; since native compilation is usually architecture-dependent
(abi-version "bar")
==> NIL
(compile-file "foo.lisp" :output-file
  (make-pathname :directory
    (list (lisp-implementation-type) (princ-to-string (abi-version)))))
==> #P"CLISP/20080430/foo.fas" ; or
==> #P"MyCL/x86_64-7/foo.fas" ; or

-- 
Sam Steingold (http://sds.podval.org/) on Ubuntu 12.04 (precise) X 11.0.11103000
http://www.childpsy.net/ http://dhimmi.com http://memri.org
http://ffii.org http://www.memritv.org http://mideasttruth.com
Lottery is a tax on statistics ignorants.  MS is a tax on computer-idiots.





More information about the cdr-discuss mailing list