Adapted from: (URL)
- Serves (NUMBER)
- Time: (TIME) prep, (TIME) total
- (ITEM)
Adapted from: http://amazingonepotmeals.com/pressure-cooker-pork-chops/
// To adjust the time taken by this program, change numIters or nVertices | |
var numIters = 5; | |
var golden_output; | |
var PJS_P_MASK = 255; | |
var PJS_P_SIZE = 256; | |
var PJS_P = [151,160,137,91,90,15, | |
131,13,201,95,96,53,194,233,7,225,140,36,103,30,69,142,8,99,37,240,21,10,23, | |
190, 6,148,247,120,234,75,0,26,197,62,94,252,219,203,117,35,11,32,57,177,33, | |
88,237,149,56,87,174,20,125,136,171,168, 68,175,74,165,71,134,139,48,27,166, |
#[warn(path_statement)] | |
fn main() { | |
let x = 3; | |
let boo = (); | |
let foo = (); | |
let Foo = true; | |
let y = if Foo { x; boo } == foo; | |
println!("y: {}", y); | |
} |
trait Foo<T> { } | |
impl Foo<int> for () { } | |
fn bar<T:Send>(_t:T) { } | |
fn main() { | |
let x = ~() as ~Foo:<int>; | |
let y = ~() as ~Foo<int>; | |
println!("x: {:?} y: {:?}", x, y); |
% rustc sr.rs | |
% ./sr | |
x: 3 | |
o.seek().seek(): 4 | |
o.reader().read(): 6 | |
x: 6 |
2014Mar14 18:34 <o11c> rusti: let t="Happy π day!";let s = "<"+t+"> | |
^__^\n ü \\ (oo)\\_______\n ü (__)\\ | |
)\\/\\\n ü ||----w |\n ü || | |
||";let mut i=0u8;for l in | |
s.lines(){println!("{}",l.chars().map(|x|{let | |
s="\x03"+(i+50).to_str()+x.to_str();i=(i+1)%14;s}).to_owned_vec().concat().replace("ü"," | |
".repeat(t.char_len())))}if true{return} | |
2014Mar14 18:34 -rusti- 50<51H52a53p54p55y56 | |
57π58 59d60a61y62!63>50 | |
51 52 53^54_55_56^ |
A cut-and-pastable (but not clickable) url to view from web browser. | |
data:text/html,<img src="https://gist.githubusercontent.com/pnkfelix/9640892/raw/d9b421851de0c315ed8922ec7e34f07dd6cdf451/l_while_x_break.svg"> |
data:text/html,<img src="https://gist.githubusercontent.com/pnkfelix/9641160/raw/62a75e9d1676881b2067d2e0a2ce691399c4499c/l_loop_while_v_if_w_and_x_break_l_else_call_z.svg"> |
#[cfg(test)] | |
mod bench { | |
extern crate test; | |
use self::test::BenchHarness; | |
use super::{total_functional,total_oop}; | |
#[bench] | |
fn bench_imp(bh: &mut BenchHarness) { | |
bh.iter(|| { total_oop(1000) }); | |
} |