[go-nuts] Re: Graphing libraries in golang

2017-09-28 Thread Vikram Rawat
Thanks for your reply. Library seems promising. but when I run it , this errors out cannot find package "bitbucket.org/zombiezen/gopdf/pdf" in any of: C:\Go\src\bitbucket.org\zombiezen\gopdf\pdf (from $GOROOT) C:\Projects\Go\src\bitbucket.org\zombiezen\gopdf\pdf (from $GOPATH) when I try go

[go-nuts] Re: Parsing a CSV column with partially double-quotes in it

2017-09-28 Thread pierre . curto
Because this is invalid csv. Should be: This\t"""is"" no"\tfun If you still need to parse it, then write your own parser that handles it, for instance using a bufio.Reader. Le jeudi 28 septembre 2017 22:56:27 UTC+2, Lantos István a écrit : > > > I want to parse the following CSV structure. The c

Re: [go-nuts] Graphing libraries in golang

2017-09-28 Thread Sebastien Binet
On Wed, Sep 27, 2017 at 5:05 PM, Vikram Rawat wrote: > I come from an R background and I am not able to find one single decent > not too fancy but a decent graphing library that's good enough to work. > > Can you please suggest any library that is good enough for production > level plots. Visuali

[go-nuts] Re: Graphing libraries in golang

2017-09-28 Thread Egon
On Friday, 29 September 2017 08:42:50 UTC+3, Vikram Rawat wrote: > > By graphing I actually meant *data visualization libraries* > > SVGO would be so hard to pass a data to and design even the basic and > simple *BARCHART* > > other ones don't have enough documentation to understand how it works

[go-nuts] Re: Graphing libraries in golang

2017-09-28 Thread Vikram Rawat
> > By graphing I actually meant *data visualization libraries* SVGO would be so hard to pass a data to and design even the basic and simple *BARCHART* other ones don't have enough documentation to understand how it works. and The reason I am trying GO is that R is slow. There is no point in

Re: [go-nuts] internal/poll.runtime_pollWait problem on RHEL with 3.10.0-327.el7.x86_64

2017-09-28 Thread Dan Kortschak
I have just tried replicating the issue today and this time, one machine passes everything, while the other does not. I am beginning to suspect that file system loads may be a possible cause (the head node is quiet, but the file system is shared across many nodes in both cases). The newer machine

Re: [go-nuts] Building golang libraries

2017-09-28 Thread desaiabhijit
Thanks Ian Can you please provide command line to build executable using library go build -linkshared main.go -linkshared not supported on darwin/amd64 *doesn't work* Thanks for the help Rgds On Friday, September 29, 2017 at 9:55:53 AM UTC+5:30, Ian Lance Taylor wrote: > > On Thu, Sep 28

Re: [go-nuts] Building golang libraries

2017-09-28 Thread Ian Lance Taylor
On Thu, Sep 28, 2017 at 9:21 PM, wrote: > > Want to create libraries ( static or dynamic ) so that that I don't want to > compile every time when I build my executable > > "github.com/everjit/Ion" <--- should not refer to code rather it should > refer to build library like .so or .dll ( in window

Re: [go-nuts] internal/poll.runtime_pollWait problem on RHEL with 3.10.0-327.el7.x86_64

2017-09-28 Thread Ian Lance Taylor
On Thu, Sep 28, 2017 at 5:40 PM, Dan Kortschak wrote: > > I can replicate this on another newer RHEL machine. In both cases the > machines are quiet (they are the head nodes of HPC infrastructure and > don't see a great deal of work due to the HPC use policy. > > I have tried building previous ver

[go-nuts] Building golang libraries

2017-09-28 Thread desaiabhijit
Want to create libraries ( static or dynamic ) so that that I don't want to compile every time when I build my executable "github.com/everjit/Ion" <--- should not refer to code rather it should refer to build library like .so or .dll ( in windows ) and will provide that to go build command line

Re: [go-nuts] go test fails - appear that it misses capturing stdout

2017-09-28 Thread Ayan George
On 09/28/2017 07:29 PM, gocss wrote: > first the code follow by output from 'go test -v' > Also, you can sort of fix this by copying os.Stdout within the example instead of the global var () section like: // this does not fail because iowr is a copy of os.Stdout after // it has been 'hijacked'

Re: [go-nuts] Needing some explanation of a compile time error

2017-09-28 Thread Dan Kortschak
StringChan and StringSendingChan are named types and so you will need a conversion. It would be easier though to just not declare types here. You don't need them. https://play.golang.org/p/0dBHgsaP0v On Thu, 2017-09-28 at 17:19 -0700, lmumar wrote: > Hi all, > > Good day to you all. I just recen

Re: [go-nuts] internal/poll.runtime_pollWait problem on RHEL with 3.10.0-327.el7.x86_64

2017-09-28 Thread Dan Kortschak
I can replicate this on another newer RHEL machine. In both cases the machines are quiet (they are the head nodes of HPC infrastructure and don't see a great deal of work due to the HPC use policy. I have tried building previous versions and see similar though different failures going back to 1.7

[go-nuts] Needing some explanation of a compile time error

2017-09-28 Thread lmumar
Hi all, Good day to you all. I just recently coded again in Go after trying out other languages. I went back to Go because it's easy and straightforward. I was going through a tutorial related to channels and tried something different by declaring my channels with type statement but I hit a com

Re: [go-nuts] go test fails - appear that it misses capturing stdout

2017-09-28 Thread Ayan George
On 09/28/2017 07:29 PM, gocss wrote: > first the code follow by output from 'go test -v' > Take a look at src/testing/example.go around line 15. The testing code temporarily re-assigns os.Stdout for the duration of the Example. It sets it to one of the end of a pipe that it uses to capture th

Re: [go-nuts] Weird stack overflow error for struct with interface in it (a golang bug? )

2017-09-28 Thread Yaroslav Molochko
thanks! On Friday, September 29, 2017 at 2:36:06 AM UTC+3, Steven Hartland wrote: > > Which then calls the function your in, which then creates another > variable BOOM! > > On 29/09/2017 00:15, Yaroslav Molochko wrote: > > But I'm using other variable not the one I'm unmarshaling to: > > va

[go-nuts] Variable JSON format parsing, any best practice?

2017-09-28 Thread Yaroslav Molochko
I have following json messages: {"status":"success","data":["val1","val2","val3"]} {"status":"success","data":{"resultType":"vector","result":[{"metric":{"host_name":"hss4"},"value":[1504157313.787,"24"]},{"metric":{"host_name":"hss508"},"value":[1504157313.787,"32"]}]}} where *data* can have sev

Re: [go-nuts] Weird stack overflow error for struct with interface in it (a golang bug? )

2017-09-28 Thread Steven Hartland
Which then calls the function your in, which then creates another variable BOOM! On 29/09/2017 00:15, Yaroslav Molochko wrote: But I'm using other variable not the one I'm unmarshaling to: var ts Result err := json.Unmarshal(b, &ts) On Friday, September 29, 2017 at 2:10:25 AM UTC+3, Ste

Re: [go-nuts] Weird stack overflow error for struct with interface in it (a golang bug? )

2017-09-28 Thread Yaroslav Molochko
But I'm using other variable not the one I'm unmarshaling to: var ts Result err := json.Unmarshal(b, &ts) On Friday, September 29, 2017 at 2:10:25 AM UTC+3, Steven Hartland wrote: > > You created an infinite recursion by calling Unmarshal on the same type > your unmarshalling, hence the stack

Re: [go-nuts] Weird stack overflow error for struct with interface in it (a golang bug? )

2017-09-28 Thread Steven Hartland
You created an infinite recursion by calling Unmarshal on the same type your unmarshalling, hence the stack overflow error. On 28/09/2017 23:59, Yaroslav Molochko wrote: Here is the code which runs: https://play.golang.org/p/ds3KZspFvE If you press play, it will work fine and gives an expecte

[go-nuts] Weird stack overflow error for struct with interface in it (a golang bug? )

2017-09-28 Thread Yaroslav Molochko
Here is the code which runs: https://play.golang.org/p/ds3KZspFvE If you press play, it will work fine and gives an expected output, as soon as you uncomment this part: /* func (u *Result) UnmarshalJSON(b []byte) error { var ts Result err := json.Unmarshal(b, &ts) if err != nil { fmt.Println(

Re: [go-nuts] tagging releases of x/crypto

2017-09-28 Thread Ian Lance Taylor
On Thu, Sep 28, 2017 at 1:34 PM, Peter Moody wrote: > > Would you be amenable to to CL's that just add tags (can > go.googlesource.com handle CLs like that?) I don't know. That is one thing to find out, somehow. Ian -- You received this message because you are subscribed to the Google Groups

[go-nuts] Re: Defer with anon func and func literal

2017-09-28 Thread John Jeffery
If you want an anonymous defer function to have the same effect as a separate function, ensure that they accept the same parameters. To continue your example, this third version produces the same result as your first version, but uses an anonymous defer function. https://play.golang.org/p/oqQC_

Re: [go-nuts] tagging releases of x/crypto

2017-09-28 Thread 'Peter Moody' via golang-nuts
On Thu, Sep 28, 2017 at 1:23 PM, Ian Lance Taylor wrote: > On Thu, Sep 28, 2017 at 1:12 PM, Peter Moody wrote: >> following on up on this. Is there anything that would help make my case? >> >> is this a case of "the ship has already sailed", nobody wants to take >> the time to maintain tags in th

Re: [go-nuts] tagging releases of x/crypto

2017-09-28 Thread Ian Lance Taylor
On Thu, Sep 28, 2017 at 1:12 PM, Peter Moody wrote: > following on up on this. Is there anything that would help make my case? > > is this a case of "the ship has already sailed", nobody wants to take > the time to maintain tags in the future, etc? we could potentially > fork stuff internally and

Re: [go-nuts] tagging releases of x/crypto

2017-09-28 Thread 'Peter Moody' via golang-nuts
following on up on this. Is there anything that would help make my case? is this a case of "the ship has already sailed", nobody wants to take the time to maintain tags in the future, etc? we could potentially fork stuff internally and add tags ourselves, but that comes with all of the obvious pro

Re: [go-nuts] internal/poll.runtime_pollWait problem on RHEL with 3.10.0-327.el7.x86_64

2017-09-28 Thread Ian Lance Taylor
On Wed, Sep 27, 2017 at 10:20 PM, Dan Kortschak wrote: > > I am seeing all.bash fail when testing cmd/go with a likely cause being > internal/poll.runtime_pollWait. > > I'm trying to build go1.9 (with a change to the heap size), but > all.bash fails as shown below. Is this a known problem? and if

Re: [go-nuts] Defer with anon func and func literal

2017-09-28 Thread Marvin Renich
* Karan Chaudhary [170928 08:50]: > I'm trying to find rationale for this: why is "defer foo(x)" treated > differently than "defer func() { foo(x) }" by the language designers? Here is what the language spec says: Each time a "defer" statement executes, the function value and parameters to

Re: [go-nuts] Re: How to read multi-page TIFF image?

2017-09-28 Thread Michael Jones
thanks, i'll make notes there On Wed, Sep 27, 2017 at 11:01 PM, Nigel Tao wrote: > On Thu, Sep 28, 2017 at 10:28 AM, Michael Jones > wrote: > > Not quite related, but if changes are going to happen, I want to add (or > see > > someone add) colorspace tags to the PNG code and the TIFF code. > >

Re: [go-nuts] Re: go 1.9 go test build fail on // Output:

2017-09-28 Thread Ayan George
gocss wrote: > good catch however the thing that made it not obvious > is that is it built without the // Output: line ... > Running go test -work can show why it fails ... further this does make > sense too > that no such testing args should be in an 'Example' program. Just out of

Re: [go-nuts] `ltrace` yields "Couldn't find .dynsym or .dynstr in "/proc/*/exe" with binaries generated by "go build *.go"

2017-09-28 Thread David Collier-Brown
Indeed: a monotonic increasing number is a good thing, but I wouldn't try to make it an actual time, just a relative time-like-thingie that _you_ define with the properties you need and that you can implement. --dave On Wednesday, September 27, 2017 at 6:55:37 AM UTC-4, Dave Cheney wrote: > >

Re: [go-nuts] Defer with anon func and func literal

2017-09-28 Thread Jan Mercl
On Thu, Sep 28, 2017 at 2:50 PM Karan Chaudhary wrote: > I'm trying to find rationale for this: why is "defer foo(x)" treated differently than "defer func() { foo(x) }" by the language designers? They are not treated differently. The defered functions are different. -- -j -- You received t

Re: [go-nuts] Defer with anon func and func literal

2017-09-28 Thread Karan Chaudhary
I see. I'm trying to find rationale for this: why is "defer foo(x)" treated differently than "defer func() { foo(x) }" by the language designers? On Thursday, 28 September 2017 17:57:45 UTC+5:30, Jan Mercl wrote: > > On Thu, Sep 28, 2017 at 2:18 PM Karan Chaudhary > wrote: > > That's expected,

Re: [go-nuts] Defer with anon func and func literal

2017-09-28 Thread Jan Mercl
On Thu, Sep 28, 2017 at 2:18 PM Karan Chaudhary wrote: That's expected, the specs say that execution of the defer statement evaluates the arguments of the deferred function. -- -j -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscrib

Re: [go-nuts] Graphing libraries in golang

2017-09-28 Thread Jan Mercl
On Wed, Sep 27, 2017 at 5:05 PM Vikram Rawat wrote: Also there's https://github.com/cznic/plot. -- -j -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-

Re: [go-nuts] Re: Graphing libraries in golang

2017-09-28 Thread Rich
Not sure if this applies but I did some graphing using this: https://godoc.org/github.com/ajstarks/svgo On Wednesday, September 27, 2017 at 8:35:49 PM UTC-4, kortschak wrote: > > On Wed, 2017-09-27 at 08:54 -0700, Volker Dobler wrote: > > One from https://awesome-go.com/#science-and-data-analy

[go-nuts] Defer with anon func and func literal

2017-09-28 Thread Karan Chaudhary
Hi, I have a doubt regarding use of enclosing function's variables inside functions used as "deferred". If function literal is used as "deferred" func (say foo), and it uses enclosing function's variable (say x) as one of its arguments, the value of x is "frozen" and func foo is called with t

Re: [go-nuts] go 1.9 go test build fail on // Output:

2017-09-28 Thread Ayan George
On 09/28/2017 08:12 AM, gocss wrote: > go test > # testmain > /tmp/go-build584983468/csspc/alog/_test/_testmain.go:30:22: cannot use > alog.ExampleNew (type func(*testing.T)) as type func() in field value > FAIL    csspc/alog [build failed] > > code follows: > package alog > > import ( >     "f