This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/sbcl --script | |
;;; brainfuck compiler written in Common Lisp (SBCL) | |
;;; author: TANI Kojiro | |
;;; usage: `sbcl --script brainfuck.lisp` or `chmod +x brainfuck.lisp; ./brainfuck.lisp` | |
(declaim ((simple-array (unsigned-byte 8) (*)) *memory*)) | |
(defvar *memory* (make-array 30000 :element-type '(unsigned-byte 8))) | |
(defvar *pointer* 0) | |
(defvar *bf-readtable* (make-instance 'readtable)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
def load_gist(gist_id): | |
"""translate Gist ID to URL""" | |
from json import load | |
from urllib import urlopen | |
gist_api = urlopen("https://api.github.com/gists/" + gist_id) |