Re: [go-nuts] Security issue in

2021-05-07 Thread Lars Seipel
On Fri, May 07, 2021 at 12:05:22AM -0700, christoph...@gmail.com wrote: The issue for the security problem is here: https://github.com/satori/go.uuid/issues/73 There is a CVE identifier for this security problem: https://github

Re: [go-nuts] x/tools error while trying to install

2021-05-07 Thread 'wagner riffel' via golang-nuts
On Fri May 7, 2021 at 11:10 AM -03, Eric Garcia wrote: > Was trying to install all the tools, and hit the following errors. > > go version 1.16.3 > > ``` > go get -u golang.org/x/tools/... > I think with go1.16 and later the correct way of installing programs is with go install, it builds clean fo

Re: [go-nuts] Still "missing" priority or ordered select in go?

2021-05-07 Thread Øyvind Teig
fredag 7. mai 2021 kl. 21:10:39 UTC+2 skrev axel.wa...@googlemail.com: > On Fri, May 7, 2021 at 8:49 PM Øyvind Teig wrote: > >> I don't know if one would use a pri select to pick up channels from the >> same task. Here's a mod that seems to behave wildly differently when the >> channels are s

Re: [go-nuts] Still "missing" priority or ordered select in go?

2021-05-07 Thread Øyvind Teig
fredag 7. mai 2021 kl. 04:10:42 UTC+2 skrev Ian Lance Taylor: > On Thu, May 6, 2021 at 6:40 AM 'Axel Wagner' via golang-nuts > wrote: > > > > FWIW after all this discussion I *am* curious about a more detailed > argument for why we can't have a priority select that guarantees that if > the

Re: [go-nuts] Still "missing" priority or ordered select in go?

2021-05-07 Thread 'Axel Wagner' via golang-nuts
On Fri, May 7, 2021 at 8:49 PM Øyvind Teig wrote: > I don't know if one would use a pri select to pick up channels from the > same task. Here's a mod that seems to behave wildly differently when the > channels are signalled from one task each and those two tasks are swapped > in order. How may th

Re: [go-nuts] Still "missing" priority or ordered select in go?

2021-05-07 Thread Øyvind Teig
torsdag 6. mai 2021 kl. 22:15:14 UTC+2 skrev axel.wa...@googlemail.com: > To clarify again: As a litmus test, a `select` construct like the one I'm > talking about would mean that this code blocks forever: > https://play.golang.org/p/LcWgDcX5ojl > With the current `select`, it doesn't. With a d

Re: [go-nuts] How do number literals work in go

2021-05-07 Thread iammadab
Thanks, going through the article now. Already making sense. On Friday, 7 May 2021 at 19:19:19 UTC+1 axel.wa...@googlemail.com wrote: > Number literals are untyped constants > in Go. They are represented as > arbitrary precision integers. > When you use an

Re: [go-nuts] Still "missing" priority or ordered select in go?

2021-05-07 Thread Øyvind Teig
torsdag 6. mai 2021 kl. 22:08:31 UTC+2 skrev Peter Wilson: > Back in the days of transputers and occam, there was a desire to be able > to manage all interesting events in a system in a within-language (language > being occam) manner. > Interrupts were a problem, because you can't describe inte

Re: [go-nuts] How do number literals work in go

2021-05-07 Thread 'Axel Wagner' via golang-nuts
Number literals are untyped constants in Go. They are represented as arbitrary precision integers. When you use an untyped constant in an expression (for example as part of a return statement), it gets assigned a type - either the type that the expression mus

[go-nuts] mime/multipart.Writer: Support closing a Part immediately

2021-05-07 Thread 'Ohad Lutzky' via golang-nuts
Hi all, I'm looking at multipart/x-mixed-replace-based image streaming (mjpeg-style, but with PNG in my case), and would like to allow code to push a new image immediately. This look roughly like this (error handling elided for brevity): m := multipart.NewWriter() defer m.Close() w.Header().Set

[go-nuts] x/tools error while trying to install

2021-05-07 Thread Eric Garcia
Was trying to install all the tools, and hit the following errors. go version 1.16.3 ``` go get -u golang.org/x/tools/... # golang.org/x/tools/gopls/internal/hooks ../../golang.org/x/tools/gopls/internal/hooks/analysis.go:31:5: cannot use simple.Analyzers (type map[string]*lint.Analyzer) as type

[go-nuts] How do number literals work in go

2021-05-07 Thread iammadab
I solved a problem on exercism that involved bit shifting. There is a chess board with 64 squares, a grain of wheat is placed on the first square, for the second square you double the number of grains from the first (1 +1) = 2. For the third you double the previous (2 + 2) = 4. Continue this un

[go-nuts] [generics] Embedding interfaces

2021-05-07 Thread Viet Nguyen
Hi, I'm trying to convert this code to use generics: type Cache interface { GetIfPresent(interface{}) (interface{}, bool) } type LoadingCache interface { Cache Get(interface{}) (interface{}, error) } However, I couldn't find any way to include Cache[K, V] in LoadingCache[K, V]. (No similar use

[go-nuts] problem with starting to use pug/jade

2021-05-07 Thread Денис Мухортов
I started using the library https://github.com/Joker/jade, never used go generate before. And now when trying to create hello.jade, I get the output ' "jade": exec: "jade": executable file not found in %PATH%'. Does this mean that I need to specify pug in the global variables, or do I need to do

Re: [go-nuts] I want to help with polish version of "A Tour of Go", how to start?

2021-05-07 Thread Kamil Ziemian
Thank you Alberto for help. Me and Michał Stokluska are already in contact and we will try to polished ;) polish version of „A Tour of Go”. Kamil pt., 7 maj 2021 o 11:18 Alberto Donizetti napisał(a): > The link to the polish translation was added by a person names Michal > Stokluska. > The repo

Re: [go-nuts] Still "missing" priority or ordered select in go?

2021-05-07 Thread Øyvind Teig
torsdag 6. mai 2021 kl. 21:41:11 UTC+2 skrev ren...@ix.netcom.com: > But that is not really true because there are no constraints on if the > source channels are buffered - if they are then my code operates similarly. > > Even if using unbuffered channels there is buffering being done at a lower

Re: [go-nuts] Still "missing" priority or ordered select in go?

2021-05-07 Thread Øyvind Teig
torsdag 6. mai 2021 kl. 20:30:59 UTC+2 skrev axel.wa...@googlemail.com: > On Thu, May 6, 2021 at 8:22 PM Robert Engels wrote: > >> “If lo” means that if the lo channel was read. >> > > Exactly. To fulfill the requirements and answering the question, it must > not be read. > > This code will pre

Re: [go-nuts] Still "missing" priority or ordered select in go?

2021-05-07 Thread Øyvind Teig
torsdag 6. mai 2021 kl. 16:44:08 UTC+2 skrev rog: > On Thu, 6 May 2021 at 14:41, 'Axel Wagner' via golang-nuts < > golan...@googlegroups.com> wrote: > >> PS: And I'm not saying there is no argument. Maybe "select is not atomic" >> is such an argument. But if there is an argument and/or if this

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

2021-05-07 Thread the.n...@gmail.com
This is about as far as I got on the last attempt. Hopefully we can figure out how to generate code that will start to run on NonStop at some point soon. -Randall On Thursday, May 6, 2021 at 10:35:27 p.m. UTC-4 Ian Lance Taylor wrote: > On Thu, May 6, 2021 at 6:16 AM Shiva wrote: > > > > Thank

Re: [go-nuts] problems using external modules with go 1.16.4

2021-05-07 Thread natxo....@gmail.com
On Friday, May 7, 2021 at 3:34:14 PM UTC+2 Jan Mercl wrote: > On Fri, May 7, 2021 at 3:21 PM natxo@gmail.com > wrote: > > > I do not want to write a module, I just want to use a module. So how do > I do this? I am reading all the tutorials listed on the go help modules > output, but at

[go-nuts] Re: problems using external modules with go 1.16.4

2021-05-07 Thread Alex
Was writing my reply then Jan beat me lol, anyway he didn't linked the tutorial soo... https://golang.org/doc/tutorial/getting-started On Friday, 7 May 2021 at 9:21:29 pm UTC+8 natxo@gmail.com wrote: > hi, > > I am struggling with the new go version. > > I have a simple script that imports a

Re: [go-nuts] problems using external modules with go 1.16.4

2021-05-07 Thread Jan Mercl
On Fri, May 7, 2021 at 3:21 PM natxo@gmail.com wrote: > I do not want to write a module, I just want to use a module. So how do I do > this? I am reading all the tutorials listed on the go help modules output, > but at this point I do not need to write a module. I don't know what "write a

[go-nuts] Re: Security issue in

2021-05-07 Thread peterGo
Manlio, FYI: Know, Prevent, Fix: A framework for shifting the discussion around vulnerabilities in open source Rob Pike, Eric Brewer, Abhishek Arya, Anne Bertucio and Kim Lewandowski https://security.googleblog.com/2021/02/know-prevent-fix-framework-for-shifting.html Surviving software depende

[go-nuts] problems using external modules with go 1.16.4

2021-05-07 Thread natxo....@gmail.com
hi, I am struggling with the new go version. I have a simple script that imports a github module, and before (don't know which go version) I could just run: go get github/user/module and then in my crappy script I could package main import github.com/user/module func main() { p := module

Re: [go-nuts] I want to help with polish version of "A Tour of Go", how to start?

2021-05-07 Thread Alberto Donizetti
The link to the polish translation was added by a person names Michal Stokluska. The repository should be this one: https://github.com/MStokluska/go-tour-pl To contribute to the polish translation, you send Pull Requests there. Alberto On Tuesday, 4 May 2021 at 23:51:10 UTC+2 kziem...@gmail.com

[go-nuts] Re: Security issue in

2021-05-07 Thread Manlio Perillo
I think the problem here is not only the lack of a vulnerability database for go, but the fact that a lot of people use a module where only one person (the owner) has access to the repository. Maybe it is time for a new site like gopkg.in, where each module has one or more maintainer and there

Re: [go-nuts] Still "missing" priority or ordered select in go?

2021-05-07 Thread Øyvind Teig
torsdag 6. mai 2021 kl. 16:44:08 UTC+2 skrev rog: > On Thu, 6 May 2021 at 14:41, 'Axel Wagner' via golang-nuts < > golan...@googlegroups.com> wrote: > >> PS: And I'm not saying there is no argument. Maybe "select is not atomic" >> is such an argument. But if there is an argument and/or if this i

Re: [go-nuts] Still "missing" priority or ordered select in go?

2021-05-07 Thread Øyvind Teig
torsdag 6. mai 2021 kl. 16:18:18 UTC+2 skrev axel.wa...@googlemail.com: > On Thu, May 6, 2021 at 4:06 PM Øyvind Teig wrote: > >> If that confirmation really is a confirmation, then the "Mercl code" is >> still not a pri select that matches the pri select I was querying about. >> > > I don't beli

Re: [go-nuts] Security issue in

2021-05-07 Thread 'Axel Wagner' via golang-nuts
There is a draft design for a vulnerability database which could be used for this. For now, it's still a draft. But people are working on it. On Fri, May 7, 2021 at 9:05 AM christoph...@gmail.com < christophe.mees...@gmail.com

[go-nuts] Security issue in

2021-05-07 Thread christoph...@gmail.com
I just became aware of a security problem in the package https://github.com/satori/go.uuid through this reddit thread : https://www.reddit.com/r/golang/comments/n6bnsh/cve20213538_issued_for_latest_release_of/?utm_source=share&utm_medium=ios_app&utm_name=iossmf The is