// the find
vczh/vczh_toys
This repository contains vczh's toys for black magic codes or experiments
A collection of C++11 experiments from vczh: a mark-and-sweep GC, LINQ-style lazy sequences, a multi-dimensional array wrapper, and a Y-combinator for recursive lambdas. These are exploratory implementations, not production libraries. The audience is C++ developers curious about how these patterns can be built from scratch.
The LINQ implementation is the most interesting piece — lazy evaluation through chained iterators with group_join and order_by is non-trivial to get right in C++11. The GC uses configurable heap bounds and explicit collect calls, which is at least honest about its manual nature rather than pretending to be transparent. The Y-combinator example is clean and shows the pattern without ceremony. Everything comes with makefiles alongside the VS project files, so you're not locked into Windows tooling.
Abandoned since 2020 — C++20 ranges make the LINQ piece largely obsolete, and the GC predates modern alternatives like Boehm or just using smart pointers correctly. The GC requires manual gc_start/gc_stop calls and inheriting from ENABLE_GC, which is an intrusive design that won't compose with third-party types. No tests anywhere in the repo, so you can't tell what edge cases were considered or caught. The multi-dimensional array wrapper adds syntax overhead (array_sizes() comma trick) that std::mdspan in C++23 handles properly.