[go-nuts] Re: OpenGL Fonts

2017-04-19 Thread Egon
On Tuesday, 18 April 2017 08:02:02 UTC+3, saif wrote: > > Hi, > > I like to ask for your suggestions. > > I found a nice project, and was trying to modify them but got stuck with > fonts. > (github.com/dskinner/material) > > I like the fonts to be configurable, but when I tried to parse the fonts

[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 golang-nuts+unsubscr...@googl

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 := listener.AcceptTCP() > if e != nil {

[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 f

[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 th

[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 th

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 co

[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 foun

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 ema

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 shared functionality using an inte

[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, whic

[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 De

[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 to

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 automatically > order a

[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 em

[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 gr

[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 fo

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

2017-04-19 Thread jmontgomery
I assume by "projects" you mean packages. I understand that multiple word package names are sometimes needed, but Effective Go: package-names from the official go website recommends: "By convention, packages are given lower case, single-w

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 capitaliza

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 sys

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 actually recommendation?

[go-nuts] Re: Diameter Base Protocol for Go

2017-04-19 Thread mklimenko
Hello Alex, Fist of all, thank you for the great effort, time and patience. Are there any groups or forums related to your project? Currently, I have opened an issue , but is more like a question that others might want to see and ,perhaps, answe

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

2017-04-19 Thread Jesper Louis Andersen
My intuitive hunch is that memory speed is going to affect compilation speeds a lot as well, so that might be factored into the question as well. Adding cores has no value unless you can keep them well fed with input they can compile. On Wed, Apr 19, 2017 at 3:46 PM Marvin Stenger wrote: > Some

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 the Google Groups "golan

[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 this

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

2017-04-19 Thread Marvin Stenger
Something you have to consider, this will probably make it into go 1.9: https://go-review.googlesource.com/?polygerrit=0#/c/40693/ Am Mittwoch, 19. April 2017 11:15:03 UTC+2 schrieb slinso: > > Hi all, > > I'm interested in the compiler performance of different cpus. How much > impact has the num

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 CFLAGS: -Dxxx >> //#cgo a

[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] 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 cost

[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

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 buffer fills, then > th

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

[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 os.Getw

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

2017-04-19 Thread hui zhang
for 1) you mean > > char *CGetPath() { > return getpath().c_str(); > } this code will work ? 2017-04-19 14:43 GMT+08:00 Konstantin Khomoutov < flatw...@users.sourceforge.net>: > On Wed, 19 Apr 2017 14:23:09 +0800 > hui zhang wrote: > > > 1) getpath() return a temp string, its c_str