Cnx
bfcpp
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.
Cnx
- Convinient solutions for working with strings
-
Conditional preprocessor macro, anyone?
The biggest obstacles to make some form of functional programming (think more like Rust than Haskell) possible are __VA_OPT__, auto, lambdas, and defer. IIRC the first two are coming in C23. The last two might make it into the next standard after that, but unlikely to make 23. If you're willing to limit yourself to GNU C (so compiling with GCC or Clang, or maybe ICC) you can get pretty close already today. (shameless self plug) My project Cnx (https://github.com/braxtons12/Cnx) attempts to bring a more modern approach to the language, and a big chunk of the features it implements are functional in nature.
bfcpp
-
Better C Generics: The Extendible _Generic
The preprocessor is actually quite fast, as long as you are just doing primitive replacement things. I benchmarked my preprocessor brainfuck interpreter (without optimizations) against a constexpr brainfuck interpreter (without optimizations), and it beat constexpr for interpreting smaller programs. isort4 for example is a brainfuck program that does insertion sort on 45 inputs, and the preprocessor implementation was more than twice as fast as the constexpr one. Larger programs are slower to interpret with the preprocessor, because it always needs to copy the entire program code.
-
Conditional preprocessor macro, anyone?
PS: I wrote a bit of an explanation for my preprocessor brainfuck interpreter, maybe you can learn a few tricks from that: https://github.com/camel-cdr/bfcpp/blob/main/TUTORIAL.md
-
What’s the most “abusive” code you’ve ever written?
Since you mentioned macros: I wrote a brainfuck interpreter using only the preprocessor, so it interprets brainfuck at compile time. The entire thing is a huge abuse of macros: https://github.com/camel-cdr/bfcpp
- I wrote an optimizing brainfuck interpreter using only the C Preprocessor, here is how
- Who needs C++? C preprocessor meta programming is the future.
- Show HN: Optimizing brainfuck interpreter using only the C preprocessor
- Let's write an optimizing Brainfuck interpreter using only the C Preprocessor
What are some alternatives?
ManagedC - Reference counter for C
bfcc - BrainFuck Compiler Challenge
CC - A small, usability-oriented generic container library.
space-nerds-in-space - Multi-player spaceship bridge simulator. Captain your starship through adventures with your friends. See https://smcameron.github.io/space-nerds-in-space
nim-brainfuck - A brainfuck interpreter and compiler written in Nim
gpp - GPP, a generic preprocessor
i-use-arch-btw - "I use Arch btw" but it's a Turing-complete programming language.
metalang99 - Full-blown preprocessor metaprogramming
brainfuck
ctl - My variant of the C Template Library
STC - A modern, user friendly, generic, type-safe and fast C99 container library: String, Vector, Sorted and Unordered Map and Set, Deque, Forward List, Smart Pointers, Bitset and Random numbers.
Cello - Higher level programming in C