Skip to content

Instantly share code, notes, and snippets.

@vbe0201
vbe0201 / day01.cpp
Last active December 3, 2021 19:11
My Advent of Code 2021 solutions written in C++
#include <algorithm>
#include <fstream>
#include <iostream>
#include <ranges>
#include <string>
void part1() {
std::ifstream input{"input.txt"};
auto view = std::ranges::istream_view<int>(input);
const std = @import("std");
const assert = std.debug.assert;
const cache_line = std.atomic.cache_line;
const AtomicUsize = std.atomic.Atomic(usize);
const Ordering = std.atomic.Ordering;
const Allocator = std.mem.Allocator;
// A modified version of Dmitry Vyukov's bounded MPMC queue,
// adapted for single-consumer usage:
@vbe0201
vbe0201 / minio.py
Last active November 5, 2025 14:45
Minio: Tiny Python async runtime for teaching purposes
import inspect
import time
import types
from collections import deque
from heapq import heappush, heappop
from selectors import DefaultSelector, EVENT_READ, EVENT_WRITE
class Task:
def __init__(self, coro):
self.coro = coro