Skip to content

Instantly share code, notes, and snippets.

Avatar
😸
Herding cats

Stephen Gutekanst slimsag

😸
Herding cats
View GitHub Profile
View macos.txt
macOS frame rate of a simple triangle example
starts with vsync enabled and then disabled vsync (printed).
The FPS is printed once every 0.25s
FPS: 60
FPS: 60
FPS: 59
FPS: 61
FPS: 60
@slimsag
slimsag / ports--libyuv--fix_cmakelists.patch
Created December 20, 2022 06:19
vcpkg libyuv arm64 patch
View ports--libyuv--fix_cmakelists.patch
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ed4948f..5b4e112 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2,10 +3,15 @@
# Originally created for "roxlu build system" to compile libyuv on windows
# Run with -DTEST=ON to build unit tests
 
-PROJECT ( YUV C CXX ) # "C" is required even for C++ projects
CMAKE_MINIMUM_REQUIRED( VERSION 2.8 )
@slimsag
slimsag / README.md
Last active December 6, 2022 20:59
k3d start Sourcegraph+helm cluster
View README.md

If existing already, delete the default k3d cluster:

k3d cluster delete

Start a k3d cluster and port forward the loadbalancer:

k3d cluster create -p "30080:80@loadbalancer"
@slimsag
slimsag / README.md
Created December 6, 2022 01:31
k3d start sourcegraph cluster
View README.md

If existing already, delete the default k3d cluster:

k3d cluster delete

Start a k3d cluster and port forward the loadbalancer:

k3d cluster create -p "30080:80@loadbalancer"
@slimsag
slimsag / README.md
Created December 2, 2022 06:17
mini server
View README.md
OS Arch Model CPU RAM Storage
macOS arm64 2020 Mac Mini Apple Silicon M1 8 core 3.2ghz 8GB 512G SSD
macOS x86 Late 2014 Mac Mini Intel i7 8 core 3ghz 16GB 256G SSD
linux x86 Beelink GTR5 5900HX Ryzen 9 5900HX 8 core 4.6ghz 32GB 512G SSD
windows x86 Beelink GTR5 5900HX Ryzen 9 5900HX 8 core 4.6ghz 32GB 512G SSD
windows arm64 Windows Dev Kit 2023 Snapdragon 8cx Gen 3, 8 core ~3ghz 32GB 512G SSD
linux arm64 Radxa ROCK pi 5B RK3588 8 core ~2.4ghz 16G 512G SSD
  • Case: KENUCO SOHO Mini 10" Rack
@slimsag
slimsag / README.md
Last active September 18, 2022 17:48
Proprietary mesh triangulation in open source software
View README.md

Proprietary mesh triangulation in open source software?

Recently I was looking for a solid, reliable way to do path triangulation. Looking at state-of-the-art research, I came across the UC Berkley researcher Jonathan Shewchuk's outstanding Triangle library.

Jonathan is very clear on the Triangle website, and in source code, about the project not being open-source:

This program may be freely redistributed under the condition that the copyright notices (including this entire header and the copyright notice printed when the `-h' switch is selected) are not removed, and no compensation is received. Private, research, and institutional use is free.

@slimsag
slimsag / ramblings.md
Last active March 15, 2023 03:48
Because cross-compiling binaries for Windows is easier than building natively
View ramblings.md

Because cross-compiling binaries for Windows is easier than building natively

I want Microsoft to do better, want Windows to be a decent development platform-and yet, I constantly see Microsoft playing the open source game: advertising how open-source and developer friendly they are - only to crush developers under the heel of the corporate behemoth's boot.

The people who work at Microsoft are amazing, kind, talented individuals. This is aimed at the company's leadership, who I feel has on many occassions crushed myself and other developers under. It's a plea for help.

The source of truth for the 'open source' C#, C++, Rust, and other Windows SDKs is proprietary

You probably haven't heard of it before, but if you've ever used win32 API bindings in C#, C++, Rust, or other languages, odds are they were generated from a repository called microsoft/win32metadata.

View gist:7693afaf9676bead77950446a66c9573
slimsag@hexopsblade15:~/Desktop/beyang/symf$ CGO_ENABLED=1 GOOS=darwin GOARCH=amd64 CC='zcc' CXX='zxx' go build -ldflags='-extldflags=-F/home/slimsag/Desktop/beyang/symf/sdk-macos-12.0/root/System/Library/Frameworks' -o test ./cmd/symf
# github.com/sourcegraph/symf/cmd/symf
warning: unsupported linker arg: -headerpad
warning: unsupported linker arg: 1144
warning: unsupported linker arg: -no_pie
warning: unsupported linker arg: -pagezero_size
warning: unsupported linker arg: 4000000
warning: unsupported linker arg: --compress-debug-sections
warning: unsupported linker arg: zlib-gnu
@slimsag
slimsag / args
Created February 20, 2022 01:58
View args
C:\Users\slimsag\Desktop\zig\zig-out\bin\zig.exe build-lib C:\Users\slimsag\Desktop\mach2\gpu-dawn\src\dawn\dummy.zig -lc++ C:\Users\slimsag\Desktop\mach2\gpu-dawn\zig-cache\o\6bc980b450b4b05fab4cd621a1ba86cd\glfw.lib -lc -lgdi32 -cflags -g1 -std=c++17 -DDAWN_ENABLE_BACKEND_NULL -DDAWN_ENABLE_BACKEND_D3D12 -IC:\Users\slimsag\Desktop\mach2\gpu-dawn/libs/mach-glfw/upstream/glfw/include -IC:\Users\slimsag\Desktop\mach2\gpu-dawn/libs/dawn/out/Debug/gen/include -IC:\Users\slimsag\Desktop\mach2\gpu-dawn/libs/dawn/out/Debug/gen/src -IC:\Users\slimsag\Desktop\mach2\gpu-dawn/libs/dawn/include -IC:\Users\slimsag\Desktop\mach2\gpu-dawn/libs/dawn/src -D_DEBUG -D_MT -D_DLL -- C:\Users\slimsag\Desktop\mach2\gpu-dawn\src\dawn\dawn_native_mach.cpp -cflags -IC:\Users\slimsag\Desktop\mach2\gpu-dawn/libs/dawn/src -g1 -std=c++17 -- C:\Users\slimsag\Desktop\mach2\gpu-dawn\libs\dawn\src\dawn\common\Assert.cpp C:\Users\slimsag\Desktop\mach2\gpu-dawn\libs\dawn\src\dawn\common\DynamicLib.cpp C:\Users\slimsag\Desktop\mach2\gpu-dawn\li