<commit_before>var interpret=i=>{
	var stack=[],//stack
		//I/O functions
		_=i=>[i=prompt`Input:`,stack.push(i)][0],//input
		$=i=>alert(i!=[]._?i:stack),//output
			
		//stack functions
		p=i=>stack.push(i),//push to stack
		g=i=>i!=[]._?stack[i<0?stack.length+i:i]:stack[stack.length-1],//get item from stack
		s=i=>stack.splice(i!=[]._?i:stack.length-1),//splice item from stack
		c=i=>stack=[],//clear stack
			
		//extra math stuff
		P=(i='g()¢2',j)=>[i=i.split`¢`,j=Math.pow(i[0]!=[]._?eval(i[0]):g(),i[1]!=[]._?eval(i[1]):2),p(j)][1],//number^exponent
		R=(i='0¢1',j,x,y)=>[i=i.split`¢`,j=0|Math.random()*(i[1]-i[0]+1)+i[0],p(j)][1],//random
			
		//other functions and builtins
		i=i=>(i=i.split`/([^\\])¢`,eval(`if(${i[0]}){${i[1]}}else{${i[2]}}`)),//if/else conditional statements
		l=i=>(i=i.split`/([^\\])¢`,eval(`for(${i[0]}){${i[1]}}`)),//loop
		S=i=>[i=i!=[]._?document.getElementById('c').value[i]:document.getElementById('c').value,stack.push(i)][0],//get source code chars
		e=eval,
		M=Math,
		r=(i,j)=>(p(j=[...i].reverse().join``),j),//reverse
		L=i=>i.length,//get length
		ś=(i,j=i.split(/([^\\])¢/g),x)=>(p(x=j[0].split(j[1])),j),//split
		j=(i,k=i.split(/([^\\])¢/g),x)=>(p(x=k[0].join(k[1])),k),//join
		m=(i,j=i.split(/([^\\])¢/g))=>eval(j[0]).map(eval(j[1]),eval(j[2])),//map
		ř=(i,j=i.split(/([^\\])¢/g))=>eval(j[0]).replace(eval(j[1]),eval(j[2])),//replace
		š=(i,j=i.split(/([^\\])¢/g))=>eval(j[0]).toString(eval(j[1])),//toString
		
		//syntax from esmin to es6
		i=document.getElementById('c').value
			.replace(/([^\\])@/g,'$1()')
			.replace(/~>/g,'=()=>')
			.replace(/([pgs$])(-?\d+(?:\.\d*)?(?:e[+\-]?\d+)?)/g,'$1($2)')
			.replace(/([_$a-zA-Z]*)“(.*?)”?$/g,'$1(`$2`)')
			.replace(/([_$a-zA-Z]*)\((.*?)\)?$/g,'$1($2)')
			.replace(/([_$a-zA-Z]*)\[(.*?)\]?$/g,'$1[$2]')
			.replace(/([_$a-zA-Z]*){(.*?)}?$/g,'$1{$2}')
			.replace(/([^\\])∞/g,'$1Infinity')
		  .replace(/…/g,'...');
	if(!i.match(/\$[^{]/g))i+=';$()';
	e(i);
}<commit_msg>improve bracket parsing<commit_after>var interpret=i=>{
	var stack=[],//stack
		//I/O functions
		_=i=>[i=prompt`Input:`,stack.push(i)][0],//input
		$=i=>alert(i!=[]._?i:stack),//output
			
		//stack functions
		p=i=>stack.push(i),//push to stack
		g=i=>i!=[]._?stack[i<0?stack.length+i:i]:stack[stack.length-1],//get item from stack
		s=i=>stack.splice(i!=[]._?i:stack.length-1),//splice item from stack
		c=i=>stack=[],//clear stack
			
		//extra math stuff
		P=(i='g()¢2',j)=>[i=i.split`¢`,j=Math.pow(i[0]!=[]._?eval(i[0]):g(),i[1]!=[]._?eval(i[1]):2),p(j)][1],//number^exponent
		R=(i='0¢1',j,x,y)=>[i=i.split`¢`,j=0|Math.random()*(i[1]-i[0]+1)+i[0],p(j)][1],//random
			
		//other functions and builtins
		i=i=>(i=i.split`/([^\\])¢`,eval(`if(${i[0]}){${i[1]}}else{${i[2]}}`)),//if/else conditional statements
		l=i=>(i=i.split`/([^\\])¢`,eval(`for(${i[0]}){${i[1]}}`)),//loop
		S=i=>[i=i!=[]._?document.getElementById('c').value[i]:document.getElementById('c').value,stack.push(i)][0],//get source code chars
		e=eval,
		M=Math,
		r=(i,j)=>(p(j=[...i].reverse().join``),j),//reverse
		L=i=>i.length,//get length
		ś=(i='g()¢',j=i.split(/([^\\])¢/g),x)=>(p(x=j[0].split(j[1])),x),//split
		j=(i='g()¢',k=i.split(/([^\\])¢/g),x)=>(p(x=k[0].join(k[1])),x),//join
		m=(i='g()¢',j=i.split(/([^\\])¢/g))=>eval(j[0]).map(eval(j[1])),//map
		ř=(i='g()¢',j=i.split(/([^\\])¢/g),x)=>(p(x=eval(j[0]).replace(eval(j[1]),eval(j[2]))),x),//replace
		š=(i='g()¢',j=i.split(/([^\\])¢/g),x)=>(p(x=eval(j[0]).toString(eval(j[1]))),x),//toString
		
		//syntax from esmin to es6
		i=document.getElementById('c').value
			.replace(/([^\\])@/g,'$1()')
			.replace(/~>/g,'=()=>')
			.replace(/([pgs$])(-?\d+(?:\.\d*)?(?:e[+\-]?\d+)?)/gm,'$1($2)')
	
			.replace(/([_$a-zA-Z]*)“(.*)”(.*)?/gm,'$1(`$2`)')
			.replace(/([_$a-zA-Z]*)“(.*)$/gm,'$1(`$2`)')
	
			.replace(/([_$a-zA-Z]*)\((.*)\)(.*)?/gm,'$1($2)')
	    .replace(/([_$a-zA-Z]*)\((.*)$/gm,'$1($2)')
	
			.replace(/([_$a-zA-Z]*)\[(.*?)\](.*)?/gm,'$1[$2]')
	    .replace(/([_$a-zA-Z]*)\[(.*?)$/gm,'$1[$2]')
	
			.replace(/([_$a-zA-Z]*){(.*?)}(.*)?/gm,'$1{$2}')
	    .replace(/([_$a-zA-Z]*){(.*?)$/gm,'$1{$2}')
	
			.replace(/([^\\])∞/g,'$1Infinity')
		  .replace(/…/g,'...');
	if(!i.match(/\$[^{]/g))i+=';$()';
	eval(i);
}
{'fraction_non_alphanumeric': 0.4329239489844119, 'fraction_numerical': 0.025271610769957487, 'mean_word_length': 4.579710144927536, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 45, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '294589', 'n_tokens_mistral': 2313, 'n_tokens_neox': 2141, 'n_words': 140}