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
#!/bin/bash | |
# | |
# A script that identifies the root of the current rustc checkout. | |
# If the environment variable RUST_ROOT is not set, then it | |
# walks up from the current directory to find the right spot. | |
if [ -n "$RUST_ROOT" ]; then | |
echo "$RUST_ROOT" | |
exit 0 | |
fi |
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 main() { | |
//let bar = (~@&@~&~&@&~@&@&~&@&~@&~@&~@&~@&{ foo: 123.0f64 }).foo; | |
let _Aa1: int = 6789; | |
let _Ab1: int = 6__78__9__; | |
let _Ac1: int = 0xA6b2cDa; | |
let _Ad1: int = 0x__A6__b2__cD__A__; | |
let _Ae1: int = 0b0110010; | |
let _Af1: int = 0b__0__110__10__; |
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
/** Comment | |
Thing / * * / | |
*/ /* */ | |
// /* test | |
// TEST | |
// \\ / Comment \/ // */ |
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
set breakpoint pending on | |
break upcall_fail | |
r | |
bt |
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::comm::DuplexStream; | |
enum PingPong { Ping, Pong }; | |
fn main() { | |
let (channel1, channel2): (DuplexStream<PingPong, PingPong>, DuplexStream<PingPong, PingPong>) = DuplexStream(); | |
spawn |move channel1| { | |
channel.send(Ping), | |
loop { |
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
extern mod rust_lua; | |
extern mod rust_lualib; | |
extern mod rust_lauxlib; | |
use rust_lua::*; | |
use rust_lualib::*; | |
use rust_lauxlib::*; | |
fn main() { | |
let L = luaL_newstate(); |
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
// THIS CODE IS SOOO OBSOLETE. SUITABLE ONLY FOR HISTORICAL CURIOSITY | |
use int::range; | |
use option::get_default; | |
fn main() { | |
for range(1,101) |i| { | |
io::println(get_default( | |
(if i % 3 == 0 { Some(~"Fizz") } else { None } + | |
if i % 5 == 0 { Some(~"Buzz") } else { None }), |
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
extern mod std; | |
use io::WriterUtil; | |
const WIDTH: uint = 76; | |
const HEIGHT: uint = 10; | |
const NUM_BALLS: uint = 10; | |
struct Screen([[char * 76] * 10]); |
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
#!/bin/bash | |
DIR="$PWD" | |
while [[ "$DIR" != "/" && "$DIR" != "$HOME" ]]; do | |
if [[ -r "$DIR/src/libsyntax/syntax.rc" ]]; then | |
echo "$DIR" | |
exit 0 | |
fi | |
DIR=$(dirname "$DIR") | |
done |
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 main() { | |
run_command("ls"); | |
run_command("ls -l"); | |
run_command("ls -l -a"); | |
run_command("lua LoadGen.lua style=pointer_rust -spec=gl -version=3.3 \ | |
-profile=core core_3_3"); | |
} | |
fn run_command(command: &str) -> int { | |
let split = command.split_char(' '); |
OlderNewer