Skip to content

Instantly share code, notes, and snippets.

View thejpster's full-sized avatar

Jonathan 'theJPster' Pallant thejpster

View GitHub Profile
@thejpster
thejpster / gist:92d791374f8f20c2ae42a4cb10e4dfe2
Last active September 4, 2018 20:31
Failling build for pulse-simple-binding
jonathan@titanium:~/Documents/programming/monotron-synth$ cargo build --example beep --verbose
Updating registry `https://github.com/rust-lang/crates.io-index`
Compiling libpulse-sys v1.3.1
Compiling libc v0.2.43
Compiling libpulse-simple-sys v1.3.1
Compiling monotron-synth v0.1.0 (file:///home/jonathan/Documents/programming/monotron-synth)
Running `rustc --crate-name build_script_build /home/jonathan/.cargo/registry/src/github.com-1ecc6299db9ec823/libpulse-sys-1.3.1/build.rs --crate-type bin --emit=dep-info,link -C debuginfo=2 --cfg 'feature="default"' --cfg 'feature="pa_encoding_from_string"' -C metadata=222890cb92e47160 -C extra-filename=-222890cb92e47160 --out-dir /home/jonathan/Documents/programming/monotron-synth/target/debug/build/libpulse-sys-222890cb92e47160 -L dependency=/home/jonathan/Documents/programming/monotron-synth/target/debug/deps --cap-lints allow`
Running `rustc --crate-name libc /home/jonathan/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.43/src/lib.r
@thejpster
thejpster / gist:90989e6ed1208cf819de4d9783a730f4
Created June 17, 2018 17:27
Backtrace from infinite loop in nom test
>>> bt
#0 0x000055f4cab65267 in core::ptr::<impl *const T>::offset_from (self=0x55f4cabb613e " \"test\"\"test\" \"te\\\"st \" te\\\"st \nlet x = 123;\nlet y = foo(x);\nif y > x {\n baz(true);\n} else {\n bar(false);\n}\nreturn 0x200;\n yfoobazbar\000", origin=0x55f4cabb613d "\" \"test\"\"test\" \"te\\\"st \" te\\\"st \nlet x = 123;\nlet y = foo(x);\nif y > x {\n baz(true);\n} else {\n bar(false);\n}\nreturn 0x200;\n yfoobazbar\000") at /checkout/src/libcore/ptr.rs:774
#1 0x000055f4cab64570 in core::slice::ptrdistance (start=0x55f4cabb613d "\" \"test\"\"test\" \"te\\\"st \" te\\\"st \nlet x = 123;\nlet y = foo(x);\nif y > x {\n baz(true);\n} else {\n bar(false);\n}\nreturn 0x200;\n yfoobazbar\000", end=0x55f4cabb613e " \"test\"\"test\" \"te\\\"st \" te\\\"st \nlet x = 123;\nlet y = foo(x);\nif y > x {\n baz(true);\n} else {\n bar(false);\n}\nreturn 0x200;\n yfoobazbar\000") at /checkout/src/libcore/slice/mod.rs:3075
#2 <core::slice::Iter<'a, T> as core::it
@thejpster
thejpster / gist:4f9686273e107e1a7b20f27a44eae9ff
Created February 4, 2018 21:02
Example menu run-through...
$ cargo run --example simple
Compiling menu v0.1.0 (file:///home/jonathan/Documents/programming/menu)
Finished dev [unoptimized + debuginfo] target(s) in 0.84 secs
Running `target/debug/examples/simple`
> In enter_root
help
foo - makes a foo appear
bar - fandoggles a bar
sub - enter sub-menu
help - print this help text.
$ xargo build --example hello
Compiling core v0.0.0 (file:///home/jonathan/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore)
Finished release [optimized + debuginfo] target(s) in 18.44 secs
Updating git repository `https://github.com/rust-lang-nursery/compiler-builtins`
Compiling compiler_builtins v0.1.0 (https://github.com/rust-lang-nursery/compiler-builtins#0ba07e49)
Finished release [optimized + debuginfo] target(s) in 3.3 secs
Compiling demo v0.1.0 (file:///home/jonathan/Documents/programming/demo)
Compiling cortex-m-rt v0.2.5
Compiling r0 v0.2.2
Compiling vcell v0.1.0
@thejpster
thejpster / uart.rs
Created May 23, 2017 21:25
UART driver doesn't work
//! # UART for the LM4F120H5QR
// ****************************************************************************
//
// Imports
//
// ****************************************************************************
use core::fmt;
use core::intrinsics::{volatile_load, volatile_store};

Keybase proof

I hereby claim:

  • I am thejpster on github.
  • I am thejpster (https://keybase.io/thejpster) on keybase.
  • I have a public key whose fingerprint is 8363 7CE5 71FF 89B5 BD5A 8A0A E8EF 89EF AB9B 6F8C

To claim this, I am signing this object: