Tuplary

From Esolang
Jump to: navigation, search

The tuplary programming language was created by Daniel Borowski. The language is composed entirely of brackets and runs in the browser by compiling into JavaScript. Documentation is available on the website.

Example Fibonacci Program

]] ][][ [[]] [][ [ ][]
[][][][] [][ ] [[][][][]] [[][][]] [][ [ [] [[][][]] ][] ][]
  ] [] [][ [ ][]
[][][][]
[][]
  ] [] ] ][][ [[]] [][ [ ]]][ [[][]] ][] ]]]] ] ][][ [[]] [][ [ ]]][ [[][][]] ][] 
[][]
]]
] [][] [][ ] ][][ [[]] [][ [[][][][][][][]] ][] ][]

This tuplary code essentially compiles into following JavaScript code.

function Fib(num) {
  if (num < 2) { return num; } 
  else { return Fib(num - 1) + Fib(num - 2); }
}
console.log(Fib(6));

External resources