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
-- Text Escapes API by CoderPuppy | |
-- Usage: | |
-- textEscapes.print(textEscapes.textLime .. "Hello World!" .. textEscapes.textWhite) | |
-- Prints "Hello World!" in lime | |
-- textEscapes.print(textEscapes.textGrey .. textEscapes.backYellow .. "HI!!!" .. textEscapes.reset) | |
-- Prints "HI!!!" in grey with a yellow background | |
defaultOpts = { | |
textColor = true; | |
backColor = true; |
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
local styles | |
if term.isColor() then | |
styles = { | |
prompt = { | |
text = colors.yellow; | |
back = colors.black; | |
}; | |
input = { | |
text = colors.white; | |
back = colors.black; |
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
-- Chat Bot API by CoderPuppy | |
local protocol = 'cpup/chat' | |
function createBot(hostname, username) | |
local bot = { | |
id = math.random(1, 2147483647); | |
hostname = hostname; | |
username = username; | |
} |
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
-- Chat Client by CoderPuppy | |
-- Requires textEscapes and chatbot | |
pcall(function() | |
os.loadAPI('chatbot.lua') | |
_G.chatbot = _G['chatbot.lua'] | |
end) | |
pcall(function() | |
os.loadAPI('chatbot') |
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
-- Chat Server by CoderPuppy | |
local protocol = 'cpup/chat' | |
local tArgs = { ... } | |
local function printUsage() | |
print('Usages:') | |
print('chatserver.lua <hostname>') | |
end |
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
---- Minecraft Crash Report ---- | |
// Don't be sad. I'll do better next time, I promise! | |
Time: 5/5/14 11:59 AM | |
Description: Unexpected error | |
java.lang.NullPointerException: Unexpected error | |
at java.util.regex.Matcher.getTextLength(Matcher.java:1234) | |
at java.util.regex.Matcher.reset(Matcher.java:308) | |
at java.util.regex.Matcher.<init>(Matcher.java:228) |
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
class ItemSpec { | |
read_slots: ('name, 'dmg, 'data) | |
def initialize: @name with_dmg: @dmg with_data: @data | |
def initialize: @name with_dmg: @dmg | |
def initialize: @name with_data: @data { | |
@dmg = 0 | |
} | |
def initialize: @name { | |
@dmg = 0 | |
} |
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
/* | |
* robotMaze.js | |
* | |
* The blue key is inside a labyrinth, and extracting | |
* it will not be easy. | |
* | |
* It's a good thing that you're a AI expert, or | |
* we would have to leave empty-handed. | |
*/ |
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
type Identifier | |
id::String | |
end | |
getter(env, id::Identifier) = env[id.id] | |
assigner(env, id::Identifier, val) = env[id.id] = val | |
type Access | |
obj::Any | |
key::Any | |
end |
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
type Identifier | |
id::String | |
end | |
getter(env, id::Identifier) = env[id.id] | |
assigner(env, id::Identifier, val) = env[id.id] = val | |
type Access | |
obj::Any | |
key::Any | |
end |