[go-nuts] Re: Go could really use a while statement

2018-05-09 Thread Scott Pakin
On Wednesday, May 9, 2018 at 4:59:35 PM UTC-6, matthe...@gmail.com wrote: > > I’m not sure if C has been directly mentioned. I started with C so > iteration is just a nice shortcut to me. Assuming you’ve always had > collection iteration available an explanation is the for loop can make the > us

Re: [go-nuts] Re: Go could really use a while statement

2018-05-09 Thread Michael Jones
I was serious this time and the first time (years ago now) that this came up. My motivation was not really core to the Go manifesto; in addition to all the good Go usage model things, I also like using it to teach or show algorithms. In this use I wanted to be able to naturally present both: while

[go-nuts] Re: Go could really use a while statement

2018-05-09 Thread matthewjuran
I’m not sure if C has been directly mentioned. I started with C so iteration is just a nice shortcut to me. Assuming you’ve always had collection iteration available an explanation is the for loop can make the useful pattern of indexing into an array up to the length of the array using an index

Re: [go-nuts] Windows 10 desktop packaging

2018-05-09 Thread Gerald Henriksen
On Wed, 9 May 2018 11:12:48 -0700 (PDT), you wrote: >Am going nuts trying to work out how to package a windows installer for >windows10 and sign it. > >Microsoft are turning windows 10 basic version into a locked down system and >so you need to make applications using their new appx format. > >D

[go-nuts] Re: Go could really use a while statement

2018-05-09 Thread Hugh Fisher
On Thursday, May 10, 2018 at 4:20:41 AM UTC+10, Marc wrote: > > I'm still not convinced this topic is not some kind of elaborate joke. > It's certainly diverged from my original post, which is why I'm staying quiet. cheers, Hugh Fisher -- You received this message because you are subscribe

Re: [go-nuts] Busted auth providers

2018-05-09 Thread jwinters
Just filed an issue: https://gitlab.com/gitlab-org/gitlab-ce/issues/46214 On Wednesday, May 9, 2018 at 3:39:49 PM UTC-4, Wim Lewis wrote: > > > On 8. maí 2018, at 8:53 f.h., jwin...@pivotal.io wrote: > > It seems like `https://www.gitlab.com` needs to be added to the list of > busted auth prov

Re: [go-nuts] Cyclic types

2018-05-09 Thread Bakul Shah
I think it is more than a matter of "eager" vs "on-demand" computation. T{} can't be constructed until its size is known. Semantically this is a recursive definition. However, a human may falsely assume that T{} is constructable and given that they may think len(T{}.a) can be computed. If on the

Re: [go-nuts] Busted auth providers

2018-05-09 Thread Wim Lewis
On 8. maí 2018, at 8:53 f.h., jwint...@pivotal.io wrote: > It seems like `https://www.gitlab.com` needs to be added to the list of > busted auth providers in golang/oauth2. At the very least, has this been entered into gitlab's bug tracker? The best outcome would obviously be for gitlab to be f

Re: [go-nuts] Re: Busted auth providers

2018-05-09 Thread jwinters
To be honest, when I look at the names on that list, I really don't see it as much of a warning. The first entry is google. Add that to fact that the spec basically reads "hey we know this use-case exists, we don't recommend it, but acknowledge that some people will have valid reasons to do this

Re: [go-nuts] Cyclic types

2018-05-09 Thread matthewjuran
More accurately: const size = 10 type T struct { a [size]int // many other fields and comments b [size*unsafe.Sizeof(int(0))]int } Matt On Wednesday, May 9, 2018 at 1:56:53 PM UTC-5, matthe...@gmail.com wrote: > > type T struct { > a [10]int > b [len(T{}.a)]int > } > > could

Re: [go-nuts] Cyclic types

2018-05-09 Thread matthewjuran
type T struct { a [10]int b [len(T{}.a)]int } could appear about as maintainably like this: const size = 10 type T struct { a [size]int // many other fields and comments b [size]int } This case doesn’t justify more complexity to me. Matt On Wednesday, May 9, 2018 at 1:00:3

[go-nuts] Re: Go could really use a while statement

2018-05-09 Thread Marc
I'm still not convinced this topic is not some kind of elaborate joke. On Tuesday, May 1, 2018 at 1:11:04 PM UTC+2, Hugh Fisher wrote: > > > Another observation from this novice Go programmer: I'm puzzled why > there's no while statement. > > I know it's possible to use a for, but it doesn't feel

Re: [go-nuts] Re: Busted auth providers

2018-05-09 Thread David Collier-Brown
On 09/05/18 11:30 AM, jwint...@pivotal.io wrote: We're innocent victims (;-)) and need to decide if we're supporting the spec or the customers.  Right now we're supporting the spec. I mean you've already decided to support a specific list of customers who don't adhere to the spec.

[go-nuts] Windows 10 desktop packaging

2018-05-09 Thread Ged Wed
To be clear. My intention is to make a CLI tool and put it on GitHub to make this be easy oeady for everyone It's nuts that this does not exist for all gophers -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and

[go-nuts] Windows 10 desktop packaging

2018-05-09 Thread Ged Wed
Am going nuts trying to work out how to package a windows installer for windows10 and sign it. Microsoft are turning windows 10 basic version into a locked down system and so you need to make applications using their new appx format. Does anyone have ANY tips on doing this ? My app is a webvi

Re: [go-nuts] Cyclic types

2018-05-09 Thread 'Robert Griesemer' via golang-nuts
PS: Here's an example where we (humans) can obviously compute the size of a type, yet neither cmd/compile, gccgo, nor go/types have any success in doing so: type T struct { a [10]int b [len(T{}.a)]int } The problem is that all implementations have an "eager" (depth-first) approach somewhere leadi

[go-nuts] Re: Divide up CIDR block into smaller subnets

2018-05-09 Thread aroman
Oh no, nevermind: https://github.com/EvilSuperstars/go-cidrman/blob/master/subnet.go :-( On Wednesday, May 9, 2018 at 10:37:54 AM UTC-6, Augusto Roman wrote: > > https://godoc.org/github.com/ewbankkit/go-cidrman#Subnets > > On Wednesday, May 9, 2018 at 6:48:46 AM UTC-6, Anik Mazumder wrote: >>

Re: [go-nuts] Cyclic types

2018-05-09 Thread Robert Griesemer
This sounds all good. I am not disputing at all what you are saying, but a) the spec doesn't actually state any of this explicitly; and b) I agree that size computation is straight-forward once a type data structure is all constructed. The caveat is the 2nd part of this sentence: We're not doing a

[go-nuts] Re: Divide up CIDR block into smaller subnets

2018-05-09 Thread aroman
https://godoc.org/github.com/ewbankkit/go-cidrman#Subnets On Wednesday, May 9, 2018 at 6:48:46 AM UTC-6, Anik Mazumder wrote: > > I would like to divide up a CIDR block into smaller subnets. > > For example if the CIDR block is 10.0.0.0/4, then I would like to spilt > is up into multiple /8s. >

Re: [go-nuts] Re: Busted auth providers

2018-05-09 Thread jwinters
> We're innocent victims (;-)) and need to decide if we're supporting the > spec or the customers. Right now we're supporting the spec. > I mean you've already decided to support a specific list of customers who don't adhere to the spec. So you're kind of already supporting both. Why not ju

[go-nuts] Re: Busted auth providers

2018-05-09 Thread jwinters
The other thing worth noting is that gitlab can be self-hosted. So I'm not sure how it can even work under the current setup when the domain isn't static. On Wednesday, May 9, 2018 at 10:17:40 AM UTC-4, Joshua Winters wrote: > > Is there an expectation that all of these providers would/should

Re: [go-nuts] Re: Busted auth providers

2018-05-09 Thread David Collier-Brown
That's really a question for the oauth principals: if they say "don't do that" and the customers don't listen, they have a problem to either fix or add to the spec as supported. We're innocent victims (;-)) and need to decide if we're supporting the spec or the customers.  Right now we're supp

[go-nuts] Re: Busted auth providers

2018-05-09 Thread jwinters
Is there an expectation that all of these providers would/should change their implementation? It seems like there are enough reputable implementations that maybe the "broken" case should be better supported, even if the spec discourages it. I known there's been a long discussion about this alre

Re: [go-nuts] Is GC affected by array size, and if so, when and how?

2018-05-09 Thread Ian Lance Taylor
On Tue, May 8, 2018 at 12:51 PM, wrote: > > On Tuesday, May 1, 2018 at 10:15:08 PM UTC+2, Ian Lance Taylor wrote: >> >> On Tue, May 1, 2018 at 1:00 PM, wrote: >> > >> > I looked at the source but can't understand it well enough. >> > >> > If I allocate a [1000]byte, or a []byte, I understand th

Re: [go-nuts] Is GC affected by array size, and if so, when and how?

2018-05-09 Thread klobyg
On Tuesday, May 1, 2018 at 10:15:08 PM UTC+2, Ian Lance Taylor wrote: > > On Tue, May 1, 2018 at 1:00 PM, > wrote: > > > > I looked at the source but can't understand it well enough. > > > > If I allocate a [1000]byte, or a []byte, I understand the GC will need > to > > mark the slice/arra

[go-nuts] Divide up CIDR block into smaller subnets

2018-05-09 Thread Anik Mazumder
I would like to divide up a CIDR block into smaller subnets. For example if the CIDR block is 10.0.0.0/4, then I would like to spilt is up into multiple /8s. This needs to be similar to subnet method of netaddr module in Python -- You received this message because you are subscribed to the Go

[go-nuts] Re: Busted auth providers

2018-05-09 Thread David Collier-Brown
On Tuesday, May 8, 2018 at 12:22:39 PM UTC-4, Joshua Winters wrote: > > It seems like `https://www.gitlab.com` needs to be added to the list of > busted auth providers in golang/oauth2. > > Instead of maintaining a list of these providers, can we just send the > `client_id` and `client_secret`

[go-nuts] Re: How to know if interface{} data is nil w/o reflecting?

2018-05-09 Thread Louki Sumirniy
Can you not convert it to an unsafe.Pointer and check for that being nil? On Tuesday, 8 May 2018 16:49:23 UTC+3, Michael Cohen wrote: > > In my case, being a new go learner the following bit of code stumped me. I > am receiving a interface{} value and I am trying to figure out the best way > to

[go-nuts] Cyclic types

2018-05-09 Thread Jan Mercl
Robert Griesemer wrote in https://github.com/golang/go/issues/25305#issuecomment-387624488 at May 9th: I'm probably using incorrect assumptions. Let me summarize them here: 1) A type is cyclical iff its size is not computable. I'm really not sure if this is what the specification really means.