Skip to content

Instantly share code, notes, and snippets.

View arjunguha's full-sized avatar
:shipit:
Why does this exist?

Arjun Guha arjunguha

:shipit:
Why does this exist?
View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@arjunguha
arjunguha / check_multiple_r.ipynb
Created October 18, 2023 19:44
Shows how the MultiPL-E R prompts are currently broken.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
function choose(args) {
return shift(function(k) {
let results = [ ];
for (let i = 0; i < args.length; i++) {
results = results.concat(k(args[i]));
}
return results;
});
}
// This is an attempt to implement support for deep
// stacks without actually tracking the depth of the
// stack. Tracking the stack depth requires a fair
// amount of instrumentation. In contrast, this
// approach only requires inserting a single call
// to shrinkStack at the top of each function.
//
// This approach may involve more continuation
// capture than an approach that precisely tracks
// the stack depth. E.g., we would capture
class Point {
constructor(x, y) {
this.x = x;
this.y = y;
}
}
class PointBuilder {
constructor() {

Keybase proof

I hereby claim:

  • I am arjunguha on github.
  • I am arjunguha (https://keybase.io/arjunguha) on keybase.
  • I have a public key ASD5BZIO3FbztAIxBJ_Y2iPAuY6o3amUd8j4Um2ewzt4mQo

To claim this, I am signing this object:

@arjunguha
arjunguha / driver.js
Last active February 19, 2018 22:45
Stopify as a webpack plugin
var runner = stopify.stopify('index.bundle.js', {
estimator: 'reservoir',
yieldInterval: 100,
resampleInterval: 100,
timePerElapsed: 1
});
runner.run(() => console.log('done'));
// To pause execution:
@arjunguha
arjunguha / package.json
Created February 19, 2018 22:42
Stopify as a webpack plugin
{
"name": "stopify-webpack-demo",
"version": "1.0.0",
"main": "index.js",
"scripts": {
"build": "./node_modules/.bin/webpack"
},
"license": "MIT",
"dependencies": {
"babel-loader": "^7.1.2",