[go-nuts] Re: Existing code for order-preserving concurrent work queue?

2019-01-26 Thread Jason E. Aten
A library would be overkill. I like to allocate a Ticket for each job. This is for tracking details. type Ticket struct { Results []byte // whatever output is appropriate } tkts := make([]*Ticket, numJobs) // pseudo code: // assign the tickets in sequential order. Track in tkts. // Run all

[go-nuts] gorse: A High Performance Recommender System Package based on Collaborative Filtering for Go

2019-01-26 Thread zhangzhenghaocn
Hi Gophers, I implemented a recommender system package for Go. https://github.com/zhenghaoz/gorse The package contains several recommendation models based on collaborative filtering. It supports different data splitters and evaluation metrics. SIMD instrcutions (AVX2) are used to accelerate

[go-nuts] ...cannot find module for path...

2019-01-26 Thread advoretskiy
Hi, I'm playing with modules. Something doesn't works for me. I have this code in main.go outside of GOPATH directory in */Users/me/goO/mycat:* package main import ( "io" "os" "github.com/sirupsen/logrus" ) func main() { _, err :=

Re: [go-nuts] Why makechan distinguish elements do not contain pointers or contain pointers?

2019-01-26 Thread Ian Lance Taylor
On Sat, Jan 26, 2019 at 6:50 PM wrote: > > I am looking at go1.11.1. I don't see a "noscan" flag for mallocgc in 1.11.1. There is a noscan local variable, which is set of the type is passed as nil (the case I mentioned earlier) or if the type has no pointers. > The memory allocation is still

Re: [go-nuts] Why makechan distinguish elements do not contain pointers or contain pointers?

2019-01-26 Thread mountainfpf
I am looking at go1.11.1. The memory allocation is still difficult to understand. What reference materials can help me understand the context of this block? 在 2019年1月27日星期日 UTC+8上午3:03:47,Ian Lance Taylor写道: > > On Sat, Jan 26, 2019 at 5:37 AM > wrote: > > > > Why the garbage collector won't

Re: [go-nuts] Some problem I heard in my class: there are n chess players and they play with all others 1 game and no more than 1 game per day.

2019-01-26 Thread Lutz Horn
Hi Anca, Am 26.01.19 um 09:27 schrieb Anca Emanuel: > How do you make an planing for that event ? > > Here is my > implementation: > https://github.com/ancaemanuel/comb/blob/master/chess_tournament.go > > This was not an easy problem. After some years of thinking an pencil work I > have an

Re: [go-nuts] go install touches the result file even if no changes

2019-01-26 Thread 'Tim Hockin' via golang-nuts
On Fri, Jan 25, 2019 at 11:43 PM Paul Jolly wrote: > > Tim - in case it's of any interest, I am in the process of (re)writing > a dependency-aware wrapper around go generate that caches results in > an artefact cache (i.e. only re-runs code generation as required). Yes interested. Happy to talk

Re: [go-nuts] Re: why map the key type must not be a function, map, or slice

2019-01-26 Thread Victor Giordano
Thanks for sharing point the view!. And you can bet that i done that!!! :D It was quite a challenge you know!! In nowadays system is working, let keep crossing fingers please... El sáb., 26 ene. 2019 a las 18:45, robert engels () escribió: > Yes, and you can do that. > > On Jan 26, 2019, at 3:36

Re: [go-nuts] Re: why map the key type must not be a function, map, or slice

2019-01-26 Thread robert engels
Yes, and you can do that. > On Jan 26, 2019, at 3:36 PM, Victor Giordano wrote: > > Probably i need to reveal the underlying problem i was trying to solve > > At a glande: an appoinment subsystem for a health organization, considering > practitioners that work on services offering practices

Re: [go-nuts] Re: why map the key type must not be a function, map, or slice

2019-01-26 Thread Victor Giordano
Probably i need to reveal the underlying problem i was trying to solve At a glande: an appoinment subsystem for a health *organization*, considering practitioners that work on *services *offering *practices *that refers to *billables *items, the *practices *may need one or more *equipment*, also

Re: [go-nuts] Re: why map the key type must not be a function, map, or slice

2019-01-26 Thread Wagner Riffel
i don't quite understand why you're using enums as keys, you can use a anything but what already was pointed out, following your person example: https://play.golang.org/p/cuMlPeqR7Qb On Sat, Jan 26, 2019, 3:26 PM Victor Giordano wrote: > Yup! That's right! At the end of the day i used the

Re: [go-nuts] Why makechan distinguish elements do not contain pointers or contain pointers?

2019-01-26 Thread Ian Lance Taylor
On Sat, Jan 26, 2019 at 5:37 AM wrote: > > Why the garbage collector won't know how to find the pointers? > I looked at mallocgc and decided if the GC needs to scan this object based > on the noscan flag. What version of Go are you looking at? There was a flagNoScan as late as Go 1.6, but

Re: [go-nuts] About 64bits alignment

2019-01-26 Thread Ian Lance Taylor
On Sat, Jan 26, 2019 at 7:56 AM Marvin Renich wrote: > > * Ian Lance Taylor [190125 18:11]: > > On Fri, Jan 25, 2019 at 2:59 PM wrote: > > > I still can't find anything "authoritative and unambiguous" on this. > > > Therefore apps are going to be released with bugs in them. Can > > > someone

Re: [go-nuts] go install touches the result file even if no changes

2019-01-26 Thread Ian Lance Taylor
On Fri, Jan 25, 2019 at 7:55 PM Tim Hockin wrote: > > Fair point, of course. > > I care because Kubernetes and it's family of projects have Makefiles to > encapsulate trickier aspects of building, including code generation. > Compiling kubernetes takes a LONG time. It would be nice to avoid

Re: [go-nuts] Re: why map the key type must not be a function, map, or slice

2019-01-26 Thread Victor Giordano
Yup! That's right! At the end of the day i used the enums idioms , employing integer type (the value that supports the "enum" ) (TL;DR;) Ancient History : The problem arises as i get used to use

Re: [go-nuts] About 64bits alignment

2019-01-26 Thread Marvin Renich
* Ian Lance Taylor [190125 18:11]: > On Fri, Jan 25, 2019 at 2:59 PM wrote: > > I still can't find anything "authoritative and unambiguous" on this. > > Therefore apps are going to be released with bugs in them. Can > > someone please say specifically when it is _not_ safe to use 64-bit > >

Re: [go-nuts] Re: why map the key type must not be a function, map, or slice

2019-01-26 Thread mountainfpf
I looked at your program example, mainly using the reflection type to design the mapped key, perhaps the reflected key is a comparable type, but I mainly propose specific types, such as func, slice, map can not be used as a key use 在 2019年1月25日星期五 UTC+8下午11:31:57,Victor Giordano写道: > > Yeah, i

Re: [go-nuts] Re: why map the key type must not be a function, map, or slice

2019-01-26 Thread mountainfpf
I use it often, I don't know what you mean by this. 在 2019年1月25日星期五 UTC+8下午11:04:08,Burak Serdar写道: > > On Fri, Jan 25, 2019 at 7:47 AM Victor Giordano > wrote: > > > > Just wanna say : It would be nice to employ a custom type as a valid key > for a map!!! :D > > You can use a struct as a

Re: [go-nuts] Why makechan distinguish elements do not contain pointers or contain pointers?

2019-01-26 Thread mountainfpf
Why the garbage collector won't know how to find the pointers? I looked at mallocgc and decided if the GC needs to scan this object based on the noscan flag. 在 2019年1月25日星期五 UTC+8下午10:58:44,Ian Lance Taylor写道: > > On Thu, Jan 24, 2019 at 11:58 PM > > wrote: > > > > go 1.11.1 source code is

[go-nuts] Re: [ANN] gocontracts 1.3.0 released

2019-01-26 Thread Marko Ristin-Kaufmann
P.S. Here's the link that I forgot to include in the previous email: https://github.com/Parquery/gocontracts On Sat, 26 Jan 2019 at 08:56, Marko Ristin-Kaufmann wrote: > Hi, > We have just released gocontracts 1.3.0. > > Gocontracts now support arbitrary function preambles and condition >

[go-nuts] Re: Restyle output of net/http/fs.go dirList() ?

2019-01-26 Thread Tamás Gulácsi
Something along the lines of https://play.golang.org/p/YgVIP_6uIWG can work. 2019. január 26., szombat 8:36:59 UTC+1 időpontban Tamás Gulácsi a következőt írta: > > dirList is just 20 lines of code, you can easily reimplement it with your > decorators. > > To ake this as an extension of

[go-nuts] Some problem I heard in my class: there are n chess players and they play with all others 1 game and no more than 1 game per day.

2019-01-26 Thread Anca Emanuel
How do you make an planing for that event ? Here is my implementation: https://github.com/ancaemanuel/comb/blob/master/chess_tournament.go This was not an easy problem. After some years of thinking an pencil work I have an optimal solution. -- You received this message because you are