From 90ef834393c819e708800c1a759c183ccdd25842 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Tue, 11 Feb 2025 00:48:14 +0000 Subject: odraw -> cantedraw Why name it something unique when this is what I'm going to be making at the end of it all? Just makes it more confusing for the end user. --- bob.lisp | 6 +++--- cantedraw.asd | 9 +++++++++ cantedraw.lisp | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ odraw.asd | 9 --------- odraw.lisp | 49 ------------------------------------------------- packages.lisp | 2 +- 6 files changed, 62 insertions(+), 62 deletions(-) create mode 100644 cantedraw.asd create mode 100644 cantedraw.lisp delete mode 100644 odraw.asd delete mode 100644 odraw.lisp diff --git a/bob.lisp b/bob.lisp index 12146f6..62ab05f 100644 --- a/bob.lisp +++ b/bob.lisp @@ -26,11 +26,11 @@ (in-package :bob) (ql:quickload :deploy) -(asdf:load-asd (merge-pathnames "odraw.asd" (uiop:getcwd))) +(asdf:load-asd (merge-pathnames "cantedraw.asd" (uiop:getcwd))) (defun build () (push :deploy-console *features*) - (asdf:make :odraw)) + (asdf:make :cantedraw)) (defun load-all () - (asdf:load-system :odraw)) + (asdf:load-system :cantedraw)) diff --git a/cantedraw.asd b/cantedraw.asd new file mode 100644 index 0000000..d3aa60d --- /dev/null +++ b/cantedraw.asd @@ -0,0 +1,9 @@ +(asdf:defsystem :cantedraw + :depends-on (:deploy) + :components ((:file "packages") + (:file "lib.macros") + (:file "lib.functions") + (:file "cantedraw")) + :build-operation "deploy-op" + :build-pathname "cantedraw" + :entry-point "cantedraw:start") diff --git a/cantedraw.lisp b/cantedraw.lisp new file mode 100644 index 0000000..4380d8a --- /dev/null +++ b/cantedraw.lisp @@ -0,0 +1,49 @@ +;;; cantedraw.lisp - 2025-02-11 + +;; Copyright (C) 2025 Aryadev Chavali + +;; 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 General Public License Version 2 for +;; details. + +;; You may distribute and modify this code under the terms of the GNU General +;; Public License Version 2, which you should have received a copy of along with +;; this program. If not, please go to . + +;;; Commentary: + +;; Implementation of `cantedraw' package. Defines the entrypoint of the program, +;; handling any input from the user and passing it into the system. + +;;; Code: + +(in-package :cantedraw) + +(fn read-input (&optional (prompt "> ")) (-> (&optional string) string) + (format t "~a" prompt) + (force-output) + (read-line)) + +(fn parse-integers (input) (-> (string) list) + (->> input + uiop:split-string + (mapcar #'parse-integer*) + (remove-if #'null))) + +(fn read-integers () (-> nil list) + (->> (read-input "Enter numbers: ") + parse-integers)) + +(fn read-until-integers () (-> nil list) + (let ((inp (read-integers))) + (while (null inp) + (format t "Need at least one integer...~%") + (force-output) + (setq inp (read-integers))) + inp)) + +(defun start () + (--> (read-until-integers) + (cons '+ _) + (format t "~a = ~a~%" _ (eval _)))) diff --git a/odraw.asd b/odraw.asd deleted file mode 100644 index fee4d6e..0000000 --- a/odraw.asd +++ /dev/null @@ -1,9 +0,0 @@ -(asdf:defsystem :odraw - :depends-on (:deploy) - :components ((:file "packages") - (:file "lib.macros") - (:file "lib.functions") - (:file "odraw")) - :build-operation "deploy-op" - :build-pathname "odraw" - :entry-point "odraw:start") diff --git a/odraw.lisp b/odraw.lisp deleted file mode 100644 index d4d94ee..0000000 --- a/odraw.lisp +++ /dev/null @@ -1,49 +0,0 @@ -;;; odraw.lisp - 2025-02-11 - -;; Copyright (C) 2025 Aryadev Chavali - -;; 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 General Public License Version 2 for -;; details. - -;; You may distribute and modify this code under the terms of the GNU General -;; Public License Version 2, which you should have received a copy of along with -;; this program. If not, please go to . - -;;; Commentary: - -;; Implementation of `odraw' package. Defines the entrypoint of the program, -;; handling any input from the user and passing it into the system. - -;;; Code: - -(in-package :odraw) - -(fn read-input (&optional (prompt "> ")) (-> (&optional string) string) - (format t "~a" prompt) - (force-output) - (read-line)) - -(fn parse-integers (input) (-> (string) list) - (->> input - uiop:split-string - (mapcar #'parse-integer*) - (remove-if #'null))) - -(fn read-integers () (-> nil list) - (->> (read-input "Enter numbers: ") - parse-integers)) - -(fn read-until-integers () (-> nil list) - (let ((inp (read-integers))) - (while (null inp) - (format t "Need at least one integer...~%") - (force-output) - (setq inp (read-integers))) - inp)) - -(defun start () - (--> (read-until-integers) - (cons '+ _) - (format t "~a = ~a~%" _ (eval _)))) diff --git a/packages.lisp b/packages.lisp index 703f890..7c77f50 100644 --- a/packages.lisp +++ b/packages.lisp @@ -32,6 +32,6 @@ :range :take :split :rev-map)) -(defpackage odraw +(defpackage cantedraw (:use :cl :lib.macros :lib.functions) (:export :start)) -- cgit v1.2.3-13-gbd6f