Skip to content

Instantly share code, notes, and snippets.

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:
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;
///
@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");
/// 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 / 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();
}
///
module engine.math.vector;
import std.traits : isBasicType, isFloatingPoint;
struct Vector(Type, size_t Dimension)
if ((isBasicType!Type || isFloatingPoint!Type) && Dimension > 0) {
nothrow:
private {
import simd = core.simd;
@rikkimax
rikkimax / patch.diff
Created December 26, 2017 12:37
drag&drop for dplug:window X11+WinAPI
From 5d08d297b12a2d4374a22e1515f72e68b6f990ba Mon Sep 17 00:00:00 2001
From: rikki cattermole <[email protected]>
Date: Mon, 18 Dec 2017 00:40:09 +1300
Subject: [PATCH] Windows & X11 support for drag&drop
---
examples/window/main.d | 25 +++-
gui/dplug/gui/graphics.d | 10 ++
window/dplug/window/win32window.d | 59 ++++++++-
window/dplug/window/window.d | 6 +

The language is composed of types, literals and statements. Types are a definition of what a literal can be.

Literals are:

- Number
- String
- Function body with prototype
- Reference to variable
- Initialized template
- Comment
@rikkimax
rikkimax / Tasks.md
Last active May 5, 2018 10:44
dmd as a library task list
  • Move into a utility sub package:
    • dmd.console
    • dmd.entity
    • dmd.utf
    • dmd.root.array
    • dmd.root.hash
    • dmd.root.outbuffer
    • dmd.root.stringtable
  • dmd.errors
  • Make wrappers switch to D's variadic arguments
struct MyRange<Type> {
@property {
Type delegate() front;
bool delegate() empty;
}
void delegate() popFront;
@implicit static auto opCall(T)(T from) {
MyRange!(Type: T.Type) ret;