This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Random name generator ported from | |
// https://github.com/moby/moby/blob/39f7b2b6d0156811d9683c6cb0743118ae516a11/pkg/namesgenerator/names-generator.go#L852-L863 | |
#include <array> | |
#include <random> | |
#include <string> | |
#include <string_view> | |
static constexpr size_t kLeftNameCount = 108; | |
static constexpr size_t kRightNameCount = 237; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <limits.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <unistd.h> | |
size_t get_line_size() { | |
// https://man7.org/linux/man-pages/man3/fgets.3p.html | |
const size_t kLineMax = 16384u; | |
size_t line_max; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required(VERSION 3.8) | |
# . | |
# ├── CMakeLists.txt | |
# ├── GladWGL.cpp | |
# └── glad | |
# ├── include | |
# │ ├── KHR | |
# │ │ └── khrplatform.h | |
# │ └── glad |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Derived from: https://www.boost.org/doc/libs/1_67_0/boost/compute/detail/lru_cache.hpp | |
// CXXFLAGS = -std=c++17 -Wall -Wextra -Werror -Wno-unused-parameter -fdata-sections -ffunction-sections (append -D__OWNER for owner) | |
// LDFLAGS = -lrt -lpthread -Wl,--gc-sections | |
#pragma once | |
#include <boost/optional.hpp> | |
#include <boost/interprocess/managed_shared_memory.hpp> | |
#include <boost/interprocess/containers/list.hpp> | |
#include <boost/interprocess/containers/map.hpp> | |
#include <boost/interprocess/containers/string.hpp> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Diagnostics; | |
using System.Collections.Generic; | |
using System.Linq; | |
namespace MessageBus | |
{ | |
public abstract class MessageEndpoint | |
{ | |
public MessageEndpoint(string id) | |
{ |