Skip to content

Instantly share code, notes, and snippets.

@vector-of-bool
vector-of-bool / unmangle.py
Created April 5, 2023 19:38
Decodes compilers' escaping/encoding of UTF-8 strings in compiler output.
import subprocess
import sys
from typing import Iterable, Sequence
import re
#* Toggle this to render 'nul' characters in strings
RENDER_NUL = False
#* Toggle this to disable unmangling of output
DO_UNMANGLE = True
@vector-of-bool
vector-of-bool / cosm.hpp
Last active March 8, 2023 21:00
Composed Operation State Machines. Shiny.
#ifndef COSM_COSM_HPP_INCLUDED
#define COSM_COSM_HPP_INCLUDED
#include <type_traits>
#include <boost/asio.hpp>
/**
* Composed-operation state machines
*/
@vector-of-bool
vector-of-bool / dynamix-macro.cpp
Last active August 11, 2017 06:11
Dynamix arbitrary-arity macro
// Base template
// Der: CRTP derived class
// ThisType: Type of dynamix object. This carries CV-qualifier information about the message.
// Sig: Signature for the message
template <typename Der, typename ThisType, typename Sig> struct message_helper;
// Impl template. Here we take a signature type as our third argument as a specialization
template <typename Derived, typename ThisType, typename Ret, typename... Args>
struct message_helper<Derived, ThisType, Ret(Args...)> : public ::dynamix::internal::message_t {
import os
import ycm_core
default_flags = [
'-Wall',
'-Wextra',
'-std=c++14',
'-x',
'-c++',
]