This file contains hidden or 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 0x00007fffec2f9c73 in ?? () from /usr/lib/x86_64-linux-gnu/libdrm_nouveau.so.1 | |
#1 0x00007fffec2fa17f in nouveau_pushbuf_flush () from /usr/lib/x86_64-linux-gnu/libdrm_nouveau.so.1 | |
#2 0x00007fffe6d6a8bb in ?? () from /usr/lib/x86_64-linux-gnu/dri/libgallium.so | |
#3 0x00007fffeccd3bc4 in dri_unbind_context () from /usr/lib/x86_64-linux-gnu/dri/nouveau_dri.so | |
#4 0x00007fffeccd02d5 in ?? () from /usr/lib/x86_64-linux-gnu/dri/nouveau_dri.so | |
#5 0x00007ffff21bc08d in glXMakeCurrentReadSGI () from /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1 | |
#6 0x00007ffff60d7318 in SkNativeSharedGLContext::createGLContext() () from /home/sully/src/servo/build/src/support/azure/rust-azure/libazure-b845d856dcd50f0-0.1.so | |
#7 0x00007ffff60d7421 in SkNativeSharedGLContext::init(int, int) () from /home/sully/src/servo/build/src/support/azure/rust-azure/libazure-b845d856dcd50f0-0.1.so | |
#8 0x00007ffff600d855 in AzCreateSkiaSharedGLContext () from /home/sully/src/servo/build/src/support/azure/rust-azure/libazure-b845d856dcd50f0-0.1.so |
This file contains hidden or 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
rust: ~"names_bytes = 28" | |
rust: ~"bools_bytes = 38" | |
rust: ~"numbers_count = 15" | |
rust: ~"string_offsets_count = 413" | |
rust: ~"string_table_bytes = 1370" | |
rust: ~"term names: ~[~\"xterm\", ~\"X11 terminal emulator\"]" | |
rust: ~"am set" | |
rust: ~"xenl set" | |
rust: ~"km set" | |
rust: ~"mir set" |
This file contains hidden or 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
#[allow(default_methods)] | |
trait Speak { | |
fn say(&self, s:&str); | |
fn hi(&self) { hello(self); } | |
} | |
fn hello<S:Speak>(s:&S) { | |
s.say("hello"); | |
} |
This file contains hidden or 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
(* Running `fail ()` at the repl will cause it to say: | |
unexpected exception (bug?) in SML/NJ: Representation [Representation] *) | |
fun fail () = | |
let fun idx a i = | |
case (Array.sub (a, i)) | |
of NONE => raise Fail "owt" | |
| SOME x => x | |
val a = Array.array (1, SOME (42, 1337)) | |
in idx a 0 end |
This file contains hidden or 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
val state : unit cont ref = | |
ref (callcc (fn escape : unit cont cont => | |
(callcc (fn k => throw escape k); | |
raise AmbFail))) | |
fun amb [] = throw (!state) () | |
| amb (x::xs) = | |
let val old = !state | |
in callcc (fn escape => | |
(callcc (fn k => (state := k; throw escape x)); |
This file contains hidden or 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
(* The type of the error monad *) | |
datatype 'a Error = Success of 'a | Failure of exn | |
(* Possible definitions of reify/reflect in terms of actual | |
* effectful constructs *) | |
fun reify thunk = (Success (thunk ()) | |
handle e => Failure e) | |
val reify : (unit -> 'a) -> 'a Error = reify | |
fun reflect (Success x) = x |
This file contains hidden or 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 seq_range(lo: uint, hi: uint) -> @[uint] { | |
build(|push| | |
for uint::range(lo, hi) |i| { | |
push(i); | |
} | |
); | |
} |
This file contains hidden or 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 build<A>(builder: fn(push: fn(+A))) -> ~[A] { | |
let mut vec = ~[]; | |
builder(|x| vec::push(vec, x)); | |
return vec; | |
} |
This file contains hidden or 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
\lstdefinelanguage{rust}{ | |
keywords={let, mut, fn, for, do, return}, | |
keywordstyle=\color{blue}\bfseries, | |
ndkeywords={int}, | |
ndkeywordstyle=\color{darkgray}\bfseries, | |
identifierstyle=\color{black}, | |
sensitive=false, | |
comment=[l]{//}, | |
morecomment=[s]{/*}{*/}, | |
commentstyle=\color{purple}\ttfamily, |
This file contains hidden or 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
{-# LANGUAGE GeneralizedNewtypeDeriving, GADTs #-} | |
data SameType a b where | |
Refl :: SameType a a | |
coerce :: SameType a b -> a -> b | |
coerce Refl = id | |
trans :: SameType a b -> SameType b c -> SameType a c | |
trans Refl Refl = Refl |