run as something like
node conv.js <image> | pta.ijs
don't forget to change the dimensions in pta.ijs.
W=[_=global,$=(f,g)=>g].fill((![p={toString:()=>"*"}])[ | |
q="constructor"][i=0,r="name"]).map(e=>e[i++]).join``+( | |
e=($+[])[--i]).repeat(-(-6>>>++i<<i++)>>2)+r[i]+"&"+p+( | |
[]+[][q])[~-(--i<<4)]+r[-~i--]+e+r[--i]+"+'";9350608244 | |
.toString(30).split``.map(e=>s+=e,s="");_[s][[Math.log] | |
.map(e=>e(3)<3?e.name:e).join`0xasde24`](W.replace(/e/g | |
,"$&x").replace(/x/,"")); |
def input(prompt = "") | |
print prompt | |
$stdin.gets.chomp | |
end | |
def log2(n) | |
Math.log(n, 2) | |
end | |
def int_like(n) |
f =: | , <.@% | |
q =: 0:`((, ; |) ; [ $: {:@f)@.(*@]) | |
k =: |. @: > @ }: @ q | |
boxofstr =: [: <;._1 ' ' , ": | |
pipe =: '|' joinstring boxofstr | |
roof =: (|:@,.~ ('- ' {~ [: <./\ '|' i. ]))@pipe | |
boxroof =: roof @ ; | |
graph =: [: ; [: ,:@{.&.|: boxroof&.> | |
final =: graph @ k |
001. > >~" " >$2p ~ 0&703. | |
:i:0(?^:a=?^:" "=?^$2p1+ | |
:&:&$g&:&2g:" "=?v=?!v&1+& > | |
;Dv? =";"~< >1+&~0&:c)?v^ ;< v o< | |
>&$.; >02g"@"=?!^0["` dnammoc dezingocernu">l?^1v | |
v o;?< ^ number of commands ;o"`"v!?=" ":g2:< | |
@type; >i:0(^ v o< v < > o:1+ ^ | |
@bye; "!eyb"oooo; r>l?^;2[0[>i:0(?!^~:a=?~r]r$.; | |
@what; "this is a command chat interface written in ><>."c2*8. |
run as something like
node conv.js <image> | pta.ijs
don't forget to change the dimensions in pta.ijs.
Object.defineProperty(Array.prototype, "top", { | |
get: function(){ return this[this.length - 1]; }, | |
set: function(v){ return this[this.length - 1] = v; } | |
}); | |
class Operator { | |
constructor(symbol, monad, dyad, precedence, assoc){ | |
this.symbol = symbol; | |
this.monad = monad; | |
this.dyad = dyad; |
#from http://stackoverflow.com/a/16363159/4119004 | |
class String | |
def black; "\e[30m#{self}\e[0m" end | |
def red; "\e[31m#{self}\e[0m" end | |
def green; "\e[32m#{self}\e[0m" end | |
def brown; "\e[33m#{self}\e[0m" end | |
def blue; "\e[34m#{self}\e[0m" end | |
def magenta; "\e[35m#{self}\e[0m" end | |
def cyan; "\e[36m#{self}\e[0m" end | |
def gray; "\e[37m#{self}\e[0m" end |
// http://seiyria.com/c/ | |
// increaseUnits, original source | |
(function (){var r=arguments.length<=0||void 0===arguments[0]?1:arguments[0],i=arguments.length<=1||void 0===arguments[1]?"Cheating":arguments[1];e.unit.inc(r*t.all(n),!0,i),"Cheating"===i&&e.achieve("Pumpkin Eater")}) | |
(function(){ | |
// var r=arguments.length<=0||void 0===arguments[0]?1:arguments[0],i=arguments.length<=1||void 0===arguments[1]?"Cheating":arguments[1]; | |
let r = arguments.length <= 0; // if there are no arguments | |
r = r || undefined === arguments[0]; // or the first is undefined; | |
if(r){ |
s=((C=f=>g=>(...a)=>f(g(...a)))&&(H=a=>[...a])&&(v=c=>a=>new(c)(a)))(Set);S=n=>[n,n].map(e=>e.map?e[1]:e).map((e,i)=>e.slice(...s([i,1])));O=J=e=>n=>(e+[])[n];p=h=>!(h&(1<<31)|!h);G=global;h=(f=[][1])=>(c=+[])=>(f+[])[c];E=s=>h(s)(+[]);R=H=>L(H).reverse();s=C((d=".",Z=x=>x))(C(H)(s));D=f=>()=>C(Z)(f);Y=(f,n)=>a=>p(n)?f(Y(f,~-n)(a)):a;L=H;T=(n,i,k=n)=>p(i)?T(n+k,--i,k):S(n)[++[[]][+[]]];f=(M=J)(![]);q=W=>Y(D,W);j=q(2)(E);w=0;X=d=>O=G[(U=x=>x[t](i*z*i+z+z-w++))(16465174322)];r=C((A=h(F=(()=>G)[c=`constructor`]),F)(b=[921631607,1061308,1160108].map(e=>e[t=`${o=(I=++i/0+[])[z=3<<1]}oS${i&&o}r${I[z/=2]}ng`]((2<<2<<2)+~-i)+[(T(A(2<<2),2)+d)[i]||[]],i=0).join``).bind({[z^i]:-192.3,[z-2]:402.4,[o+E(p)+I[z]+E(E)]:E(R)+f(2*2)+T(f(2),2)+J(c)`1`+j`````${j}`+A(2<<2)+E(q)+J(q?c:s)(J(z&~i)|1)+M(!+[])(1<<2>>2<<0)+f(2),[[14,2,3,6].map(A).join``]:640,y:420}))(X)();O[U(22288)](r+E(X)+M(p)(15)); |
C:\Users\Conor O'Brien\Documents\Programming\stacked\main (master) ([email protected]) | |
λ node stacked.js -t | |
All checks (44) passed successfully | |
C:\Users\Conor O'Brien\Documents\Programming\stacked\main (master) ([email protected]) | |
λ REM goodnight, sweet world | |
C:\Users\Conor O'Brien\Documents\Programming\stacked\main (master) ([email protected]) | |
λ git commit -am "added more tests; fixed some repl bugs" | |
warning: LF will be replaced by CRLF in src/funcs.js. |