From Esolang
Jump to navigation Jump to search

Ellipsis is an Esoteric programming language created by Bradley Grzesiak in 2012. It has two modes, each of which use only one character. In the first mode, the character is the Unicode ellipsis ('…', U+2026). In compatibility mode, the character is the period

Ellipsis compiles into Brainfuck. To write an Ellipsis program, enter N ellipses (or sets of 3 periods) into your UTF-8 encoded source file. Then, convert N into its big-endian octal representation… call this OCT. Convert each digit of OCT into new characters based on the conversion table to produce a Brainfuck program. Because the UTF-8 encoding for ellipsis is 3 bytes, a simple (unsafe) compiler for either mode can simply take the source file's size and divide by 3 to obtain N.

A sample program (standard file extension is "..") that beeps is simply 4,793,492 ellipsis characters.

octal digit output
0 >
1 <
2 +
3 -
4 .
5 ,
6 [
7 ]

A reference implementation in ruby is as follows:

(File.size(ARGV[0])/3).to_s(8).chars.map{|x| print %w(> < + - . , [ ])[x.to_i]}

See also