Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
One-liner program
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==History== The concept of a one-liner program has been known since the 1960s<ref>{{cite book |title=10 PRINT CHR$ (205.5 + RND (1)); : GOTO 10 |date=2014 |publisher=Mit Press |isbn=9780262526746 |page=148 |url=http://nickm.com/trope_tank/10_PRINT_121114.pdf |accessdate=3 July 2018}}</ref> with the release of the [[APL (programming language)|APL]] programming language. With its terse syntax and powerful mathematical operators, APL allowed useful programs to be represented in a few symbols. In the 1970s, one-liners became associated with the rise of the [[home computer]] and [[BASIC]]. Computer magazines published [[type-in program]]s in many dialects of BASIC. Some magazines devoted regular columns solely to impressive short and one-line programs.<ref>{{cite web|url=https://archive.org/stream/run-magazine-35/Run_Issue_35_1986_Nov#page/n109/mode/2up|title=RUN magazine issue 35|date=November 1986 }}</ref> The word ''One-liner'' also has two references in the index of the book ''[[The AWK Programming Language]]'' (the book is often referred to by the abbreviation ''TAPL''). It explains the programming language [[AWK programming language|AWK]], which is part of the [[Unix]] [[operating system]]. The authors explain the birth of the ''one-liner'' paradigm with their daily work on early [[Unix]] machines: {{Quote|The 1977 version had only a few built-in variables and predefined functions. It was designed for writing short programs [β¦] Our model was that an invocation would be one or two lines long, typed in and used immediately. Defaults were chosen to match this style [β¦] We, being the authors, ''knew'' how the language was supposed to be used, and so we only wrote one-liners.}} Notice that this original definition of a ''one-liner'' implies immediate execution of the program without any compilation. So, in a strict sense, only source code for interpreted languages qualifies as a ''one-liner''. But this strict understanding of a ''one-liner'' was broadened in 1985 when the [[IOCCC]] introduced the category of ''Best One Liner'' for [[C (programming language)|C]], which is a [[compiled language]].
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)