Skip to content

Instantly share code, notes, and snippets.

View zslayton's full-sized avatar

Zack Slayton zslayton

View GitHub Profile
@zslayton
zslayton / pseudocode.md
Last active February 28, 2023 15:57
`isRelevant` and `nextJumpIn`

Keybase proof

I hereby claim:

  • I am zslayton on github.
  • I am zslayton (https://keybase.io/zslayton) on keybase.
  • I have a public key ASCyr4FASiZHV8vMUDIwDa7ly2ufjrPWhtH0GAFiTyYszgo

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am zslayton on github.
  • I am zslayton (https://keybase.io/zslayton) on keybase.
  • I have a public key ASCrL2uwR_90F38RvHfCd2BLaJteXJI7Q75LU9OzV-QfXAo

To claim this, I am signing this object:

#![feature(test)]
extern crate test;
#[cfg(test)]
mod tests {
use test::black_box;
use test::Bencher;
const ITERATIONS: usize = 100_000;
$ ./mach build
Usage: git submodule [--quiet] add [-b branch] [-f|--force] [--reference <repository>] [--] <repository> [<path>]
or: git submodule [--quiet] status [--cached] [--recursive] [--] [<path>...]
or: git submodule [--quiet] init [--] [<path>...]
or: git submodule [--quiet] update [--init] [-N|--no-fetch] [-f|--force] [--rebase] [--reference <repository>] [--merge] [--recursive] [--] [<path>...]
or: git submodule [--quiet] summary [--cached|--files] [--summary-limit <n>] [commit] [--] [<path>...]
or: git submodule [--quiet] foreach [--recursive] <command>
or: git submodule [--quiet] sync [--] [<path>...]
Error running mach:
pub trait ToMessageHandler {
fn to_message_handler<'a>(self) -> Box<MessageHandler + 'a>;
}
impl <'b, F> ToMessageHandler for F where F : Fn(&Frame) -> AckOrNack + 'b {
fn to_message_handler<'a>(self) -> Box<MessageHandler + 'a> {
Box::new(ClosureMessageHandler{closure : self}) as Box<MessageHandler>
}
}
#!/usr/bin/python
import socket, time
connections = []
for i in range(10000):
s = socket.socket()
s.connect(("localhost", 44444))
connections.append(s)
if len(connections) % 100 == 0:
print "Connections: " + str(len(connections))
print "Sleeping"
#![feature(globs)]
extern crate mio;
use mio::*;
use mio::net::*;
use mio::net::tcp::*;
const SERVER: Token = Token(0);
struct Server {
fn main(){
let json_value = from_str("{\"dog\" : \"cat\"}").unwrap();
let keys = &[
&~"1", &~"2", &~"3", &~"4", &~"5", &~"6", &~"7", &~"8", &~"9", &~"10",
&~"11", &~"12", &~"13", &~"14", &~"15", &~"16", &~"17", &~"18", &~"19", &~"20",
&~"21", &~"22", &~"23", &~"24", &~"25", &~"26", &~"27", &~"28", &~"29", &~"30",
&~"31", &~"32", &~"33", &~"34", &~"35", &~"36", &~"37", &~"38", &~"39", &~"40",
&~"41", &~"42", &~"43", &~"44", &~"45", &~"46", &~"47", &~"48", &~"49", &~"50"
{
"module": {
"view_items": [
{
"node": [
"ViewItemUse",
[
{
"node": [
"ViewPathGlob",