News for hackers. Stuff that matters.
Re:C to Go: Could Go replace C? by k_kisiel on Wednesday May 11, 2011 @04:48AM (#2535692)
Agreed. Besides crappy formatting, he also makes his programs do confusing things. Why does the first example run in the infinite loop?
Re:C to Go: Could Go replace C? by philwelch on Wednesday May 11, 2011 @05:28AM (#2535758)
Because that's what the "yes" utility does:

"By itself, the yes command outputs 'y' or whatever is specified as an argument, followed by a newline repeatedly until stopped by the user or otherwise killed; when piped into a command, it will continue until the pipe breaks (i.e., the program completes its execution)."

http://en.wikipedia.org/wiki/Yes_(Unix)

Re:C to Go: Could Go replace C? by Lozzer on Wednesday May 11, 2011 @05:42AM (#2535784)
From the first line of the man page for yes:

yes - output a string repeatedly until killed

Re:C to Go: Could Go replace C? by maartenscholl on Wednesday May 11, 2011 @05:29AM (#2535759)
The first example is a basic implementation of the 'yes' unix shell utility.