All posts
v0.4.2
v0.4.2
Added
_placeholder in specialized call handlers. The_argument placeholder now works inside builtins routed through specialized codegen call handlers, not just generic calls.- Growable chunked BufferPool. Cedar's
BufferPoolnow backs its registers with up to 64 lazily-allocated 256-buffer slabs (default cap raised from 256 to 16384 total). Slab pointers are stable across growth, so the audio thread's in-flight reads survive a hot-swap that armed new slabs on the compile thread. Hosts (nkido CLI play / serve / ui / render and the web/wasm worklet) callpool.ensure_capacity(required_buffers)off-cycle before publishing the new bytecode. CompileResult::required_buffers. Codegen now reports the peak distinct buffer indices used by the program so hosts can size the pool exactly. Backwards compatible: hosts that ignore the field still work for programs that fit in the default slab.
Changed
- Codegen sum/mix accumulator.
sum()andmean()over arrays now emit one accumulator buffer + N-1 in-place ADD instructions instead of an N-1-buffer linear chain. Programs that fan out wide (e.g.unison(..., voices: 8)summed underpoly) no longer exhaust the pool on the per-voice sum. Bit-identical output. BufferAllocatorreuses freed indices. Codegen now has aBufferAllocator::release(idx)that puts indices back into a LIFO free list.reset_to(mark)drains free-list entries past the mark. Used by the sum/mix accumulator and reserved for future refcount-driven release across general opcodes.cedar::MAX_BUFFERSsemantics. Previously the size of a single flat buffer array (256). Now the total addressable buffer index space (16384 by default). Per-slab size lives incedar::SLAB_BUFFERS. TheCEDAR_MAX_BUFFERSbuild flag still works; it must be a positive multiple ofSLAB_BUFFERS.BUFFER_ZEROis now an explicit constant. Pinned at 255 (last slot of slab 0) so it stays in the pre-allocated slab regardless of any future cap changes.
Fixed
- Live IDE deep links 404'd on
live.nkido.cc. Opening a shared patch (/p#code=…) or any non-prerendered route returned Netlify's "Page not found". The deploy never applied the repo'snetlify.toml, so the SPA fallback rewrite,SharedArrayBufferCOOP/COEP headers, and immutable-asset caching were all missing in production. The deploy now appliesnetlify.tomland also ships_redirects/_headersin the build artifact. scalesdispatcher compile failure on a non-literal scrutinee. Selecting a scale with a runtime (non-literal) argument no longer fails to compile.