This file contains hidden or 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
;;; lisp-electric.el --- electric commands editing for S-expression | |
;; メインとなるS式編集用コマンドは以下の3つです。 | |
;; | |
;; lel-matching-char: | |
;; | |
;; "(" か "[" を入力するとそれ自体を挿入し、イベントループに入ります。 | |
;; | |
;; イベントループ内ではタブかS-タブを入力すると、S式単位で範囲選択が | |
;; できます。 |
This file contains hidden or 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
;;eshell-cmpl | |
(require 'pcomplete) | |
(defun pcomplete/sudo() | |
"Completion rules for the `sudo' command." | |
(let ((pcomplete-help "complete after sudo")) | |
(pcomplete-here (eshell-complete-commands-list)))) | |
(defun my-eshell-complete-parse-arguments() |
This file contains hidden or 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
(defun ac-get-pre(prefix) | |
(substring prefix 0 (string-match "[^a-zA-Z0-9]" prefix))) | |
(defun filename-completer-rxexpand(prefix) | |
(let ((dlm-list (split-string prefix "[a-zA-Z0-9]+")) | |
(str-list (split-string prefix "[^a-zA-Z0-9]+"))) | |
(if (string= (car str-list) "") | |
(setq dlm-list (cons "" dlm-list))) | |
(concat "\\`" | |
(mapconcat |
This file contains hidden or 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
(require 'eshell) | |
(require 'cl) | |
(defun normalize-file-name(filename) | |
(let ((skip nil)) | |
(mapconcat | |
'identity | |
(nreverse | |
(mapcan | |
(lambda (str) |
This file contains hidden or 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
(use sdl) | |
(use srfi-1) | |
(use math.mt-random) | |
(use gauche.sequence) | |
(define seed (make <mersenne-twister> :seed (sys-time))) | |
(define bmp-size 3) | |
(define field-width 200) | |
(define field-height 200) |
This file contains hidden or 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
(use srfi-42) | |
(use math.mt-random) | |
(use util.match) | |
(use sdl) | |
(define bmp-size 3) | |
;; point | |
(define (make-point x y) | |
(cons x y)) |
This file contains hidden or 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
(use sdl) | |
(use srfi-43) | |
(use math.mt-random) | |
(define seed (make <mersenne-twister> :seed (sys-time))) | |
(define bmp-size 3) | |
(define field-width 200) | |
(define field-height 200) | |
(define field |
This file contains hidden or 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
(define (offsets l) | |
(list l | |
(append (drop l 1) (take l 1)) | |
(append (take-right l 1) (drop-right l 1)))) | |
(define (next list-of-lists) | |
(apply map | |
(^ lis | |
(apply map | |
(^ k |
This file contains hidden or 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
(define (main-loop scr bmp dstrect) | |
(let loop ((num 0)) | |
(let ((c0 0) ;; ・ | |
(c1 1) ;; → | |
(c2 -1) ;; ← | |
(c3 (+ field-width)) ;; ↓ | |
(c4 (+ 1 field-width)) ;;↓→ | |
(c5 (+ -1 field-width)) ;;↓← | |
(c6 (- field-width)) ;;↑ | |
(c7 (- 1 field-width)) ;;↑→ |
This file contains hidden or 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
import Data.List | |
import Data.IORef | |
import System.Random | |
import Control.Monad | |
import Graphics.Rendering.OpenGL | |
import Graphics.UI.GLUT | |
width = 300 | |
height = 300 | |
widthf = 300 |
OlderNewer