We are currently working on new rules for what content should and shouldn't be allowed on this website, and are looking for feedback! See Esolang:2026 topicality proposal to view and give feedback on the current draft.

1984

From Esolang
Jump to navigation Jump to search

1984 is a WIP esolang made by User:A random guy that is based off of George Orwell’s 1984. It has mechanics reflective to the very book of 1984.

Basics of 1984

1984 has commands which basically set you in the book 1984 being able to do I/O and other stuff.

1984 is similar to most programming languages when representing variables, using "" for String, no "" for Numbers, Booleans, and the names of Variables.

Commands

Command Description
Speakwrite (Something) Print Statement, increases the Crimethink Meter by 1%.
(Variable) equal (Value) Sets a Variable equal to a value. Increases the Crimethink Meter by 1%.
(Variable) equal Input Sets a Variable equal to an input. Increases the Crimethink Meter by 2%.
Rectify (Variable) to (Value) Chanfes the value of a variable. Does nothing to the CrimeThink meter.
Rectify (Variable) to Input Changes the value of a variable to whatever the user puts in. Increases the Crimethink Meter by 1%.
Telescreen Channel 1/2/3 Makes the Input type be either a String (Channel 1), a Number (Channel 2), or a Boolean (Channel 3). The type of input is string (Channel 1) by default. Increases the CrimeThink Meter by 1%.
Blackwhite (Conditional); A if statement, anything that is below this is considered as part of the statement. Increases the Crimethink Meter by 1%.
Unblackwhite; A else statement, doesn't affect the Crimethink Meter.
Hate (Conditional); A while loop, increases the Crimethink Meter by 1% every time the conditional statement is satisfied and an iteration passes. (Making it loop.)
PerpetualWar for (Number) Years; A For Loop, actively decreases the CrimeThink Meter by 1% per iteration.
BigBrother; A try catch statement, if any error happens it goes to here.
Crimestop (Line Num); Ends conditional statements, loops, and the try catch statement, every time the amount of this command is a even number, the one being typed and everything instance of this command satisfying the condition in the past all decrease the Crimethink Meter by 1 when the program encounters the command. The Line number is necessary.
Goodthink Decreases the Crimethink Meter by 1%, unless a command that increases it is 2 to 1 lines above it or below it.
Joycamp[Operation]() Does a operation in the square brackets. Decreases the Crimethink Meter by 1% if it is in a variable
MinitrueRef[Inequality](Stuff1, Stuff2) Does an inequality.
MinitrueRectify[LogicGate](Stuff1, Stuff2, Stuff3… Stuffn) Does Logical Operators. NOT only uses 1 input.
OldThink[Line Num] Hops back to a specified line. Increase the Crimethink meter by 1%.
RecdepRectify[Command](Line) Changes a command to a new specified one. Decreases the CrimeThink Meter by 1%.
RecdepRef[Command](Line) Makes a new command at a specified line which ends up bumping up all lines from the line that the command is affecting, to the last one, by one. Decreases the CrimeThink Meter by 1%.
Ref[Line] Returns a selected line. Increases the CrimeThink Meter by 1%.
Miniluv(String1, String2… Stringn) Concatenation, can concatenate strings with numbers and vice versa. Decreases the Crimethink Meter by 1%.
Miniluv[Cleanse](NumVariable, Min, Max) Randomizes a Numerical Variable’s value.
Miniluv[Cleanse](StringVariable, Length) Randomizes a string to be at a certain length.
BigBrother Says: Text A comment, Text can be replaced with anything, meaning yes, you can make Big Brother be a hypocrite by saying that he hates the INGSOC despite literally being the representation of it. Lol.

Operations

Operation Description
Joycamp[PlusGood](Num1, Num2) Adds 2 numbers together.
Joycamp[PlusUngood](Num1, Num2) Subtracts 2 numbers together.
Joycamp[DoublePlusGood](Num1, Num2) Multiplies 2 numbers together.
Joycamp[DoublePlusUngood](Num1, Num2) Divides 2 numbers together.
Joycamp[TriplePlusGood](Base, Exp) Exponentiation.
Joycamp[TriplePlusUngood](Base, Num) Logarithm.
Joycamp[DoubleThink](Num, Base) Modulo operation.
Joycamp[DoubleUnthink](Num1, Num2) Floor division.
Joycamp[Upsub](Stuff) Parenthesis.

Inequalities

Name Description
MinitrueRef[AnteRef](Stuff1, Stuff2) Less Than
MinitrueRef[PostRef](Stuff1, Stuff2) Greater Than
MinitrueRef[AnteEqual](Stuff1, Stuff2) Less Than or Equal to.
MinitrueRef[PostEqual](Stuff1, Stuff2) Greater Than or Equal To
MinitrueRef[Equal](Stuff1, Stuff2) Equal to
MinitrueRef[Inful](Object, Subobject) Checks to see if a number or value is inside of another number or value.

Logic Gates

Name Description
MinitrueRectify[Malreport](Stuff) NOT statement.
MinitrueRectify[Goodreport](Stuff1, Stuff2… Stuffn) A n-input NAND gate.
MinitrueRectify[Equalreport](Stuff1, Stuff2… Stuffn) A n-input NOR gate.

CrimeThink Meter

There is a meter, being the Crimethink Meter which is a meter that when it reaches 100%, ends the program while printing: "The Thought Police has made you a unperson for committing “ThoughtCrime”. If the the Meter tries going below 0%, it stays at 0%.

Other Things

Any instance of 101 or “101” by it’s own (meaning 1010 doesn’t count) will immediately give a +2% increase in the CrimeThink Meter as a penalty because unspeakable things happen in Room 101. It also applies to Line 101 too.

For for loops, if the amount of times to loop is 0, it just skips the loop.

Programs in 1984

This section is still a work in progress. It may be changed in the future.

Hello World

Speakwrite “Hello World!”

Cat Program

“Cat” equal Input
Speakwrite Cat

Quine

Speakwrite Ref[1]

Narcissist ignoring the fact that the line breaks are spaces.

Insert equals Input
Blackwhite MinitrueRef[Equal](Insert, Minluv(Ref[1], “ “, Ref[2], “ “, Ref[3], “ “, Ref[4], “ “, Ref[5]));
Speakwrite “Accept!”
Unblackwhite;
Speakwrite “Reject!”
Crimestop 2;

Fibonacci sequence

“Fibn2” equal -1
“Fibn1” equal 1
“Fibn” equal 0
Telescreen Channel 2
“n” equal Input
Perpetual War for n Years;
Rectify Fibn2 to Fibn1
Rectify Fibn1 to Fibn
Rectify Fibn to Joycamp[PlusGood](Fibn2, Fibn1)
Goodthink
Crimestop 6;
Speakwrite Fibn

Truth Machine

Telescreen Channel 2
Truth equals Input
Dummy equals “Dummy”
Blackwhite MinitrueRef[Equal](Truth, 0);
Speakwrite Truth
Unblackwhite;
Hate True;
Speakwrite Truth
Rectify Dummy to “Dummy”
Rectify Dummy to “Dummy”
Goodthink
Goodthink
Crimestop 7;
Crimestop 4;

99 bottles of beer

"Beer" equal 99
Hate MinitrueRef[PostRef](Beer, 0);
Blackwhite MinitrueRef[Equal](Beer, 1);
Speakwrite Miniluv(Beer, " bottle of beer on the wall.")
Umblackwhite;
Speakwrite Miniluv(Beer, " bottles of beer on the wall.")
Crimestop 3;
Speakwrite Miniluv(Beer, " bottles of beer,")
Speakwrite "Take one down, pass it around."
Rectify Beer to Joycamp[PlusUngood](Beer, 1)
Blackwhite MinitrueRef[Equal](Beer, 1);
Speakwrite Miniluv(Beer, " bottle of beer on the wall.")
Unblackwhite;
Blackwhite MinitrueRef[Equal](Beer, 0);
Speakwrite "No bottles of beer on the wall."
Unblackwhite;
Speakwrite Miniluv(Beer, " bottles of beer on the wall.")
Crimestop 14;
Crimestop 11;
Goodthink
Goodthink
Goodthink
Goodthink
Goodthink
Goodthink
Goodthink
Goodthink
Goodthink
Goodthink
Crimestop 2;