asdf

ASDF(Another System Definition Facility)λŠ” λΉŒλ“œ μ‹œμŠ€ν…œ μž…λ‹ˆλ‹€ Common Lisp μ†Œν”„νŠΈμ›¨μ–΄ μ‹œμŠ€ν…œμ΄ ꡬ성 μš”μ†Œ(ν•˜μœ„ μ‹œμŠ€ν…œ 및 파일)둜 κ΅¬μ„±λ˜λŠ” 방식과 μ΄λŸ¬ν•œ ꡬ성 μš”μ†Œλ₯Ό μ˜¬λ°”λ₯Έ μˆœμ„œλ‘œ μž‘λ™ν•˜λŠ” 방법을 μ§€μ •ν•˜λŠ” λ„κ΅¬μž…λ‹ˆλ‹€. 컴파일, λ‘œλ“œ, ν…ŒμŠ€νŠΈ 등이 κ°€λŠ₯ν•©λ‹ˆλ‹€.

버전
1Daniel Barlow's ASDF (created on August 1st 2001)
2François-René Rideau's ASDF 2 (released May 31st 2010).
3
κ²½λ‘œμ„€λͺ…
~/common-lisp/Common Lisp μ†Œν”„νŠΈμ›¨μ–΄ μ„€μΉ˜ κΈ°λ³Έ μœ„μΉ˜(ꢌμž₯)
~/.local/share/common-lisp/source/
  • 크게 λ‹€μŒ 2파트둜 λ‚˜λ‰©λ‹ˆλ‹€.
    • asdf/defsystem: νŒ¨ν‚€μ§€μ •μ˜
    • uiop: μœ ν‹Έλ¦¬ν‹°

asdf/defsystem

uiop

UIOP(Utilities for Implementation and OS-Portability)

;; example

(uiop:getenv "USER")

(uiop:run-program "firefox") ; 동기
(uiop:launch-program "firefox") ; 비동기

(uiop:run-program (list "git" "--help") :output t)
(uiop:run-program "htop" :output :interactive :input :interactive)

;;; pipe: ls | sort
(uiop:run-program "sort"
                   :input
                   (uiop:process-info-output
                    (uiop:launch-program "ls"
                                         :output :stream))
                   :output :string)
(uiop:with-temporary-file (:stream s :pathname p :keep t)
  (format t "path is ~a~%" p)
  (format s "hello, temporary file!"))

(uiop:quit 0)