diff options
Diffstat (limited to 'users/wpcarro/lisp')
-rw-r--r-- | users/wpcarro/lisp/README.md | 16 | ||||
-rw-r--r-- | users/wpcarro/lisp/prelude.lisp | 14 | ||||
-rw-r--r-- | users/wpcarro/lisp/prelude.nix | 8 |
3 files changed, 38 insertions, 0 deletions
diff --git a/users/wpcarro/lisp/README.md b/users/wpcarro/lisp/README.md new file mode 100644 index 000000000000..9f8693fa6a10 --- /dev/null +++ b/users/wpcarro/lisp/README.md @@ -0,0 +1,16 @@ +# Common Lisp + +Things that I like about Common Lisp: +- It's an S-expression based language. +- It has a powerful macro system +- It has a unique way of handling-errors +- It is highly introspectible +- The tooling integration with Emacs is the best I have ever seen for any language + +Things that I don't like about Common Lisp: +- I find its standard libraries difficult to use and -- compared to modern + libraries -- like Golang's or Elixir's standard libraries, Common Lisp's + libraries are clunky + +As such, I would like to modernize CL's libraries to resemble other libraries +with which I am more familiar and, therefore, productive. diff --git a/users/wpcarro/lisp/prelude.lisp b/users/wpcarro/lisp/prelude.lisp new file mode 100644 index 000000000000..3522567ea0f7 --- /dev/null +++ b/users/wpcarro/lisp/prelude.lisp @@ -0,0 +1,14 @@ +(in-package #:cl-user) +(defpackage #:prelude + (:documentation "Supporting miscellaneous utility functions and macros.") + (:use #:cl) + (:shadow #:type) + (:export #:type #:comment)) +(in-package #:prelude) + +;; TODO: Add documentation to these macros. + +(defmacro type (name in out) + `(declaim (ftype (function ,in ,out) ,name))) + +(defmacro comment (&rest _forms) nil) diff --git a/users/wpcarro/lisp/prelude.nix b/users/wpcarro/lisp/prelude.nix new file mode 100644 index 000000000000..5fe5d628e099 --- /dev/null +++ b/users/wpcarro/lisp/prelude.nix @@ -0,0 +1,8 @@ +{ depot, ... }: + +depot.nix.buildLisp.library { + name = "prelude"; + srcs = [ + ./prelude.lisp + ]; +} |