Skip to content

Instantly share code, notes, and snippets.

View kennethlakin's full-sized avatar

Kenneth Lakin kennethlakin

  • San Francisco, CA
View GitHub Profile

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@kennethlakin
kennethlakin / Build transcription
Last active December 16, 2015 21:08
Clang++ get_future failure. Failure is also present in 3.2 and in SVN r180858:
$ ~/project/build/Debug+Asserts/bin/clang++ --version
clang version 3.3 (trunk 180858)
Target: x86_64-unknown-linux-gnu
Thread model: posix
$ ~/project/build/Debug+Asserts/bin/clang++ -pthread -Wall -pedantic -g -std=c++11 main.cpp && gdb -q ./a.out
Reading symbols from a.out...done.
(gdb) r
Starting program: a.out
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
char *myStrtok(char * str, const char *delim)
{
static char * s = NULL;
char * ret = NULL;
if(str != NULL)
{
@kennethlakin
kennethlakin / irclib.ts
Created April 14, 2013 03:15
TypeScript conversion, typechecking, or the lack thereof.
declare class SocketId {};
declare var chrome : {
socket: {
create(protocol:string, options:Object, cb:(s:{socketId:SocketId;})=>void);
connect(sock:SocketId, host:string, port:number, cb:Function);
write(sock:SocketId, ab:ArrayBuffer, cb:Function);
read(sock:SocketId, opt:Object, cb:(ab:ArrayBuffer)=>void);
disconnect(sock:SocketId, cb?:()=>void);
};
storage: {
-module(coin).
-export([start/1, stop/0, coin/2, gather/2, gatherStatus/2]).
start(N) ->
Gatherpid = spawn(?MODULE, gather, [0, now()]),
register(gather, Gatherpid),
spawn(?MODULE, gatherStatus, [Gatherpid, 0]),
coin(N, Gatherpid).
stop() ->