nytpu.lisp-utils

2023-10-21

A collection of miscellaneous standalone utility packages.

Upstream URL

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

Author

nytpu <alex@nytpu.com>

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 (other than the convenience nytpu.lisp-utils.lisp) 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

  • 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).
  • dbc — Basic Design by Contract inspired by Ada's DbC design.
  • 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).
  • comment-sexps — Allows enabling a new reader syntax, prefixing any form (parenthesized expression or atom) with #; will comment it out and cause it to be ignored, equivalently to the same comment syntax in Scheme.
  • nytpu.lisp-utils — Provides a helper function to enable all reader syntax extensions provided by the NYTPU.LISP-UTILS system. The only package that depends on other packages, it depends on SHORTHAND-LAMBDAS and COMMENT-SEXPS.

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/public-inbox@lists.sr.ht 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-2023 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