Skip to content

Instantly share code, notes, and snippets.

View sam-mccall's full-sized avatar

Sam McCall sam-mccall

View GitHub Profile
[0/1] Running the Clang regression tests
-- Testing: 14679 tests, 48 threads --
Testing: 0 .. 10..
FAIL: Clang :: CodeGen/ppc-mmintrin.c (2718 of 14679)
******************** TEST 'Clang :: CodeGen/ppc-mmintrin.c' FAILED ********************
Script:
--
: 'RUN: at line 3'; /usr/local/google/home/sammccall/llvmbuild-mono/bin/clang -S -emit-llvm -target powerpc64-gnu-linux -mcpu=pwr8 -DNO_WARN_X86_INTRINSICS /usr/local/google/home/sammccall/src/llvm-mono/clang/test/CodeGen/ppc-mmintrin.c -fno-discard-value-names -mllvm -disable-llvm-optzns -o - | llvm-cxxfilt | /usr/local/google/home/sammccall/llvmbuild-mono/bin/FileCheck /usr/local/google/home/sammccall/src/llvm-mono/clang/test/CodeGen/ppc-mmintrin.c --check-prefixes=CHECK,CHECK-BE
: 'RUN: at line 5'; /usr/local/google/home/sammccall/llvmbuild-mono/bin/clang -S -emit-llvm -target powerpc64le-gnu-linux -mcpu=pwr8 -DNO_WARN_X86_INTRINSICS /usr/local/google/home/sammccall/src/llvm-mono/clang/test/CodeGen/ppc-mmintrin.c -fno-discard-value-names -mllvm -dis
../runtime/vm/object.h:1668: error: expected: raw() != null()
Aborted
@sam-mccall
sam-mccall / gist:2499473
Created April 26, 2012 13:15
thread-ring benchmark (Dart)
#import("dart:isolate");
final THREAD_COUNT = 50;
final TOKEN_PASSES = 203;
final SETUP_DONE = "done";
main() {
var first = spawnFunction(isoMain);
first.send([1, first], port);
#import("sqlite.dart", prefix:"sqlite"); // https://github.com/sam-mccall/dart/commit/9e2250beb970e0d614091497cd47aedbdcf02206
main() {
var c = new sqlite.Connection("/tmp/test.db");
try {
// [5, HELLO]
print(c.first("SELECT ?+2, UPPER(?)", [3, "Hello"]));
// [Hi!]: Hello, world!
// [Bye!]: Goodbye, cruel world!
// 2 posts total.
@sam-mccall
sam-mccall / gist:1562108
Created January 4, 2012 20:59
Filtering ASB account statements
var ary = function(x) { return Array.prototype.slice.apply(x); };
ary(document.querySelectorAll('#statementTable tr:not(.columnTitles)')).forEach(function(x) {
var cols = ary(x.querySelectorAll('td')).map(function(y) { return y.innerText; });
if (cols[2] == '' && cols[3] != '') x.classList.add('credit');
if (cols[2] != '' && cols[3] == '') x.classList.add('debit');
});