- New GC is available generally, since July
- Support matrix
| Arch | OS | Compiler | symgc included |
|---|---|---|---|
| X86-64 | Linux | ldc-1.41.0-symgc5 | Yes |
| auto stackFrame(T)(T rng) | |
| { | |
| static struct Apply | |
| { | |
| import std.range; | |
| T rng; | |
| int opApply(scope int delegate(ElementType!T) dg) { | |
| foreach(e; rng) { | |
| if(auto r = dg(e)) | |
| return r; |
| mixin template D1Ops() { | |
| // binary operations | |
| static foreach(op, d1; | |
| ["+" : "opAdd", "-" : "opSub", "*" : "opMul", "/" : "opDiv", | |
| "%" : "opMod", "&" : "opAnd", "^" : "opXor", "|" : "opOr", | |
| "<<" : "opShl", ">>" : "opShr", ">>>" : "opUShr", "~" : "opCat", | |
| "in" : "opIn"]) { | |
| static if(__traits(hasMember, typeof(this), d1)) | |
| alias opBinary(string s : op) = mixin(d1); | |
| // _r version |
| import sqlbuilder.uda; | |
| import sqlbuilder.dataset; | |
| import sqlbuilder.dialect.sqlite; | |
| // Note all of these are sql-injection-proof | |
| struct users | |
| { | |
| @primaryKey @autoIncrement int id; // a non-unique primary key doesn't make sense | |
| string name; |
Major topics discussed during BeerConf September 2020 edition
__totype(string) (dlang/dmd#11797)
Points raised in objection to the feature are:(General conversation about science fiction books, genres, and authors)
| import iopipe.bufpipe; | |
| import iopipe.textpipe; | |
| import iopipe.json.serialize; | |
| import iopipe.json.parser; | |
| import iopipe.json.dom; | |
| import std.io; | |
| import std.typecons; | |
| import std.datetime; | |
| import std.conv; |
| template NewFilter(alias pred, T...) | |
| { | |
| import std.meta : AliasSeq; | |
| static if(T.length == 1) | |
| { | |
| static if(pred!T) | |
| alias NewFilter = AliasSeq!(T); | |
| else | |
| alias NewFilter = AliasSeq!(); | |
| } |
| import std.range; | |
| struct StackFrame(T) | |
| { | |
| StackFrame* prev; | |
| T range; | |
| } | |
| struct StackRange(T, alias recurse) if (isInputRange!(typeof(recurse(T.init)))) | |
| { |
| import std.stdio; | |
| import vibe.d; | |
| import graphql.parser; | |
| import graphql.builder; | |
| import graphql.lexer; | |
| import graphql.ast; | |
| import graphql.helper; | |
| import graphql.schema; | |
| import graphql.traits; |
| import std.algorithm; | |
| void main(string[] args) | |
| { | |
| import std.stdio; | |
| // args[0] is the program name, args[1] through args[n] are the input strings. | |
| // first validate the input | |
| auto input = args[1 .. $]; | |
| foreach(i; 1 .. input.length) | |
| { |