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
pico-8 cartridge // http://www.pico-8.com | |
version 8 | |
__lua__ | |
fps = 30 | |
current_frame = 0 | |
x_max = 128 | |
y_max = 128 | |
updated = 0 | |
players = {} |
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
stevej@netty-test-8:~$ ./slow_cooker_linux_amd64 -host perf-cluster -concurrency 10 -qps 100 http://proxy-test-4d:4140 | |
# sending 1000 GET req/s with concurrency=10 to http://proxy-test-4d:4140 ... | |
# good/b/f t goal% min [p50 p95 p99 p999] max bhash change | |
2017-06-09T18:16:35Z 9721/0/0 10000 97% 10s 0 [ 1 2 5 412 ] 412 0 + | |
2017-06-09T18:16:45Z 9105/0/0 10000 91% 10s 0 [ 1 2 4 626 ] 626 0 | |
2017-06-09T18:16:55Z 9195/0/0 10000 91% 10s 0 [ 1 2 3 413 ] 413 0 | |
2017-06-09T18:17:05Z 9387/0/0 10000 93% 10s 0 [ 1 2 5 1003 ] 1003 0 | |
2017-06-09T18:17:15Z 9511/0/0 10000 95% 10s 0 [ 1 3 4 412 ] 412 0 | |
2017-06-09T18:17:25Z 9544/0/0 10000 95% 10s 0 [ 1 3 4 416 ] 416 0 | |
2017-06-09T18:17:35Z 9548/0/0 10000 95% 10s 0 [ 1 2 4 413 ] 413 0 |
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
// Nested borrows are a common source of trouble. This example is a bit contrived | |
// but illustrates the challenge. | |
fn main() { | |
let mut numbers = vec![1,2,3,4]; | |
// Because push() needs a mutable borrow and len() needs an immutable borrow, | |
// the borrow checker lets you know you've broken the rules. | |
numbers.push(numbers.len()); | |
println!("numbers has length {}", numbers.len()); | |
} |
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
#[derive(Debug)] | |
struct Person { | |
id: u64, | |
name: String, | |
} | |
impl Person { | |
// Because we're passing a value, we take ownership of it. If we want to give | |
// ownership back, we have to return it. | |
fn set_name(mut self, new_name: String) -> Person { |
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
// In Rust, much like Go, you organize functions around structs. | |
#[derive(Debug)] | |
struct Person { | |
id: u64, | |
name: String, | |
twitter_handle: String | |
} | |
// Here we hang a function off of a struct. | |
impl Person { |
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
// In Rust, much like Go, you organize functions around structs. | |
#[derive(Debug)] | |
struct Person { | |
id: u64, | |
name: String, | |
twitter_handle: String | |
} | |
// Here we hang a function off of a struct. | |
impl Person { |
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
BigEasy% pwd | |
/Users/stevej/local/src/rust-sdl2 | |
BigEasy% cargo clean | |
BigEasy% cargo build | |
Compiling pkg-config v0.1.3 | |
/Users/stevej/.cargo/registry/src/github.com-1ecc6299db9ec823/pkg-config-0.1.3/src/lib.rs:62:24: 62:43 error: the trait `core::marker::Sized` is not implemented for the type `str` | |
/Users/stevej/.cargo/registry/src/github.com-1ecc6299db9ec823/pkg-config-0.1.3/src/lib.rs:62 .collect::<Vec<_>>(); | |
^~~~~~~~~~~~~~~~~~~ | |
/Users/stevej/.cargo/registry/src/github.com-1ecc6299db9ec823/pkg-config-0.1.3/src/lib.rs:62:24: 62:43 error: the trait `core::marker::Sized` is not implemented for the type `str` | |
/Users/stevej/.cargo/registry/src/github.com-1ecc6299db9ec823/pkg-config-0.1.3/src/lib.rs:62 .collect::<Vec<_>>(); |
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
/Users/stevej/src/CutieBaby/CutieBaby/GameScene.swift:12:6: error: unimplemented IR generation feature non-fixed multi-payload enum layout | |
enum Tree<T>:TreeLike { | |
^ | |
0 swift 0x0000000101e6f028 llvm::sys::PrintStackTrace(__sFILE*) + 40 | |
1 swift 0x0000000101e6f514 SignalHandler(int) + 452 | |
2 libsystem_platform.dylib 0x00007fff89c395aa _sigtramp + 26 | |
3 libsystem_platform.dylib 000000000000000000 _sigtramp + 1983670896 | |
4 swift 0x0000000101ce7290 llvm::ConstantFoldGetElementPtr(llvm::Constant*, bool, llvm::ArrayRef<llvm::Value*>) + 112 | |
5 swift 0x0000000101cef6f3 llvm::ConstantExpr::getGetElementPtr(llvm::Constant*, llvm::ArrayRef<llvm::Value*>, bool) + 51 | |
6 swift 0x0000000101252c0b llvm::IRBuilder<true, llvm::ConstantFolder, llvm::IRBuilderDefaultInserter<true> >::CreateConstInBoundsGEP2_32(llvm::Value*, unsigned int, unsigned int, llvm::Twine const&) + 123 |
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
int main(void) { | |
// unsigned is not much better | |
int i = 3; | |
int j = 7; | |
double k = i / j; | |
return k; | |
} |
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 core::option; | |
/** | |
* Implementation of thunks in Rust. | |
*/ | |
pub struct Lazy<T> { | |
code : @fn() -> T, | |
mut value : Option<T> | |
} |
NewerOlder