BrainF*ck interpreter challenge

Pocket


[ソース表示]
BrainF*ckのインタプリタをAS3でどこまで短く書けるか、いわゆるコードゴルフをwonderfl上でおもむろに始めてみました。最終的にshohei909さんが183文字まで短く実装しました。

function $(b,i){with(i){for(s=[n=j=p=k=0],o=[];c=b[k<0?--p:p++];)k?k-=c>>6&&c-92:c<60?c&1?s[j]+=44-c:c&2?o.push(s[j]):s[j]=shift()||(p=b):c&1?p+=k=c&4?-1:!s[j]:s[j+=c-61]^=0;return o}}

http://wonderfl.net/c/49Vu (262 letters by keim_at_Si : Start)
http://wonderfl.net/c/cXpH (242 letters by bkzen)
http://wonderfl.net/c/u2Ll (212 letters by h013)
http://wonderfl.net/c/tfas (198 letters by shohei909)
http://wonderfl.net/c/2zxh (192 letters by keim_at_Si)
http://wonderfl.net/c/tSH9 (188 letters by h013)
http://wonderfl.net/c/nTie (183 letters by shohei909)

Leave a Reply

Your email address will not be published. Required fields are marked *