Emacs Lisp
-
Lisp 비교 : Emacs의 개발 환경Programmer/Emacs 2017. 7. 11. 03:36
Emacs의 Programming 관련 공통 설정 Lisp 공통 설정 (use-package paredit :ensure t :diminish paredit-mode :init (use-package paredit-everywhere :ensure t)) Common Lisp Common Lisp의 major-mode는 'lisp-mode'이다. 보통 확장자 '*.lisp'나 '*.l'와 연결되어 있다. SLIME이라는 강력한 REPL 도구가 있다. Common Lisp 설정 예: (add-hook 'lisp-mode-hook (lambda () (setq indent-tabs-mode nil) (paredit-mode t) (helm-gtags-mode 1))) (use-package slime :en..
-
Lisp 비교 : 암호 문자열 감추기 문제 풀이Programmer/Programming 2016. 1. 13. 18:53
"케빈 TV 12회 (상) - 느 언어엔 이런거 없지?"에 주어진 글자수만큼 '*'를 가진 문자열을 생성하는 문제가 나왔다. 여러 언어별 구현이 나왔지만, Common Lisp와 Emacs Lisp, Scheme, Clojure가 없어서 여기에 적어본다. Common Lisp: (defun hide-password (passwd) (coerce (mapcar #'(lambda (x) #\*) (coerce passwd 'list)) 'string)) Emacs Lisp: (defun hide-password (passwd) (coerce (mapcar (lambda (x) ?\*) (coerce passwd 'list)) 'string)) Scheme: (define (hide-password passw..