MCPcopy Create free account
hub / github.com/SheafificationOfG/based-cpp

github.com/SheafificationOfG/based-cpp @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
196 symbols 297 edges 11 files 0 documented · 0% updated 53d ago★ 3237 open issues

Browse by type

Functions 60 Types & classes 136
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Based C++

This repo provides an implementation of the GNU Interface Layer (GIL) and standard library for g++.

C++ is the best interpreted language

C++ is the best interpreted language!

Usage

Here is a simple "Hello, world!" in C++.

#include "gil/std.hpp"
using namespace gil::std;

volatile auto run = main<{
  str::puts(str::literal("Hello, world!\n"))
}>;

To run the program, run

g++ -std=c++23 -Based hello_world.cpp -o -

Note that the program won't execute until all stdin is read, which means you need to pass it an EOF (e.g., ^D from stdin).

[!NOTE] Use -O2 or -O3 if you want things to run faster. (I didn't do this in my video... oops).

System

I've only tested this thing on my machines (Ubuntu 22.04 / 24.04) using g++ 14.2.0. If it doesn't work on your machine, maybe that's actually a good thing.

See also #8.

Examples

  • hello_world.cpp

    Be greeted in all of the languages supported by YVR!

  • hello_world_vmi.cpp

    Same as above, but without using the standard library.

  • calculator.cpp

    Perform a single binary operation on a pair of 64-bit signed integers.

  • mergesort.cpp

    Merge sort a comma-separated list of 64-bit signed integers.

Core symbols most depended-on inside this repo

Shape

Class 134
Function 38
Method 22
Enum 2

Languages

C++100%

Modules by API surface

gil/gil.impl.hpp78 symbols
gil/std.impl.hpp74 symbols
gil/std.base.hpp24 symbols
gil/std.str.hpp6 symbols
hello_world_vmi.cpp5 symbols
gil/std.io.hpp5 symbols
mergesort.cpp2 symbols
hello_world.cpp2 symbols

For agents

$ claude mcp add based-cpp \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page