Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
rogpeppe1
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
5 ms
·
1.
▲
by
rogpeppe1
3y ago
One of Go's big selling points is the avoidance of the "red-blue problem" ( https://journal.stuffwithstuff.com/2015/02/01/what-color-is-... ). The standard Go implementation does that by using li
2.
▲
by
rogpeppe1
4y ago
> Sure, but more data will be attached to it. Also, in his proposal, he said that IP addresses will not be logged. I seriously doubt that. I think it's worth quoting what Russ said in the article, which sounds very reasonable to me:
3.
▲
by
rogpeppe1
4y ago
> First, making network requests when downloading packages is necessary for the tool to function and unavoidable. It's technically not unavoidable. The Go authors could have made use of the proxy opt-in rather than opt-out, making t
4.
▲
by
rogpeppe1
4y ago
So you see this as just the same, from a privacy perspective, as the way that the Go tool already dials out to the Go proxy by default? That is, if you're OK with that (I'd assume not, but it is at least existing functionality), y
5.
▲
by
rogpeppe1
4y ago
Have you read the articles? How is this in any way violating privacy?
6.
▲
by
rogpeppe1
4y ago
> @rsc, if you ever see this, your proposal here means that I will never use any software written in Go ever again, if at all possible. Have you actually read the articles? The "data put up for sale" is to be made available pub
7.
▲
by
rogpeppe1
4y ago
That ship has already sailed. The Go tool already by default makes network requests to the Go proxy, which potentially allows everything that you're talking about there. What's significantly different about this telemetry proposal
8.
▲
by
rogpeppe1
6y ago
I'm not sure that hiding the implementation is worth it here. Why not just make it public that it's actually map[T]struct{} underneath - then anyone can range on it and implement allocation optimisations, etc? I added some other m
9.
▲
by
rogpeppe1
6y ago
There's no need to use the pointer in there; you could just use an ok bool instead (saving the indirection): https://go2goplay.golang.org/p/4hr8zINfRym I think it's interesting to observe that using the Resul
10.
▲
Quicktest: Wrap *Testing.T for Fun and Profit
(rogpeppe.wordpress.com)
1 points
by
rogpeppe1
7y ago
|
0 comments
11.
▲
by
rogpeppe1
7y ago
OK, replying to myself for future reference. I found the answer here: https://youtu.be/0GeJdTTzaDo (incidentally, that series of videos seems to have solutions for most of these problems). The answer is that the left and ri
12.
▲
by
rogpeppe1
7y ago
This was a fun puzzle, but I came to a roadblock here too. I have to confess I'm confused by what I believe might be the "local hypothesis block" mentioned above. The confusion is somewhat greater because the blocks don'
13.
▲
by
rogpeppe1
9y ago
You can specify that a given dependency be replaced by another one. That only applies at the top level though, not when the go.mod file with the replace clause is used by another module.
14.
▲
Versioned Go Commands
(research.swtch.com)
107 points
by
rogpeppe1
9y ago
|
15 comments
15.
▲
by
rogpeppe1
9y ago
Don't keep type safety then. Think of Go as half-way between Python and Haskell in that respect. Types are great when they're useful, but they're not required .
16.
▲
by
rogpeppe1
9y ago
I tend to check out one branch, run godeps -u, then check out the other one and run godeps -N -u. Then you've got the newest deps from both branches. I still wouldn't resolve the conflict manually.
17.
▲
by
rogpeppe1
9y ago
> I'd rather have a test that correctly reasonably verifies that a package is correct (or at least "passes the race detector consistently") and reaches into some of the private details than fail to test a package. Too many
18.
▲
by
rogpeppe1
9y ago
> Mocking out the time functions means you don't get any race conditions. This is a common misapprehension. Actually, even if you fully mock out time, you can still get race conditions, because goroutines can remain active regardles
19.
▲
by
rogpeppe1
9y ago
The godeps file is just a dependency-per-line, tab-separated values, deliberately so it's easily amenable to shell script processing. Aside: the conflicts mentioned in the article should never be a real problem because you can always r
20.
▲
by
rogpeppe1
10y ago
Exceptions don't always give you useful stack traces in a concurrent situation, because the current stack may only reflect a goroutine that's processing data on behalf of another. The real execution context may involve many more.
21.
▲
by
rogpeppe1
10y ago
or gopkg.in/errgo.v1 which is a bit more opinionated about error causes.
22.
▲
by
rogpeppe1
10y ago
This particular issue is unfortunate - it can't be changed without potentially breaking existing programs. See https://github.com/golang/go/issues/11513 and https://groups.google.com/foru
23.
▲
by
rogpeppe1
11y ago
From the article: In order to do evil things like convert raw bytes to floats, I chose to use the “unsafe” package FWIW you don't need unsafe to do that. encoding/binary + http://golang.org/pkg/ma
24.
▲
by
rogpeppe1
11y ago
I'd like to hear more details of your issues here. What's not good about the bufio package? What do you mean by "poor abstractions"? What's wrong with creating a single purpose local type rather than using a functio
25.
▲
by
rogpeppe1
12y ago
FWIW Go does implement a significant subset of generics in a type-safe way. For any parametric type P[T], if P has no public methods or fields that mention T, then Go can implement it by allowing an interface (not necessarily interface{}) t
26.
▲
by
rogpeppe1
12y ago
> Go would have a reasonable compile-time type system, except that without > generics you end up having to cast a lot, which renders your compile-time > type system almost irrelevant. In my experience of Go, this is not actually tr
27.
▲
by
rogpeppe1
12y ago
http://golang.org/pkg/go/ast/ Well, not that small, i guess :-)
28.
▲
by
rogpeppe1
12y ago
Actually Go interfaces map pretty well to a concurrent (and likely networked environment). It's often straightforward to put a network-based implementation behind a Go interface type. When was the last time you saw a web service that i
29.
▲
by
rogpeppe1
13y ago
How about this instead? http://play.golang.org/p/hED7faR0q_
30.
▲
by
rogpeppe1
13y ago
Nice package. I like the fact that it's limited in scope and actually does some work for you. There's a trick you're missing though - you require the user to pass in their expected params struct explicitly so you can reflect
More ›