Skip to content

Instantly share code, notes, and snippets.

;;; cycle-layer-visibility.scm -*-scheme-*-
;;; Author: Edward Hutchins & Randall Sawyer
;;; Version 0.2
;;; I typically bind these to Ctl+Home, Ctl+PgUp, Ctl+PgDn and Ctl+End
;;; so I can do simple layer-based animations
(define (cycle-layer-visibility img select-layer)
(let*
(
(active-layer (car (gimp-image-get-active-layer img)))
@tshatrov
tshatrov / test.txt
Created March 8, 2019 12:45
testing romaji to kana conversion
ICHIRAN/DICT> (loop for kt in (select-dao 'kana-text (:~ 'text (nth-value 1 (ichiran:romaji-kana "koko"))))
do (print (entry-info-short (seq kt))))
"黄口 【こうこう】 : greenhorn; youthfulness and lack of experience"
"股肱 【ここう】 : one's right-hand man; one's trusted henchman"
"弧光 【ここう】 : arc light"
"糊口 【ここう】 : bare livelihood; subsistence"
"後顧 【こうこ】 : looking back; worry; anxiety"
"公庫 【こうこ】 : finance corporation"
"公侯 【こうこう】 : princes and marquises; great feudal lords"
@tshatrov
tshatrov / wtf.py
Created February 28, 2019 15:31
Why doesn't this work?
class AA():
def foo(self, x):
return x + 1
class BB(AA):
def foo(self, x):
return [super().foo(z) for z in x]
bb = BB()
bb.foo([1, 2, 3])
@tshatrov
tshatrov / gist:6917347
Created October 10, 2013 12:12
number printing for Skippy
(defun gif-write-integer (n image index x y)
(let ((digits #(#*111101101101111
#*001011101001001
#*111001111100111
#*111001111001111
#*101101111001001
#*111100111001111
#*111100111101111
#*111001010010100
#*111101111101111
@tshatrov
tshatrov / lisp-setup.md
Created September 30, 2013 15:04
Setting up Common Lisp on Windows 7

1. Install a Common Lisp implementation, or several of them

2. Install Emacs. Official GNU Emacs Windows binaries should work: http://ftp.gnu.org/gnu/emacs/windows/

3. Create a directory where you will store your Lisp projects (you could use Quicklisp's default one but screw that, "c:/lisp" is better than "c:/users/<username>/quicklisp/local-projects")