On Wednesday, 27 April 2011 at 09:03, Ian Zerny wrote:

Well, I guess we will give it a try. We are hoping to use it to
represent a graphics scene in our project.
Nice! First, some background: Blackhole currently has two branches: "syntactictower", which is a major rewrite of the main branch, but it is still has some rather major bugs, if I remember correctly the main ones are related to compilation. Syntactictower properly implements the notion of the syntactic tower, essentially it enforces separation between compile time and run time. It can be rather difficult to write macros that use state properly without it (an OO system is a prime example of something that uses that feature).

When using macros, I'd strongly recommend using syntax-rules macros whenever possible. They circumvent all of the syntactic tower related complexity, and they are also often easy to write, portable and the BH implementation of them has been rock solid from the day I wrote it.
I don't really have much time to work on Blackhole at the moment,
but feel free to ask if there's anything you need to know.

Thanks. I do have a few questions:

- What is the preferred way to add a compile option to a collection of
files (without putting it in the source files). In particular, I
would like to add the cc-option -Wno-write-strings to avoid warnings
when compiling with g++.
How to do this depends on whether you're using the syntactictower branch or not; syntactictower enables this through the function module-compile! and friends. They are defined in extras.scm. The master branch unfortunately doesn't have this feature, but it is not very difficult to do; the stuff is in extras.scm there as well. Have a look at module-compile-c-file-to-o; it handles compilation options, but it doesn't expose it as a keyword parameter like in syntactictower.
- I have added support for c-declare in blackhole/hygiene.scm, would
you be interested in a patch and if so, how? (ie, a diff or should I
make an accessible git somewhere?)
Cool! Absolutely! I have no experience of using diffs, but I guess I could learn. Another option would be to put the repo on github (stating that it's a fork of blackhole) and send me a pull request.
- In the project I am working on we need to support compiling static
libraries (for linking and code signing on iOS). I have hacked up a
module-compile-static-bunch in gambcext based on
module-compile-bunch, do know of a better way to do this? It looks
like the "lib" target is currently unsupported by gambit (ie, in
gambc-cc) and therefore in BH.
That sounds reasonable to me. Syntactictower has a slightly enhanced way (but as I said, I have some trouble with this code atm. The problem is that the generated code can only be loaded by the same Gambit instance as it was compiled with) of doing this stuff, you can check that out if you like: module-compile-bunch in compile-load.scm
Thanks for your time and for black hole. It looks promising and has
been a pleasure to work with so far. (Alas, I was using cmake before.)

Kind regards, Ian
Regards,

Per