Live data from Hacker News

Golang Diaries I

tbray.org

11–20 of 79 posts

Re: Golang Diaries I

#11
post #3

> First, the name. “Go” has too many meanings and is among the world’s lousiest Google search disambiguators. Enough with this old wives tale. Yes, "Go" is too generic. Nevertheless, Google understands it just fine. Case in point: > "After a few painful instances of searching for things like “go array literals” and “go repl” I got into the habit of sticking with Golang; and so will this diary. Both his examples ("go…

The filter bubble! After you've googled enough, google starts knowing what domain you are searching in. If you search for 'array literals' you'll likely get Go results at the top rather than, say, Javascript (which is what I get, I just tried).

Click the button in the top right of the search results to turn personal search off. I get Javascript results anyway.

Re: Golang Diaries I

#12
>Golang will not let you compile if there’s an import or declared variable that’s unused. OK, I understand that Cleanliness Is Next To Godliness, but this is seriously slowing me down; probably a third of my attempts to run my damn program fail because I’ve forgotten to remove debugging apparatus, or I’ve sketched in a variable but not used it yet. How about a compiler switch or something?

I don't find this an issue with vim using syntastic. When I save, I get notified in the gutter of issues like this and then I can use the official go vim support to do things like :Drop to remove the import without even navigating to the imports section. Syntastic picks up on most issues before you even think of compiling.

>There doesn’t seem to be a way to declare a constant array, what in a Java class I’d call final static String[] COLS = {"Red", "Blue"};

Constants in Go are evaluated at compile time and arrays don't exist at compile time. You can manage at the package level by using a unexported variable then exporting a function that returns it.

Re: Golang Diaries I

#13
post #11

Earlier quoted context omitted.

The filter bubble! After you've googled enough, google starts knowing what domain you are searching in. If you search for 'array literals' you'll likely get Go results at the top rather than, say, Javascript (which is what I get, I just tried).

Click the button in the top right of the search results to turn personal search off. I get Javascript results anyway.

I often switch between languages and it takes google just a handful of queries to catch up and I can start omitting the language again...

I sometimes wonder if they have special case code for programming-related subjects, but I guess its more general than that. Clever googlers!

Re: Golang Diaries I

#14
post #10

The post is fun, thanks. I like Tim's idea of "taking the journey" with a programmer on discovering new content. It's certainly the best way to introduce the topic to others. All the potential sticking issues have been handled for you! I was also excited when he said "I filed a bug on June 6th, and it was fixed on the 12th. Gotta love that.". There is no better feeling than sending a pull request and having someone t…

Yeah, the final comment on the bug is also from Mr Bray, and isn't exactly a "thanks".

I was quite surprised by that combination after reading the diary blog post, they don't really match up.

Re: Golang Diaries I

#15
> Golang will not let you compile if there’s an import or declared variable that’s unused. OK, I understand that Cleanliness Is Next To Godliness, but this is seriously slowing me down; probably a third of my attempts to run my damn program fail because I’ve forgotten to remove debugging apparatus, or I’ve sketched in a variable but not used it yet. How about a compiler switch or something?

Agreed, this is really annoying and makes it very hard to prototype things.

Re: Golang Diaries I

#16
post #2

" After a few painful in­stances of search­ing for things like “go array lit­er­als” and “go repl” I got into the habit of stick­ing with Golang; and so will this diary. " https://encrypted.google.com/#q=go+array+literals https://encrypted.google.com/#q=go+repl ...

He could be stuck in a filter bubble.

Re: Golang Diaries I

#17
post #6

Golang ins't all that new. I don't get it why so many articles exploring the basics get so much spotlight. It's a good language. I'd like to see more articles about things made with it and not about it.

Ruby was about 10 years old before most people took notice. :) It often takes time for languages to get traction.

Re: Golang Diaries I

#18
This is exactly the kind of thing I was looking for - more please. I'm interested in golang but don't need general programming tutorials. How go is different from other languages and what it's idiosyncracies are is good to know.

Re: Golang Diaries I

#19
post #3

> First, the name. “Go” has too many meanings and is among the world’s lousiest Google search disambiguators. Enough with this old wives tale. Yes, "Go" is too generic. Nevertheless, Google understands it just fine. Case in point: > "After a few painful instances of searching for things like “go array literals” and “go repl” I got into the habit of sticking with Golang; and so will this diary. Both his examples ("go…

The filter bubble! After you've googled enough, google starts knowing what domain you are searching in. If you search for 'array literals' you'll likely get Go results at the top rather than, say, Javascript (which is what I get, I just tried).

Only I don't use Go that much and don't search for it -- have tried it for a couple of months back a year ago.

Also, I did the same in incognito mode, logged out from google account and with cookies turned off. Same results.

Re: Golang Diaries I

#20
post #9
post #3

> First, the name. “Go” has too many meanings and is among the world’s lousiest Google search disambiguators. Enough with this old wives tale. Yes, "Go" is too generic. Nevertheless, Google understands it just fine. Case in point: > "After a few painful instances of searching for things like “go array literals” and “go repl” I got into the habit of sticking with Golang; and so will this diary. Both his examples ("go…

Maybe Google is tailoring your results to bring back sites that include the programming language based on a) your past searching habits and b) the emerging trends for those specific search patterns. Google's results are highly tailored, thus two people can search for the same term and get different results. Going back to the original point raised, I too have gotten into the habit of searching for " go lang [query] "…

>Maybe Google is tailoring your results to bring back sites that include the programming language based on a) your past searching habits and b) the emerging trends for those specific search patterns. Google's results are highly tailored

Well, tried the same thing logged out from Google, in incognito mode and with cookies turned off. Same results.

I can also try to proxy my search to a remote VPS I never use and see what happens.

But anyway, forget the "fitler bubble". Google is smarter that the naive "Go means the verb" in all contexts.

Post reply on HN