[gambit-list] 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).

Mikael mikael.rcv at gmail.com
Mon May 21 07:37:03 EDT 2012


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20120521/5b0d32ed/attachment.htm>


More information about the Gambit-list mailing list