[go-nuts] Re: go compilation on ARM (aarch64) with goC and dynamic link

2021-02-03 Thread Christophe Valmir
Something else interesting : ron :~/inceptionv3/test_go$ ldd ./test_go linux-vdso.so.1 (0x007f7a3d1000) libstd.so => not found ron :~/inceptionv3/test_go$ ./test_go Illegal instruction ron :~/inceptionv3/test_go$ file ./test_go ./test_go: ELF 64-bit LSB shared object, ARM aarch64,

[go-nuts] Re: go compilation on ARM (aarch64) with goC and dynamic link

2021-02-03 Thread Christophe Valmir
I make a test with small program and it's a option " -shared" only into CGO_LDFLAGS which causes me problem. If I don't use it of course I can't use dynamic libs. Do you think the libstd.so program? ron:~/test_go$ ldd ./test_go linux-vdso.so.1 (0x007f87ebc000) libstd.so => /home/ron

[go-nuts] go compilation on ARM (aarch64) with goC and dynamic link

2021-02-03 Thread Christophe Valmir
Hello I tried to compile a Go program on ARM with dynamic link. Why dynamic? Because the libs I use in C are proprietary and the constructor does not want to compile in static. I build like this: export PATH=$PATH:/home/ronron/aml_npu_sdk_6.4.3/toolchains/ export CGO_ENABLED=1 export LIB_DIR=$

Re: [go-nuts] Quick question about the generics alternatives that have been considered

2021-02-03 Thread atd...@gmail.com
Just coming back to this quickly, although it is unlikely to change anything at this stage, but, re. a transform function, instead of using parametric polymorphism, I think it is possible to do it with interface arguments and to a greater extent, type lists interface arguments if we have access

Re: [go-nuts] Re: C function return value of type float changes when used with COG

2021-02-03 Thread Robert M . Münch
So, problem solved!! The Yoga library uses C float NaN for control flow and as function parameters. The bindings (parts created with C-for-Go, and merged with some other parts I found) defined a totally scrappy Undefined constant. Setting this constant to math32.NaN() solved the problem. -- Y

Re: [go-nuts] Possible to make base64 pick the decode encoding automatically?

2021-02-03 Thread Wojciech S. Czarnecki
Dnia 2021-02-03, o godz. 14:04:42 "'Axel Wagner' via golang-nuts" napisał(a): > Maybe it helps to point out that the statements "you should design your > system to thoroughly validate input and reject it if it's invalid" and > "there are contexts, where trying to be as flexible as possible in try

Re: [go-nuts] Re: Contributing to golang based project on github - collaboration best practice

2021-02-03 Thread Nicholas Yue
Thank you for the different approaches. I have settled on the go.mod approach as proposed by Shulhan. Cheers On Wednesday, 3 February 2021 at 02:31:04 UTC-8 Adrian Ho wrote: > On 3/2/21 2:21 pm, Volker Dobler wrote: > > To create a Github PR: git push to your fork (add it as an additional > > gi

Re: [go-nuts] Code compiles with unused var block

2021-02-03 Thread Danny H
Thanks so much Matt, appreciate your wisdom. On Wednesday, February 3, 2021 at 11:45:50 AM UTC-5 matthew...@nytimes.com wrote: > You are correct sir, and unfortunately, go vet doesn't find it either. > But if you lint your code with golangci-lint ( > https://github.com/golangci/golangci-lint)

Re: [go-nuts] Go Create

2021-02-03 Thread Kevin Chadwick
On 2/3/21 5:14 PM, Kevin Chadwick wrote: > Why would I trust DNS > Why would I setup letsencrypt > What if we have a minimal internet use developer machine policy https://roberto.selbach.ca/go-proxies Oh, this will be annoying. https://golang.org/ref/mod#module-proxy A module proxy must alway

Re: [go-nuts] Go Create

2021-02-03 Thread Kevin Chadwick
On 2/3/21 2:46 PM, David Riley wrote: > I understand the need for the domain as part of the module namespacing, but > it does make a certain assumption that all of these things are going to be on > resolvable domains, which isn't true for everyone. I have a resolvable domain and run a mail serve

Re: [go-nuts] Code compiles with unused var block

2021-02-03 Thread Matthew Holiday
You are correct sir, and unfortunately, go vet doesn't find it either. But if you lint your code with golangci-lint ( https://github.com/golangci/golangci-lint) the deadcode linter will find it for you. On Wed, Feb 3, 2021 at 9:35 AM Danny Hart wrote: > Hello all, > > Very new gopher here (also

[go-nuts] Code compiles with unused var block

2021-02-03 Thread Danny Hart
Hello all, Very new gopher here (also first time using Groups, please excuse poor etiquette). I was curious why the following basic program compiles with an unused var. Is it the case that the compiler only complains about unused vars in a function body? package main import ( "fmt" ) var (

Re: [go-nuts] Go Create

2021-02-03 Thread David Riley
On Jan 12, 2021, at 5:40 AM, Kevin Chadwick wrote: > > On 1/12/21 9:43 AM, Axel Wagner wrote: >> git init >> go mod init >> >> I guess you *could* safe the `git init` part, but is that really worth the >> added >> complexity? > > > I usually init git from within vscode afterwards. I wonder i

Re: [go-nuts] Re: C function return value of type float changes when used with COG

2021-02-03 Thread Alex
The interesting parts would be everything needed to run the program and have the same/similar output. Which would include any C/C++ code. The only way to be more accurate than that would be to already know what the problem is, sadly. On Wednesday, 3 February 2021 at 6:34:50 pm UTC+8 Robert M. M

Re: [go-nuts] Possible to make base64 pick the decode encoding automatically?

2021-02-03 Thread 'Axel Wagner' via golang-nuts
Maybe it helps to point out that the statements "you should design your system to thoroughly validate input and reject it if it's invalid" and "there are contexts, where trying to be as flexible as possible in trying to make sense of an input" can both be true. For example, I would agree that if y

Re: [go-nuts] Possible to make base64 pick the decode encoding automatically?

2021-02-03 Thread Wojciech S. Czarnecki
Dnia 2021-02-02, o godz. 22:26:10 "hey...@gmail.com" napisał(a): > > So having a “meta/relaxed decoder” usually leads to > specification/interoperability/security problems down the road > I respectfully disagree. Since it's only relaxed with regard to decoding, > it follows the robustness pr

Re: [go-nuts] Re: C function return value of type float changes when used with COG

2021-02-03 Thread Robert M . Münch
Well, it's a huge code-base, so I need to figure out how to nail it down to something manageable. What are the interesting parts? Maybe I can provide some more information pretty easily. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsub

Re: [go-nuts] Re: Contributing to golang based project on github - collaboration best practice

2021-02-03 Thread Adrian Ho
On 3/2/21 2:21 pm, Volker Dobler wrote: To create a Github PR: git push to your fork (add it as an additional git remote) and create the PR. The "fork" is just a vehicle for a Github PR and nothing you do work on (or try to build). For a concrete example of what Volker's talking about, see the `