Skip to content

Instantly share code, notes, and snippets.

Sebastian Wilzbach wilzbach

Block or report user

Report or block wilzbach

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@wilzbach
wilzbach / main.d
Last active Jul 24, 2018
C++ Munich Meetup - D without a runtime
View main.d
int foo(int a, int b)
{
return (a % 3235272) % b;
}
int bar(int a)
{
return foo(a, 88);
}
@wilzbach
wilzbach / symbols.md
Last active Jul 17, 2018
RCString - affected symbols in Phobos
View symbols.md

RCString: List of symbols with potential shortcuts

std.algorithm.comparison

  • among
  • castSwitch
  • clamp
  • cmp
  • equal
@wilzbach
wilzbach / keybase.md
Last active Apr 2, 2018
Keybase verification:
View keybase.md

Keybase proof

I hereby claim:

  • I am wilzbach on github.
  • I am wilzbach (https://keybase.io/wilzbach) on keybase.
  • I have a public key ASCb_lSaTUIpgCkSWKavzANuc6EEcWTW9FGoWkETTizbKQo

To claim this, I am signing this object:

@wilzbach
wilzbach / joiner.d
Last active Feb 19, 2018
Performance benchmark of std.algorithm.iteration.joiner
View joiner.d
import std.range, std.traits;
import std.stdio;
private void doNotOptimizeAway(T)(auto ref T t)
{
import core.thread : getpid;
import std.stdio;
if(getpid() == 1) {
writeln(*cast(char*)&t);
}
@wilzbach
wilzbach / the-expressive-c17-coding-challenge-in-d.md
Created Feb 14, 2018
The Expressive C++17 Coding Challenge in D
View the-expressive-c17-coding-challenge-in-d.md
title layout date categories
The Expressive C++17 Coding Challenge in D
post
2018-02-13 08:48:57 -0800
d
tech

You might have seen that I have been coding a lot in D lately and as a few weeks ago there was the Expressive C++17 Coding Challenge with its solution in C++ and Rust now being public, I thought this is an excellent opportunity to show why I like D so much.

@wilzbach
wilzbach / tuple.d
Last active Feb 12, 2018
A stripped down version of std.typecons.Tuple
View tuple.d
alias Identity(alias A) = A;
template AliasSeq(TList...)
{
alias AliasSeq = TList;
}
template staticMap(alias F, T...)
{
static if (T.length == 0)
@wilzbach
wilzbach / lstlangd.tex
Created Dec 12, 2017
LaTeX D listing configuration
View lstlangd.tex
%% Listings definition for D programming language
%% Author : Jesse Phillips <Jesse.K.Phillips+D@gmail.com>
\lstdefinelanguage{D}{
% Keywords
morekeywords=[1]{
abstract, alias, align, assert, auto, body, break, cast, catch, class, const,
continue, debug, delegate, delete, deprecated, do, else, enum, export,
false, final, finally, for, foreach, foreach_reverse, function, goto, if,
immutable, import, in, inout, interface, invariant, is, lazy, macro, mixin,
@wilzbach
wilzbach / output.md
Last active Feb 11, 2019
Measure import time for each module in Phobos
View output.md
module bare import time
std.regex 1.04s
std.net.curl 0.29s
std.zip 0.19s
std.path 0.15s
std.socket 0.15s
std.file 0.14s
std.mmfile 0.14s
std.datetime 0.14s
@wilzbach
wilzbach / Makefile
Created Dec 2, 2017
Makefile with D compiler bootstrapping
View Makefile
DMD=bin/dmd2/linux/bin64/dmd
DMD_VERSION=2.074.0
LDC=bin/ldc2-$(LDC_VERSION)-linux-$(PLATFORM)/bin/ldc2
LDC_VERSION=1.2.0
DFLAGS=-g
PLATFORM=x86_64
################################################################################
# Auto-bootstrap DMD & LDC for outdated Debian/Ubuntu
################################################################################
@wilzbach
wilzbach / mangling.ipynb
Last active Jul 15, 2017
Comparison of symbol length between pr/5866 and master
View mangling.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
You can’t perform that action at this time.