Skip to content

Instantly share code, notes, and snippets.

View SSoulaimane's full-sized avatar

سليمان السهمي (Suleyman Sahmi) SSoulaimane

  • المغرب (Morocco)
View GitHub Profile
@SSoulaimane
SSoulaimane / dmd-glue-temporaries.md
Last active November 17, 2019 08:09
Audit report of temporaries created in the glue layer in DMD compiler

Audit of temporaries created in the glue layer in DMD compiler

Temporaries which may need to invoke the copy or move constructor or the postblit but do not currently do so:

Legend:

  • s: created with a call to symbol_genauto()
  • c: created with a call to el_copytotmp() or exp2_copytotemp()
  • m: created with a call to el_same()
  • a: created with a call to addressElem()
  • e: created with a call to ExpressionsToStaticArray()
@SSoulaimane
SSoulaimane / dmd-glue-temporaries.md
Created November 11, 2019 02:52
Audit report of temporaries created in the glue layer in DMD compiler

Audit of temporaries created in the glue layer in DMD compiler

Temporaries which may need to invoke the copy or move constructor or the postblit but do not currently do so:

Legend:

  • s: created with a call to symbol_genauto()
  • c: created with a call to el_copytotmp() or exp2_copytotemp()
  • m: created with a call to el_same()
  • a: created with a call to addressElem()
  • e: created with a call to ExpressionsToStaticArray()
@SSoulaimane
SSoulaimane / pacman_sudo.d
Last active November 20, 2017 21:22
Smart sudo for archlinux' pacman. (use sudo (only) for operations that need root privilege, mainly {-S,-R,-U})
#!/usr/bin/rdmd
import std.getopt;
import std.process;
string[] removeArgInPlace(string[] args, string which)
{
import std.algorithm : startsWith, stripLeft;
which = which.stripLeft('-');
<?xml version="1.0" encoding="UTF-8"?>
<CITIES xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="MoroccoCities.xsd">
<CITY>
<name_ar>أكادير</name_ar>
<name_fr>Agadir</name_fr>
<sealevel>200</sealevel>
<longitude>-9.6166666666666671</longitude>
<latitude>30.416666666666668</latitude>
</CITY>
<CITY>