1=0

From Esolang
Jump to navigation Jump to search

1=0 is an esoteric programming language based on Forte made to mess up some of the peano axioms that Forte does not.

Commands

In 1=0, the main action is to assign new values to numbers, but it is possible to use the arithmetic assign operators (+=, -=, *=, /= and %=).

Also, using { and }, it is possible to create codeblocks, one of which are assigned to a number. Then, when that number is used, it would run its code instead. A code block can have a return value, which is assigned using =<return value>. If not specified, the return value is 0.

Finally, for I/O functions, ; gets a number from user input, ? gets a character from user input then returns its ASCII code, : prints the value at its right as a number, and ! prints the value at its right as an ASCII character.

Command I/O Feature
; Numeric input
? ASCII input
: Numeric output
! ASCII output

Breaking the Peano Axioms

  • 0 is a natural number.
0 -= 1
  • Natural numbers have successors.
1 = 0
  • a and b compart successor if and only if a = b.
5 = 0
8 = 0
This works because if a > c and b > d then a + b > c + d so 4 + 4 > 3 + 2.
  • No natural number is a predecesor of 0, because negatives are not natural numbers.
0 = 2
  • A list with 0, the successor of 0, the successor of the successor of 0, and so on contains all the natural numbers.
3 = 0

Examples

Hello World

!72
!101
!108
!108
!111
!32
!87
!111
!114
!108
!100
!33

Chr Cat

!?

Num Cat

:;

Calculator

55586=;
55587=;
55588=?
88843={
  55586+=55587
}
88845={
  55586-=55587
}
88842={
  55586*=55587
}
88847={
  55586/=55587
}
88837={
  55586%=55587
}
905050=88800
905050+=55588
:55586

Truth Machine

4567=;
5431={
  :1
  905050=5431
}
675434=5430
675434+=4567
:0