Skip to content

Instantly share code, notes, and snippets.

View kriskowal's full-sized avatar

Kris Kowal kriskowal

View GitHub Profile

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.

@kriskowal
kriskowal / wanderingents.lobster
Created November 5, 2019 20:08
Wandering Ents Lobster Proof of Concept
import gui
import texture
def scatter(dst, src, stencils):
for(stencils) stencil, i:
for(stencil) j, k:
dst[i][k] = src[j]
def gather_intents(intents, neighborhoods, ents):
for(neighborhoods) neighbors, i:
@kriskowal
kriskowal / runes.go
Created February 2, 2019 22:13
Generate tables for converting an image describing line art into the corresponding runes.
package main
var lineArtRuneOffsets = []uint8{
// Index NnSsEeWs NnSsEeWw Rune
0x00, // 00000000 -------- " "
0x01, // 00000001 -------w "╴"
0x01, // 00000010 -------w "╴"
0x10, // 00000011 ------W- "╸"
0x02, // 00000100 -----e-- "╶"
0x03, // 00000101 -----e-w "─"
// @generated
/*eslint semi:[0], no-native-reassign:[0]*/
global = this;
(function (modules) {
// Bundle allows the run-time to extract already-loaded modules from the
// boot bundle.
var bundle = {};
var main;
@kriskowal
kriskowal / kni-markdown-style.md
Last active December 12, 2018 01:54 — forked from snowyu/kni-markdown-style.md
The new style markdown KNI

Starting with @snowyu’s proposal I infer some design principles:

  1. This language is designed to be easy to render using existing Markdown, YAML, and syntax highlighters.
  2. The language should break out to TypeScript that is evaluated in the scope of a global object that represents all of the play state.
  3. The Markdown script is a Markdown subset that uses inline backtick expressions to break out to an annotation language that carry semantics.
  4. The annotation language embeds the TypeScript grammar for evaluating expressions.

My iteration on this design adds some detail:

  1. We use a Markdown variant that forbids arbitrary HTML, adds semantics to list item notation, and uses backticks for annotations.
@kriskowal
kriskowal / archery.knit
Last active December 12, 2018 01:09
I wonder whether I could make this language work.
- TYPE ITEMTYPE:
- A: THREAD
- ONE: THREAD
- MANY: THREAD
- TYPE ITEM:
- TYPE: ITEMTYPE
- COUNT: NUMBER
- ITEMTYPE ARROWTYPE:
- A: an
idle.then(series([
delay(1000),
() => console.log('A'),
parallel([
series([delay(333), () => console.log('1/3')]),
series([delay(666), () => console.log('2/3')]),
series([delay(999), () => console.log('3/3')]),
]),
delay(1000),
() => console.log('B'),
#!/bin/bash
jq -Rr 'split(",")' | jq -scr '
def table_to_edges: . as [$src, $dst, $weight] |
{$src, $dst, weight: $weight | tonumber};
def edges_to_table: . as {$src, $dst, $weight} |
[$src, $dst, $weight];
def graph_to_edges:
#!/bin/bash
jq -Rr 'split(",")' | jq -scr '
def table_to_edges: . as [$src, $dst, $weight] |
{$src, $dst, weight: $weight | tonumber};
def edges_to_table: . as {$src, $dst, $weight} |
[$src, $dst, $weight];
def graph_to_edges:
@kriskowal
kriskowal / Authors of GG CLA.md
Last active October 4, 2018 17:49 — forked from CLAassistant/SAP_CLA
Authors of GG Contributor License Agreement

Authors of GG Individual Contributor License Agreement

Thank you for your interest in contributing to open source software projects (“Projects”) made available by Authors of GG (“Authors”). This Individual Contributor License Agreement (“Agreement”) sets out the terms governing any source code, object code, bug fixes, configuration changes, tools, specifications, documentation, data, materials, feedback, information or other works of authorship that you submit or have submitted, in any form and in any manner, to Authors in respect of any of the Projects (collectively “Contributions”). If you have any questions respecting this Agreement, please