CSP
Compile-time LISP interpreter on C macro preprocessor (by kchanqvq)
order-pp
order-pp preprocessor library (standalone part of chaos-pp) (by rofl0r)
CSP | order-pp | |
---|---|---|
5 | 5 | |
135 | 102 | |
- | - | |
0.0 | 0.0 | |
about 6 years ago | over 2 years ago | |
C++ | C | |
- | Boost Software License 1.0 |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
CSP
Posts with mentions or reviews of CSP.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2022-04-25.
- Announcing the Hare programming language
-
What is Rust’s Hole Purpose?
So there's precedent to what you say. You are right, the program would not have the runtime, but then it wouldn't be a Swift program (it would be a valid one, but you can't break certain extra rules) but something else. The reason we call it "language runtime" is because the runtime cost is due to the language choice. Refusing to code in the language and doing something else is a different language. We could write LISP code that the c compiler can interpret and compile fully but most people would call that LISP, not C.
-
C Programmers are chad
#define LISP
-
Weird but legible C programs
One example might be a Lisp interpreter using C macros: https://github.com/BlueFlo0d/CSP/blob/master/csp.h
-
Sufficiently smart compiler
You mean this lisp embedded in c preprocessor?
order-pp
Posts with mentions or reviews of order-pp.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2022-04-25.
- Announcing the Hare programming language
-
No Us Without You: elifdef and elifndef
Looping is already totally doable, up to a finite maximum number of iterations. Local variables and the like can be simulated through suitably clever preprocessor definitions and logic, too. The syntax and trickery you need to take advantage of it is thoroughly, thoroughly unpleasant though.
For anyone curious about the practicality of that sort of thing, A CPS macro continuation machine like https://github.com/rofl0r/order-pp/blob/master/inc/order/cm.... would give you about 18 quintillion loop iterations if my math was right; double the length of that file and you’d have more loop iterations than atoms in the universe.
-
Have constexpr string mixins been proposed?
Macros can already accomplish this and more quite handily, using order-pp for example:
-
datatype99: C99 with sum types, v0.1.0
Here is an example of the power of order: https://github.com/rofl0r/order-pp/blob/master/example/fibonacci.c
What are some alternatives?
When comparing CSP and order-pp you can also consider the following projects:
C-headers
awesome-c-preprocessor - A list of awesome C preprocessor stuff
http_server - Pony library for building HTTP server applications.
eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee - eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
datatype99 - Algebraic data types for C99
zig_comptime_lisp