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
Output for `lsusb.py -iIce` with the 512GB exfat external usb drive plugged in | |
------------------------------------------------------------------------------ | |
usb1 [0;1m1d6b:0002[0;0m 09 2.00 480MBit/s 0mA 1IF ([0;31mLinux 4.10.10-1-ARCH xhci-hcd xHCI Host Controller 0000:00:14.0[0;0m) | |
[0;34m(EP) 00: Control attr 00 len 07 max 040[0;0m | |
1-0:1.0 (IF) 09:00:00 1EP (Hub::Full speed (or root) hub) [0;32mhub [0;33m[0;0m | |
[0;34m(EP) 81: Interrupt (256ms) attr 03 len 07 max 004[0;0m | |
1-9 [0;1m04f3:2356[0;0m 00 2.01 12MBit/s 100mA 1IF ([0;1mELAN Touchscreen[0;0m) | |
[0;34m(EP) 00: Control attr 00 len 07 max 008[0;0m | |
1-9:1.0 (IF) 03:00:00 2EPs (Human Interface Device:No Subclass:None) [0;32musbhid [0;33m[0;0m |
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
Contents of `/etc/fstab` | |
------------------------ | |
# | |
# /etc/fstab: static file system information | |
# | |
# <file system> <dir> <type> <options> <dump> <pass> | |
# /dev/nvme0n1p6 | |
UUID=ff9452b7-a7e9-4627-9355-06417be1ac16 / ext4 rw,relatime,data=ordered 0 1 |
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 build --verbose | |
Updating registry `https://github.com/rust-lang/crates.io-index` | |
Downloading bitflags v0.1.1 | |
Downloading num v0.1.24 | |
Downloading rand v0.3.8 | |
Downloading pkg-config v0.3.4 | |
Downloading rustc-serialize v0.3.14 | |
Downloading libc v0.1.7 | |
Compiling bitflags v0.1.1 | |
Running `rustc /home/travis/.cargo/registry/src/github.com-1ecc6299db9ec823/bitflags-0.1.1/src/lib.rs --crate-name bitflags --crate-type lib -g -C metadata=518ea12e21428edd -C extra-filename=-518ea12e21428edd --out-dir /home/travis/build/jeremyletang/rust-portaudio/target/debug/deps --emit=dep-info,link -L dependency=/home/travis/build/jeremyletang/rust-portaudio/target/debug/deps -L dependency=/home/travis/build/jeremyletang/rust-portaudio/target/debug/deps -Awarnings` |
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
mindTree:r3 Mitch$ ./target/debug/ | |
.fingerprint/ build/ deps/ examples/ native/ rid3 rid3.dSYM/ | |
mindTree:r3 Mitch$ ./target/debug/rid3 | |
couldn't open dialog: Error { repr: Os(2) } | |
mindTree:r3 Mitch$ vim | |
Press ENTER or type command to continue | |
mindTree:r3 Mitch$ ./target/debug/rid3 | |
mindTree:r3 Mitch$ cargo run src/bin/rid3.rs |
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 Graphics.Element (..) | |
import Text (..) | |
type alias A = { a: Float } | |
-- Why does this not work? | |
increment1 : A -> A | |
increment1 ({ a } as aye) = | |
let a = a + 1 | |
in { aye | a <- a } |
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::num::Float; | |
trait Foo { | |
type A: Float; | |
// Why is it that this doesn't work... | |
fn sub_a(&self, a: <Self as Foo>::A, b: <Self as Foo>::A) -> <Self as Foo>::A { | |
a - b | |
} | |
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
/// DSP Node trait. Implement this for any audio instrument or effects types that are to be used | |
/// within your DSP chain. Override all methods that you wish. If the Node is a parent of other | |
/// DSP nodes, be sure to implement the `inputs` method. | |
pub trait Node { | |
type Sample: Sample = f32; | |
type Buffer: DspBuffer = Vec<f32>; | |
/// Return the volume for this Node. | |
#[inline] | |
fn vol(&self) -> Volume { 1.0 } |
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 Color (..) | |
import Graphics.Collage (..) | |
import Graphics.Element (..) | |
import Keyboard | |
import Signal | |
import Time (..) | |
import Window | |
-- MODEL | |
mario = { x=0, y=0, vx=0, vy=0, dir="right" } |
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
// Firstly - I LOVE Rust! This is just something that has | |
// been cropping up more and more in my Rust coding experience | |
// recently, so I though it could be good to discuss it with | |
// fellow Rustaceans! | |
// | |
// TOPIC: | |
// I'd love the ability to be able to override parent trait | |
// methods with default methods in the child trait. | |
// | |
// The following is a pattern that I come across very often: |
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
// | |
// I'd like to be able to gain access to the 'foo', 'bar' and 'baz' members | |
// via the "get_my_struct" trait method. | |
// | |
// I'd like to be able to access both 'foo' and 'bar' as well as a mutable ref | |
// to 'baz' in order to write to 'baz' within the 'calc_baz' method. | |
// | |
struct A<'a> { | |
i: int |