Re: [go-nuts] Trace encoding - traceEv(String/Stack) deferred output always sent at tail of trace file leaving it incomplete until stopped.

2017-01-04 Thread 'Dmitry Vyukov' via golang-nuts
Streaming stacks and strings sounds fine to me. I don't see any potential issues here. Streaming data in real time (not waiting for an internal buffer to be full) is somewhat more problematic, but probably doable. Stable public format is problematic. The format proven to be unstable over the

[go-nuts] Re: Go 1.6.1 Link problem on Windows:

2017-01-04 Thread saurabh . deoras
Ok, Let me try to see if I can repro the bug with a code that I can share. Thank you, Saurabh On Sunday, January 1, 2017 at 12:40:56 PM UTC-8, brainman wrote: > > If you can provide steps to reproduce your problem here > https://golang.org/issue/new, I will try to investigate it. > > Thank you.

[go-nuts] Multiplexing blocking call on Go routine

2017-01-04 Thread zohaibsh
Hey guys, So for some time now I have been trying to build a high performance Pub/Sub server in Go. I am using gorilla websocket library, which in it self has a Read, Write methods ( https://godoc.org/github.com/gorilla/websocket#Conn.ReadMessage) that will block my current routine. In order

[go-nuts] Re: Makefile for golang

2017-01-04 Thread kevingo Tsai
Thanks for sharing. Leopold Freeman於 2017年1月4日星期三 UTC+8上午10時37分12秒寫道: > > I'm developing several related go services right now. So I wrote the > Makefile to manage them. Hopefully the project is also useful for you: > > https://github.com/leopoldfreeman/Golang-Makefile > -- You received this

[go-nuts] How Can I Find Out The Number Of Empty Line On File

2017-01-04 Thread Alihan Kayhan
Hello I want to find empty line on file e.g. Favorman.txt contains First Line: Hello Second Line: // Empty Line Third Line : Everybody Fourth Line : // Empty Line Fifth Line : Its me How can I find out the number of empty lines -- You received this message because you are subscribed to

[go-nuts] Re: How Can I Find Out The Number Of Empty Line On File

2017-01-04 Thread Dave Cheney
https://play.golang.org/p/dwYZTQ4qDs On Thursday, 5 January 2017 12:28:48 UTC+11, Alihan Kayhan wrote: > > Hello > > I want to find empty line on file > e.g. > Favorman.txt contains > > First Line: Hello > Second Line: // Empty Line > Third Line : Everybody > Fourth Line : // Empty Line > Fifth

[go-nuts] Re: What happen if channel is full and there're no way out for this channel?

2017-01-04 Thread Kritta
I see, Thankyou guys On Thursday, January 5, 2017 at 3:26:07 AM UTC+7, Kritta wrote: > > For example, > > go func() { >c <- true //This is blocked cause c is full >method1() > } > > Others goroutine include main has no reference to 'c', so there're no way > out for 'c'. > Questions: > >

[go-nuts] Re: Check if previous value in template range is different

2017-01-04 Thread djadala
On Wednesday, January 4, 2017 at 7:09:48 PM UTC+2, Sathish VJ wrote: > > Is there a way to check if the previous value in the template range is > different from the current one? > > type Data struct { > Value int32 > } > > var htmlTemplate = `{{range $i, $el := .}} > {{$i}}:{{.Value}}: (is it

Re: [go-nuts] Re: How to use ~/ in terminal with go program?

2017-01-04 Thread Konstantin Khomoutov
On Tue, 3 Jan 2017 00:00:27 -0800 (PST) Caleb Doxsey wrote: > What's wrong with a library? > > This particular library is used by vagrant and dozens of other > software projects, it's cross platform and handles all the edge cases. > > Never relying on 3rd party libraries is a

[go-nuts] How to pass a go file name as arguments to go run

2017-01-04 Thread bsr
Following works. go run cmd/main.go tests/a/in flag.Parse() args := flag.Args() //args -> []string{"tests/a/in"} but when I do go run cmd/main.go tests/a/in.go named files must all be in one directory; have cmd/ and tests/a/ I am not trying to build both files, but "tests/a/in.go: is an

Re: [go-nuts] explain CLA terms

2017-01-04 Thread Ian Lance Taylor
On Wed, Jan 4, 2017 at 8:21 PM, Xavier Combelle wrote: > I was interested in contributing in golang, but was afraid to contribute > because of signing the CLA. After rereading it, I thought that I might be > too much worrying. > > Can someone explain in non juridical

Re: [go-nuts] explain CLA terms

2017-01-04 Thread Xavier Combelle
Le 05/01/2017 à 07:01, Ian Lance Taylor a écrit : > On Wed, Jan 4, 2017 at 8:21 PM, Xavier Combelle > wrote: >> I was interested in contributing in golang, but was afraid to contribute >> because of signing the CLA. After rereading it, I thought that I might be >> too

[go-nuts] Re: How to pass a go file name as arguments to go run

2017-01-04 Thread Dave Cheney
go run cmd/main.go -- tests/a/in.go But you've probably reached the practical limit of what go run should be used for. I recommend using the expected GOPATH package layout, go build/install, etc. On Thursday, 5 January 2017 16:02:50 UTC+11, bsr wrote: > > Following works. > > go run

Re: [go-nuts] Multiplexing blocking call on Go routine

2017-01-04 Thread Jesse McNelis
On Thu, Jan 5, 2017 at 9:51 AM, wrote: > Hey guys, > > So for some time now I have been trying to build a high performance Pub/Sub > server in Go. I am using gorilla websocket library, which in it self has a > Read, Write methods >

[go-nuts] golang-beginners channel?

2017-01-04 Thread Jason E. Aten
I noticed that rust has a rust-beginners irc channel. That seems like a very welcoming idea. ~~~ The most important community resources for those new to Rust are: - #rust-beginners , an IRC channel that loves

Re: [go-nuts] Re: Basic Web Authentication Question

2017-01-04 Thread Jonathan Yu
On Wed, Jan 4, 2017, 01:28 Henry wrote: > > > On Wednesday, January 4, 2017 at 1:40:40 PM UTC+7, Jonathan Yu wrote: > > > > While I agree that client-side hashing is overkill, I think the threat > model it's intended to protect against is a compromised *server*, since

Re: [go-nuts] Re: Basic Web Authentication Question

2017-01-04 Thread edward . wilson
>>I fail to see the purpose of client-side hashing. Great question You pass a UUID from the server to salt your crypto on the client to prevent replay attacks. We don't always run TLS on our dev/test tiers and operate a sensitive environment in which we prefer not to broadcast passwords

[go-nuts] Any ideas about slow io performance on Windows?

2017-01-04 Thread lixin9311
I'm working on a TUN/TAP library on Windows. (https://github.com/lixin9311/water) It's basically completed, but I have encountered IO performance issue. Here is a simple demo, just redirect everything from the TAP to another PC via UDP.

[go-nuts] Re: package net/http/pprof causes memory increase

2017-01-04 Thread Thomas Solignac
Hello, Thank you, I was going to launch the same subject. I see the same thing. When I access to /debug/pprof, there is the "heap". And I got the detail in "debug/pprof/heap?debug=1" I get more heap when I refresh the /heap page. And it never decrease. Thank you for your help Le mercredi 4

[go-nuts] Re: Any ideas about slow io performance on Windows?

2017-01-04 Thread lixin9311
Thx, I already fixed this issue. That was because Windows blocked the IO not allowing to write and read the same file simultaneously. I use Overlapped IO to overcome this issue, introducing about 100 LoC. You can check out the latest commit for detail. -- You received this message because you

[go-nuts] Re: Any ideas about slow io performance on Windows?

2017-01-04 Thread Slawomir Pryczek
Are you sure you have this issue on write, not on previous read? W dniu środa, 4 stycznia 2017 16:24:13 UTC+1 użytkownik lixi...@gmail.com napisał: > > I'm working on a TUN/TAP library on Windows. ( > https://github.com/lixin9311/water) > It's basically completed, but I have encountered IO

Re: [go-nuts] Re: Basic Web Authentication Question

2017-01-04 Thread Henry
On Wednesday, January 4, 2017 at 1:40:40 PM UTC+7, Jonathan Yu wrote: > > > > While I agree that client-side hashing is overkill, I think the threat > model it's intended to protect against is a compromised *server*, since > this would prevent the server from ever seeing the plaintext

[go-nuts] Check if previous value in template range is different

2017-01-04 Thread Sathish VJ
Is there a way to check if the previous value in the template range is different from the current one? type Data struct { Value int32 } var htmlTemplate = `{{range $i, $el := .}} {{$i}}:{{.Value}}: (is it diff from previous value, i.e. data[i-1]) {{end}}` Intended use: to change the color of

[go-nuts] What happen if channel is full and there're no way out for this channel?

2017-01-04 Thread Kritta
For example, go func() { c <- true //This is blocked cause c is full method1() } Others goroutine include main has no reference to 'c', so there're no way out for 'c'. Questions: 1. Will method1() be executed and when? 2. Will this gorountine released or still there forever? --

[go-nuts] Re: What happen if channel is full and there're no way out for this channel?

2017-01-04 Thread C Banning
Not until 'c' is closed. Also, http://localhost:6060/ref/spec#Close On Wednesday, January 4, 2017 at 1:28:41 PM UTC-7, Kritta wrote: > > In other word, Will GC collect this channel for me. > > On Thursday, January 5, 2017 at 3:26:07 AM UTC+7, Kritta wrote: >> >> For example, >> >> go func() { >>

[go-nuts] Local Godoc, Playground and imports

2017-01-04 Thread Frank Davidson
Hi all, So, I have a local godoc running and I start it with the following bash script: #!/bin/bash export GOROOT=/go export GOHOME=/go /usr/local/go/bin/godoc -http=:8071 -play=true -index I have the the packages I want to index in the /go directory. It works fine except for when I want