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_LOG=rustc=0,::rt::backtrace make | |
| cfg: shell host triple x86_64-unknown-linux-gnu | |
| cfg: host for x86_64-unknown-linux-gnu is x86_64 | |
| cfg: unix-y environment | |
| cfg: using gcc | |
| cfg: no llnextgen found, omitting grammar-verification | |
| compile_and_link: x86_64-unknown-linux-gnu/stage0/lib/rustc/x86_64-unknown-linux-gnu/lib/libstd.so | |
| rust: upcall fail 'Assertion !ty::type_has_params(t) failed', /home/rustbuild/src/rustbot/workspace-snap-stage3-x86_64-unknown-linux-gnu/src/src/rustc/middle/trans/common.rs:929 | |
| /code/rust/x86_64-unknown-linux-gnu/stage0/bin/../lib/librustrt.so(_ZN9rust_task13begin_failureEPKcS1_m+0x55)[0x2b5e9c1faf65] | |
| /code/rust/x86_64-unknown-linux-gnu/stage0/bin/../lib/librustrt.so(+0x2fce9)[0x2b5e9c211ce9] |
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
| #[test] | |
| fn rounding() { | |
| // trailing zeroes should be inserted, or rather | |
| // this dodgy floating point stuff should be rounded | |
| assert "3.141589999" == #fmt["%9.9f", 3.14159]; | |
| assert "3.141589999" == float::to_str_common(3.14159, 9u, false); | |
| assert "3.141590000" == my_to_str_common(3.14159, 9u, false); // FIXED | |
| assert "3.14158" == float::to_str_common(3.14159, 5u, false); | |
| assert "3.14159" == my_to_str_common(3.14159, 5u, false); // FIXED |
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 -u knucleotide-output.txt <(rustx knucleotide.rs < knucleotide-input.txt) | |
| --- knucleotide-output.txt 2012-05-30 02:33:06.912688859 -0700 | |
| +++ /dev/fd/63 2012-06-01 01:39:47.330695330 -0700 | |
| @@ -1,19 +1,19 @@ | |
| A 30.279 | |
| -T 30.113 | |
| +T 30.112 | |
| G 19.835 | |
| -C 19.773 | |
| +C 19.772 |
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 chmod(filepath: str, mode: i32) -> i32 { | |
| import libc::types::os::arch::posix88::mode_t; | |
| ret str::as_c_str(filepath, {|fp| libc::chmod(fp, mode as mode_t) }); | |
| } | |
| fn cp(src: str, dest: str) { | |
| // What I'd like to do is something like so, | |
| // but where's the stat function? | |
| // |
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
| #!/bin/bash -x | |
| sudo rm -rf .cargo/ ~/.cargo/ /usr/local/lib/cargo/ \ | |
| && sudo cargo init \ | |
| && sudo cargo sync \ | |
| && cargo install rustx \ | |
| && cargo install --mode=local rustx \ | |
| && cargo install -g rustx \ | |
| && cargo install --mode=user rustx \ | |
| && sudo cargo install -G rustx \ |
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 copy_warn(src: str, dest: str) { | |
| if !os::copy_file(src, dest) { | |
| io::println(#fmt["Copying %s to %s failed", src, dest]); | |
| } | |
| } | |
| fn main() { | |
| // EDIT: not so bad, I just wasn't paying attention | |
| copy_warn("./dir/a", "./dir2" ); | |
| copy_warn("./dir/a", "./dir2/a"); // THIS ONE IS OK |
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
| kunix:temp $ rm -rf .cargo | |
| kunix:temp $ | |
| kunix:temp $ cargo init | |
| info: signature ok for '/code/temp/.cargo/sources.json.new' | |
| info: Initialized .cargo in /code/temp/.cargo | |
| kunix:temp $ | |
| kunix:temp $ cargo sync | |
| info: fetching source central... | |
| info: fetched source: central | |
| info: no signature for source central |
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
| $ cargo install rustx | |
| rust: upcall fail 'can't make_dir /usr/local/lib/cargo/sources', /code/rust/src/cargo/cargo.rs:176 | |
| rust: domain main @0x1382e80 root task failed | |
| rust: upcall fail 'killed', /code/rust/src/libcore/task.rs:454 | |
| ... | |
| $ cargo -g install rustx | |
| rust: upcall fail 'can't make_dir /usr/local/lib/cargo/sources', /code/rust/src/cargo/cargo.rs:176 | |
| rust: domain main @0x15dde80 root task failed | |
| rust: upcall fail 'killed', /code/rust/src/libcore/task.rs:454 |
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
| # Kevin Cantu | |
| # | |
| # inverse fizz buzz, per David Bell's comment | |
| # http://www.jasq.org/2/post/2012/05/inverse-fizzbuzz.html | |
| def makeOffsets(num): | |
| off = [3,5,6,9,10,12,15] | |
| acc = [] | |
| for x in range(num/7 + 2): | |
| acc += map((lambda n: n + 15 * x), off) |
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
| import android | |
| from full_screen_ui_wrapper import full_screen_ui_wrapper | |
| droid = android.Android() | |
| class main_screen(full_screen_ui_wrapper): |