Update: M Tang's explanation for this is wrong, but Seth Schoen sent us a great correction
There's a GNU-coreutils program called yes whose function is to "output a string repeatedly until killed." M Tang tried piping the output of one yes command into another. It ended badly:
Taking a look at the source code for yes, it looks like the single argument is being stored in a char array, then, in a while(true) and for loop, each character is printed to the stdout, followed by a new line (\n) character.
So when we use the output of one yes command as the argument for another, the outer yes command fills up the computer’s memory with the output of the inner yes command. Then I have to restart my computer and feel stupid.
yes 'yes no' (via Hacker News)
I write books. My latest is a YA science fiction novel called Homeland (it's the sequel to Little Brother). More books: Rapture of the Nerds (a novel, with Charlie Stross); With a Little Help (short stories); and The Great Big Beautiful Tomorrow (novella and nonfic). I speak all over the place and I tweet and tumble, too.
MORE: computer science • Funny
More at Boing Boing
-
relawson
-
eldritch
-
Symbiote
-
-
http://twitter.com/agger_modspil Carsten Agger
-
eldritch
-
billstewart
-
-
JT Montreal
-
KWillets
-
-
Bob pelorson
-
wysinwyg
-
http://www.iandicomputing.com Clifton
-
wysinwyg
-
http://glitch.tl/ Michael Smith
-
-
-
billstewart
-
Forkboy
-
http://glitch.tl/ Michael Smith
-
-
-
http://barak.a.pearlmutter.myopenid.com/ Barak A. Pearlmutter
-
http://profile.yahoo.com/2C6ZLMTICDOZHQGW66SUEDARLQ Murphy
-
Raphael Clancy
-
c0rtana
-
Raphael Clancy
-
Raphael Clancy
-
allium
-
-
Cormacolinde
-
Chas. Owens
-
http://www.facebook.com/harrkev Kevin Harrelson
-
-
-
-
billstewart
-
-
bzishi
-
http://www.iandicomputing.com Clifton
-
-
W. Hogue
-
mongo
-
chaopoiesis
-
-
Aurvondel
-
http://www.iandicomputing.com Clifton
-
-
phuzz
-
http://twitter.com/dargaud Guillaume Dargaud
-
http://www.google.com/profiles/moneta.mace Mace Moneta
-
-
http://www.iandicomputing.com Clifton
-
Stephen Dennis
-
Dana Nonsense
-
http://www.facebook.com/people/Maj-Variola/100003091129531 Maj Variola
-
Chris Wright
-
L_Mariachi
-
lebel
-
-
-
-
http://www.facebook.com/greg.ercolano Greg Ercolano
-
http://www.facebook.com/greg.ercolano Greg Ercolano
-
billstewart
-
-
http://www.last.fm/user/kraniac/ Shazbot
-
http://www.facebook.com/profile.php?id=1158369073 John McCormick











