# Write an aphorism using valid code [closed]

Can you write an aphorism in at most 4 lines of code ?

Code should read as much as possible as an aphorism in plain English and should return the boolean true.

Language: of choice.

Criteria for accepted answer: Most votes in 180 30 days. (8th of July 2014)

Originality: can be an old aphorism but a creative one would be much more appreciated.

## closed as too broad by Alex A.Apr 22 '16 at 22:03

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

## locked by Alex A.Apr 22 '16 at 22:04

This question exists because it has historical significance, but it is not considered a good, on-topic question for this site so please do not use it as evidence that you can ask similar questions here. This question and its answers are frozen and cannot be changed. See the help center for guidance on writing a good question.

• What is the max line length ? – kyle k Jan 9 '14 at 23:54
• @kyle k, 90 characters should should suffice, mostly for estetic, readability reasons, also good aphorisms tend to be short :) – Eduard Florinescu Jan 9 '14 at 23:57
• Ruby - !!"[ insert whatever aphorism you want here ]" – Doorknob Jan 10 '14 at 2:54
• @DoorknobofSnow That would be a valid answer but I doubt that would get much of the votes. – Eduard Florinescu Jan 10 '14 at 8:50
• Not sure that Shakespeare quotes qualify as aphorisms. – Blazemonger Jan 24 '14 at 18:11

# Python

import this
love = this
this is love, love is not True or False, love is love
# (True, True, True)


Okay, this returns a tuple of Truths, but that itself evaluates as True anyway.

## Forth

2 : b or ! 2 ." b" ;
: that s" the questi" on ;


# C:

You'll have to squint a bit to read this one :-)

int x(){ int __,L        ;
return (__ |__ ||__ |__ ,__,__ ,__ ,__ ,__  ,
__||  1||__ |  1L/L|__||__|1/__|  1L)
;   }


You might notice a potential division-by-zero error on line 3, but this is never executed because the expression evaluates as true before the calculation is performed.

• Forest gump! +1 – Eduard Florinescu Jan 9 '14 at 23:44
• Could you please translate, for those of us without the necessary squinting skills? – Bob Jan 25 '14 at 14:32
• @Bob Do you want a breakdown of the C code, or a clearer rendering of the ASCII art? – squeamish ossifrage Jan 26 '14 at 20:41
• Oh, the C code is easy enough (__ is an identifier, couple bitwise and logical ORs and comma operators, which are all insignificant because it's all logical ORed with a 1 evaluating to true). It's the ASCII art that's a little difficult to read. – Bob Jan 27 '14 at 4:32
• @Bob OK, here's something similar. (Not valid C code, but easier to read, I hope.) – squeamish ossifrage Jan 27 '14 at 9:23

It's difficult to avoid string literals, comments and tricks fo this kind, but I tried to keep them to a mininum. Also, the first line makes no sense. Well, I had fun doing it

## F#

(fun () -> (fun (_) -> // fun fun? wtf
try not <| failwith("me") ; (*but*) with |Failure((*co*)me(*s*)) -> true)("learning"))()
// "Try not to fail with me, but with failure comes true learning


I could also do some declaration abusing, but I ended up not finding a way to return true:

let the,bodies,hit_the=floor(0.0),(),()


or

let the_games=bigint() //pun intended


I really need to stop with the puns.

# C

Better(to,re);main(silent){and();}be(thought,a,fool){}
than(to,open,your,mouth);and(){}remove(all,doubt);


Split over two lines, but one would work fine as well.

When compiled using gcc on Linux (x86-64), this produces an executable which exits with success (exit code 0), the same as the true Unix utility; this being how I choose to interpret the requirement of returning boolean true in a non-scripting language.

Note: notwithstanding the abuse of the "implicit int" rule, the principal trick behind this program is that while a C program that falls off the end of main without a return statement will usually result in a non zero exit code, by calling another function we can set the EAX register which is then used as the exit code of the program. This is of course totally undefined behaviour and utterly non portable.

# Python

war=peace=freedom=slavery=ignorance=strength=0
war is peace|freedom is slavery|ignorance is strength

Power=a=means=it=an=end=0
Power is not (a, means, it is (an, end))


# JavaScript

You=true;function BigBrother(){};BigBrother.isWatching=function(y){return y};
BigBrother.isWatching(You)


# C#:

short life = 0;
return (life is short);


"Life is short" (Hippocrates)

• Too bad there is no literal specifiers for shorts! It would be neat to do var life = 0s; – Ben Reich Jan 24 '14 at 16:44

# Ruby

class String
def before(b) self < b end
end


A bit lengthy, but gets us a few aphorisms:

"age".before("beauty")
"pearls".before("swine")


And (stretching slightly):

dont = []; y = 1
dont.count + y or ('chickens'.before('they hatch'))

• +1: for y or. – wchargin Jan 26 '14 at 17:37

# Scala

Some apply Double forall _; None isEmpty


# CoffeeScript

2 * @wrong isnt @right


=> true

# C++

bool life = true;
bool fair = false;

assert(life != fair);


# Python

love=[True];all,fair,war=love*3
all is fair in love and war


An aphorism about http verbs, in

## Ruby

puts do
something idempotent but are considered to be unsafe
because if the value at the beginning of a chain of calls is one possibly the value at the
end != 1


## C

if ((ifs && ands) == (pots && pans))
work_for_tinkers_hands = FALSE;


# Javascript

function be(who) {
if (who == 'thine own self') {
return true;
}
}


An approximation of "To thine own self be true."

I'm kind of fudging with the requirements, since it only returns true in one particular case ... but I'm hoping you'll let it slide because the return value is actually part of the aphorism.

# C

int main(int fear, int* computers){ int

i; do { !fear; computers[i]; fear; "the lack of them";

} while();return true;}


I do not fear computers, I fear the lack of them.

-Isaac Asimov

# C

main(int I,char **think) {char *a="there"; for (;--I;) a['m'];}

• You can remove the types in declarations. Also something has to be done to a's declaration... It gets in the way when you read – mniip Jan 24 '14 at 19:58
• I left them because my compiler gave me errors without them, so I wanted to be very adherent :P – jmc Jan 25 '14 at 7:54

I got a wonderful error while attempting this:

It's very much inspired by Darren Stone's answer.

TypeError: Cannot use 'in' operator to search for 'tis nobler' in mind to suffer the The Slings and Arrows of outrageous fortune

# Javascript

[2].be || ! [2].be ; this.is, "the question"


It returns an implicit true.

Slightly less terse, with a question mark:

[2].be || ! [2].be? is = this: !"the question"


# PHP

$all = array('not well', 'not well', 'not well', 'well');$end = array_pop($all);$all = ($end == 'well') ?$end : 'not well';
return true;


"All's well that ends well."

# Q

any bird:int$"hehand"=2^int$"hebush"

and

(./) 2_iscomp:any 3,'s:"a",'"crowd"

# PHP

An apple a day...

$aphorism = function(){ for($day=1;$day<=365;$day++) $apple++; return ($apple==365) ? true : 'doctor';
};


# Common Lisp

(Do ((as)) ('(I say no)t) as I do)
(time (and 'tide (wait-for 'no-man))) ;requires sbcl


A bit lazy, but my take.

# Python:

life = short = True; art = long = True; life=art
life is short and art is long


# JavaScript:

The = word = 'Yoga'
has = been = 'vulgarized'
and = does = not=  mean = anything =Date.now() ,!''
//Swami Rama


# Lua

-- all search is in vain
function search() end
-- only the void is true
function void() return function() return true end, true end
-- and what remains is to
for ever in void() do repeat search("light") until true end
return true


# JavaScript

return (Do || !Do) || (there == !try);


return 2 * be || !(2 * be);

• Upvote for the Yoda one, but I am thinking there should be a ban on "To be or not to be". – Jonathan Van Matre Feb 21 '14 at 17:53

## R

the_whole <- c(-1,-1)
the_part <- -1
the_whole > sum(the_part,the_part)


-Socrates

## Simply-Basic 84

Label 1;a random number between 0 and 1~should be stored in~A
If A is equal to 1 Then Display A End;Stop&Else,Go to label 1
:End; Otherwise destroy quantum transmitters internationally.
Since quantum transmitters are gone, power lost. KA-POW, yes?


# Prolog

waste(not).

want(X) :-
waste(X).


Python

be = that = the = question = 1
2 - be or not 2 - be
that is the & question


Ruby

Not the most elegant solution, but very easy to read

def you_know_meaning(x) true end

!!!("aphorism" != "aphorism" unless you_know_meaning "aphorism")

=> true