Re: [go-nuts] Re: Lot's of test errors in package zmq4 with Go version 1.14, no errors with earlier versions

2020-02-26 Thread Michael Jones
Ian, I guess not. I’d not thought of that indirectness. I withdraw my musings. On Wed, Feb 26, 2020 at 8:36 PM Robert Engels wrote: > The problem is that Go designers are taking the position that any sys call > should be able to be interrupted. This is invalid. For the vast majority or > “unix”

Re: [go-nuts] Re: Lot's of test errors in package zmq4 with Go version 1.14, no errors with earlier versions

2020-02-26 Thread Robert Engels
The problem is that Go designers are taking the position that any sys call should be able to be interrupted. This is invalid. For the vast majority or “unix” os an interrupt is a very rare condition and so they treat it as an error. If you issue interrupts continually you are creating an

Re: [go-nuts] Re: Lot's of test errors in package zmq4 with Go version 1.14, no errors with earlier versions

2020-02-26 Thread Ian Lance Taylor
On Wed, Feb 26, 2020 at 5:51 PM Michael Jones wrote: > > Sorry...I meant the go system signal interface could loop if desired. (Not > recommending, just saying that panicky people could be coddled if desired) Ah, I see. Except, no, I don't. Could we really do that? Even if the signal arrived

Re: [go-nuts] Re: Lot's of test errors in package zmq4 with Go version 1.14, no errors with earlier versions

2020-02-26 Thread Michael Jones
Sorry...I meant the go system signal interface could loop if desired. (Not recommending, just saying that panicky people could be coddled if desired) On Wed, Feb 26, 2020 at 5:48 PM Ian Lance Taylor wrote: > On Wed, Feb 26, 2020 at 5:42 PM Michael Jones > wrote: > > > > There is the BSD notion

Re: [go-nuts] Re: Lot's of test errors in package zmq4 with Go version 1.14, no errors with earlier versions

2020-02-26 Thread Ian Lance Taylor
On Wed, Feb 26, 2020 at 5:42 PM Michael Jones wrote: > > There is the BSD notion of sa_restart, a convenience to loop for the caller > as appropriate. > > https://www.freebsd.org/cgi/man.cgi?query=sigaction > > Go could adopt such a notion if desired. We already do. We install all signal

Re: [go-nuts] Re: Lot's of test errors in package zmq4 with Go version 1.14, no errors with earlier versions

2020-02-26 Thread Michael Jones
There is the BSD notion of sa_restart, a convenience to loop for the caller as appropriate. https://www.freebsd.org/cgi/man.cgi?query=sigaction Go could adopt such a notion if desired. On Wed, Feb 26, 2020 at 5:14 PM Ian Lance Taylor wrote: > On Wed, Feb 26, 2020 at 9:11 AM Manlio Perillo >

Re: [go-nuts] Re: Lot's of test errors in package zmq4 with Go version 1.14, no errors with earlier versions

2020-02-26 Thread Ian Lance Taylor
On Wed, Feb 26, 2020 at 9:11 AM Manlio Perillo wrote: > > On Wednesday, February 26, 2020 at 4:14:38 PM UTC+1, Ian Lance Taylor wrote: >> >> On Wed, Feb 26, 2020 at 7:11 AM Manlio Perillo wrote: >> > >> > On Wednesday, February 26, 2020 at 3:51:54 PM UTC+1, Peter Kleiweg wrote: >> >> >> >> Op

[go-nuts] Re: Experience report on a large Python-to-Go translation

2020-02-26 Thread Doug Clark
Thanks for the follow up Eric. Your experience with the concurrency primitives lines up with my experience porting projects from various languages into Go. The ability to maintain exceptionally low cognitive overhead when adding concurrency is pretty amazing. On an unrelated note, if in the

Re: [go-nuts] godoc-static - Generate static documentation for your packages

2020-02-26 Thread tslocum
I've had some time to polish this project somewhat. It should be fairly usable. I've added ZIP archive generation to allow browsing offline without godoc. Any additional feedback is welcome. On Monday, February 10, 2020 at 8:22:51 AM UTC-8, Trevor Slocum wrote: > > Hey Nick, I did consider

Re: [go-nuts] Re: Lot's of test errors in package zmq4 with Go version 1.14, no errors with earlier versions

2020-02-26 Thread pboampong5
How should I handle EINTR from syscall.Dup2 (Linux)? - The effect of SA_RESTART on dup2(2) is undocumented. - If dup2 returns EINTR, can I be sure that nothing has been done? (Otherwise retrying is racy.) - libuv uv__dup2_cloexec [1] never retries the syscall but treats EINTR as a failure. -

[go-nuts] RegexWriter - not sure if there's something equivalent out there

2020-02-26 Thread tim . dufrane
Hi all, Needed a writer that would let me take actions based on input but didn't want much fuss, wrote a thing: https://github.com/timdufrane/regexwriter/. I'm no good at this "Github" stuff or this "good code" stuff but this did the trick for my use case and maybe it can help someone else.

[go-nuts] Re: Modules and cross-compilation

2020-02-26 Thread Manlio Perillo
On Wednesday, February 26, 2020 at 8:53:52 PM UTC+1, geoff.j...@gmail.com wrote: > > Hello. > > > > [...] > > > > So: > >1. > >I don’t understand why go build foo.com/foobar fails to find the >module if it doesn’t contain some top-level .go file, but go list -m >finds it

[go-nuts] Re: Modules and cross-compilation

2020-02-26 Thread Volker Dobler
On Wednesday, 26 February 2020 20:53:52 UTC+1, geoff.j...@gmail.com wrote: > > This baffles me: > > > $ go build foo.com/foobar > can't load package: package foo.com/foobar: cannot find module providing > package foo.com/foobar > > You simply cannot build a module. Only packages can be built. and

Re: [go-nuts] Cross compiling with CGO without having a C compiler for each target platform

2020-02-26 Thread Ian Lance Taylor
On Wed, Feb 26, 2020 at 7:07 AM Jan Flyborg wrote: > > We are building a system that targets many different combinations of OS's and > architectures. > > Up until now we have been able to keep the whole code base and external > packages in pure Go (no CGO), which means that the cross compiler

Re: [go-nuts] Cross compiling with CGO without having a C compiler for each target platform

2020-02-26 Thread Sebastien Binet
On Wed, Feb 26, 2020 at 6:34 PM Robert Engels wrote: > Depending on your use of SQLite there are a few pure Go libraries that > might simplify things. > such as: - https://github.com/go-sqlite/sqlite3 (incomplete) - https://github.com/alicebob/sqlittle (much more complete) (I am the original

[go-nuts] Modules and cross-compilation

2020-02-26 Thread geoff . johnstone
Hello. I’m getting rather confused by Go modules and cross-compilation. I think that I have fundamentally misunderstood some module-related concept in the way that I’ve structured my project. Scenario: My project consists of some individual executables that share some common code. The

[go-nuts] Re: SIGILL running 1.14 on macOS

2020-02-26 Thread James Pettyjohn
Looks like this was already resolved for 1.14.1 . On Wednesday, February 26, 2020 at 11:00:24 AM UTC-8, James Pettyjohn wrote: > > A little further digging shows that VZEROUPPER is part of the AVX > instruction set, not supported on any Apple computers

[go-nuts] Re: SIGILL running 1.14 on macOS

2020-02-26 Thread James Pettyjohn
A little further digging shows that VZEROUPPER is part of the AVX instruction set, not supported on any Apple computers prior to 2011 from what I can tell. Given the rc1 code worked fine, that could be an alternative for Darwin where the CPU does not support AVX. While not ideal, I'd argue

[go-nuts] SIGILL running 1.14 on macOS

2020-02-26 Thread James Pettyjohn
I am trying to run go1.14 on macOS 10.13.2 with on a late 2009 iMac with an i7 but always get the same crash: SIGILL: illegal instruction PC=0x1066040 m=0 sigcode=1 goroutine 1 [running, locked to thread]: runtime.asyncPreempt() /usr/local/go/src/runtime/preempt_amd64.s:8

[go-nuts] Re: Go 1.14 is released

2020-02-26 Thread HaWe
> Both pages were moved to the x/website repository so they could be kept up to date outside the 6-month release cycle. Thank you, this helps. (I'm using git diff and I'm trying to keep a bunch of german translations

Re: [go-nuts] Re: Lot's of test errors in package zmq4 with Go version 1.14, no errors with earlier versions

2020-02-26 Thread Robert Engels
It is especially difficult when the driver has complex timing and/or hardware flags. Interrupting these calls usually lead to unretriable failures. > On Feb 26, 2020, at 11:41 AM, Peter Kleiweg wrote: > >  > That leaves the problem that often, the program just waits forever in C code, > not

Re: [go-nuts] Re: Lot's of test errors in package zmq4 with Go version 1.14, no errors with earlier versions

2020-02-26 Thread Peter Kleiweg
That leaves the problem that often, the program just waits forever in C code, not returning an interrupted system call. Op woensdag 26 februari 2020 16:14:38 UTC+1 schreef Ian Lance Taylor: > > On Wed, Feb 26, 2020 at 7:11 AM Manlio Perillo > wrote: > > > > On Wednesday, February 26, 2020 at

Re: [go-nuts] Cross compiling with CGO without having a C compiler for each target platform

2020-02-26 Thread Robert Engels
Depending on your use of SQLite there are a few pure Go libraries that might simplify things. > On Feb 26, 2020, at 9:11 AM, Jan Flyborg wrote: > >  > We are building a system that targets many different combinations of OS's and > architectures. > > Up until now we have been able to keep

Re: [go-nuts] Re: Lot's of test errors in package zmq4 with Go version 1.14, no errors with earlier versions

2020-02-26 Thread Amnon Baron Cohen
from https://www.jwz.org/doc/worse-is-better.html Two famous people, one from MIT and another from Berkeley (but working on Unix) once met to discuss operating system issues. The person from MIT was knowledgeable about ITS (the MIT AI Lab operating system) and had been reading the Unix

[go-nuts] Re: Fuchsia Programming Language Policy

2020-02-26 Thread David Skinner
I quite understand their critic. - GC sometimes causes me problems that result in me writing part of my code in C++ or ASM. But over the last 10 years the GC seems to be mostly improving and that is rarely a problem for me. - I used to write engineering, accounting, and legal apps

Re: [go-nuts] Re: Lot's of test errors in package zmq4 with Go version 1.14, no errors with earlier versions

2020-02-26 Thread Manlio Perillo
On Wednesday, February 26, 2020 at 4:14:38 PM UTC+1, Ian Lance Taylor wrote: > > On Wed, Feb 26, 2020 at 7:11 AM Manlio Perillo > wrote: > > > > On Wednesday, February 26, 2020 at 3:51:54 PM UTC+1, Peter Kleiweg > wrote: > >> > >> Op woensdag 26 februari 2020 13:05:40 UTC+1 schreef Manlio

Re: [go-nuts] Re: Go 1.14 is released

2020-02-26 Thread 'Jay Conrod' via golang-nuts
Both pages were moved to the x/website repository so they could be kept up to date outside the 6-month release cycle. On Wed, Feb 26, 2020 at 7:33 AM HaWe wrote: > Firts of all, many thanks for a great new release. >

Re: [go-nuts] Re: Lot's of test errors in package zmq4 with Go version 1.14, no errors with earlier versions

2020-02-26 Thread Ian Lance Taylor
On Wed, Feb 26, 2020 at 7:11 AM Manlio Perillo wrote: > > On Wednesday, February 26, 2020 at 3:51:54 PM UTC+1, Peter Kleiweg wrote: >> >> Op woensdag 26 februari 2020 13:05:40 UTC+1 schreef Manlio Perillo: >>> >>> On Wednesday, February 26, 2020 at 12:33:05 PM UTC+1, Peter Kleiweg wrote:

[go-nuts] Re: Lot's of test errors in package zmq4 with Go version 1.14, no errors with earlier versions

2020-02-26 Thread Manlio Perillo
On Wednesday, February 26, 2020 at 3:51:54 PM UTC+1, Peter Kleiweg wrote: > > Op woensdag 26 februari 2020 13:05:40 UTC+1 schreef Manlio Perillo: >> >> On Wednesday, February 26, 2020 at 12:33:05 PM UTC+1, Peter Kleiweg wrote: >>> >>> With Go version 1.14 I get a lot of errors when I run: >>> >>>

Re: [go-nuts] Re: Lot's of test errors in package zmq4 with Go version 1.14, no errors with earlier versions

2020-02-26 Thread Gregor Best
This looks like fallout of the 1.14 changes that made Goroutines preemptively schedulable. It seems likely that this code hasn't worked before either, just that the failure cases were masked because less signals got delivered (and thus had less chance of interrupting system calls). On

[go-nuts] Cross compiling with CGO without having a C compiler for each target platform

2020-02-26 Thread Jan Flyborg
We are building a system that targets many different combinations of OS's and architectures. Up until now we have been able to keep the whole code base and external packages in pure Go (no CGO), which means that the cross compiler functionality of GC has been sufficient for us. However,

[go-nuts] Re: Lot's of test errors in package zmq4 with Go version 1.14, no errors with earlier versions

2020-02-26 Thread Peter Kleiweg
Op woensdag 26 februari 2020 13:05:40 UTC+1 schreef Manlio Perillo: > > On Wednesday, February 26, 2020 at 12:33:05 PM UTC+1, Peter Kleiweg wrote: >> >> With Go version 1.14 I get a lot of errors when I run: >> >> go test -v github.com/pebbe/zmq4 >> >> I didn't see this with Go 1.13.8 or any

[go-nuts] Re: Why isn't there strings.reverse("str") function?

2020-02-26 Thread ffm2002
Maybe the implementation in Java is something you could steal to save time. Have a look into class StringBuilder where there is a reverse() method. It does the reversion differently depending on whether dealing with UTF16 or not. Am Samstag, 15. Februar 2020 17:37:15 UTC+1 schrieb Amarjeet

Re: [go-nuts] Understind how to apply timeout using gouritine

2020-02-26 Thread Brian Candler
Perhaps slightly clearer: https://play.golang.org/p/DDZxqaEFi-T -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To

Re: [go-nuts] Understind how to apply timeout using gouritine

2020-02-26 Thread Brian Candler
> > My previous questions were: How can I cancel execution of goToSleep() > function? How can I break it? > > Maybe you want something like this? https://play.golang.org/p/2dKbVMxBjaJ context is the standard way to be able to cancel one or more of goroutines,

[go-nuts] Re: Go 1.14 is released

2020-02-26 Thread HaWe
Firts of all, many thanks for a great new release. Now my question: The (new) document "How to Write Go Code" is available at golang.org/doc/code.html, the older version, now named "How to Write Go Code (with GOPATH)" at golang.org/doc/gopath_code.html. But they seem to be no longer part of the

Re: [go-nuts] Understind how to apply timeout using gouritine

2020-02-26 Thread Jake Montgomery
The code you posted above never actually called goToSleep(), because the 'strings ' channel was nil. Could you post a playground link to the new code that you are running below? On Tuesday, February 25, 2020 at 8:38:27 PM UTC-5, Juan Mamani wrote: > > Ok, you are right. But I was confused

[go-nuts] Re: Lot's of test errors in package zmq4 with Go version 1.14, no errors with earlier versions

2020-02-26 Thread Manlio Perillo
On Wednesday, February 26, 2020 at 12:33:05 PM UTC+1, Peter Kleiweg wrote: > > With Go version 1.14 I get a lot of errors when I run: > > go test -v github.com/pebbe/zmq4 > > I didn't see this with Go 1.13.8 or any earlier version. > > Is this a problem with Go 1.14, or am I doing something

[go-nuts] Re: Lot's of test errors in package zmq4 with Go version 1.14, no errors with earlier versions

2020-02-26 Thread Peter Kleiweg
This is with go version go1.14 linux/amd64 Op woensdag 26 februari 2020 12:33:05 UTC+1 schreef Peter Kleiweg: > > With Go version 1.14 I get a lot of errors when I run: > > go test -v github.com/pebbe/zmq4 > > I didn't see this with Go 1.13.8 or any earlier version. > > Is this a problem

[go-nuts] Lot's of test errors in package zmq4 with Go version 1.14, no errors with earlier versions

2020-02-26 Thread Peter Kleiweg
With Go version 1.14 I get a lot of errors when I run: go test -v github.com/pebbe/zmq4 I didn't see this with Go 1.13.8 or any earlier version. Is this a problem with Go 1.14, or am I doing something wrong and just got lucky until now? How do I debug this? The errors are different for

Re: [go-nuts] Re: [ANN] Renderview v0.1.0 with go mod, Gio, and Fyne support

2020-02-26 Thread Elias Naur
On Tue Feb 25, 2020 at 3:21 PM, wrote: > I worked it out, will update the programs later. It was not that the > events > were missing - once I enabled the good old Printf debugger, I saw that > the > events are flowing fine. The issue is that on Linux, every Move Mouse > event > reflected what