Skip to content

An esolang that runs code like it's drunk

License

Notifications You must be signed in to change notification settings

tathyagarg/intoxicode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Aug 7, 2025
7226f5e · · Aug 7, 2025

History

90 Commits
Jul 27, 2025
Jul 27, 2025
Aug 7, 2025
Aug 7, 2025
Jul 27, 2025
Jun 26, 2025
Jul 28, 2025

Repository files navigation

Logo

Intoxicode is an esolang that simulates a drunken program with uncertain behavior.

Features

  1. Statements ending with . are certain, ? are uncertain.
  2. There's a 10% chance for each character in a string literal to switch case.
  3. Variable names must include vowels, it's too hard to pronounce otherwise.
  4. Operations can be performed with +, -, *, /, and % operators, but reliable answers are not guaranteed.
  5. Functions can be defined with fun and called with function_name().
  6. Comments can be added with # and will be ignored.
  7. Exception prone code can be wrapped in try and gotcha blocks.
  8. You can only have up to 25% of your code ending with . to keep it uncertain, given your code is at least 12 lines long. If exceeded, the certainty will be randomly decided for every line ending with . after the 25% is hit (i.e., if the first 4 lines of your code end with . and you have 16 lines, the first 4 lines execute as normal but if the 5th line ends with ., the . is ignored and a random certainty is assigned.
  9. Any line can randomly be chosen to be skipped, simulating a drunken state.
  10. Any line can randomly be chosen to be repeated, simulating a drunken state.
  11. Information can be printed to the console with scream and information can be taken from stdin with ask.
  12. Uncertain code ending with ? will execute with a 75% chance of success.