Skip to content

Instantly share code, notes, and snippets.

View donut.c
int k;
double sin() ,cos();
main(){
float A=0, B=0, i, j, z[1760];
char b[1760];
printf("\x1b[2J");
for(; ; ) {
memset(b,32,1760);
memset(z,0,7040);
for(j=0; 6.28>j; j+=0.07) {
View undoing-the-pain.org.md
@gcr
gcr / donut.jq.md
Last active October 12, 2022 03:12
View donut.jq.md

donut.c, but it's in jq

Run this in your terminal:

                  jq -nr 'def R(A;B;C
            ):range(A;B;C);def R(A):range
          (A);30as$s|1as$R1|2as$R2|7as$K2|(
        $s*$K2*3/(8*($R1+$R2)))as$K1|def t($A;$B
     ):($A|cos)as$cA|($B|cos)as$cB|($A|sin)as$sA|($B
View out-of-service.org
View calculator.rkt
#lang racket
(require parser-tools/yacc
parser-tools/lex
(prefix-in : parser-tools/lex-sre))
;; This implements a simple desk calculator in Racket.
;; Every calculator needs memory!
(define memory (make-parameter 0))
(define (mem-add! x)
View NORTH STAR 1(1) Dec 3 1847.md

THE NORTH STAR

FREDERICK DOUGLASS, M. R. DELANY, Editors

RIGHT IS OF NO SEX - TRUTH IS OF NO COLOR - GOD IS THE FATHER OF US ALL, AND ALL WE ARE BRETHEREN

WILLIAM C. NEIL, Publisher JOHN DICK, Printer


View lambda.py
# Most of this was adapted from
# http://matt.might.net/articles/compiling-up-to-lambda-calculus/
# Python's lambda expressions are turing-complete. To show this, we will
# implement the "Lambda calculus" which is another way of saying "We're so manly
# we don't even NEED if statements!" The lambda calculus was invented in the
# 1930s, and it can solve any computable problem just by using anonymous
# functions that each take one argument and return one value, function
# application, and variable references. No jumps or GO TO's needed.
View merry-xmas-from-kimmmmmy.sh
# 🌟 #
jq\
-rn '"ggEDC
grrggEDCarraaFEDbrrr
GGFDErrrEEErEEErEGCDE"|gsub
("\\s";"")|explode|.[]as$note
|"rg.a.bC
.D.EF.G.A.BC"|gsub
("\\s";"")|explode|index
View 00-cave.js
// cave.js
//
// contains ways of changing, generating, and displaying a cave.
// a cave is a 2d array.
//
// All these methods are side-effect-free builders.
//
var sys = require('sys');
function Cave(width, height, probability) {
View kimmys-treasure-hunt-galaxy.p8
pico-8 cartridge // http://www.pico-8.com
version 29
__lua__
-- kimmys-treasure-hunt-galaxy.p8
points={
0xfffe.ddfa,0x0009.d8e2,0xfffe.ace5,0x0001.0000,
0x0006.b93d,0xfffa.ab8c,0xfffa.dcf1,0x0001.0000,
0xfffa.5019,0x0007.7bd4,0x0003.69e8,0x0001.0000,
0xfffa.ca0e,0x0007.1a5f,0xfffb.4463,0x0001.0000,