View rb.c
#include <assert.h>
#include <malloc.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
typedef intptr_t ssize_t;
typedef struct tree_node tree_node_t;
View dump.js
var heapdump = require('heapdump');
var lastHeapUsed;
setTimeout(function() {
dump(process.memoryUsage().heapUsed);
setInterval(function() {
var heapUsed = process.memoryUsage().heapUsed;
if (heapUsed > 2*lastHeapUsed)
dump(heapUsed);
View keybase.md

Keybase proof

I hereby claim:

  • I am piscisaureus on github.
  • I am piscisaureus (https://keybase.io/piscisaureus) on keybase.
  • I have a public key whose fingerprint is 4427 2BEE EFA2 6F95 BF7E 4C96 7A77 887B 2E2E D461

To claim this, I am signing this object:

View gist:3287ced95217eb2c5199
D:\iojs>git config --system -l
core.symlinks=false
core.autocrlf=input
color.diff=auto
color.status=auto
color.branch=auto
color.interactive=true
pack.packsizelimit=2g
help.format=html
http.sslcainfo=/bin/curl-ca-bundle.crt
View gist:f678b71b5df2195a607f
d:\a\node_modules\strong-agent\src\compat.h(71): error C2061: syntax error : id
entifier 'FunctionCallback' [D:\a\node_modules\strong-agent\build\strong-agent.
vcxproj]
d:\a\node_modules\strong-agent\src\compat.h(139): error C4430: missing type spe
cifier - int assumed. Note: C++ does not support default-int [D:\a\node_modules
\strong-agent\build\strong-agent.vcxproj]
d:\a\node_modules\strong-agent\src\compat.h(139): error C2143: syntax error : m
issing ',' before '&' [D:\a\node_modules\strong-agent\build\strong-agent.vcxpro
j]
d:\a\node_modules\strong-agent\src\compat.h(140): error C2146: syntax error : m
View nni.cpp
#include <functional>
#include <iostream>
class JSAny {
void* substance;
};
class JSBool : public JSAny {
public:
View nu.md

Introducing zones.

Before we get started: 'zone' is a library that makes programming with node much easier. It's work in progress, but you can try it out now.

You get goodies like:

  • Automatic exception handling
  • Long stack traces
  • Detect and handle common pitfalls with callbacks
View zone-local-storage.js
http.createServer(function(conn) {
zone.data.start = Date.now();
doThis(conn);
doThat(conn);
new Zone(function() {
zone.data.bar = 49;
output = renterTemplate()
View zone-yield.js
var contents = yield fs.readFile('bla');
yield zone.create(() => {
http.get('google.com/bla').pipe(fs.createWriteStream('cache/file1'))
http.get('google.com/bl2').pipe(fs.createWriteStream('cache/file2'))
http.get('google.com/bl3').pipe(fs.createWriteStream('cache/file3'))
});
console.log('all done!')
View command.js
var assert = require('assert');
var spawn = require('child_process').spawn;
module.exports = function Command(command, npmModule) {
return function(argv, options, loader) {
var options = {
env: process.env,
stdio: 'inherit',
windowsVerbatimArguments: true