Skip to content

Instantly share code, notes, and snippets.

View edg-l's full-sized avatar
🪨
making compilers

Edgar edg-l

🪨
making compilers
View GitHub Profile
@edg-l
edg-l / egl-version-negotiation.patch
Created August 5, 2026 19:21
ddnet #12467: EGL backend GL version negotiation
diff --git a/src/engine/client/backend_egl.cpp b/src/engine/client/backend_egl.cpp
index 2d942a405..906487bc1 100644
--- a/src/engine/client/backend_egl.cpp
+++ b/src/engine/client/backend_egl.cpp
@@ -432,6 +432,7 @@ int CGraphicsBackend_EGL::InitOpenGL(int Width, int Height, int Flags, IStorage
}
int InitError = 0;
+ const char *pErrorStr = nullptr;
{
@edg-l
edg-l / 12467-ci-glew-fix.patch
Created August 1, 2026 10:23
ddnet PR #12467: fix map_render GLEW/CI build + InitError==-2 shutdown crash
diff --git a/CMakeLists.txt b/CMakeLists.txt
index da16f4905..a509c9961 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3190,7 +3190,7 @@ if(TOOLS)
endif()
if(TOOL MATCHES "^map_render$")
list(APPEND TOOL_INCLUDE_DIRS ${PNG_INCLUDE_DIRS} ${FREETYPE_INCLUDE_DIRS} ${GLEW_INCLUDE_DIRS})
- list(APPEND TOOL_DEPS $<TARGET_OBJECTS:engine-gfx>)
+ list(APPEND TOOL_DEPS $<TARGET_OBJECTS:engine-gfx> ${GLEW_DEP})
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>compare ; feat/import-bench-bal-tooling@02a5663c vs perf/bal-lazy-cursor@bc56bf83</title>
<script src="https://cdn.plot.ly/plotly-2.35.2.min.js"></script>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
@edg-l
edg-l / gas_tracer.md
Last active May 13, 2026 15:46
Gas Tracer

title: Structured Gas Trace Format description: JSON-lines trace events for individual gas charges, refunds, and dimensional transfers author: Edgar Luque (@edgl) discussions-to: https://ethereum-magicians.org/t/ status: Draft type: Standards Track category: Interface created: 2026-05-13 requires: 3155, 7778, 8037

global _start
section .text
stdout equ 1
_start:
mov r8, 1 ; initial line length
mov r9, 0 ; chars written
mov rdx, buffer
#![deny(clippy::all)]
#![deny(clippy::nursery)]
#![allow(clippy::cast_possible_truncation)]
use std::{
collections::hash_map::RandomState,
hash::{BuildHasher, Hash, Hasher},
};
#[derive(Debug, Clone)]
/*
aprilFools.css
Written by Wes Bos
I assume no responsibility for angry co-workers or lost productivity
Put these CSS definitons into your co-workers Custom.css file.
They will be applied to every website they visit as well as their developer tools.
*/
@edg-l
edg-l / day2b.rs
Last active December 2, 2021 08:56
aoc2021 day 2 b in rust
use std::{
fmt::{self, write},
str::FromStr,
};
#[derive(Debug, Clone)]
struct ParseError(String);
impl fmt::Display for ParseError {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
@edg-l
edg-l / build-ddnet-clang.sh
Created September 6, 2021 14:22
my build script for developing ddnet
rm -rf build
mkdir -p build
cd build
export CC=/usr/bin/clang
export CXX=/usr/bin/clang++
cmake .. -GNinja -DMYSQL=ON -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DVIDEORECORDER=ON -DDOWNLOAD_GTEST=ON \
-D_CMAKE_TOOLCHAIN_PREFIX=llvm-
ninja
@edg-l
edg-l / .psqlrc
Created November 18, 2020 13:04
psql config
\set QUIET 1
\timing
\x auto
\set PROMPT1 '%[%033[1m%]%M %n@%/%R%[%033[0m%]%# '
\set PROMPT2 '[more] %R > '
\pset null '[NULL]'
\set VERBOSITY verbose
\set HISTFILE ~/.psql_history- :DBNAME
\set HISTCONTROL ignoredups
\set COMP_KEYWORD_CASE upper