IssueRaiser

Inspired by the discussion on https://news.ycombinator.com/item?id=20960832 , and the author of that article's complaint t...

Inspired by the discussion on https://news.ycombinator.com/item?id=20960832 , and the author of that article's complaint that there wasn't any source code online, I went ahead and ported the algorithm to TypeScript/JavaScript. As it happens, Vitter's sequential random sampling actually solves a rather annoying problem I had at work recently, so this was a practical as well as theoretical / for-fun exercise. Numerical code like this is also a prime candidate for implementation via WebAssembly, but while I've been able to produce a working transformed version of the code which acts like a restartable co-routine (i.e., manually, without relying on language-supported generators), getting the compiled WASM to actually run correctly in a JS environment has not worked out so far. I expect that will be version 2.0.0.

Posted by gliese1337 on Sep 17, 2019, 7:00 PM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.3,500 issues0 comments

complaint (Other)

Inspired by the discussion on https://news.ycombinator.com/item?id=20960832 , and the author of that article's complaint t...

gliese1337Sep 17, 2019, 7:00 PM

Inspired by the discussion on https://news.ycombinator.com/item?id=20960832 , and the author of that article's complaint that there wasn't any source code online, I went ahead and ported the algorithm to TypeScript/JavaScript. As it happens, Vitter's sequential random sampling actually solves a rather annoying problem I had at work recently, so this was a practical as well as theoretical / for-fun exercise. Numerical code like this is also a prime candidate for implementation via WebAssembly, but while I've been able to produce a working transformed version of the code which acts like a restartable co-routine (i.e., manually, without relying on language-supported generators), getting the compiled WASM to actually run correctly in a JS environment has not worked out so far. I expect that will be version 2.0.0.

Comments (0)

No comments yet. Start the discussion.

Comment on this issue