How to find out runtime version of Maxima? (confused by new format of eigenvectors() in 5.19.2)
Subject: How to find out runtime version of Maxima? (confused by new format of eigenvectors() in 5.19.2)
From: Chris Sangwin
Date: Wed, 16 Sep 2009 18:30:42 +0100 (BST)
Thanks Robert,
I'm sanguine about the exact mechanism, but would ask that
(1) it is a core Maima function and is documented,
(2) is stable over future versions (probably = simple!),
(3) can be used by Maxima mortals inside code to keep it working over
different versions.
I like the idea of having a general build_info structure, since it makes
sense to have all such information in one place.
Thanks!
Chris
On Wed, 16 Sep 2009, Robert Dodier wrote:
> On 9/16/09, Chris Sangwin <sangwinc at for.mat.bham.ac.uk> wrote:
>
>> MAXIMA_VERSION:map(parse_string, tokens(?\*autoconf\-version\*,
>> 'digitcharp));
>> MAXIMA_VERSION_NUM:float(MAXIMA_VERSION[2]+MAXIMA_VERSION[3]/10),
>
> Well, orderlessp compares lists directly -- no need to smash
> it into a number. Also, it's not guaranteed that versions are
> composed solely of numbers -- could be letters too.
>
>> ... in any case I'd love to have some way of knowing the runtime version
>> of Maxima which is stable over future versions inside the Maxima core!
>
> Well, here's an idea I had a while ago. Maybe it's time for this.
> What does anyone think of this? Idea is for build_info to return
> an expression instead of just print stuff to the console.
> The return value is a structure. You can extract bits of it via "@".
> (Sorry, undocumented features here ....)
>
> With the following patch applied, I get this:
>
> (%i2) foo : build_info () $
> (%i3) foo;
> (%o3)
> Maxima version: 5.19post
> Maxima build date: 2009-09-12 19:43:57
> Host type: i686-pc-linux-gnu
> Lisp implementation type: CLISP
> Lisp implementation version: 2.46 (2008-07-02) (built 3427839018)
> (memory 3461795063)
> (%i4) foo at version;
> (%o4) 5.19post
> (%i5) foo at timestamp;
> (%o5) 2009-09-12 19:43:57
> (%i6) grind (foo);
> ?%build_info("5.19post","2009-09-12 19:43:57",
> "i686-pc-linux-gnu","CLISP",
> "2.46 (2008-07-02) (built 3427839018) (memory 3461795063)")$
>
>
> What does anything think of that? Yes / no / maybe ??
>
> HTH
>
> Robert Dodier
>
> PS.
> Index: src/macsys.lisp