[fetter-devel] Possible solution for multiple includes
Kenny Tilton
ktilton at nyc.rr.com
Sun Oct 9 18:36:43 UTC 2005
>>
>> The problem is on win32, where something like FreeGlut.h (IIRC) may
>> include a little thing called "windows.h".
>>
>> Want to guess how big was the resulting freeglut-library.lisp? :)
>
>
> A recall you said something about 700k ... Or even more ...
>
>>
>> Now leave aside that problem (windows.h including everything under
>> the sun whether freeglut needs it or not). How about stdlib.h, which
>> Freeglut likely does need. Do we want bindings for that? Absolutely
>> not if we are just trying to get to Freeglut. Freeglut has an API,
>> and that is all we want.
>
>
> I fully agree. This makes the "include challenge" some degrees more
> complex: Find out what Freeglut needs - recursively, because there
> might be a #define HAHA HEHE in file "a.h" and the #define HEHE HIHI
> in file "b.h" and then the #define HIHI 1 in file "c.h", each having
> more than just this #define in it and there bringing along more stuff
> and bindings. So, we need to cut away all the things that are "not
> requested" by Freeglut ... Doable, I think. But why? Speed? Size?
> Well, yes, of course. But a couple of more GB of main memory and
> we're done ;-)
Because it is doable. And ACL takes 4-5 minutes to compile a 700k Lisp
file. And I would like to open the thing and look at the API. It is bad
enough that internals of Freeglut will end up in the binding file, but
the entire Windows operating system? I /did/ open the 700k thing, and it
was just hilarious to see what was in there (and impossible to see
Freeglut).
To be honest, I am not sure why I have to justify why it is bad to use a
700k Lisp file just to get to a terribly small API like Freeglut. What
happened to the fine German tradition of precision engineering? <g>
>
>
>>
>> True, some C junkie might get off on having stdlib at their disposal
>> from Lisp, but that is completely unrelated to getting bindings to
>> Freeglut, and they should be getting those bindings by making
>> stdlib-binding.lisp and using VZN on that.
>
>
> Right. And VZN and ASDF may work together to do this. If VZN creates
> bindings for every single .h file / lib it finds and puts everything
> in a well-known place (a repository) then we're done. (see my other
> post on this). No? I wonder if I am still on the wrong thinking track
> ...
Yes, I think you are not thinking "API". The "I" stands for interface.
<g> Ideally, vzn would have access to something like the .DEF files
which tells VC++ which functions go in the DLL -- well, maybe not. I
like that vzn will get me into functions the author did not think to
export, because I ran into that with FTGL.
Anyway, what track are you on that tells you a Lisp binding to Freeglut
should include strcat, even if it is neatly packaged in stdlib-library.lisp?
Meanwhile, we already have a nice, easy solution to the 700k thing....
what problem are you trying to solve by arguing for a gross abuse of
machine resources and binding readility?
kenny
More information about the fetter-devel
mailing list