Commit 3054fbc3 authored by Pascal J. Bourguignon's avatar Pascal J. Bourguignon

Added a few more asd files.

parent 6a457d8c
;;;; -*- mode:lisp;coding:utf-8 -*-
;;;;**************************************************************************
;;;;FILE: com.informatimago.small-cl-pgms.asd
;;;;LANGUAGE: Common-Lisp
;;;;SYSTEM: Common-Lisp
;;;;USER-INTERFACE: NONE
;;;;DESCRIPTION
;;;;
;;;; This system loads the various small-cl-pgms systems.
;;;;
;;;;AUTHORS
;;;; <PJB> Pascal J. Bourguignon <[email protected]>
;;;;MODIFICATIONS
;;;; 2014-12-23 <PJB> Added asd file.
;;;;BUGS
;;;;LEGAL
;;;; AGPL3
;;;;
;;;; Copyright Pascal J. Bourguignon 2005 - 2014
;;;;
;;;; This program is free software: you can redistribute it and/or modify
;;;; it under the terms of the GNU Affero General Public License as published by
;;;; the Free Software Foundation, either version 3 of the License, or
;;;; (at your option) any later version.
;;;;
;;;; This program is distributed in the hope that it will be useful,
;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;;; GNU Affero General Public License for more details.
;;;;
;;;; You should have received a copy of the GNU Affero General Public License
;;;; along with this program. If not, see <http://www.gnu.org/licenses/>.
;;;;**************************************************************************
(asdf:defsystem :com.informatimago.small-cl-pgms
:name "com.informatimago.small-cl-pgms"
:description "Small Common Lisp Programs"
:author "Pascal J. Bourguignon"
:version "1.0.0"
:license "GPL3"
:depends-on ("com.informatimago.small-cl-pgms.brainfuck"
"com.informatimago.small-cl-pgms.what-implementation"
"com.informatimago.small-cl-pgms.life"
"com.informatimago.small-cl-pgms.quine")
:components ()
#+not-yet ((:file "1024")
(:file "author-signature")
(:file "cube")
(:file "douze")
(:file "example-soft-opcodes")
(:file "index")
(:file "init")
(:file "minlisp")
(:file "moon")
(:file "puzzle")
(:file "solitaire")
(:file "toy-byte-code")
(:file "wang-cl")))
;;;; THE END ;;;;
;;;; -*- mode:lisp;coding:utf-8 -*-
;;;;**************************************************************************
;;;;FILE: com.informatimago.small-cl-pgms.life.asd
;;;;LANGUAGE: Common-Lisp
;;;;SYSTEM: Common-Lisp
;;;;USER-INTERFACE: NONE
;;;;DESCRIPTION
;;;;
;;;; This system loads a simple Conway's Life game.
;;;;
;;;;AUTHORS
;;;; <PJB> Pascal J. Bourguignon <[email protected]>
;;;;MODIFICATIONS
;;;; 2014-12-23 <PJB> Added asd file.
;;;;BUGS
;;;;LEGAL
;;;; AGPL3
;;;;
;;;; Copyright Pascal J. Bourguignon 2005 - 2014
;;;;
;;;; This program is free software: you can redistribute it and/or modify
;;;; it under the terms of the GNU Affero General Public License as published by
;;;; the Free Software Foundation, either version 3 of the License, or
;;;; (at your option) any later version.
;;;;
;;;; This program is distributed in the hope that it will be useful,
;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;;; GNU Affero General Public License for more details.
;;;;
;;;; You should have received a copy of the GNU Affero General Public License
;;;; along with this program. If not, see <http://www.gnu.org/licenses/>.
;;;;**************************************************************************
(asdf:defsystem :com.informatimago.small-cl-pgms.life
:name "com.informatimago.small-cl-pgms.life"
:description "A simple Conway's Life game."
:author "Pascal J. Bourguignon"
:version "1.0.0"
:license "GPL3"
:depends-on ()
:components ((:file "life")))
;;;; THE END ;;;;
;;;; -*- mode:lisp;coding:utf-8 -*-
;;;;**************************************************************************
;;;;FILE: com.informatimago.small-cl-pgms.quine.asd
;;;;LANGUAGE: Common-Lisp
;;;;SYSTEM: Common-Lisp
;;;;USER-INTERFACE: NONE
;;;;DESCRIPTION
;;;;
;;;; This system loads a few quines.
;;;;
;;;;AUTHORS
;;;; <PJB> Pascal J. Bourguignon <[email protected]>
;;;;MODIFICATIONS
;;;; 2014-12-23 <PJB> Added asd file.
;;;;BUGS
;;;;LEGAL
;;;; AGPL3
;;;;
;;;; Copyright Pascal J. Bourguignon 2005 - 2014
;;;;
;;;; This program is free software: you can redistribute it and/or modify
;;;; it under the terms of the GNU Affero General Public License as published by
;;;; the Free Software Foundation, either version 3 of the License, or
;;;; (at your option) any later version.
;;;;
;;;; This program is distributed in the hope that it will be useful,
;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;;; GNU Affero General Public License for more details.
;;;;
;;;; You should have received a copy of the GNU Affero General Public License
;;;; along with this program. If not, see <http://www.gnu.org/licenses/>.
;;;;**************************************************************************
(asdf:defsystem :com.informatimago.small-cl-pgms.quine
:name "com.informatimago.small-cl-pgms.quine"
:description "A few Quines."
:author "Pascal J. Bourguignon"
:version "1.0.0"
:license "GPL3"
:depends-on ()
:components ((:file "quine")))
;;;; THE END ;;;;
......@@ -32,7 +32,15 @@
;;;; You should have received a copy of the GNU Affero General Public License
;;;; along with this program. If not, see <http://www.gnu.org/licenses/>
;;;;****************************************************************************
(defpackage "COM.INFORMATIMAGO.SMALL-CL-PGMS.QUINES"
(:export #+clisp "QUINE-1"
"QUINE-2" "QUINE-2S" "QUINE-2E"
"QUINE-3"
#+clisp "TRY-QUINE-1"
"TRY-QUINE-2"
"TRY-QUINE-3"
"TRY-LAMBDA-QUINE"))
(in-package "COM.INFORMATIMAGO.SMALL-CL-PGMS.QUINES")
;; -------------------------------------------------------------------
;; QUINE-1 cheats a little: it works only on clisp and on a
......@@ -112,22 +120,37 @@
;; QUINE-1 and QUINE-2, since they're outputing a string of character,
;; must be used as follow to effectively loop the quine:
(read-from-string (with-output-to-string (*standard-output*) (quine-2)))
#+clisp (defun try-quine-1 ()
(read-from-string (with-output-to-string (*standard-output*) (quine-1))))
(defun try-quine-2 ()
(read-from-string (with-output-to-string (*standard-output*) (quine-2))))
;; while the result of QUINE-2S and QUINE-3 can be evalued directly:
;; (eval (quine-3))
(eval (quine-3))
(defun try-quine-3 ()
(quine-3))
;; With packages, we have to either go into the package:
#-(and) (in-package "COM.INFORMATIMAGO.SMALL-CL-PGMS.QUINES")
;; or bind the *package* to it when printing the quines:
#-(and)
(with-standard-io-syntax
(let ((*package* (find-package "COM.INFORMATIMAGO.SMALL-CL-PGMS.QUINES")))
(pprint (COM.INFORMATIMAGO.SMALL-CL-PGMS.QUINES:try-quine-3))))
;; -------------------------------------------------------------------
;; LAMBDA QUINE:
((lambda (x) `(,x ',x)) '(lambda (x) `(,x ',x)))
(defun try-lambda-quine ()
((lambda (x) `(,x ',x)) '(lambda (x) `(,x ',x))))
;; cmucl: ((LAMBDA (X) `(,X ',X)) '(LAMBDA (X) `(,X ',X)))
;; clisp: ((LAMBDA (X) `(,X ',X)) '(LAMBDA (X) `(,X ',X)))
;; emacs: (#1=(lambda (x) (\` ((\, x) (quote (\, x))))) (quote #1#))
;; sbcl: ((LAMBDA (X) (SB-IMPL::BACKQ-LIST X (SB-IMPL::BACKQ-LIST (QUOTE QUOTE) X))) (QUOTE (LAMBDA (X) (SB-IMPL::BACKQ-LIST X (SB-IMPL::BACKQ-LIST (QUOTE QUOTE) X)))))
;;
;;;; quine.lisp -- 2004-03-14 00:46:53 -- pascal ;;;;
;;;; THE END ;;;;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment