Skip to content

Instantly share code, notes, and snippets.

View warpfork's full-sized avatar

Eric Myhre warpfork

View GitHub Profile
@warpfork
warpfork / wob.go
Created April 28, 2017 20:50
wob wob wob
package main
// the command you are looking for is probably: git update-server-info
import (
"fmt"
"os"
"net/http"
)
package serialization
import (
"testing"
"time"
"github.com/polydawn/refmt/cbor"
"github.com/polydawn/refmt/obj/atlas"
)
@warpfork
warpfork / README.md
Last active October 28, 2018 12:04
kyss spec

the "Keep Your Serialization Simple" format

Kyss -- "Keep Your Serialization Simple" is a serialization format designed for simplicity, unambiguity, and a pleasant experience for human reading and writing.

Kyss was designed with these criteria in mind:

  • Maps, arrays, strings, ints: all the basics should be unsurprising.
@warpfork
warpfork / the-RFC-RFC.md
Last active October 18, 2018 11:59
The RFC RFC

The RFC RFC

There are many kinds of useful artifacts outside of code. This is a discussion of several kinds of docs, how we want to develop them, and how we like to merge and manage them.

Kinds of documents

  • Experience Reports
@warpfork
warpfork / readme.md
Last active November 13, 2018 15:38
Golang Practices: How Warpfork Structures Go Programs
@warpfork
warpfork / thoughts.md
Last active April 28, 2019 12:31
naming and the distributed web

Naming is a fundamentally opinionated operation. The exact mechanism and intensity of opinion may vary by application, but opinionated it certainly is. Opinions require curation. Curation implies either distributed reputation networks (which frankly, I don't think are Possible) or some degree of centralization. QED, it follows that decentralization (as opposed to distributed) is in fact the best we can do.

We can push that a little farther with a tiny bit of separation: it's the assignment of names that's opinionated, and thus requires curation, and thus confined to being decentralized at best. We can still of course make lookup of names completely distributed. And that's pretty good!


Let's talk about some user-stories that come to my mind right now (spoiler, for almost all of them, decentralized&&!distributed is either acceptable or outright desired):

  • package managers: if you talk to these people for any amount of time, naming curation is actually the number one problem. Your reputation
@warpfork
warpfork / enum-generator.go
Created May 2, 2019 21:50
a code generator for enums for golang that i should probably push somewhere serious
package main
/*
This is all explicitly designed to be compatible with BurntSushi's sumtype checker:
https://github.com/BurntSushi/go-sumtype
Concretely, that means we 1) generate an interface and 2) use the unexported method
trick to make it 'sealed'.
All enum values get their own (empty) struct type.
@warpfork
warpfork / gist:62d9bbba39ff052db8dc2431b86813eb
Last active September 9, 2019 04:44
IPFS and Package Mangers -- what does that "<3" mean?
so where we're at right now is:
IPFS is clearly the right primitives for a bunch of stuff.
(E.g., content-addressing is just... clearly the way to go, for all sorts of stuff. Everybody knows that, at this point.
Contentious a few years ago; but approaching "duh" as we come into 2020.)
When we started making IPFS, "Step One" was get it to ship files... worldwide, peer-to-peer.
We did that. It does that. It's pretty cool.
We also did that without a particularly clear focus on performance, etc. Step One was "make it work!"
@warpfork
warpfork / value-construction-options-golang.md
Last active September 12, 2019 11:00
IPLD Schemas Codegen: value construction options in Golang

Codegen output and value construction in Golang

Preface: there are many (many (MANY)) different ways to do codegen. The effects are far-reaching, so they need to be considered carefully; and the cost to support variations is also sky-high, so please be judicious in suggesting "flags" and options.

This is some exploration of the ways we can do builders and constructors for values in the golang code.

@warpfork
warpfork / ipld-in-brief.md
Created October 10, 2019 04:10
IPLD in brief

IPLD one-pager

// this is a work in progress summarization doc.

// see github.com/ipld/specs for more complete reference!

In the IPLD project, we're interested in defining a universally compatible data model. With this, we separate serialization from structure.