Skip to content

Instantly share code, notes, and snippets.

Crab People! Crab People! Crab People!


Crab People! Crab People! Crab People!
View GitHub Profile
View gist:f6e3ab160c2c1d18efba
### Keybase proof
I hereby claim:
* I am xd009642 on github.
* I am xd009642 ( on keybase.
* I have a public key whose fingerprint is E41E B6C4 DF00 0782 0DE0 A150 560F 1F28 BCFC DD24
To claim this, I am signing this object:
# Downloads a random RFC and saves to text file.
import random
import urllib.request
MAX_RFC = 8449
while True:
choice = random.randint(1, MAX_RFC)
View Rust

Rust 2019

This is a bit of a brain dump of my thoughts about Rust 2019. Mainly I work on my own code coverage tool tarpaulin, embedded rust and random little tools. So my perspective will be coloured by this.

Stabilising proc-macro

So this year tarpaulin found itself needing to be compiled on nightly. This was because syntex-syntax is no longer maintained, and as a result, new syntax was

View Cobertura 04 DTD
<!-- Portions (C) International Organization for Standardization 1986:
Permission to copy in any form is granted for use with
conforming SGML systems and applications as defined in
ISO 8879, provided this notice is included in all copies.
<!ELEMENT coverage (sources?,packages)>
<!ATTLIST coverage line-rate CDATA #REQUIRED>
<!ATTLIST coverage branch-rate CDATA #REQUIRED>
<!ATTLIST coverage lines-covered CDATA #REQUIRED>
View generated_cordic.v
module cordic
input clk,
input ce,
input rst,
input signed [18-1:0] x_in,
input signed [18-1:0] y_in,
input [18-1:0] phase_in,
View gist:55a9ceca5d5741991cf524e31db136b8
module cordic
input clk,
input ce,
input rst,
input signed [18-1:0] x_in,
input signed [18-1:0] y_in,
input [18-1:0] phase_in,
pub struct HoughParameters<T, D, F>
D: Dimension,
F: Sized + (Fn(f64) -> Array1<T>),
/// Represents the dimensionality of the hough space
pub dim: PhantomData<D>,
/// Parameter bounds
pub bounds: Array2<T>,
/// Search resolution for each parameter. Should be the same size as bounds.
View audio_load.lua
function read_file(path)
local file, errorMessage =, "r")
if not file then
error("Could not read the file:" .. errorMessage .. "\n")
local content = file:read "*all"
return content
local FileBody = read_file("audio.wav")
use bytes::{Buf, Bytes, BytesMut};
use opentelemetry::sdk;
use opentelemetry::sdk::propagation::TraceContextPropagator;
use opentelemetry::sdk::trace::{Builder, Sampler};
use opentelemetry::trace::TracerProvider;
use opentelemetry::{global::set_text_map_propagator, KeyValue};
use std::convert::TryFrom;
use std::env::var;
use std::net::SocketAddr;
use std::process::Stdio;
View gist:ae5c18faad2dd21beb953f2e72340c8a
#[derive(Debug, Clone)]
pub struct Biquad{
/* */
b0: f64,
b1: f64,
b2: f64,
a1: f64,
a2: f64,