This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import bar | |
Foo: class { | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import structs/ArrayList | |
state: ArrayList<String> | |
main: func() { | |
state add("Foo") | |
state add("Bar") | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import structs/ArrayList | |
import text/StringTokenizer | |
import os/Terminal | |
scanf: extern func(String) -> String | |
players: ArrayList<Player> | |
map: Map | |
winner: Player |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scavenger@versus:/tmp$ OOC_SDK=~/Public/ooc/newrock/rock/sdk/ gdb --args rock high | |
GNU gdb (GDB) 7.1-ubuntu | |
Copyright (C) 2010 Free Software Foundation, Inc. | |
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> | |
This is free software: you are free to change and redistribute it. | |
There is NO WARRANTY, to the extent permitted by law. Type "show copying" | |
and "show warranty" for details. | |
This GDB was configured as "i486-linux-gnu". | |
For bug reporting instructions, please see: | |
<http://www.gnu.org/software/gdb/bugs/>... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scavenger@versus:~/Public/ooc/try$ cat soviet.ooc | |
import os/Time | |
str := Time microtime() toString() last() | |
("In Soviet Russia, " + str + " calculates YOU! \n") print() | |
scavenger@versus:~/Public/ooc/try$ OOC_SDK=/home/scavenger/Public/ooc/newrock/rock/sdk gdb --args rock soviet.ooc GNU gdb (GDB) 7.1-ubuntu | |
Copyright (C) 2010 Free Software Foundation, Inc. | |
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> | |
This is free software: you are free to change and redistribute it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
foo: func() -> Bool { | |
return false; | |
} | |
bar: func() -> Int { | |
return 0; | |
} | |
"First attempt: %s" format((bar() || foo() || 20) toString()) println() | |
"Second attempt: %s" format((foo() || bar() || 20) toString()) println() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int main() { | |
const int x = 10; | |
return x*2; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os/Terminal | |
Terminal setFgColor(Color white) | |
"Long time no see" println() | |
Terminal reset() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os/Terminal | |
Terminal setFgColor(Color white) | |
"Long time no see" println() | |
Terminal reset() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os/Terminal | |
for (c in 30..38) { | |
Terminal setBgColor(c) | |
"Background %d" format(c) print() | |
Terminal reset() | |
Terminal setFgColor(c) | |
" Foreground %d" format(c) println() | |
Terminal reset() | |
} |