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
/* -------------------------------------------------------------------------- */ | |
version (X86): | |
import Std_; | |
import C_ = coretypes : Valº_ = Valº; | |
import Ir_ = intermediate; | |
import Rt_ = runtime : Rtº_ = RuntimeStateº; |
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.meta; | |
import std.traits; | |
import std.stdio; | |
class Fooº { | |
@Dynamic void a() {writeln(`hello from a()`);}; | |
@Dynamic void b() {writeln(`hello from b()`);}; | |
@Dynamic void c() {writeln(`hello from c()`);}; |
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
enum StrZ(alias S) = S~'\0'; | |
alias Cdeclº(Rº, Pº...) = extern(C) Rº function(Pº); | |
alias Stdcallº(Rº, Pº...) = extern(Windows) Rº function(Pº); | |
auto cinvoke(wstring LibName, string FuncName, Rº = void, Pº...)(Pº Params) { | |
alias Ptr = LibSymPtr!(LibName, FuncName); | |
assert(Ptr !is null); | |
return (cast(Cdeclº!(Rº, Pº)) Ptr)(Params); | |
}; |
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
Toº raw_cast(Toº, Fromº)(auto ref Fromº X) @trusted if (Toº.sizeof == Fromº.sizeof) { | |
return *(cast(Toº*) &X); | |
}; | |
unittest { | |
auto foo = raw_cast!int(66.3f); | |
auto baz = raw_cast!(ubyte[size_t.sizeof])(new class {}); | |
static assert(!__traits(compiles, { | |
auto bad = raw_cast!(ubyte[9])(new class {}); | |
})); |
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
.\digger -c build.components.dmd.debugDMD=true build --model=64 "master" | |
.\digger test --model=64 | |
... runnable\template6.d (-inline -release -g -O) | |
... runnable\template8.d () | |
... runnable\template9.d () | |
... runnable\test10.d (-inline -release -g -O) | |
... runnable\test10378.d (-inline -release -g -O) | |
... runnable\test10441.d (-inline -release -g -O) | |
... runnable\test10573.d (-inline -release -g -O) |
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
C:\diggermaster\repo [master ≡ +0 ~3 -0 !]> git show | |
commit 5f806705bb1138622a95cb04f7d3a4f3ba66571c | |
Author: Andrei Alexandrescu <andrei@erdani.com> | |
Date: Tue Aug 23 11:13:52 2016 -0400 | |
dlang.org: Merge pull request #1443 from dlang/revert-1363-kill_disqus | |
https://github.com/D-Programming-Language/dlang.org/pull/1443 | |
Revert "Kill disqus" |
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
window.document.querySelector(":root > deck").style.filter = "invert(100%) hue-rotate(180deg) contrast(80%) brightness(130%)"; |
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
pragma(msg, ( | |
if( | |
-1 == ubyte.max : 7, | |
false : 8 | |
else 9 | |
), | |
if(else `aaa`), |
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
struct Poison { | |
@disable this(); | |
@disable this(this); | |
@disable this(typeof(this)); | |
@disable void opAssign(in ref typeof(this)); | |
} |
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
var mainWindow = window.QueryInterface(Components.interfaces.nsIInterfaceRequestor) | |
.getInterface(Components.interfaces.nsIWebNavigation) | |
.QueryInterface(Components.interfaces.nsIDocShellTreeItem) | |
.rootTreeItem | |
.QueryInterface(Components.interfaces.nsIInterfaceRequestor) | |
.getInterface(Components.interfaces.nsIDOMWindow); |
OlderNewer