nytpu.lisp-utils

2024-10-12

A collection of miscellaneous standalone utility packages.

Upstream URL

git.sr.ht/~nytpu/nytpu.lisp-utils

Author

License

MPL-2.0
README

Lisp-Utils

license: MPL-2.0

A collection of miscellaneous standalone utility packages for Common Lisp that I've written.

An ASDF system definition exists in nytpu.lisp-utils.asd, but it is mostly for convenience and every file listed in Documentation is standalone and can be loaded or copied individually. There are also zero external dependencies, each file is entirely standalone.

It is available in Quicklisp under the system name nytpu.lisp-utils. Or, you can manually copy the files of interest into your project.

Documentation

  • nytpu.lisp-utils.bind — A special BIND macro that looks like LET but supports destructuring, multiple value capture, sequential binding (LET*-like), and using WITH-style functions like WITH-OPEN-FILE. Heavily inspired by Scott L. Burson's "New Let" and Ron Garret's BINDING-BLOCK, (readers will note that it's basically just features from the above macros but in a syntax I personally prefer, and also not shadowing stuff from COMMON-LISP).
  • nytpu.lisp-utils.shorthand-lambdas — Allows enabling a new reader syntax, when prefixing a form with ^ will implicitly wrap it in a LAMBDA, i.e. ^(...)(lambda () ...). Inside that form, the symbol $ will insert a new argument. A symbol of format $number will (re)use that index argument from the argument list (arguments are one-indexed).
  • nytpu.lisp-utils — Miscellaneous trivial helper functions; such as a clone of Scheme's #; to comment an entire s-expression, mutating version of MAPCAR (NMAPCAR), and such. Also provides a helper function to enable all reader syntax extensions provided by the NYTPU.LISP-UTILS system. Has an optional dependency on SHORTHAND-LAMBDAS, if it is loaded then ENABLE-SYNTAXES will enable the shorthand lambda reader syntax.

Contributing

Any contributions are welcome!

The upstream URL of this project is https://git.sr.ht/~nytpu/nytpu.lisp-utils. Send suggestions, bugs, patches, and other contributions to ~nytpu/[email protected] or <alex [at] nytpu.com>. For help sending a patch through email, see https://git-send-email.io.

If you aren't comfortable sending a patch through email, get in touch with a link to your version of the repo and I'll pull the changes down myself!

Copyright

Copyright (C) 2022-2024 nytpu <alex [at] nytpu.com>.

Licensed under the terms of the Mozilla Public License version 2.0. You can view a copy of the MPL in LICENSE or at https://www.mozilla.org/en-US/MPL/2.0/.

Dependencies (0)

    Dependents (0)

      • GitHub
      • Quicklisp