Live data from Hacker News

Facebook Go Libraries

github.com

71–80 of 98 posts

Re: Facebook Go Libraries

#71
post #56
post #47

Earlier quoted context omitted.

The crappy documentation is very much in line with many Go libraries, sadly. There doesn't seem to be a great culture of documentation. People often just write bare API docs without explaining why the library is useful or showing a lot of examples.

It may be a cultural difference of system programmers (including Go designers and developers) and (consumer) application programmers (e.g., as in the Apple camp). System programmers regard themselves higher, prefer terse symbol names, specs, docs, mathematical expressions, and formal methods, don't seem fans of Objective C or Java style readability and verbosity. But then again, it's open source software -- No one ow…

> formal methods

Go and formal methods? Seriously? It's one of those things that I imagine the Go community rejecting as being academic and not about getting stuff done.

^ that's not a value judgement, btw. I have no experience with applying formal methods myself.

Re: Facebook Go Libraries

#72
post #39
post #33

I have no idea how to evaluate this, or even tell what it is. Could someone help me out? I see that it's a bunch of packages, under the heading of "Facebook Go". I assume this is something related to Google's Golang? I click on "tool" ("Go library that wraps the go tool"). This has a README that points to a documentation link. And that documentation says things like, "Build the Command and return the path to the bina…

The name of the language is Go, not Golang. This is a collection of tools and libraries for Go that Facebook has developed. I don't see any compiler, though one of them wraps the Go tool that is used to compile Go programs.

Thanks!

> This is a collection of tools and libraries for Go that Facebook has developed.

How did you figure that out? (And thus, in the future, how can I figure it out?)

Re: Facebook Go Libraries

#74
post #72
post #39

Earlier quoted context omitted.

The name of the language is Go, not Golang. This is a collection of tools and libraries for Go that Facebook has developed. I don't see any compiler, though one of them wraps the Go tool that is used to compile Go programs.

Thanks! > This is a collection of tools and libraries for Go that Facebook has developed. How did you figure that out? (And thus, in the future, how can I figure it out?)

Well, I think the primary difference is that I'm a little more familiar with Go, so I have slightly more context. Most of these say things like "Package that provides such-and-such functions" or "Library for doing this thing".

Re: Facebook Go Libraries

#75
post #47
post #33

I have no idea how to evaluate this, or even tell what it is. Could someone help me out? I see that it's a bunch of packages, under the heading of "Facebook Go". I assume this is something related to Google's Golang? I click on "tool" ("Go library that wraps the go tool"). This has a README that points to a documentation link. And that documentation says things like, "Build the Command and return the path to the bina…

The crappy documentation is very much in line with many Go libraries, sadly. There doesn't seem to be a great culture of documentation. People often just write bare API docs without explaining why the library is useful or showing a lot of examples.

Never experienced this, godoc https://godoc.org/ is a good resource

Re: Facebook Go Libraries

#76
post #70
post #44

Earlier quoted context omitted.

I've been working with go for the past year, and let me tell you - golang is king when it comes to google's own search engine queries. You're right it's not the proper name that the go language team at google assigned, but it's certainly the colloquial (and notably more unique) one.

I don't see that it is the colloquial name of the language even if people sometimes search for it. In conversation, AFAIK it tends to be called Go. For example, look through the golang-nuts mailing list and count how many people say "Go" versus "Golang" when not referring to the website or mailing list.

Have you tried debugging something and search for for "go" rather than "golang"? You're both correct here: the name of the language is Go, and when searching google for help with an error or something, it's best to search for golang rather than go, or you'll be wading through a bunch of unrelated pages.

Re: Facebook Go Libraries

#77

Earlier quoted context omitted.

The Go team has made the decision that the language supports tabs for indentation, and it’s enforced by `go fmt`.

While this is clearly the wrong decision, one has to applaud the Go team for building `go fmt` and thus putting and end to unproductive discussions about formatting. (Although it would have been nice if `go fmt` didn't change code semantics.)

I feel it's worth pointing out the irony in "While this is clearly the wrong decision" and "thus putting and end to unproductive discussions about formatting" considering this is part of a discussion about Go's formatting.

Re: Facebook Go Libraries

#78

Earlier quoted context omitted.

No, it should show it as tabs, because that's what it is. Ideally, it should show it as 8 column tabs, as that is what gofmt assumes by default.

I don't think gofmt assumes any width for tabs. It, prints `\t` for indentation, and that's all.

It has the -tabwidth option, defaulting to 8. I have yet to figure out what it's used for, but presumably there is some case where it is used for alignment.

Re: Facebook Go Libraries

#79

Earlier quoted context omitted.

I'm relatively new to Go, and like you I wholeheartedly agree with the idea of solving formatting once and being done with it (and as an aside, I agree that tabs are the wrong decision). It was my impression that gofmt was essentially a pretty printer. Can you point to examples where it changes semantics?

go fmt will reorder your imports, which means that if there is an import ordering dependency, it will either be exposed (or hidden) by go fmt.

I'm just going to say whoever is downvoting this is a jerk. This comment is actually correct. Whether or not it reflects the way you believe things should happen, this is an accurate description of how things do happen (I assume, based on the other comments, I don't actually know myself).

Re: Facebook Go Libraries

#80

Earlier quoted context omitted.

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.

In fact, you should be glad that "go fmt" exposed the fact you were relying on something that you should not have. Better to find a bug sooner rather than later, and relying on implementation details of your particular language implementation is a bug.

It seems to me like it would be very much in line with the Go philosophy to automatically uncover this in some way other than just an impossible-to-debug pre-compile sort, like disallowing it on a language level. Perhaps that's a Hard Problem, though, so not a reasonable request.
Post reply on HN