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
#include <X11/Xlib.h> | |
#include <X11/Xatom.h> | |
#include <stdio.h> | |
#define DEFINE_ATOM(n) Atom n = XInternAtom(d, ""#n, False); printf("%s is %ld(0x%lx)\n", ""#n, n, n); | |
#define DEFINE_ATOM2(n, m) Atom n = XInternAtom(d, m, False); printf("%s(%s) is %ld(0x%lx)\n", ""#n, m, n, n); | |
int main(void){ | |
Display* 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
// Example program: | |
// Using SDL2 to create an application window | |
#include <SDL2/SDL.h> | |
#include <stdio.h> | |
int main(string[] args) { | |
SDL_Window *window; // Declare a pointer |
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
diff --git a/source/dpp/runtime/app.d b/source/dpp/runtime/app.d | |
index 8e79a82..7fc8f05 100644 | |
--- a/source/dpp/runtime/app.d | |
+++ b/source/dpp/runtime/app.d | |
@@ -54,8 +54,24 @@ void preprocess(File)(in from!"dpp.runtime.options".Options options, | |
// write preamble code | |
outputFile.writeln(preamble); | |
+ import std.file: exists, isFile; | |
+ auto cacheFileName = outputFileName ~ ".cache-dpp"; |
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
/// unnecessary_link_main.d | |
void main(){ | |
immutable genFoo(){ | |
import unnecessary_link_lib; | |
return genFooImpl; | |
} | |
immutable foo = genFoo(); | |
pragma(msg, foo); | |
} |
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
// Compile Time D-man Locomotive | |
// https://qiita.com/dragoon2014/items/2217ab9578c875ecdf69 | |
import std.meta; | |
import std.range; | |
import std.algorithm; | |
const int w = 70; | |
const int p = 10; | |
const int delay = 100; |
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
hoge |
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
foo | |
bar |