commit 7a05a1c2f040033a8497cc09b31ce7982b102e7a Spenser Truex <struex0@gmail.com> 2016-02-14 15:23:27 -0800 Added ASDF packaging
README.md | 21 +++++++-------------- lispfuck.asd | 19 +++++++++++++++++++ packages.lisp | 1 + 3 files changed, 27 insertions(+), 14 deletions(-)
diff --git a/README.md b/README.md index 2175fc5..e0e9c1f 100644 --- a/README.md +++ b/README.md @@ -22,23 +22,17 @@ These can be combined into a string such as the following "Hello World!#\Newline " ``` #How to use: -Run SBCL or another Common Lisp implementation and load the packages file: +Store this project's code in the common-lisp directory under your home directory. Then it may be loaded like this: ``` -> (load "[filepath]") +> (asdf:load-system "lispfuck") ``` -For example: -``` -> (load "/home/myusername/brainfuck/packages.lisp") -``` -Load up the "interpreter.lisp" file, which contains all of the code -``` -> (load "/home/your_username/your_file_path/interpreter.lisp) -``` -**Use** the cl-brainfuck package to get access to the public API +The external functions need to be **used**, so execute this command. ``` > (use-package :cl-brainfuck) ``` -Run a string of brainfuck code with: +Your brainfuck interpreter is now loaded! + +You can run a string of brainfuck code with: ``` > (interpret "[code]") ``` @@ -58,7 +52,6 @@ Finally, there is a slightly more profane alias for the `interpret` function: "FUCK" ``` #TODO: - - ASDF would be a better packaging system choice than the current arrangement. - +- Test on other implementations and operating systems. This software is licensed under the MIT free software license. =============== diff --git a/lispfuck.asd b/lispfuck.asd new file mode 100644 index 0000000..5b14d9d --- /dev/null +++ b/lispfuck.asd @@ -0,0 +1,19 @@ +;;; The MIT License (MIT) +;;;; Copyright (c) 2016 Spenser Truex +;;;; Permission is hereby granted, free of charge, to any person obtaining a copy of this brainfuck software and associated documentation files (the "Brainfuck Software"), to deal in the Brainfuck Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Brainfuck Software, and to permit persons to whom the Brainfuck Software is furnished to do so, subject to the following conditions: + +;;;; The above copyright notice and this permission notice shall be included in all copies or substantial portions of this Brainfuck Software. + +;;;; THE BRAINFUCK SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THIS BRAINFUCK SOFTWARE OR THE USE OR OTHER DEALINGS IN THIS BRAINFUCK SOFTWARE. +(defpackage :cl-brainfuck-system (:use :asdf :cl)) +(in-package :cl-brainfuck-system) + +(defsystem lispfuck + :name "lispfuck" + :author "Spenser Max Truex" + :version "1.0" + :maintainer "Spenser Truex <spensertruexonline@gmail.com>" + :license "MIT License (c) 2016" + :description "Brainfuck interpreter from witin lisp" + :components ((:file "packages") + (:file "interpreter" :depends-on ("packages")))) diff --git a/packages.lisp b/packages.lisp index a35dc24..6dbc64d 100644 --- a/packages.lisp +++ b/packages.lisp @@ -5,6 +5,7 @@ ;;;; The above copyright notice and this permission notice shall be included in all copies or substantial portions of this Brainfuck Software. ;;;; THE BRAINFUCK SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THIS BRAINFUCK SOFTWARE OR THE USE OR OTHER DEALINGS IN THIS BRAINFUCK SOFTWARE. +(in-package :cl-user) (defpackage :cl-brainfuck (:use :cl) (:export :interpret