Re: [Plplot-devel] New binding of Go programming language

2014-01-29 Thread Alan W. Irwin
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

Re: [Plplot-devel] New binding of Go programming language

2014-01-28 Thread Hǎiliàng Wáng
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

Re: [Plplot-devel] New binding of Go programming language

2014-01-28 Thread Alan W. Irwin
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

Re: [Plplot-devel] New binding of Go programming language

2014-01-27 Thread Hailiang Wang
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

Re: [Plplot-devel] New binding of Go programming language

2014-01-27 Thread Alan W. Irwin
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

Re: [Plplot-devel] New binding of Go programming language

2014-01-26 Thread Alan W. Irwin
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

Re: [Plplot-devel] New binding of Go programming language

2014-01-24 Thread Hailiang Wang
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.

Re: [Plplot-devel] New binding of Go programming language

2014-01-24 Thread Hailiang Wang
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

Re: [Plplot-devel] New binding of Go programming language

2014-01-24 Thread Alan W. Irwin
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.

Re: [Plplot-devel] New binding of Go programming language

2014-01-24 Thread Alan W. Irwin
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

Re: [Plplot-devel] New binding of Go programming language

2014-01-24 Thread Hailiang Wang
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

Re: [Plplot-devel] New binding of Go programming language

2014-01-24 Thread Alan W. Irwin
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

Re: [Plplot-devel] New binding of Go programming language

2014-01-24 Thread Hailiang Wang
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

Re: [Plplot-devel] New binding of Go programming language

2014-01-23 Thread Alan W. Irwin
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

Re: [Plplot-devel] New binding of Go programming language

2014-01-22 Thread Alan W. Irwin
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

Re: [Plplot-devel] New binding of Go programming language

2014-01-22 Thread Alan W. Irwin
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

Re: [Plplot-devel] New binding of Go programming language

2014-01-22 Thread Hailiang Wang
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

Re: [Plplot-devel] New binding of Go programming language

2014-01-22 Thread Alan W. Irwin
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.

Re: [Plplot-devel] New binding of Go programming language

2014-01-22 Thread Hailiang Wang
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

[Plplot-devel] New binding of Go programming language

2014-01-21 Thread Hailiang Wang
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

Re: [Plplot-devel] New binding of Go programming language

2014-01-21 Thread Hezekiah M. Carty
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

Re: [Plplot-devel] New binding of Go programming language

2014-01-21 Thread Alan W. Irwin
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.

Re: [Plplot-devel] New binding of Go programming language

2014-01-21 Thread Hailiang Wang
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

Re: [Plplot-devel] New binding of Go programming language

2014-01-21 Thread Alan W. Irwin
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

Re: [Plplot-devel] New binding of Go programming language

2014-01-21 Thread Hailiang Wang
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