GithubHelp home page GithubHelp logo

destructivec's Introduction

This repository is a mirror of the original private project.

The DestructiveC (~~C) language

Custom made language with LLVM 13 which destructs any variable (removes from memory) after a single use in code if prepended with ~. Based on C++.

Limitations

The following are unimplemented:

  • One-liner else if
  • do... while

Only one "destructive" (DC) variable must remain in memory, multiple DC variables at the same time are not supported.

Compilation instructions

Linux

TO-DO: linker errors out with the .rodata ELF section (-fPIE / -no-pie does not make a difference).


Windows (MinGW)

Download precompiled binaries for LLVM and Clang 13.0.1-3 from the following link: https://repo.msys2.org/mingw/mingw64/

pacman -S cmake make git
git clone https://github.com/GDhex12/DestructiveC.git
pacman -U mingw-w64-x86_64-clang-13.0.1-3-any.pkg.tar.zst
pacman -U mingw-w64-x86_64-llvm-13.0.1-3-any.pkg.tar.zst
cd DestructiveC && mkdir build && cd build
cmake -DCMAKE_C_COMPILER=/mingw64/bin/clang.exe -DCMAKE_CXX_COMPILER=/mingw64/bin/clang++.exe ..

Copy over the stdlib.h and math.h headers from /mingw64/include to /mingw64/x86_64-w64-mingw32/include to bypass a CMake bug.

make -j<THREAD_COUNT>
DC "path/to/langfile.dc"
clang++ bin/start.cpp "path/to/langfile.o" -o path/to/outexec

destructivec's People

Contributors

gdhex12 avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.