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
use std::net; | |
use std::uv; | |
use core::pipes; | |
type ErrChan = pipes::SharedChan<Option<net::tcp::TcpErrData>>; | |
fn on_ready(kill_ch: ErrChan) { | |
io::println("listener is ready"); | |
} |
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
diff -r 9d8977cbbfc6 layout/base/nsCSSRendering.cpp | |
--- a/layout/base/nsCSSRendering.cpp Sat Apr 27 18:21:15 2013 -0400 | |
+++ b/layout/base/nsCSSRendering.cpp Sun Apr 28 17:37:59 2013 -0700 | |
@@ -756,17 +756,28 @@ | |
SN(); | |
} | |
-static nsRect | |
-GetOutlineInnerRect(nsIFrame* aFrame) | |
+nsRect |
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
extern mod foo; | |
use foo::Foo; | |
use foo::Bar; | |
fn main() { | |
assert!(42 == Bar::bar()); | |
assert!(42 == Foo::foo()); | |
} |
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
tag_create_hash | |
:string | |
tag_attributes | |
tag_attribute | |
tag_meta_item_word | |
tag_meta_item_name | |
:string | |
tag_meta_item_name_value | |
tag_meta_item_name | |
:string |
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
tom@desktop:~/Source/rust$ make | |
cfg: build triple x86_64-unknown-linux-gnu | |
cfg: host triples x86_64-unknown-linux-gnu | |
cfg: target triples x86_64-unknown-linux-gnu | |
cfg: host for x86_64-unknown-linux-gnu is x86_64 | |
cfg: os for x86_64-unknown-linux-gnu is unknown-linux-gnu | |
cfg: using gcc | |
cfg: no pandoc found, omitting docs | |
cfg: no node found, omitting docs | |
cfg: no llnextgen found, omitting grammar-verification |
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
gdb$ bt | |
#0 0x00007ffff79a9e85 in option::__extensions__::is_none_17871::_8bda618874e3556::_07pre () from /home/tom/Source/rust/x86_64-unknown-linux-gnu/stage2/bin/../lib/libcore-c3ca5d77d81b46c1-0.7-pre.so | |
#1 0x00007ffff79a9e35 in cell::__extensions__::is_empty_17869::_8bda618874e3556::_07pre () from /home/tom/Source/rust/x86_64-unknown-linux-gnu/stage2/bin/../lib/libcore-c3ca5d77d81b46c1-0.7-pre.so | |
#2 0x00007ffff79a9c68 in cell::__extensions__::take_17866::_62678c1c57713a95::_07pre () from /home/tom/Source/rust/x86_64-unknown-linux-gnu/stage2/bin/../lib/libcore-c3ca5d77d81b46c1-0.7-pre.so | |
#3 0x00007ffff79a817b in task::spawn::spawn_raw_oldsched::make_child_wrapper::anon::expr_fn_17832 () from /home/tom/Source/rust/x86_64-unknown-linux-gnu/stage2/bin/../lib/libcore-c3ca5d77d81b46c1-0.7-pre.so | |
#4 0x00007ffff7ac34d8 in __morestack () from /home/tom/Source/rust/x86_64-unknown-linux-gnu/stage2/bin/../lib/libcore-c3ca5d77d81b46c1-0.7-pre.so | |
#5 0x00007ffff7fc1864 in task_start_wrapper (a=0x40d1e0) at /home/to |
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
touch x86_64-unknown-linux-gnu/stage0/lib/librustllvm.so | |
touch x86_64-unknown-linux-gnu/stage0/lib/libstd.so | |
touch x86_64-unknown-linux-gnu/stage0/lib/libextra.so | |
touch x86_64-unknown-linux-gnu/stage0/lib/librustc.so | |
g++ -DRUST_NDEBUG -fno-omit-frame-pointer -O2 -Wall -Werror -g -fPIC -m64 -fno-rtti -MMD -MP -MT rt/x86_64-unknown-linux-gnu/stage0/sync/timer.o -MF rt/x86_64-unknown-linux-gnu/stage0/sync/timer.d -c -o rt/x86_64-unknown-linux-gnu/stage0/sync/timer.o -I /home/tom/Source/rust/src/rt -I /home/tom/Source/rust/src/rt/isaac -I /home/tom/Source/rust/src/rt/uthash -I /home/tom/Source/rust/src/rt/arch/x86_64 -I /home/tom/Source/rust/src/rt/linenoise -I /home/tom/Source/rust/src/libuv/include -D_RUST_STAGE0 /home/tom/Source/rust/src/rt/sync/timer.cpp | |
g++ -DRUST_NDEBUG -fno-omit-frame-pointer -O2 -Wall -Werror -g -fPIC -m64 -fno-rtti -MMD -MP -MT rt/x86_64-unknown-linux-gnu/stage0/sync/lock_and_signal.o -MF rt/x86_64-unknown-linux-gnu/stage0/sync/lock_and_signal.d -c -o rt/x86_64-unknown-linux-gn |
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 main() { | |
let mut input = str::to_chars("abcd"); | |
while !input.is_empty() { | |
let pair = taken(input, 2); | |
input = dropn(input, 2); | |
io::println(str::from_chars(pair)); | |
} | |
} | |
fn taken<T:Copy>(v: &[T], n: uint) -> ~[T] { |
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
public final class LittleEndianLengthEncoder extends MessageToByteEncoder<ByteBuf> { | |
@Override | |
protected void encode(ChannelHandlerContext channelHandlerContext, ByteBuf in, ByteBuf out) throws Exception { | |
final ByteOrder order = out.order(); | |
out.order(ByteOrder.LITTLE_ENDIAN) | |
.writeInt(in.readInt()) | |
.order(order) | |
.writeBytes(in); | |
} | |
} |
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
use std::clone::Clone; | |
use std::option::{Option, None, Some}; | |
use std::io::net::ip::{SocketAddr, IpAddr}; | |
use std::io::net::tcp::TcpStream; | |
use std::io::net::addrinfo::get_host_addresses; | |
use std::rc::Rc; | |
pub struct Connection { | |
addr: SocketAddr, | |
conn: Rc<TcpStream> |