one-liner wars

one-liner wars

(games, programming)A game popular among hackers who codein the language APL (see write-only language and line noise). The objective is to see who can code the mostinteresting and/or useful routine in one line of operatorschosen from APL's exceedingly hairy primitive set. Asimilar amusement was practiced among TECO hackers and isnow popular among Perl aficionados.

Ken Iverson, the inventor of APL, has been credited with aone-liner that, given a number N, produces a list of the primenumbers from 1 to N inclusive. It looks like this:

(2 = 0 +.= T o.| T) / T
where "o" is the APL null character, the assignment arrow is asingle character, and "i" represents the APL iota.