Hatena::Grouprubyist

たばさの RSSフィード

12/13(木) 2007

電卓 続き , 正規表現

| 電卓 続き , 正規表現 - たばさの を含むブックマーク はてなブックマーク - 電卓 続き , 正規表現 - たばさの

判定の順番入れ替えたり。入れ替えるだけでうまくいくのかも良く分かっていない。

基本は、一行読み込んで、優先順の高いものからチマチマと変換して前後と繋いでまたメインループに投げる、の繰り返しでやっています。該当するものが一個ずつ減っていくので最後には「x=...」など単純な形になるはず。再帰関数も無限ループにならなければいつかは終わる。前のほうに書いたものから変換するかは良く分からない部分も。ひょっとしてやり方変えないと駄目なとこもあるかも。短いものならいまのところ不都合は見当たらないと思う。

ちょっと言語っぽくなったかなあとおもい、golfをやってみる。Hello, world!はまあOK。echoで早くもつまずく。Ctrl+Zの扱い変えてどうにかOK。gets("7")などもrubyに丸投げしてみるもいまいちうまくいかず。while gets("7"){..}でループ抜けられない。保留。


入れたもの

array[1..3],

/asd(fg)/=~data => set $&,$1。でも変数判定変えてないのでまだ利用できない、意味なし。

{ と } の数が合わない場合次の行を読む、複数行処理。

testhen.txt 作成



# hensu.rb

prompt=">"
$lprompt=">>"
$prprompt=":"
$repprompt="|>"

$mem=[]
$hlist=[]
$assign={}
$his=[]

$hisfile="hensu-his.txt"

class Fv
 attr_accessor(:hlist,:assign,:name,:argv,:body)
end

def exist x
 $hlist.each{|i|
  return true if i==x
 }
 false
end

def existf x
 /\(.*\)/ =~x
 return false if !$`
 name=$`
 $hlist.each{|i|
  /\(.*\)/ =~i
  n=$`
 # p"exf",x,n,name,"$$"
  if $&
    if n==name
      return true
    end
  end
 }
 false
end

def getfunc x
 /\(([^\)]*)\)/ =~x
 vals=$1
 name=$`
 $hlist.each{|i|
  /\(([^\)]*)\)/ =~i
  n=$`
  if $&
    if n==name
      arg =$1
      return [i,arg.split(','),vals.split(',')]
    end
  end
 }
 false
end

def set x
 n=0
 while 1
  ($assign[x]=n ;$mem[n]=""; break) if $mem[n]==nil
  n+=1
 end
end

def argcalc arg,vals,a
  tmp=a.dup
  arg.length.times{|i|
    v=mainloop(vals[i])
    tmp.gsub!(arg[i],v)
  }
  mainloop(tmp)
end

# uhenchi
def calc d
 # p d
 /- *-[0-9]+/=~d
 d.gsub!(/- *-/,'+') if $&
 # func(..)
 /([a-zA-Z_][a-zA-Z_0-9]*\([^\)]+\))/ =~ d
 mae=$`
 usr=$'
 if $1
  if existf($1)
   f,arg,vals =getfunc($1)
   a = $mem[$assign[f]]
   a = argcalc(arg,vals,a)
   # p a,f,arg,vals,"$!$"
   return calc(mae+a.to_s+usr)
  else
   return calc(mae+usr)
  end
 end
 return calc($`+calc($1)+$') if $1
 # (...)
 /(.*)\(([^\)]+)\)(.*)/ =~ d
 return calc($1+calc($2)+$3) if $2
 # array
 /([a-zA-Z_0-9]+)\[([^\.])\.\.([^\.])\]/ =~d
 return calc($`+calc($1)[$2.to_i..$3.to_i]+$') if $&
 # ..*/..
 /([a-zA-Z_0-9\.\[\]]+ *[\*\/] *[a-zA-Z_0-9\.\[\]]+) *([+\/\*\-].+)/ =~ d
 return calc($`+calc($1)+$2) if $2
 # ..*/..
 /(.+[+\/\*\-]) *([a-zA-Z_0-9\.\[\]]+ *[\*\/] *[a-zA-Z_0-9\.\[\]]+)/ =~ d
 return calc($1+calc($2)+$') if $2
 # ..+-..
 /([a-zA-Z_0-9\.\[\]]+ *[+\-] *[a-zA-Z_0-9\.\[\]]+) *([+-].+)/ =~ d
 return calc($`+calc($1)+$2) if $2
 # p d
 /([a-zA-Z_0-9\.\[\]]+) *([+\*\-\/%]) *([a-zA-Z_0-9\.\[\]]+)/=~d
 a=$1
 si=$2
 c=$3
 if !a
  if exist(d)
   a = $mem[$assign[d]]
   return a.to_s
  else 
   system(d[1..-1]) if d.class==String && d.length>0 && d[0,1]=="$"
   return d 
  end
 end
 if exist($1)
  a=$mem[$assign[$1]] 
 else
  a=$1
 end
 if exist($3)
  c=$mem[$assign[$3]] 
 else
  c=$3
 end
 /[^0-9e+\-\. ]/ =~ a.to_s
 f1=$&
 /[^0-9e+\-\. ]/ =~ c.to_s
 f2=$&
 return calc(a).to_s + calc(c).to_s if f2!=nil || f1!=nil
 return calc(eval(calc(a).to_s + si + calc(c).to_s ).to_s)
end

def getfname da
 / *(.+)/ =~ da
 file =$1
 file ="mylog.txt" if !$1
 file
end

def memo
 open($hisfile,'a'){|f|
  f.puts $his
 }
end

def funccalc a,b,c
  fn=Fv.new
  fn.name=a
  fn.argv=b.split(',')
  fn.body=c
  fn
end

def setval a,b
  ($hlist<<a) if !exist a
   set a if $assign[a]==nil 
   $mem[$assign[a]]=calc(b)
   return $mem[$assign[a]]
end


def mainloop da
 $his<<da
 # regexp
 /\/[^\/]+\/ *=~.*/ =~ da
 eval($&) if $&
# p $&,$1
 setval("$1",$1) if $1
 setval("$&",$&) if $1
 # function
 /([a-zA-Z_][a-zA-Z_0-9]*\((.*)\)) *=(.+)/ =~ da
 if $&
   a=funccalc $1,$2,$3
   # p a
   $hlist<<a.name if !exist a.name
   set a.name if $assign[a.name]==nil 
   $mem[$assign[a.name]]=$3
   return a.name
 end
 # while
 /while  *([^><=]+)([=><]+)(.+)  *\{([^\}]+)\}/ =~ da
 body=$4
 if $1
  an =calc($1)+$2+calc($3)
  if eval(an)
    mainloop(body)
    return mainloop($`+"while "+$1+$2+$3+" {"+body+"}"+$')
  else
    return mainloop($`+$')
  end
 end
 /while  *([^\{]+)  *\{([^\}]+)\}/ =~ da
 body=$2
 if $1
  an =mainloop($1)
  if an
    mainloop(body)
    return mainloop($`+"while "+$1+" {"+body+"}"+$')
  else
    return mainloop($`+$')
  end
 end
 # num.times
 /([a-zA-Z_0-9]+)\.times *\{ *([^\}]+) *\}/ =~ da
 body=$2
 if $&
  return calc($1).to_i.times{ |it|
    a=body.gsub("it", it.to_s)
    # print "(#{a})",$repprompt;
    mainloop a
  }
 end
 # gets
 /gets(\([^\)]*\))?/ =~ da
 if $&
   a=eval($&)
   setval("$_",$_)
   return a if $`=="" && $'==""
   a="" if a==nil
   return mainloop($`+a+$')
 end
 # multi
 /([^;]*);(.*)/ =~ da
 if $1
   mainloop $1
   return mainloop($2)
 end
 /if  *(.+)==(.+)  *then (.+)  *else  *(.+)/ =~ da
 mae=$`
 usr=$'
 if $1
  if calc($1)==calc($2)
    return mainloop(mae+$3+usr)
  else
    return mainloop(mae+$4+usr)
  end
 end
 /if  *(.+)<(.+)  *then (.+)  *else  *(.+)/ =~ da
 if $1
  if calc($1)<calc($2)
    return mainloop($`+$3+$')
  else
    return mainloop($`+$4+$')
  end
 end
 /if  *(.+)>(.+)  *then (.+)  *else  *(.+)/ =~ da
 if $1
  if calc($1)>calc($2)
    return mainloop($`+$3+$')
  else
    return mainloop($`+$4+$')
  end
 end
 # print
 /print  *(.+)/ =~ da
 ( a= calc($1)
   print a
   return $`+a+$' ) if $1
 # puts
 /puts  *(.+)/ =~ da
 ( a= calc($1)
   puts a
   return $`+a+$' ) if $1
 # simple equation
 /([a-zA-Z_][a-zA-Z_0-9]*(\[[0-9]+\])?) *= *(.+)/ =~ da
 a=$1
 b=$3
 if a
   return setval(a,b)
 else
   if da=="??"
     $hlist.each{|i| 
       puts $prprompt+i+" = "+$mem[$assign[i]].to_s
     }
     return""
   elsif da=="?"
     puts $hlist*","
     return ""
   elsif da=="???"
     p $mem,$hlist,$assign
     return ""
   elsif da=="his"
     p $his
     return ""
   elsif da=="hiss"
     return memo
   elsif da=="hisl"
     return mainloop("!load #{$hisfile}")
   elsif exist(da) 
     a=$mem[$assign[da]]
     system(a[1..-1]) if a.class==String && a[0..0]=="$"
     return a
   elsif da=="????"
     p "hensuu:",$hlist,"wariate:",$assign,"memory:",$mem
     return ""
   elsif da=='exit'
     memo
     exit
   elsif da=='help'
     help
     return ""
   elsif da[0,1]=='$'
     puts da[1..-1]
     system(da[1..-1])
     return ""
   elsif da[0,5]=="!load"
     file =getfname da[5..-1]
     open(file,"r"){|f|
       n=0
       f.each{|data|
         n+=1
         puts ':'+$lprompt+data
         puts mainloop(data.chomp)
       }
     }
     return ""
     # puts "loaded \'#{file}\'."
   elsif da[0,5]=="!save"
     file =getfname da[5..-1]
     open(file,"a"){|f| 
       $hlist.each{|i| 
         f.puts i.to_s+"="+$mem[$assign[i]].to_s
       }
     }
     return "saved as \'#{file}\'."
   else
     a=calc(da)
     return a
   end
 end
end

def help
 puts "example: 'x=1','y=text','?'(list),'z=x*2+(5-x)','!save [file]'(file save),'!load [file]', '???'(internal hensu dump),'$dir'(exec system.command) etc."
end

help
print prompt

# check whether this block is a single line
def blockok d
  a=d.gsub(/[^\{\}]/,'').gsub(/\{\}/,'')
  while $& ;a=a.gsub(/\{\}/,'') end
  return true if a==""
  false
end

a=""
while gets
  if a!=""
    a = a+";"+$_.chomp 
  else
    a = $_.chomp 
  end
  if blockok(a)
    mainloop(a)
    # puts a
    print prompt
    a=""
  else
    print $repprompt
  end
end


testhen.txt , test


$type testhen.txt
$dir his*
$dir *his*
x=12.6
x=x*x
x=x*x
x=x*x
x=x*10.1
x=x*10.1
x=x*10.1
x=x*10.1
x=x*10.1
x=123456
x=x*x
x=x*x
x=x*x
x=x*x
x=x*x
x=x*x
x=5
y=3
zz=6
f(x,y)=12*x+y+23+zz
?
??
z=f(4,5)
??
s=qwertyuiop
z=s[1..4]+s[3..5]
fact(x)=if x==0 then 1 else x*fact(x-1)

fct=fact(100)
if fct==93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000 then puts ok else puts bad!
if z==wertrty then puts ok else puts bad!

テスト結果の一部

>!load testhen.txt
...(略)

:28>>s=qwertyuiop
qwertyuiop
:29>>z=s[1..4]+s[3..5]
wertrty
:30>>fact(x)=if x==0 then 1 else x*fact(x-1)
fact(x)
:31>>

:32>>fct=fact(100)
93326215443944152681699238856266700490715968264381621468592963895217599993229915
608941463976156518286253697920827223758251185210916864000000000000000000000000
:33>>if fct==9332621544394415268169923885626670049071596826438162146859296389521
75999932299156089414639761565182862536979208272237582511852109168640000000000000
00000000000 then puts ok else puts bad!
ok
ok
:34>>if z==wertrty then puts ok else puts bad!
ok
ok
>

今日のgolfusr-language pop

| 今日のgolfusr-language pop  - たばさの を含むブックマーク はてなブックマーク - 今日のgolfusr-language pop  - たばさの

z80が。


lang (entry,persons): id,,,
-------------------------
Ruby           (1174,283): ,	flagitious(oops other solution is embed, but this one uses mathn :),666,AtoMa,Brian Adkins,Brian with Ben,Charles,Chuck Vose,Ciaran,Daniel Butler,DarkDust,Duane Bailey,Florian,GOROman,George Bush,GooGoo+.,Grant Hutchins,Habitue,Hector Vergara,Hexa,Hyperair,JaeSharp,JohnDough,KEN3,Kihara,Mark Byers,Mark Byers (symbol),Mark Byers 2 (symbol),Matthew,Milly,Myrd,Phill Kenoyer,RiSK,Robert,Rozza,Scott,Servo,Slartibartfast,Sohum,Spug,SuperFrankie,Takagi,Tay,Tomy,YAA,Zauberer,_,_N,_N(rand),___,a,ab,ageldama,akausagi,altair,ammmm,apeiros,ar,arikui,as,atheye,b2ox,bascule,bert,brad,brik,chucker,comp.lang.ruby,crazyjimbo,dai,dan,dan5,diddle,drunk guy from ohio,dux,dw,eban,eban(cheat),eban(noexec),eban(regexp),eban(require),eban(sym),eil,elb,ema,fkm,flagitious,flagitious(0sym),flagitious(alnum),flagitious(alt),flagitious(embed),flagitious(mathn),flagitious(oops alnum),flagitious(oops other solution is embed, but this one uses mathn :),flagitious(req),flagitious(semi embed),flagitious(sym 4),flagitious(sym),flagitious(unembeded),flagitious(zlib),fmonkey,foo,fsystem,fuji,fuu,g5n,geir,geir_again,german,gomis,greenpenguin,gtheoret,ha-tan,hermi,hi,hirose,hirose(sym),hrkw,irori,irori(alt),irori(mathn),isrc,iwadon,j,jacknero,javara,jj,jj-jrun,jrun,jrun1,junathecca,juno,kaki,kanagawa,kep,kermi,kik,killy971,kinaba,knu,kodera,konn,konn (embed &amp; not algorithmic),krokofant,ksk,ksk (mathn),ksk (sym),ksk(cheat),ksk(sym),ksk(sym+3B),kstn,kt3k,kt3k(sym),kt3k(sym_),kurimura,ky,lazymage,leonid,leonid (alnum),leonid (no brain &amp; alnum),leonid (pack),leonid (sym),leonid (sym) 2,leonid (symbol),leonid(sym),leonid(sym)2,letter,lifthrasiir,lokiju,m.ukai,ma,maki,mamamoto,masadoi,mather,megun,mgoss,minke,moriB,mskzzz,mskzzzz,murky-satyr,nakahira,naruse,nattow,nawa,nazo,neko,niha,niha(majime),niha(mathn),niha(zurui!),niwa-tori,nmk,notmatt,nozuru,nullpo,octech,ombra,oto-oto-oto,oto-oto-oto(),oza,ozy4dm,ozy4dm(inchiki),pnomolos,pooq,poqute,primo,probablycorey,puzzles,qwejkl,r,raspberry lemon,rawwell,rickrickrick,roflcopter,s,satoru,shinak,shinh,shinh (C C++ Ruby Python PHP Perl),shinh (C C++ Ruby Python PHP),shinh (mathn),shinh(alpha),shinh(cheatless),shinh(embed),shinh(other),shinh(sym),shinh(symbol),shrapnel,shuyo,siru,sourcek,spelunker,sshi,suko,sumim,t_issie,tabasa,tad,takaaki,takase,takatoh,tamubun,tapasa,tar0_t,te,tell,test,th,tocken,tokiwa,tpope,tsukkee,ttsy,tututu,tyos,umasika,unno,usa,usa(alnum),usa(cheat),usa(embed),usa(mathn),usa(rehabilitation),usa(symbol),usa(t0),wara,wedge,wookay,wow,xfy,ySas,yasuhito,yhara,youchan,yowa,yowa(e),yowa(no pack),yunyun,yvl,znz,zraii
C              (818,275): ,18kb,51b,51b ,51b(calc),51b(cheat),51b(embed),51b(no exec),51b(not bin),51b(not embed),51b(竊粗mbed),666,7gyou,7gyou(after),7gyou(cheat),AKrotkov,Adam,Al Dimond,Amnesiasoft,Ancient123,Andrei,Anon,Arturion,BAR,Blayne,Bongo Bill,Brute Force Man,CD,CScppig1995,DS,Dan,Dashiva,DiDi,Doster,DrFlibble,EarOwl,Faust,Frane,Free Bird,GauHelldragon,Gizzle,Gus,Harkonnen,Inky,Inside,Itamotsu,Kee,Kei,Ki,Kibi,MagicBobert,Magnus Jonsson,Mark Byers,Myrd,Natu,Negitoro,Okiesmokie,Patrick,Reed1,Reed2,Reed3,RiSK,Robert,Sarav,Sasha Slutsker,Skrud,SocialSecurity,Spliznork,TENDON,TenBin,TestingSomething,TheEconomist,TimO,Yuuki--;,Zauberer,_,a,abobo,adonai,afarmer,ahoudori,akihiro,albert,alex,alex2,alexmdac,alofalt,ancient123,angpoo,aoi,ark,bascule,blueblimp,boo,breadbox,dai,daira,dm,doubleukay,dud,eban,educa,egashira,emaland,endu,entragian,examiner,fkino,flagitious,foo,gaus,ggg,goh,green,h013,h0shu,havehave,hilite250,hina,hinoe,hinoe(another),hinoe(hidoi),hinoe(sorry),hiraku,hirose,how,hyoroku,i708,irori,ishiguro,jackpalance,joe,jojo,kamekozo321,katsu,kazuki,kcha,keigo,kenz,kikou,kinaba,kios,koedo,koge,kohei,kohei2,kohy,kotetu,kozima,krait,kt3k,kurimura,kyasu,lame attempt,letter,lifthrasiir,m.ukai,ma,maa,main(){system(&quot;cat&quot;);},main(){system(&quot;dd&quot;);},mamedaifuku,masashi,mayarero,melonhead,mendo1099,mezashi,mi,moge,mori,moriA,mskzzz,mskzzzz,murky-satyr,mushi,naka,naoya,nazo,negi,neocat,neologic,niha,nobody,not embed. leftmost? see http://shinh.skr.jp/m/?date=20070213#c12,notogawa,notogawa(cheat),ntabe,nullpo,obvious troll,oichang,ombra,oto-oto-oto,ozy4dm,ozy4dm(inchiki),paleman,papicon,pascal,peterx,pf,phoenix,pi8027,pneuma,ps,qebab,restday2,rgb_yoshijima,rickrickrick,ryoakg,s,s0upa,s_fox,sa,sabupot,sadakiyo,sargon,scottg,sentium,sgr,sh0u,sheerbird,shiena,shinh,shinh (C C++ Ruby Python PHP Perl),shinh (C C++ Ruby Python PHP),shinh(cheat),somebear,sourcek,sugarfree,sunsuron,suzume,t_issie,tabasa,takashi4233,tako,tanzaku,tapooh,ten,tensaix2j,test,tlwlvmtm,tmf,tokiwa,ttsy,tututu,tyoro,tyos,unco,unnonouno,usa,viznut,wiseler,wow,x0d,xenocide,yamada,yatchan,yhara,yoshijima,yowa,yshl,yshl(C, PostScript(bin)),yshl(C, PostScript),yshl(polyglot C and PostScript(bin)),yshl(polyglot C and PostScript),ysn,yt123,yu,yuizumi,yuta,yzx,zaki,znz,zybler,zyblerair,↑hinoeさんのコードを弄ってみた(by Ozy)
Python         (772,163): ,Adam Blinkinsop,AdamG,Aglet,Alexs,Amadeo Bellotti,Arafangion,Berengal,BioGeek,Dashiva,Defenestrator,Defenestrator (cheat),Ephphatha,Frane,HzFalcon,Jacob Rus,Jay,Jean-Louis,JohnStalcup,JonAllie,KUN,Ksero and #python,Lanzaa.,Mark Byers,Mark Byers (no binary),Michael,Milly,Patrick,RiSK,Richard Loveland,Robert,Ropo,Sasa,Sasa Petrovic,Sasa Petrovic2,Sasa Petrovic3,Sean,SeeNoEvil,SeeNoEvil (haha),SeeNoEvil(embed),Simple Solution,Stupid1,Thomas Geeee Willis,TsXc,U1A,__nb__,ac,accurrent,adbachman_01,adbachman_02,adbachman_03,ap,blueblimp,boo,chobo,darked,dinomite,doo,dplusplus,drigz,eban,ek,elb,elb(no compression),emaland,flagitious,flagitious and Mark Byers,flatline,fredrik,fuji,gee,go,hiro.suzuki,hiro.suzuki (zip),hiro.suzuki縲€,hiro.suzuki縲€(no load file),hirose,hirose(sym),houeland,itsme,jijixi,jj,jk,junya,kamezou,kashifkhan,ksk,kt3k,kt3k(...,kt3k(another,kt3k(no bin),kt3k(sym),letter,lifthrasiir,lifthrasiir (no cheat),lyx,mft,mho,mkszzz,morchin,moriA,mozi codo,mskzzz,mskzzzz,musicinmybrain,nack,nazo,neger,neger2,neger3,neger5,neger6,neger7,neger8,nob,nobody,notme,notogawa,octech,oqre,ozy4dm,pachiki,pbx,pp,primo,py2,qebab,qebaba,quietgolfer,rawwell,ryo,sakaki,sdfsd,sdkay,shaurz,shbird,sheerbird,shimizu,shinh,shinh (C C++ Ruby Python PHP Perl),shinh (C C++ Ruby Python PHP),siru,skrzynka,stesch,strank,superneger1,superneger7,superneger8,tabasa,tahai,tenkoma,test,thor,tokiwa,tyr,usa,wer,wow,zak,zakj,zeek,zetamatta,znz
Perl           (584,165): ,324324,Aglet,Bhaskar,CD,Ciaran,Eric Elinow,Eric Elinow2,Fotios,Hテ・kan,Io_fan,Leonardo Herrera,Mark Byers,Milly,Mithran,RayQ,RiSK,Robert,Sarav,Sarav(not my code),Skrud,SocialSecurity,Spencer Schumann,TAKESAKO,Tadman,TakashiYamaoka,Terje K,YAA,Yagi,ace,alp,another,ar,blazar,brad,bran,breadbox,dacci,dankogai,dankogai (cheat?),davidad,deq,dinomite,drmz,eban,eban(cheat),emaland,entragian,erics84,fkm,flagitious,foo,fotios,fujiwara,gamehaus,gomis,haru,hassy,hassylin,havana,hiroaki,hirose,hotaru,hs,initself,intangible1,intangible2,intangible_not_cheat,jg,jimr,jls,junathecca,k12u,kf,kinaba,kohei,komondorok,konbu,kounoike,kozima,ksk,kt3k,letter,m.ukai,maa,mauke,melonhead,mho,momo,moriA,morimasa,morita,moritan,mskzzz,mskzzzz,mwb,nazo,negi,neocat,nh33,niha,nnn,nohat,noname,nonstrict,nuko,nullpo,odz,op,osa,ott,ott(cheat),ott(embed),ott(nocheat),ott(noembed),ozy4dm,paperhat,pascal,ph,ph2,pp,prakash,sa,sabupot,safii,saitoma,scottg,shinh,shinh (C C++ Ruby Python PHP Perl),shinh (sym),shinh(symbol),shmem,sma,sma1,sugarfree,sunsuron,t4652f85e,t_issie,tabasa,tacky,teengenerate,tete,theducks,ti,tripa,ttt,tybalt89,umasika,unau,usa,uu,whitebell,wow,xhl,ySas,ySas (cheat),ySas(embed),ySas(inspired by kinaba),yoortje,yuki,yuki_neko_nyan,yzx,zetamatta,znz,・儡as
Haskell        (510,78): ,.[1..100]&gt;&gt;=pen,2nd sample output is wrong!,7gyou,80,Ben,Defenestrator,Gus,Kee,Magnus,Magnus Jonsson,NMSpaz,This is test code.,[1..100]&gt;&gt;=pen,[1..100]&gt;&gt;=pen (not golf),[1..100]&gt;&gt;=pen(MushaKushaShiteYatta),[1..100]&gt;&gt;=pen. leftmost? see http://shinh.skr.jp/m/?date=20070213#c12,_,_(embed),a,aljee,b2ox,b2ox(embed),b2ox(invalid),b2ox; un=b2ox,blue,blueblimp,breadbox,davidad,emoken,flagitious,glguy,halt,irori,katsu,kinaba,konn,konn(ERAT),konn(FER),konn(MR),kt3k,kurimura,kuwashima,lazard,m,mgsloan,moriA,moriA(exec),moriB,mskzzzz,nazo,notogawa,notogawa(cheat),notogawa(embed),notogawa(exec),notsmack,oxy,ozy4dm,pbx,r-west,rulerofutumno,sakai,scottg,seasons,shaurz,shinh,smly,sshi,sss,tabasa,takatoh,tanakh,tanakh; un=tanakh,tanzaku,test,testprogram,tex,ttsy
PHP            (491,207): ,#suidroot,(given integer &lt; 111) [1..100]&gt;&gt;=pen,.[1..100]&gt;&gt;=pen,18kb,Andrew,Eddie,Eduardo,Emanuel,EmoJimbo,EricSmith,FalconNL,FlatLine,GotMex?,HotRod,HzFalcon,HzFalcon(symbol),Inoue,JohnStalcup,Jose,Justin,K_TAKAGI,Kevin Francis,Kevin G Francis,Kim...,LatinoHeat,LatinoThunder,Loadx,Mark Byers,Marz,Mearn,Mighty,Mike Alexander,Mike Alexander2,Milly,Newave Designs,Paul,Paul Wilkins,PeePeeFace,RiSK,RichieC,Robert,Sasha Slutsker,Sean,SeeN,Simon Lim,SirFartsAlot,Slick,Stupid1,T,T-bag,TENDON,TrueJournals,VatoLoco,Vraylle,WillieGollino,YungSang,ZARU,Zach,Zack,[1..100]&gt;&gt;=pen,a,abobo,acp,adachi,afarmer,ajkirwin,akkun_choi,alex,altair,anonymous,apalan,apo,ar,ar(cheat),ast,beton,blaat,blaat2,blaat3,bluejean,bluejean(symbol),bluejean(symbol_),bumbumface,charly,chatii,chucker,codetester,con,daira,daze,deanWombourne,decama,demonicus,devidos,doraenator,eban,eil,elb,emaland,enSige,ensige,entragian,eviljim,fal,flagitious,forte,ha1t,hamori,hamori縲€,hh,hi-poko,hilde,hisapoko,hogera,hohe(given integer &lt; 111) [1..100]&gt;&gt;=pen,honestnaoko,hs,iatz,ideo,igooo,imoto,intangible,iphoting,itochin,j4,jazzanova,jln,juno,kaska,kiba@kei-3,kinaba,konbu,koyuki,ksk,kt3k,l-tama,letter,mastercheap,mechaong,megun,mikechml,mitsu-,mogesura,momo,msk,mskzzz,mskzzzz,nazo,neko,nic,noah,nob,nuko,nullpo,ozy4dm,patches,persilian,php is for fools,pistoriusp,poopdawg,pop,pw,r28,rawwell,razor.crusade,rgb_yoshijima,rpatel10,shadow,shimooka,shinh,shinh (C C++ Ruby Python PHP Perl),shinh (C C++ Ruby Python PHP),siru,skyrc,smeghead,soushi,submatt,sunsuron,t_issie,tabasa,tanakh,tazyamah,te,test 1,testmn,thefizzbuzzthug,thetrve,tyoro,umasika,unau,usa,w,webvictim,wow,xebu,xroric,yae,yoshijima,yowa,yuki,yzx,yzx(cheat),yzx(exec),znz,zybler,竊薙≠縺サ縺・
JavaScript     (326,50): ,51b,7gyou,AtoMa,Dashiva,FalconNL,JohnStalcup,Mark Byers,Milly,Patrick,RiSK,YAA,YungSang,boring,dsl,eban,eil,emaland,hirose,hogehoge,junathecca,kaki,kemco,kinaba,kt3k,kweg,letter,mi,motemen,mskzzzz,murky-satyr,murky-satyr (cheese),murky-satyr (emb),nanto_vi,nanto_vi (cheat),nanto_vi(cheat),nattow,nawa,nazo,nuko,ofk,ozy4dm,pooq,shinh,t4652f85e,tabasa,wow,xyzzy,yowa,znz
Postscript     (323,40): &lt;&lt;/The{}/answer 42/anser 42/to{}/life?{=}/universe?{=}/everything?{=}&gt;&gt;begin{(%stdin)(r)file token not{exit}if exec}loop,Mark Byers,Mark Byers (no binary),Troy Howard,konbu,kt3k,makoto-k,makoto-k(symbol),moriA,mskzzzz,shinh,tabasa,ySas,ySas (embed),ySas (not bin),ySas(bin),ySas(embed),ySas(not bin),ySas;,ySa・・yshl,yshl (alnum),yshl((%stdin) (r) file read {2 idiv =} if quit),yshl(C, PostScript(bin)),yshl(C, PostScript),yshl(a few bin),yshl(alnum),yshl(bin),yshl(bin)(cheat),yshl(bin)(embed),yshl(bin)(perl shinh 1174511406),yshl(cheat),yshl(compress),yshl(embed),yshl(embed)(bin),yshl(no bin),yshl(not bin),yshl(perl shinh 1174511406),yshl(polyglot C and PostScript(bin)),yshl(polyglot C and PostScript)
OCaml          (299,53): ,Adam Blinkinsop,Robert,SugarSun,airobo,airobo(noexec),blueblimp,bungee,elb,flagitious,hat,hrkw,jijixi,jijixi(noexec),kinaba,kizz,kozima,ksk,ksk (MD),ksk(Num),ksk(bin),ksk(cheat),ksk(embed),ksk(noexec),kt3k,kuwashima,letter,m.ukai,m.ukai(Num),m.ukai(embed),m.ukai(exec),m.ukai(noexec),moriA,mskzzzz,nazo,phoenix,pooq,s,samvid,shinh,smly,soutaro,sshi,suiginto,suiginto(bin),suiginto(embed),suiginto(embed)	,tabasa,tapooh,unnonouno,xhl,ysn,ysn(noexec)
Java           (284,144): ,7gyou,ACCELE,AfzalB,AfzalB Recursive,Ankur,Anonymous does not forgive,Arjun Comar,Bobo,Brian S,Brian Yi,Chris Drost,Dab,Dashiva,David Chan,Glimt,Gu,Gus,Imran,Ineffable3000,Isaac @ Programming,Joe,Joe(symbol),JohnStalcup,Jose,Kee,Keih,Mark Byers,Matt,Notch,PrestonP,RyanL,SIS,Sam,Sasha Slutsker,Spug,Stu Coates,TENDON,Tom,Undermined,Yoshiori,aaaaa,abatkin,abc,baxter,bchic869,bleis,breadbox,breadbox is a gay faggot,btcqg,bungee,cep,champkind,coke,craigus,csjunker,dEp,daira,degei,ds,eeb,elb,elb_cheat,enk,fs,fuddy,fune,georgia,geronimo,hoge,javara,jj,joe,joeBob,kemco,kenz,kibi,kik,kinaba,kra,krokofant,kt3k,kurimura,kweg,leatherboundbooks,letter,letter(embed),mark,masa,megun,mn,moe,moe2,mskzzz,mskzzzz,murky-satyr,n8theGr8,nack,namamekashi-banchou,nattow,nayamashi-banchou,nazo,nielsc,niwa-tori,notogawa,notogawa(cheat),okamotok,orrc,ozy4dm,perisy,phoenix,planete2303,pw,rawwell,richmahogany,roki,s0upa,sasaking,scottg,shiena,shinh,shr3kst3r,siokoshou,ste_mcleod,sug,swac,t_issie,tabasa,takashima,test,tnk,toshi,tyrn,usa,usaoya,warriorness,wow,yhara,yooskeh,you said you wouldn't kiss&amp;tell!,yuhei,zcrar70,zen,znz
AWK            (248,46): ,Mark Byers,Regiomontanus,_N,breadbox,eban,eban(cheat),eban(embed),eban(exec),emoken,gami,hi_saito,hrkw,jijixi,kjana,krokofant,ksk,kt3k,letter,m,ma,moe,morimasa,mskzzz,mskzzzz,naoya_t,nazo,odz,okamotok,pooq,s0upa,shinh,sulky,tabasa,test,trebir,unau,usa,usa(cheat),usa(embed),wow,yamaya,ysn,yunyun,zetamatta,znz
Bash           (240,69): ,51b,666,Al Dimond,David Rainsford,Frane,Gus,KEN3,Kee,Mark Byers,RiSK,Robert,alexmdac,amedama,bizzfuzz,blue,blueblimp,breadbox,bungee,daira,eban,eban(alt),eban(bash),eban(cheat),elb,emoken,flagitious,flatline,gami,hansode,hat,hibi,hirose,kazuho,ksk,kt3k,kurimura,kuwashima,lifthrasiir,lurker,ma,mokotan,moriA,moriB,mskzz,mskzzz,mskzzzz,nazo,notogawa,pla,pneuma,rawwell,sgr,shaurz,shinh,smly,tabasa,trebir,unau,usa,ush,xhl,yamaya,yhara,ym,ysn,yuizumi,zetamatta,znz
sed            (236,37): 51b,Ciaran,Mark Byers,_N,breadbox,drigz,eban,eban(cheat),eban(embed),eban(exec),eban-,emoken,emoken(embed),goto,hirose,hrkw,irori,jg,kerebron,kt3k,m,moe,momo,moriA,morimasa,mskzzz,mskzzzz,ott,s0upa,shinh,tabasa,taka,usa,yamaya,ysn,yuizumi,znz
Common LISP    (223,41): 	Defenestrator (read file),Defenestrator,Grue,Gus,Magnus Jonsson,Mark Byers,RiSK,Robert,___,breadbox,cm(exec),ddickison,ddickison(format),ddickison(loop),fkm,foo,kozima,kozima	,kozima(embed),kt3k,m,ma,ma(2),mskzzzz,nazo,negi,notany,ozy4dm,plh,pooq,rogersm,shimizu,shinh,siru,sn,tabasa,tokiwa,winstonsmith,wow,yhara,znz
Scheme         (222,64): ,EthanB,JonPhilpott,Milly,O,RiSK,Robert,_,astecp,blue,fkm,foo,gnome,guybrush,haya,hirofummy,hirofummy(embed),hirofummy/exec,hirose,juli,kaki,kazuya_a,kkishi,konbu,konn,kozima,kt3k,kuwashima,kyle,letter,m,ma,ma(embed),ma(no_cheat),ma(this_problem_sucks),maeda,masa.edw,motemen,mskzzz,mskzzzz,mushi,nazo,pla,pla(no exec),pla_cheat,pooq,ranekov,scm,shinh,sn,sshi,tabasa,tanakh,tanzaku,theoria,thori,tokiwa,troter,unno,wow,yhara,yuichi,yuki_neko_nyan,znz
C#             (212,88): 666,@,AncientCodeslinger,Belligerent,Bongo Bill,Craig,Ehsan,FalconNL,Inoue,J,JohnStalcup,Josh Harris,Justin Bozonier,KaZoo,Kokuma,Mark Byers,Matt,Mikkun,Nikes,Patrik,RiSK; un=RiSK,Seb1499,SiroKuro,Tim,Vandra Akos,YokoKen,Your_Persona,a,aDodo,abobo,abortjesus.com,aschazaar1001,aschazaar1002,atlas,axos88,cat-walk,daze,drawk,drawk2,drawk3,drawk4,drawk5,drawk6,drawk7,ehe,elb,ginga,gth,haichi,joe,jrun,kazuki,kenz,kihon,krokofant,kt3k,kurimura,lynng,matarillo,mei,mho,mskzzzz,nattow,nazo,notogawa,noxpert,pg9,raj,raj2,rulerofutumno,saiya,sentium,shinh,siokoshou,siokoshou(NoCheat),siokoshou(dd),siokoshou(unfair),siokoshou+matarillo,snFB,sside,tabasa,unnonouno,usa,wit,xebu,ysn,yuizumi,zcrar70
Brainfuck      (193,40): ,Mark Byers,REM(VIPPER),REM_VIPPER,RiSK,SeeNoEvil,Zauberer,_,_(embed),breadbox,f,flagitious,hirose,hirose(cheat),jreiffers,kaki,kinaba,ksk,kt3k,kt3k(cheat),kt3k_,kurimura,m,mskzzz,mskzzzz,nazo,niha,notogawa,nuko,ozy4dm,pascal,pi8027,shinh,shinh(cheat),shinh(tetraglot),shuyo,smly,tabasa,yowa,yzx
C++            (182,108): ,&amp;#1605;&amp;#1581;&amp;#1605;&amp;#1583;&amp;nbsp;&amp;#1576;&amp;#1606;&amp;nbsp;&amp;#1605;&amp;#1608;&amp;#1587;&amp;#1575;&amp;nbsp;&amp;#1575;&amp;#1604;&amp;#1582;&amp;#1608;&amp;#1585;&amp;#1586;&amp;#1605;&amp;#1610;,666,7gyou,Andrew,Anon,Arturion,Arturion (recursive),Azumanga,CScppig1995,Chris,Chronos111,DS,Dan,FalconNL,Gus,IceManXp,Jonathan,Karu!,Kee,Kronos111,LoRRy,Lorentzen,NickP,NickP.,Okiesmokie,OvermindDL1,RiSK,RiSK; un=RiSK,Ricardo,Runtime,SOL,Siddhartha Gandhi,Smasher,Standard,Stupid1,Sumudu,Tay Kaijun,TheEconomist,afarmer,ahoudori,alexmdac,alofalt,blueblimp,bluefox,breadbox,bumSki,eban,egashira,ema,erosuke,fryman,h0shu,humpty,humptyOther,hyoroku,hyperair,iwadon,j.hzr,jhon.hzr,joe,katsu,kenz,kibi,ksk,kt3k,kurimura,kus,letter,lifthrasiir,lokko,m.ukai,me22,mi,mibuna,mintman,moriA,mskzzzz,n,nazo,neologic,niha,noah,notogawa,nyock,ozy4dm,passworder,pbe,roflcopter,s,sabupot,scottg,sgr,shinh,shinh (C C++ Ruby Python PHP Perl),shinh (C C++ Ruby Python PHP),shinynew,t_issie,tabasa,toki,trebir,usa,usaoya,xenocide,ysn,znz,zybler_hyperair,zyblerair
BASIC          (154,22): ,FalconNL,Kee,Tekgno,abb,breadbox,h0shu,kt3k,mskzzz,mskzzzz,poop,pooq,scottg,shinh,siru,tabasa,tokiwa,usa,xebu,yt,yt(cheat),yt(straightforward)
D              (151,27): ,51b,51b ,51b(embed),51b(no exec),Negitoro,ON,YT,breadbox,enk,kinaba,kt3k,kurimura,kurimura(no exec),letter,mskzzzz,nazo,niha,notogawa,ntabe,nyo,ozy4dm,qebab,rawwell,shinh,tabasa,yt
Lua            (147,30): ,Nexuapex,RiSK,Spencer Schumann,SpencerSchumann,blueblimp,breadbox,c031,eban,hammm,konn,kt3k,letter,letter(embed),mike,mskzzz,mskzzzz,nazo,planque,planque(cheat),planque(embed),rickrickrick,rickrickrick(no-load-file),roflcopter,tabasa,tokiwa,usa,yhara,yowa,znz
Befunge        (138,29): 51b,51b ,Mark Byers,Mark Byers (no stderr),Mark Byers (symbol),breadbox,eban,emoken,flagitious,hirose,hirose(sym),kaki,kik,kt3k,m,mskzzzz,nazo,niha,pla,shinh,shinh(tetraglot),tabasa,wiz,ySas,ySas(cheatless),ySas(ref),yhara,yowa,yzx
Smalltalk      (129,15): hirose,jijixi,kt3k,mskzzz,mskzzzz,murky-satyr,murky-satyr(%),nazo,poop,pooq,ralf,shinh,sumim,tabasa,usa
Ada            (128,20): ,Boost,D,Hakrabi,YT,hirose,kiste,kt3k,m.ukai,mskzzzz,nazo,shinh,tabasa,tokiwa,usa,yhara,yt,yt&amp;D,yt(bit op),yt(cheat)
Erlang         (124,19): 51b,51b(cheat),51b(computed),51b(embed),51b(no exec),51b(not embed),blueblimp,jijixi,jijixi(computed),konn,kt3k,moriA,mskzzzz,pooq,shinh,shuyo,sshi,tabasa,wookay
J              (118,13): eban,flagitious,irori,kinaba,kinaba(cheat),kt3k,lifthrasiir,mskzzzz,poop,pooq,pooq(exec),shinh,tabasa
Prolog         (113,19): ,Mikevil,Robert,breadbox,elb,elb(bin),hirose,kazuki,kt3k,mskzzzz,nazo,okina,pooq,sakai,shinh,tabasa,tanzaku,yooskeh,リァル・・・ァル・
Whitespace     (111,17): ,Kee,Mark Byers,breadbox,flagitious,hirose,kt3k,mskzzzz,phoenix,pla,shinh,shinh(tetraglot),shinh__,tabasa,tokiwa,toshi,yowa
z80            (99,15): GOROman,SeeNoEvil,eban,hiro.suzuki,hirose,kodera,kt3k,m.ukai,mokehehe,nyasu3w,nyasu3w(symbol),ozy4dm,shinh,tabasa,ySas
Xtal           (88,8): eban,kt3k,murky-satyr,nazo,ozy4dm,pooq,shinh,tabasa
Pascal         (84,26): 1-2-3,666,7gyou,Gaby,Herbert Sitz,breadbox,foo,hirose,hsitz,ksk,kt3k,mskzzzz,nazo,ozy4dm,planque,rawwell,sample implementation,scottg,sigle,tabasa,tokiwa,uru,usa,yhara,yt,yt(cheat)
Forth          (81,19): ,51b,51b ,51b(sh),Michael,breadbox,eban,fizz,kt3k,mskzzzz,nazo,no22,pbx,pooq,shaurz,shinh,tabasa,usa,yt
Io             (76,17): Io_fan,RiSK,ageldama,eban,fukkatsu otsu!,konn,kt3k,leonid,mskzzzz,nazo,pbx,poop,pooq,shinh,tabasa,usa,wow
Tcl            (75,19): RiSK,Sean,Zigs,breadbox,eban,ether,kt3k,mskzzz,mskzzzz,nazo,tabasa,tensaix2j,tensaix2j2,test,unau,usa,user,usk,ysk
Minus          (59,12): 51b,Mark Byers,breadbox,flagitious,flagitious(embed),hirose,kt3k,mskzzzz,shinh,tabasa,yowa,yowa(c)
Mind           (58,10): RiSK,eban,kt3k,maa,mskzzzz,poop,pooq,shinh,tabasa,yuizumi
xgawk          (45,14): 51b,Mark Byers,Robert,breadbox,eban,emoken,hi_saito,ksk,kt3k,mskzzzz,shinh,tabasa,usa,yamaya
COBOL          (41,13): Enigma,amginE,breadbox,hirose,kinaba,kt3k,masa_jade,mskzzzz,nazo,shinh,tabasa,uenoB,uenoB(no_cheat)
VHDL           (39,12): boon,educa,hirose,kt3k,mayarero,mskzzzz,natsutan,shinh,ta_bo__,tabasa,tori,yt
m4             (38,10): &lt;a href=&quot;#m4&quot;&gt;m4&lt;/a&gt;,51b,breadbox,eban,kt3k,lifthrasiir,mskzzzz,shinh,tabasa,yamaya
Curry          (35,7): breadbox,kt3k,m,mskzzzz,sakai,shinh,tabasa
Fortran        (30,16): 51b,RiSK,Simon Geard,breadbox,bungee,eban,hermi,kt3k,mskzzzz,nazo,scottg,tabasa,tokiwa,usa,yhara,yuizumi
gas            (28,14): 7gyou,CD,breadbox,eban,kik,kt3k,kurimura,lifthrasiir,mskzzz,mskzzzz,nazo,shinh,tabasa,wow
D-compile-time (24,8): breadbox,kt3k,kurimura,mskzzzz,nazo,niha,shinh,tabasa
x86            (23,10): 51b,breadbox,kt3k,maki,mskzzzz,nazo,shinh,shinh(tetraglot),tabasa,viznut
Lazy-K         (22,9): 51b,eban,hirose,irori,kt3k,niha,shinh,tabasa,yowa
Pefunge        (19,7): Mark Byers,flagitious,hirose,kik,kt3k,shinh,tabasa
Whirl          (17,8): 51b,atheye,hirose,kt3k,shinh,tabasa,yowa,yowa(o)

http://golf.shinh.org/

トラックバック - http://rubyist.g.hatena.ne.jp/hatecha/20071213
カレンダー
<< 2007/12 >>
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31
archive Error : RSSが取得できませんでした。