Re: [go-nuts] Re: select multiple expressions per case

2017-12-21 Thread Jason Phillips
Matt, Would that mean that other receive expression(s) yield the zero value? select { case x := <-c1, y := <-c2: // If a value is received from c1, is y the zero value? } Would the multi-valued assignment form of the receive operator gain an additional meaning? select { case x, ok :=

[go-nuts] golang for AI

2017-12-21 Thread Lee Rick
hi, Artificial intelligence is a big trend, and i want to know whether or not to consider golang playing a role in artificial intelligence? Whether to consider developing some basic artificial intelligence package with support package, use just as python. -- You received this message

[go-nuts] Re: Announcing gophersat, a SAT and Pseudo-Boolean solver, v1.0.0

2017-12-21 Thread Damian Gryski
Wow, thanks for the detailed answers! Damian -- 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

[go-nuts] Re: Announcing gophersat, a SAT and Pseudo-Boolean solver, v1.0.0

2017-12-21 Thread Fabien
Short answer : according to the few tests I ran, they are pretty close. You can use any of them, or, even better, both of them. Long answer : I have only compared them on about a dozen industrial problems, so take it with a grain of salt, but it's hard to name a winner. Gini is usually a

Re: [go-nuts] Re: select multiple expressions per case

2017-12-21 Thread David Collier-Brown
Oh foo, if we only need a common behavior, we can call a function instead of inlined code. -- 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] gRPC go on AIX

2017-12-21 Thread Amandeep Gautam
I am using precompiled binaries for AIX. But will keep your suggestion in mind. For now it was fixed by installing ca certificates. On Thursday, December 21, 2017 at 3:12:50 PM UTC-8, Ian Lance Taylor wrote: > > On Thu, Dec 21, 2017 at 1:43 PM, > wrote: > > > >

Re: [go-nuts] gRPC go on AIX

2017-12-21 Thread Ian Lance Taylor
On Thu, Dec 21, 2017 at 1:43 PM, wrote: > > Can someone help me to set up gRPC go on AIX running on a Power 8. I > tried installing using go get -u google.golang.org/grpc > (https://grpc.io/docs/quickstart/go.html#prerequisites), but it fails with > following: > >

[go-nuts] gRPC go on AIX

2017-12-21 Thread amandeepgautam5
Hello, Can someone help me to set up gRPC go on AIX running on a Power 8. I tried installing using go get -u google.golang.org/grpc ( https://grpc.io/docs/quickstart/go.html#prerequisites), but it fails with following: Fetching https://google.golang.org/grpc?go-get=1 https fetch failed: Get

Re: [go-nuts] Re: select multiple expressions per case

2017-12-21 Thread Jesper Louis Andersen
To generalize, you have a number of events, either send or receive, on channels. One could also imagine that timers are events of a special kind. Likewise, atomic updates, data swaps and so on are events in a generalized select statement. These can be combined, either through "and" style

[go-nuts] Re: Donating to Go/Go-adjacent causes

2017-12-21 Thread matthewjuran
The Go 2 blog post (https://blog.golang.org/toward-go2) asks for core language and library feature help and especially for experience reports: https://github.com/golang/go/wiki/ExperienceReports The issue tracker has almost 200 open Go 2 proposals taking community comments:

[go-nuts] Donating to Go/Go-adjacent causes

2017-12-21 Thread Kevin Burke
Hi, I asked about this last year, and thought I would post again, as it's the holiday season. I started a software consultancy last year, and I made a fair amount of money this year. A lot of my success was due to the Go programming language/community and I'd like to

Re: [go-nuts] How to show reason, why code is slow.

2017-12-21 Thread Dave Cheney
Not that I’m aware of. -- 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

Re: [go-nuts] Re: select multiple expressions per case

2017-12-21 Thread Jason Phillips
With a multiple expression switch statement, the associated case is executed if any expression is equal to the switch expression. For a multiple expression select, would all channel expressions have to proceed for the associated case to execute? e.g. select { case x := <-c1, y := <-c2: //

Re: [go-nuts] Time

2017-12-21 Thread Shawn Milochik
d should be a time.Duration -- "3.Second" isn't a valid type. If you're trying to set a default value, you can't. You *can* just check in the function whether it equals zero and set it to a default. -- You received this message because you are subscribed to the Google Groups "golang-nuts"

Re: [go-nuts] Time

2017-12-21 Thread nguyentina
I cannot set a d for func Sleep(). Here is the code: package main import ( "fmt" "time" ) var c = make(chan int) func main() { go send(0, 3) go send(1, 2) go send(2, 1) for i := 0; i < 3; i++ { fmt.Printf("%v %v\n", <-c,

[go-nuts] [ANN]: GopherCon coming to Europe - Iceland 2018

2017-12-21 Thread Florin Pățan
Hi all, I would like to invite you all to come to Iceland in 2018 for the first European GopherCon. We are happy to have Jaana B. Dogan and Peter Bourgon as our first speakers and the Call for Papers is opened at: https://www.papercall.io/gophercon-iceland For more details follow our Twitter

[go-nuts] Announcing gophersat, a SAT and Pseudo-Boolean solver, v1.0.0

2017-12-21 Thread Damian Gryski
How does it compare to https://github.com/IRIFrance/gini ? -- 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

Re: [go-nuts] How to show reason, why code is slow.

2017-12-21 Thread Michael Monashev
Hi, Dave. > Pprof does not capture that data, you may be better served with perf(1) on > Linux. Is it planned in future releases? -- Michael -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving

Re: [go-nuts] Re: callback for c code wrapper around go function

2017-12-21 Thread Ian Lance Taylor
On Thu, Dec 21, 2017 at 6:44 AM, wrote: > No I am not talking about the exported function, but the function from the C > function within the preamble, and what about the first part of the question > (scroll up) thank you Yes, I think I understand. I am saying that if you use

Re: [go-nuts] Re: callback for c code wrapper around go function

2017-12-21 Thread roupesy
No, I am talking about the function in the C preamble will they be part of the header and share object ? On Thursday, December 21, 2017 at 9:39:07 AM UTC-5, Ian Lance Taylor wrote: > > On Thu, Dec 21, 2017 at 6:15 AM, wrote: > > > > 2 - Do all functions added into the

Re: [go-nuts] Re: callback for c code wrapper around go function

2017-12-21 Thread roupesy
No I am not talking about the exported function, but the function from the C function within the preamble, and what about the first part of the question (scroll up) thank you On Thursday, December 21, 2017 at 9:39:07 AM UTC-5, Ian Lance Taylor wrote: > > On Thu, Dec 21, 2017 at 6:15 AM,

Re: [go-nuts] Re: [ANN] A blog post series on serving big satellite imagery with Go

2017-12-21 Thread howardcshaw
To consider for your series, at some point down the line: There are standards for serving geo-located tiles, and if you match one of them, your little Go program can serve tiles to already existing map browsers, from Javascript based slippy-maps, to Android or iOS street-map viewers, to full

Re: [go-nuts] Re: callback for c code wrapper around go function

2017-12-21 Thread Ian Lance Taylor
On Thu, Dec 21, 2017 at 6:15 AM, wrote: > > 2 - Do all functions added into the preamble get exported to the header and > the shared object that go build creates? Yes they do, if you use //export, as documented at https://golang.org/cmd/cgo. Ian -- You received this

[go-nuts] Re: callback for c code wrapper around go function

2017-12-21 Thread roupesy
*I meant to say this error * # command-line-arguments duplicate symbol _parse in: $WORK/command-line-arguments/_obj/_cgo_export.o $WORK/command-line-arguments/_obj/one.cgo2.o ld: 1 duplicate symbol for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see

Re: [go-nuts] Re: callback for c code wrapper around go function

2017-12-21 Thread roupesy
Hey Ian, Thanks again for replying, however I'm a bit confused by the code you've provided. am I passing the go callback into that function ? I have few questions: 1- * I tried to do the do the following * /* #include #include void parse(char* err, int status) { // will get

Re: [go-nuts] Re: select multiple expressions per case

2017-12-21 Thread matthewjuran
First the switch behavior surprised me when looking at how to stack cases, but then later I was surprised that select doesn't have the same thing. Consistency is the only reason to write it down, my concrete example doesn't need this as shown by Damien in the proposal. Matt On Wednesday,

[go-nuts] Looking for top golang talents

2017-12-21 Thread David Yang
Hi guys, We are looking for golang top talents, our product include video live, payment, platform, lottery. we can provide high salary, free living house ,food and so on. Our company location at sihanoukville, nearby sea beach. the detail is Cambodia Sihanouk City street road 610 If