You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Have questions about stdlib? Need help fixing a bug, figuring out what to do next, or just looking for feedback? Join our weekly office hours to connect with project maintainers, stay updated on the latest project news, and chat with other community members. This is a great opportunity to ask questions, share ideas, and engage directly with the stdlib team.
I had a more general question. Since many stdlib packages depend on Node.js APIs or native addons, I was wondering why that is, given that one of the project's goals is to bring numerical computing to the web?
These notes are likely imperfect, especially when it comes to spelling/function/package names
Meeting Purpose
Discuss project philosophy, documentation, testing, and new initiatives.
Key Takeaways
Project Scope: StandardLib's "web" scope includes all JS runtimes (browser, Node.js) to enable server-side performance via native add-ons (e.g., FFTW) and integration with existing hardware-optimized libraries.
Interactive Docs: Runnable examples are a high-ROI goal, but the technical challenge is significant. A potential path is to build a custom runtime (inspired by javascript.express) that dynamically loads individual ESM packages, avoiding the 100MB main bundle.
Testing Philosophy: StandardLib prioritizes test isolation and debuggability over parameterization. This philosophy is necessary because the project often is the reference implementation, making direct comparison against a known-good version impossible.
New Initiatives: A potential WGPU namespace for WebGPU utilities was discussed. The path forward is to first build more POCs (e.g., strings on GPU) to identify common patterns before generalizing them into a public API, mirroring the successful Regal project for WebGL.
Topics
Project Philosophy: "Web" Scope & Native Add-ons
StandardLib's definition of "web" is broad, encompassing any JavaScript runtime (browser, Node.js, Deno, Bun).
Rationale for Native Add-ons:
Performance: Access hardware-optimized libraries (e.g., FFTW, BLAST, LAPACK) for superior speed, especially on the server where performance ceilings are higher.
Integration: Interface with existing tools (e.g., OpenCV) without porting their entire codebases to JavaScript.
Positioning: Differentiate from other numerical ecosystems (Python, R) by being "web native."
Example: For FFTs, StandardLib has a pure JS/C implementation. On Node.js, users can swap to a native FFTW binding to unlock SIMD and OpenMP support.
Documentation: Interactive Examples
Goal: Add runnable code examples to the documentation.
Technical Challenges:
Bundle Size: The full StandardLib bundle is ~100MB, too large for client-side loading.
Dynamic Loading: Dynamically loading individual ESM packages is complex and requires significant engineering.
ROI Concerns: The value of simple "run" buttons is unproven; more compelling, editable demos are likely needed.
Proposed Solution: Build a custom runtime inspired by javascript.express. This would transform existing returns annotations into interactive elements that update in real-time.
Path Forward: Build a POC for a compelling, multi-function demo to test the approach.
Testing Strategy
Manit proposed a reusable, parameterized test suite structure (validation, fixtures, edge cases).
StandardLib's Philosophy:
Isolation over Parameterization: Each test case is explicit and isolated to a single variable change.
Rationale: Prioritizes long-term debuggability and readability, as isolating failures in parameterized tests can be difficult.
Reference Implementation: StandardLib often is the reference, making direct comparison against a known-good version impossible. Tests must use mathematical checks (e.g., orthogonality) instead of simple value comparisons.
New Initiatives: WebGPU Utilities
Manit is building a "strings on WebGPU" project, inspired by a Joseph Zaza book chapter.
Idea: Create a public WGPU namespace in StandardLib for common WebGPU utilities.
Path Forward:
Build More POCs: Continue exploring WebGPU use cases (e.g., strings, BLAST) to identify common patterns.
Generalize: Use these patterns to inform the design of a public API.
Inspiration: The Regal project for WebGL, which provided a framework to simplify common visualization tasks.
Error Handling: uint64/parse
Context: Deciding between RangeError and SyntaxError for invalid inputs in the uint64/parse function.
Decision:
SyntaxError: For invalid characters (e.g., leading minus sign).
RangeError: For values exceeding the 64-bit integer limit.
Implementation: Wrap the call to string-to-words in a try-catch block to re-throw a more informative RangeError for out-of-bounds values.
Activity
manit2004 commentedon Jul 21, 2026
DivitJain26 commentedon Jul 21, 2026
I鈥檝e implemented your feedback on feat: add
array/uint64聽stdlib#12562. However, I can鈥檛 remove the empty line in the README because doing so triggers a lint error: feat: addarray/uint64聽stdlib#12562 (comment).I had a more general question. Since many
stdlibpackages depend on Node.js APIs or native addons, I was wondering why that is, given that one of the project's goals is to bring numerical computing to the web?batpigandme commentedon Jul 21, 2026
AI-Generated Summary
Caution
These notes are likely imperfect, especially when it comes to spelling/function/package names
Meeting Purpose
Discuss project philosophy, documentation, testing, and new initiatives.
Key Takeaways
javascript.express) that dynamically loads individual ESM packages, avoiding the 100MB main bundle.WGPUnamespace for WebGPU utilities was discussed. The path forward is to first build more POCs (e.g., strings on GPU) to identify common patterns before generalizing them into a public API, mirroring the successfulRegalproject for WebGL.Topics
Project Philosophy: "Web" Scope & Native Add-ons
Documentation: Interactive Examples
javascript.express. This would transform existingreturnsannotations into interactive elements that update in real-time.Testing Strategy
New Initiatives: WebGPU Utilities
WGPUnamespace in StandardLib for common WebGPU utilities.Regalproject for WebGL, which provided a framework to simplify common visualization tasks.Error Handling:
uint64/parseRangeErrorandSyntaxErrorfor invalid inputs in theuint64/parsefunction.SyntaxError: For invalid characters (e.g., leading minus sign).RangeError: For values exceeding the 64-bit integer limit.string-to-wordsin atry-catchblock to re-throw a more informativeRangeErrorfor out-of-bounds values.Full transcript
Full office hours transcript