Skip to content

Instantly share code, notes, and snippets.


Kris Kowal kriskowal

View GitHub Profile
View compartment-dependency.js
const dependency = new Compartment({}, {}, {
resolveHook: (moduleSpecifier, moduleReferrer) =>
resolve(moduleSpecifier, moduleReferrer),
importHook: async moduleSpecifier => {
const moduleLocation = locate(moduleSpecifier);
const moduleText = await retrieve(moduleLocation);
return new ModuleStaticRecord(moduleText, moduleLocation);
const application = new Compartment({}, {
View compartment-import.js
.then(({ namespace: main }) => {
// …
View lockdown.js
import 'ses';
let compartment = new Compartment();
View async-composition-2020.js
function *count(n) {
for (let i = 0; i < n; i++) {
yield i;
const delay = ms => new Promise(resolve => setTimeout(resolve, ms));
const asyncForEach = async (values, callback) => {
kriskowal / assemble.js
Created May 15, 2020
Compartment assembler demonstration.
View assemble.js
import 'ses';
import { resolveNode, makeNodeImporter } from './node.js';
const { values, entries } = Object;
// gathers all the packages in a lockfile into a flat representation keyed by
// name and version.
const gather = (pkg, map, location) => {
const key = `${}/${pkg.version}`;
if (pkg.dependencies != null) {
View band-names.txt
20 points above the monkey
A Dearth of Crosswalks (via ahuster)
Angry Brain Explosion (via fudco)
Apparently Music? (via ahuster)
Bad Math
Banned Name (via ahuster)
Bdemonic Devices
Betrayed by the Bagel (via ahuster)

I have a bit of good news and bad news. Friday, April 3, was my last day at Uber. Monday, April 6, was my first day at Agoric.

I started at Uber 5½ years ago, on the dispatch system. I joined Tom Croucher’s team, which focused on common frameworks for marketplace systems, with Jake Verbaten, Russ Frank, and spiritually Matthew Esch. When I arrived, the scaffolding and frameworks were in place. I wrote a tool for verifying that JSON schema evolution remained backward-compatible, did some weird stuff to automatically mix the middleware stack, and wrote a thing to balance load across Node.js processes more fairly than the Linux kernel. I don’t believe any of that work made it to production, really, but for those six months, I learned how to operate global dispatch while I was on-call for 24 hours once a month and developed a bald spot.

I then got on board a new Distributed Systems Group under Matt Ranney’s guidance and many of the folks I’ve been working with to this day. Matt had designed a DHT based on the S

kriskowal /
Last active Mar 28, 2020
shell memo
# Very slow build step.
sleep 5
jq .+1
View edlin.lobster
import std
import color
import vec
let fontsize = 40
let cursor = xy{ 4, fontsize }
let cursor_hz = 2
fatal(gl_window("edlin", 800, 800))

Privacy Policy

Kris Kowal built the Peruacrú app as an open source app. This SERVICE is provided by Kris Kowal at no cost and is intended for use as is.

This page is used to inform visitors regarding our policies with the collection, use, and disclosure of Personal Information if anyone decided to use our Service.

You can’t perform that action at this time.