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
#!/bin/sh | |
set -e | |
VER=${1} # first argument is some git tag or branch | |
mkdir dmd-${VER#v} && cd $_ | |
for proj in dmd druntime phobos; do | |
curl -sSL https://github.com/D-Programming-Language/${proj}/archive/${VER}.tar.gz | \ | |
tar --transform="s|^${proj}-${VER#v}|${proj}|" -zxf - |
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
../../../../.dub/packages/libevent-master/deimos/event2/buffer.d | |
../../../../.dub/packages/libevent-master/deimos/event2/bufferevent.d | |
../../../../.dub/packages/libevent-master/deimos/event2/bufferevent_ssl.d | |
../../../../.dub/packages/libevent-master/deimos/event2/dns.d | |
../../../../.dub/packages/libevent-master/deimos/event2/_d_util.d | |
../../../../.dub/packages/libevent-master/deimos/event2/event.d | |
../../../../.dub/packages/libevent-master/deimos/event2/event_struct.d | |
../../../../.dub/packages/libevent-master/deimos/event2/keyvalq_struct.d | |
../../../../.dub/packages/libevent-master/deimos/event2/_tailq.d | |
../../../../.dub/packages/libevent-master/deimos/event2/thread.d |
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
#!/bin/sh | |
set -e | |
if [ $# -ne 1 ]; then | |
echo "usage: $0 <private_key>" | |
exit 1 | |
fi | |
KEYSIZE=256 |
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.file, std.algorithm, std.stdio, std.random, std.math; | |
extern (C++) | |
{ | |
struct StringValue | |
{ | |
void *ptrvalue; | |
size_t length; | |
char[0] lstring; | |
} |
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 logger; | |
// compile time log level | |
enum logLevel = LogLevel.critical; | |
void foo() | |
{ | |
info("foo info"); // optimized out | |
critical("foo crit"); | |
fatal("foo fat"); |
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 core.memory; | |
version (X86_64) | |
{ | |
T atomicOp(string op : "+=", T)(ref shared T val, T mod) pure nothrow @nogc | |
if (__traits(isIntegral, T)) | |
{ | |
T oval = void; | |
static if (T.sizeof == 1) | |
{ |
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.algorithm, std.conv, std.functional, std.stdio, std.range, std.traits, std.typetuple, std.typecons; | |
pragma(importpath, "dranges=https://raw.github.com/dawgfoto/dranges/master"); | |
import dranges.functional; | |
pragma(build, dranges); | |
Permute!Ranges permute(Ranges...)(Ranges ranges) | |
{ | |
return typeof(return)(ranges); | |
} |
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 std.regionallocator; | |
import std.algorithm, std.conv, std.exception, std.traits, std.typecons; | |
import core.bitop, core.exception, core.memory; | |
interface Allocator { | |
enum alignment = 1; | |
enum isAutomatic = false; | |
enum isScoped = false; | |
enum freeIsChecked = false; |
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.algorithm, std.exception, std.random, std.range, std.stdio; | |
PowerSet!R powerSet(R)(R range) if(isRandomAccessRange!R) | |
{ | |
return typeof(return)(range); | |
} | |
auto powerSet(R)(R range) if(!isRandomAccessRange!R && !isInfinite!R) | |
{ | |
return powerSet(array(range)); |
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 core.bitop, core.cpuid; | |
version (D_InlineAsm_X86) | |
{ | |
enum GeneralPurposeRegs : string | |
{ | |
AX = "EAX", | |
CX = "ECX", | |
DX = "EDX", | |
BX = "EBX", |
OlderNewer