Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Common Lisp
  3. lispc

lispc

MITCommon Lisp

A Lisp-like macro language that compiles to C and C++ code, designed for expressive metaprogramming and high-performance systems.

GitHubGitHub
549 stars37 forks0 contributors

What is lispc?

LISP/c is a Lisp-to-C converter that allows developers to write C and C++ code using a Lisp-like syntax. It solves the problem of repetitive boilerplate in low-level systems programming by providing powerful metaprogramming capabilities, enabling code generation for multiple types, CUDA kernels, MPI routines, and more through macros and templates.

Target Audience

Systems programmers and embedded developers who are proficient in both C and Lisp and seek to reduce code duplication, improve abstraction, and leverage Lisp-style macros for generating complex C/C++ codebases.

Value Proposition

Developers choose LISP/c because it uniquely combines the expressiveness of Lisp macros with the performance and portability of C, offering a seamless way to generate optimized, repetitive code patterns without sacrificing low-level control or introducing runtime overhead.

Overview

"Lispsy" Lisp(ish) to C Converter (designed for CLISP)

Use Cases

Best For

  • Generating type-safe template functions for multiple data types in C
  • Writing CUDA kernels with reduced syntactic boilerplate
  • Implementing MPI-based distributed computing applications
  • Creating pthreads-based multithreading code with macro-driven loops
  • Building C++ classes and operator overloads using Lisp-style definitions
  • Automating repetitive C code patterns through metaprogramming

Not Ideal For

  • Projects requiring production-ready, stable code generation with comprehensive error handling and documentation
  • Teams without dual expertise in both Lisp and C programming languages
  • Environments where generated C code must be perfectly formatted and readable without manual cleanup
  • Developers needing immediate support for Lisp implementations other than CLISP

Pros & Cons

Pros

Advanced Metaprogramming

With `template`, `lispmacro`, and `lisp/c-macro`, it enables dynamic code generation for repetitive patterns, such as creating type-specific functions or CUDA kernels in a single definition, as shown in the template examples.

Library Integration

Built-in synonyms for CUDA, MPI, and pthreads simplify calls to external libraries, reducing boilerplate in systems programming, as demonstrated in the CUDA and MPI examples.

Concise Syntax

Prefix arithmetic and shorthand operators like `@` for function calls make code more expressive and less verbose than standard C, allowing sums like `(+ 2 3 4 (* 5 6) 7 8)` instead of nested infix expressions.

C++ Support

Supports C++ features including classes, templates, and stream operators via functions like `class` and `<<+`, enabling complex C++ code generation from Lisp syntax, as seen in the C++ vector example.

Cons

Unstable Development

The README has multiple TODO notes, admits issues like needing to load code more than once, and version 2 is pending, indicating it's not yet stable or complete for reliable use.

Limited Runtime Compatibility

Currently only runs on CLISP, with future plans for SBCL but no immediate support for other Lisp implementations, restricting its usability in diverse environments.

Poor Output Formatting

Generated C code lacks proper indentation and readability; the README acknowledges this and promises improvements in version 2, but current output requires manual cleanup.

Niche Knowledge Barrier

Users must be proficient in both Lisp and C, with the README explicitly stating this requirement, creating a high barrier to entry and limiting its audience.

Frequently Asked Questions

Quick Stats

Stars549
Forks37
Contributors0
Open Issues1
Last commit5 years ago
CreatedSince 2016

Tags

#systems-programming#cuda#metaprogramming#mpi#lisp#macros#pthreads#compiler-tool#c-language#code-generation

Built With

C
CLISP

Included in

Common Lisp2.9k
Auto-fetched 21 hours ago

Related Projects

C-meraC-mera

Next-level syntax for C-like languages :)

Stars451
Forks23
Last commit7 months ago
composable query buildercomposable query builder

An SQL generator for Common Lisp.

Stars424
Forks37
Last commit10 months ago
sxqlsxql

An SQL generator for Common Lisp.

Stars424
Forks37
Last commit10 months ago
vacietisvacietis

C to Common Lisp compiler

Stars320
Forks25
Last commit4 years ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub