created: 2025-03-22 daily: "[[2025-03-22, Wk 12 - Sat]]" tags:
- ”notes” origin:
- "[[34.24.0005 Stop rate limiting! Capacity management done right]]"
- "[[34.21.0001.00 Systems Performance]]"
- https://en.wikipedia.org/wiki/Little%27s_law similar to:
created: 2025-03-22 daily: "[[2025-03-22, Wk 12 - Sat]]" tags:
# install dependencies | |
cargo install wasm-tools auditable2cdx wkg | |
# fetch the Rust http sample | |
wkg oci pull ghcr.io/bytecodealliance/sample-wasi-http-rust/sample-wasi-http-rust:latest -o sample.wasm | |
ls | |
# print the metadata, including all dependencies | |
wasm-tools metadata show sample.wasm | less |
#![cfg(target_os = "macos")] | |
use rustix::event::kqueue; | |
use std::io::{Read, Write}; | |
use std::net::{TcpListener, TcpStream}; | |
use std::os::fd::AsRawFd; | |
use std::time::Duration; | |
fn main() { | |
// kickoff a simple echo server we can hit for demo purposes |
#| | |
Written by Chuck in 2024 | |
https://bogorad.github.io/ | |
Based on the brilliant Miryoku_kmonad => Kinesis layout | |
https://github.com/manna-harbour/miryoku_kmonad | |
With enormous help from the author of Kanata | |
https://github.com/jtroo |
{ | |
"description": "Change caps_lock to left_control if pressed with other keys, change caps_lock to escape if pressed alone.", | |
"manipulators": [ | |
{ | |
"from": { | |
"key_code": "caps_lock", | |
"modifiers": { | |
"optional": [ | |
"any" | |
] |
//! This module handles the conversion from `Pollable` -> `Future`. We do this | |
//! by creating an equivalent implementation to the `polling` crate. Once | |
//! https://github.com/smol-rs/polling/issues/102 has been resolved, this module | |
//! will likely no longer be needed. | |
use slab::Slab; | |
use std::mem; | |
use wasi::io::poll::{poll, Pollable}; | |
/// Waits for I/O events. |
Concurrency is a system-structuring mechanism, parallelism is a resource. (ref)
There's an important distinction between "parallelism" as a resource, and "parallel execution". The two are often confused, but they are in fact distinct. The key separator is "concurrency":
no parallelism | has parallelism | |
---|---|---|
no concurrency | sequential execution | sequential execution † |
has concurrency | concurrent execution ‡ | parallel execution |