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
/* | |
SDL - Simple DirectMedia Layer | |
Copyright (C) 1997-2012 Sam Lantinga | |
This library is free software; you can redistribute it and/or | |
modify it under the terms of the GNU Lesser General Public | |
License as published by the Free Software Foundation; either | |
version 2.1 of the License, or (at your option) any later version. | |
This library is distributed in the hope that it will be useful, |
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 strict"; | |
// See browser tests for examples (tests/runner.py, search for sdl_). Run with | |
// python tests/runner.py browser | |
// Notes: | |
// SDL_VIDEORESIZE: This is sent when the canvas is resized. Note that the user | |
// cannot manually do so, so this is only sent when the | |
// program manually resizes it (emscripten_set_canvas_size | |
// or otherwise). |
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
Index: configure.proto | |
=================================================================== | |
--- configure.proto (revision 35456) | |
+++ configure.proto (working copy) | |
@@ -2847,89 +2847,6 @@ | |
fi | |
dnl check for opengl libs. | |
- AC_MSG_CHECKING(whether we can use the GL library) | |
- |
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::marker::PhantomData; | |
use std::cell::Cell; | |
struct Scope<'s> { | |
num: Cell<usize>, | |
phantom: PhantomData<Cell<&'s mut ()>>, | |
//ms: Vec<&'s mut i32>, <-- useful trick for understanding lifetimes | |
} | |
impl<'s> Scope<'s> { |
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
ALU | |
Sequence: name=ALUSeq | |
SetInteger: name=SI00 | |
Sequence: name=Seq.1 | |
SetInteger: name=SI01 | |
Sequence: name=Seq1. | |
SetInteger: name=SI10 | |
Sequence: name=Seq.1-2 | |
SetInteger: name=SI11 | |
Sequence: name=Decoder |
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::any::TypeId; | |
use std::any::Any; | |
fn wrap<F: Fn()+Any>(closure: F) -> extern "C" fn() { | |
extern "C" fn wrapped<F: Any>() -> () { | |
println!("Haven't written this yet! TypeId: {:?}", TypeId::of::<F>()); | |
} | |
println!("Storing closure {:?}", TypeId::of::<F>()); | |
wrapped::<F> | |
} |
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(type_macros)] | |
struct Zero; | |
struct Succ<T>(T); | |
macro_rules! newtype { | |
($name_:ident) => { | |
get_and_inc!($name_, Zero); | |
} |
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(specialization)] | |
#![allow(dead_code)] | |
struct Nil; | |
struct Cons<H, T>(H, T); | |
trait MayContain<T> { | |
fn get(&self) -> Option<&T>; | |
fn get_mut(&mut self) -> Option<&mut 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
#![feature(specialization)] | |
#![allow(dead_code)] | |
struct Nil; | |
struct Cons<H, T>(H, T); | |
struct Zero; | |
struct Succ<T>(T); | |
trait At<L> { |
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(specialization)] | |
#![allow(dead_code)] | |
struct Here; | |
struct There<T>(T); | |
struct Nil; | |
struct Cons<Head, Index, Tail>(Head, Index, Tail); | |
trait ContainsAt<T, I> { |