Skip to content

Instantly share code, notes, and snippets.

View kim366's full-sized avatar

Kim Schmider kim366

  • Sydney
View GitHub Profile
#include <utility>
template<typename T>
struct sample_templated
{
T x;
int y;
};
using instanciated = sample_templated<double>;
#include <cassert>
template<typename T>
struct types_match
{
static bool match() { return false; }
};
#define SYNC(cpp_type, type_name) \
template<> \
#include <any>
#include <cassert>
#include <utility>
#include <vector>
enum class param_type
{
templated,
normal
};
template<int N, typename Tupl, typename Op>
struct tuple_transform_impl
{
static void increment(Tupl& tuple, Op op)
{
std::get<N>(tuple) = op(std::get<N>(tuple));
tuple_transform_impl<N - 1, Tupl, Op>::increment(tuple, op);
}
};
template<typename Op, typename Tuple, std::size_t... Is>
void invoke(Op op, const Tuple& args, std::index_sequence<Is...>)
{
op(std::get<Is>(args)...);
}
template<typename Op, typename... Args>
void invoke(Op op, const std::tuple<Args...>& args)
{
invoke(op, args, std::index_sequence_for<Args...>{});
name: CI
on:
push:
branches-ignore:
- dist-preview
- dist
jobs:
build:
"scripts": {
"build": "spago build --purs-args \"--censor-codes=UserDefinedWarning\"",
"dev": "concurrently -rki \"pscid --censor-codes UserDefinedWarning\" \"parcel assets/index.html\"",
"test": "spago test --purs-args \"--censor-codes=UserDefinedWarning\"",
"serve": "http-server dist",
"bundle:build": "NODE_ENV=production spago build --purs-args '--codegen corefn'",
"bundle:dce": "NODE_ENV=production zephyr Main.main",
"bundle:parcel": "NODE_ENV=production parcel build assets/index.html --no-source-maps --log-level 4",
"bundle:prerender": "bash scripts/prerender.sh",
"bundle": "npm run bundle:build && npm run bundle:dce && npm run bundle:parcel && npm run bundle:prerender",
{
"fullName": "English (Colemak-DH ISO)",
"name": "us-colemak_dh_iso",
"singletonKeys": [
[ "CapsLock", "Alt_L" ],
[ "Shift_L", "Backspace" ],
[ "Control_L", "Win_L" ],
[ "Win_L", "Control_L" ],
[ "Alt_L", "Shift_L" ],
[ "Alt_R", "Extend" ],
package main
import "vendor:glfw"
import "core:math/linalg"
import "core:fmt"
import vk "vendor:vulkan"
import "core:dynlib"
instance: vk.Instance
{
"shell_cmd": "cd ${project_path} && odin build . -debug",
"file_regex": "^(..[^:]*)\\(([0-9]+):?([0-9]+)?\\):? (.*)$",
"selector": "source.odin"
}