Re: [Plplot-devel] New binding of Go programming language
On 2014-01-29 17:33+0800 Hǎiliàng Wáng wrote: Hi Alan, I have added an argument to the check program to support additional include directories. go get -d -u github.com/hailiang/go-plplot (-d to indicates not to build.) The new argument is like this: -incdir=dir1:dir2:dir3 Hi Hǎiliàng: That change works well here (the resulting report continues to be clean with a return code of zero) and simplifies what has to be done by the custom check_api_xml_consistency target of the PLplot build system. See revision 12972. Thanks! 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 __ -- WatchGuard Dimension instantly turns raw network data into actionable security intelligence. It gives you real-time visual feedback on key security issues and trends. Skip the complicated setup - simply import a virtual appliance and go from zero to informed in seconds. http://pubads.g.doubleclick.net/gampad/clk?id=123612991iu=/4140/ostg.clktrk ___ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel
Re: [Plplot-devel] New binding of Go programming language
Hi Alan, I have managed to generate function declarations from gccxml objects and tested the new check program. The result looks pretty nice. (Not forgot checking in this time :-). To update: go get -u github.com/hailiang/go-gccxml go get -u github.com/hailiang/go-plplot Hǎiliàng -- WatchGuard Dimension instantly turns raw network data into actionable security intelligence. It gives you real-time visual feedback on key security issues and trends. Skip the complicated setup - simply import a virtual appliance and go from zero to informed in seconds. http://pubads.g.doubleclick.net/gampad/clk?id=123612991iu=/4140/ostg.clktrk ___ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel
Re: [Plplot-devel] New binding of Go programming language
On 2014-01-28 22:25+0800 Hǎiliàng Wáng wrote: Hi Alan, I have managed to generate function declarations from gccxml objects and tested the new check program. The result looks pretty nice. (Not forgot checking in this time :-). To update: go get -u github.com/hailiang/go-gccxml go get -u github.com/hailiang/go-plplot I did the first of those without problems, but that second command failed as follows: software@raven go get -u github.com/hailiang/go-plplot # github.com/hailiang/go-plplot/c ../src/github.com/hailiang/go-plplot/c/hand.go:8:20: fatal error: plplot.h: No such file or directory So you probably have made some assumption about the location of PLplot code. But that issue doesn't matter to me since if I replace that command with go get -u github.com/hailiang/go-plplot/c/check and follow with go build github.com/hailiang/go-plplot/c/check the result is a new $GOPATH/bin/check programme that works well here; it gives the desired non-zero return code for the current unclean result, and also eliminates the false positives for the function pointers. The only issue that is left (that I am aware of) is I still must use a workaround (copying plplot.h from the source tree to the build tree, see doc/docbook/src/CMakeLists.txt) in order to conveniently use your check code for the common case where the build and install of PLplot have not been done. With the latest version of the code built in the way above, all false positives are gone for the function pointers. Also, there is at least one real function pointer difference, e.g., para 13 of func plshades type mismatch [ void (*) (PLINT, PLFLT *, PLFLT *) ] vs. [ void (*) (PLINT, const PLFLT *, const PLFLT *) ] being found indicating your parsing code is working perfectly. (I still have to address that type mismatch and about 80 other mismatch issues that are still left.) Thanks again for this most significant help you have provided for the PLplot documentation effort. Furthermore, I wish you the best in your efforts to implement a Go binding of the PLplot library and the corresponding standard examples implemented in the Go language to check that Go binding is producing identical results for the standard examples compared to corresponding results for other PLplot bindings. 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 __ -- WatchGuard Dimension instantly turns raw network data into actionable security intelligence. It gives you real-time visual feedback on key security issues and trends. Skip the complicated setup - simply import a virtual appliance and go from zero to informed in seconds. http://pubads.g.doubleclick.net/gampad/clk?id=123612991iu=/4140/ostg.clktrk ___ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel
Re: [Plplot-devel] New binding of Go programming language
Hi Alan, It is easy to add a return code so I have done it. Now it just returns -1 when there is at least one mismatch. Out of curiosity, how will you integrate a Go program into the building process? Just assume the check program is under $PATH or more sophisticated rule? Hǎiliàng -- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk ___ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel
Re: [Plplot-devel] New binding of Go programming language
On 2014-01-27 23:07+0800 Hailiang Wang wrote: Hi Alan, It is easy to add a return code so I have done it. Now it just returns -1 when there is at least one mismatch. Hi Hǎiliàng: Thanks for that fix. However, you still need to push it according to https://github.com/hailiang/go-plplot/ I request one further fix. Currently, your code appears to uniformly gives false positives on function pointer arguments, e.g., para 9 of func plcont type mismatch [ void (*) (PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer) ] vs. [ * ] para 11 of func plimagefr type mismatch [ void (*) (PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer) ] vs. [ * ] para 0 of func plmap type mismatch [ void (*) (PLINT, PLFLT *, PLFLT *) ] vs. [ * ] para 0 of func plmeridians type mismatch [ void (*) (PLINT, PLFLT *, PLFLT *) ] vs. [ * ] I think you mentioned this issue previously. I assume slightly improved parsing of the function pointer arguments in plplot.h (currently just producing the incomplete [ * ] result) will solve this issue. Out of curiosity, how will you integrate a Go program into the building process? Just assume the check program is under $PATH or more sophisticated rule? Essentially the latter. My understanding is that in the Go world generic names are fine since the full pathname is implied to sort out any name clashes. But outside that world, nameclashes are a problem so I was concerned about the generic check name for the application. I solved that by using a symlink. So I build check and set up the symlink outside the whole PLplot build process, then CMake only has to be able to find that symlink name (api.xml_consistency_checker) on the PATH. See the logic right after ADD_SPECIAL_CONSISTENCY_CHECKING is mentioned in doc/docbook/src/CMakeLists.txt for the rest of the details about configuring a custom target (check_api_xml_consistency) to be run (e.g., by the command make check_api_xml_consistency ) any time the user desires to check for inconsistencies. I have done a lot of editing of api.xml (and used the above target repeatedly) to reduce the list of api.xml inconsistencies (including the function pointer ones above) from ~140 down to 81 after half a day's work on it yesterday. So with luck I should be able to create an almost clean report with a further day's worth of editing (and an actual clean report if you are able to respond on the function argument issue mentioned above). To the others here: the large number of api.xml inconsistencies I have been able to fix thanks to Hǎiliàng's check programme illustrates how badly out of synch our api.xml documentation had become compared to our actual API. However, I anticipate many and perhaps all of these documentation issues are going to be fixed for the 5.10.0 release which is still planned for just 5 (!) days from now. 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 __ -- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk ___ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel
Re: [Plplot-devel] New binding of Go programming language
Hi Hǎiliàng: With revision 12961 I have implemented the check_api_xml_consistency check target (only configured if the user uses the new -DADD_SPECIAL_CONSISTENCY_CHECKING=ON option which is used for consistency checks that require special dependencies). If ADD_SPECIAL_CONSISTENCY_CHECKING is ON and CMake also finds an executable called api.xml_consistency_checker (set up by the user as a symlink to your built check programme to distinguish it from other possible check programmes that might be in the user's PATH), it configures the check_api_xml_consistency target to (1) copy plplot.h from source tree to build tree, and (2) run your programme. If you could get rid of issue (1) along the lines I suggested previously that would be nice, but not essential. Another would-be-nice is that all the tests your code does should keep track of whether they succeed or fail. Then when all the succeeding and failing tests are completed (as now) if any of them failed, your code should return a non-zero return code to signal one or more of the tests failed. (The user's eyes can pick that up from the error messages concerning inconsistencies, but it is also good on general principles to set a return code as well.) Meanwhile, with the above revision I am now able to conveniently use the check_api_xml_consistency target to check my progress in resolving all these remaining api.xml inconsistencies, and I hope to say more about my progress with that effort later this evening. 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 __ -- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk ___ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel
Re: [Plplot-devel] New binding of Go programming language
Hi Alan, The hard part turns out to be not parsing api.xml but restoring a C type declaration from gccxml's type structure, but anyway I have done it. Yeah! I'd better put the result in the attachment (log.txt) because it is much longer now. Hǎiliàng c_plgcmap1_range is not documented. c_plgdrawmode is not documented. c_plot3dcl is not documented. c_plscmap1_range is not documented. c_plsdrawmode is not documented. c_plsurf3dl is not documented. para 1 of func plbin type mismatch [ PLFLT * ] vs. [ const PLFLT * ] para 2 of func plbin type mismatch [ PLFLT * ] vs. [ const PLFLT * ] para 20 of func plcolorbar type mismatch [ PLFLT * ] vs. [ const PLFLT * ] para 21 of func plcolorbar type mismatch [ PLINT * ] vs. [ const PLINT * ] para 22 of func plcolorbar type mismatch [ PLINT ] vs. [ const PLINT * ] para 23 of func plcolorbar type mismatch [ PLFLT *const * ] vs. [ const PLFLT *const * ] para 4 of func plconfigtime name mismatch [ ifbzero_control ] vs. [ ifbtime_offset ] para 0 of func plcont type mismatch [ PLFLT ** ] vs. [ const PLFLT *const * ] para 7 of func plcont type mismatch [ PLFLT * ] vs. [ const PLFLT * ] para 9 of func plcont type mismatch [ void (*) (PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer) ] vs. [ * ] para 1 of func plerrx type mismatch [ PLFLT * ] vs. [ const PLFLT * ] para 2 of func plerrx type mismatch [ PLFLT * ] vs. [ const PLFLT * ] para 3 of func plerrx type mismatch [ PLFLT * ] vs. [ const PLFLT * ] para 1 of func plerry type mismatch [ PLFLT * ] vs. [ const PLFLT * ] para 2 of func plerry type mismatch [ PLFLT * ] vs. [ const PLFLT * ] para 3 of func plerry type mismatch [ PLFLT * ] vs. [ const PLFLT * ] para 1 of func plfill type mismatch [ PLFLT * ] vs. [ const PLFLT * ] para 2 of func plfill type mismatch [ PLFLT * ] vs. [ const PLFLT * ] para 1 of func plfill3 type mismatch [ PLFLT * ] vs. [ const PLFLT * ] para 2 of func plfill3 type mismatch [ PLFLT * ] vs. [ const PLFLT * ] para 3 of func plfill3 type mismatch [ PLFLT * ] vs. [ const PLFLT * ] para 1 of func plgradient type mismatch [ PLFLT * ] vs. [ const PLFLT * ] para 2 of func plgradient type mismatch [ PLFLT * ] vs. [ const PLFLT * ] para 0 of func plgriddata type mismatch [ PLFLT * ] vs. [ const PLFLT * ] para 1 of func plgriddata type mismatch [ PLFLT * ] vs. [ const PLFLT * ] para 2 of func plgriddata type mismatch [ PLFLT * ] vs. [ const PLFLT * ] para 4 of func plgriddata type mismatch [ PLFLT * ] vs. [ const PLFLT * ] para 6 of func plgriddata type mismatch [ PLFLT * ] vs. [ const PLFLT * ] para 1 of func plhist type mismatch [ PLFLT * ] vs. [ const PLFLT * ] para 0 of func plimagefr type mismatch [ PLFLT** ] vs. [ const PLFLT *const * ] para 11 of func plimagefr type mismatch [ void (*) (PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer) ] vs. [ * ] para 0 of func plimage type mismatch [ PLFLT** ] vs. [ const PLFLT *const * ] para 1 of func plline type mismatch [ PLFLT * ] vs. [ const PLFLT * ] para 2 of func plline type mismatch [ PLFLT * ] vs. [ const PLFLT * ] para 1 of func plline3 type mismatch [ PLFLT * ] vs. [ const PLFLT * ] para 2 of func plline3 type mismatch [ PLFLT * ] vs. [ const PLFLT * ] para 3 of func plline3 type mismatch [ PLFLT * ] vs. [ const PLFLT * ] para 0 of func plmap type mismatch [ void (*) (PLINT, PLFLT *, PLFLT *) ] vs. [ * ] para 1 of func plmap type mismatch [ char * ] vs. [ const char * ] para 0 of func plmeridians type mismatch [ void (*) (PLINT, PLFLT *, PLFLT *) ] vs. [ * ] para 0 of func plmesh type mismatch [ PLFLT * ] vs. [ const PLFLT * ] para 1 of func plmesh type mismatch [ PLFLT * ] vs. [ const PLFLT * ] para 2 of func plmesh type mismatch [ PLFLT ** ] vs. [ const PLFLT *const * ] para 0 of func plmeshc type mismatch [ PLFLT * ] vs. [ const PLFLT * ] para 1 of func plmeshc type mismatch [ PLFLT * ] vs. [ const PLFLT * ] para 2 of func plmeshc type mismatch [ PLFLT ** ] vs. [ const PLFLT *const * ] para 6 of func plmeshc type mismatch [ PLFLT * ] vs. [ const PLFLT * ] para 0 of func plot3d type mismatch [ PLFLT * ] vs. [ const PLFLT * ] para 1 of func plot3d type mismatch [ PLFLT * ] vs. [ const PLFLT * ] para 2 of func plot3d type mismatch [ PLFLT ** ] vs. [ const PLFLT *const * ] para 0 of func plot3dc type mismatch [ PLFLT * ] vs. [ const PLFLT * ] para 1 of func plot3dc type mismatch [ PLFLT * ] vs. [ const PLFLT * ] para 2 of func plot3dc type mismatch [ PLFLT ** ] vs. [ const PLFLT *const * ] para 6 of func plot3dc type mismatch [ PLFLT * ] vs. [ const PLFLT * ] para 1 of func plparseopts type mismatch [ char ** ] vs. [ const char ** ] para 1 of func plpat type mismatch [ PLINT * ] vs. [ const PLINT * ] para 2 of func plpat type mismatch [ PLINT * ] vs. [ const PLINT * ] para 1 of func plpoin type mismatch [ PLFLT * ] vs. [ const PLFLT * ] para 2 of func plpoin type mismatch [ PLFLT * ] vs. [ const PLFLT * ] para 1 of func plpoin3 type mismatch [ PLFLT * ] vs. [ const PLFLT * ] para 2 of func plpoin3 type mismatch [ PLFLT * ] vs. [ const PLFLT * ] para 3 of func
Re: [Plplot-devel] New binding of Go programming language
BTW, I just discovered that the function pointer type cannot be correctly restored so the type mismatch may be a false alarm, luckily such cases are not many. Hǎiliàng -- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk ___ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel
Re: [Plplot-devel] New binding of Go programming language
On 2014-01-24 17:08+0800 Hailiang Wang wrote: Hi Alan, The hard part turns out to be not parsing api.xml but restoring a C type declaration from gccxml's type structure, but anyway I have done it. Yeah! I'd better put the result in the attachment (log.txt) because it is much longer now. Hǎiliàng Hi Hǎiliàng: Thanks very much for implementing the type checking that I requested. The resulting report you attached will be extremely helpful. I will try to write documentation of the remaining undocumented functions (now down to 4 with revision 12957) and deal with all the various kinds of argument list mismatches you found in the next day or so. I would like to be able to run your checker myself (immediately to be able to test that I am solving the outstanding issues in your current report one by one without introducing new issues, but also in the future as an integrated part of the PLplot build system to allow us to check any further plplot.h and/or api.xml changes). Would you be willing to write a README file at https://github.com/hailiang/go-plplot/tree/master/c/check that would help a Go Newbie like me to run your checker? The questions that file should answer are what files should be copied from https://github.com/hailiang/go-plplot into the svn trunk version of PLplot, what Linux packages need to be installed to run the checker, the exact command that should be used to run the checker, and the prompts to expect. (I assume from looking at main.go the checker will ask for the locations of plplot.h and api.xml, but it would be nice for the README to confirm that.) 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 __ -- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk ___ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel
Re: [Plplot-devel] New binding of Go programming language
On 2014-01-24 09:01-0800 Alan W. Irwin wrote: Would you be willing to write a README file at https://github.com/hailiang/go-plplot/tree/master/c/check that would help a Go Newbie like me to run your checker? Hi Hǎiliàng: I realized you could not respond immediately to that request because it is night time in your time zone, so here is what I have tried so far following what various go language tutorials have said. I eventually had partial success. Note, some of these steps are erroneous, but you (or I) could edit them for the README file into the successful subset of steps that need to be done to allow someone else to use your check code. I installed the gccxml and golang Debian stable packages. I then tried the following: irwin@raven export GOPATH=/home/irwin/go irwin@raven cd $GOPATH irwin@raven go get github.com/hailiang/go-plplot/tree/master/c/check package github.com/hailiang/go-plplot/tree/master/c/check imports github.com/hailiang/go-plplot/tree/master/c/check imports github.com/hailiang/go-plplot/tree/master/c/check: import github.com/hailiang/go-plplot/tree/master/c/check: cannot find package The go get command actually downloaded about ~100 files before that error, including, e.g., /home/irwin/go/src/pkg/github.com/hailiang/go-plplot/c/check/util.go /home/irwin/go/src/pkg/github.com/hailiang/go-plplot/c/check/main.go /home/irwin/go/src/pkg/github.com/hailiang/go-plplot/c/check/xmldoc.go At least one issue (I found later with 1.2) was the tree/master in the above go get command which should have been removed, but before I realized that issue, I thought maybe the trouble might be due to my old version (1.0.2) of the golang package from Debian stable so I used apt-src to build the Debian testing version of golang and installed all the go-related *.deb packages that were built by apt-src. That gives me access to 1.2, e.g., irwin@raven go version go version go1.2 linux/amd64 With that version after removing everything in GOPATH I tried irwin@raven cd $GOPATH irwin@raven go get github.com/hailiang/go-plplot/c/check irwin@raven go build github.com/hailiang/go-plplot/c/check with no issues, and $GOPATH/check was built as a result. However, I then tried following up on that nice success with irwin@raven $GOPATH/bin/check \ -header=/home/software/plplot_svn/HEAD/plplot_allura/include/plplot.h \ -apixml=/home/software/plplot_svn/HEAD/plplot_allura/doc/docbook/src/api.xml plplot.h:36:22: error: plConfig.h: No such file or directory plplot.h:120:19: error: pldll.h: No such file or directory [...] where [...] stands for a whole host of error messages because of those missing configured headers. I then tried running the same command from the (PLplot build tree) directory where the configured plConfig.h and pldll.h are located, but still they cannot be found so the above error messages are still the result. Finally, I copied plplot.h from the source tree to the build tree location where plConfig.h and pldll.h are located and used -header=plplot.h from that directory == partial success! (Note, a more convenient method for finding the required files would simply be to allow the user to specify the top directories of the PLplot source tree and PLplot build tree, and then let the check programme figure out the correct locations of plplot.h, the configured headers, and api.xml from that information.) The check app I built as above ran OK, but I labelled it only as a partial success because it was the first version you created which errored out on the first count mismatch rather than continuing. Did you forget to commit your added work on check or do I have to change the location above (github.com/hailiang/go-plplot/c/check) to something else to get access to your latest version of check (which should continue past the count mismatch, compare the types, and possibly even implement the more convenient method I suggested above for finding the required files). 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 __ -- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk
Re: [Plplot-devel] New binding of Go programming language
Hi Alan, I'm in UTC+8 time zone and now it's about 11 AM here. I realize that the check program is for PLPlot community who may not be familiar with Go. I have added a README.md file under the same location of the check tool. The minimal unit that go get tool can get is a repository, so the source directory of the check program cannot be fetched alone, you have to get the git repository like this: go get github.com/hailiang/go-plplot. gccxml is a patch to gcc compiler. It means that gccxml can accept the same command line arguments as gcc and the parsed header file must obey the same rule that gcc requires. Currently I have to install PLPlot first and then run the checker. What are the command line argument to make gcc to parse the header file in the source tree rather than the installed location? (I'm not very familiar with gcc) Sorry I did forget to check in some changes. Best regards, Hǎiliàng -- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk ___ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel
Re: [Plplot-devel] New binding of Go programming language
On 2014-01-25 10:48+0800 Hailiang Wang wrote: Hi Alan, I'm in UTC+8 time zone and now it's about 11 AM here. I realize that the check program is for PLPlot community who may not be familiar with Go. I have added a README.md file under the same location of the check tool. The minimal unit that go get tool can get is a repository, so the source directory of the check program cannot be fetched alone, you have to get the git repository like this: go get github.com/hailiang/go-plplot. Out of curiosity, once I have run go get for an old version, how do I update to a later version? I am in that position now trying to get your updates, but go get seems to be satisfied with the old version that was already downloaded and does not get the latest. Subsequently, I brute-forced around the issue by removing everything in $GOPATH, and then go get got the latest version, and after go build (and copying plplot.h from source tree to build tree) I can finally reproduce your latest report. Yes!! gccxml is a patch to gcc compiler. It means that gccxml can accept the same command line arguments as gcc and the parsed header file must obey the same rule that gcc requires. Currently I have to install PLPlot first and then run the checker. What are the command line argument to make gcc to parse the header file in the source tree rather than the installed location? (I'm not very familiar with gcc) Use the gcc -I options to specify multiple directories to look for headers, e.g. gcc -I/top-directory-plplot-source-tree/include -I/top-directory-plplot-build-tree/include The obvious advantage of using the combination of source tree + build tree over, e.g., gcc -I/install-prefix/include/plplot where only the install tree is used is you only have to run the cmake command to configure the build-tree headers you need. (As opposed to cmake + make + make install to configure, build, and install.) 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 __ -- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk ___ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel
Re: [Plplot-devel] New binding of Go programming language
It's go get -u, u means update. And also go help will print a short explanation of the command, e.g. go help get. I will send mail when I have more progress. Best regards, Hǎiliàng Wáng -- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk ___ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel
Re: [Plplot-devel] New binding of Go programming language
On 2014-01-23 13:02+0800 Hailiang Wang wrote: Yes, you're right. Here is the complete result: c_plbtime is not documented. c_plconfigtime is not documented. c_plctime is not documented. [] Hi Hǎiliàng: Thanks very much for that complete report from the current form of your checker. I have now (revision 12956) written long-overdue documentation in api.xml for the above three fundamental time transformation functions. Writing such documentation is time-consuming so although I didn't remove many items from your long list of api.xml issues, I still feel I made substantial progress on that list today. I hope to finish off documenting the remaining 6 functions and correcting the argument number and name inconsistencies your api.xml checker found in the next couple of days. However, I hope you would also be willing to add a further consistency check for the types of the arguments to that checker code. For example, I am sure there are a lot of const type inconsistencies at the moment between plplot.h and api.xml, and it would be good to get those inconsistencies all cleaned up. You commented before that parsing the argument types from api.xml was difficult, but the api.xml schema is not that complex. For example, the relevant type information is tagged up as in this example: variablelist varlistentry term parameteryear/parameter (literalPLINT */literal, output) /term [...] /varlistentry [...] /variablelist I really hope parsing the type (PLINT *) in this case from a literal tag inside a term tag inside a varlistentry tag for the list of arguments inside a variablelist tag turns out to be not that difficult in Go. Note, the 5.10.0 release is scheduled soon (9 days from now) so it's an important goal to get plplot.h/api.xml inconsistencies cleaned up as much as possible for that release. However, I hope to finish the task in just the next several days because I won't be able to work on that task much nearer the release date because of my release manager responsibilities for that release. But if you have your own time constraints that do not allow you to implement parsing the argument type information from api.xml in the next several days, then I hope you would still be willing to implement that important api.xml checker feature after the 5.10.0 release. 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 __ -- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk ___ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel
Re: [Plplot-devel] New binding of Go programming language
Hi Hǎiliàng: Thanks very much for implementing an initial proof of concept of my idea. On 2014-01-22 15:40+0800 Hailiang Wang wrote: It takes not much effort to build a comparison program because the parser for api.xml is ready-made. I put the tool under my github reop here https://github.com/hailiang/go-plplot/tree/master/c/check Would you be willing to add a README file there for Go newbies like me? Eventually, (once you forsee no further changes to the checker) I would like to incorporate your checker into the PLplot build system so that we could do the check ourselves. I presume from my initial Go reading yesterday, we would only have to copy main.go from the above URL, and Go would find all the Go dependencies of that automatically from your github site, but if that is correct, a short README stating that would be useful. That file should also list other dependencies of the checker that we would have to install because they are not handled by the Go compiler. I am thinking of the Go compiler itself and gccxml, but there may be more. P.S. Here is the result of the comparison, the type information in api.xml is not easy to parse by a program, so only name of the parameters are compared. [...] c_plgriddata is not documented. [...] plggriddata does not exist but remains in doc. [...] This documentation misspelling issue fixed in revision 12949. I will try to get to the other issues you found later today so that your check tool (at least in its current limited form) will give a clean report. 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 __ -- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk ___ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel
Re: [Plplot-devel] New binding of Go programming language
Hi Hǎiliàng: Could you try the latest svn trunk version (revision 12954) with your checker? For most cases I just modified api.xml, but in a few cases the documented name of the parameters made more sense than the name used in plplot.h and the code in src/*.c so I changed the source code instead. With revision 12954 (or later) the result of your checker should be a list of the remaining 9 (or less) undocumented functions in api.xml but nothing else. On 2014-01-22 15:40+0800 Hailiang Wang wrote: Here is the result of the comparison [from the checker]. The above revision should get rid of plgriddata (misspelling in docs) and plwid (not properly deprecated) from the following list of 11 functions. It will take a while to implement the missing documentation for the remaining 9 functions on this list, but I hope to deal with a few of those later today. c_plbtime is not documented. c_plconfigtime is not documented. c_plctime is not documented. c_plgcmap1_range is not documented. c_plgdrawmode is not documented. c_plgriddata is not documented. c_plot3dcl is not documented. c_plscmap1_range is not documented. c_plsdrawmode is not documented. c_plsurf3dl is not documented. c_plwid is not documented. The above revision should have dealt with the remaining issues reported by your checker below. number 0 parameter name mismatch for function pladv ( sub page ) number 3 parameter name mismatch for function plbox3 ( nxsub nsubx ) number 7 parameter name mismatch for function plbox3 ( nysub nsuby ) number 11 parameter name mismatch for function plbox3 ( nzsub nsubz ) number 0 parameter name mismatch for function plcol0 ( color icol0 ) number 17 parameter name mismatch for function plcolorbar ( labels label ) number 0 parameter name mismatch for function plcont ( z f ) number 0 parameter name mismatch for function plfont ( font ifont ) number 0 parameter name mismatch for function plfontld ( set fnt ) number 0 parameter name mismatch for function plgfam ( fam p_fam ) number 1 parameter name mismatch for function plgfam ( num p_num ) number 2 parameter name mismatch for function plgfam ( bmax p_bmax ) number 0 parameter name mismatch for function plgfci ( fci pfci ) number 0 parameter name mismatch for function plgpage ( xp p_xp ) number 1 parameter name mismatch for function plgpage ( yp p_yp ) number 2 parameter name mismatch for function plgpage ( xleng p_xleng ) number 3 parameter name mismatch for function plgpage ( yleng p_yleng ) number 4 parameter name mismatch for function plgpage ( xoff p_xoff ) number 5 parameter name mismatch for function plgpage ( yoff p_yoff ) plggriddata does not exist but remains in doc. number 0 parameter name mismatch for function plgstrm ( strm p_strm ) number 0 parameter name mismatch for function plgxax ( digmax p_digmax ) number 1 parameter name mismatch for function plgxax ( digits p_digits ) number 0 parameter name mismatch for function plgyax ( digmax p_digmax ) number 1 parameter name mismatch for function plgyax ( digits p_digits ) number 0 parameter name mismatch for function plgzax ( digmax p_digmax ) number 1 parameter name mismatch for function plgzax ( digits p_digits ) number 0 parameter name mismatch for function pllsty ( n lin ) parameter count mismatch for function plot3dc Thanks very much for your essential help in getting api.xml more consistent with plplot.h, and I hope your updated checker report will be much smaller for the latest svn trunk version of PLplot. 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 __ -- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk ___ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel
Re: [Plplot-devel] New binding of Go programming language
Hi Alan, Here are results from revision 12954: c_plbtime is not documented. c_plconfigtime is not documented. c_plctime is not documented. c_plgcmap1_range is not documented. c_plgdrawmode is not documented. c_plot3dcl is not documented. c_plscmap1_range is not documented. c_plsdrawmode is not documented. c_plsurf3dl is not documented. number 0 parameter name mismatch for function plprec ( set setp ) number 0 parameter name mismatch for function plpsty ( n patt ) number 0 parameter name mismatch for function plptex3 ( x wx ) number 1 parameter name mismatch for function plptex3 ( y wy ) number 2 parameter name mismatch for function plptex3 ( z wz ) number 2 parameter name mismatch for function plscmap1l ( pos intensity ) number 2 parameter name mismatch for function plscmap1la ( pos intensity ) number 6 parameter name mismatch for function plscmap1la ( coord4 a ) number 0 parameter name mismatch for function plseed ( seed s ) number 4 parameter name mismatch for function plshade ( xmin left ) number 5 parameter name mismatch for function plshade ( xmax right ) number 6 parameter name mismatch for function plshade ( ymin bottom ) number 7 parameter name mismatch for function plshade ( ymax top ) number 4 parameter name mismatch for function plshade1 ( xmin left ) number 5 parameter name mismatch for function plshade1 ( xmax right ) number 6 parameter name mismatch for function plshade1 ( ymin bottom ) number 7 parameter name mismatch for function plshade1 ( ymax top ) parameter count mismatch for function plspal1 Hǎiliàng -- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk ___ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel
Re: [Plplot-devel] New binding of Go programming language
On 2014-01-23 09:57+0800 Hailiang Wang wrote: Hi Alan, Here are results from revision 12954: c_plbtime is not documented. c_plconfigtime is not documented. c_plctime is not documented. c_plgcmap1_range is not documented. c_plgdrawmode is not documented. c_plot3dcl is not documented. c_plscmap1_range is not documented. c_plsdrawmode is not documented. c_plsurf3dl is not documented. number 0 parameter name mismatch for function plprec ( set setp ) number 0 parameter name mismatch for function plpsty ( n patt ) number 0 parameter name mismatch for function plptex3 ( x wx ) number 1 parameter name mismatch for function plptex3 ( y wy ) number 2 parameter name mismatch for function plptex3 ( z wz ) number 2 parameter name mismatch for function plscmap1l ( pos intensity ) number 2 parameter name mismatch for function plscmap1la ( pos intensity ) number 6 parameter name mismatch for function plscmap1la ( coord4 a ) number 0 parameter name mismatch for function plseed ( seed s ) number 4 parameter name mismatch for function plshade ( xmin left ) number 5 parameter name mismatch for function plshade ( xmax right ) number 6 parameter name mismatch for function plshade ( ymin bottom ) number 7 parameter name mismatch for function plshade ( ymax top ) number 4 parameter name mismatch for function plshade1 ( xmin left ) number 5 parameter name mismatch for function plshade1 ( xmax right ) number 6 parameter name mismatch for function plshade1 ( ymin bottom ) number 7 parameter name mismatch for function plshade1 ( ymax top ) parameter count mismatch for function plspal1 Hi Hǎiliàng: Thanks for your further report. Since all of these argument name mismatches are new (and later in the alphabetized list of functions than the previous name mismatches that I solved), and this report and your previou report also ended with a count mismatch, it appears that your check logic stops all processing if there is a parameter count mismatch. Could you change that logic to stop processing for that particular function but continue further checking additional functions for argument count and argument name mismatches? The reason I have requested this logic change is I would prefer to see all mismatches in one report rather than piecemeal depending on what count misatches I have solved previously. 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 __ -- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk ___ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel
Re: [Plplot-devel] New binding of Go programming language
Yes, you're right. Here is the complete result: c_plbtime is not documented. c_plconfigtime is not documented. c_plctime is not documented. c_plgcmap1_range is not documented. c_plgdrawmode is not documented. c_plot3dcl is not documented. c_plscmap1_range is not documented. c_plsdrawmode is not documented. c_plsurf3dl is not documented. number 0 parameter name mismatch for function plprec ( set setp ) number 0 parameter name mismatch for function plpsty ( n patt ) number 0 parameter name mismatch for function plptex3 ( x wx ) number 1 parameter name mismatch for function plptex3 ( y wy ) number 2 parameter name mismatch for function plptex3 ( z wz ) number 2 parameter name mismatch for function plscmap1l ( pos intensity ) number 2 parameter name mismatch for function plscmap1la ( pos intensity ) number 6 parameter name mismatch for function plscmap1la ( coord4 a ) number 0 parameter name mismatch for function plseed ( seed s ) number 4 parameter name mismatch for function plshade ( xmin left ) number 5 parameter name mismatch for function plshade ( xmax right ) number 6 parameter name mismatch for function plshade ( ymin bottom ) number 7 parameter name mismatch for function plshade ( ymax top ) number 4 parameter name mismatch for function plshade1 ( xmin left ) number 5 parameter name mismatch for function plshade1 ( xmax right ) number 6 parameter name mismatch for function plshade1 ( ymin bottom ) number 7 parameter name mismatch for function plshade1 ( ymax top ) parameter count mismatch for function plspal1 number 0 parameter name mismatch for function plstart ( device devname ) number 0 parameter name mismatch for function plstransform ( transform_fun coordinate_transform ) number 1 parameter name mismatch for function plstransform ( data coordinate_transform_data ) number 1 parameter name mismatch for function plstripa ( p pen ) number 0 parameter name mismatch for function plstyl ( nels nms ) parameter count mismatch for function plsurf3d number 3 parameter name mismatch for function plw3d ( xmin xmin0 ) number 4 parameter name mismatch for function plw3d ( xmax xmax0 ) number 5 parameter name mismatch for function plw3d ( ymin ymin0 ) number 6 parameter name mismatch for function plw3d ( ymax ymax0 ) number 7 parameter name mismatch for function plw3d ( zmin zmin0 ) number 8 parameter name mismatch for function plw3d ( zmax zmax0 ) -- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk ___ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel
[Plplot-devel] New binding of Go programming language
Hello everyone, I have made a Go (http://golang.org) binding for PLPlot, and put it under my github repo: https://github.com/hailiang/go-plplot Wrappers to C functions are complete, and I plan to make a declarative layer around it gradually. Best regards, Hǎiliàng -- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk ___ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel
Re: [Plplot-devel] New binding of Go programming language
On Tue, Jan 21, 2014 at 8:21 AM, Hailiang Wang hwang@gmail.com wrote: Hello everyone, I have made a Go (http://golang.org) binding for PLPlot, and put it under my github repo: https://github.com/hailiang/go-plplot Wrappers to C functions are complete, and I plan to make a declarative layer around it gradually. That's wonderful news! Thank you for creating and releasing these bindings. Do the Go bindings target a specific release/revision of PLplot? If so that should probably be documented. Hez Best regards, Hǎiliàng -- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk ___ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel
Re: [Plplot-devel] New binding of Go programming language
On 2014-01-21 21:21+0800 Hailiang Wang wrote: Hello everyone, I have made a Go (http://golang.org) binding for PLPlot, and put it under my github repo: https://github.com/hailiang/go-plplot Wrappers to C functions are complete, and I plan to make a declarative layer around it gradually. Hi Hailiang: Inspired by Hez's positive reaction, I read http://talks.golang.org/2012/splash.article, and indeed Go seems a really cool and interesting language. Just out of curiosity, how are you creating the Go bindings for Plplot? Do you use swig (currently used to generate our Python, Java, Lua, and Octave bindings) or something else? 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 __ -- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk ___ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel
Re: [Plplot-devel] New binding of Go programming language
Hi Alan and Hez, Yes, I used to use C++ and Python but now Go has become my primary language. The binding is automatically generated from C header and is not targeted to a specific version of PLPlot. I'm not quite satisfied with the code that SWIG generated for Go, so I write a wrapper generator called cwrap (https://github.com/hailiang/cwrap), it uses gccxml to parse C header and generate Go wrappers. By the way, before cwrap is made, I have tried another way, parsing the PLPlot docbook XML document and generate the wrapper. The pro of the method is that XML is a lot easier to parse than C header, and also in the document, the parameters are already marked as IN or OUT, sometimes more accurate than guessing by const modifier. The con is that the doc may not be fully synchronized with the header file. Hǎiliàng -- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk ___ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel
Re: [Plplot-devel] New binding of Go programming language
On 2014-01-22 08:55+0800 Hailiang Wang wrote: By the way, before cwrap is made, I have tried another way, parsing the PLPlot docbook XML document and generate the wrapper. The pro of the method is that XML is a lot easier to parse than C header, and also in the document, the parameters are already marked as IN or OUT, sometimes more accurate than guessing by const modifier. The con is that the doc may not be fully synchronized with the header file. Hi Hailiang: Yes, api.xml is currently maintained by hand so it is a substantial concern whether it is consistent with the header. But you have given me an idea which would be to use gccxml to convert the header information into XML, then check api.xml to make sure it is consistent with that gccxml-generated information (i.e., check for a consistent list of functions and a consistent list of arguments and their type for each of those functions). Once such a checking implementation were implemented, it should also be possible to extend it slightly to update the relevant subset of api.xml information to be consistent with the header information. I have too much on my plate already to implement this idea in the forseeable future so I would welcome someone else here stepping forward and implementing it instead. 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 __ -- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk ___ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel
Re: [Plplot-devel] New binding of Go programming language
It takes not much effort to build a comparison program because the parser for api.xml is ready-made. I put the tool under my github reop here https://github.com/hailiang/go-plplot/tree/master/c/check Hǎiliàng P.S. Here is the result of the comparison, the type information in api.xml is not easy to parse by a program, so only name of the parameters are compared. c_plbtime is not documented. c_plconfigtime is not documented. c_plctime is not documented. c_plgcmap1_range is not documented. c_plgdrawmode is not documented. c_plgriddata is not documented. c_plot3dcl is not documented. c_plscmap1_range is not documented. c_plsdrawmode is not documented. c_plsurf3dl is not documented. c_plwid is not documented. number 0 parameter name mismatch for function pladv ( sub page ) number 3 parameter name mismatch for function plbox3 ( nxsub nsubx ) number 7 parameter name mismatch for function plbox3 ( nysub nsuby ) number 11 parameter name mismatch for function plbox3 ( nzsub nsubz ) number 0 parameter name mismatch for function plcol0 ( color icol0 ) number 17 parameter name mismatch for function plcolorbar ( labels label ) number 0 parameter name mismatch for function plcont ( z f ) number 0 parameter name mismatch for function plfont ( font ifont ) number 0 parameter name mismatch for function plfontld ( set fnt ) number 0 parameter name mismatch for function plgfam ( fam p_fam ) number 1 parameter name mismatch for function plgfam ( num p_num ) number 2 parameter name mismatch for function plgfam ( bmax p_bmax ) number 0 parameter name mismatch for function plgfci ( fci pfci ) number 0 parameter name mismatch for function plgpage ( xp p_xp ) number 1 parameter name mismatch for function plgpage ( yp p_yp ) number 2 parameter name mismatch for function plgpage ( xleng p_xleng ) number 3 parameter name mismatch for function plgpage ( yleng p_yleng ) number 4 parameter name mismatch for function plgpage ( xoff p_xoff ) number 5 parameter name mismatch for function plgpage ( yoff p_yoff ) plggriddata does not exist but remains in doc. number 0 parameter name mismatch for function plgstrm ( strm p_strm ) number 0 parameter name mismatch for function plgxax ( digmax p_digmax ) number 1 parameter name mismatch for function plgxax ( digits p_digits ) number 0 parameter name mismatch for function plgyax ( digmax p_digmax ) number 1 parameter name mismatch for function plgyax ( digits p_digits ) number 0 parameter name mismatch for function plgzax ( digmax p_digmax ) number 1 parameter name mismatch for function plgzax ( digits p_digits ) number 0 parameter name mismatch for function pllsty ( n lin ) parameter count mismatch for function plot3dc -- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk ___ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel