conditions
i@u ~/test/boo> cat cond.boo x = 0 if x == 1: print "x == 1" else: print "x != 1" i@u ~/test/boo> booi cond.boo x != 1 i@u ~/test/boo> cat cond.boo if x == 1: print "x == 1" else: print "x != 1" i@u ~/test/boo> booi cond.boo cond.boo(1,4): BCE0005: Boo.Lang.Compiler.CompilerError: Unknown identifier: 'x'.
普通。
i@u ~/test/boo> cat cond.boo x = 0 if x == 1 or x == 0: print "x == 1 or 0" else: print "other" i@u ~/test/boo> booi cond.boo x == 1 or 0 i@u ~/test/boo> cat cond.boo x = 0 if x == 1 || x == 0: print "x == 1 or 0" else: print "other" i@u ~/test/boo> booi cond.boo cond.boo(2,12): BCE0043: Boo.Lang.Compiler.CompilerError: Unexpected token: |. ---> cond.boo:2:12: unexpected token: ["|",<91>,line=2,col=12]--- End of inner exception stack trace ---
なんか and とか or とか not なのね。
boo-mode.el
("\\.boo$" . python-mode)
探すのめんどいから python-mode
environment
基本は FC5
i@u ~/bin> cat booc #!/bin/sh exec mono /home/i/src/boo-0.7.5.2013/bin/booc.exe $@ i@u ~/bin> cat booi #!/bin/sh exec mono /home/i/src/boo-0.7.5.2013/bin/booi.exe $@ i@u ~/bin> cat booish #!/bin/sh exec mono /home/i/src/boo-0.7.5.2013/bin/booish.exe $@
よくわからん時は shell script 書いておくに限る。
testsprite.boo
http://shinh.skr.jp/misc/dat_dir/testsprite.boo
Boo がなかなか良さそうだなあと思ったので触ってみることにします。目指せ負け組脱出。とりあえず C の 55% くらいの速度は出てる感じ。
Events.KeyboardDown += def (sender, e as KeyboardEventArgs): if e.Key == Key.Escape: quit = true Events.Quit += def (sender, e): quit = true
基本的に普通のコードだけど、このへんがハイライトだろうか。くろーじゃ。
- おーおー
- くろーじゃ
- じぇねれーた
- くろすぷらっと
- かたしょうりゃく
- ねいてぃぶばいなり
ゲームを作れと言わんばかり。 マクロ もなんか面白そう。
以下は作業記録とか。この Boo というタグを見なくなったら飽きたということです。