Re: [go-nuts] Re: Whats the fastest cpu (per $) regarding golang compiler performance?

2017-04-19 Thread 'slinso' via golang-nuts
A lot of factors will affect compilation speeds. And scaling won't be linear by adding more cores, I know, but how well does the compiler already uses the available cores. How well does the compiler scale? The mentioned CL above will provide some nice performance increasements for multicore

Re: [go-nuts] Naming projects with multiple words

2017-04-19 Thread Tong Sun
On Wed, Apr 19, 2017 at 9:59 AM, Jan Mercl <0xj...@gmail.com> wrote: > On Wed, Apr 19, 2017 at 3:48 PM Tong Sun wrote: > > > what's your preference and why? > > example.com/name/onenamenopunctutaionalllowercasetwotoninecharacters > Hmm... does it meant to be sarcasm or

[go-nuts] Naming projects with multiple words

2017-04-19 Thread Tong Sun
Hi, What's the idiomatic way to name Go projects with multiple words? Would it be, - github.com/my-id/multiple-words, or - github.com/my-id/multiple_words, or even - github.com/my-id/does-not_care, or - github.com/my-id/InOneWord what's your preference and why? Thanks -- You received

Re: [go-nuts] Naming projects with multiple words

2017-04-19 Thread Jan Mercl
On Wed, Apr 19, 2017 at 3:48 PM Tong Sun wrote: > what's your preference and why? example.com/name/onenamenopunctutaionalllowercasetwotoninecharacters b/c ~ what POSIX recommends for utility names. -- -j -- You received this message because you are subscribed to

[go-nuts] Flux - A simple CQRS framework for quick prototyping

2017-04-19 Thread yehohanan7
Hi, If you are interested in building *simple* applications using event sourcing and CQRS, then you could give flux a spin - https://github.com/yehohanan7/flux Thanks -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this

Re: [go-nuts] gofmt sort function declarations

2017-04-19 Thread Ian Lance Taylor
On Wed, Apr 19, 2017 at 9:25 AM, Kamil Dziedzic wrote: > > One thing that annoys me often while going through long source code file is > that often function declarations are organized in some random order. I was > thinking about using some tool (at least for my projects) to

[go-nuts] Installation process of Sizzle

2017-04-19 Thread manisha . kumari . it13
Hello dear, Can anyone guide me the installation process of Sizzle. Can I operate it on windows or Linux is required -- 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

Re: [go-nuts] Naming projects with multiple words

2017-04-19 Thread 'Chris Manghane' via golang-nuts
There's definitely no idiom here. Do what the octokittens do and probably use the first or second option, in that order. The third seems awkward, unless the underscore has some specific meaning (like how _unix is used to compile architecture-specific code). And I'm not really sure if the

[go-nuts] gofmt sort function declarations

2017-04-19 Thread Kamil Dziedzic
Hi, One thing that annoys me often while going through long source code file is that often function declarations are organized in some random order. I was thinking about using some tool (at least for my projects) to automatically order all function declarations. This seems to be already true

[go-nuts] runtime: Setting GOMAXPROCS in over-scheduled Contanier Environments

2017-04-19 Thread Josh Roppo
Hi y'all, I have a question related to improving overall CPU utilization efficiency of our CPU intensive distributed workloads. I've also posted this on the Gophers slack but as Dave Cheney pointed out recently, it's not the best medium for long winded questions. I haven't been able to find

[go-nuts] pcap.openlive cannot open virtual box VM NIC

2017-04-19 Thread chunzhang
Hi, All, I used the following code snippet on a virtual box ubtunu vm trying to capture the packet. However, even though "enp3s0" is listed in the device list, opening it causes an error as follows. The same code runs on a physical box has no problem opening the NIC. Any suggestions? TIA

[go-nuts] Pointer to Container Type

2017-04-19 Thread dc0d
In Go there is no way to pass a reference to an instance of the container/enclosing type, to a function of an embedded type. What work around do you use for this? Any idiomatic Go way? Currently I model the shared functionality using an interface. Then the implementation is another struct,

Re: [go-nuts] Pointer to Container Type

2017-04-19 Thread Ian Lance Taylor
On Wed, Apr 19, 2017 at 1:35 PM, dc0d wrote: > > In Go there is no way to pass a reference to an instance of the > container/enclosing type, to a function of an embedded type. What work > around do you use for this? Any idiomatic Go way? > > Currently I model the

Re: [go-nuts] main.go:1:1: expected 'package', found 'EOF'

2017-04-19 Thread rameshpdx
Thank you, Nico. On Friday, January 23, 2015 at 6:16:15 AM UTC-8, Nico wrote: > > Did you save before calling GoRun? > -- 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

[go-nuts] x509.Certificate.Verify: "x509: certificate signed by unknown authority"

2017-04-19 Thread dorianlangbeck
Hi, I have a "simple" issue regarding x509 certificate verification. There are two certificates: - cacert.pem: a self signed certificate - ek.pem: a certificate that was signed by cacert.pem The following command works as expected: $ openssl verify -CAfile cacert.pem ek.pem ek.pem: OK But the

Re: [go-nuts] how dose netpollblock been awaked while sysmon slepp?

2017-04-19 Thread Ian Lance Taylor
On Wed, Apr 19, 2017 at 7:42 PM, 代君 wrote: > > i have a test code like this: > func main() { > tcpAddress, err := net.ResolveTCPAddr("tcp", ":") > if err != nil { > fmt.Println(err) > } > listener, err := net.ListenTCP("tcp", tcpAddress) > > c, e :=

[go-nuts] Re: OpenGL Fonts

2017-04-19 Thread saif
have found that you can do TTF to OpenVG. but not sure how gl on go mobile will render slant lines for W. if you happen to know this is not the ideal way, please suggest. thanks. On Tuesday, April 18, 2017 at 1:02:02 PM UTC+8, saif wrote: > > Hi, > > I like to ask for your suggestions. > > I

Re: [go-nuts] how to set different flags for different os in cgo

2017-04-19 Thread Ian Lance Taylor
On Tue, Apr 18, 2017 at 11:00 PM, hui zhang wrote: > I want to set different flags for different os in cgo, how to do that in > cgo? > > >> //#cgo amd64 darwin CFLAGS: -Dxxx >> //#cgo amd64 darwin CXXFLAGS: -Dxxx >> //#cgo amd64 darwin LDFLAGS: -Lxxx >> //#cgo arm darwin

[go-nuts] Re: how dose netpollblock be awoken while sysmon sleep?

2017-04-19 Thread sydnash
I got it. it because there is a blocking netpool in runtime.findrunable() function. -- 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

Re: [go-nuts] Zero value of the map

2017-04-19 Thread Val
That's interesting, though quite different from the map implementation we're used to. Do you know (in any language) such an implementation, and would it really be as fast? Computing hash, accessing some bucket, and dealing with collisions seem unavoidable. But I have no idea of the extra

[go-nuts] Re: about the []byte -> string comversion optimization, is it some weird?

2017-04-19 Thread T L
On Wednesday, April 19, 2017 at 3:37:29 AM UTC+8, Keith Randall wrote: > > This is a weird corner case in string concatenation optimization. > > runtime.concatstrings (what the + in this code gets rewritten to) has an > optimization where if all the strings but one that it is concatenating are

Re: [go-nuts] how to set different flags for different os in cgo

2017-04-19 Thread hui zhang
how ever if I exec > go build -buildmode=c-archive -o libmug.a ./src for mac lib build it build both and failed so does for ios lib , it compile fail > CC=$PWD/clangwrap.sh CXX=$PWD/clangwrap.sh GOOS=darwin GOARCH=arm > CGO_ENABLED=1 go build -buildmode=c-archive -o libmug.a ./src If I

[go-nuts] how dose netpollblock been awaked while sysmon slepp?

2017-04-19 Thread 代君
i have a test code like this: func main() { tcpAddress, err := net.ResolveTCPAddr("tcp", ":") if err != nil { fmt.Println(err) } listener, err := net.ListenTCP("tcp", tcpAddress) c, e := listener.AcceptTCP() if e != nil { fmt.Println(e) } t := make([]byte, 0, 1000) c.Read(t) } when

[go-nuts] how dose netpollblock be awoken while sysmon sleep?

2017-04-19 Thread sydnash
I have a test code like this: func main() { tcpAddress, err := net.ResolveTCPAddr("tcp", ":") if err != nil { fmt.Println(err) } listener, err := net.ListenTCP("tcp", tcpAddress) c, e := listener.AcceptTCP() if e != nil { fmt.Println(e) } t := make([]byte, 0, 1000) c.Read(t) } when

Re: [go-nuts] what is the best way to to convert c++ std::string to go string in cgo programing?

2017-04-19 Thread Konstantin Khomoutov
On Wed, 19 Apr 2017 14:23:09 +0800 hui zhang wrote: > 1) getpath() return a temp string, its c_str() pointer will be > free out of function. So I use malloc I'm not completely sure you're correct. C++ does not implement garbage collection and the object on which you

[go-nuts] Re: os.Getwd() on windows changes drive letter casing

2017-04-19 Thread Andreas Reuterberg
I've written a fix for the easyjson library using filepath functions, so I'm not worried about that. But I did expect os.Getwd() to return the same exact string, regardless of how the test is run. "go test . -v" os.Getwd() uses the GOPATH variable "go test . -c" results in a binary where

Re: [go-nuts] what is the best way to to convert c++ std::string to go string in cgo programing?

2017-04-19 Thread Frits van Bommel
On Wednesday, April 19, 2017 at 9:10:16 AM UTC+2, hui zhang wrote: > > for 1) you mean >> >> char *CGetPath() { >> return getpath().c_str(); >> } > > > this code will work ? > That depends on whether getpath() returns a std::string or a (const) std::string& (a (const) reference). It will

Re: [go-nuts] Re: i/o timeout when using bufio on net connection (tcp)

2017-04-19 Thread Vasiliy Tolstov
2017-04-17 19:05 GMT+03:00 Kevin Johnson : > Hi Vasiliy, > > I spent a few minutes looking at your program and a couple things jumped out > at me. As you are probably aware, writes on a network socket usually return > the number of bytes written, This is because if the TCP

[go-nuts] Whats the fastest cpu (per $) regarding golang compiler performance?

2017-04-19 Thread 'slinso' via golang-nuts
Hi all, I'm interested in the compiler performance of different cpus. How much impact has the number of cores? Or is higher frequency with a few cores better regarding compile time / $. Maybe someone already owns a new ryzen cpu. Is it worth buying a highend Intel cpu (i7 or xeon) for 1000$ or