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 list::Node; | |
mod list { | |
use std::mem; | |
#[derive(Show)] | |
pub struct Node<T> { | |
pub data: T, | |
prev: Option<Box<Node<T>>>, | |
next: Option<Box<Node<T>>> |
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
[[36mINFO[0m] Entry point EntryPoint { name: "main", execution_model: Vertex, work_group_size: WorkGroupSize { x: 0, y: 0, z: 0 } } | |
[[32mDEBUG[0m] SPIRV-Cross generated shader: | |
#include <metal_stdlib> | |
#include <simd/simd.h> | |
using namespace metal; | |
struct u_locals | |
{ | |
packed_float3 model_offs; |
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(if_let)] | |
use nomove::{freeze, freeze_box, FreezeSlice, NoMoveGuard}; | |
use std::cell::Cell; | |
mod nomove { | |
pub struct NoMoveGuard<T> { | |
pub data: T, | |
no_copy: ::std::kinds::marker::NoCopy, | |
} |
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
struct Foo(uint); | |
fn main() | |
{ | |
enum Bar { Baz(Foo) }; | |
let x = Baz(Foo(4)); | |
fn foo(_bar : uint) -> Foo { Foo(3) } | |
match x { | |
Baz(foo(x)) => println!("{:?}", x) |
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
#0 0x00007ffff62c9910 in __cxa_throw () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | |
#1 0x00007ffff741db0a in rust_begin_unwind (token=839147) at /home/ubuntu/rust/rust-0.8/src/rt/rust_builtin.cpp:509 | |
#2 0x00007ffff77a04a6 in rt::task::Unwinder::begin_unwind::h7c12263797ed078hEa6::v0.8 () | |
from /home/ubuntu/rust/src/../../../../usr/local/lib/rustc/x86_64-unknown-linux-gnu/lib/libstd-6c65cf4b443341b1-0.8.so | |
#3 0x00007ffff779f7d3 in sys::begin_unwind_::h89e154cd0915671ak::v0.8 () from /home/ubuntu/rust/src/../../../../usr/local/lib/rustc/x86_64-unknown-linux-gnu/lib/libstd-6c65cf4b443341b1-0.8.so | |
#4 0x00007ffff779f302 in sys::__extensions__::fail_with::anon::anon::expr_fn::aV () from /home/ubuntu/rust/src/../../../../usr/local/lib/rustc/x86_64-unknown-linux-gnu/lib/libstd-6c65cf4b443341b1-0.8.so | |
#5 0x00007ffff779f228 in c_str::ToCStr::with_c_str::hc6798931b183a7aS::v0.8 () from /home/ubuntu/rust/src/../../../../usr/local/lib/rustc/x86_64-unknown-linux-gnu/lib/libstd-6c65cf4b443341b1-0.8.so | |
#6 0x00007f |
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
#!/usr/bin/env ruby | |
require 'uri' | |
require 'set' | |
urls = Set.new() | |
STDIN.each_line do|line| | |
begin | |
url = URI.parse(line.downcase).host |
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(core)] | |
macro_rules! inherit { | |
{ | |
$(#[$flag_struct:meta])* struct $child:ident : $parent:ty { | |
$($(#[$flag_field:meta])* $field:ident: $ty:ty),* | |
} | |
} => { | |
extern crate core; |
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
#![cfg_attr(test, feature(rustc_private))] | |
use std::cell::UnsafeCell; | |
use std::marker::PhantomData; | |
use std::ops; | |
struct InvariantLifetime<'id>( | |
PhantomData<*mut &'id ()>); | |
impl<'id> InvariantLifetime<'id> { | |
#[inline] |
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
# Build instructions | |
# Build initial libraries | |
cargo build --release | |
# Build executable as I have been doing. | |
#HASH = insert hash here \ | |
rustc src/lib.rs --crate-name libcukoo --crate-type bin \ | |
-C target-cpu=native -C prefer-dynamic -C opt-level=3 \ | |
-C metadata=$HASH -C extra-filename=-$HASH --out-dir ./target/release \ |
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::ffi::OsStr; | |
use std::process::Command; | |
use std::borrow::Cow; | |
use std::convert::Into; | |
pub fn exec_slurp<'a>(cmd: &'a str, args: &[&OsStr]) -> Cow<'a, str> { | |
println!("exec_slurp({}, {:?})", cmd, args); | |
Command::new(cmd) | |
.args(args) |
NewerOlder