Skip to content

Instantly share code, notes, and snippets.

View unrays's full-sized avatar
🐱
Coding while listening to Bach

Félix-Olivier Dumas unrays

🐱
Coding while listening to Bach
  • Computer Science Student · Cégep de Rimouski
  • Rimouski, Québec
View GitHub Profile
@unrays
unrays / deducing_this.hpp
Last active March 4, 2026 18:02
I'm never going back, insanely generic and flexible implementation of a getter
constexpr EXOTIC_NODISCARD decltype(auto) get(this auto&& self) noexcept {
return std::forward<decltype(self)>(self);
}
@unrays
unrays / dod_registry_core.hpp
Created May 22, 2026 17:29
A C++ data-oriented registry with compile-time type mapping and cache-efficient handle-based storage.
// Copyright (c) May 2026 Félix-Olivier Dumas. All rights reserved.
// Licensed under the terms described in the LICENSE file
#pragma once
#include <cstddef>
#include <tuple>
#include <utility>
#include <type_traits>
#include <iostream>
@unrays
unrays / unsynchronized_chunk_allocator.hpp
Created May 22, 2026 19:46
Unsynchronized chunk allocator built on a custom memory_resource, featuring monotonic chunk allocation, alignment handling, and basic object construction utilities.
// Copyright (c) May 2026 Félix-Olivier Dumas. All rights reserved.
// Licensed under the terms described in the LICENSE file
#pragma once
// This is my own custom memory_resource, but you can either use your own
// or the one from the standard library (std::pmr).
#include "memory_resource.hpp"
#include <cstddef>
@unrays
unrays / monotonic_atomic_buffer.hpp
Created May 22, 2026 19:52
Custom memory_resource implementation with an atomic monotonic buffer allocator supporting aligned, lock-free allocations on a preallocated memory region.
// Copyright (c) May 2026 Félix-Olivier Dumas. All rights reserved.
// Licensed under the terms described in the LICENSE file
#pragma once
#include <cstddef>
#include <atomic>
#include <stdexcept>
namespace exotic::memory {
@unrays
unrays / exotic_crtp.hpp
Created May 22, 2026 20:00
Exotic CRTP pattern for static polymorphism using variadic mixin composition and C++23 explicit object parameters. Introduces a novel approach to compile-time interface dispatch without runtime overhead.
// Copyright (c) May 2026 Félix-Olivier Dumas. All rights reserved.
// Licensed under the terms described in the LICENSE file
// Reference example of the pattern
// See: https://medium.com/@felixolivierdumas/exotic-crtp-rethinking-static-polymorphism-with-c-23-89f9e75e8ffd
#pragma once
#include <iostream>
#include <type_traits>
@unrays
unrays / sharded-string-interner.hpp
Created May 24, 2026 20:19
High-performance sharded string interner using custom memory allocation and low-contention concurrency design.
// Copyright (c) May 2026 Félix-Olivier Dumas. All rights reserved.
// Licensed under the terms described in the LICENSE file
#pragma once
#include <cstddef>
#include <stdexcept>
#include <atomic>
#include <iostream>
#include <new>