Skip to content

johnalpha911/Why-lang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

WHY — An Esoteric Programming Language

why = 0 | why? = 1 | the language that questions everything

WHY is a Turing-complete esoteric programming language with 8 tokens. It works like Brainfuck — a tape of memory cells and a pointer — but every instruction is an existential question.

Tokens

Token Brainfuck Action
why < Move pointer left
why? > Move pointer right
why; + Increment current cell
why! - Decrement current cell
Why . Output cell as ASCII char
Why? , Input one character
Why! [ Loop start (skip if cell = 0)
WHY ] Loop end (jump back if cell ≠ 0)

Hello World

why; why; why; why; why; why; why; why; Why! why? why; why; why; why; Why! why? why; why; why? why; why; why; why? why; why; why; why? why; why why why why why! WHY why? why; why? why; why? why! why? why? why; Why! why WHY why why! WHY why? why? Why why? why! why! why! Why why; why; why; why; why; why; why; Why Why why; why; why; Why why? why? Why why why! Why why Why why; why; why; Why why! why! why! why! why! why! Why why! why! why! why! why! why! why! why! Why why? why? why; Why why? why; why; Why

Files

File Description
why.exe WHY language interpreter (Windows)
why_lang.c Interpreter source code (C)
whyc.exe WHY binary encoder/decoder
whyc_win.c Encoder source code (C)
hello.why Hello World in WHY

Usage

why hello.why

Building from source

gcc -O2 -o why why_lang.c
gcc -O2 -o whyc whyc_win.c

The Two Modes of WHY

WHY has two personalities:

  1. Esoteric language (why.exe) — write real programs using the 8 tokens above
  2. Binary encoder (whyc.exe) — encode ANY file to why/why? binary representation

Translating from Brainfuck

Any Brainfuck program can be converted to WHY by substituting symbols. WHY is Turing complete.


Created with chaos and zero regret.

About

Do you hate yourself? yes, well program something with this language its like brainfuck but it makes you question your life choices with every line

Resources

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages