[go-nuts] Re: Oracle db and panics on interrupt

2017-04-27 Thread pierre . curto
Hello, Thanks a lot indeed, I did not know about those. I still get crashes on OSX besides the variables being read by the OCI libs (traces shows they are). The other thing is that when this happens, the process goes into an infinite loop spitting "fatal: morestack on g0" for ever, and kill -9

[go-nuts] How let go and c code work Alternately in the same thread

2017-04-27 Thread hui zhang
How let go and c code work Alternately in the same thread with goroutine(corouting mechanism) Check the code below. c and go code in one thread they just do work 1 by 1. Expected Result > Do CWork > Do GoWork > Do CWork > Do GoWork > Do CWork > . //c code > void CWork() { > while(1) { >

[go-nuts] a productive simple conf loader

2017-04-27 Thread zsounder
goconf - Read configuration automatically based on the given struct's field name. - Load configuration from multiple sources - multiple file inherit -- You received this message because you are subscribed to the Google Groups "golang-nuts" g

[go-nuts] Re: Mapping restricted types to Go

2017-04-27 Thread alan . t . conway
This is a MUCH simpler solution. I'm learning: package main // AnnotationKey is used as a map key for particular AMQP maps. // It holds an interface{} which must be either a Symbol or a uint64 type AnnotationKey struct { value interface{} } type Symbol string func AnnotationKeySymbol(v Symb

[go-nuts] Weird performance with exp/shiny

2017-04-27 Thread Zellyn
I'm sure I'm doing something hideously wrong with shiny, since my emulator runs three times faster on my MacBook if I run it under VirtualBox/Ubuntu. Yes, you read that right. Here, I tweeted an animated gif of them running side by side: https://twitter.com/zellyn/status/857674501928222720 I ri

[go-nuts] terminal package that utilize io.ReadWriter

2017-04-27 Thread Vasiliy Tolstov
I have some ReadWriter stream interface, that utilize custom rpc to send/recv data from/to endpoint. I need terminal package to run on client that understand standard terminal escape symbols and can be used with ReadWriter interface. On another end of enpoint runned bash. I'm try ssh/terminal pack

Re: [go-nuts] Re: Recover considered harmful

2017-04-27 Thread Dave Cheney
The take away for me is; prefer returning an error to to caller wherever possible. Overuse of panic begats overuse of recover and that just leads to more problems [1]. 1. https://github.com/golang/go/issues/13879 -- You received this message because you are subscribed to the Google Groups "go

[go-nuts] Re: Oracle db and panics on interrupt

2017-04-27 Thread Tamás Gulácsi
2017. április 27., csütörtök 18:18:19 UTC+2 időpontban Didier Spezia a következőt írta: > > > I'm not sure it can help with the problem, but starting with Oracle 11, > OCI installs some custom signal handlers (even catching segmentation > faults). > They can be deactivated by setting options in

[go-nuts] Re: Errors from Gob

2017-04-27 Thread hbhaskaran
> should be perfectly writable having just been created and checked for errors on os.Create a few lines earlier past performance is not a predictor of future results :p are you writing to an NFS mount point? On Thursday, April 27, 2017 at 8:55:36 AM UTC-7, Chris Hopkins wrote: > > So amusingly

[go-nuts] Re: Oracle db and panics on interrupt

2017-04-27 Thread Didier Spezia
I'm not sure it can help with the problem, but starting with Oracle 11, OCI installs some custom signal handlers (even catching segmentation faults). They can be deactivated by setting options in the sqlnet.ora file. Here, we run all our OCI clients with: DIAG_SIGHANDLER_ENABLED=FALSE DIAG_ADR_E

[go-nuts] docker multi-stage builds and small binary sizes

2017-04-27 Thread Sankar
Anyone aware of links explaining if-we-can/how-to create lean containers for golang http servers by using the new multi-stage build options in Docker ? Similar to: https://codefresh.io/blog/node_docker_multistage/ That would be very handy than doing GOOS=linux builds and then copying the binar

[go-nuts] Errors from Gob

2017-04-27 Thread Chris Hopkins
So amusingly I've just had Gob report the following error: panic: write gob_fetch.txt: host is down It referring to a file as a host is of course understandable but it's a little troublesome because as far as I can tell the file should be perfectly writable having just been created and checked

Re: [go-nuts] Change imaginary part of a complex

2017-04-27 Thread Val
Thank you Thomas for insight! On Thursday, April 20, 2017 at 10:21:23 PM UTC+2, Thomas Bushnell, BSG wrote: > > The other way is to add the c to its conjugate and then add the imaginary > part, using cmplx.Conj. But that really amounts to what you're doing > already. > > On Thu, Apr 20, 2017 at

[go-nuts] Re: google-api-go-client: drive/v3 - remove file properties or appProperties

2017-04-27 Thread Sylvain Rouquette
I don't think there is a solution with the current implementation, I reported the bug. https://github.com/google/google-api-go-client/issues/201 -- *"This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are ad

Re: [go-nuts] Re: Recover considered harmful

2017-04-27 Thread mhhcbon
> > Most languages, who stick with Exceptions, usually has two kind of > exceptions: > - "exception for regular error", i.e. wrong input, wrong system state, or > for "control flow" > - and "fatal exceptions", > agree to that. Current error management is not satisfying and pushes the community

[go-nuts] google-api-go-client: drive/v3 - remove file properties or appProperties

2017-04-27 Thread Sylvain Rouquette
Hello, I'm using the google drive api v3 for Go to send requests (update), and I'm trying to remove appProperties I created on a file. Here is the comment from drive-gen.go: type File struct { // AppProperties: A collection of arbitrary key-value pairs which are // private to the requesting app.

Re: [go-nuts] Re: Recover considered harmful

2017-04-27 Thread Jesper Louis Andersen
On Wed, Apr 26, 2017 at 10:55 AM Peter Herth wrote: > > No, panic certainly does not do that. It prints the stack trace. A proper > logger could add additional information about the program state at the > point of the panic, which is not visible from the stack trace. It also > might at least be r

[go-nuts] Re: Recover considered harmful

2017-04-27 Thread Johan Bolmsjö
Den måndag 24 april 2017 kl. 11:02:55 UTC+2 skrev Sokolov Yura: > > I want to ask: > - how useful `recover` for you? > In one piece of code it was extremely handy. A TLV protocol decoder taking a bytes buffer as input. The TLVs could be nested so TLVs containing TLVs etc. Instead of manually bo

[go-nuts] Strange Go runtime behavior related to xml.Unmarshal

2017-04-27 Thread Nikos Anastopoulos
Hi list, I have a Go app that, among others, continuously parses XML files to extract dynamic info. This seems to cause a strange behavior in the Go runtime, according to which the underlying Go threads keep increasing over time. I verified this by commenting out several parts of my app code

[go-nuts] Re: [ANN] astilectron - Build cross platform GUI apps with GO and Electron (HTML/JS/CSS)

2017-04-27 Thread Asticode
I do agree with you regarding the size of the app once everything is setup. Honestly chosing Electron is more a choice by default than anything else. imo the chosen project should: - be cross platform - be well maintained - allow creating non-native looks through HTML/JS/CSS since I think it's

[go-nuts] [ANN][wip] plumber: builds pipes to transform a data stream

2017-04-27 Thread mhhcbon
Hi, *Purpose* builds pipes to transform a data stream. It comes with a generator to avoid you some copy paste, and provide a standard bytes stream to get started with []byte. *Example* Following example reads a source of []byte, os.Stdin, as a list of versions, one per line, manipulates and

[go-nuts] Re: [ANN] astilectron - Build cross platform GUI apps with GO and Electron (HTML/JS/CSS)

2017-04-27 Thread mhhcbon
I like it too, i'm only worried by the size of the app once everything it setup. I wonder if its not possible to have something smaller, obviously with less capabilities. imho, i m interested mostly in window positioning and decoration. Communication is less interesting to me as i can work with

Re: [go-nuts] Overriding cgo version

2017-04-27 Thread James Pettyjohn
Ya, it's noted in there it was for tests only. I think that should be a part of the build env, not the source. I've rolled back for now. On Wednesday, April 26, 2017 at 5:06:57 PM UTC-7, Ian Lance Taylor wrote: > > [ + mpvl ] > > On Wed, Apr 26, 2017 at 4:39 PM, James Pettyjohn > wrote: > > I