Re: CHICKEN version dependent expansion

2022-06-28 Thread Mario Domenech Goulart
Hi,

On Tue, 28 Jun 2022 23:00:37 +0300 Lassi Kortela  wrote:

>>> #;1> (cond-expand (chicken-5 'a) (chicken 'b) (else 'c))
>>> a
>> This only seems to let me differentiate between major versions and
> not minor versions, am I correct? I would need to decide based on
> minor versions.
>
> #;2> (cond-expand (chicken-5.3 'a) (else 'b))
> a
>
> To find these, I used the r7rs egg (since the r7rs standard mandates a
> `features` procedure).
>
> $ chicken-install r7rs
> $ csi -R r7rs
> #;1> (features)
> (r7rs srfi-13 srfi-14 ...)

There's also `features' from chicken.platform, in case you don't want to
depend on the r7rs egg only for that.

All the best.
Mario
-- 
http://parenteses.org/mario



Re: CHICKEN version dependent expansion

2022-06-28 Thread Christian Himpe



Lassi Kortela schrieb am 2022-06-28:
> >>#;1> (cond-expand (chicken-5 'a) (chicken 'b) (else 'c))
> >>a
> >This only seems to let me differentiate between major versions and not minor 
> >versions, am I correct? I would need to decide based on minor versions.

> #;2> (cond-expand (chicken-5.3 'a) (else 'b))
> a

> To find these, I used the r7rs egg (since the r7rs standard mandates a 
> `features` procedure).

> $ chicken-install r7rs
> $ csi -R r7rs
> #;1> (features)
> (r7rs srfi-13 srfi-14 ...)

Thanks again!

-- 
Dr. rer. nat. Christian Himpe
University of Münster / Applied Mathematics Münster
Orléans-Ring 10 / 48149 Münster / Germany
https://himpe.science



Re: CHICKEN version dependent expansion

2022-06-28 Thread Lassi Kortela

#;1> (cond-expand (chicken-5 'a) (chicken 'b) (else 'c))
a

This only seems to let me differentiate between major versions and not minor 
versions, am I correct? I would need to decide based on minor versions.


#;2> (cond-expand (chicken-5.3 'a) (else 'b))
a

To find these, I used the r7rs egg (since the r7rs standard mandates a 
`features` procedure).


$ chicken-install r7rs
$ csi -R r7rs
#;1> (features)
(r7rs srfi-13 srfi-14 ...)



Re: CHICKEN version dependent expansion

2022-06-28 Thread Christian Himpe



Christian Himpe schrieb am 2022-06-28:


> Lassi Kortela schrieb am 2022-06-28:
> > >I am trying to define a function depending on the version of CHICKEN.  I 
> > >was thinking to use "cond-expand" for this purpose, but found no suitable 
> > >feature in the documentation

> > #;1> (cond-expand (chicken-5 'a) (chicken 'b) (else 'c))
> > a

> This only seems to let me differentiate between major versions and not minor 
> versions, am I correct? I would need to decide based on minor versions. But 
> thanks nonetheless, "chicken-5" seems not to be mentioned in the docu.

> Christian

OK, I just blindly tested with minor versions, i.e.: chicken-5.X, and it seems 
to work. Should I add this to the docu?

Great!

-- 
Dr. rer. nat. Christian Himpe
University of Münster / Applied Mathematics Münster
Orléans-Ring 10 / 48149 Münster / Germany
https://himpe.science



Re: CHICKEN version dependent expansion

2022-06-28 Thread Christian Himpe



Lassi Kortela schrieb am 2022-06-28:
> >I am trying to define a function depending on the version of CHICKEN.  I was 
> >thinking to use "cond-expand" for this purpose, but found no suitable 
> >feature in the documentation

> #;1> (cond-expand (chicken-5 'a) (chicken 'b) (else 'c))
> a

This only seems to let me differentiate between major versions and not minor 
versions, am I correct? I would need to decide based on minor versions. But 
thanks nonetheless, "chicken-5" seems not to be mentioned in the docu.

Christian



Re: CHICKEN version dependent expansion

2022-06-28 Thread Lassi Kortela

I am trying to define a function depending on the version of CHICKEN.  I was thinking to 
use "cond-expand" for this purpose, but found no suitable feature in the 
documentation


#;1> (cond-expand (chicken-5 'a) (chicken 'b) (else 'c))
a



CHICKEN version dependent expansion

2022-06-28 Thread Christian Himpe
Dear All,

I am trying to define a function depending on the version of CHICKEN.  I was 
thinking to use "cond-expand" for this purpose, but found no suitable feature 
in the documentation ( 
http://wiki.call-cc.org/man/5/Extensions%20to%20the%20standard#cond-expand ) 
that could achieve this, only if a CHICKEN is currently expanding. R7RS 
suggests such features (in Appendix B: ) and other Schemes such 
as Guile ( 
https://www.gnu.org/software/guile/manual/html_node/SRFI_002d0.html#index-cond_002dexpand
 ) and Gauche ( 
https://practical-scheme.net/gauche/man/gauche-refe/Feature-conditional.html#index-cond_002dexpand
 ) provide such features. Did I miss something in the documentation, or is 
there an alternative ("R5RS") way to do this?

Thank You

Christian