Mikael | 21 May 13:37 2012
Picon

Update of both branches of Black Hole: Making code 'crosscompatible' with both Vanilla Gambit and Black Hole is smoother now as cond-expand is there and responds to the 'black-hole feature (examples in email).

Black Hole update for both branches: cond-expand, Scheme's correspondent to C's ifdef, has been implemented in both branches, and 'black-hole is added to ##cond-expand-features , thus making code compat to Vanilla Gambit and Black Hole.


Code example:
(cond-expand
 (black-hole
   'code-for-black-hole-here)
 (else
   'code-for-vanilla-gambit-here))

Execution example:
$ bsc
> (cond-expand
 (black-hole
   'code-for-black-hole-here)
 (else
   'code-for-vanilla-gambit-here))
code-for-black-hole-here
> ,q
$ gsc
Gambit v4.6.2

>  (cond-expand
 (black-hole
   'code-for-black-hole-here)
 (else
   'code-for-vanilla-gambit-here))
code-for-vanilla-gambit-here
>

For a practical use example, see row 73 - 92 at https://github.com/m-i-k-a-e-l/gambit-unicode/blob/master/unicode.scm .

Alvaro also made a nice --cond-expand-features=feature1:feature2 option to the syntactictower branch's bh tool. The is no action to move it to the main repo currently but can be found at https://github.com/alvatarc/blackhole/commit/d382bd615df996c6deddf4579eb8cfb87b393536 and https://github.com/alvatarc/blackhole/commit/c342963f65c383f5667efb5090ebed261c295efa .

Brgds,
Mikael

_______________________________________________
Gambit-list mailing list
Gambit-list <at> iro.umontreal.ca
https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list

Gmane