On 2012-01-09 10:27-0000 Andrew Ross wrote: > Alan, Werner, > > Thanks for the comments. I was concerned about the fact that htod is a > windows executable only solution. The old version I found was D1 only. > This was one big reason for considering swig. Your comments reassure > me somewhat about this, although I'm still a little dubious about > requiring a non-free (in the GNU sense) tool. Further checking shows > that D support only appeared in swig in version 2, which would require > a more stringent version check than at the moment which may not be > desirable yet. > > If htod version 2 support is available that would be good. Werner, > your comments on library support are also interesting since Debian > is shipping with gdc-4.6 (D2 support) and libphobos2 rather than > tango. It also ships the ldc compiler with tango. So at the moment > it looks like both are widely used. Interestingly swig produces > code for D1/tango or D2/phobos which seems to contradict Werner's > take on the situation! > > So all in this appears to be more of a mess than I first thought. > I'm happy to stick with the htod solution, but sounds like we'll > need to think carefully about which compiler / library to target.
Andrew, Werner, I think we want to support both gdc (part of gcc) and ldc (part of LLVM), and it might also prove necessary to support both libtango and libphobos for both, i.e., a maximum of 4 combinations in total. Like Andrew, I am also a bit uneasy about the proprietary nature of htod, and because of its closed nature and slow development (the latest release is two years old) it is not clear whether it generates D1 or D2 bindings. On the other hand, I just discovered there is an open-source alternative to htod which might be worth considering. In answer to yet another complaint that htod did not work on Linux or very well on Wine (see http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D&artnum=48200) Gregor Richards described the bcdgen alternative to htod as follows: "Portable, open source, has more options [then htod] and supports some C++". If you follow the link given there to http://www.dsource.org/projects/bcd/, you will discover you can gain access to bcd.gen (the open-source software package that generates D bindings from C headers with the bcdgen application written in D) using svn co http://svn.dsource.org/projects/bcd/trunk/bcd.gen The scripts section of the source tree has lots of scripts to generate D bindings for a number of important open-source packages (e.g., cairo). So it appears gcd.gen is pretty powerful. The Makefile at the top of that source tree shows the build of the bcdgen executable depends primarily on the bcd/gen/bcdgen.d source file which is licensed under GPLv2+. svn log shows the last work on that file was done in 2007 (very early in the stage of D2 development) so bcdgen in its current state is almost surely going to produce D1 bindings from C headers. But (unlike htod) bcdgen is open-source so I presume bcd/gen/bcdgen.d could be modified by someone who knows D so that the bcdgen application automatically produces D2 bindings instead. I doubt Werner will try the bcd.gen possibility since he has already indicated that updating plplot.d from D1 to D2 by hand is pretty straightforward. But it is nice to know that bcd.gen is an open-source alternative to htod that we could modify for our needs if we ever decided it was necessary to automatically regenerate plplot.d. Alan __________________________ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); the Time Ephemerides project (timeephem.sf.net); PLplot scientific plotting software package (plplot.sf.net); the libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ ------------------------------------------------------------------------------ Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex infrastructure or vast IT resources to deliver seamless, secure access to virtual desktops. With this all-in-one solution, easily deploy virtual desktops for less than the cost of PCs and save 60% on VDI infrastructure costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel