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.concurrency : receiveOnly, send, | |
spawn, Tid, thisTid; | |
import core.atomic : atomicOp, atomicLoad; | |
import core.sync.mutex; | |
shared Mutex mtx; | |
/* | |
Queue that can be used safely among |
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.concurrency : receiveOnly, send, | |
spawn, Tid, thisTid; | |
import core.atomic : atomicOp, atomicLoad; | |
import core.sync.mutex; | |
shared Mutex mtx; | |
/* | |
Queue that can be used safely among |
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 main() | |
{ | |
ivec4 v = ivec4([0, 1, 2, 3]); | |
writeln(v); | |
writeln(v.xyzw); | |
writeln(v.w); | |
writeln(v.stpq); | |
writeln(v.rgba); | |
v.xy = ivec2([7,8]); |
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 main() | |
{ | |
ivec4 v = ivec4([0, 1, 2, 3]); | |
writeln(v); | |
writeln(v.xyzw); | |
writeln(v.w); | |
writeln(v.stpq); | |
writeln(v.rgba); | |
v.xy = ivec2([7,8]); |
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
void main() | |
{ | |
import std.stdio; | |
(vec2(1,5)-ivec2(9,9)).writeln; | |
} | |
struct Vector(T, int N) | |
{ | |
import std.traits : CommonType, isNumeric; | |
T[N] data; |
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 main() | |
{ | |
string list = "3, 5, 1, , not a number, 100"; | |
import std.algorithm; | |
import std.string; | |
import std.conv; | |
import std.range : array; |
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 main() | |
{ | |
writeln("Hello 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
import std.stdio; | |
void main() { | |
writeln("Hello 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
import std.stdio; | |
void main() { | |
writeln("Hello There!"); | |
} |
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 main() | |
{ | |
string list = "3, 5, 1, , not a number, 100"; | |
import std.algorithm; | |
import std.string; | |
import std.conv; | |
import std.range : array; |