Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
ominous_prime
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
12 ms
·
61.
▲
by
ominous_prime
11y ago
#1 is not equivalent to being single threaded (every go program is multithreaded), it just means there only 1 thread for user goroutines. Every call to wait will block and spawn a new thread. If you force it to stay on the same thread, you
62.
▲
by
ominous_prime
11y ago
Not really. Go doesn't use shared libraries (yet), so you're only really recompiling the end binaries. If you're using Go, you should already have the infrastructure to do this. Everything we have gets rebuilt for each go rel
63.
▲
by
ominous_prime
11y ago
No. It's a deliberate design choice: https://golang.org/doc/faq#Why_doesnt_Go_have_feature_X
64.
▲
by
ominous_prime
11y ago
Yes, a stack trace at a particular point is often the most helpful bit of debugging info. I'm not sure if it would be nearly as helpful in Go to step through an chunk of unknown code that crashed, since python's execution is gener
65.
▲
by
ominous_prime
11y ago
Not that there's anything wrong with using a debugger as a tool, but I find it hard to understand why it's such a stringent requirement for some. I've never really had the need for one outside of a few instances over many lan
66.
▲
by
ominous_prime
11y ago
> I haven't studied Go. Your telling me every file is statically linked? How does it use the OS APIs? OS APIs are accessed through syscalls, you don't usually need to link to anything. The exceptions to static binaries have bee
67.
▲
by
ominous_prime
11y ago
The X- prefix recommendation was deprecated a couple years ago. Since everyone used that format, you had to be careful of collisions anyway. That's not to say you can't use X- to start custom headers, it's just not required.
68.
▲
by
ominous_prime
11y ago
This doesn't affect `go get`. You can use the same options when fetching the package, setting the variable or leaving it as the default. go get -ldflags="-X main.Who CloudFlare" import/path/package
69.
▲
by
ominous_prime
11y ago
I'm financially independent, mid 30s, married with kids, and I haven't been in my bank branch in years. I agree that under 30s should be able to relate, but technology is changing how often I physically queue up somewhere.
70.
▲
by
ominous_prime
11y ago
Simple, you need a working version of go1.4 to compile go1.5. The bootstrapping process can therefore take advantage of the fact that go1.4 will continue to build as it does today, and use that to get a working go installation to build go1.
71.
▲
by
ominous_prime
11y ago
All of these are implementation specific. That's one reason they're in comments, and not listed in the language spec.
72.
▲
by
ominous_prime
11y ago
Maybe he should have said the design is done for go1. Regardless, issues are still filed under the tag of `go2`, even by Rob Pike. There's no reason to believe that go2 won't eventually happen.
73.
▲
by
ominous_prime
11y ago
//#cgo //go:nosplit //go:noescpae are all used by the compiler in one way or another
74.
▲
by
ominous_prime
11y ago
don't forget //go:nosplit too
75.
▲
by
ominous_prime
11y ago
Function call overhead in cgo is considerable. You're right that it's not from copying, but the runtime scheduler still has to coordinate the blocking call, and the stack needs to be switched out to the C stack, kind of like a con
76.
▲
by
ominous_prime
11y ago
No, the slow part is switching stacks, and coordinating with the scheduler. Go's GC doesn't yet move memory, and even so there will probably be allowances for passing pointers from Go to C when it is implemented.
77.
▲
by
ominous_prime
11y ago
No, people are downvoting you because your first comment was about dismissing the article outright when you got to rpm+yum. You haven't made any useful comments regarding the article, just continuing on about how you have personally
78.
▲
by
ominous_prime
12y ago
Ah right. It only shadows if it's a new scope.
79.
▲
by
ominous_prime
12y ago
I remember tests of a similar asphalt near me in the NE US. In the spring we had black banks of it all along the road, where it was scraped off by snowplows over the winter. What's left was packed with sand.
80.
▲
by
ominous_prime
12y ago
No, it's still type safe ( http://en.wikipedia.org/wiki/Type_safety ), memory safe, and free of undefined behavior. There's is no way to use a type contained in an interface as the incorrect type (without the u
81.
▲
by
ominous_prime
12y ago
> You can implement any control structure with goto, after all. Because a for loop is the most appropriate construct in the given language . That's different than comparing hypothetical constructs that a language doesn't have.
82.
▲
by
ominous_prime
12y ago
You don't lose "type safety", as interfaces retain all type information -- you're not casting `void*` pointers (without the unsafe package), and type conversions are limited and well defined. It however does pass the typ
83.
▲
by
ominous_prime
12y ago
Expanding a map to a for loop is very simple. Yes it removes a shortcut available when writing code, but when reading code I can consume that simple chunk of logic in one mental bite just as easily as I can a call to map.
84.
▲
by
ominous_prime
12y ago
This looks more like a bug. The second err is a valid redeclaration, and so should be checked for usage on it's own. Though the redeclaration through multiple assignment is itself a bit of a wart that the programmer hast to be wary of,
85.
▲
by
ominous_prime
12y ago
> Or why expose this interface {} feature and allow people to use it in a statically typed language? `interface{}` isn't anything special, or something akin to `void*`. Interfaces are a core part of the language, and `interface{}` i
86.
▲
by
ominous_prime
12y ago
Exactly. This is one person's attempt to distill the previous conversations down to one document. It's not supposed to be justifying or rationalizing anything, nor does it speak for the core language contributors! It's one pe
87.
▲
by
ominous_prime
12y ago
I say that's great! It helped uncover an otherwise unnoticed bug.
88.
▲
by
ominous_prime
12y ago
Yes and no. `gofmt` is a tool to make your code follow certain style guidelines, and the ordering of imports is part of those guidelines. You are always free to ignore the guidelines, but then don't complain about the tool which is cre
89.
▲
by
ominous_prime
12y ago
I don't think gofmt assumes any width for tabs. It, prints `\t` for indentation, and that's all.
90.
▲
by
ominous_prime
12y ago
no, the order is unspecified, so it shouldn't be relied upon. The only order enforced is that imported packages are initialized before the package itself.
More ›