Skip to content

Instantly share code, notes, and snippets.

// Test case that perhaps shows a miscompile.
//
// % tinygo test -target=wasm
// panic: runtime error: nil pointer dereference
//
// To get a working compile:
//
// % tinygo test -opt=1 -target=wasm
//
// There are at least three trivial things one can do to this code to also get
@FrankReh
FrankReh / Dockerfile
Created May 10, 2017 21:28
Dockerfile to build Debian system capable of running Cappuccino with the node engine from my repos
FROM debian:latest
RUN apt-get update && apt-get install -y \
bash \
build-essential \
default-jre \
g++ \
git \
python \
sudo \
tar \
@FrankReh
FrankReh / NSIndexSetStringAddition.m
Created January 20, 2017 15:10
Add string method to NSIndexSet (pretty print NSIndexSet)
#import <Foundation/Foundation.h>
NSString *indexSetToString(NSIndexSet *indexSet)
{
NSMutableString *s = [[NSMutableString alloc] init];
__block NSString *sep = @"";
[indexSet enumerateRangesUsingBlock:
^void (NSRange range, BOOL *stop) {
switch (range.length) {