Re: [go-nuts] To make AI with Golang

2018-08-17 Thread Shane
On Sat, Aug 18, 2018 at 2:56 PM John wrote: > > Hi I am trying to make an game of Connect Five using Golang, I have > already made an player versus player mode so I am making the player versus > computer mode. I think what you are looking for is adversarial graph search, min/max with

[go-nuts] To make AI with Golang

2018-08-17 Thread John
Hi I am trying to make an game of Connect Five using Golang, I have already made an player versus player mode so I am making the player versus computer mode. At first I attempted to use if functions that detect when they need to block the player but it can't win without placing blocks

[go-nuts] gocontracts: tool for design-by-contract

2018-08-17 Thread marko . ristin
Hi, We've implemented a small tool to facilitate design-by-contract by generating code from the conditions described in the function descriptions. While others have implemented Go libraries (e.g., [1]), we wanted something that gives us readable code with no extra dependencies. Moreover, we

Re: [go-nuts] How to find other packages using this package?

2018-08-17 Thread Ian Davis
On Fri, 17 Aug 2018, at 5:08 PM, Tad Vizbaras wrote: > I have a package. Let say a/b/c. How to find what are other packages > in my GOPATH using it?> > I am basically trying to clean up GOPATH from all unused packages > installed and downloaded over the years.> Finding "dead" packages in GOPATH.

[go-nuts] Re: How to find other packages using this package?

2018-08-17 Thread Tad Vizbaras
Found it: go list -f "{{.ImportPath}} {{.Imports}}" ./... | grep %1 Replace %1 with package you are looking for. Run this at GOPATH root to scan all packages. On Friday, August 17, 2018 at 12:08:48 PM UTC-4, Tad Vizbaras wrote: > > I have a package. Let say a/b/c. How to find what are other

Re: [go-nuts] Golang package docs site sluggish recently

2018-08-17 Thread mark
This is still happening. I just opened https://github.com/golang/go/issues/27057 to track it. On Thursday, June 7, 2018 at 9:58:26 PM UTC-7, Chris Broadfoot wrote: > > Should be fast again now. I'm not sure what happened, but it appears the > site search index was missing for a previous deploy.

[go-nuts] How to find other packages using this package?

2018-08-17 Thread Tad Vizbaras
I have a package. Let say a/b/c. How to find what are other packages in my GOPATH using it? I am basically trying to clean up GOPATH from all unused packages installed and downloaded over the years. Finding "dead" packages in GOPATH. Tried go list and go doc but only got list of dependencies:

Re: [go-nuts] Re: Extending deadline for logging

2018-08-17 Thread 'Robert Bartoszynski' via golang-nuts
Not sure what would happen if I set the context to context.Background(), but I'd have to understand the implications of it really well before I did something against the grain like that (using context.Background() for request-specific code). Yeah, perhaps we'll go with the solution of reserving

Re: [go-nuts] Confusion about gcWork put in golang source code runtime/mgcwork.go

2018-08-17 Thread Ian Lance Taylor
On Fri, Aug 17, 2018 at 3:28 AM, wrote: > > I am new to golang source code, and recently met a problem about > understanding golang gc. > > In runtime/mgcwork.go: 114 > > func (w *gcWork) put(obj uintptr) { >flushed := false >wbuf := w.wbuf1 >if wbuf == nil { > w.init() >

[go-nuts] Confusion about gcWork put in golang source code runtime/mgcwork.go

2018-08-17 Thread xiaoxubeii
Hey guys, I am new to golang source code, and recently met a problem about understanding golang gc. In runtime/mgcwork.go: 114 func (w *gcWork) put(obj uintptr) { flushed := false wbuf := w.wbuf1 if wbuf == nil { w.init() wbuf = w.wbuf1 // wbuf is empty at this

[go-nuts] create a Blockly generator for Golang

2018-08-17 Thread Dewey Gaedcke
Has anyone done this yet or is anyone interested in doing it under contract? -- 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] Re: Ternary ... again

2018-08-17 Thread 'Kean Ho Chew' via golang-nuts
On Friday, August 17, 2018 at 5:56:05 PM UTC+8, Liam wrote: > > People have a wide range of perceptive and cognitive abilities. People > also have difficulty imagining the very different abilities that others > possess. > > I find constant vertical scanning and scrolling to be distracting and

Re: [go-nuts] GO lang implementation for one deck card shuffle

2018-08-17 Thread Jan Mercl
On Fri, Aug 17, 2018 at 1:09 PM Sokolov Yura wrote: > I'd recently made "practically secure rng": https://github.com/funny-falcon/go-rando > > It uses SipHash permutation core (so it has 256 bit permuation stsate + counters), but also constantly reseeded from 1024 bit "entropy pool" that is

Re: [go-nuts] GO lang implementation for one deck card shuffle

2018-08-17 Thread Sokolov Yura
I'd recently made "practically secure rng": https://github.com/funny-falcon/go-rando It uses SipHash permutation core (so it has 256 bit permuation stsate + counters), but also constantly reseeded from 1024 bit "entropy pool" that is frequently refsreshed from crypto/rand. -- You received

Re: [go-nuts] Re: Ternary ... again

2018-08-17 Thread Liam Breck
People have a wide range of perceptive and cognitive abilities. People also have difficulty imagining the very different abilities that others possess. I find constant vertical scanning and scrolling to be distracting and thus inefficient. So I won't use a tool that adds line breaks to my code,

Re: [go-nuts] Re: Ternary ... again

2018-08-17 Thread Liam Breck
Ah, very nice! Tho I can't tell from scanning the readme which features are different than go fmt. On Fri, Aug 17, 2018, 1:17 AM Matthias B. wrote: > On Thu, 16 Aug 2018 16:54:35 -0700 > Liam Breck wrote: > > > Indeed, the problem is largely go fmt, I already raised this, but no > > one picked

[go-nuts] Re: Concurrency Problems

2018-08-17 Thread Giulio Micheloni
Also this https://blog.golang.org/pipelines is a good reading. On Thursday, August 16, 2018 at 6:01:20 PM UTC+2, Rajat Jain wrote: > > Hi, > > I'm looking to solve interesting problems on concurrency in golang to > understand channels/goroutines better. Can anyone suggest a good >

Re: [go-nuts] Re: Ternary ... again

2018-08-17 Thread Matthias B.
On Thu, 16 Aug 2018 16:54:35 -0700 Liam Breck wrote: > Indeed, the problem is largely go fmt, I already raised this, but no > one picked up on it: > > I use this one-liner: > > v := a; if t { v = b } > > This is not compatible with go fmt, but that tool's effects are > undocumented (see issue

[go-nuts] Re: Local repository for go modules

2018-08-17 Thread Ignazio Di Napoli
On Friday, August 17, 2018 at 1:04:20 AM UTC+2, thepud...@gmail.com wrote: > > I suspect the 'replace' directive I described in my earlier post in this > thread might be sufficient for what you describe, because it lets you map > from an import path like "example.com/me/foo" to something on your

[go-nuts] Re: Delve 1.1.0 is released

2018-08-17 Thread Sotirios Mantziaris
Thanks very much for making delve. Without a debugger go might not be on my radar! On Friday, August 17, 2018 at 2:01:54 AM UTC+3, Derek Parker wrote: > > Announcing Delve v1.1.0! > Tons of fixes and improvements including: * Go 1.11 support * Initial > support for function & method calls