Skip to content

Instantly share code, notes, and snippets.

Avatar

Will Speak iwillspeak

View GitHub Profile
View Greetings.scmproj
<Project Sdk="Feersum.Sdk/0.2.1">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Compile Include="hello.scm" />
</ItemGroup>
@iwillspeak
iwillspeak / .gitignore
Last active Aug 19, 2021
Example Cake Script for Tyrannoport
View .gitignore
bin/
obj/
TestReports/
tools/
/.config/
@iwillspeak
iwillspeak / LLVM From Rust.md
Last active Aug 13, 2021
Example of using LLVM from Rust
View LLVM From Rust.md

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 / env_export.sh
Last active Aug 6, 2021
Shows how to export .env data to the current environment
View env_export.sh
#! /usr/bin/env bash
# this sub-shell constrains the scope of the injected variables
(
export $(xargs <<EOF
Foo=hello
Bar=world
EOF
)
@iwillspeak
iwillspeak / .gitignore
Last active Dec 11, 2020
A Microcrate containing an example hand-written lexer.
@iwillspeak
iwillspeak / eratosthenes.scm
Created Sep 4, 2020
Sieve of Eratosthenes in Scheme
View eratosthenes.scm
;; Implementation of the Sieve of Eratosthenes
;; https://en.wikipedia.org/wiki/Sieve_of_Eratosthenes
(define (eratosthenes n)
;; Mark multiples of the given prime in the vector
(define (mark-multiples p marked)
(define (mark-multiples-at p m marked)
(if (>= m (vector-length marked))
marked
(begin
(vector-set! marked m #t)
@iwillspeak
iwillspeak / Class1.cs
Last active Aug 20, 2020
.NET NU5104 NoWarn Build Errors
View Class1.cs
using System;
namespace bugz
{
public class Class1
{
// This package used to be packable with the .NET Core 3.1.301 SDK but
// packaging fails with the .NET Core 3.1.401 SDK. The exit code from
// `dotnet pack` is now 1 indicating failure. This has prevented
// release builds of some of our libraries.
@iwillspeak
iwillspeak / Cargo.toml
Created Sep 3, 2016
Simple Pratt-style Parsing in Rust
View Cargo.toml
[package]
name = "parsetest"
version = "0.1.0"
authors = ["Will Speak <lithiumflame@gmail.com>"]
[dependencies]
[[bin]]
name = "parsetest"
path = "main.rs"
@iwillspeak
iwillspeak / Counter.elm
Created May 2, 2018
Simple Elm Counter
View Counter.elm
import Html exposing (..)
import Html.Attributes exposing (..)
import Html.Events exposing (..)
main = Html.beginnerProgram { model = model, view = view, update = update }
--- MODEL
type alias Model = Int
@iwillspeak
iwillspeak / .editorconfig
Last active Feb 10, 2018
Demonstration of caching of derived type information using the curiously recurring template pattern
View .editorconfig
root = true
[*.cs]
indent_style = space
indent_size = 4