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.stdio; | |
import std.exception : enforce; | |
import deimos.openssl.aes; | |
import deimos.openssl.rand; | |
void main() | |
{ | |
auto message = randBytes(100); | |
writeln(message); |
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.stdio; | |
void debugWriteln(T...)(T args) pure @trusted nothrow | |
{ | |
debug | |
{ | |
try writeln(args); catch assert(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.traits; | |
struct Option(T) | |
{ | |
private | |
{ | |
void[T.sizeof] _storage; | |
bool _empty = true; |
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
#0 0x00007fcd7c879700 in ?? () | |
#1 0x0000000000794b1c in invariant._d_invariant(Object) () | |
#2 0x00000000006b3183 in _D4vibe4core7drivers9libevent215Libevent2Driver12releaseTimerMFmZv ( | |
this=<error reading variable: Could not find the frame base for "_D4vibe4core7drivers9libevent215Libevent2Driver12releaseTimerMFmZv".>, | |
timer_id=<error reading variable: Could not find the frame base for "_D4vibe4core7drivers9libevent215Libevent2Driver12releaseTimerMFmZv".>) | |
at ../../dlang/vibe.d/source/vibe/core/drivers/libevent2.d:389 | |
#3 0x000000000073498b in _D4vibe4core4core5Timer6__dtorMFZv ( | |
this=<error reading variable: Could not find the frame base for "_D4vibe4core4core5Timer6__dtorMFZv".>) at ../../dlang/vibe.d/source/vibe/core/core.d:726 | |
#4 0x00000000006ad12d in _D4vibe4core4core14VibeDriverCore11__fieldDtorMFZv ( | |
this=<error reading variable: Could not find the frame base for "_D4vibe4core4core14VibeDriverCore11__fieldDtorMFZv".>) at ../../dlang/vibe.d/source/vibe/core/core.d:1017 |
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; | |
import std.array; | |
import std.ascii; | |
import std.range; | |
import std.traits; | |
import std.variant; | |
import std.utf; | |
struct HTMLParser(R) if (isInputRange!R) | |
{ |
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.range; | |
void main() | |
{ | |
auto nums = iota(1, 6); | |
static if (false) | |
{ | |
// works | |
auto r1 = refRange(&nums).filter!(i => i < 4); |
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 primes; | |
import std.range; | |
struct Primes(T) | |
{ | |
private | |
{ |
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; | |
import std.random; | |
import std.range; | |
import std.stdio; | |
import std.string; | |
import std.typecons; | |
void main() | |
{ | |
immutable dic = [["今日","ぞい"],["も"],["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
module lambda; | |
import std.algorithm; | |
import std.container; | |
import std.conv; | |
import std.exception; | |
import std.functional; | |
import std.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
let _0 = \s z. z | |
let _1 = \s z. s z | |
let _2 = \s z. s (s z) | |
let _3 = \s z. s (s (s z)) | |
let _4 = \s z. s (s (s (s z))) | |
let succ = \n s z. s (n s z) | |
let plus = \m n s z. m s (n s z) | |
let mult = \m n s z. n (m s) z |
OlderNewer