Nary

Nary (pronounced "enn-airy") is a programming language "skin" that was created by User:Conor_O'Brien. It's purpose is to be very successful at programs that have a source restriction (e.g. do not use any of character ). Nary is based off of the term n-ary, referring to something whose arity is n.

Concept
Nary allows the user to use an arbitrary set of symbols for programming, of which the program only uses. Then, after the set is decided upon, a destination language and source is chosen and the source is encoded (from ASCII) into base N, where N = cardinality of symbol set. After, each number in base N is mapped to the symbol set. For example, a symbol set  would map each of "Hello" into base three padded  then mapped to the symbol set.

Syntax
The syntax of Nary is quote simple, and is divided into two parts:
 * 1) The preamble
 * 2) The body

The preamble is defined to be the first "line"; the line can be defined in various ways, depending on the structure of the preamble. The most common is a space-delineated string containing the set, followed by a newline. This newline can be replaced by a duplicate of the last command. If there are no spaces, each command is assumed to be a single character.

The body is then mapped in the process described above.

Generator and Implementation
RegExp.escape=function(s){return s.replace(/[-\/\\^$*+?.|[\]{}]/g,'\\$&')};function pad(e,q,h=" "){return e.length>q?(e.concat(["."])).slice(-q-1,-1):q==e.length?e:pad([h].concat(e),q,h)}function nary(src,set){max="~".charCodeAt.toString(set.length).length;set=typeof set=="string"?set.split(""):set;return src.split("").map(function(chr){return pad(chr.charCodeAt.toString(set.length).split("").map(function(byt){return set[+byt]}),max,set[0]).join("")})}function toNary(program){set=[];b="";for(i=0;i<program.length;i++){g=program[i];if(g==" "){set.push(b);b=""}else if(g=="\n"||set[set.length-1]==b){set.push(b);break}else{b+=g}}if(set.length==1)set=set[0].split("");program2=program.slice(i+1,program.length);return program.slice(0,i+1)+nary(program2,set).join("");return nary(program,set).join("")}function fromNary(output){set=[];b="";for(i=0;i<output.length;i++){g=output[i];if(g==" "){set.push(b);b=""}else if(g=="\n"||set[set.length-1]==b){set.push(b);break}else{b+=g}}output=output.slice(i+1,output.length);max="~".charCodeAt.toString(set.length).length;for(var i=0;i<set.length;i++){output=output.replace(new RegExp(RegExp.escape(set[i]),"g"),i)}return output.match(new RegExp(".{0,"+max+"}","g")).map(function(e){return String.fromCharCode(parseInt(e,set.length))}).join("").slice(0,-1)}

To create an Nary program, one may opt for any easy way of doing this. In this case, you simply need to create your preamble, then type your program as normal. Set this result into a string (call it ), then call. The result is your program.

To interpret an Nary program (call that ), simply call. Call the language that  was written in. Then, the final result is written in.