This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
detach() | |
{ | |
if (!RefCounted._store) return; | |
assert(RefCounted._store._count > 0); | |
if (--RefCounted._store._count) | |
{ | |
debug(RefCounted) if (RefCounted.debugging) | |
writeln(typeof(this).stringof, | |
"@", cast(void*)RefCounted._store, | |
": decrement refcount to ", RefCounted._store._count); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import std.socket, std.exception, std.stdio, std.random, std.range; | |
void main(string args[]) | |
{ | |
enforce(args.length == 2); | |
if(args[1] == "--server") | |
{ | |
auto sock = new Socket(AddressFamily.INET, SocketType.STREAM); | |
sock.bind(new InternetAddress("localhost", 9870)); | |
sock.listen(0); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import std.datetime, std.concurrency, std.stdio, core.sys.posix.unistd; | |
import std.exception; | |
enum BUFFER_SIZE = 1 * 1024 * 1024UL; | |
void main(string[] args) | |
{ | |
assert(args.length == 4); | |
ubyte[BUFFER_SIZE] buf; | |
auto sw = StopWatch(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import std.datetime, std.concurrency, std.stdio, core.sys.posix.unistd; | |
import std.exception; | |
enum BUFFER_SIZE = 1 * 1024 * 1024UL; | |
void main(string[] args) | |
{ | |
assert(args.length == 3); | |
auto sw = StopWatch(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// | |
module libev; | |
import deimos.ev; | |
import std.socket; | |
import std.typecons; | |
import std.exception; | |
import std.stdio; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |