[go-nuts] Gollvm produces bad LLVM IR

2021-04-07 Thread Khanh TN
Hi, I'm following this page https://go.googlesource.com/gollvm to compile Go code the LLVM way. I'm at the step "How do I see the LLVM IR generated by gollvm?" of the page. I'm doing exactly as the instruction. Gollvm produces a .ll file but the file has bad syntax. Running llvm-as (or llc, lli)

Re: [go-nuts] Releasing a V2 module and interacting with git branches

2021-04-07 Thread Chris Burkert
I have good experiences with trunk based development meaning that “master” (we use “main”) is the main development line and you down-port to release branches with cherry picking and tags. So as soon as you commit something which is considered a major change (requiring a new version) then also appen

Re: [go-nuts] package is not in GOROOT

2021-04-07 Thread 'Carla Pfaff' via golang-nuts
On Thursday, 8 April 2021 at 02:11:50 UTC+2 rob wrote: > Yes, you are absolutely correct that I've been struggling w/ modules. > > Would it be a bad idea to use my ~go/src as a module? > > cd ~/go/src > > go mod init src > > go mod tidy --> do I need this? > > And then I would have

Re: [go-nuts] Modules... why it has to be so painfull?

2021-04-07 Thread Justin Israel
On Thursday, April 8, 2021 at 12:14:40 PM UTC+12 Slawomir Pryczek wrote: > Thanks for all replies. Actually the docs are good (imo) just these > solutions proposed in docs are a horror. > > Inside root folder of the module... so im unable to share packages between > projects and code structur

Re: [go-nuts] Strange behaviour with loops #45192, #45175

2021-04-07 Thread Sebastien Rosset
That's a great idea. Thank you! I am doing that right now. On Wed, Apr 7, 2021 at 5:05 PM 'Keith Randall' via golang-nuts < golang-nuts@googlegroups.com> wrote: > If you look at CL 304251, there's one place where we added "return false". > Put a panic just before that line (in 1.15.11 or 1.16.3),

Re: [go-nuts] Modules... why it has to be so painfull?

2021-04-07 Thread Slawomir Pryczek
Thanks for all replies. Actually the docs are good (imo) just these solutions proposed in docs are a horror. Inside root folder of the module... so im unable to share packages between projects and code structure gets horrible, because now instead of nicely organized 2 levels of nesting i have

Re: [go-nuts] package is not in GOROOT

2021-04-07 Thread rob
Yes, you are absolutely correct that I've been struggling w/ modules. Would it be a bad idea to use my ~go/src as a module?   cd ~/go/src   go mod init src   go mod tidy --> do I need this? And then I would have to edit my import statements slightly to include the module reference. --r

Re: [go-nuts] Strange behaviour with loops #45192, #45175

2021-04-07 Thread 'Keith Randall' via golang-nuts
If you look at CL 304251, there's one place where we added "return false". Put a panic just before that line (in 1.15.11 or 1.16.3), rebuild the compiler, then rebuild your program and see if your program triggers that panic. On Wednesday, April 7, 2021 at 2:37:53 PM UTC-7 Ian Lance Taylor wro

[go-nuts] Releasing a V2 module and interacting with git branches

2021-04-07 Thread Marcin Romaszewicz
Hi All, I need to release a V2 of my module. ( https://github.com/deepmap/oapi-codegen). I understand what to do on the Go side in terms of the /v2 suffix and go.mod changes, but I'm a little bit unclear how this works w.r.t git branches. Yes, I've looked at https://golang.org/ref/mod#vcs-find My

Re: [go-nuts] Big variations in benchmarking results ?

2021-04-07 Thread Robert Engels
OSX has a very different scheduler and often many more background processes. Also, you need to ensure you are running on the exact same chipset due to variations in cpu cache sizes and implementations. > On Apr 7, 2021, at 12:27 PM, christoph...@gmail.com > wrote: > > Hello, > > I'm benchm

[go-nuts] Re: gRPC golang server and client testing

2021-04-07 Thread Yijun Liu
Hi, did you know how to do the unit testing of grpc now? On Saturday, April 23, 2016 at 1:31:19 PM UTC-6 Sankar wrote: > Hi > > I have a .proto file which I ran with protoc to generate the _pb.go file. > I then wrote a server and a client program that uses the above _pb.go > program. Now what i

Re: [go-nuts] Trying to port Go to HPE NonStop x86 - Need some guidance

2021-04-07 Thread Ian Lance Taylor
On Wed, Apr 7, 2021 at 4:47 AM Shiva wrote: > > Thanks, Ian. Another step closer. Should the build statement just say: > > +build nsx > > Or should it be subject to any other rule, because I see a lot of different > build statements in each of those directories and they vary. As a general guidel

Re: [go-nuts] Modules... why it has to be so painfull?

2021-04-07 Thread Kevin Chadwick
> > > https://golang.org/ref/mod The how to code docs need improving for packages but once you initialise a module. You can create folders to hold different packages within the root folder containing the .mod file. I'm not sure modules are not a regression compared to gopath in some respects thoug

Re: [go-nuts] Modules... why it has to be so painfull?

2021-04-07 Thread Alex Howarth
Have you tried go mod edit -replace github.com/foo/bar=/path/to/local/bar ? https://golang.org/ref/mod#go-mod-edit On Wed, 7 Apr 2021 at 17:31, Slawomir Pryczek wrote: > > Hey Guys, I'm struggling with the new "modules" approach and after checking several help files it seems it's inconvinient be

Re: [go-nuts] Strange behaviour with loops #45192, #45175

2021-04-07 Thread Ian Lance Taylor
On Wed, Apr 7, 2021 at 1:47 PM sro...@gmail.com wrote: > > Is there a way to analyze a go program and determine whether it is > susceptible to bug https://github.com/golang/go/issues/45175? > While the obvious solution is to upgrade to 1.15.11 or 1.16.3, it would still > be useful to analyze exi

[go-nuts] Modules... why it has to be so painfull?

2021-04-07 Thread Slawomir Pryczek
Hey Guys, I'm struggling with the new "modules" approach and after checking several help files it seems it's inconvinient beyond belief. Basically i have an app: ...src/ /myapp/main.go package main /pool/pool.go package pool And i can't even include package pool into main without manually init

[go-nuts] Strange behaviour with loops #45192, #45175

2021-04-07 Thread sro...@gmail.com
Is there a way to analyze a go program and determine whether it is susceptible to bug https://github.com/golang/go/issues/45175? While the obvious solution is to upgrade to 1.15.11 or 1.16.3, it would still be useful to analyze existing programs, either as a compiled binary or source code. Thank

[go-nuts] Big variations in benchmarking results ?

2021-04-07 Thread christoph...@gmail.com
Hello, I'm benchmarking some code with my mac book air. The code is only computation and writing in a preallocated slice. I see big variations in the ns/op (e.g. 5000 to 8000). I disabled the turbo boost but the variations are still there. To verify I tried the code benchmarking on an Ubuntu

Re: [go-nuts] package is not in GOROOT

2021-04-07 Thread rob
It does help me. Thanks -- rob drrob...@fastmail.com On Wed, Apr 7, 2021, at 10:24 AM, wagner riffel wrote: > On Tue, 6 Apr 2021 19:39:00 -0400 > rob wrote: > > > > This example is on Win10 using go 1.16.3 > > > > Now I've created a directory tree outside of ~/go/src.  I'm using ~ > >

Re: [go-nuts] package is not in GOROOT

2021-04-07 Thread 'wagner riffel' via golang-nuts
On Tue, 6 Apr 2021 19:39:00 -0400 rob wrote: > > This example is on Win10 using go 1.16.3 > > Now I've created a directory tree outside of ~/go/src.  I'm using ~ > to mean %userprofile%, as this is win10 > > ~/gcode/rpng/rpng.go > > ~/gcode/tokenize/tokenize.go > > ~/gcode/hpcalc2/hpcalc2.go

Re: [go-nuts] Trying to port Go to HPE NonStop x86 - Need some guidance

2021-04-07 Thread Shiva
Thanks, Ian. Another step closer. Should the build statement just say: +build nsx Or should it be subject to any other rule, because I see a lot of different build statements in each of those directories and they vary. On Wednesday, March 24, 2021 at 6:44:00 PM UTC Ian Lance Taylor wrote: >

[go-nuts] Re: Calling Go from Python

2021-04-07 Thread Amit Lavon
Thanks! Gopy seemed promising back when I started exploring this topic, but I had some issues getting it to work, especially on Windows. It may have gotten better by now. Anyway I agree it's beneficial to have both approaches available so I am happy to see gopy grow as well. On Wednesday, April