stdlib
stdlib
Athan Reines | @kgryte | @stdlibjs

Numeric Computing with Node.js

Survey

Overview

     
  1. Why JavaScript?
  2. State of JavaScript
  3. State of Ecosystem
  4. A Standard Library
  5. The Future

JavaScript

Language of the Web


import beep, { foo, bar } from 'beep';
import beep from 'beep';
import { foo, bar } from 'beep';
import { foo as fu, bar } from 'beep';
import * as beep from 'beep';
import 'beep';
					

const beep = require( 'beep' );
					

 

MATLAB

R

 

Python

Mathematica

 

Julia

Why?

  • Dynamically compiled
  • U/Int64
  • BigInt/BigNumber
  • Single-threaded
  • Performance
  • C/C++/Fortran bindings

Community.

Libraries.

Why?

  • Web APIs
  • Rendering
  • Visualization/Computation
  • Ubiquity
  • Distribution
  • Package Management

Applications

  • Edge Computing
  • Cross-platform
  • Compute Intensive
  • Interactive Data Analysis
  • Integrated ML
  • AI Powered

Mad science.

State of Math in JavaScript

  • acos
  • asin
  • atan
  • atan2
  • cos
  • sin
  • tan
  • acosh
  • asinh
  • atanh
  • cosh
  • sinh
  • tanh
  • abs
  • exp
  • log (ln)
  • pow
  • sqrt
  • sign
  • cbrt
  • expm1
  • log10
  • log1p
  • log2
  • ceil
  • floor
  • round
  • fround
  • trunc
  • max
  • min
  • random
  • hypot
  • clz32
  • imul
  • No standard algorithms.
  • No minimum precision.
  • Portability.
  • No common codebase.
  • Slow pace of innovation.
  • Bugs.

Math.pow


var x = Math.pow( 10, 308 );
// returns:  1.0000000000000006e+308
// expected: 1.0e+308
				

Math.exp


var y = Math.exp( 100.0 );
// returns:  2.6881171418161485e+43
// expected: 2.6881171418161356e+43
				

What's being done?

Not much.

  • The fragmentation problem.
  • The portability problem.
  • The versioning problem.
  • The flexibility problem.
  • The backward compatibility problem.
  • The globals problem.
  • The testing problem.
  • The trust problem.

State of the Ecosystem

  • False assumptions.
  • Low hanging fruit.
  • Poor implementations.
  • Insufficient scope.
  • Lack of ambition.

A lot of noise.

1000+ Packages

stdlib
stdlib
stdlib
stdlib

A standard library.

stdlib

So what's needed?

Your help.

Thank you!

stdlib

https://github.com/stdlib-js/stdlib
https://www.patreon.com/athan

Appendix






















				

The End