Re: [go-nuts] Go For Data analysts

2017-06-01 Thread Dan Kortschak
On Thu, 2017-06-01 at 23:31 -0700, Vikram Rawat wrote: > Does anybody actually uses GO for data Analysis... Yes, they do. https://github.com/gophercon/2016-talks/tree/master/DanielWhitenack-GoForDataScience https://www.youtube.com/watch?v=D5tDubyXLrQ > Can it be used for Data analysis Yes, it c

[go-nuts] Go For Data analysts

2017-06-01 Thread Vikram Rawat
Does anybody actually uses GO for data Analysis... Can it be used for Data analysis -- 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

[go-nuts] Re: issues about struct align

2017-06-01 Thread T L
http://www.tapirgames.com/blog/golang-memory-alignment On Friday, May 19, 2017 at 7:28:54 PM UTC+8, xjdrew wrote: > > Hello everyone, > > > Code as below, playground url(https://play.golang.org/p/XSx--6uF0E): > > package main > > > import "fmt" > import "unsafe" > > > type A struct { > a uint8 >

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 language. There's als

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 about when a >>> dereference operation is executed. And as

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

2017-06-01 Thread Ian Lance Taylor
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 about when a >> dereference operation is executed. And as you can see the current >> compiler does not do the dereference

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 makes it so inviting to everyone who wants

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 intro. > I am writing

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

2017-06-01 Thread Dmitry Mishin
I have the same impression... Added a 300 msec sleep before each folder read task. Will see how it goes, maybe that will let the OS recover whatever resources it's missing... Thanks for your help! On Thursday, June 1, 2017 at 8:09:14 PM UTC-7, Dave Cheney wrote: > > Imo this is not a problem wi

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

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

2017-06-01 Thread Dave Cheney
Imo this is not a problem with the amount of memory in use inside you go program, but Linux's incorrect accounting. -- 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

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

2017-06-01 Thread Will Hawkins
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. I am writing today to ask about some puzzling behavior with respect to dereferencing pointers, functio

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

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

2017-06-01 Thread Dmitry Mishin
My current settings: [root@mover-7-2 pdm]# sysctl -a | grep overco vm.overcommit_memory = 1 vm.overcommit_ratio = 50 vm.overcommit_kbytes = 0 vm.nr_overcommit_hugepages = 0 So the app can use up to ~32GB in my understanding, which should be enough for everything? On Thursday, June 1, 2017 at 6:

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

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

2017-06-01 Thread Dave Cheney
Does the machine (vm, container, etc) you are running this application have any swap configured. What I think is happening is the momentary spike in potential memory usage during the fork / exec cycle is causing the linux memory system to refuse to permit the fork. There are several open issues

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

Re: [go-nuts] AI-first?

2017-06-01 Thread Ian Lance Taylor
On Thu, Jun 1, 2017 at 7:20 AM, wrote: > > I have a general question: > > I'd like to talk a little bit about how AI might be used to create better > computer programs. Some years ago there used to be a lot of interesting > conceptual discussions in this forum, I don't know if its the right place

[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 == http.

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 explicitly pass arsg[0] == "self" and that's what t

[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 I already have the progr

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 ? -- -j -- You received

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

2017-06-01 Thread Santhosh Ram Manohar
When I run a go program from the shell, os.Args[0] is the program name. If I invoke the same program using go's exec then os.Args[0] is not the program name, rather its the first argument that I pass. Here is a simple program to show this behavior, installed as gocmd in my $GOPATH/bin func mai

[go-nuts] AI-first?

2017-06-01 Thread rudolfmann95
I have a general question: I'd like to talk a little bit about how AI might be used to create better computer programs. Some years ago there used to be a lot of interesting conceptual discussions in this forum, I don't know if its the right place for that kind of talk and out-loud-thinking.

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

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 sysc

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

[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, _ := new(big.Int).SetString("3842ab25368451a004bb57f2008106aa

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