Re: [go-nuts] AI-first?

2017-06-01 Thread Nigel Tao
On Fri, Jun 2, 2017 at 7:17 AM, Ian Lance Taylor wrote: > The golang-nuts mailing list is a good place to talk about Go-first > (or Go-second or Go-last). It's not a good place to talk about AI. > Thanks. In case there is any confusion, this list is about Go the programming

Re: [go-nuts] Dereferencing pointers, function evaluation and tuple assignment

2017-06-01 Thread Will Hawkins
On Fri, Jun 2, 2017 at 1:03 AM, Ian Lance Taylor wrote: > On Thu, Jun 1, 2017 at 9:52 PM, Will Hawkins wrote: >> On Fri, Jun 2, 2017 at 12:41 AM, Ian Lance Taylor wrote: >>> >>> Unlike function calls, the language spec doesn't anything

Re: [go-nuts] Dereferencing pointers, function evaluation and tuple assignment

2017-06-01 Thread Will Hawkins
On Fri, Jun 2, 2017 at 12:41 AM, Ian Lance Taylor wrote: > On Thu, Jun 1, 2017 at 6:40 PM, Will Hawkins wrote: >> Hello awesome community! >> >> I am so honored to be a part of the great community of gophers around the >> world. Thank you to everyone who

Re: [go-nuts] Dereferencing pointers, function evaluation and tuple assignment

2017-06-01 Thread Ian Lance Taylor
On Thu, Jun 1, 2017 at 6:40 PM, Will Hawkins wrote: > Hello awesome community! > > I am so honored to be a part of the great community of gophers around the > world. Thank you to everyone who makes it so inviting to everyone who wants > to participate. Thanks for the nice

[go-nuts] how to build websockert connection thru http proxy

2017-06-01 Thread 273593...@qq.com
question is as subject, any sample would be appreciated -- 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...@googlegroups.com. For more

[go-nuts] Re: "cannot allocate memory" problem

2017-06-01 Thread Dmitry Mishin
I was wrong about the number of folder read workers. Adding more workers makes the error happen sooner. On Thursday, June 1, 2017 at 6:24:48 PM UTC-7, Dmitry Mishin wrote: > > What I'm wondering about is the time it takes to get the error - very >> close to 10 minutes all the time. Not even

[go-nuts] Re: "cannot allocate memory" problem

2017-06-01 Thread Dmitry Mishin
The system has 1GB of swap, and I just tried enabling: sysctl -w vm.overcommit_memory=1 sysctl -w vm.swappiness=1 according to https://stackoverflow.com/questions/35025338/cannot-allocate-memory-error, with no effect. There's 64GB of RAM, which is not being used at the time of error: top -

[go-nuts] Re: A spinning cube demo using Vulkan API and Go, the project status

2017-06-01 Thread Erwin Driessens
bravo! -- 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...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.

[go-nuts] Re: [ANN] Gomail v2: sending emails faster

2017-06-01 Thread connelblaze
Hey Alex, tried sending mail with gomail v2 having some ish. here is my code: func contact(w http.ResponseWriter, req *http.Request) { var s string var e string var m string pd := pageData{ Title: "contact || CACCYE", } if req.Method ==

Re: [go-nuts] os.Args[0] for program executed by go

2017-06-01 Thread Marvin Renich
* Santhosh Ram Manohar [170601 14:03]: > > > On Thursday, June 1, 2017 at 10:45:56 AM UTC-7, Jan Mercl wrote: > > > > On Thu, Jun 1, 2017 at 7:41 PM Santhosh Ram Manohar > > wrote: > > > > > Args: []string{"self", "selftest"}, > > > > Here you

[go-nuts] text/template revisit trailing commas for range over map

2017-06-01 Thread Michael Brown
I see previous threads with a solution to eliminating trailing commas for text/template output when ranging over an array. (ie. the {{if $index}},{{end}} trick) I have the exact same problem when ranging over a map and it doesn't appear that the array fix will work. any thoughts? -- Michael

Re: [go-nuts] os.Args[0] for program executed by go

2017-06-01 Thread Santhosh Ram Manohar
On Thursday, June 1, 2017 at 10:45:56 AM UTC-7, Jan Mercl wrote: > > On Thu, Jun 1, 2017 at 7:41 PM Santhosh Ram Manohar > wrote: > > > Args: []string{"self", "selftest"}, > > Here you explicitly pass arsg[0] == "self" and that's what the program > gets. > Yes, because

Re: [go-nuts] os.Args[0] for program executed by go

2017-06-01 Thread Jan Mercl
On Thu, Jun 1, 2017 at 7:41 PM Santhosh Ram Manohar wrote: > Args: []string{"self", "selftest"}, Here you explicitly pass arsg[0] == "self" and that's what the program gets. > What is the reason for this difference only for the binaries executed by the exec package ?

[go-nuts] Re: To panic or not to panic, that's the question

2017-06-01 Thread Dave Cheney
I think that's reasonable, especially as it is not possible to create some sort of top level panic handler for init routines. Crash only software ✊️ -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop

Re: [go-nuts] Latency spike during GC

2017-06-01 Thread Francis
Xun Liu, Are you able to post the actual trace here? I appreciate that it contains information about your source code, so I can understand if you don't want to share it. But I would be very interested to look at the full trace. Thanks Francis On Wednesday, 31 May 2017 21:02:33 UTC+2, Xun Liu

Re: [go-nuts] Windows - syscall.GetProcessTimes() always shows 0 values.

2017-06-01 Thread Steven Hartland
All depends on what your going to end up doing. If code will deal with processes other than itself then pid is arguably easier to deal with, however if you only ever deal with your process then I would have the NewProcInfo method just setup the handle as you had it (reducing the number of

[go-nuts] Re: idea: generic methods on slices with some generic type support []string.Map(string) []string => [].Map() []

2017-06-01 Thread mhhcbon
What d be awesome is that the stream like interface i have bee thinking about provides a convert method, so it can answer to this question given []string how to move on to []int, or, []stream.Map(...) -> give me the length of each string So if the interface contains a magic signature like

[go-nuts] Re: some problems with ECDSA ScalarMult

2017-06-01 Thread 张伟
The full codes: package main import ( "crypto/ecdsa" "crypto/elliptic" "crypto/rand" "encoding/hex" "fmt" "math/big" ) func main() { key2, _ := hex.DecodeString("646d22e7aee42d44bd15cdf58006359283e1da83c2670b25d44906d03e9ed4eb") X2, _ :=

[go-nuts] Re: To panic or not to panic, that's the question

2017-06-01 Thread mhhcbon
understood the same, was going to give same example. panic at init is ok to me while it look likes a compile error a system requirement error On Wednesday, May 31, 2017 at 9:41:37 PM UTC+2, Pierre Durand wrote: > > I use these functions in init(): > https://golang.org/pkg/html/template/#Must

[go-nuts] Re: did anyone tried // template exec ?

2017-06-01 Thread mhhcbon
I see, interesting, thanks for that. Note, those are different problems. One is about trying to cheaply speed up template execution by //, I still wonder if that can be worthy, i foresee with the future translation package it might because of the additional call costs, but you know side

[go-nuts] Re: did anyone tried // template exec ?

2017-06-01 Thread Michael Brown
I posted on another thread today one solution for this (Subj: "How to parallelize text/template long-running functions") I got something simple working using a two-pass template execution, and somebody else pointed me to https://blog.gopheracademy.com/advent-2014/soy-programmable-templates/

Re: [go-nuts] Re: How to parallelize text/template long running functions?

2017-06-01 Thread Michael Brown
Great! If I had checked this thread when you posted this I (probably) could have saved myself 3 hours of work. I got it working with a two-pass scheme using text/template and some channels. Here is what I came up with: package main import ( "text/template" "bytes" "context"