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
local slk = {} | |
local function split(str, p) | |
local rt = {} | |
string.gsub(str, '[^'..p..']+', function (w) table.insert(rt, w) end) | |
return rt | |
end | |
local function trim(str) | |
return string.gsub(str, "^%s*(.-)%s*$", "%1") |
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 <Dbghelp.h> | |
#pragma comment(lib, "Dbghelp.lib") | |
class Symbols { | |
public: | |
Symbols() | |
: m_process(GetCurrentProcess()) | |
{ |
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
local format = string.format | |
local tonumber = tonumber | |
local fmt = { | |
'%.1f', | |
'%.2f', | |
'%.3f', | |
'%.4f', | |
'%.4f', | |
'%.5f', | |
'%.6f', |
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
local function if_then(toclose) | |
if not toclose then | |
return function() end | |
end | |
return function (_, w) | |
if not w then | |
return toclose | |
end | |
end, nil, nil, toclose | |
end |
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
local string_char = string.char | |
local string_byte = string.byte | |
local table_concat = table.concat | |
local pairs = pairs | |
local encoder = {} | |
local decoder = {} | |
for i, char in pairs { | |
'A','B','C','D','E','F','G','H','I','J', 'K','L','M','N', | |
'O','P','Q','R','S','T','U','V','W','X','Y', 'Z', |
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
local error = error | |
local strchar = string.char | |
local strbyte = string.byte | |
local strmatch = string.match | |
local utf8char = utf8.char | |
local tconcat = table.concat | |
local function be_tochar(code) | |
return strchar((code >> 8) & 0xFF, code & 0xFF) | |
end |
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
local lm = require "luamake" | |
lm:exe "minilua" { | |
defines = "_CRT_SECURE_NO_WARNINGS", | |
sources = { | |
"src/host/minilua.c" | |
} | |
} | |
local dynasm_flags = { |
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 | |
#if defined(_MSC_VER) && !defined(__clang__) | |
#include <__msvc_int128.hpp> | |
namespace bee { | |
using int128_t = std::_Signed128; | |
using uint128_t = std::_Unsigned128; | |
} | |
#else | |
namespace bee { |
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 <format> | |
#include "UObject/EnumProperty.h" | |
#include "UObject/UObjectIterator.h" | |
template <> | |
struct std::formatter<FString, char> : public std::formatter<std::string, char> { | |
template <class FmtContext> | |
FmtContext::iterator format(const FString& s, FmtContext& ctx) const noexcept { | |
auto conv = FTCHARToUTF8(*s); |