View keybase.md

Keybase proof

I hereby claim:

  • I am algernon on github.
  • I am algernon (https://keybase.io/algernon) on keybase.
  • I have a public key whose fingerprint is 10E6 5DC0 45EA BEFC C519 3A26 AC1E 90BA C433 F68F

To claim this, I am signing this object:

View logic-of-sleep.hy
(import [adderall.dsl [*]]
[human])
(require adderall.dsl)
(defn awake-too-longᵒ [last-sleep-time]
(project [last-sleep-time]
(if (> (- (time) last-sleep-time) 14)
#ss
#uu)))
View fizzbuzzbeep.hy
#! bin/hy
(def targets {3 "fizz" 5 "buzz" 7 "beep"})
(defn match [n factors]
(filter (lambda [x] (= 0 (% n x))) factors))
(defn fizzbuzz [n]
(let [[factors (.keys targets)]
[matches (match n factors)]]
View fizzbuzz.hy
#! bin/hy
; -*- mode: lisp; mode: paredit -*-
(import fizzbuzz-macros)
(defn fizzbuzz [n]
(let [[result ""]]
(if (zero? (% n 3))
(setv result (+ result "fizz")))
(if (zero? (% n 5))
View fizzbuzz-logic.clj
(refer 'clojure.core :exclude [==])
(use '[clojure.core.logic])
(require '[clojure.core.logic.fd :as fd])
(require '[clojure.test :as t])
(defn multo
"Ensure that `n` is a multiplicate of `div`."
[n div]
(fresh [x]
View fizzbuzz-seq.clj
(defn fizzbuzz-seq
[]
(letfn [(nil-prefix [n s]
(concat (take n (cycle [nil])) [s]))]
(map #(let [s (or %4 %2 %3 (inc %1))] s)
(range)
(cycle (nil-prefix 2 "Fizz"))
(cycle (nil-prefix 4 "Buzz"))
(cycle (nil-prefix 14 "FizzBuzz")))))
View python-lisp-hybrid
def foobar(blah):
((for i in range(1, 10):
((((print "blah: %s" % blah))))))
View dance.bas
10 PRINT CHR$(27);"N"
20 PRINT "\o/"
30 PRINT " | "
40 PRINT "/ \"
50 FOR I=1 TO 1000: NEXT
60 PRINT CHR$(27);"N"
70 PRINT " o "
80 PRINT "/|\"
90 PRINT "/ \"
100 FOR I=1 TO 1000: NEXT
View amqp-consumer.py
#! /usr/bin/python
import sys
import pika
# Import all adapters for easier experimentation
from pika.adapters import *
pika.log.setup(pika.log.INFO, color=True)
View uniq-c.pl
#!perl -n
BEGIN{$;=open(STDOUT,"|sort -nr")&&0;}$"=$_ if !$;++;next if $_ eq $";print $;-1 ."|".$";($;,$")=(1,$_);END{print "$;|".$";}