Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
crawshaw
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
30 ms
·
331.
▲
by
crawshaw
12y ago
The uintptr version of the pointer is not moved by the GC, so it acts as a stable identifier.
332.
▲
by
crawshaw
12y ago
That's right, you cannot dereference the pointer from C. If you want to use allocated memory from both C and Go, you'll need to allocate it in C.
333.
▲
by
crawshaw
12y ago
The GC will not update a pointer once it is converted to the type uintptr. It becomes invisible to the precise collector, so the uintptr acts as an id value.
334.
▲
by
crawshaw
12y ago
You can do your own pinning, which is what I do in gobind[1]. The basic idea is to keep a map in Go of the pointers: var ptrs = make(map[uintptr]unsafe.Pointer) When passing a pointer from Go to C: var p unsafe.Pointer = ...
335.
▲
Scaling with Go: YouTube's Vitess
(youtube.com)
2 points
by
crawshaw
12y ago
|
0 comments
336.
▲
by
crawshaw
12y ago
I haven't looked into the JVM's stack allocation logic in several years, so it may have improved to the point where that is now true. (It wasn't so in 2010.) However, Go does have features that make it easier to control alloc
337.
▲
Regular Expression Syntax Diagrams
(regexper.com)
18 points
by
crawshaw
12y ago
|
0 comments
338.
▲
Go 1.4+ Garbage Collection Plan and Roadmap
(golang.org)
281 points
by
crawshaw
12y ago
|
178 comments
339.
▲
by
crawshaw
12y ago
Space is mostly empty. There's nothing much to dissipate heat into. Cooling is always a problem in space.
340.
▲
Binding Go and Java
(golang.org)
13 points
by
crawshaw
12y ago
|
0 comments
341.
▲
by
crawshaw
12y ago
This isn't exactly dependency injection, this is a dynamic scope. It does have some functional overlap with request scoping in Guice, but you could imagine a world in which you have both context propagation and dependency injection. Ho
342.
▲
Fun with rendering timezones
(plus.google.com)
2 points
by
crawshaw
12y ago
|
0 comments
343.
▲
by
crawshaw
12y ago
The most important piece of advice is not proto specific: use pprof. It may sound obvious, but even though I have been using it for years, I find myself still not running it enough. Proto decoding specific: if you're parsing a message
344.
▲
by
crawshaw
12y ago
That thread points out a lot of problems with both the current implementation of protos in Go and the inherent difficulties mapping of a code generator that was designed for C++ onto Go. I have had to deal with those issues and more using p
345.
▲
by
crawshaw
12y ago
You are probably thinking of Rob Pike's talk, Less is exponentially more : http://commandcenter.blogspot.com/2012/06/less-is-exponentia...
346.
▲
by
crawshaw
12y ago
If there exists an implementation of type parameterization that imposes neither a compile time cost nor a run time cost, I would be interested in reading about it. The languages and compilers I'm familiar with (Scala, Haskell, MLton) a
347.
▲
by
crawshaw
12y ago
Type parameterization has been around for a long time, but all existing implementations make tradeoffs the Go team is not willing to make: http://research.swtch.com/generic
348.
▲
by
crawshaw
12y ago
I'm on the Go team. My work has been internal to Google up until now.
349.
▲
by
crawshaw
12y ago
This notion of commodity technology doesn't apply to every startup. Boston Dynamics was not a company slapping together commodity technology and testing user behavior. But it does apply to a lot of startups. And that's why I work
350.
▲
by
crawshaw
12y ago
As the essay mentions Hamming's talk, here's a recording: http://youtu.be/a1zDuOPkMSw
351.
▲
by
crawshaw
12y ago
An easier way of looking at the API: http://godoc.org/github.com/andlabs/ui
352.
▲
by
crawshaw
13y ago
For those interested, this was added a few months before Go 1.0: https://codereview.appspot.com/5285042/ This has proven surprisingly useful in cutting down on fragile tests, where order was relied on for a set of item
353.
▲
by
crawshaw
13y ago
Readability improved from squareVec1 to squareVec4, then went downhill. Hiding loops behind new names doesn't make programming better.
354.
▲
Why I Love Go
(blog.jonathanoliver.com)
3 points
by
crawshaw
13y ago
|
0 comments
355.
▲
Make it fast
(plus.google.com)
6 points
by
crawshaw
13y ago
|
0 comments
356.
▲
by
crawshaw
13y ago
It is hard to manage ownership when allocations are passed around between concurrent threads. Garbage collection in Go makes goroutines and channels easy.
357.
▲
by
crawshaw
14y ago
C++ is amazingly distracting. There's an algorithm in here, but it's hard to see through all the void fractal(window<int> &scr, window<double> &fract, int iter_max, std::vector<int> &colors, const std::fu
358.
▲
Asmjs - a low-level subset of JavaScript
(asmjs.org)
2 points
by
crawshaw
14y ago
|
0 comments
359.
▲
Random Hash Functions (2012)
(research.swtch.com)
7 points
by
crawshaw
14y ago
|
3 comments
360.
▲
Rob Pike on Object Oriented programming
(plus.google.com)
243 points
by
crawshaw
14y ago
|
168 comments
More ›