I hereby claim:
- I am pshc on github.
- I am paulcollier (https://keybase.io/paulcollier) on keybase.
- I have a public key ASCz0h-a2TV3_qKV68KZ26iWSQpLiOUdwieO6tsu6OIX_wo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
macro_rules! guard { | |
(let $($tt:tt)*) => { | |
let guard!(@lets (_) let $($tt)*) | |
= guard!(@step (()) let $($tt)*) | |
}; | |
(match $($tt:tt)*) => { | |
let guard!(@lets (_) match $($tt)*) | |
= guard!(@step (()) match $($tt)*) | |
}; |
fn unwrappin_life() { | |
guard! { | |
let decl = match blk.stmts[0].node { StmtDecl(ref decl, _) }; | |
let item = match decl.node { DeclItem(ref item) }; | |
let expr = match item.node { ItemStatic(_, _, ref expr) }; | |
let ptr = match expr.node { ExprAddrOf(_, ref ptr) }; | |
let array = match ptr.node { ExprVec(ref array) }; | |
else return nope!("lack of array of strings") | |
} | |
} |
// HACK | |
#[cfg(test)] | |
pub use self::secret::internal; | |
mod secret { | |
pub fn internal() -> bool { | |
println!("you've broken my secret elbow!"); | |
true | |
} |
use std::io; | |
use std::io::IoResult; | |
use std::owned::BoxAny; | |
use std::task; | |
#[deriving(Show)] | |
enum Token { | |
Equals, | |
Lit(int), | |
Let, |
#!/usr/bin/env python2 | |
API_KEY = "YOUR_API_KEY_HERE" | |
import pickle | |
import re | |
import requests | |
import sys | |
def request(path, **kwargs): |
fn hex_to_bytes(hex: &str) -> ~[u8] { | |
let n = hex.len(); | |
assert!(n % 2 == 0); | |
return vec::from_fn(n / 2, |i| { | |
u8::from_str_radix(hex.substr(i*2, 2), 16).expect("bad hex") | |
}); | |
} | |
fn bytes_to_hex(bytes: &[u8]) -> ~str { | |
let hex_chars = ~"0123456789abcdef"; |
var crypto = require('crypto'), | |
util = require('util'), | |
zeromq = require('zeromq'); | |
var pullSocket = zeromq.createSocket('pull'); | |
var publishSocket = zeromq.createSocket('pub'); | |
pullSocket.connect('ipc://node.push.request.sock'); | |
publishSocket.connect('ipc://node.sub.response.sock'); | |
var myUUID = 'nodejs'; |