Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
zeeboo
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
11 ms
·
31.
▲
by
zeeboo
7y ago
Indeed, because semantically there is a syntactically implicit scope for every let binding. For example, in that case, the outer a is dropped after the inner a, just as if the second a had been inside of a block. There may be multiple synta
32.
▲
by
zeeboo
7y ago
There's no shadowing in the latter case. The second case is the same thing as a := 2 a = 3 By definition you must have nested scopes to have shadowing. Within the same scope, it's only ever assignment.
33.
▲
by
zeeboo
7y ago
This example is just to show that pauses are not in the same class as any other fully managed languages. I haven’t looked at the code to know how much it stresses the garbage collector, but I agree it does seem unlikely to do so. That said,
34.
▲
by
zeeboo
7y ago
No cited references, no answers about what “most” is, no answers about what “most” is in the specific context of Go, no answers about any “unnatural” patterns existing, no answers about the claim that it was “tuned” to reduce allocations,
35.
▲
by
zeeboo
7y ago
No, I meant what I wrote. The time spent in total in GC includes the time spent performing allocations. If you reduce the time spent in allocations with all else being equal, you reduce both latency and increase throughput. In that way, opt
36.
▲
by
zeeboo
7y ago
And yet here’s an empirical benchmark providing evidence against both of those claims. What empirical evidence do you have supporting yours? Can you provide them? Who defines when a construct is “unnatural”? Can you show examples of “unnatu
37.
▲
by
zeeboo
7y ago
Sure, but that's not relevant to the discussion here. In this case the context was responding to the the statements that Go pundits claim the garbage collector has low latency but it always has bugs that will be fixed in the next versi
38.
▲
by
zeeboo
7y ago
Thanks. Since most of the explanations that you gave involve things like controlling value types and data layout, it sounds to me like you might agree with the statement that in languages with better control over allocation and data layout,
39.
▲
by
zeeboo
7y ago
I believe we misunderstood each other. In particular "the application in question has been tuned to perform as few allocations as possible" seems contradictory to "Go doesn't give you control over allocation in a meaning
40.
▲
by
zeeboo
7y ago
You're jumping to conclusions. I understand the distinction and that there are many options for Java. Please be charitable. To rephrase the question more precisely: can you explain why OpenJDK, which has a multitude of garbage collecto
41.
▲
by
zeeboo
7y ago
How do you explain the throughput and latency numbers posted by https://github.com/ixy-languages/ixy-languages ? Go is beating Java in both latency and throughput, and the author attempted many different Java GC tunings
42.
▲
by
zeeboo
7y ago
The memory leak due to channels not being cleaned up was almost certainly because goroutines themselves are not garbage collected when they're forever blocked. In other words, `ch := make(chan int); go func() { ch <- 1 }()` is a mem
43.
▲
by
zeeboo
7y ago
On the repo page, there’s a latency graph, and on it there are two green lines. One is for Javascript and has poor latencies. The other is Go and has some of the best latencies. Because the Go one is clustered with other overlapping lines,
44.
▲
by
zeeboo
7y ago
Maybe you should trust the judgement of the highly-qualified engineers then when they decided to go with their own toolchain, and not just assume that they’re doing it because plan 9 or some other vacuous reason.
45.
▲
by
zeeboo
7y ago
It’s only slower at the highest batch sizes. I’d say their performance on throughput here is comparable, except the Go version has much better latencies (don’t be confused by the first graph like I was: that green line at the top is actuall
46.
▲
by
zeeboo
7y ago
Publish isn't necessary for the Go version, since the model is on-demand pull driven. godoc.org is the same way: there's no way for private code to end up there unless your private code is actually public. The privacy concern is e
47.
▲
by
zeeboo
7y ago
> You talk about git.apache.org being down, while you're willing to bring down the entire ecosystem across the board with your own special server. If the proxy goes down, by default the command falls back to directly fetching.
48.
▲
by
zeeboo
7y ago
Those disallow data races, not race conditions. I find that this blog post explains the distinction well: https://blog.regehr.org/archives/490
49.
▲
by
zeeboo
7y ago
You can’t naked return with a shadowed named return variable. The compiler disallows it. Thus, at any return site, you locally know that you’re either returning the only err in scope (the named return), or the specific value listed in the r
50.
▲
by
zeeboo
7y ago
I totally agree that good error wrapping is essential. In fact, I've been using this exact system for wrapping my errors for years, and it's been great ( https://godoc.org/github.com/zeebo/errs#WrapP ). I
51.
▲
by
zeeboo
7y ago
That `Close` call only happens in the case that an error happened during either copying or closing. The point of checking errors on `Close` is so that you catch problems during flushing of any buffered writes. In this case, the `Close` is n
52.
▲
by
zeeboo
7y ago
Indeed, I believe it's impossible to statically prevent race conditions in a turing complete language. Data races can be prevented, but that's just a subset of all possible race conditions.
53.
▲
by
zeeboo
7y ago
To be clear, you can name the return value whatever you want. People just typically name their error values `err`. Also, the mechanisms to mess with named return values in defer already exist: https://play.golang.org/p/
54.
▲
by
zeeboo
7y ago
An implementation with buy-in across the entire ecosystem and language so that you don’t have some systems using threads and other systems using futures and other systems using different reactors, etc. Also known as the point of the article
55.
▲
by
zeeboo
7y ago
They're equivalent representations of the same value. There's no need to propagate anything to anyone.
56.
▲
by
zeeboo
8y ago
I'll believe you once you tell me how the openness of a core internet router is important to the security of visiting a website over https. Good job keeping up the FUD!
57.
▲
by
zeeboo
8y ago
Assuming the server will eventually get hacked is how you design secure systems. You assume the worst, and ensure you are still secure. The server code being designed well had nothing to do with the hardware running the system being hacked.
58.
▲
by
zeeboo
8y ago
Enclaves are interesting, and I also look forward to all of the new things they allow. But all of that has nothing to do with open sourcing the server being important for security if given the ability to audit the client, and the client is
59.
▲
by
zeeboo
8y ago
I didn’t say you believe in the security of every application, I said you believe in the security of some applications. For example, websites secured by https do not require the security of routers to be secure.
60.
▲
by
zeeboo
8y ago
There is no need to run the code that you expect if the client is designed properly, and you are only sure you're running the code you expect until your server is hacked, which also becomes a non-issue if the client is designed properl
More ›