Skip to content

Instantly share code, notes, and snippets.

View koji-kojiro's full-sized avatar

TANI Kojiro koji-kojiro

  • Osaka, Japan
View GitHub Profile
@koji-kojiro
koji-kojiro / brainfuck.lisp
Last active January 14, 2021 22:56
brainfuck compiler written in Common Lisp (SBCL)
#!/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))
@MrYakobo
MrYakobo / printf ARM
Last active May 13, 2022 11:26
print number to stdout in Raspberry Pi ARM Assembly
(this file changes the title of this Gist, ignore this)
@fukamachi
fukamachi / clhs.ros
Last active May 5, 2021 06:54
A Roswell script for opening HyperSpec page describing a given symbol in the default browser.
#!/bin/sh
#|-*- mode:lisp -*-|#
#|
exec ros -Q -- $0 "$@"
|#
#|
A Roswell script to open the HyperSpec page of a specified symbol in the default browser.
@rduplain
rduplain / editor.py
Last active October 21, 2018 19:32
Wrap sed in Python to provide ed-style line editing in a simple function call.
"Wrapper to provide ed-style line editing."
# Ron DuPlain <ron.duplain@gmail.com>
from subprocess import Popen, PIPE
def edit(text, command):
r"""Edit given text using ed-style line editing, using system's sed command.
Examples:
;;; anything-gist.el --- anything-sources and some utilities for gist.
;; Filename: auto-complete-acr.el
;; Description: Anything extension for gist
;; Author: myuhe <yuhei.maeda_at_gmail.com>
;; Maintainer: myuhe
;; Copyright (C) 2009, 2010, myuhe , all rights reserved.
;; Created: 2009-04-13
;; Version: 0.6
;; Keywords: convenience, anything, git, gist