Home

Awesome

cl-cookieproject

A cookiecutter template for Common Lisp projects featuring:

We are also shaping out a template for a web project, see cl-cookieweb.

NEW! 🎥 See our demo video: https://www.youtube.com/watch?v=XFc513MJjos

Usage

Create a new project. You'll be prompted to provide some basic information about your new project, which will then be auto-generated in the current working directory:

$ pip install cookiecutter
$ cookiecutter https://github.com/vindarel/cl-cookieproject
project_name [cookie-lisp-project]:
repo_name [cookie-lisp-project]:
description []: A test project
version [0.0.1]:
year [1984]:
author [CL User]: me
email [me@mail.com]:
username [me]:
Initialised empty Git repository in /home/vince/bacasable/lisp-projects/cookie-lisp-project/.git/

Run it straight away:

$ cd cookie-lisp-project
$ sudo apt install rlwrap  # a utility to bring readline keybindings and history to SBCL on the terminal.
$ make run
rlwrap sbcl --load run.lisp
This is SBCL 2.0.10, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.

SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses.  See the CREDITS and COPYING files in the
distribution for more information.
To load "cffi":
  Load 1 ASDF system:
    cffi
; Loading "cffi"
.
To load "cookie-lisp-project":
  Load 1 ASDF system:
    cookie-lisp-project
; Loading "cookie-lisp-project"
[package cookie-lisp-project]
Hello from cookie-lisp-project!
*

You can see the Hello from the main function, and we are given a Lisp REPL.

Build an executable:

$ make build
[…]
[saving current Lisp image into /home/vince/bacasable/lisp-projects/cookie-lisp-project/cookie-lisp-project:
writing 0 bytes from the read-only space at 0x50000000
writing 736 bytes from the static space at 0x50100000
writing 37060608 bytes from the dynamic space at 0x1000000000
writing 2154496 bytes from the immobile space at 0x50200000
writing 13910016 bytes from the immobile space at 0x52000000
done]

$ ./cookie-lisp-project me
Hello me from cookie-lisp-project!

$ ./cookie-lisp-project -h
Usage:

  cookie-lisp-project [name]

Build it with Roswell:

$ ros build roswell/cookie-lisp-project.ros

A binary is created in the roswell directory.

Your users can install the application with:

$ ros install github_username/project_name

Cookiecutter options

You can use command line options: https://cookiecutter.readthedocs.io/en/1.7.2/advanced/cli_options.html

The first time you run cookiecutter with a link to a GitHub repository, the skeleton is saved under ~/.cookiecutters/. You can run the command for the second time with only the skeleton name:

cookiecutter cl-cookieproject

TODOs

See also


Acknowledgement: we forked cookiecutter-cl.