Skip to content

Instantly share code, notes, and snippets.

View zachallaun's full-sized avatar

Zach Allaun zachallaun

View GitHub Profile
@zachallaun
zachallaun / coro.js
Last active August 29, 2015 14:22 — forked from cqfd/coro.js
// Run with `node --harmony coro.js`
"use strict";
const Promise = require('bluebird');
// Takes a function*, `g`, that yields promises.
// Returns a promise that resolves to `g`'s eventual return value.
var coro = function(gStar) {
const pending = Promise.pending();
@zachallaun
zachallaun / gist:3470855
Created August 25, 2012 20:54 — forked from dcampbell24/gist:3470851
julia ccall macro

Macros in Julia

Say you want to use glfw (an openGL wrapper) from Julia...

You could do:

ccall(dlsym(glfw, :glfwInit), Int, ())