From: Haejoong L. <hae...@un...> - 2002-02-11 10:52:33
|
> We're making use of the tcl binding just now. I'm wondering why it doesn't > use namespaces, eg AG::CreateAG rather than AG_CreateAG? Is it too late to > change this now, it would be useful to us in one respect, we're creating a > version of the API that stores undo information for certain operations and > having the API as a namespace might make it easier to override the API calls > we want to save undo info for. I think I'm the person who is responsible for most of the suggestions. I can't see exactly how "undo" stuff works. However, having a namespace sounds great. To be honest, I didn't even know that Tcl support namespace. I'm not a Tcl programmer :) > Secondly, the tcl wrapper doesn't install itself very nicely, I should be > able to say 'package require AG' to load the library. I've begun to work out > how to do this but I'm having trouble comprehending the build system and > where the locations of libraries are specified. Basically to make things > work in the Tcl Way the package should be installed in a subdirectory > adjacent to the tcl installation (eg /usr/local/lib/ag) looking like this: > > ag/ > ag.tcl > pkgIndex.tcl > ag_tcl.so * > > at the moment the .tcl and .so files go in /usr/local/lib. Since the .so > files depend on other shared libraries (agf_tcl.so etc) then having them in > /usr/local/lib isn't unreasonable but it does make the whole thing a little > messy. I agree with you. Since we have multiple wrappers (currently two), the following would be better: ag_wrapper/ tcl/ ag.tcl ag_tcl.so pkgIndex.tcl python/ ag.py ag_python.so > How hard (and desirable) would it be to combine the libraries into a smaller > number of shared objects. Perhaps a core libag.so and then the language > bindings libag_tcl.so libag_python.so etc. Since libag.so gets linked > against C++ code it would go in the standard lib directory, the others could > go where the scripting language could find them. There might also be an > option to combine the lot into one shared object. Then, when I'm shipping a > package based on AGLIB, the number of files and their interdependancies is > minimised. So we have some options here: (libag + libagf), (tcl wrapper), (python wrapper) (libag + libagf + tcl wrapper), (libag + libagf + python wrapper) (libag + libagf + tcl wrapper + python wrapper) I guess you meant the first choice. That is probably a good idea. The second doesn't look good because of the redundency. The third looks more complex. The single all-in-one library creates a large set of dependencies. Python user may not want to install Tcl to use the library. > I don't know automake/libtool well enough to know how to make this happen. > I'm happy to help with code etc. to make the tcl package neater and more > useable. It would be great if you can give us more detailed direction about namespace stuff. A sample modification would be also useful. After discussion with ag team, I can work on ag wrapper installation and library merging. Thank you very much for the input. Haejoong |