Skip to content

Instantly share code, notes, and snippets.

@dwilliamson
dwilliamson / Doc.md
Last active April 23, 2023 14:17
Minimal Code Generation for STL-like Containers

This is my little Christmas-break experiment trying to (among other things) reduce the amount of generated code for containers.

THIS CODE WILL CONTAIN BUGS AND IS ONLY PRESENTED AS AN EXAMPLE.

The C++ STL is still an undesirable library for many reasons I have extolled in the past. But it's also a good library. Demons lie in this here debate and I have no interest in revisiting it right now.

The goals that I have achieved with this approach are:

@baldurk
baldurk / sourceindex.md
Last active November 12, 2025 00:21
Source indexing for github projects

Symbol Servers

I'm assuming you are familiar with symbol servers - you might not have one set up yourself for your own projects, but you probably use Microsoft's public symbol server for downloading symbols for system DLLs.

For your own projects it might be useful to set up a symbol server - I won't go into how you do that here since it's well documented elsewhere, but basically you just set up a folder somewhere - say X:\symbols\ or \servername\symbols or even http://servername.foo/symbols/ which has a defined tree structure:

symbols/
symbols/mymodule.pdb/
symbols/mymodule.pdb/123456789012345678901234567890122/
@SaschaWillems
SaschaWillems / gist:47be6970a3e99a3d30e1
Last active September 26, 2018 22:09
Intel Vulkan Mesa on Ubuntu 15.10
# Pre requisites
- Enable DRI3 as described in https://vulkan.lunarg.com/app/docs/v1.0.3.1/getting_started_linux
- Install a library for SHA, e.g. sudo apt-get install libgcrypt11-dev (if not already present)
- Otherwise the driver may throw an error with "_mesa_sha1_compute" when loading SPIR-V shaders
# Building
- Clone Mesa Master : git clone git://anongit.freedesktop.org/mesa/mesa -b Master
- cd mesa
- autoreconf -vfi
- ./configure --with-dri-drivers=i965 --with-gallium-drivers= --with-sha1= --with-vulkan-drivers=intel
@pervognsen
pervognsen / mu.cpp
Last active May 18, 2025 16:15
Mu as of the second stream
#include "mu.h"
#define _CRT_SECURE_NO_WARNINGS
#include <malloc.h>
#define _USE_MATH_DEFINES
#include <math.h>
#define _NO_CRT_STDIO_INLINE
#include <stdio.h>
#include <stdarg.h>
#define NO_STRICT
#include <stdio.h>
#include <errno.h>
#include <stdlib.h>
#include <stdint.h>
#include <assert.h>
#include <string.h>
#define streq(a, b) (!strcmp((a), (b)))
#ifndef __USE_GNU
#define __USE_GNU
@FelixK15
FelixK15 / find_visual_studio_installation.bat
Last active June 18, 2018 11:14
Find Visual Studio installation path with visual studio
@echo off
echo Searching for Visual Studio installation...
setlocal enableextensions enabledelayedexpansion
set FOUND_PATH=0
set VS_PATH=
::check whether this is 64bit windows or not
reg Query "HKLM\Hardware\Description\System\CentralProcessor\0" | find /i "x86" > NUL && set OS=32BIT || set OS=64BIT
IF %OS%==64BIT set REG_FOLDER=HKLM\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\SxS\VS7
extern "C" char* dtoa_simple(double value, char* dest, int size)
{
// NOTE: Very bare bones and inaccurate for very big numbers due to floating point inaccuracies dividing by 10
// Requires BigInt support to handle correctly!
char* destret = dest;
char* destend = dest + size;
// Negate and add prefix for negative numbers
if (value < 0)
var tab_mem_hand8 = {
set: function(obj, prop, value) {
if (prop > (22 << 3) && prop <= (23 << 3)) {
debugger;
}
obj[prop] = value;
}
};
var tab_mem_hand16 = {
section 'interface' do
export do
case get_target_platform
when :win32
import 'platform/win32/mssdk'
add_cpp_define 'CURL_STATICLIB'
add_cpp_define 'CURL_DISABLE_LDAP'
else
raise 'Unupported platform!'
end
@djg
djg / reading-list.md
Last active March 21, 2025 08:41
Fabian's Recommened Reading List