[go-nuts] Re: Cross-Compile Windows 10 -> FreeBSD

2019-06-11 Thread Tamás Gulácsi
Not hopeless, just hard. You need a cross-C-compiler, and use that. It's easier to compile on native en. But you can try github.com/karalabe/xgo if you have Docker. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group

Re: [go-nuts] how to prevent go1.13 go directive being written in an go directive-free go.mod?

2019-06-11 Thread Dan Kortschak
Having that and exactly what it means in the go help modules output would probably be the best outcome. Currently it's not mentioned in that output for the current release (1.12.6) and the meaning/implication of "expected [Go] language version" is not defined in tip's version (f2a4c13). Dan On

[go-nuts] Re: Cross-Compile Windows 10 -> FreeBSD

2019-06-11 Thread B Carr
To reply to myself, I just found this comment under ADDENDUM: "Cgo has issues when cross compiling. If you depend on cgo then you’re probably going to be better off building on the native platforms. The go tool will disable cgo support by default. To explicitly enable cgo, set CGO_ENABLED=1."

[go-nuts] Cross-Compile Windows 10 -> FreeBSD

2019-06-11 Thread B Carr
Newb here. I'm in over my head. Using a Win10/amd64 PowerShell with Go v1.12.6. Trying to cross-compile to FreeBSD/amd64. go env = GOARCH=amd64 & GOOS=freebsd. Source includes calls to SQLite3. Compiles without errors. Resulting binary fails on FreeBSD with: "Can't connect to the SQLite DB

Re: [go-nuts] how to prevent go1.13 go directive being written in an go directive-free go.mod?

2019-06-11 Thread Ian Lance Taylor
On Tue, Jun 11, 2019 at 4:53 PM Dan Kortschak wrote: > > It would be very nice if the documentation and clarity of communication > around this were improved. I struggle with what to say beyond "it sets the language version." Language features available as of that version will be available for

[go-nuts] Go 1.12.6 and Go 1.11.11 are released

2019-06-11 Thread Dmitri Shuralyov
Hello gophers, We have just released Go versions 1.12.6 and 1.11.11, minor point releases. These releases include fixes to the compiler, the linker, the go command, and the crypto/x509, net/http, and os packages. View the release notes for more information:

Re: [go-nuts] how to prevent go1.13 go directive being written in an go directive-free go.mod?

2019-06-11 Thread Dan Kortschak
Thanks, Ian. Comments in-line. On Tue, 2019-06-11 at 06:42 -0700, Ian Lance Taylor wrote: > On Tue, Jun 11, 2019 at 6:40 AM Ian Lance Taylor > wrote: > > > > On Mon, Jun 10, 2019 at 10:51 PM Dan Kortschak > > wrote: > > > > > > The semantics of the directive are not defined, and there are >

Re: [go-nuts] Re: Project Layout Question

2019-06-11 Thread David Riley
On Jun 11, 2019, at 13:38, Ronny Bangsund wrote: > > > >> On Tuesday, June 11, 2019 at 2:47:44 PM UTC+2, Boris Mühmer wrote: >> Is the project layout total rubbish? > > I'm not sure - all I know is that it's different from how I prefer it, and > "pkg" is the one thing I frequently see people

[go-nuts] Re: Project Layout Question

2019-06-11 Thread Ronny Bangsund
On Tuesday, June 11, 2019 at 2:47:44 PM UTC+2, Boris Mühmer wrote: > > Is the project layout total rubbish? > I'm not sure - all I know is that it's different from how I prefer it, and "pkg" is the one thing I frequently see people dislike ;) If you want to share packages, parent them to the

Re: [go-nuts] how to prevent go1.13 go directive being written in an go directive-free go.mod?

2019-06-11 Thread Ian Davis
Yes, I wrote minimum when I meant to write maximum! Sorry for the confusion. On Tue, 11 Jun 2019, at 3:37 PM, t hepudds wrote: > As far as I understand, it is not a minimum version of the language. > > Also, a key point that is easy to miss is that the language version is > distinct from

Re: [go-nuts] [ANN] Gio: portable immediate mode GUI programs in Go for iOS/tvOS, Android, macOS, Linux, Windows

2019-06-11 Thread Elias Naur
> > And on android, I can delete characters, but not input any (Samsung Galaxy >> S8, Android 9) >> >> > Thanks for bringing it up, I've added it to the issue tracker: > https://todo.sr.ht/~eliasnaur/gio/7. It's not entirely unexpected; I have > only implemented the very basic parts of the

Re: [go-nuts] how to prevent go1.13 go directive being written in an go directive-free go.mod?

2019-06-11 Thread t hepudds
As far as I understand, it is not a minimum version of the language. Also, a key point that is easy to miss is that the language version is distinct from tooling version, and newer tooling versions will know how to compile older language versions. At least, that is my understanding, though I

Re: [go-nuts] How can I compile my project only relay on my vendor folder with go modules?

2019-06-11 Thread andrey mirtchovski
"go mod vendor" will populate the vendor directory in your project, then "go build -mod=vendor" will only use that directory to build. On Tue, Jun 11, 2019 at 3:12 AM 唐彦昭 wrote: > > I need put my project on the server to compile.But my server can't connect to > internet. > So I need to put all

Re: [go-nuts] how to prevent go1.13 go directive being written in an go directive-free go.mod?

2019-06-11 Thread Ian Davis
https://golang.org/cmd/go/#hdr-The_go_mod_file documents the go directive as the "expected language version". It seems it would be better described there as the "minimum language version". On Tue, 11 Jun 2019, at 2:43 PM, Ian Lance Taylor wrote: > On Tue, Jun 11, 2019 at 6:40 AM Ian Lance

Re: [go-nuts] how to prevent go1.13 go directive being written in an go directive-free go.mod?

2019-06-11 Thread Ian Lance Taylor
On Mon, Jun 10, 2019 at 10:51 PM Dan Kortschak wrote: > > The semantics of the directive are not defined, and there are comments > like this[1] that would introduce breakage for people who target more > than one version of Go. Yes. A good reason to not do that. We don't do it today, and there

Re: [go-nuts] how to prevent go1.13 go directive being written in an go directive-free go.mod?

2019-06-11 Thread Ian Lance Taylor
On Tue, Jun 11, 2019 at 6:40 AM Ian Lance Taylor wrote: > > On Mon, Jun 10, 2019 at 10:51 PM Dan Kortschak wrote: > > > > The semantics of the directive are not defined, and there are comments > > like this[1] that would introduce breakage for people who target more > > than one version of Go. >

Re: [go-nuts] why need "assist garbage collection" at a GC cycle? (runtime Code)

2019-06-11 Thread Jesper Louis Andersen
Indeed. If you allocate data faster than the GC mark phase can find and mark it, it enlists the "mutator" (I.e., your program) to assist it in the GC. Roughly, allocations are now followed by some marking work, so the allocation rate doesn't outpace the marking rate. The solution is to lower

Re: [go-nuts] CSV Writer Buffer size

2019-06-11 Thread Ian Lance Taylor
On Tue, Jun 11, 2019 at 5:47 AM Siddhant Sharma wrote: > > Currently, the csv writer does not contain any option to increase the buffer > size to more than the default buffer size for bufio(4096). Does anybody know > why? If you want a different buffer size, just call bufio.NewWriterSize on

Re: [go-nuts] Re: Go will shine on huge web projects, but how about simple ones?

2019-06-11 Thread Tong Sun
Thanks Amnon for the insight, which confirmed my guessing when answering the following question against ab in my blog: > I'm unclear how to interpret the results from ab. From the top chunk of the > results (time taken for tests, requests per second, time per request, etc.), > it would appear

[go-nuts] Re: go: how to input two-dimensional string array form keyboard??

2019-06-11 Thread Ivan Fraixedes
Could you post your non-working peice of code? it should help to understand what's the problem. On Monday, 10 June 2019 07:19:02 UTC+2, shine sun wrote: > > Firstly, I try to input N and M from keyboard, creating a two-dimensional > string array (var nums [N][M]string). Then, for i := 0; i <

[go-nuts] Project Layout Question

2019-06-11 Thread Boris Mühmer
Hello Everyone, my development environment is based on Linux and Windows, and I work with VS Code in both environments. Before Go 1.12 I was a "fan" of https://github.com/golang-standards/project-layout to organize my projects. With 1.12 I started to move my project bases out of

[go-nuts] Yet another new fast json/xml parser library

2019-06-11 Thread Tamer
Hello everyone, I have developed a new json parser library. It is similar jstream library but it allows stream over selected json member instead of depth. It also allow skipping json members for less memory usage. https://github.com/tamerh/jsparser I have also refactored previously developed

[go-nuts] CSV Writer Buffer size

2019-06-11 Thread Siddhant Sharma
Currently, the csv writer does not contain any option to increase the buffer size to more than the default buffer size for bufio(4096). Does anybody know why? -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and

Re: [go-nuts] Re: Go will shine on huge web projects, but how about simple ones?

2019-06-11 Thread Amnon Baron Cohen
For those interested, you can find some web benchmarks here https://www.techempower.com/benchmarks/ For the trivial http ping type server, you would expect latency to be dominated by system time. strace'ing your code will give you an idea what it is doing. Go allows you to have multiple

Re: [go-nuts] How can I compile my project only relay on my vendor folder with go modules?

2019-06-11 Thread Henrik Johansson
I think "go mod vendor" does the trick as stated in "go mod help vendor". On Tue, Jun 11, 2019 at 11:12 AM 唐彦昭 wrote: > I need put my project on the server to compile.But my server can't connect > to internet. > So I need to put all my relay in my vendor folder in my develop > environment. >

[go-nuts] How can I compile my project only relay on my vendor folder with go modules?

2019-06-11 Thread 唐彦昭
I need put my project on the server to compile.But my server can't connect to internet. So I need to put all my relay in my vendor folder in my develop environment. How can I do this with go modules? -- You received this message because you are subscribed to the Google Groups "golang-nuts"

Re: [go-nuts] why need "assist garbage collection" at a GC cycle? (runtime Code)

2019-06-11 Thread ding liu
Thanks, this is. I find some infomation at https://docs.google.com/document/d/1wmjrocXIWTr1JxU-3EQBI6BK6KgtiFArkG47XK73xIQ/edit# 在 2019年6月6日星期四 UTC+8下午7:25:08,Gergely Födémesi写道: > > Maybe the detail you are looking for is something like this: > https://blog.golang.org/ismmkeynote > > > On