Cloak VS cdecl

Compare Cloak vs cdecl and see what are their differences.

Cloak

A mini-preprocessor library to demostrate the recursive capabilites of the preprocessor (by pfultz2)

cdecl

Composing and deciphering C (or C++) declarations or casts, aka ‘‘gibberish.’’ (by paul-j-lucas)
InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
Cloak cdecl
4 13
889 73
- -
0.0 9.9
about 4 years ago 7 days ago
C C
- GNU General Public License v3.0 only
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.

Cloak

Posts with mentions or reviews of Cloak. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-06-21.
  • Object-oriented Programming with ANSI-C [pdf]
    5 projects | news.ycombinator.com | 21 Jun 2023
    Where cloak.h is https://github.com/pfultz2/Cloak/blob/master/cloak.h

    The above macros are admitttedly very hairy. If C had a better preprocessor, but was otherwise unchanged, they could look a lot nicer.

    > I never said such a thing. Would appreciate if you didn't put words in my mouth.

    A normal part of dialogue is, "I'm going to repeat your point back to you in my own words, and you can either agree with my restating of it, or point out at which point I've misunderstood you". That's what I was doing. "Would appreciate if you didn't put words in my mouth" is unnecessary hostility.

    > In my concrete example, given that FILE and DIR were classified as objects, to which of the so-called objects does F(const char*, FILE, DIR) belong?

    Take any language which you agree is "OO". Add one new feature (if it isn't already there): functions/methods which don't belong to any class/object. Now the function you are talking about is possible in that language. Did the language thereby suddenly cease to be OO when we added that feature? Most people would disagree with "Yes". But if "No", what is the actual difference between C and that language?

  • Plain C API design, the real world Kobayashi Maru test
    3 projects | news.ycombinator.com | 16 Apr 2023
    > I use this pattern so much I actually wrote a little metaprogramming language that is capable of generating a lot of the boilerplate for you. Link in my bio, if anyone's interested in looking at it.

    Your language [0] is an interesting idea. I've done a lot of similar stuff (not at work, I'm very rarely asked to write C code professionally, but I like mucking around with it in my personal time). My own approach to C metaprogramming involves obtuse preprocessor hacks (e.g [1]) and shell scripts that use grep/awk/sed to find macro invocations and spit out new header files as a result. Maybe your way is better.

    A word of warning though – do you realise your name for your language is an anti-gay slur in several dialects of English? You might end up unintentionally upsetting some people with it.

    [0] https://github.com/scallyw4g/poof

    [1] https://github.com/pfultz2/Cloak/wiki/C-Preprocessor-tricks,...

  • Pretty-Printable Enumerations in Pure C
    4 projects | /r/C_Programming | 23 May 2022
  • Datatype99: C99 with Sum Types, v0.1.0
    5 projects | news.ycombinator.com | 4 Feb 2021
    Well, mostly I use idioms from the Cloak Wiki (https://github.com/pfultz2/Cloak/wiki/C-Preprocessor-tricks,...). It takes some time to realise them :)

cdecl

Posts with mentions or reviews of cdecl. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-02-01.
  • Variadic Functions in C
    1 project | dev.to | 27 Apr 2024
    For example, in a program like cdecl, if you get:
  • Career Retrospective
    3 projects | dev.to | 1 Feb 2024
    In the mean time, I still enjoy hacking on various projects such as cdecl and writing my programming blog. Aside from computers, I enjoy gardening, cooking, and hope to do some travel.
  • Using assert() for Less Buggy Code
    1 project | dev.to | 28 Jan 2024
    In case you’re wondering, these code snippets are from cdecl.
  • Unions in C
    1 project | dev.to | 13 Jan 2024
    For a larger example, consider cdecl that is a program that can parse a C or C++ declaration (aka, “gibberish”) and explain it in English:
  • An Updated Cdecl — with Macro Expansion
    1 project | dev.to | 5 Jan 2024
    It’s been a while since I first started updating cdecl. From my previous article:
  • C/C++ Preprocessor Macros
    1 project | dev.to | 31 Dec 2023
    I decided to solve problem 6 myself by adding a feature to cdecl that allows you to #define macros as usual and then expand them where cdecl will print the expansion step-by-step as well as warn about things you might not expect. However, that’s a story for another time.
  • Musings on C & C++ Declarations
    1 project | dev.to | 27 Apr 2023
    Additionally, you can use cdecl both to decipher and compose declarations.
  • C++ New Style Casts in C (sort of)
    1 project | dev.to | 15 Oct 2022
    Suppose there’s an API you’re using that allows “user data” to be given. In C, this is usually done by passing your data to a void* parameter, for example when visiting the nodes of a red-black tree. Assume we have a tree where the data we store at each node is:
  • Bit Testing Functions in C
    1 project | dev.to | 25 Sep 2022
    There are many sites giving lots of bit twiddling expressions or functions in C, but none that I've found that give a concise set of bit testing functions, so here is a set I've written. (These are used as part of cdecl.)
  • The Curious Case of the Disappearing “if”
    1 project | dev.to | 20 Jun 2022
    I recently discovered a test-case that crashed cdecl:

What are some alternatives?

When comparing Cloak and cdecl you can also consider the following projects:

xcc - Toy C compiler for x86-64/aarch64/riscv64/wasm

data_desk - New version "Metadesk" at https://github.com/Dion-Systems/metadesk

datatype99 - Algebraic data types for C99

subhook - Simple hooking library for C/C++ (x86 only, 32/64-bit, no dependencies)

libGimbal - C17-based extended standard library, cross-language type system, and unit testing framework targeting Sega Dreamcast, Sony PSP and PSVita, Windows, Mac, Linux, Android, iOS, and WebAssembly.

kcgi - minimal CGI and FastCGI library for C/C++

website-meta-language - An old offline HTML preprocessor (which can be used for static site generation), written in Perl and C that is still maintained for legacy reasons, but probably not recommended for new sites.

computecpp-sdk - Collection of samples and utilities for using ComputeCpp, Codeplay's SYCL implementation

interface99 - Full-featured interfaces for C99

bdwgc - The Boehm-Demers-Weiser conservative C/C++ Garbage Collector (bdwgc, also known as bdw-gc, boehm-gc, libgc)

COS - C Object System: a framework that brings C to the level of other high level programming languages and beyond

metadesk