A minimal, unopinionated state management library for React with a hooks-based API.
- Store: A single source of truth holding your application state
- Hooks-based: Access state using hooks, no providers needed
| // map of box index to the days interval array | |
| const G5_INTERVALS = [1, 2, 5, 9, 14]; | |
| interface Flashcard { | |
| id: string; | |
| word: string; | |
| definition: string; | |
| box: number; // 1 to 5 | |
| nextReviewDate: Date; | |
| } |
| type Listener = () => void; | |
| type Unsubscribe = () => void; | |
| interface CacheEntry<T> { | |
| data: T; | |
| listeners: Set<Listener>; | |
| dbUnsubscribe: Unsubscribe | null; | |
| subscriberCount: number; | |
| } |
Fast all-in-one JavaScript runtime and toolkit (bundler, test runner, package manager).
Bun is a modern JavaScript runtime built from scratch using Zig and JavaScriptCore (Safari's JS engine). It serves as a drop-in replacement for Node.js with significantly faster startup times and execution speed. Unlike Node.js which uses V8, Bun uses JavaScriptCore which contributes to its performance gains.
| // ALGEBRAIC EFFECTS | |
| use std::cell::RefCell; | |
| use std::rc::Rc; | |
| #[derive(Debug, Clone)] | |
| enum Effect { | |
| Log(String), | |
| GetRandom(i32, i32), // min, max | |
| Pause(u32), // milliseconds |
A powerful general-purpose programming language that provides low-level memory control, object-oriented features, and high performance with zero-cost abstractions. C++ extends C with classes, templates, and modern safety features.
C++ combines procedural, object-oriented, and generic programming paradigms. It provides direct hardware access while offering high-level abstractions.
Quick reference guide for Python programming fundamentals and common patterns.
Python is a high-level, interpreted, dynamically-typed language emphasizing code readability. Everything in Python is an object, and the language follows a "batteries included" philosophy with a comprehensive standard library.