c. 1300, "pile, heap, or group of things," from a Scandinavian source akin to Old Norse stakkr "haystack" (cognate with Danish stak, Swedish stack "heap, stack"), from Proto-Germanic *stakon- "a stake," from PIE *stog- (source also of Old Church Slavonic stogu "heap," Russian stog "haystack," Lithuanian stokas "pillar"), variant of root *steg- (1) "pole, stick" (see stake (n.)). Meaning "set of shelves on which books are set out" is from 1879. Used of the chimneys of factories, locomotives, etc., since 1825. Of computer data from 1960.