Skip to content

Instantly share code, notes, and snippets.

@takoeight0821
Created December 5, 2015 13:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save takoeight0821/f33a9ef7f40ea4cca75f to your computer and use it in GitHub Desktop.
Save takoeight0821/f33a9ef7f40ea4cca75f to your computer and use it in GitHub Desktop.
ちょっとCommon Lispをいじりたい時に
#!/bin/sh
#|-*- mode:lisp -*-|#
#|
exec ros -Q -- $0 "$@"
|#
#|
$ ros build lisp.ros
$ ./lisp hoge
|#
(defpackage :portable-cl
(:use :cl))
(in-package :portable-cl)
(ql:quickload :alexandria)
(use-package :alexandria)
(defmacro while (test &body body)
`(do ()
((not ,test))
,@body))
(defun main (file-name &rest argv)
(declare (ignorable argv))
(with-open-file (f file-name :direction :input)
(let (s)
(while (setq s (read f nil)) (eval s))))
(terpri))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment