boring-makefile
EvilUnit
boring-makefile | EvilUnit | |
---|---|---|
2 | 1 | |
0 | 1 | |
- | - | |
10.0 | 4.2 | |
about 8 years ago | 14 days ago | |
Makefile | C | |
MIT License | GNU Lesser General Public License v3.0 only |
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.
boring-makefile
-
How to Structure C Projects: These Best Practices Worked for Me
The tests look much like https://github.com/JonChesterfield/EvilUnit/blob/master/evil.... That's from the self tests for the test framework. It's closely modelled on catch2. Name is because I built the thing out of preprocessor macros to run on freestanding c89.
The projects using code generation in that fashion are proprietary. There's a makefile at https://github.com/JonChesterfield/boring-makefile/blob/mast... set up to do the src/gen/obj codegen by default structure.
-
John Carmack on Functional Programming in C++ (2018)
I've been coding like that since at least 2016[1]. The trick is to make adding code generators as easy as adding source code. Not a game engine in my case, though there's a CppCon talk from 2014 which makes a passing reference to using code generators with C++ instead of templates for one.
Assume source is src/.c and compiled to obj/.o, then introduce a third directory called gen. Change the makefile rule to copy .c from src to gen, and compile from gen to obj. Then add a makefile rule that says gen/foo.c can be built from src/foo.c.py by calling python on the source and redirecting stout.
That means a C source file can be turned into a python program that generates the same source by wrapping it in a string literal, calling print and renaming the source file. No build system change. Then change the python as you see fit to work around the limitations of C.
Works really well for a solo developer. Repo using this scheme is ~100 generated files (mostly lua, some python) vs ~600 C files. Plus ~20 C++ and one D, just getting started with that language.
[1] https://github.com/JonChesterfield/boring-makefile/blob/mast...
EvilUnit
-
How to Structure C Projects: These Best Practices Worked for Me
The tests look much like https://github.com/JonChesterfield/EvilUnit/blob/master/evil.... That's from the self tests for the test framework. It's closely modelled on catch2. Name is because I built the thing out of preprocessor macros to run on freestanding c89.
The projects using code generation in that fashion are proprietary. There's a makefile at https://github.com/JonChesterfield/boring-makefile/blob/mast... set up to do the src/gen/obj codegen by default structure.
What are some alternatives?
fp-ts - Functional programming in TypeScript
Dynamics.NET - Extensions for runtime reflection and structural induction
john-carmack-plan-archive - Collection of John Carmack’s .plan files
Lombok - Very spicy additions to the Java programming language.
language-ext - C# functional language extensions - a base class library for functional programming
HigherLogics.Algebra - Numerical and algebraic abstractions for .NET