From Esolang
Jump to navigation Jump to search
Paradigm(s) imperative
Designed by Andrés Ortiz
Appeared in 2016
Computational class Turing complete
Major implementations Original interpreter in javascript
Influenced by Unary
File extension(s) .cnpl

ChuckScript is an esoteric programming language designed by Andrés Ortiz based on the concepts of Unary, where all the code is written using only zeroes. The language was designed as a joke on how Chuck Norris code.

Language Overview

ChuckScript uses the same concept as Unary to translate code into zeroes. However, instead of using Brainfuck as base language, it can use any text (and language). This would generate huge files (several exabytes for a Hello World), so instead of storing the string of zeroes, only the number of zeroes will be stored, using the following format:



ChuckScript Generation

The syntax is based on the regex that would match the given number of zeroes in a text file.

In order to translate a text file into chuckscript, the following steps must be followed:

  1. Translate the file into binary
  2. Add "1" at the beginning
  3. Translate the number to decimal
  4. Put the number with the ChuckScript format

For example: The text "Hello" would translate to 01001000 01100101 01101100 01101100 01101111 in binary. Prepending the 1, we get 10100100001100101011011000110110001101111, which, in dec is 1410450877551, resulting in [0]{1410450877551}


While ChuckScript may be implemented with any language, the original interpreter (cni) runs on top of JavaScript using Node.js

All ChuckScript files use the extension .cnpl

Unary File Size

ChuckScript uses the reduced syntax [0]{...} instead of only zeroes due to the extreme size of unary files. The size of Unary programs limit Unary syntax. For example, the Hello World program would require ~9.58* 10^51 Exabytes of space vs the 76 bytes needed using the ChuckScript syntax.


These examples are using JavaScript as base language [0]{9582516168086304533950061199088375933762201813077804024987245718616842}

Hello_World.cnpl: Basic Hello World


Loop.cnpl: An iteration from 0 to 9, showing the current iteration number on console


server.cnpl: Simple Http webserver (requires running under Node.js)