Skip to content

Instantly share code, notes, and snippets.

View waywardmonkeys's full-sized avatar

Bruce Mitchener waywardmonkeys

View GitHub Profile
// a GenAvro file might look like:
// @namespace("wwm")
record timestamp {
long seconds;
long nanoseconds;
}
// @namespace("wwm")
record something {
avro_datum_t avro_record(const char *name, const char *space)
{
struct avro_record_datum_t *datum =
malloc(sizeof(struct avro_record_datum_t));
if (!datum) {
return NULL;
}
datum->name = strdup(name);
if (!datum->name) {
free(datum);
Module: dfmc-llvm-back-end
Copyright: Original Code is Copyright (c) 1995-2004 Functional Objects, Inc.
Additional code is Copyright 2009-2010 Gwydion Dylan Maintainers
All rights reserved.
License: Functional Objects Library Public License Version 1.0
Dual-license: GNU Lesser General Public License
Warranty: Distributed WITHOUT WARRANTY OF ANY KIND
/// Operating System
#pragma D option quiet
#pragma D option aggsortrev
Dylan*:::gf-call-lookup-return
{
generic = copyinstr(arg0);
method = copyinstr(arg1, 45);
@counts[generic, method] = count();
@running_counts[generic, method] = count();
}
@waywardmonkeys
waywardmonkeys / rundeck
Created May 31, 2011 18:08
UFW config for RunDeck
rundeck@xxx:/var/lib/rundeck$ cat /etc/ufw/applications.d/rundeck
[RunDeck]
title=RunDeck
description=RunDeck, a task execution system.
ports=4440/tcp
@waywardmonkeys
waywardmonkeys / project_manager.rst
Created November 19, 2011 17:09
Rethinking the OD project manager

Rethinking the Project Manager

Problem

The current project manager as a variety of problems that we would like to solve. These include:

  • It combines install with build. Everything is built and installed
@waywardmonkeys
waywardmonkeys / bad_tls.s
Created August 24, 2012 02:25
TLS comparison
_KemptyQVKdMM2I:
00000000 pushl %ebp
00000001 movl %esp,%ebp
00000003 pushl %edi
00000004 pushl %esi
00000005 subl $0x10,%esp
00000008 calll 0x0000000d
0000000d popl %edi
0000000e calll _get_teb
00000013 movl 0x15273-0xd(%edi),%ecx
@waywardmonkeys
waywardmonkeys / includes.pass.cpp
Created February 26, 2013 09:48
Test case for possible emscripten compiler bug
//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// <algorithm>
@waywardmonkeys
waywardmonkeys / atomic_flag_clear.pass.cpp
Created February 26, 2013 18:24
emscripten bug with volatile atomic ops.
//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// <atomic>
@waywardmonkeys
waywardmonkeys / awk.pass.cpp
Last active December 14, 2015 13:59
Causes the emscripten relooper to crash (previously caused stack range errors).
//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// <regex>