As Sloth As Possible

ǽʸ¤ʥޥΤǤꤿ

ʤǤʤΤʹƤ֤ʤ󤫲ˤäġפȤ

丵ϤŪ֤ʤ󤫻Żطʤɽ񤭤״äʤɡGoȤͷǤˤҤʤȤRustդƤޤäƤء򤽤ȤФƤߤ뤳ȤˤʤꡢִʤȤȤϤȤꤢWhitespaceνϤäƤߤȤʤ󤫴줿褦ʵʬˤʤפȤʤǤǤ͡ʤ󤫽ä

񤤤Ƥκǿnightlyv0.12.0-preˤǤϥѥ̤ΤǧѤߡʤȤ¿ʬ0.12.0ǤӥɤǤʤήФĦ¤ФȤʬʤ졢0.10.00.11.00.12.0Ǹߴ̵ɥȸ˹Ԥäɸ饤֥ޤۤȤɤAPIexperimentaläˡrust-albinocloneǿrustcбcargorustupʤ󤫤ơ

cargo build
ȥӥɤǤ롣homebrewǤ뤱ɥХʥ0.11.0ΥӥɤȤʤ֤ΤͤnightlyΥХʥȤ

Albinoޥɥ饤ġǡĤWhitespace¹Ԥե֥뤷ꤷƤ롣ǽ̤˥󥿥ץ꥿äƤɡΤȤWhitespaceɤʤ񤱤ʤ饢֥ǤǤä褦Ȥν񤤤DTȤư͡ȤäƤ餤Ĥδ֤ˤVMȥѡʬΥʪȤƲΤ饤֥ˤʤääΤWhitebase

̩˸ΤWhitebaceAlbinoϤΥ󥿡եäꤹ뤱ɺ٤Ȥϵˤʤ̾ޤäΤWhitebaseǡWhitespace̿᥻åȤäVMȥѡΥ饤֥ʤΤǡϡפȤΤͳǤäƷ褷˿19Ф˸ʤĹΨϢˮϤǤϤʤ碌ƥġWhitedevilˤ褦ʡȤֹͤɥޥ̾ȤƤĹ뤷rx78ȤꥢϤˤʤΤǥӥΤˤVMȥѡʬΥ̤ɤ櫓Brainf*ckθWhitespace̿᥻åȤѴǤ褦ˤʤäΤǡ򤯤ʤΤޤ򤯤ʤäƤפ饢ӥΤʤǤ

줿ΡRustʤʤäƤƳڤȤȤʬäޤɤäݤ֥ޥɷΥޥɤɤäƺäƤΤʡäƤΤʬäWhitespace⤷Brainf*ckΥȡɽ֤ƥ졼Ǥдñ˥쥪줬饤֥꤬褿Τǡ夵äȸäƥɥ󥰤Ȥϰ֤ǽ褦ˤʤäBrainf*ckǤդΥץफWhitespaceΥɤǤ褦ˤʤä

ʤäΡ֡빽̵̤ʻ֡

ǥ󥦥ѤƵסǤʤǤΤǻƤ

֤äʤ衢󡪡סֺǽ̵̸ʤơ̵̤ΤΤ衢󡣡

Ȳ㤦Ρ

⤽ȯüˤĤƤץߥ󥰸DTȤ򡢼ºݤθͤˤĤƤREADMEǤɤǤ餦ȤơǺƼΤȤá

3ǯ˺äΤϡWhitespaceΥȡִϤ򥤥󥿥ץ꥿ȤRubyǼפΤʤɡפäѥ뤷ƤߤȻפΩäƤޤǤ켫ΤLLVMɤʬʤäȤllvmrubyΤץȤȤʬʴˤʤäƤޤäƤȤǺޤƤɡή졢ʤ󤫸֤Ƥߤ̤LLVM֥ɤ߽񤭤Ǥ褦ˤʤäƤruby-llvmư褦ˤʤäƤߤȤȤǺƼƤߤ뤳Ȥˤ

ǺľǡWhitespaceִäƤΤʤ򤯤ʤʡפȻפäVMΥƥȸͤľȤˤʤѤäȸʬʤɡDTȿDTδ֤˸ߴ̵ˡΤǼºݤˤϥ塼󥰴ʤʤäƤȻפ⤽ȽƤΤɤΤɡȤꤢHi!פäƽϤΤȥեܥʥåФΤưΤɤȤ롣

ɸäDTɤͥƥ֤ΥХʥˤޤǥѥ뤷ƹ®˼¹ԡפäƤΤ¸ơDT󥿥ץ꥿250ms餤fib.dt򥳥ѥ뤹4ms餤Ƿ̤Ф褦ˤʤä褦RubyΥɤ100ms餤äΤŨ®ޤѥ뼫ΤLLVMȥѥǤƤΤ礷ưĥ뤢ǤʤΤɤ⡣ƹ®ưʤȤäʤΤɤ⡣

֤ä㤱DTLLVM֥ڤ˵Ϲ⤤񤭤䤹Τ褦˹¤ΤȤؿݥ󥿤ȤȤΤʡCδؿƤ٤뤷ǽCǽ񤤤ƤVMLLVM֥ľܽ񤯤褦ˤɡ礷ѤʤDTǽ񤯤餤ʤLLVM֥񤤤ǤLLVM̵̸դƤ

DT¸߰յˤĤƤϵ򺹤;Ϥʤ̵ȸäƤɡβǥ쥸ޥˤĤƿĴ٤ơϡԤ塼äƤäƤƤΤٶˤʤäΤǤϤɤä褯ʤιͤʤCPUȤѥȤäƤã˲ƱʪʤΤ

LLVMˤĤƾٶƤ롣⤽ʤLLVM򿨤Ϥ᤿ȤȡTwitterǡֺѥߵ˶Ƥפ(Ȳͤ)Ĥ֤䤤Ȥ

  1. ֤㤢DTѥ뤷褦
  2. srd!
  3. Ǥ⤢쥳ѥȤ̾ФǤ֤ä㤱ʸRubyɤtranslateƤäꤹ
  4. DTѡɤLLVM˥֥åơץåȥեĶǹ®ưDTϤˤȤ
  5. ̵̤ߵ⤤ŻïǤʤ򤽤

ȤȤ꤬äơ㤢ïΤ狼ʤ򤽤LLVMХåɤǻȤäesotericݡȤƤ륳ɤХʥ륳ѥȤήˤʤä顣¤LLVM̵̸Ǥ͡ε֥ޤȤϡLLVM̵̸פäƥդȤǤ衣

LLVMäƲ?

ޤ⤽⡢iPod touchJail Break˼ФȤȤˤ礳äĴ٤ꤷ(iPhoneSDKȯɽJBiPod touch/iPhone˥ץȯݤˤLLVMȤäiPhone OS˥ѥ뤹ɬפäǶɤäƤʤΤǺɤʤäƤ뤫Τʤ)٤äΤǡ¤ΤȤLLVM򤹤ΤʤΤʬäƤʤơɤ١ȤޤĴľȤϤ롣

LLVMȤLow Level Virtual MachineάǡLightweight LanguageȤä˴طʤ褦(«)ΤäƤ衣ΤäƤäƤСĴ٤̡ѥפȸƤФΤǥѥΤ˻Ȥ饤֥ꡦġ뷲Ǥ뤳ȡVM̤̾LLVMǽǤָˤ塢LLVMΥġǼ¹Ԥͥƥ֤ΥХʥѴꤷƻȤȤȡѥ¹Ի͡ʺŬܤƤơ¹ԸΨɤץ褦ˤƤ餷ȡʤ󤫤ʬä¾ˤ⿧뤱ɡϤäȾܤͤɤäǤޤȤƤƤ뤫䰦ʬʤä櫓ʤ衣㤦äƤС

ȡllvm-gccȤclangȤȤC/C++/Objective-CΥɤLLVMбƥѥǤ褦Ϥ򤤤ɺϡּθ򥳥ѥ뤹ΤLLVMȤפΤŪʤΤǡɤäȤȤΤΤ뤳ȤˤʤΤǤȤꤢդϸǸ뤳Ȥˤ롣DTѥllvm-gcc¤٤Ƥ褤ΤȤ˥ĥåߤΤ̵ǡФꤲꤷʤDz

RubyȤ

绨Ĥ˲ʤΤϤ狼äɡƤɤȤC++ǤϻȤ褦ץC++Υɤ¤ǤɡC++񤤤ȤʤʤäƤRubyǽ񤤤ƤΤC++ٶĤĽľȤݤʤषObjC񤭤ʤObjCȤʡæϤ᤿ȤˡRubyLLVMȤgemΤ򸫤Ĥ

줳졢줬ߤäΤ®gem installƤߤȤѥ̤äƤȥ󥹥ȡǤɡץ륳ɤưƤߤȤdylibload errorФ롣MacOSX10.5Ruby1.8.7(LLVMRubyȤMacPorts饤󥹥ȡ)ǤƤʤɡɤ꤯ԤʤͻҡĴ٤Ƥߤ褦Ȼפägithub饽ȤƤơgemӥɤȤäƤߤ顢äϤư褦ˤʤä줫ʤ󥯤饤֥Ȥ㤦Ȥ㤦Τʡޤ䡢ȤꤢɤΤϤ⤦ˤ褦

绨ĤllvmrubyλȤȡΰʲ̤ꡣ

  1. LLVM::ModuleΥ֥Ȥ
  2. LLVM::Module#external_functiondzΥ饤֥δؿȤ褦ˤ
    • CC++Υ饤֥꤫äƤ褦ʤΤǡRubyȤ߹ߴؿȤƤ٤
  3. LLVM::Module#get_or_insert_functionǴؿ
    • Υ᥽åɤLLVM::FunctionΥ֥Ȥ֤Τǡcreate_block᥽åɤǥ֥å(ؿ)Ѱդ
    • ֥åBuilderơФƤˤ礴ˤ礷Ȥ
    • b = method.create_block.builderǤ
  4. LLVM::Module#write_bitcodeǥѥ뤷ƥե˽񤭽ФLLVM::ExecutionEnginerunϥ᥽åɤǤΤޤ޼¹Ԥ

ʤߤˤLLVMΥХȥɤɡ¾Ruby1.9VM̿᥻åȸߴɽ¹Ԥruby_vm.rbźդƤꡢRubyΥɤllvmrubyȤäJITѥ뤹ΤȻפ(ȸƤʤΤǴְäƤĥåߴ)yarv2llvmägemäꤹ롣ޤDTRubyǹ®˼¹ԤפΤǤϤʤơDT饹ɥΥͥƥ֥ץפΤǡäϺϻȤʤCǤγĥ򤷤ʤץRubyΥץ®ʤä餳դΤȤΤʡ¿ʬruby_vm.rbϸVMȤ˻ͤˤʤꤽ餽ΤȤˤޤɤ⤦

̤

ޤǤϲȤéĤ¤ϤޤǤǷ빽ԺƤ뤱ɡޤȤޤǤϤ褷Ȥ롣ǡʤΤϡΥС󥢥åפɽRuby2RubyǰASTˤƤޤä꤫äơΥѥäƤΤϤĤޤRubyΥѥäƤȤˤʤ櫓Ǥ͡󡣡ĤǤ뤫á

⤽Ϥδμⲿʤ֤ǥͥǻϤ᤿ꡢʤRubyASTǤ륳ѥȤľߵ郎⤹Τǡ⤦ɽθľ򤹤뤳ȤˤäȥץASTˤƤХѥǤⰷ䤹֤ûEsotericVM⤦ڤ˺뤫⤷ʤ

ǺĻͤθľ򤷤Ĥĥѥ񤭤ĤĿʤƤΤɡLow Level Virtual Machineȸäƥ饤֥¦ǤʬʤȤѰդϤƤʤ櫓Ǥ͡ƤȤǽΥǡȤɬפȤ߹ߤδؿȤʬѰդƤʤ㤤ʤ櫓ǡչͤƤʬ𤷤Ƥ

ɤͤƤDT˥֥ȥƥȤGCȤפʤΤŬüޤȤϻפΤɡesotericϥѡʬθͭǤ褷äƥѥVMŪʸϤδפˤ櫓ǡȰϤȹͤ߷פʤȤʤʤ˥ߥӥʥޥΤȤϤΥǤʤȤǤϰϤĶƤƤȤꤢνҤȤïƤȴ򤷤ʤϤγɤ褦ʤΡ

ʤäesotericȤ0.0.2˥С󥢥åפޤѹϰʲ̤ꡣ

  • Ƹ򥳥ѥ뤷ƤǤ֥ɤΥСǤϻ󥢥֥ŪʲäΤParseTreeʤ󤫤Ǻ褦Rubyݹʸ(AST)ŪʲѤäVMǤμ¹줿ɤŬȤǤ褦ˤʤȤ¾Ruby饤֥Esoteric Languageѡ褦ˤʤȤ̵̴̤봶ǡ
  • VMǤưʤʤäΤǡľʤ㤤ʤɡäȻ֤ꤽʤΤǻVMΤꡢASTRuby2RubyȤRubyɤѴǤ褦˺äƤΤǡȤꤢRuby2RubyȤ褦ˤƸⲽȤˤ
  • ʪȤDTWhitespaceΥɤ¹ԲǽRubyץȤѴ륳ѥɤΥġ뤬褿CؤΥȥ󥹥졼⤢ߤλȤ˥ѥ뤷ƥХʥ줿ꤷޤ͡DTǥޥɤȤ褦ˤʤ͡ޤäꤿʤɤ͡
  • Brainf*ckΥѡɲ
  • ƤäƤäơΥѡɲá̤λͤƤȻפɡ֡\xABס\uABCDס\d00000סץ󥹤ȤơΤ1ʸȰ롣ͽˡפäƤΤϤޤƤʤȡ֤Ƥơפȡ֤Ƥáפ̯ư򤹤Τ褷ƤʤɡޤΤʤȤ롣

ȤޤʴϤޤVMκƼȡSpec񤯡콪äRubyǺ̯ʥץߥ󥰸 ~Esoteric Language~˺ܤäƤStarryBolicǤ褦ʡȤȤäƤߤ褦顣

ʬڤʤäƤȤɥޥSPäƤƤޤäΤǡ٤ߡ餤Ż˻ʤ˰㤤ʤΤǤޤ٤ߡĤ¿ʬ˰Ƥޤ(ryޤޤääޤͤ

ǶRubyǺ̯ʥץߥ󥰸 ~Esoteric Language~פɤǡĤäȤʤäƸϤäƤߤ⡢塼󥰴ʡʪ(ry ޤWhitespaceΥȡ֤ɡ

嵭ܤ˽äơɤWhitespace̿᥻åȤָ˥ѥ뤷VMǼ¹ԤˤƤߤȤϥѡʬŬ֤ѥФäݤΤñ˺롣ǡĤͥäƤߤɡǤ֤硼ʤΤDTDTǤϼΤ褦ʥ¹Ԥ뤳ȤǤޤ("Hi!\n"Ϥ)

֡ơ⤷Ƹ?
֤ɤɤƸ㤦áɤƸ㤦áɤɤɡƸ㤦á
֤ιƤäפ꤬;ײʤw
֡ĤɤɤɤɤƸ㤦áƸ㤦áƸ㤦áɤƸ㤦áƸ㤦á
֤ϤϤ狼ääƤСʤ˥७ˤʤʤǤ衣
֡ĤɤɤɤɤƸ㤦áɤɤɤƸ㤦áƸ㤦á
֤顢狼ääƤС⤦ʤ顣
֡ĤɤɤɤɤƸ㤦áƸ㤦áɡƸ㤦á
֤䤽Ρʤ󤫡ۤȤ͡ʤ˵ˤƤȻפʤä顢Ρġ
֤ɤɡġ
(ۤȥ⤤ʤ)
֡ġ

Х󥿥ȸΤ˰β򤷤ƤǤͤ͡ϡʤߤˡ֤ɡסƸ㤦áס֡ġװʳʸ̵뤹Τǡν֤ȿäƤФɤʥȤ򶴤ǤʤȵˡȤäˤʤʤߤ˾嵭ΥɤͭʬȴФȤʴɤߤ䤹뤿˲ԤƤ롣

ɤɤƸ㤦áɤƸ㤦áɤɤɡ
Ƹ㤦áĤɤ
ɤɤƸ㤦áƸ㤦áƸ㤦áɤƸ㤦á
Ƹ㤦áĤɤ
ɤɤƸ㤦áɤɤɤƸ㤦á
Ƹ㤦áĤɤ
ɤɤƸ㤦áƸ㤦áɡ
Ƹ㤦áĤɤ
ġġ

¾ˡ֥ɥ뤬ɤ٤ΤΥ﷿HRKפȤ9ĤѿȥҡDecadeפȤäɡɤ⺣ΤȤWhitespaceʤΤǤɤʥˤʤ뤫Ĥޤ͡ƤȤdz䰦ɤϤ§黻䥸̿ƤޤΤǡեܥʥå̵¤˽ϤȤ;͵εˤʤФäWebץꤰ餤񤱤ޤ͡ꤿʤɡƤɤ񤯤ȤθƤʤΤǡ⤦ʤäƻָ񤤤ƤִƥɤˤäƤžݤʤȤʤȽ񤱤ʤޤʤ

Whitespaceˤ˰Τǡϲ褦RubyʬϽʬ佼ǤΤǡObjective-CVM񤯤ȤParrotξǽϺȤ褦ʡȤؿޤäƤʤΤǡΤ⤤ϤHaskelǽ񤤤ƤߤȤ⤷硼ʤܤΡ֤ޤȤʡ׸ͤͤȤ⤷ʡäƤߤȷ빽򤤡ϥޤ롣ʬǾ̣ۤ줿ȤϤΥǤɤǤߤ褦

ȡʸƨ򤷤Ʋᤷ󡢽¤äDTʤ󤫺äΤäơ⤷faultieräƸĤ䤤䤤䡣ɤɤɤɤƸ㤦á

θϤۤȤ硼ʤǤRubyǺ̯ʥץߥ󥰸 ~Esoteric Language~ϤܤʤΤǸΤʤ褦Ѥʸ⿧Ҳ𤵤Ƥ뤷RubyǥäȸϤĤ꤫񤤤ƤΤǡǤ

RubyǺ̯ʥץߥ󥰸 ~Esoteric Language~RubyǺ̯ʥץߥ󥰸 ~Esoteric Language~
ԡ ͪ
丵ߥ˥
ȯ2008-12-20
١4.0
ߤ򸫤

ɵ

񤤤򸫤Ƥ󤬤ƤäƤäơȤäƤơεΤ˸빽ʥ֥޿äꤷơ˵դƤʤ餱ʬ̤ġ󡢤ȤΤΥ蘆촰뤫顣⤦ʤiPhoneư褦ˤ㤦顣ۤǤʤ(󥿥ץ꥿ϵAppStoreϿǤʤäϤ)

ΥڡΥȥåץ