Re: [go-nuts] Find n-th root of a big number

2020-09-22 Thread Rob Pike
I'm not going to debug you program for you - you'll learn more doing it yourself, but I glanced at it and saw immediately that you're missing an easy optimization. Raising a number to an integer power can be done much faster by repeated squaring according to the bit pattern of the exponent. I'll le

Re: [go-nuts] Find n-th root of a big number

2020-09-22 Thread Nasir Hussain
The Amazing Rob Pike :D On Tue, Sep 22, 2020 at 12:13 PM Rob Pike wrote: > I'm not going to debug you program for you - you'll learn more doing it > yourself, but I glanced at it and saw immediately that you're missing an > easy optimization. Raising a number to an integer power can be done much

Re: [go-nuts] how to use replace directives in go.mod in dev but not prod

2020-09-22 Thread Paul Jolly
26640 is an open issue describing the same problem you're describing. Unfortunately because it remains open there is not yet a solution. On Tue, 22 Sep 2020, 07:36 Alex Mills, wrote: > i dont understand, is there a solution or just a proposal? > > On Mon, Sep 21, 2020, 23:03 Paul Jolly wrote: >

Re: [go-nuts] how to use replace directives in go.mod in dev but not prod

2020-09-22 Thread Denis Cheremisov
CI probably is the anwser, made a utility based on golang.org/x/mod which parses go.mod and checks if replaces are there and exit with error state if they are. вторник, 22 сентября 2020 г. в 11:21:55 UTC+3, Paul Jolly: > 26640 is an open issue describing the same problem you're describing. >

Re: [go-nuts] how to use replace directives in go.mod in dev but not prod

2020-09-22 Thread Paul Jolly
> CI probably is the anwser, made a utility based on golang.org/x/mod which > parses go.mod and checks if replaces are there and exit with error state if > they are. This isn't the problem discussed in 26640 at least. There, the issue is that it is not currently possible to have a go.mod.local f

Re: [go-nuts] mytex.RWLock recursive read lock

2020-09-22 Thread 'Bryan C. Mills' via golang-nuts
Note that a lock on a sync.Mutex or sync.RWMutex is *not* held by a specific goroutine: it can be locked by one goroutine, then communicated by some other means (such as being sent on a channel) and unlocked on a *different* goroutine. (See also https://golang.org/issue/9201.) That is: these lo

Re: [go-nuts] Find n-th root of a big number

2020-09-22 Thread roger peppe
Relevant issue: https://golang.org/issue/14102 On Tue, 22 Sep 2020 at 08:54, Nasir Hussain wrote: > The Amazing Rob Pike :D > > On Tue, Sep 22, 2020 at 12:13 PM Rob Pike wrote: > >> I'm not going to debug you program for you - you'll learn more doing it >> yourself, but I glanced at it and saw

[go-nuts] Windows Write Call Error when Writing to Network mapped Folder.

2020-09-22 Thread helhadad
Hi Folks, I am trying to create file and write to it on a *network mapped drive*, which I can access, create, delete and edit files using windows explorer or CMD (Windows 10/Server 2016). You can find all details of the issue and response from other Go-Expert below: https://stackoverflow.com

[go-nuts] Cross compiling for linux from dawin

2020-09-22 Thread Mixo Ndleve
Experiencing this problem when "github.com/cvigo/go_ibm_db" is imported ../../../go/pkg/mod/github.com/lunny/godbc@v0.0.0-20131220142036-57f94ee1eb13/api/api.go:13:9: undefined: SQLSMALLINT ../../../go/pkg/mod/github.com/lunny/godbc@v0.0.0-20131220142036-57f94ee1eb13/api/api.go:14:9: undefine

Re: [go-nuts] Cross compiling for linux from dawin

2020-09-22 Thread Marcin Romaszewicz
Your compiler environment for C code is still building for Darwin, most likely. You need to set up a cross compiler and use cgo ( https://golang.org/cmd/cgo/). $CC should invoke your cross compiler. On Tue, Sep 22, 2020 at 11:19 AM Mixo Ndleve wrote: > Experiencing this problem when "github.com/

Re: [go-nuts] Windows Write Call Error when Writing to Network mapped Folder.

2020-09-22 Thread Ian Lance Taylor
On Tue, Sep 22, 2020 at 11:14 AM helhadad wrote: > > Hi Folks, > I am trying to create file and write to it on a network mapped drive, which I > can access, create, delete and edit files using windows explorer or CMD > (Windows 10/Server 2016). > > You can find all details of the issue and respo

Re: [go-nuts] Cross compiling for linux from dawin

2020-09-22 Thread Mixo Ndleve
FiloSottile/musl-cross/musl-cross is set up. ( https://subscription.packtpub.com/book/application_development/9781789138412/app02/app02lvl1sec98/cross-compiling-for-linux-with-cgo ) With it we are able to cross compile for windows and linux from darwin, the problem arises as soon as we import _ "

Re: [go-nuts] Cross compiling for linux from dawin

2020-09-22 Thread Joop Kiefte
Quick guess, the dependencies the CGo in that library tries to link with are not the correct version and as such lack some definitions? Try updating the C dependency source if possible to a later or corresponding version, if that makes sense? [Joop Kiefte - Chat @ Spike](https://spikenow.com/r