Skip to content

Instantly share code, notes, and snippets.

use term;
use term::{Terminal,color};
use term::color::Color;
use term::attr::Attr;
use std::io;
use std::io::IoResult;
use std::io::stdio::StdWriter;
enum Shell {
NoColor(BasicTerminal<StdWriter>),
@wycats
wycats / cargo.md
Last active August 29, 2015 13:57
Cargo Status Update - Week of March 17, 2014

Our major goal this week was cleanup: we're planning on moving our current work to the rust-lang repository in the next week or two, so cleanup was the order of the week.

Command Structure

Because Cargo uses the same design as git (many plumbing commands that are used by a smaller number of high-level porcelain commands), getting a standard way to write commands with limited boilerplate was a high priority to get done before we wrote too many commands. We wrote the first few commands by hand, then extracted out some useful abstractions.

A few weeks ago, I wrote a library named Hammer.rs that allows you to decode command-line flags into a struct.

extern crate hammer;
@wycats
wycats / skylight.md
Created March 15, 2014 02:36
A walk through the Skylight UI

Response Time

There are several places that your application's response times appear in Skylight. It is important to note that we always show the 95th percentile response time, not the average. While this take significantly more computation on the backend to determine, it is a much, much better number to indicate real world performance than the average.

Averages are almost useless when thinking about web performance, and in the worst case, are actually misleading. For more information, see DHH's blog post The problem with averages. Google, Twitter, and GitHub (to name a few) all use 95th percentile numbers when tracking performance.

App Dashboard

#[crate_id = "hamcrest"];
pub trait Matcher<T> {
fn matches(&self, actual: &T) -> bool;
}
/*
*
* ===== Matchers =====
*
#[crate_id = "hamcrest"];
pub trait Matcher<T> {
fn matches(&self, actual: &T) -> bool;
}
/*
*
* ===== Matchers =====
*
define(["ember/foo", "ember/bar", "ember/baz"], function(__dependency1__, __dependency2__, __dependency3__) {
var a = __dependency1__.a,
b = __dependency1__.b,
c = __dependency1__.c;
var d = __dependency2__.d;
var e = __dependency3__.e;
});
define(["ember/foo", "ember/bar", "ember/winkle"], function(__dependency1__, __dependency2__, __dependency3__) {
%%{
machine http_date;
write data;
}%%
#[deriving(Clone, Eq, Ord)]
pub struct HttpDate {
year: uint,
month: u8,
day: u8,
//#set_loc(1, "examples/rust/atoi.rl");
//#set_loc(5, "examples/rust/atoi.rs");
static _atoi_actions: &'static [i8] = &[
0, 1, 0, 1, 1
];
static _atoi_key_offsets: &'static [i8] = &[
0, 0, 4, 6, 9
# Ruby 1.9.2
location = nil
Net::HTTP.start("github.com", 443, use_ssl: true) do |http|
uri = URI.parse("https://github.com/skylightio/skylight-rust/releases/download/v0.3.0-pre.1/libskylight-x86_64-linux.a.gz")
response = http.get(uri.request_uri)
location = response["Location"]
end
#[feature(macro_rules)];
#[crate_id = "skylight#0.0.1"];
#[no_uv];
#[desc = "Direwolf Agent"];
#[license = "MIT"];
use std::prelude::*;
extern mod std = "std#0.10-pre";