Skip to content

Instantly share code, notes, and snippets.


Cassie Jones porglezomp

Block or report user

Report or block porglezomp

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
porglezomp /
Last active Dec 3, 2019
Lets do some proofs about how transforms should behave
porglezomp /
Last active Oct 20, 2019
Creating a Rust hello world in 0x a presses.

This is a Rust "Hello World" program in 0x A presses.

$ vim
$ rustc --test
$ ./hello --quiet
Hello, World!

If you don't know, [the A Button Challenge] is a Mario 64 speedrun category in which runners attempt to use the A button (the jump button!) as few times as possible. Make sure you watch the classic [Watch for Rolling Rocks - 0.5x A Presses][A Button Challenge] video linked above in order to understand.

porglezomp /
Last active Oct 2, 2019
A tool to chop GIFs into 25 discord emoji.
if [ -z "$input" -o -z "$output" ]; then
echo "Usage: $0 <input> <output> [prefix]"
exit 1
porglezomp / Makefile
Created Sep 23, 2019
Multiple return types
View Makefile
all: union exn variant
%: %.cpp
clang++ -Wall -Wextra -Werror -std=c++17 -O3 $< -o $@
rm -f union exn variant
porglezomp / FloatShiftBlend.swift
Created Aug 8, 2019
What does Int << Float mean? :3
View FloatShiftBlend.swift
extension Int {
subscript(bit bit: Int) -> Int {
guard (0..<Int.bitWidth).contains(bit) else { return 0 }
return (self >> bit) & 1
subscript(bit bit: Float) -> Float {
var whole = bit
let fract = bit - whole
return Float(self[bit: Int(whole)]) * (1 - fract)
porglezomp / Denotation.swift
Created Jun 7, 2019
Swift has MixFix operators, right?
View Denotation.swift
// Colin Barrett - @cbarrett
// turning a big dial taht says "Mixfix operators like Agda" on it
// and constantly looking back at the audience for approval
// like a contestant on the price is right
// Here define a mixfix interpreter operator spelled: _ ⊢ ⟦_⟧
prefix operator
postfix operator
porglezomp / CompareChain.swift
Created Jun 7, 2019
Let's do horrible crimes with overloads, in order to get Python-style comparison chaining!
View CompareChain.swift
infix operator <: ChainComparison
infix operator >: ChainComparison
infix operator ==: ChainComparison
infix operator !=: ChainComparison
infix operator <=: ChainComparison
infix operator >=: ChainComparison
precedencegroup ChainComparison {
associativity: left
porglezomp / ShitLetsBeSmalltalk.swift
Last active Aug 21, 2019
Where we're going we don't need primitive control flow!
View ShitLetsBeSmalltalk.swift
/// Like a smalltalk bool, but worse. Just used for control flow, we can use real boolean ops.
class ChitChatBool {
func ifTrue<T>(block: () -> T) -> T? { return nil }
class True: ChitChatBool {
override func ifTrue<T>(block: () -> T) -> T? { return block() }
class False: ChitChatBool { }
porglezomp /
Last active Mar 19, 2019
Homestuck shipping diagram
// neato -Tpng > homestuck.png
digraph Shipping {
subgraph {
edge [dir=none];
Rose -> Kanaya [label=""];
View Tuesday.idr
import Data.Fin
%language TypeProviders
%dynamic "./"
%default total
epoch_seconds : IO Int
epoch_seconds = foreign FFI_C "epoch_seconds" (IO Int)
getTime : IO (Provider Int)
You can’t perform that action at this time.