Skip to content

Instantly share code, notes, and snippets.

View John-Colvin's full-sized avatar

John Colvin John-Colvin

  • Wiltshire, UK
  • 13:59 (UTC +01:00)
View GitHub Profile
@nikibobi
nikibobi / moduleimport.md
Last active March 5, 2019 16:54
D module import tips

Module imports

When declaring imports follow the following convention:

  1. Specify the module name module fancymodule.functions;
  2. Import all std modules import std.stdio;
  3. Import all external library modules import dsfml.system;
  4. Import all modules part of your project import fancymodule.actions;
  • Have a module named all that only publicly imports all of your library's modules:
@JesseKPhillips
JesseKPhillips / osmpbfexample.d
Last active November 30, 2017 19:55
This gives a very basic parsing of osm.pbf files.
/**
* Explaination comments taken from:
* http://wiki.openstreetmap.org/wiki/PBF_Format#Design
*
* This gives a very basic parsing of osm.pbf files. The purpose was several
* fold.
*
* - Read PBF files
* - Learn the file layout
* - Verify the bytes match