Everything2
Near Matches
Ignore Exact
Full Text
Everything2

one-liner wars

created by everyone

(idea) by Jargon (1.8 y) (print)   ?   (I like it!) Thu Jul 19 2001 at 13:16:32

one-line fix = O = ooblick

one-liner wars n.

A game popular among hackers who code in the language APL (see write-only language and line noise). The objective is to see who can code the most interesting and/or useful routine in one line of operators chosen from APL's exceedingly hairy primitive set. A similar amusement was practiced among TECO hackers and is now popular among Perl aficionados.

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

(2 = 0 +.= T o.| T) / T <- iN

where `o' is the APL null character, the assignment arrow is a single character, and `i' represents the APL iota.

Here's a Perl program that prints primes:

        perl -wle '(1 x $_) !~ /^(11+)\1+$/ && print while ++ $_'

In the Perl world this game is sometimes called Perl Golf because the player with the fewest (key)strokes wins.

--The Jargon File version 4.3.1, ed. ESR, autonoded by rescdsk.


printable version
chaos

ooblick Stuff to Do with Your Own Blood 101 write-only language line noise
I still wear the bracelet you made me one-liner How I then tried to diffuse the Theory of Three Dimensions by other means, and of the result one-line fix
random insult generator Perl Golf Psychology comeback
Arguments for the perceived impending invasion of Earth by atomic-powered Killbots from Planet X TECO shaving cretin
Lecompton Constitution APL Impala Radix Sort
Cobra hairy Groucho Marx proglet
Y'know, if you log in, you can write something here, or contact authors directly on the site. Create a New User if you don't already have an account.
  Epicenter
Login
Password

password reminder
register

Everything2 Help

Cool Staff Picks
Look at this mess the Death Borg made!
A chorus of phones each time she calls
In the Aeroplane Over the Sea
The Phantom of the Opera
Sensory metaphors: Colors as nonvisual sensations
How to write an episode of the A-Team
patriotism
Ceremony of Carols
Goblin Market
Chinese characters
September 11, 2001 - II
Gary Glitter
Everything Tolkien
(Biblical) Love
New Writeups
Cuckowski
Slavonic Princess(poetry)
Heitah
Posthumous Oscar(thing)
ignis_glaciesque
University of South Florida(place)
ignis_glaciesque
Flogstaskriket(idea)
liveforever
Caesar's last breath(idea)
dagnyswaggart
she wants to believe(personal)
antigravpussy
he doesn't know, but her eyes widen too far(thing)
dagnyswaggart
Wild tides guard her secrets(poetry)
Lord Brawl
Caesar's last breath(poetry)
locke baron
Forgotten things in space(fiction)
sitaraika
Colours(idea)
etouffee
Wild tides guard her secrets(poetry)
Lord Brawl
Dr. Horrible's Sing-Along Blog(review)
a8ksh4
regret(idea)
Heisenberg
Editor Log: July 2008(log)
This page courtesy of The Everything Development Company