On the Black Hole page of the Gambit wiki, in the "additional Libraries" section there is the line:
Termite: A version suited for usage in Black Hole is found at X.
Are BH and Termite currently incompatible? And if so, how?
I was just going to try using them together but then realized I would probably notice gross problems but might be not catch subtle ones.
- Jamie
Afficher les réponses par date
26 maj 2009 kl. 08.00 skrev Jamie Briggs:
On the Black Hole page of the Gambit wiki, in the "additional Libraries" section there is the line:
Termite: A version suited for usage in Black Hole is found at X.
Hehe.. I wasn't aware that there was a page on the Gambit wiki about Black Hole =) But it's good that there is one.
Are BH and Termite currently incompatible? And if so, how?
Yes, the Termite distribution is incompatible with BH. It's primarily because of how Termite exports its macros; I don't have a deep knowledge of Termite, but from what I have seen of it, I have concluded that it's full of ugly hacks because of the insufficiency of Gambit's built-in features on that department.
Because of that I have, as a proof of concept of Black Hole, and because I think Termite really could use it, ported Termite to BH. The port consisted mainly of removing circular dependencies between files (BH doesn't support that) and hygienifying the macros.
The port is available on GitHub, http://github.com/pereckerdal/termite/
If you have the latest version of Black Hole, this is probably the easiest way of installing it: (It is rather hacky, because I haven't yet bothered fixing a nice URL for it, so you'll have to change the URL in the future, but it should work)
(import "http://github.com/pereckerdal/termite/raw/b60c4ee3943b1502cfd5e5f47530b17467... ")
The URL points to the main termite.scm file, go there if you want to see what it looks like. Because the inter-module dependencies are relative paths, BH is able to deduce the URLs for the other files and will download termite.scm and its dependencies to ~~/lib/modules/work/ lib. This currently requires that wget is in the path.
I don't really know very much about the compilation problems in Termite, but you probably also want to do
(module-compile/deps! "http://github.com/pereckerdal/termite/raw/b60c4ee3943b1502cfd5e5f47530b17467... ")
to compile it.
I was just going to try using them together but then realized I would probably notice gross problems but might be not catch subtle ones.
Yes.. Because of the complexity of the Termite distribution, you'd need a rather deep understanding of BH and its hygienic macros to be able to do it. I don't know any way of making it easier to port libraries of this complexity.
/Per
(It is rather hacky, because I haven't yet bothered fixing a nice URL for it, so you'll have to change the URL in the future, but it should work)
(import "http://github.com/pereckerdal/termite/raw/b60c4ee3943b1502cfd5e5f47530b17467... ")
Btw, you could (and ought to) use this URL instead:
http://github.com/pereckerdal/termite/raw/master/termite.scm
Otherwise you'd be locked to using a certain version.
Barring the rather long URL, this is by the way rather awesome; It means that you can develop a BH library or application, push it to GitHub and then voila you have a URL that others can use to import the library. This also works for libraries with dependencies to other libraries. With some toying around with symlinks in BH's work directory you can override so that BH will use your local copy of the library even when using the package URL.
I'm curious to see how this idea scales.
/Per
Per,
On a related topic, last time I looked at Black Hole, there was no documentation. The Gambit BH page now claims to offer documentation in 4 formats, all of which lead to a request that I log in in order to upload a file. I would be happy to document BH if I knew anything about it :-)
Would you very much mind correcting the Gambit wiki page? I am eager to read the documentation...
Thanks! -- v