Guile 하면 전 스트리트 파이터 2의 미국 캐릭터가 생각이 나는군요.

http://en.wikipedia.org/wiki/Guile_(Street_Fighter)

여기에 자세한 정보가 있구요 ^^

사용자 삽입 이미지
 이렇게 생겼었죠 , 좀 미화가 많이 이루어 진거 같기도 하고 -ㅅ-

(음.. 회사에서 신제품 테스트 하다가 , 기존의 태터툴을 쓰면 이미지 관련 해서 다루는게 확실히 불편해서 잘 다루기 힘들군요 ^^; )

거두 절미하고 절대 왼쪽의 가일하고 상관이 없습니다.










가일은 GNU 에서 만든 Scheme 계열의 언어인데 주로 가벼운 모듈이나, 융통성 있는 응용프로그램을 만드는데 쓰입니다.

http://www.gnu.org/software/guile/guile.html 

여기가 공식 페이지 이고 1.8 버젼 까지 나왔습니다.  갑자기 왜 이 Guile 에 주목을 했냐면 '컴퓨터 프로그램의 구조와 해석' 이란 책을 보기 시작했는데 그 책에서 Scheme 을 다루더군요, 그래서 책도 공부할겸 Scheme 언어를 공부할려고 이모 저모 찾아보는데 Scheme 계열의 언어중에서 Guile 이 아주 괜찮은 평가를 받고 있더군요, 심지어는 Guile Emacs 라고 기반 언어구조를 Guile 을 기반으로 한 새로운 Emacs 도 구상하고 있더군요 (참고로 기존의 Emacs 는 Lisp 을 기반으로 합니다. )

Lisp 보다는 매우 빠른 속도로 알려져 있기 때문에 은근히 저두 기대중입니다만, 지금까지의 수많은 Lisp 프로그램을 Scheme 으로 어떻게 포팅하려나 그게 최대의 화두가 될것 같습니다. 뭐 그런데 Scheme 이라는 언어 자체가 Lisp 으로 부터 파생된 언어 이기 때문에 포팅 자체는 문제가 될 것 같지는 않군요.

참고로 Guile 은 윈도 버젼이 없군요. 저 위에 올려진 사이트에서 소스를 받아서 컴파일 하셔서 쓰시던가, 우분투 리눅스를 쓰시는 경우에는 Guile-1.6 과 Guile-1.8 사이에 양자 택일하셔서
sudo aptitude install guile-1.8
이런식으로 인스톨 하시면 됩니다. 다만 guile 을 설치하면 단순히 library 와 scheme 해석기만 설치가 되기 때문에 Emacs 에서는 호출 할려면 따로 설정 해줘야 합니다.

http://www.neilvandyke.org/quack/ 

여기에 가시면 QuakMode 라는 것이 있습니다. quack.el 파일을 받으셔서 load-path 가 연결된 곳에 복사하시고 .emacs 에서

(require 'quack)

하시고 사용하시면 됩니다.

윈도우에서 Scheme 해석기 설치 시!!!


제대로 해석기가 등록 되셨으면 (linux 라면 guile , 윈도우라면 mzscheme )  다음을 통해서 해석기를 실행하실 수 있습니다.

M-x run-scheme
Run Scheme :   <- 이 프롬프트 생성시 TAB 키 누르시고 , Linux 라면 guile 선택, 윈도우 라면 mzscheme 선택하시면 됩니다.

Linux

;; theme 설정
(require 'etheme)
(etheme-apply-theme "cinsk")

;; ruby 모드 설정
(require 'ruby-mode)
(require 'inf-ruby)
(require 'ruby-electric)
(setq auto-mode-alist (cons '("\.rb$" . ruby-mode) auto-mode-alist))

;; ecb 설정
(add-to-list 'load-path
         "/usr/share/emacs-snapshot/site-lisp/ecb/")
(require 'ecb)

;; text mode 할때마다 auto fill 모드로 전환
(add-hook 'text-mode-hook 'turn-on-auto-fill)

;; emacs-rails 설정
(setq load-path (cons "~/.emacs.d/emacs-rails" load-path))
(defun try-complete-abbrev (old)
(if (expand-abbrev) t nil))

(setq hippie-expand-try-functions-list
'(try-complete-abbrev
try-complete-file-name
try-expand-dabbrev))

(require 'rails)
)
;; 3 벌식 키보드 설정
(defun set-my-keyboard()
 "my keyboard setup"
(set-input-method "korean-hangul3")
(global-set-key [?\S- ] 'toggle-input-method)
)
(when enable-multibyte-characters
(set-my-emacs-coding-system)
(set-my-keyboard)
)
;; ecb 외관 설정
(custom-set-variables
  ;; custom-set-variables was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
 '(ecb-layout-name "left14")
 '(ecb-options-version "2.32")
 '(transient-mark-mode (quote identity)))
(custom-set-faces
  ;; custom-set-faces was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
 )


Window

(require 'cl)
(defun set-my-emacs-coding-system()
"my coding system"
 
;; 폰트 설정
(create-fontset-from-fontset-spec "-*-Monaco-*-*-*-*-13-*-*-*-*-*-fontset-term16,
ascii:-*-Monaco-normal-r-normal-*-13-*-*-*-*-*-*-*,
korean-ksc5601:-*-굴림체-normal-r-normal-normal-13-*-96-96-c-*-KSC5601.1987-*")
(set-face-font 'default "fontset-term16")

;; lisp 프로그램 설정
(set-variable 'inferior-lisp-program
  "C:/Progra~1/GCL-2.6.1/bin/gcl1.bat")
(autoload 'fi:common-lisp "fi-site-init" "" t)

(set-language-environment "korean")
;; theme 설정
(setq load-path (cons (expand-file-name "~/.emacs.d/") load-path))
  (require 'etheme)
(etheme-apply-theme "cinsk")

;; ecb 를 설치하기 위한 기본적으로 필요한 패키지들
(add-to-list 'load-path "c:/Program Files (x86)/Emacs/site-lisp/speedbar-0.14beta4")
(add-to-list 'load-path "c:/Program Files (x86)/Emacs/site-lisp/eieio-0.17")
(add-to-list 'load-path "c:/Program Files (x86)/Emacs/site-lisp/semantic-1.4.4")
(setq semantic-load-turn-everything-on t)
(require 'semantic-load)
;; ecb 설정
(add-to-list 'load-path "c:/Program Files (x86)/Emacs/site-lisp/ecb-2.32")
;; *ecb-2.32
(require 'ecb)
)
;; 3벌식 설정
(defun set-my-keyboard()
"my keyboard setup"
(set-input-method "korean-hangul3")
(global-set-key [?\S- ] 'toggle-input-method)
)
(defun set-my-win32-coding()
"my windows environment"
(set-w32-system-coding-system 'euc-kr)
(set-clipboard-coding-system 'euc-kr)
)
(when enable-multibyte-characters
(set-my-emacs-coding-system)
(set-my-keyboard)
(set-my-win32-coding)
)

;; nxml support
  (load "~/.emacs.d/nxml-mode-20041004/rng-auto.el")
  (setq auto-mode-alist
        (cons '("
\\.\\(xml\\|xsl\\|rng\\|xhtml\\)\\'" . nxml-mode)
       auto-mode-alist))
  (unify-8859-on-decoding-mode)

;; Ruby support
    (when (eql system-type 'windows-nt) ; Windows
      (when (eq (shell-command "ruby") 0)
        ; !WARNING! ugly hack because of 1.8.4-20
        (setq config-rubyelispdir
       "doc/ruby/ruby-1.8.4/misc" )
        ; get the installation directory
        (setq config-rubydir
       (substring
        (shell-command-to-string
         "ruby -rrbconfig -e 'puts Config::CONFIG[ \"exec_prefix\"]'") 0 -1))
        ; add the emacs lisp directory so emacs acan find it
        (setq load-path (append
           (list (expand-file-name
          config-rubyelispdir config-rubydir))
           load-path))
        ;; define autoloads
        ;; from inf-ruby.el
        (autoload 'ruby-mode "ruby-mode"
          "Mode for editing ruby source files" t)
        (setq auto-mode-alist
       (append '(("
\\.rb$" . ruby-mode)
          ("[Rr]akefile" . ruby-mode))
        auto-mode-alist))
        (setq interpreter-mode-alist (append '(("ruby" . ruby-mode))
          interpreter-mode-alist))
        (autoload 'run-ruby "inf-ruby"
          "Run an inferior Ruby process")
        (autoload 'inf-ruby-keys "inf-ruby"
          "Set local key defs for inf-ruby in ruby-mode")
        (add-hook 'ruby-mode-hook
           '(lambda ()
       (inf-ruby-keys)))))
(custom-set-variables
  ;; custom-set-variables was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
 '(ecb-layout-name "left14")
 '(ecb-options-version "2.32"))
(custom-set-faces
  ;; custom-set-faces was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
 )
;; emacs-rails 설정
(setq load-path (cons "~/.emacs.d/rails" load-path))

(defun try-complete-abbrev (old)
(if (expand-abbrev) t nil))

(setq hippie-expand-try-functions-list
'(try-complete-abbrev
try-complete-file-name
try-expand-dabbrev))

(require 'rails)



 

사용자 삽입 이미지
                                     by Debra Cameron , James Elliott, Marc Loy

"잘나가는 프로그래머의 강력한 에디터 툴!!! 바로 Emacs 입니다."  라는 카피문구에 속아서 , 어디서 봤는지 기억도 안나지만..  최근 열심히 공부하고 있는 Emacs 입니다.

그냥 툴을 쓰면서 많은 시행착오를 거쳐서 익히는게 제가 툴을 익히는 방법이였는데, Emacs 라는 툴은  너무 어렵다는 소리를 하도 많이 들어서 텍스트를 구하게 됐습니다. 적어도 어떤 일을 할 수 있는가 정도는 알아야 할꺼 같아서요. 그런데 역시나 국내에서는 관련된 책을 구하기가 너무 힘들었습니다. 우연히 알게 된 책도 절판이구요. 지금 소개드리는 책조차 국내판은 초판만 나온 상태에서 절판이였습니다.

이런 상황이 Emacs 의 국내 현상이라고 할 수 있습니다. 주변에서 누군가 친절하게 알려주고 배울 여력만 주었으면, 잘 쓸 수 있을텐데... 참 체계적으로 무엇인가를 배우기 힘든 환경입니다. 주변에서 쓰는 사람 조차 없으니 ㅎㅎ , 그래서 아쉽습니다. 저 또한 후배들한테 친절한 선배가 아니였던데다가, 또한 대학때는 놀기 바빠서 어떤 전공적으로 공부를 열심히 못했던 것이 아쉽기도 하고요, 언제나 혼자 돌아다니는 것이 익숙해져서 저 또한 발전이 정체되고 있었던게 아닌가 싶습니다. 뭐 이런 자책감은 이제 소용이 없지만서두요.

그런 찰나에 책을 알아보다 보니 3판이 2004년에 나왔는데 역시나 교보문고에서 조차 가지고 있지 않다고 하더군요. 원하면 아마존에서 사다주겠다는데 사고 싶은건 당장 사야지, 1주일 이상을 어찌 기다리나요. 그래서 어둠의 경로를 통해서 - 어둠의 지존이 있습니다 ㅎㅎ - 원한다고 하니 3판에 관한 E-book 을 주셨습니다.

책 자체는 전반적으로 쉽습니다. 쉽고 자세하게 emacs 를 설명하고 있습니다. 그러나 또한 어렵습니다. 모순적이긴 하지만 아무리 쉽고 자세하게 설명한다고 해도 emacs 자체가 지닌 까칠함을 잘 설명할 수는 없겠지요. emacs 는 툴의 사용법을 배우라기 보다는 lisp  이라는 언어를 배우라고 강요하는 툴이기 때문이지요 . 그럼에도 불구하고 이책은 emacs 를 사용하고자 하는 사람들은 필독을 요합니다. 전반적인 개요를 알 수 있기 때문이지요.

저는 이책에서 어느 위치에서 어느부분의 설명이 있었다는 정도로만 알고 있고, emacs 를 실제로 사용하면서 나타나는 어려움에 대한 참고로 삼을려고 하고 있습니다. 그러기에는 조금 부족한듯 싶지만..
요즘 Emacs 에 푹 빠져 있습니다. 제가 한번 미치면 정신이 없이 빠져 드는 성격이라 ^^ 그래서 emacs 를 이거 저거 건드려 보고 있지만 , 이거참.. 외국 사이트 조차 emacs 에 대한 자료는 없네요 .

그래도 여기저기 두드려 가면서 얻은 지식을 일차적으로 정리할까 생각중입니다. 그중 첫번째인 일단 환경 파일 부터 !!!

; 문자셋 utf-8 쓰기
(require 'cl)
(defun set-my-emacs-coding-system()
"my coding system"
(set-variable 'inferior-lisp-program "/usr/bin/gcl")
(set-language-environment "korean")
(setq-default coding-system 'utf-8)
(setq-default buffer-file-coding-system 'utf-8)
(setq-default buffer-coding-system 'utf-8)
(setq-default file-name-coding-system 'utf-8)
(setq-default senmail-coding-system 'utf-8)
(setq file-coding-system 'utf-8)
(setq sendmail-coding-system 'utf-8)
(setq terminal-coding-system 'utf-8)
(setq shell-coding-system 'utf-8)

; 여기 까지가 emacs 모든 환경에서 utf-8 으로 문자를 인코딩 하게 세팅 해주는 부분입니다.

(setq load-path (cons (expand-file-name "~/.emacs.d/") load-path))
  (require 'etheme)
(etheme-apply-theme "cinsk")
)

; 여기까지는 emacs 에서 구동되는 테마에 관한것 입니다. 아주 이쁘게 보이죠 ^^


(defun set-my-keyboard()
 "my keyboard setup"
(set-input-method "korean-hangul3")
(global-set-key [\S- ] 'toggle-input-method)
)

; 한글 세팅 입니다. 저는 삼벌식 유저라 hangul3 입니다.
; 2벌식 유저는 hangul2 로 세팅하시면 됩니다.
; global 로 시작하는것은 한/영 전환인데 linux 건 , 윈도건 저는 기본이 shift -space 전환이라 있으나 마나한 세팅이더군요 (실제로 작동하지 않는다는 것입니다) 그래서 C-\ 로 변환

(when enable-multibyte-characters
(set-my-emacs-coding-system)
(set-my-keyboard)
)

; 위에 세팅한 함수들을 실행해 주는 부분이라 하겠습니다. 최근에 어떤 기능인지 알았음 ^^

(defun unicode-shell ()
"Execute the shell buffer in UTF-8 encoding.
Note that you'll need to set the environment variable LANG and others
appropriately."
(interactive)
(let ((coding-system-for-read 'utf-8)
(coding-system-for-write 'utf-8)
(coding-system-require-warning t))
(call-interactively 'shell)))

;최근에 무지 고생하면서 알아낸 emacs 에서 shell 모드 사용시 utf - 8 문자열 셋으로 보이게 세팅해 주는 부분입니다.

(unicode-shell)

+ Recent posts