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
// -*- coding:utf-8; mode:c++; mode:auto-fill; fill-column:80; -*- | |
/// @file base64.hpp | |
/// @brief Base64 encoding and decoding. | |
/// @author J. Arrieta <[email protected]> | |
/// @date January 28, 2019 | |
/// @copyright (C) 2019 Nabla Zero Labs | |
#pragma once | |
// C++ Standard Library |
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
// -*- coding:utf-8; mode:c++; mode:auto-fill; fill-column:80; -*- | |
/// @file tle.cpp | |
/// @brief Implementation of tle. | |
/// @author J. Arrieta <[email protected]> | |
/// @date January 25, 2019 | |
/// @copyright (C) 2019 Hesslag, Inc. | |
// Component header | |
#include "tle.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
#pragma once | |
#include <fstream> | |
#include <string> | |
#include <system_error> | |
#include <iterator> | |
inline std::string slurp(const std::string& path) { | |
constexpr auto flags = std::ios::in | std::ios::binary; | |
if (auto fp = std::ifstream(path, flags); fp) { |
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
"""Simple re-arrangement can yield significant performance improvements in | |
naive, low-order polynomial evaluation. The interested reader may wish to read | |
about "Horner's method." | |
(C) 2018 Nabla Zero Labs | |
MIT License | |
""" | |
import time | |
def p0(a, x): |
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
// -*- coding:utf-8; mode:c++; mode:auto-fill; fill-column:80; -*- | |
/// @file nzl/memory_map.hpp | |
/// @brief A mapped memory region. | |
/// @author J. Arrieta <[email protected]> | |
/// @date November 23, 2018 | |
/// | |
/// Copyright 2018 Nabla Zero Labs | |
/// | |
/// Permission is hereby granted, free of charge, to any person obtaining a copy |
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
// A simple Lexer meant to demonstrate a few theoretical concepts. It can | |
// support several parser concepts and is very fast (though speed is not its | |
// design goal). | |
// | |
// J. Arrieta, Nabla Zero Labs | |
// | |
// This code is released under the MIT License. | |
// | |
// Copyright 2018 Nabla Zero Labs | |
// |
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 <cassert> | |
#include <iostream> | |
#include <memory> | |
#include <type_traits> | |
#include <vector> | |
template <typename T> | |
class Pool { | |
public: | |
using Block = typename std::aligned_storage<sizeof(T), alignof(T)>::type; |
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 <cctype> | |
#include <fstream> | |
#include <iostream> | |
#include <iterator> | |
#include <sstream> | |
#include <stdexcept> | |
#include <string> | |
inline bool semantic_compare(std::size_t n, const char *value, | |
const std::string &s) { |
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
/// Experiments with string view, dispatching, and stuff like that. | |
/// J. Arrieta | |
#include <algorithm> | |
#include <iomanip> | |
#include <iostream> | |
#include <locale> | |
#include <string> | |
// POSIX only | |
#include <sys/stat.h> |
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 <chrono> | |
#include <iostream> | |
#include <memory> | |
#include <string> | |
#include <thread> | |
#include <unordered_map> | |
#include <vector> | |
// In practice these would be actual types instead of aliases. | |
using Id = int; |