Archive›2026›June

June 2026

10 pastes
  • Hew metrics aggregation demo

    9GkN25dHc6·hew·2.8 KB·2026-06-11 04:02 UTC
    //! A small metrics aggregation service: sources push samples to a
    //! collector actor, a periodic ticker counts snapshots, and asks read
    //! the aggregates back out.
    
    type Sample {
     name: string;
  • untitled

    6g8S94dQ66·text·10.5 KB·2026-06-08 07:05 UTC
    /\n/mg
    /api
    /api/${o}
    /api/appoints/alipay/pay
    /api/appoints/appointbill/appointmentSubmit
    /api/appoints/appointbill/cancleAppointBill
    /api/appoints/appointbill/instrumentPrice-export
    /api/appoints/ap
  • untitled

    9NzSPMQ6dX·hew·1.3 KB·2026-06-04 22:54 UTC
    // Structured concurrency in Hew: a scope owns its child tasks and joins them
    // all before the scope expression returns. Tasks are forked with `fork { ... }`
    // and run on real OS threads; the enclos
  • untitled

    77kV6cU5B2·hew·4.8 KB·2026-06-04 06:43 UTC
    // demo-tcp-http-proxy.hew
    //
    // Architecture: TCP->HTTP transform proxy with per-connection actors.
    //
    // main - binds :7878, loops accept(); spawns one ProxyConn per client
    // ProxyC
  • untitled

    8j7gcYzjf8·hew·4.9 KB·2026-06-04 05:29 UTC
    // demo-tcp-http-proxy.hew
    //
    // Architecture: TCP->HTTP transform proxy with per-connection actors.
    //
    // main - binds :7878, loops accept(); spawns one ProxyConn per client
    // ProxyC
  • untitled

    2bw7M3FZQv·hew·5.0 KB·2026-06-04 04:06 UTC
    // demo-tcp-http-proxy.hew
    //
    // Architecture: TCP->HTTP transform proxy with per-connection actors.
    //
    // main - binds :7878, loops accept(); spawns one ProxyConn per client
    // ProxyC
  • untitled

    5hU5jZccLe·hew·3.6 KB·2026-06-04 02:38 UTC
    // Multi-actor TCP -> HTTP transform proxy (Hew, v0.5)
    //
    // A TCP server where each accepted connection is handled by its own actor in
    // "active mode": the runtime reactor reads the socket and deliv
  • Hew v0.5 — redis-style KV server (Session machine + Store actor, MULTI/EXEC)

    72Qe5sQSGf·hew·2.9 KB·2026-06-03 01:53 UTC
    // A redis-style key/value server: a Store actor owns the data, a Session
    // machine drives MULTI/EXEC transactions on the client side.
    //
    // Invariants:
    // * All key/value state lives in the Store
  • Hew v0.5 — redis-like server v2 (match dispatch, MULTI/EXEC transactions, conn state machine)

    6L33vWtDjC·hew·4.6 KB·2026-06-03 01:34 UTC
    // A redis-like server in Hew v0.5 — command parsing, key/value storage, and
    // MULTI/EXEC transactions, behind actor message-passing.
    //
    // WHAT IS REAL HERE:
    // * line-oriented command parsing (sp
  • Hew v0.5 — redis-like KV store (in-process actor + ask, RESP-style protocol)

    2XBm7c82nD·hew·2.9 KB·2026-06-03 01:23 UTC
    // In-process redis-like KV store (v0.5 Hew).
    //
    // The actor + HashMap + ask CORE a networked redis server is built on. The TCP
    // front-end is currently blocked by the D10 module-qualified-type-in-R
Page 1 of 1