News for hackers. Stuff that matters.
Re:Free Book: An Introduction to Programming in Go by victork2 on Monday September 03, 2012 @11:58PM (#4473023)
Thanks, I really want to get serious with that language seeing all the praise from people around. I have began to do some small things with it and it feels like a great language ( I love the no makefile idea !)

My only regret is that this format makes it really hard to print in one motion. Could you provide a link for a PDF version?

The animal on the cover looks really hilarious too!

Re:Free Book: An Introduction to Programming in Go by cdoxsey on Tuesday September 04, 2012 @10:43AM (#4474748)
Re:Free Book: An Introduction to Programming in Go by trustfundbaby on Tuesday September 04, 2012 @12:55AM (#4473194)
yes, please provide a pdf version (free or paid, doesn't matter for me) ... oftentimes authors will make a kindle version of the book for sale on Amazon and forget to put out a pdf.
Re:Free Book: An Introduction to Programming in Go by aristus on Tuesday September 04, 2012 @03:35AM (#4473553)
I am an author (not of this book) and I very occasionally get an email asking for PDFs. Maybe one in a thousand sales are PDF. Since it doesn't come up that often I've never bothered with setting up a paid system; I just send them a link and ask nicely for a few bucks via PayPal.

Where do most people go to buy PDFs? Is it really a large-enough market to worry about?

Re:Free Book: An Introduction to Programming in Go by elemeno on Tuesday September 04, 2012 @04:28AM (#4473669)
Lulu? At least that's the only place I've specifically bought a PDF - then I found out that it's wrapped in some horrible Adobe DRM (if there are any ways to remove this, I'd love to know). I don't begrudge the money, I just wish I could read it in Preview.app rather than Adobe Digital Reader or what ever it's called - it doesn't scroll smoothly, only page wise which is a massive pain when there's lots of diagrams.

Other than that, all the ebooks I've bought from individual storefronts, often from having seen them on HN, have come as a PDF/epub/mobi bundle to work on any device.

Re:Free Book: An Introduction to Programming in Go by donatzsky on Tuesday September 04, 2012 @07:57AM (#4474155)
Install Calibre and then follow the instructions here: http://apprenticealf.wordpress.com/

If it's not DRM protected, but rather a "secure" PDF, you'll need some other tools that can remove the owner password. About.com has a list here: http://pcsupport.about.com/od/toolsofthetrade/tp/pdf-passwor...

Re:Free Book: An Introduction to Programming in Go by jwn on Tuesday September 04, 2012 @08:31AM (#4474237)
Please don't password protect PDFs for books. It makes it a huge pain in the ass to actually read. I'd much rather you do what the Pragmatic Bookshelf does and just embed our name into the PDF.
Re:Free Book: An Introduction to Programming in Go by ConstantineXVI on Tuesday September 04, 2012 @09:47AM (#4474488)
As far as I can tell, O'Reilly doesn't even do that. I've even strings(1)'d them and found nothing.
Re:Free Book: An Introduction to Programming in Go by Kaizyn on Tuesday September 04, 2012 @05:17AM (#4473774)
I grab PDF copies for all the technical books I buy from O'Reilly, PragProg, Manning Books, and Apress.
Re:Free Book: An Introduction to Programming in Go by gizzlon on Tuesday September 04, 2012 @06:59AM (#4474006)
Don't know, but I find it a great way to read on laptops & desktops. Of course, a nice html would work as well, but that's rare. (also, the pdf reader in KDE remembers what page you're on and lets you annotate etc..)
Re:Free Book: An Introduction to Programming in Go by dallmeyer on Tuesday September 04, 2012 @09:24AM (#4474415)
It's not pretty, but here's a PDF version I compiled from saving each web page as a PDF and then concatenating all of them.

http://www.pdfhost.net/index.php?Action=Download&File=40...

Re:Free Book: An Introduction to Programming in Go by netghost on Tuesday September 04, 2012 @12:55AM (#4473195)
Another great resource is "A Tour of Go": http://tour.golang.org/

You can also install a local version, I've been working through it, and it's great for fiddling with on the plane.

Re:Free Book: An Introduction to Programming in Go by spiffworks on Tuesday September 04, 2012 @11:15AM (#4474883)
Going through the source code for that tour is also a very good way of getting familiar with the http package and a good introduction to channels.
Re:Free Book: An Introduction to Programming in Go by nhebb on Tuesday September 04, 2012 @12:16AM (#4473084)
@cdoxsey - Nice work, but you might link to an installer that doesn't include a text editor. I'd be willing to bet that the majority of the target audience already has their preferred text editor installed.

Edit: After reading the first few chapters, I made a false assumption. It looks like the book is aimed at people new to computing (or, at least, it doesn't make the assumption that the reader has programmed before).

Re:Free Book: An Introduction to Programming in Go by akldfgj on Tuesday September 04, 2012 @12:38AM (#4473143)
http://golang.org/doc/install

I guess the target audience is programming novices who have never written anything like source code before. Go seems like a strange choice for a first language, being neither foundational (C, Assembler, Scheme/Lisp) nor front-end scripty (JS, Logo, Scratch).

Re:Free Book: An Introduction to Programming in Go by micpalmia on Tuesday September 04, 2012 @03:55AM (#4473601)
I don't know much about the US, but in Europe the majority of colleges is now teaching either java or C++ as the first language, and only a minority is teaching scripting languages as PHP. I guess it's easier for students to understand higher-level languages and to transport their knowledge to other languages (or, at least, it was easy for me).
Re:Free Book: An Introduction to Programming in Go by krzyk on Tuesday September 04, 2012 @06:17AM (#4473892)
I agree about C++ or Java in colleges.

I would add that in high schools we are still taught Pascal here in Poland. I was 15 years ago, and I heard that Pascal is still the first language.

Re:Free Book: An Introduction to Programming in Go by Evbn on Tuesday September 04, 2012 @10:35AM (#4474701)
More that it is easier for a classroom to teach an old stable language than invest in new things that might not last. It is rare to see an accomplished programmer who started writing any code in Java... most started with JS (younger folks) or educational environments like Logo/Scratch or super simple envs like Basic.
Re:Free Book: An Introduction to Programming in Go by binarycheese on Tuesday September 04, 2012 @10:53AM (#4474795)
"It is rare to see an accomplished programmer who started writing any code in Java" are you serious? I know a lot [here in DC]. I personally started with Pascal->C->Java->(all the scripts)->C#
Re:Free Book: An Introduction to Programming in Go by sadga on Tuesday September 04, 2012 @06:40PM (#4476912)
That's not starting in Java.
Re:Free Book: An Introduction to Programming in Go by Mithrandir on Tuesday September 04, 2012 @03:41AM (#4473567)
The book is now on Amazon, available for Kindle and in paperback:

Kindle: http://www.amazon.com/An-Introduction-Programming-Go-ebook/d...

Paperback: http://www.amazon.com/An-Introduction-Programming-Caleb-Doxs...

Re:Free Book: An Introduction to Programming in Go by davidw on Tuesday September 04, 2012 @04:37AM (#4473688)
@cdoxsey - you should link the two versions so that people landing on one know that the other format is available.

What did you use to write it? Nice job!

Re:Free Book: An Introduction to Programming in Go by cdoxsey on Tuesday September 04, 2012 @09:00AM (#4474326)
Should be linked now... Amazon hadn't put them up yet. I wrote the book using Libre Office.
Re:Free Book: An Introduction to Programming in Go by patrickg on Tuesday September 04, 2012 @01:30AM (#4473280)
See also another nice book, which can be downloaded as PDF: http://www.miek.nl/projects/learninggo/index.html
Re:Free Book: An Introduction to Programming in Go by lsiebert on Tuesday September 04, 2012 @02:48AM (#4473447)
I'm kinda bummed that it doesn't cover installing to linux.

Not that installing Linux is difficult, just that A. I suspect we'll see a lot more people on Linux computers, especially in the developing world, and B. beginning programmers should be introduced to the concept of Linux as a programming environment

Re:Free Book: An Introduction to Programming in Go by georgemcbay on Tuesday September 04, 2012 @02:57AM (#4473463)
There's really not much point in covering that in a book beyond pointing you to http://golang.org/doc/install

Go is dead simple to install to Linux via either binary or source. Even building it from scratch on non-standard Linux systems like embedded armv5 systems is easy. Basically if you have a non-broken gcc already, go will build just by invoking one single shell script they provide.

Re:Free Book: An Introduction to Programming in Go by spiffworks on Tuesday September 04, 2012 @05:51AM (#4473835)
I have been really impressed with Go's portability. I recently cross compiled a binary from a Linux machine for an ARM target and had it running from scratch in less than 15 minutes. Go could become a serious option for embedded Linux targets.
Re:Free Book: An Introduction to Programming in Go by georgemcbay on Tuesday September 04, 2012 @03:48PM (#4476207)
I agree. My current spare-time project involves programming in Go for ARMv5-based boards (old chumby devices).

I write the code in Windows (Sublime Text 2), compile in Windows, but target GOOS=linux, GOARCH=ARM, GOARM=5 and end up with an executable that I can easily rsync and run over on the ARM device. The cross-compiling available in Go is much easier to setup initially than the usual situation of having to build an entire toolchain for your target.

Re:Free Book: An Introduction to Programming in Go by Evbn on Tuesday September 04, 2012 @10:36AM (#4474708)
Does B make sense? First install a new OS before learning what a loop is?
Re:Free Book: An Introduction to Programming in Go by emehrkay on Tuesday September 04, 2012 @11:52AM (#4475071)
Thanks for this. I scanned the document and the language seems pretty straight forward, should be easy to learn. I did a search for classes and object oriented in the document (pdf) and it returned no results.

I did a web search and came up with this https://sites.google.com/site/gopatterns/object-oriented/cla..., maybe the book should reference that somewhere early (maybe not because the intro seems to touch on computer programming in general so I would assume that it was for first-time programmers).

Re:Free Book: An Introduction to Programming in Go by cdoxsey on Tuesday September 04, 2012 @12:29PM (#4475234)
Go doesn't have classes. I agree that it'd make sense to talk about them in a book aimed at C# or Java programmers, but this book is written for people who are new to programming.
Re:Free Book: An Introduction to Programming in Go by noirman on Tuesday September 04, 2012 @12:04AM (#4473044)
Love the format (especially reading from mobile). Thanks for the free book!
Re:Free Book: An Introduction to Programming in Go by cjdrake on Tuesday September 04, 2012 @12:22AM (#4473096)
The TIOBE programming community index rates Go as not being in the top fifty languages used today. That seems strange since it was the "language of the year" in 2009.

http://www.tiobe.com/index.php/content/paperinfo/tpci/index....

I like Go, and it gets a lot of good press. Is TIOBE not accurately portraying Go's popularity?, or is there some other explanation as to why few people use it?

Sorry, not related to the book (which looks cool, btw).

Re:Free Book: An Introduction to Programming in Go by akldfgj on Tuesday September 04, 2012 @12:36AM (#4473131)
TIOBE has always been a joke, and only even attempt to manage language chatter, not usage. It is based off job boards and internet search trends, and is highly susceptible to homonym confusion, which is especially harmul in the case of "go".
Re:Free Book: An Introduction to Programming in Go by nandemo on Tuesday September 04, 2012 @05:16AM (#4473772)
I find it amusing that people working at Google came up with an ungoogleable name for their programming language.
Re:Free Book: An Introduction to Programming in Go by objclxt on Tuesday September 04, 2012 @06:10AM (#4473877)
Unofficially, most people writing articles about Go would try to tag them with "golang" for search-ability ("golang" is also used for all the Go e-mail lists).
Re:Free Book: An Introduction to Programming in Go by batista on Tuesday September 04, 2012 @06:48AM (#4473975)
At least it's better than C. And Java is also a place, Python is an serpent.

The key to Googlability for everything is to put the right context keywords. Nobody just google's "go" (or "java" for that matter). They google stuff like "go string type", "go programming", "go install", etc.

That said, the bare "go" search term gives the go website as the fourth result in Google when I try it.

Re:Free Book: An Introduction to Programming in Go by danieldk on Tuesday September 04, 2012 @07:34AM (#4474099)
Generally, using 'golang' rather than 'go' gives really good search results.
Re:Free Book: An Introduction to Programming in Go by nandemo on Tuesday September 04, 2012 @09:59AM (#4474520)
Of course you can work around it if you know how to google, but Java and Python are much easier to search. If you look up "java books" or "python books" you get links about programming language books, not about coffee/Indonesia/serpents.
Re:Free Book: An Introduction to Programming in Go by batista on Tuesday September 04, 2012 @02:50PM (#4475945)
That's because of adoption and less sites linking and discussing go topics at the moment.

I think if you could Google when Python was in it's infancy, you would get 100s results for pythons (the snakes) before you saw Python pages...

Google search algorithm is not so naive as to understand "go" as a generic token only. It can tell from context which pages are related to "go" the language and which merely use the verb "go". The reverse is how old engines used to work, Altavista and co, where you had tons of irrelevant exact matches.

Re:Free Book: An Introduction to Programming in Go by ternaryoperator on Tuesday September 04, 2012 @02:02AM (#4473345)
The greatest value of Tiobe is the trending it captures over years, not the actual data point at a given moment in time. Except for spikes when they changed methodologies, the trends, especially for the most popular languages tend to be reliable. Who's in the top 50 or top 100 languages, I agree is not a useful or reliable data point.
Re:Free Book: An Introduction to Programming in Go by davidw on Tuesday September 04, 2012 @04:39AM (#4473691)
A better index is http://LangPop.com, which I recently sold on to a new owner, who hopefully will be working hard to spruce it up some, and add some new languages like Go, although Go is always going to be problematic in search engines.
Re:Free Book: An Introduction to Programming in Go by yahelc on Tuesday September 04, 2012 @10:44AM (#4474753)
Another option is Github, which ranks Go as the 27th most popular language. https://github.com/languages/Go
Re:Free Book: An Introduction to Programming in Go by davidw on Tuesday September 04, 2012 @10:58AM (#4474816)
That's a data source I considered adding for LangPop, but back in the day, was too much of a Ruby hangout. I think these days it's probably suitable.
Re:Free Book: An Introduction to Programming in Go by libria on Tuesday September 04, 2012 @01:11PM (#4475474)
Any reason you wouldn't use StackOverflow tag volume/activity as a signal?
Re:Free Book: An Introduction to Programming in Go by jason87 on Tuesday September 04, 2012 @01:31PM (#4475571)
If more questions are asked about a particular language I don't think it would mean that language is being used more in the real world. Just more people are confused about it.

Not sure if stackoverflow tags are a great indicator. TIOBE tries to use job listings and google trends. Searching job listings/search engines for 'go' probably wouldn't return much results (because of the ambiguous name) which is why its a lot lower than it should be.

Re:Free Book: An Introduction to Programming in Go by libria on Tuesday September 04, 2012 @02:50PM (#4475946)
> I don't think it would mean that language is being used more in the real world. Just more people are confused about it.

The two are not mutually exclusive. Rather, I'd think they're directly proportional. A very straightforward and simple yet popular language should have very few questions, which doesn't seem to be the case; conversely, brainfuck is particularly cryptic and should have many questions, yet it does not.

StackOverflow is admittedly .NET heavy, but since SV is somewhat anti-Microsoft, perhaps this will balance things out.

Re:Free Book: An Introduction to Programming in Go by PilateDeGuerre on Tuesday September 04, 2012 @09:12AM (#4474367)
http://LangPop.com does not track Go
Re:Free Book: An Introduction to Programming in Go by davidw on Tuesday September 04, 2012 @10:59AM (#4474819)
Err... I said that, didn't I?
Re:Free Book: An Introduction to Programming in Go by siodine on Tuesday September 04, 2012 @08:51AM (#4474292)
Why is it a better index?
Re:Free Book: An Introduction to Programming in Go by davidw on Tuesday September 04, 2012 @09:01AM (#4474328)
1. It has more data sources.

2. It lets you fiddle with the 'normalized comparison' to weight the sources differently. If you play right, you can make your favorite language win!

Re:Free Book: An Introduction to Programming in Go by Gazler on Tuesday September 04, 2012 @01:25PM (#4475540)
I really like the structure of this, very readable and a great intro. I have some confusion on http://www.golang-book.com/6

It says:

Go also provides a shorter syntax for creating arrays:

x := [5]float64{ 98, 93, 77, 82, 83 }

We no longer need to specify the type because Go can figure it out. Sometimes arrays like this can get too long to fit on one line, so Go allows you to break it up like this:

However the type is specified as `float64`

Re:Free Book: An Introduction to Programming in Go by cdoxsey on Tuesday September 04, 2012 @01:41PM (#4475602)
I meant you didn't need this:

var x [5]float64 = [5]float64{ 98, 93, 77, 82, 83 }

But I explained ":=" earlier so I can see how that would be confusing.

Re:Free Book: An Introduction to Programming in Go by zemo on Tuesday September 04, 2012 @01:28PM (#4475555)
he means the type of the individual elements. Each element is of type float64, not int.
Re:Free Book: An Introduction to Programming in Go by nyan_sandwich on Tuesday September 04, 2012 @01:30PM (#4475566)
vs Java-like

float64 myfloat64array[] = new(float64[5], ...)

Re:Free Book: An Introduction to Programming in Go by esschul on Tuesday September 04, 2012 @04:22AM (#4473650)
It's nice, but I wish there was a summary page of the syntax. As an experienced coder, I don't really need to understand the concept of a map, only how it's done in go, and maybe restrictions.
Re:Free Book: An Introduction to Programming in Go by thomas11 on Tuesday September 04, 2012 @04:51AM (#4473719)
This book isn't for you, then. I understood it as an introduction to programming, using Go.

The official Go website http://golang.org has everything you need, including the spec [1] and the insightful Effective Go [2].

[1] http://golang.org/ref/spec

[2] http://golang.org/doc/effective_go.html

Re:Free Book: An Introduction to Programming in Go by briandoll on Monday September 03, 2012 @11:56PM (#4473009)
The website says that the book will be for sale on Amazon soon. Anyone know if it will be Kindle friendly? The text looks like it would convert easily from the web pages, if not.
Re:Free Book: An Introduction to Programming in Go by cdoxsey on Tuesday September 04, 2012 @09:11AM (#4474361)
Re:Free Book: An Introduction to Programming in Go by Kilimanjaro on Tuesday September 04, 2012 @12:21AM (#4473095)
Can't help it, but it needs some more padding:

    #container { padding:60px }
Btw, great resource, the more the merrier.
Re:Free Book: An Introduction to Programming in Go by jamesbritt on Tuesday September 04, 2012 @03:09PM (#4476039)
What's the best way to install Go on Linux (Ubuntu in particular)?

Build from source? Any caveats?

Re:Free Book: An Introduction to Programming in Go by jlgreco on Tuesday September 04, 2012 @04:09PM (#4476297)
Building Go from source is trivial if you want to do that (two commands, one of which just grabs the Hg repo iirc. building only takes a few minutes on my underpowered eeepc.), but you may as well just use the binary distributions of it.
Re:Free Book: An Introduction to Programming in Go by cdoxsey on Tuesday September 04, 2012 @03:27PM (#4476110)
Re:Free Book: An Introduction to Programming in Go by alexk7 on Tuesday September 04, 2012 @12:00PM (#4475107)
I'm worried about Gordon the Gopher. He can't reach the pedals. :)
Re:Free Book: An Introduction to Programming in Go by lanna on Tuesday September 04, 2012 @05:40PM (#4476694)
I would have named the book "Go Learn Yourself"
Re:Free Book: An Introduction to Programming in Go by lanna on Tuesday September 04, 2012 @05:43PM (#4476710)
Or "Go Code Yourself"
Re:Free Book: An Introduction to Programming in Go by xtracto on Tuesday September 04, 2012 @03:12PM (#4476058)
Any chance of providing an ePub version?
Re:Free Book: An Introduction to Programming in Go by taude on Tuesday September 04, 2012 @10:33AM (#4474692)
Is there a web framework? Go on Rails?
Re:Free Book: An Introduction to Programming in Go by cdoxsey on Tuesday September 04, 2012 @11:20AM (#4474906)
Go has a great built-in web server in net/http. Not as feature-rich as Rails, it's more akin to a micro framework like bottle.py. I ate my own dog food and the book's site is written in Go.
Re:Free Book: An Introduction to Programming in Go by taude on Tuesday September 04, 2012 @10:35AM (#4474702)
I was half kidding, but found this: http://www.getwebgo.com/ and http://code.google.com/p/goweb/