Skip to content

Instantly share code, notes, and snippets.

@tkych
tkych / morse.lisp
Last active December 15, 2015 15:09
string <-> morse code
;;;; Last modified : 2013-05-31 18:03:49 tkych
;; Usage:
;; (string-to-morse "Samuel")
;; => "... ._ __ .._ . ._.."
;; (morse-to-string "__ ___ ._. ... .")
;; => "MORSE"
;; (string-to-morse "Samuel Morse")
;; => error!! #\Space can't be converted into morse code.
@tkych
tkych / oop-fp-eieio-example.el
Last active December 14, 2015 22:48
Coursera, Programming-Languages, Week8, OOP vs FP, Generic function model OOP by EIEIO
;;;; Last modified : 2013-03-14 22:05:30 tkych
;; Coursera, Programming-Languages, Week8, OOP vs FP
;; Generic function model OOP by EIEIO
;; M-x ielm ; Inferior Emacs Lisp Mode
;; ELISP> (load "oop-fp-eieio-example.el")
;;====================================================================
@tkych
tkych / oop-fp-clos-example.lisp
Last active December 14, 2015 22:49
Coursera, Programming-Languages, Week8, OOP vs FP, Generic function model OOP by CLOS
;;;; Last modified : 2013-03-14 22:00:40 tkych
;; Coursera, Programming-Languages, Week8, OOP vs FP
;; Generic function model OOP by CLOS
;; CL-REPL> (load "oop-fp-clos-example.lisp")
;;====================================================================
;; Adding Operations or Variants
@tkych
tkych / minimum-prompt.el
Last active December 14, 2015 01:09
minimum prompt for eshell
;;;; Last modified : 2013-02-21 20:11:37 tkych
;;====================================================================
;; Minimum Prompt for Eshell
;;====================================================================
;; Only when working-directory or user-name is changed, displays it.
;; Note:
;; If more than 2 eshells are opened and switched them,
;; working-directory may be displayed without changing working-directory.
@tkych
tkych / check-digest.lisp
Last active December 13, 2015 22:39
check digest script
;;;; Last modified : 2013-02-19 22:33:54 tkych
;;====================================================================
;; Check Digest
;;====================================================================
(ql:quickload :ironclad)
(defun check-digest (file-spec digest-name check-sum)
(loop