[go-nuts] Building application for windows server 2008 using go 1.13+

2020-07-28 Thread Maxim Via-Net
Hello everyone, I know about it: https://golang.org/doc/go1.13#windows But may be there is some another way for building a valid application for NT6.0 using go 1.13+, maybe there are some tricks or arguments for compiler? I don't want to freeze application on go 1.12 forever, I think it is a

[go-nuts] builtin function definitions

2020-07-28 Thread Shane H
Hi all, I'm trying to understand what *exactly* the .(type) is doing in the following statement switch foo := bar.(type) I mean, I get that foo is being assigned a type converted version of the bar interface, but, I want to see what exactly they .(type) call does. I have found

Re: [go-nuts] errors in generated go files

2020-07-28 Thread 'K Richard Pixley' via golang-nuts
Yes! Thank you. On 7/28/20 11:38, Axel Wagner wrote: [External Email. Be cautious of content] Maybe this helps? https://golang.org/src/cmd/compile/doc.go#L153

[go-nuts] Re: my package not include in go modules

2020-07-28 Thread Christoph Berger
A module can consist of multiple packages. The packages in your repository all belong to the module in the root directory of the repo (where your go.,mod file is). And there is nothing wrong with this. You can maintain them all together in the same module. However, perhaps you want to make

[go-nuts] Thoughts on the try proposal (and Generics)

2020-07-28 Thread Michal Bohuslávek
I've been thinking a lot about this Russ's comment from the try proposal: > But before we get to try, it is worth making sure we're all on the > same page about appropriate error context. The canonical example > is os.Open.

Re: [go-nuts] Failed to build gollvm in a docker container

2020-07-28 Thread Ivan Serdyuk
Yuan, do you have any progress here? Ivan On Thursday, May 28, 2020 at 6:47:41 AM UTC+3 Yuan Ting wrote: > Thanks for your correction, overriding CMAKE_C_FLAGS and CMAKE_ASM_FLAGS > with "-fcf-protection=none" works for me. > I also try to build gollvm from a clean slate (by recreating a build

[go-nuts] Re: Thoughts on the try proposal (and Generics)

2020-07-28 Thread Denis Cheremisov
> Most functions are called more than once in a program, so adding > context to the implementation itself would benefit every caller: they don't > need to add the context themselves. This is highly questionable assumption. Context outside is obviously superior: - Your assumption just does

[go-nuts] Re: builtin function definitions

2020-07-28 Thread Shane H
Thanks, I have a bash script that I use to examine the assembly code that is generated by a given go file https://bpa.st/MRJ4IWJFJ5YNHXFLCMMYGGSI3A But that takes me past the code that was used to generate that assembly I'm wanting the midpoint here, the code that the compiler sees, in order

[go-nuts] Re: builtin function definitions

2020-07-28 Thread Shane H
Hrm, that bpaste site will only last a week, so, for posterity, I'll paste the script here #!/bin/bash if [[ "$#" -ne 1 ]]; then echo "No filename supplied, nothing to do" exit 0 fi INFILE="$1" echo "=== In file ===" cat $INFILE echo

[go-nuts] Re: builtin function definitions

2020-07-28 Thread tokers
You may try to use `go tool compile -S ` and read the assemble codes to find the truth. On Wednesday, July 29, 2020 at 5:39:53 AM UTC+8 shan...@gmail.com wrote: > Hi all, I'm trying to understand what *exactly* the .(type) is doing in > the following statement > > switch foo := bar.(type) > >

[go-nuts] import a file

2020-07-28 Thread jules
I'm new to golang and learning it in evenings with no one to ask questions of. I have a local files: Here is /home/jules/go/src/jsonstuff/typestuff.go : package jsonstuff type Prices struct { BidPrice float64 `json:"p"` } Here is

[go-nuts] Re: How to build gollvm on arm platform

2020-07-28 Thread local . tourist . kiev
Pre-compiled x86_64 debug and "release" builds are on my way. Ivan On Monday, December 10, 2018 at 7:54:05 PM UTC+2, moref...@gmail.com wrote: > > I try to compile gollvm on arm platform according to > https://go.googlesource.com/gollvm/, but error is reported as following > > CMake Error at

[go-nuts] Multiple Definition Error when using whole-archive linker option

2020-07-28 Thread Athith [Outlook] Amarnath
Hello, I am working on upgrading go version on our service from 1.9.6 to 1.14.6. We are linking static libraries to the executable using the following makefile script. export CGO_LDFLAGS="-Wl,--start-group -Wl,--whole-archive -lsmuxed_a -Wl,--no-whole-archive -l:libx265.a $(addprefix

Re: [go-nuts] Failed to build gollvm in a docker container

2020-07-28 Thread Yuan Ting
Hi Ivan, I think there is no problem to build latest gollvm in docker container now. There is no need to add "-fcf-protection" explicitly to CFLAGS/ASM_FLAGS any more according recent patches. On Wednesday, July 29, 2020 at 12:10:35 PM UTC+8, Ivan Serdyuk wrote: > > Yuan, > do you have any

Re: [go-nuts] import a file

2020-07-28 Thread Kurtis Rader
See https://golang.org/ref/spec#Import_declarations. By default importing a package requires using the package name to refer to any symbols it exports; e.g., "jsonstuff.Prices". You can do "import . jsonstuff" to allow accessing its public symbols without qualification. Google "go import

Re: [go-nuts] Build kubernetes with gollvm

2020-07-28 Thread Ivan Serdyuk
Yuan, are you still working on gollvm based port of k8s? Ivan On Saturday, July 20, 2019 at 5:32:03 AM UTC+3 Yuan Ting wrote: > OK, I will check out the reflect2 package and take a look. Thanks a lot > for your direction! > > Best, > Ting > > On Friday, July 19, 2019 at 10:30:32 PM UTC+8, Ian

Re: [go-nuts] errors in generated go files

2020-07-28 Thread 'Axel Wagner' via golang-nuts
Maybe this helps? https://golang.org/src/cmd/compile/doc.go#L153 On Tue, Jul 28, 2020 at 8:35 PM 'K Richard Pixley' via golang-nuts < golang-nuts@googlegroups.com> wrote: > I'm currently working with pigeon, a peg based parser generator. > > When I... > >- make a go error in the source file,

Re: [go-nuts] Re: [generics] Feedback on optional type keyword experiment

2020-07-28 Thread Nuno Cruces
Please, don't make type optional. IMO, removing it altogether with this proposal (type any = interface {}) is probably great. Making type mandatory (as originally proposed) is fine. Making it optional is much worse than both those options. As much as possible, there should be one way to do it.

[go-nuts] errors in generated go files

2020-07-28 Thread 'K Richard Pixley' via golang-nuts
I'm currently working with pigeon, a peg based parser generator. When I... * make a go error in the source file, grammar.peg... * that is processed correctly by pigeon into an invalid grammar.go... * and the go compiler correctly complains about the error... * it complains about an error in