Instantly share code, notes, and snippets.

# Michael Malismalisper

• Sort options
Created Jun 11, 2016
Fractran Print 1 to 10
View gist:46635d7e3723c911e5f2ec9440908ced
 (2/5 7/51874849202 337186519813/7 3/2 19/33 253/19 17/3 31/17 41/31 29/17 29/23 47/29 59/47 43/29 43/41 4087/43 71/4087 79/71 89/79 73/71 73/59 101/8833 12463/101 97/73 109/97 127/109 107/97 107/103 137/107 149/137 131/107 131/127 23707/131 163/23707 173/163 89/173 167/163 167/149 191/222277 256883/191 181/167 199/181 223/199 197/181 197/193 229/197 239/229 227/197 227/223 60491/227 257/60491 269/257 89/269 263/257 263/239 281/3850583 4143403/281 277/263 307/277 313/307 293/277 293/283 331/293 347/331 317/293 317/313 123197/317 359/123197 373/359 89/373 367/359 367/347 389/59105717 63937247/389 383/367 409/383 421/409 401/383 401/397 433/401 443/433 431/401 431/421 205193/431 461/205193 467/461 89/467 463/461 463/443 491/820232743
Created Jun 11, 2016
Fractran executor
View gist:3a8594c96cea47471565be8d08be25f9
 (defun multiple (a b) "Is A a multiple of B?" (= (mod a b) 0)) (defun next-fraction (n fractions) "Returns the next value of F in the Fractran program." (find-if (lambda (f) (integerp (* n f))) fractions))
Created May 16, 2016
View Brainf*ck Quine
 >>>+++++++++++++++++++++++++++++++++++++++++++>+++++++++++++++++++++++++++++++++++++++++++>+++++++++++++++++++++++++++++++++++++++++++>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>+++++++++++++++++++++++++++++++++++++++++++>+++++++++++++++++++++++++++++++++++++++++++>+++++++++++++++++++++++++++++++++++++++++++>+++++++++++++++++++++++++++++++++++++++++++>+++++++++++++++++++++++++++++++++++++++++++>+++++++++++++++++++++++++++++++++++++++++++>+++++++++++++++++++++++++++++++++++++++++++>+++++++++++++++++++++++++++++++++++++++++++>+++++++++++++++++++++++++++++++++++++++++++>+++++++++++++++++++++++++++++++++++++++++++>+++++++++++++++++++++++++++++++++++++++++++>+++++++++++++++++++++++++++++++++++++++++++>+++++++++++++++++++++++++++++++++++++++++++>+++++++++++++++++++++++++++++++++++++++++++>+++++++++++++++++++++++++++++++++++++++++++>+++++++++++++++++++++++++++++++++++++++++++>+++++++++++++++++++++++++++++++++++++++++++>+++++++++++++++++++++++++++++++++++++++++++>++++++++++++++++++++++++++++++++++
Last active Apr 17, 2016
Quine Relay
View gist:77db18aa8b1cb96fa7a984144eaf51aa
 (self-referential-version-of '(lambda (self) (format t "#include ~%int main(){printf(\"%s\",~(~s~));}" (remove #\newline (prin1-to-string self))))) =>
Created Sep 24, 2015
View Shuffling Analysis
 >> (def test (seed) (flet1 gen () (pop seed) (ret result (vector 1 2 3) (up i 0 3 (swap (aref result i) (aref result (gen))))))) TEST >> (test) ; Evaluation aborted on #. >> (test '(0 0 0)) #(3 1 2)
Created Sep 8, 2015
Macroexpansion of defasm
View gist:610f691e7b3919d6a421
 (progn (let* ((#:*opcode-meta*1641 *opcode-meta*)) (let ((#:new1640 '(adc "Add to Accumulator with Carry" 6 2 indirect-x))) (funcall #'(setf aref) #:new1640 #:*opcode-meta*1641 97))) (let* ((#:*opcode-meta*1643 *opcode-meta*)) (let ((#:new1642 '(adc "Add to Accumulator with Carry" 3 2 zero-page))) (funcall #'(setf aref) #:new1642 #:*opcode-meta*1643 101))) (let* ((#:*opcode-meta*1645 *opcode-meta*)) (let ((#:new1644 '(adc "Add to Accumulator with Carry" 2 2 immediate))) (funcall #'(setf aref) #:new1644 #:*opcode-meta*1645 105)))
Last active Aug 29, 2015
Trace of functions in CL-WHO
View gist:fe2cf8158714c196ec03
 (macroexpand-1 '(with-html-output (*standard-output*) (:p :align "right" "Here is some text with a part of it " (:b "bolded.")))) ;; The function trace 0: (TREE-TO-TEMPLATE ((:P :ALIGN "right" "Here is some text with a part of it " (:B "bolded.")))) 1: (PROCESS-TAG
Created Apr 25, 2015
View Hardest Problem Solver
 (defpackage :hardest-problem (:nicknames :hard) (:use :clamp :experimental :iter) (:shadowing-import-from :experimental :def :mac :fn :defmemo :coerce :while :until :repeat :summing :with :in)) (in-package :hard) (def know (possibilities)
Last active Aug 29, 2015
View Iter through macroexpand-dammit
 (defmacro iter (&body body) (with-gensyms (iter-block accumulate start) (handler-case (macroexpand-dammit:macroexpand-dammit `(block ,iter-block (let ((,accumulate nil)) (macrolet ((while (condition) `(unless ,condition (return-from ,',iter-block (nreverse ,',accumulate))))
You can’t perform that action at this time.