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
#![feature(plugin)] | |
#![plugin(peg_syntax_ext)] | |
extern crate llvm_sys as llvm; | |
use std::ptr; | |
use std::ffi::CString; | |
use std::collections::HashMap; | |
use llvm::prelude::*; |
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
Compiling lcs v0.1.0 (file:///Users/ulyssecarion/rust/rust-lcs) | |
src/lib.rs:26:14: 26:47 error: the trait `core::cmp::Eq` is not implemented for the type `T` [E0277] | |
src/lib.rs:26 self.backtrack(a, b, a.len(), b.len()) | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
src/lib.rs:26:14: 26:47 help: run `rustc --explain E0277` to see a detailed explanation | |
src/lib.rs:26:14: 26:47 error: the trait `core::cmp::Eq` is not implemented for the type `T` [E0277] | |
src/lib.rs:26 self.backtrack(a, b, a.len(), b.len()) | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
src/lib.rs:26:14: 26:47 help: run `rustc --explain E0277` to see a detailed explanation | |
error: aborting due to previous error |
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
Compiling lcs v0.1.0 (file:///Users/ulyssecarion/rust/rust-lcs) | |
Build failed, waiting for other jobs to finish... |
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
fn backtrack<'a, T>(&self, a: &'a [T], b: &'a [T], i: usize, j: usize) -> Vec<&'a T> | |
where T: Eq { | |
if i == 0 || j == 0 { | |
vec![] | |
} else if a[i] == b[j] { | |
let mut prefix_lcs = self.backtrack(a, b, i - 1, j - 1); | |
prefix_lcs.push(&a[i]); | |
prefix_lcs |
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
https://gist.github.com/0513b84bd3981d34cb88 |
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
fn backtrack<'a, T>(&self, a: &'a [T], b: &'a [T], i: usize, j: usize) -> Vec<&'a T> | |
where T: Eq { | |
if i == 0 || j == 0 { | |
vec![] | |
} else if a[i] == b[j] { | |
let mut prefix_lcs = self.backtrack(a, b, i - 1, j - 1); | |
prefix_lcs.push(&a[i]); | |
prefix_lcs |
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
https://gist.github.com/b22eb3d132441a4e5b19 |
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
fn backtrack<'a, T>(&self, a: &'a [T], b: &'a [T], i: usize, j: usize) -> Vec<&'a T> | |
where T: Eq { | |
if i == 0 || j == 0 { | |
vec![] | |
} else if a[i] == b[j] { | |
let mut prefix_lcs = self.backtrack(a, b, i - 1, j - 1); | |
prefix_lcs.push(&a[i]); | |
prefix_lcs |
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 std::io::{self, Read, Write}; | |
use std::net::Shutdown; | |
use hyper::net::{HttpConnector, NetworkConnector, HttpStream}; | |
fn fetch_http(host: &str, port: u16, scheme: &str, data: &[u8]) -> io::Result<Vec<u8>> { | |
let mut connector = HttpConnector(None); | |
let mut stream = connector.connect(host, port, scheme).unwrap(); | |
println!("{:?}", stream); |
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
Compiling net_replayer v0.0.1 (file:///Users/ulyssecarion/rust/net_replayer) | |
src/lib.rs:4:1: 4:5 src/lib.rs:4:1: 4:5 error: error: expected item, found `asdf` | |
expected item, found `asdf`src/lib.rs | |
:4 asdf-- | |
src/lib.rs:4 asdf-- | |
^~~~ | |
^~~~ | |
Build failed, waiting for other jobs to finish... | |
Could not compile `net_replayer`. |