Reference

Programming languages

Choose TypeScript, Go, Rust or C++ and find syntax, everyday APIs, standard libraries and tools in one place.

Scope and conventions

TypeScript/Node, Go 1.23+, Rust 2024 and C++23: from a first CLI to files, JSON, HTTP, concurrency and testing. Complete programs are labeled; other examples identify their surrounding code/imports. Optional libraries and version requirements are named in each entry.

Debugging & diagnostics

Pause and inspect a failing execution

Rust

rust-gdb/rust-lldb are toolchain wrappers around an installed native debugger. Debug information and optimization affect inspection.

Build a debug target with cargo build, then use the platform-supported debugger on target/debug/<binary>.

Check races with a supported tool

Rust

Safe Rust prevents many data races, but not logical races/deadlocks. ThreadSanitizer/Miri have separate toolchain and platform constraints.

Use deterministic coordination tests; consult the tool’s supported Rust/toolchain setup before enabling instrumentation.

Choose diagnostics for memory and undefined behavior

Rust

Borrow checking does not cover every unsafe/FFI invariant. Miri and sanitizers have supported subsets and toolchain setup requirements.

Keep unsafe preconditions explicit and exercise boundary cases; do not infer complete proof from one instrumented run.

Run formatting and static checks separately from tests

Rust

rustfmt and Clippy are toolchain components. Run their check modes and keep target/features consistent with the intended build.

Shell with components installed: cargo fmt -- --check; cargo clippy --all-targets -- -D warnings.

Reduce a failure to one repeatable case

Rust

Record exact input, expected/observed behavior, version/configuration and a focused command. Reduce unrelated code while preserving the failure. Keep the result as a regression test once the cause is fixed.

Fragment

src/main.rs
Follow appearance
GitHub Light
GitHub Dark
Rosé Pine
Catppuccin Mocha
VS Code Dark+
reproduce → narrow → inspect → change → rerun
retain the failing input or seed