Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
ianlancetaylor
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
31.
▲
by
ianlancetaylor
12y ago
The plugin API uses file names, so discovery would be at a higher level. Go packages impose their own namespace, so there shouldn't be any namespace issues. Introspection is useful, but would be a matter of examining the files using
32.
▲
by
ianlancetaylor
12y ago
I believe that use case is covered via -buildmode=shared and -linkshared. Just run -buildmode=shared when building the standard library.
33.
▲
by
ianlancetaylor
12y ago
There is a bit more background at http://golang.org/issue/8310 . The problem is that we hope to move toward a concurrent GC. That means that GC must be able to run concurrently with a long-running cgo call--otherwise a
34.
▲
by
ianlancetaylor
15y ago
Ah, yes, missed that. Nothing a GC can do about code like that. At least it remains true that this can only happen in Go if you explicitly import "unsafe".
35.
▲
by
ianlancetaylor
15y ago
You need more than that. You need a server that regularly allocates large amounts of memory and then leaves them unreferenced so that the garbage collector can collect them. Then you also need the program to store data that you control, a
36.
▲
by
ianlancetaylor
15y ago
When Go gets a precise collector, simple implementations of this will work. Doing this kind of thing in Go requires importing the "unsafe" package, and any memory allocations done by code importing "unsafe" could be marked as possibly a po
37.
▲
by
ianlancetaylor
15y ago
A conservative GC is easier to implement. No other reason.
38.
▲
by
ianlancetaylor
15y ago
Thanks, the tutorial is gone (replaced by the tour) and we just removed the link from the blog page.
39.
▲
by
ianlancetaylor
15y ago
"Go Pro" is unfortunately a very misleading name. I just spent an hour cleaning up his use of Go. Nobody made any attempt to actually turn this code into a well-written Go program. I did not realize that he was going to publish it extern
40.
▲
by
ianlancetaylor
15y ago
I only spent an hour straightening out his use of Go. Had I know he was going to publish it externally as "Go Pro" I would have tried to turn it into a real Go program, and perhaps even optimize it somewhat. Overall I think the Java and C