Skip to content

Instantly share code, notes, and snippets.

Profiling Mono-D git debug build (aborted before Mono-D finished)
Mono log profiler data
Profiler version: 0.4
Data version: 4
Mean timer overhead: 88 nanoseconds
Program startup: Tue Feb 26 13:55:27 2013
Program ID: 17730
Server listening on: 55643
@simendsjo
simendsjo / si.d
Created December 2, 2011 19:18
siunit
import std.traits, std.stdio, std.conv;
void main() {
auto f = feet(10);
auto m = meter(10.0); // kan fint bruke desimaltall
// en type til en annen - konvertering
auto feetMeter = f + m;
assert( feetMeter.siunit == "feet" );
assert( feetMeter >= feet(42.808) &&
/* Written in the D Programming Language (D2)
*
* http://projecteuler.net/index.php?section=problems&id=1
*
* If we list all the natural numbers below 10 that are multiples of 3 or 5, we
* get 3, 5, 6 and 9. The sum of these multiples is 23.
*
* Find the sum of all the multiples of 3 or 5 below 1000.
*/