Skip to content

Instantly share code, notes, and snippets.

// Written in the D programming language.
/**
* Signals and Slots are an implementation of the Observer Pattern.
* Essentially, when a Signal is emitted, a list of connected Observers
* (called slots) are called.
*
* There have been several D implementations of Signals and Slots.
* This version makes use of several new features in D, which make
* using it simpler and less error prone. In particular, it is no
// Copyright Jens K. Mueller
// Boost License 1.0
// easy use by writec* in write fashion
// using the shared terminals
// or using .backgroundColor = Color.black
// What if the user wants to persistently change the terminal settings.
// Is this useful? I think it's not recommended.
/* Copyright (C) 1992, 1995-2002, 2009, 2010 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
/* Copyright (C) 1992, 1995-2001, 2002, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@jpf91
jpf91 / gist:1519658
Created December 25, 2011 19:45
libev D example
///
module libev;
import deimos.ev;
import std.socket;
import std.typecons;
import std.exception;
import std.stdio;
diff -ur android-ndk-r7.orig/build/tools/build-gcc.sh android-ndk-r7/build/tools/build-gcc.sh
--- android-ndk-r7.orig/build/tools/build-gcc.sh 2011-10-24 16:37:26.000000000 +0200
+++ android-ndk-r7/build/tools/build-gcc.sh 2012-02-04 14:49:36.705898017 +0100
@@ -45,6 +45,9 @@
GDB_VERSION=$DEFAULT_GDB_VERSION
register_var_option "--gdb-version=<version>" GDB_VERSION "Specify gdb version"
+MPC_VERSION=0.8.1
+register_var_option "--mpc-version=<version>" MPC_VERSION "Specify mpc version"
+
diff -ur build.old/Makefile.in build/Makefile.in
--- build.old/Makefile.in 2012-02-04 13:49:36.000000000 +0100
+++ build/Makefile.in 2012-02-04 14:46:13.749514106 +0100
@@ -384,7 +384,7 @@
GCC_CONFIG_ARGS=--prefix=$(prefix) \
--target=${cur_target} --host=${cur_host} --build=${cur_build} \
- --with-gnu-as --with-gnu-ld --enable-languages=c,c++
+ --with-gnu-as --with-gnu-ld --enable-languages=c,c++,d
diff -r 80285454df3c d/druntime/rt/memory.d
--- a/d/druntime/rt/memory.d Mon Jan 30 21:27:11 2012 +0000
+++ b/d/druntime/rt/memory.d Sat Feb 04 18:24:09 2012 +0100
@@ -31,11 +31,11 @@
}
version( linux )
{
- version = SimpleLibcStackEnd;
+ version = bionic;
#!/bin/sh
BASE_DIR=/home/jpf/Dokumente/Code/android-ndk
cd $BASE_DIR
mkdir toolchain-src
cd toolchain-src
git clone https://android.googlesource.com/toolchain/build.git
diff -ur android-ndk/toolchain-src/build/Makefile.in android-ndk-mingw32/toolchain-src/build/Makefile.in
--- android-ndk/toolchain-src/build/Makefile.in 2012-02-04 19:01:55.373827700 +0100
+++ android-ndk-mingw32/toolchain-src/build/Makefile.in 2012-02-05 18:15:04.998216904 +0100
@@ -350,14 +350,14 @@
.PHONY: config-host-libbfd build-host-libbfd install-host-libbfd
config-host-libbfd: stmp-config-host-libbfd
LIBBFD_CONFIG_ARGS=--prefix=$(prefix) \
- --target=${target_alias} --host=${host} --build=${build} \
+ --target=${target_alias} --host=${cur_host} --build=${build} \
$(baseargs) --disable-shared \