A Lisp-like macro language that compiles to C and C++ code, designed for expressive metaprogramming and high-performance systems.
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.
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.
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.
"Lispsy" Lisp(ish) to C Converter (designed for CLISP)
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
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.
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.
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.
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.
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.
Currently only runs on CLISP, with future plans for SBCL but no immediate support for other Lisp implementations, restricting its usability in diverse environments.
Generated C code lacks proper indentation and readability; the README acknowledges this and promises improvements in version 2, but current output requires manual cleanup.
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.