Skip to content

Instantly share code, notes, and snippets.

View burtonsamograd's full-sized avatar

Burton Samograd burtonsamograd

  • Looking for Jobs. Will accept crypto.
  • Canada
View GitHub Profile
@burtonsamograd
burtonsamograd / CULT.js
Created July 4, 2018 18:24
Chat User Logger Thing (CULT) - a Chaturbate Chat user logger and note taker runnable in node.js
////////////////////////////////////////////////////////////////////////////////
// Chatubate API Emultaion - Make work on node stuff.
////////////////////////////////////////////////////////////////////////////////
var stdin = process.openStdin();
function randomBoolean () {
if(Math.random() < .5) {
return true;
} else {
return false;
@burtonsamograd
burtonsamograd / nock.lisp
Created October 9, 2015 02:48
A Nock Interpreter and Compiler in Common Lisp #Urbit
;; A nock interpreter
(defun tar (a f)
(labels ((fas (b a)
(declare (integer b))
(cond
((= b 1) a)
((= b 2) (car a))
((= b 3) (cdr a))
((evenp b) (car (fas (/ b 2) a)))
((oddp b) (cdr (fas (/ (1- (the integer b)) 2) a))))))
@burtonsamograd
burtonsamograd / save-lisp-tree-shake-and-die.lisp
Last active February 11, 2024 20:33
A quick and dirty tree shaker for SBCL, giving about a 40% reduction in dump size.
;; -*- mode: lisp -*-
;;
;; A quick and dirty tree shaker for SBCL. Basically, it destroys the
;; package system and does a gc before saving the lisp image. Gives
;; about a 40% reduction in image size on a basic hello world test.
;; Would like to hear how it works on larger projects.
;;
;; Original idea from: https://groups.google.com/d/msg/comp.lang.lisp/6zpZsWFFW18/WMy4PyA9B4kJ
;;
;; Burton Samograd