Re: [go-nuts] [generics] () instead of (type T)

2020-06-20 Thread David Anderson
It's covered in the generics design doc, and by about a dozen threads on golang-nuts at this point. Unless the parsing issues can be addressed satisfactorily, that option is off the table right now. Same for [T] and other variations. - Dave On Sat, Jun 20, 2020 at 10:34 AM wrote: > Hi, > > The

Re: [go-nuts] Generics: More on parens

2020-06-18 Thread David Anderson
Here's one reason to not do that (screenshot from gmail, in a chrome with a ton of unicode-ready fonts, displaying your email) : [image: lol.png] Also already addressed at https://go.googlesource.com/proposal/+/refs/heads/master/design/go2draft-type-parameters.md#why-not-use . - Dave On Thu,

Re: [go-nuts] [generics] is generics with constrain needed ?

2020-06-17 Thread David Anderson
The non-generic form _only_ accepts an argument of type []Stringer. If you have a []Foo, where Foo implements Stringer, that's not good enough. You will have to construct a []Stringer explicitly, and copy each Foo into that []Stringer. This is a fairly common gotcha with Go, where folks expect the

Re: [go-nuts] Re: Using FIPS-compliant boring Go to connect to microsoft.com(specifically)

2020-05-04 Thread David Anderson
The next step then is to file a bug on Github to discuss this. That way you'll get an authoritative answer from boringcrypto's devs, one way or the other (authoritative in the sense of "yes we will take such a patch/no we won't take such a patch", not authoritative in the sense of "yes this is

Re: [go-nuts] Using FIPS-compliant boring Go to connect to microsoft.com(specifically)

2020-04-30 Thread David Anderson
(Disclaimer: not a FIPS compliance expert, you should hire your own experts to get authoritative answers) FIPS 140-2 seems to reference FIPS 186-4 for specific algorithm choices. FIPS 186-4 specifies that the RSA modulus shall be 1024, 2048, or 3072 bits. So, as-written, it seems like 4096-bit

Re: [go-nuts] [ANN] VictoriaMetrics - fast open source time series database written in Go

2019-06-23 Thread David Anderson
Looks very nice, I look forward to checking it out. I'm curious: why do you maintain separate trees for the single node vs. cluster version? Naively I would have assumed that single node == cluster codebase with a few features turned off at runtime, and there seems to be a lot of overlap between

Re: [go-nuts] https://godoc.org/github.com/couchbase/moss

2019-06-12 Thread David Anderson
collection is an unexported type. Godoc doesn't show unexported types by default, so none of the methods of collection will appear. On Wed, Jun 12, 2019 at 2:25 PM Gert wrote: > Is it just me or is stuff missing in godoc like for example > > // NewBatch returns a new Batch instance with hinted

Re: [go-nuts] performance optimization

2019-01-14 Thread David Anderson
Note that even for a state of the art CPU, there's only a few thousand instructions in a microsecond (1000 cycles per microsecond per GHz). At that kind of performance, anything you do that involves the OS or context-switching will make it impossible to hit your target refresh rate. The closest

Re: [go-nuts] Failed iterator proposals?

2018-10-21 Thread David Anderson
The pattern you describe is used in several stdlib packages (notably bufio.Scanner, which leads to a loop that looks like `for scanner.Scan() { doStuff(scanner.Text()) }`. The only variation from your example is that in the stdlib, `iterator.Continue()` both tests for the end condition and

Re: [go-nuts] A thought on contracts

2018-09-06 Thread David Anderson
On Thu, Sep 6, 2018 at 3:16 PM Thomas Wilde wrote: > Thanks for the response. I think the question then becomes: if the syntax > in contract bodies was an unrestricted Go block, then why do I need to > repeat my function's operations in a contract? > > If the syntax of contract bodies is free,

Re: [go-nuts] Go license and fitness for purpose

2018-05-13 Thread David Anderson
I would point out that a complete disclaimer of liability is fairly common even in commercial relationships. Just now I downloaded my motherboard's manual, and had to click through a liability and fitness-for-purpose disclaimer. So, even someone selling you a $300 enterprise motherboard doesn't

Re: [go-nuts] Re: Would this race condition be considered a bug?

2018-03-18 Thread David Anderson
There's a difference though. The program that uses sync/atomic will behave non-deterministically, but within a small set of possible outcomes. The one without could do anything. In addition to producing an incorrect numeric result, it could deadlock, segfault, jump execution to some random place

Re: [go-nuts] Re: Go += Package Versioning

2018-02-23 Thread David Anderson
On Fri, Feb 23, 2018 at 3:34 PM, Richard Wilkes wrote: > Overall, I really like the direction vgo is headed. > > One thing that seems to be difficult, if not impossible to do (I've yet to > figure out how to do so, anyway) is to work with code that has yet to be >

Re: [go-nuts] Go += Package Versioning

2018-02-22 Thread David Anderson
to formulate my plan of action. Despite that, I still spent less time end to end than with glide, and I had a working build at the end of it. - Dave On Thu, Feb 22, 2018 at 11:20 PM, David Anderson <d...@natulte.net> wrote: > This is an experience report onboarding vgo for a relatively complex

Re: [go-nuts] Go += Package Versioning

2018-02-22 Thread David Anderson
This is an experience report onboarding vgo for a relatively complex project (multiple binaries, vast import tree, tricky unidiomatic imports). I leave it here in the hopes that it guides other people, and potentially illustrates places where vgo falls short of great. TL;DR it went pretty well,

Re: [go-nuts] Go += Package Versioning

2018-02-21 Thread David Anderson
On Wed, Feb 21, 2018 at 3:55 PM, Axel Wagner <axel.wagner...@googlemail.com> wrote: > On Wed, Feb 21, 2018 at 11:55 PM David Anderson <d...@natulte.net> wrote: > >> Reading the latest post, https://research.swtch.com/vgo-mvs , a >> question... >> >>

Re: [go-nuts] Go += Package Versioning

2018-02-21 Thread David Anderson
Reading the latest post, https://research.swtch.com/vgo-mvs , a question... It feels to me like there's a missing 5th operation, in additions to the one you proposed: "upgrade all my *direct* dependencies to their latest version, but keep using minimal versions below that." I don't believe there

Re: [go-nuts] Go += Package Versioning

2018-02-20 Thread David Anderson
. And when they don't, there's the replacement mechanism to fork in place. - Dave On Tue, Feb 20, 2018 at 1:20 PM, Devon H. O'Dell <devon.od...@gmail.com> wrote: > 2018-02-20 13:02 GMT-08:00 David Anderson <d...@natulte.net>: > > [snip] > > > > I also believe the tooling

Re: [go-nuts] Go += Package Versioning

2018-02-20 Thread David Anderson
On Tue, Feb 20, 2018 at 11:37 AM, Russ Cox <r...@golang.org> wrote: > On Tue, Feb 20, 2018 at 1:55 PM, David Anderson <d...@natulte.net> wrote: > >> I love this. I want it now. >> > > go get -u golang.org/x/vgo :-) > > I've struggled with `glide

Re: [go-nuts] Go += Package Versioning

2018-02-20 Thread David Anderson
On Tue, Feb 20, 2018 at 12:46 PM, Bakul Shah wrote: > On Tue, 20 Feb 2018 11:55:00 -0800 "Devon H. O'Dell" < > devon.od...@gmail.com> wrote: > Devon H. O'Dell writes: > > 2018-02-20 11:39 GMT-08:00 Russ Cox : > > > On Tue, Feb 20, 2018 at 2:35 PM, Devon H.

Re: [go-nuts] Go += Package Versioning

2018-02-20 Thread David Anderson
I love this. I want it now. I've struggled with `glide` and `dep` dependency hell a lot in my Go projects (especially those that use the Kubernetes client library, which abuses "I, the library author, can define byzantine constraints on my users" to the extreme). The way I've described it

Re: [go-nuts] Re: Dero: CryptoNote protocol + smart contracts using golang

2018-02-20 Thread David Anderson
Specifically, for folks reading this thread: I'm pretty sure the license on this code is not open source, by any definition of the term (severe restrictions on allowed uses, also does not specify that the grant is perpetual - so afaict it could be revoked retroactively at any time). If such things

Re: [go-nuts] corrupt stack?

2017-12-04 Thread David Anderson
Programs with a data race can do all kinds of things that seem incredibly improbable to humans, because compilers assume that the program is race-free and make optimizations that are unsafe in the presence of races. See

Re: [go-nuts] Possible dep issue: package revision in Gopkg.lock doesn't match constraint in Gopkg.toml

2017-11-01 Thread David Anderson
You could file a bug against dep, that's probably the quickest way to get your issue looked at. With that said, dep is not expected to work with the Kubernetes client library right now. I filed https://github.com/kubernetes/client-go/issues/318 a couple days ago, and the install instructions just

Re: [go-nuts] Re: {CGO,VM}-free SQLite (ATM Linux/Intel only, pre-alpha)

2017-06-08 Thread David Anderson
It looks like it takes the sqlite3 source code (specifically, https://www.sqlite.org/amalgamation.html), mechanically translates it from C to Go using https://github.com/cznic/ccgo , then adds a thin layer to adapt the database/sql interfaces to the C-in-Go codebase. - Dave On Thu, Jun 8, 2017

Re: [go-nuts] How to deal with "Expect: 100-continue" *without* sending a 100 status

2016-09-16 Thread David Anderson
Tricky one. A couple of options spring to mind, none of them amazingly good: - Use a GCE Network LB instead of HTTP LB. You can bring the TCP sessions straight to your web servers, with load-balancing done per-TCP-session rather than per-HTTP-request. - Build your web server using a

Re: [go-nuts] Re: [ANN] Pixiecore, simple all-in-one netbooting

2016-08-08 Thread David Anderson
On Sun, Aug 7, 2016 at 5:11 PM, <j...@blockstream.io> wrote: > > David, > > I'm confused by one part of this ... > > On Monday, September 14, 2015 at 8:18:23 PM UTC-7, David Anderson wrote: > > ... > > Of note is that Pixiecore does *not* require replaci