Skip to content

Instantly share code, notes, and snippets.

@rikkimax
rikkimax / include_foo.di
Last active April 3, 2017 12:25
``dmd -lib source/foo.d ; dmd test.d foo.lib -Iinclude``
module foo;
class Foo {
int bar();
}
/// From http://www.delorie.com/djgpp/doc/exe/ and winnt.h
module definitions.msdos;
import std.experimental.allocator : IAllocator, make, makeArray, dispose;
///
final class MSDOS_Header {
private {
IAllocator allocator;
}
@rikkimax
rikkimax / app.d
Last active February 23, 2017 13:19
import std.stdio : writeln;
import std.file : write;
void main() {
import std.file : chdir, tempDir, remove, rmdirRecurse, isDir, mkdirRecurse, exists;
import std.process : thisProcessID;
import std.path : buildPath;
import std.conv : text;
chdir("testbed");
This file has been truncated, but you can view the full file.
/**
* This is a set of OpenGL bindings.
*
* Generated by ./ogl_gen ....
* Do not modify. Regenerate if changes are required.
*/
module opengl.bindings;
import std.traits : Unqual;
///
Performing "debug" build using dmd for x86.
std-experimental-xml ~master: target for configuration "library" is up to date.
ogl_gen ~master: target for configuration "application" is up to date.
To force a rebuild of up-to-date targets, run again with --force.
Running .\ogl_gen.exe
Families:
- man4/glActiveShaderProgram.xml[glActiveShaderProgram]
Copyright: Khronos Group 2010-2014
Paramater documentation:
struct Experiments {
Experiment[] sets;
}
struct Experiment {
string fileName;
string endCondition;
Variation[] variations;
bool doesTurtlesMove;
}
var color;
def init(myColor) {
color = myColor;
}
def draw() {
var startx, starty, endx, endy;
startx = Widget.x;
starty = Widget.y;
Building package alphacodegen:lang_d in /home/rikki/projects/alphacodegen/
Performing "unittest" build using dmd for x86_64.
pegged 0.3.2: target for configuration "library" is up to date.
alphacodegen:lang_d ~master: building configuration "application"...
Linking...
module diff;
struct Diff {
import std.utf : validate;
import std.experimental.allocator : IAllocator, dispose, makeArray, expandArray;
bool treatingAsBinary;
ubyte[] diff;
module dcf.phase1;
import std.range.interfaces : InputRange;
final class DCFPhase1 : InputRange!char {
private {
InputRange!char source;
char next;
byte bufLeft;