~shakna/cnoevil3

A language extension for C
Added Managed module
Implemented morse for EVIL_ENCODE
Added hash calculate example to source

refs

master
browse  log 

clone

read-only
https://git.sr.ht/~shakna/cnoevil3
read/write
git@git.sr.ht:~shakna/cnoevil3

You can also use your local clone with git send-email.

CNoEvil 3

A library to completely destroy the C language, and pretend it is something that it is not.


This is a pet project of mine, abusing the hell out of the C pre-processor, and other C language features, to create a language that is still technically C, but looks and behaves differently, whilst remaining fully compatible with C.

It takes a whole lot of bad ideas and mashes them into an abhorrent monstrosity.

#include "evil.h"

Main then
  displayln("Hello, World!");
end

Versioning

The version number currently means nothing, as the library is in a state of flux.

Check the defines:

  • CNOEVIL
  • EVIL_HASH_VER

Versioning will re-adopt Symantic Versioning once we've restored the library to cover everything the previous library could do. (Waiting on EVIL_HELP to be fully restored).

EVIL_HASH_VER is the equivalent of:

sh -c 'cat include/head.h $(find include -name "*.h" -not -name head.h -not -name tail.h -print0 | sort -z | xargs -r0 echo) include/tail.h | sha512sum | tr -d " -" | tail -c 15'

And embedded into every build of evil.h.


Status

Latest build:

Currently in a heavy state of flux, with numerous parts not yet implemented.

Issue Tracker. (You don't need a user.)


Documentation

The documentation is still under heavy development.

You can look at manual.md to see a version.

A PDF version which is a bit more usable (includes examples, etc.) can be found here.

Note: Neither the PDF nor the manual.md file is guaranteed to be up to date.

Or you can:

  • Run make doc to create an up-to-date manual.md.

  • Run make pdf to convert a manual.md into a prettier and more helpful pdf file. (Requires pandoc).

Note: As the manual is just an artefact created by CNoEvil, it falls under the same license, instead of a documentation-specific license. If you wanted to print/sell/distribute it, you are within your rights. So long as you follow the terms spelled out in the license.


Building

A prebuilt version of the single-header library can be found in the evil.h file.

However, if you wish to build:

  • Run make

Privacy Considerations

A build includes some information for diagnostic purposes:

  • The time of the build
  • The result of uname -rmo, which looks something like: 5.4.10-arch1-1 x86_64 GNU/Linux
  • A hash of the files being used to build

This is hopefully not enough to fingerprint you, but that choice is yours.

These are comments so don't end up in whatever you're compiling with CNoEvil. It's just in the header, so if something goes wrong I have somewhere to start from.

To strip out all this information (except the files hash which is necessary and not unique to the build), run:

cat evil.h | sed 's/\/\/ Size:.*$/ /g' | sed 's/\/\/ Built:.*$/ /g' | sed 's/\/\/ Machine:.*$/ /g' > evil_private.h

Which will make a new header called evil_private.h without the included information.


License

Don't... Don't use this. Please.

But if you must, see the LICENSE.md file.

Note: It is not the 3-Clause BSD license it might appear at first glance.