This file contains 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
Building target “Downloader” of project “Downloader” with configuration “Debug” — (8 errors) | |
cd "/Users/Sal/Desktop/iPhone Dev/Downloader" | |
setenv MACOSX_DEPLOYMENT_TARGET 10.5 | |
setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" | |
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/g++-4.0 -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.2.sdk "-L/Users/Sal/Desktop/iPhone Dev/Downloader/build/Debug-iphonesimulator" "-F/Users/Sal/Desktop/iPhone Dev/Downloader/build/Debug-iphonesimulator" -filelist "/Users/Sal/Desktop/iPhone Dev/Downloader/build/Downloader.build/Debug-iphonesimulator/Downloader.build/Objects-normal/i386/Downloader.LinkFileList" -mmacosx-version-min=10.5 -framework Foundation -framework UIKit -framework CoreGraphics -o "/Users/Sal/Desktop/iPhone Dev/Downloader/build/Debug-iphonesimulator/Downloader.app/Downloader" | |
Undefined symbols: | |
"_crc3 |
This file contains 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 <Foundation/Foundation.h> | |
#define SECOND_INTERVAL 1 | |
#define MINUTE_INTERVAL (SECOND_INTERVAL * 60) | |
#define HOUR_INTERVAL (MINUTE_INTERVAL * 60) | |
#define DAY_INTERVAL (HOUR_INTERVAL * 24) | |
#define WEEK_INTERVAL (DAY_INTERVAL * 7) | |
int main(int argc, char *argv[]) { | |
NSAutoreleasePool *p = [[NSAutoreleasePool alloc] init]; |
This file contains 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
This part: what you think we're all reacting to: | |
~ #node.js | |
[20.16.16] < TheEmpath> so | |
[20.16.34] < TheEmpath> anyone else have a hot programmer girl in their office? o____O | |
[20.16.42] < Lorentz> I wiiish |
This file contains 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
#include <string> | |
#include <sstream> | |
#include <vector> | |
#include <iomanip> | |
std::string human_readable_duration(int num_seconds) { | |
static int divisions[3] = {60, 60, 24}; | |
std::stringstream buf; | |
if (num_seconds < divisions[0]) { | |
buf << num_seconds << " seconds"; |
This file contains 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
fn main() { | |
fn main() { | |
let i = str::to_bytes("Hello, world!"); | |
println(fmt!("%?", i)); | |
} |
This file contains 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
/* | |
rustc -O -L. --test -o btree btree.rs | |
btree.rs:68:24: 79:7 error: mismatched types: expected `~[~str]` but found `std::iterator::MapIterator<,&std::option::Option<TreeItem<T,U>>,~(),std::vec::VecIterator<,std::option::Option<TreeItem<T,U>>>>` (expected vector but found struct std::iterator::MapIterator) | |
btree.rs:68 let buf : ~[~str] = tree.nodes.iter().transform(|x| { | |
btree.rs:69 ~"\t".repeat(indent).push_str(match *x { | |
btree.rs:70 Some(TreeNode { key: k, value: tree }) => { | |
btree.rs:71 let buf = ~"Node(key=...)\n"; | |
btree.rs:72 buf //buf.push_str(tree.to_str()) | |
btree.rs:73 } | |
... |
This file contains 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
use std::task; | |
use std::task::TaskBuilder; | |
enum MultiCastHackForSelect<T> { | |
Msg(T), | |
MsgChan(Chan<T>), | |
} | |
struct MultiCast<T> { | |
priv ch: Chan<MultiCastHackForSelect<T>> |
This file contains 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
fn session_number(line: &str) -> Option<int> { | |
line.split_iter(':').next().and_then(|s| int::from_str(s)) | |
} | |
fn occupied_sessions(output: ~str) -> HashSet<int> { | |
let mut set = HashSet::new(); | |
for line in output.line_iter(){ | |
match session_number(line) { | |
Some(n) => { set.insert(n); } | |
None => () |
This file contains 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
#[fixed_stack_segment] | |
fn exec_program(program: &str, args: &[~str]) { | |
do program.to_c_str().with_ref() |c_program| { | |
// I don't much care about the ownership of the strings here | |
// at this point, so let's just fail if execvp isn't working. | |
unsafe { | |
let mut c_args = args.map(|arg| { arg.to_c_str().unwrap() }); | |
c_args.push(ptr::null()); | |
execvp(c_program, vec::raw::to_ptr(c_args)); | |
// perror("Running tmux failed:".to_c_str().unwrap()); // Super horrific, apparently, let's use it for debugging only. |
This file contains 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
enum State { | |
Even(~int), | |
Odd(~int) | |
} | |
struct MyNumber { | |
num: State | |
} | |
impl MyNumber { |
OlderNewer