[go-nuts] Re: when has multi GOPATH, go can`t detect the vendor folder.

2017-07-18 Thread Nathan Kerr
By "has a vendor folder in it's root dir" do you mean /workspace/specific/project/vendor? If so, go didn't find it because that directory is outside of /workspace/specific/project/src/, and thus not seen as source files in the GOPATH. It works when the project is under /go because the vendor

Re: [go-nuts] slow Mod function in math/big, a better way?

2017-07-18 Thread Jeff Templon
Hi Remy, It turns out that you are at least partially on the right track :-) I changed the way Barrett is written, so as to use as few temporary variables as possible. In particular, the Rsh doesn't use any at all anymore ... the 60% of the Rsh time that was being used in runtime.mallocgc

Re: [go-nuts] slow Mod function in math/big, a better way?

2017-07-18 Thread Jeff Templon
Hi Remy, On Monday, July 17, 2017 at 10:39:56 PM UTC+2, Rémy Oudompheng wrote: > > 2017-07-17 15:56 GMT+02:00 Jeff Templon >: > > > it turns out that 77% of the time of the program is spent in > > runtime.mallocgc :-) I think the reason why is stuff like this: >

Re: [go-nuts] slow Mod function in math/big, a better way?

2017-07-18 Thread Jeff Templon
One more bit of progress which shaved off more time: following this page, https://blog.golang.org/profiling-go-programs I introduced a pair of global cache big.Int variables for the function which was consuming most of the time; one for the smaller intermediate results and one for the

[go-nuts] Re: An idea about motivating the community

2017-07-18 Thread ondrej . linek
That's quite a lot of work! I personally hate gamification but agree that it can motivate some people to participate. At the same time I would consider using financial incentives - bounties and the likes. Or probably a mixture of gamification, bounties, commendations and other forms of

[go-nuts] Re: [Bug Report] Cannot run GO in Windows Server 2016

2017-07-18 Thread yanfeizhang2016a2
Yep the issue resists under 1.9beta2. Reported on github On Monday, July 17, 2017 at 10:02:34 PM UTC+8, Egon wrote: > > Have you tried go1.9beta2? Maybe it's already fixed? > > https://golang.org/dl/#unstable > > If not then make a bug report to: https://github.com/golang/go/issues > > + Egon >

[go-nuts] "go install": no warning/error when binaries conflict

2017-07-18 Thread tom . payne
Consider a package with multiple binaries with the same name, "cmd" in this case: pkg1/cmd/main.go: package main; import "fmt"; func main() { fmt.Println("pkg1") } pkg2/cmd/main.go: package main; import "fmt"; func main() { fmt.Println("pkg2") } When running $ go install ./... I would expect

Re: [go-nuts] encoding/csv: Is this a bug?

2017-07-18 Thread ajstarks
See: https://github.com/golang/go/issues/7897 See also: https://gist.github.com/ajstarks/04a61ace4fc8e18f51fda8da6adac017 for a program I use to read CSVs on a Mac. I typically use "Windows Comma Separated" when saving from Excel. On Monday, July 17, 2017 at 11:07:43 PM UTC-4, Matt Harden

Re: [go-nuts] slow Mod function in math/big, a better way?

2017-07-18 Thread Jeff Templon
I managed to do quite a bit better (30% savings in execution time) proceeding along these lines. Finally I got to the point where runtime.makeslice, and underneath runtime.mallocgc, are responsible for 50% of the run time, with no other real hotspots. Almost all of the makeslice time is

Re: [go-nuts] "go install": no warning/error when binaries conflict

2017-07-18 Thread Ian Lance Taylor
On Tue, Jul 18, 2017 at 7:27 AM, wrote: > > Consider a package with multiple binaries with the same name, "cmd" in this > case: > > pkg1/cmd/main.go: > package main; import "fmt"; func main() { fmt.Println("pkg1") } > > pkg2/cmd/main.go: > package main; import "fmt";

[go-nuts] Run go packages without compiling

2017-07-18 Thread jkleong
If I've already compiled my golang package, I'll have files in my /bin/ and /pkg/linux_amd64 folders. Is there a way I can run the compiled binary without have to compile the code first (go run) ? -- You received this message because you are subscribed to the Google Groups "golang-nuts"

Re: [go-nuts] Run go packages without compiling

2017-07-18 Thread Ian Lance Taylor
On Tue, Jul 18, 2017 at 12:52 PM, wrote: > > If I've already compiled my golang package, I'll have files in my /bin/ and > /pkg/linux_amd64 folders. Is there a way I can run the compiled binary > without have to compile the code first (go run) ? Sorry, I don't understand

Re: [go-nuts] Re: An idea about motivating the community

2017-07-18 Thread Michael Banzon
I'd like a tool for measuring Go community involvement. I'm thinking that this can be done automagically - by adding feeds (twitter, blog, repos, this list etc) to a crawler and giving scores based on activity - compared with a way to link accounts/contributors (mich...@banzon.dk == @mbanzon

[go-nuts] fast infoset encoding handler lib in go?

2017-07-18 Thread Sangjin Lee
Is there a fast infoset encoding handler in go out there that can transform it to and from a more textual (e.g. xml) format? I'm referring to the fast infoset format that is used for some (old style) SOAP communication (see https://en.wikipedia.org/wiki/Fast_Infoset). Google search doesn't turn

Re: [go-nuts] Run go packages without compiling

2017-07-18 Thread jkleong
Thanks this is what I was looking for On Tuesday, July 18, 2017 at 1:14:54 PM UTC-7, Ian Lance Taylor wrote: > > On Tue, Jul 18, 2017 at 12:52 PM, > wrote: > > > > If I've already compiled my golang package, I'll have files in my /bin/ > and > > /pkg/linux_amd64

Re: [golang-dev] Re: [go-nuts] net: ReadMsg and reading error queue

2017-07-18 Thread mikioh . mikioh
>From go1.9, the {TCP,UDP,IP,Unix}Conn of net package satisfies the RawConn interface of syscall package. I think you can implement own platform dependent stuff by using the new exposed API. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To

[go-nuts] liteide x32.2 released

2017-07-18 Thread visualfc
Hi all. LiteIDE x32.2 released! Fix editor watcher invalid bug (if external editor many change). Debug add breakpoint load and save. Fix debug tests action. etc. ### Links * LiteIDE New Home  * LiteIDE Source code *

Re: [go-nuts] few questions about runtime implementation

2017-07-18 Thread Ian Lance Taylor
On Mon, Jul 17, 2017 at 8:51 AM, 井岡裕史 wrote: > > c-share and c-archive enforce external linking. > https://github.com/golang/go/blob/504deee6088c2448fc3e91c94a1ba69ec92fb7ef/src/cmd/link/internal/ld/config.go#L191-L196 > > I think that external linking always use

Re: [go-nuts] Attaching to email and extracting email attachments

2017-07-18 Thread jesse junsay
Hi Andrey, Thank you. I have been trying to figure out how to use your example. But the email that I receive from it are plain text even the encoded attached file. It does not appear as attached but as encoded characters in the mail body. And there is still no attachment seen. I tried modifying

Re: [go-nuts] Attaching to email and extracting email attachments

2017-07-18 Thread jesse junsay
Hi Andrey, Thank you. I have been trying to figure out how to use your example. But the email that I receive from it are plain text even the encoded attached file. It does not appear as attached but as encoded characters in the mail body. And there is still no attachment seen. I tried

Re: [go-nuts] Attaching to email and extracting email attachments

2017-07-18 Thread andrey mirtchovski
the example you have given is incomplete, but the most likely reason you're not being successful is that you are not setting correctly headers for multipart/mixed mime types. i've created a full working example here, hopefully this helps: https://play.golang.org/p/xVqUDN7OGt for more info on

Re: [go-nuts] How to specify -gccgoflags using pseudo #cgo directive

2017-07-18 Thread Ian Lance Taylor
On Tue, Jul 18, 2017 at 9:40 PM, wrote: > > I am trying to link a dynamic library to my go code. > > /* > #cgo CFLAGS: -I/usr/local/include > #cgo LDFLAGS: -L/usr/local/lib -ltemp > #include > #include > #include > */ > > When I run go build -x it fails due to

Re: [go-nuts] How to specify -gccgoflags using pseudo #cgo directive

2017-07-18 Thread Bhaskar Singhal
Upgrading go to 1.8 resolved the issue. But I no longer see gccgo invocation. root@xx-23:~# go version go version go1.8.1 linux/amd64 root@xx-23:~/temp-go/src# go build -x WORK=/tmp/go-build538089172 mkdir -p $WORK/_/root/temp-go/src/_obj/ mkdir -p $WORK/_/root/temp-go/src/_obj/exe/ cd

[go-nuts] Re: [Bug Report] Cannot run GO in Windows Server 2016

2017-07-18 Thread JussiJ
On Monday, July 17, 2017 at 11:27:38 PM UTC+10, yanfeizh...@gmail.com wrote: > > [Issue] > When running go, a problem is encountered > > OS: Microsoft Windows Server 2016 Datacenter > This might be related to Windows Data Execution Prevention (DEP)? Microsoft servers have much stricter DEP

[go-nuts] net/http: Redirect writes HTML for GET requests without setting Content-Type, how come?

2017-07-18 Thread Dmitri Shuralyov
I've written a little middleware to help catch instances where I write some content in an HTTP handler, but forget to set the Content-Type header. I prefer to always set it to avoid forcing the browser to guess. It feels good and produces more predictable results. I've noticed some of my

[go-nuts] close before net write

2017-07-18 Thread Liam
For a server writing files on a lot of concurrent connections, you may want to close the file before net.Conn:Write to avoid max open file error. The cycle is b := make ([]byte, n) var err error for off:=0; err != io.Eof; off+=len { f, err := s.OpenFile(name) len, err := f.ReadAt(b, off)

Re: [go-nuts] How to specify -gccgoflags using pseudo #cgo directive

2017-07-18 Thread Bhaskar Singhal
root@xx-23:~# uname -a Linux xx-23 4.4.70-letstry #1 SMP Tue Jul 11 13:58:17 IST 2017 x86_64 x86_64 x86_64 GNU/Linux root@xx-23:/usr/lib/go/src/pkg# go version go version go1.2.1 linux/amd64 root@xx-23:~/temp-go/src# go build -x WORK=/tmp/go-build751660824 mkdir -p

[go-nuts] How to specify -gccgoflags using pseudo #cgo directive

2017-07-18 Thread bhaskar . singhal
Hi, I am trying to link a dynamic library to my go code. /* #cgo CFLAGS: -I/usr/local/include #cgo LDFLAGS: -L/usr/local/lib -ltemp #include #include #include */ When I run go build -x it fails due to missing symbols which are exported from libtemp.so but if do go build -x -gccgoflags