Skip to content

Instantly share code, notes, and snippets.

@asaaki
asaaki / README
Created July 18, 2011 18:50 — forked from peterc/README
testrocket (origin by peterc)
TestRocket is a simple, tiny testing library for Ruby 1.9.
If => in a hash is a "hash rocket", then +-> and --> for tests should be
"test rockets"!
Simple syntax:
+-> { block that should succeed }
--> { block that should fail }
@mattsears
mattsears / README.md
Created September 5, 2011 07:41
Gittr: A Git key/value store

Gittr.rb

Git as a key-value store! Build with Grit, it supports SET, GET, KEYS, and DELETE operations. In addition, we can also get the change history of key/values.

And since it's Git, we can easily enhance it to include other awesome Git features such as branches, diffs, reverting, and more!

Example:

function k() {
kill -9 $(ps ax | grep $1 | grep -v grep | awk '{print $1}')
}
@CoderPuppy
CoderPuppy / approaches.rb
Created August 23, 2012 21:56
Instruction Set
# Vote which one is best
# No Data Registers, Current
set reg(0) => raw("Hello, ")
add 0, raw("Drew")
add reg(0), raw("!!!")
# Array of Data Registers
set "Hello, "
set "Drew"
@CoderPuppy
CoderPuppy / vx-ace.rb
Created September 2, 2012 18:20
RPG Maker Plugin System
# VX Ace Plugin System by CoderPuppy
module Plugins
@all = []
def self.register(plugin)
@all << plugin
@all.uniq!
self
@CoderPuppy
CoderPuppy / .cvimrc
Last active January 30, 2017 15:52
cVim RC
map j scrollLeft
map k scrollDown
map l scrollUp
map ; scrollRight
map K previousTab
map L nextTab
map J goBack
map I goForward
map C-k scrollPageDown
map C-l scrollPageUp

Note to readers: This document is an early draft of a model for memory-safe references that I've been working on for the last ~2 years. While I think it is quite promising, the design is unfinished. The "regions" that I present in this document have not been given a formal semantics, and I have not explained where they originate from. My goal is merely to convince you that the design is promising, and that if seen to completion, it would advance the frontier of zero-cost memory safety.

Update August 2025: Verdagon has written an awesome blog post that explains this proposal at a high level. I recommend you check it out!

Update November 2025: The Carbon team is using this proposal as a starting point for their own memory safety model.

Update August 2026: Mojo 1.0 has adopted a variation of this proposal. See "Interior Origins" in the [Mojo 1.0 release notes](https://mojolang.or

@sir-wabbit
sir-wabbit / phi.md
Last active September 13, 2026 23:37

Phi, briefly

Phi is a tiny self-describing binary tree format. A document is two binary blobs written directly next to each other:

[ encoded type ][ value encoded according to that type ]

The first blob describes the value's complete Phi type. The second blob holds