Skip to content

Instantly share code, notes, and snippets.

@Johniel
Johniel / core.clj
Created April 29, 2012 07:35
lispインタプリタ
;; mini-lisp interpretor
;; org.clojure/clojure 1.3.0
;; org.clojure/clojure-contrib 1.2.0
;; Leiningen 1.6.1 on Java 1.6.0_23 OpenJDK Client VM
(ns mini-lisp.core
(:use [clojure.inspector :include [atom?]])
(:gen-class))
(def prompt "=> ")
(require 'cl)
(require 'deferred)
(require 'http-get)
(require 'xml)
(require 'url)
(setq aoj-url "http://judge.u-aizu.ac.jp/onlinejudge")
(setq aoj-passwd "pass")
(setq aoj-id "id")
;; move tab position
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun tabbar-insert (tabs ctab nth)
(append (nthcar nth tabs)
(list ctab)
(nthcdr nth tabs)))
(defun tabbar-find-remove (ctabs ctab)
(let ((index 0)
(head '())
;; tabbar-buffer-group-function
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(setq tabbar-cycle-scope 'tabs)
;; (define-key global-map (kbd "\C-x <up>") 'tabbar-forward-group)
;; (define-key global-map (kbd "\C-x <down>") 'tabbar-backward-group)
(global-set-key [(C-tab)] 'tabbar-forward-group)
(global-set-key [(C-S-tab)] 'tabbar-backward-group)
;; Switching Between Two Recently Used Buffers
;; http://www.emacswiki.org/emacs/SwitchingBuffers
;; remove left/right tabs
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun tabbar-tab-index(ctabs ctab)
(let ((index 0)
(head '())
(rest ctabs))
(while (not (eq ctab (car rest)))
(incf index)
(setq head (append head (list (car rest))))
(setq rest (cdr rest)))
(setq text nil)
(setq buff-name "k7script")
(setq timer nil)
(setq font nil)
(setq adj nil)
(load-file "path/to/file")
(defun k7:rand-walk (pos)
(let (neighbor)