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 text/regexp/Regexp | |
main: func { | |
r := Regexp new("^test$") | |
if (r matches("test")) { | |
"match!" 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
HeaderMap: class extends HashMap<String> { | |
init: func ~headermap { | |
init(100) | |
} | |
init: func ~headermapWithCapacity (capacity: UInt) { | |
T = String | |
super(capacity) | |
} | |
} |
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
ooc Google Summer of Code project ideas | |
======================================= | |
- rock backend (llvm, javascript, jvm?) | |
- testing framework | |
- ooc-web improvements | |
- true exception support | |
- game/graphics engine (maybe bind ogre or start from scratch?) | |
- reincarnate and/or package store | |
- database library (couchdb, mongodb, sql) |
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
factorial: func(n: Int) -> Double { | |
result: Double = 1 | |
while(n != 0) { | |
result *= n | |
n -= 1 | |
} | |
return result | |
} |
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
Colors: enum { red, blue, green } | |
Animals: enum { | |
monkey | |
bird | |
cow | |
dog | |
} |
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 tweepy | |
auth = tweepy.OAuthHandler(consumer_token, consumer_secret) | |
auth.get_xauth_access_token(username, password) | |
# you can then use this for API access... | |
api = tweepy.API(auth) | |
api.update_status("hello") | |
# to get the access token object for storing... |
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
/* | |
Using the streaming API to pump data | |
read from a socket into a file. | |
*/ | |
// Assume we have opened both a socket and file. | |
var socket = ...; | |
var file = ...; | |
// First create a pump object to perform the transfer of data. |
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
/* | |
* event-emitter-plus.js | |
* | |
* An extended EventEmitter with the following new additions: | |
* + mapEvents(events) - Add the following listeners to the event specified by their key. | |
*/ | |
events = require("events"); | |
events.EventEmitter.prototype.mapEvents = function (events) { |
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
GitHub username: joshthecoder | |
Day job: Software developer for Appcelerator working on Titanium Desktop. | |
Favorite open source project: Titanium | |
Open Source contributions (if any): Can't remember how many, but I do spend in my spare time sending patches to many projects. | |
Stranded on an island, what 3 items do you take: knife, tent, a good book | |
Tie-breaker, pick a number between 1 and 20,000: 19,999 |
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
Day job: programmer for Appcelerator, Inc. | |
Favorite Python project: pypy | |
Favorite Conference: CodeConf! | |
Python Experience Level: Experienced |