Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View iwillspeak's full-sized avatar
🚲
The status is always bike

Will Speak iwillspeak

🚲
The status is always bike
View GitHub Profile
@iwillspeak
iwillspeak / Cargo.toml
Created July 11, 2017 18:07
Microcrate for Onig Link Error on Windows
[package]
name = "oni"
version = "0.1.0"
authors = ["Ian Pickering <ipickering2@gmail.com>"]
[dependencies]
onig = "1.4"
[[bin]]
name = "oni"
@iwillspeak
iwillspeak / Cargo.toml
Created February 25, 2017 15:24
Yop Yop Yop
[package]
name = "yop"
version = "0.1.0"
authors = ["Will Speak <lithiumflame@gmail.com>"]
[dependencies]
[[bin]]
name = "yop"
path = "yop.rs"
@iwillspeak
iwillspeak / steps.rs
Created January 31, 2017 20:46
Steps
#![feature(inclusive_range_syntax)]
/// Steps At
///
/// Returns the number of combinations of steps which can be made
/// where the top step is a given size. This is used as the recursive
/// step.
///
/// # Arguments
///
@iwillspeak
iwillspeak / LLVM From Rust.md
Last active July 30, 2023 08:40
Example of using LLVM from Rust

An Example of Using LLVM from Rust

This example compiles a simple function using the LLVM C API through the llvm-sys crate.

@iwillspeak
iwillspeak / Cargo.toml
Created September 3, 2016 17:49
Simple Pratt-style Parsing in Rust
[package]
name = "parsetest"
version = "0.1.0"
authors = ["Will Speak <lithiumflame@gmail.com>"]
[dependencies]
[[bin]]
name = "parsetest"
path = "main.rs"
@iwillspeak
iwillspeak / Time.cs
Created July 5, 2016 08:39
Thoughts on Time
abstract class TZ
{
public abstract TimeSpan UTCOffset { get; }
}
sealed class BST : TZ
{
public override TimeSpan UTCOffset => TimeSpan.FromHours(1);
}
@iwillspeak
iwillspeak / euler12.wren
Created October 25, 2015 10:43
Another Implementation of the Solution to Project Euler 12
class Euler12 {
construct new(cutoff) {
_cutoff = cutoff
}
find_divisors(n) {
var nod = 0
var sqrt = n.sqrt.floor
@iwillspeak
iwillspeak / cargo.toml
Last active October 25, 2015 10:44
Now Slightly Less Hacky Brute Force of Projec Euler 12 in Rust
[package]
name = "euler12"
version = "0.1.0"
[[bin]]
name = "euler12"
path = "euler12.rs"
@iwillspeak
iwillspeak / .gitignore
Last active December 11, 2020 11:50
A Microcrate containing an example hand-written lexer.
target
#include <string>
#include <iostream>
#define CAPTURE_TOKEN(t) \
token->value = std::string(ts, te-ts); \
token->type = Token::t
%%{
machine ExampleLexer;