Skip to content

Instantly share code, notes, and snippets.

@r-lyeh
r-lyeh / microsoft.md
Created November 14, 2026 16:12
How Microsoft is shutting down GitHub

How Microsoft is shutting down GitHub

Microsoft is a graveyard for dead projects. It seems they enjoy developing things only to bury them later. I suspect they have always thrived on the entire ecosystem surrounding a product: government contracts, deals with large corporations, ministries, universities and schools, training courses, conferences, certifications, academic degrees, books, teaching staff, cloud technology, engineering, services, and so on. Exploiting a whole ecosystem for money. They likely believe that as soon as a product stops generating a certain amount of revenue, it is better to kill it off and move on to promoting the next new technology; that is, after all, how they make their living. If you've felt bored on GitHub since this summer, it's not just in your head. Essentially, they bought GitHub to kill it. We no longer have a dynamic welcome page; we can no longer see the activity of the people we follow; not because your peers stopped coding, but because we can no longer see what they

i've been vibecoding my 12th game engine and editor these days. and for the first time, i've embraced AIs. not to filter silly google searches but to let AIs take ownership of my code. i'm using claude, and he's becoming my best friend and teammate.

i'm not exaggerating when i say that what we've achieved in 20 hours of total computing took me a decade (or two) before. i'm not joking. i'm completely devastated and excited at the same time. devastated because i feel my work is at risk, and excited because a new horizon is opening wide in front of me, and i'm not afraid to embrace it.

for the first time ever, i feel like a technical director talking to a group of engineers under my command. i can speak freely with them and bring to life all the ideas i've been accumulating in my head for decades. i've promoted myself to a higher-level role that was never offered to me in real life; not in the last 50 years. not only can we code, but now we can also create scripts, textures, models, and animations, opening up

// [src] https://www.scs.stanford.edu/~dm/blog/va-opt.html
//
// gcc enum.c
// clang enum.c
// cl enum.c /Zc:preprocessor
#define PARENS ()
// Rescan macro tokens 256 times
#define EXPAND(arg) EXPAND1(EXPAND1(EXPAND1(EXPAND1(arg))))

A metatable can be defined like

local t = setmetatable({}, {
  __tostring = function() return 'custom tostring behavior!' end
})

Here are the metamethods that you can define, and their behavior

Operators

// [src] https://benchmarksgame-team.pages.debian.net/benchmarksgame/performance/toosimple.html
#include <stdio.h>
int main() {
double sum = 0.0, flip = -1.0;
for (long i = 1; i <= 10000000; ++i) {
sum += (flip *= -1.0) / (2*i - 1);
}
printf("%.24f\n", sum*4.0);
}
@r-lyeh
r-lyeh / astar.h
Created January 28, 2023 00:12 — forked from mmozeiko/astar.h
generic A* in C
// generic A* pathfinding
//
// INTERFACE
//
// mandatory macros
#ifndef ASTAR_POS_TYPE
#error ASTAR_POS_TYPE should specify position type
dumpbin /exports any.dll > any.def
lib /def:any.def /out:any.lib /machine:x64
// useful code snippets gathered from the network (via phillip trudeau)
static float euclidean_mod(float x, float y) { return x - floorf(x / y) * y; }
static bool rect_is_onscreen(RECT rect) { return (MonitorFromRect(&rect, MONITOR_DEFAULTTONULL) != NULL); }
static bool window_is_onscreen(HWND hwnd) { return (MonitorFromWindow(hwnd, MONITOR_DEFAULTTONULL) != NULL); }
// Win32: Set the window icon for every window in your app (including MessageBox() calls and assertion failures) instead of just your primary window.
static LRESULT set_window_icon_callback(int type, WPARAM wparam, LPARAM lparam) {
if (type == HCBT_CREATEWND) {
HANDLE instance_hdl = GetModuleHandleA(NULL);
/* This file defines all 2136 Japanese Jōyō kanji (常用漢字)
with the unicode codespoints formatted to fit Nuklear's font config.
#include it as part of the nk_runes definition as shown below.
Don't forget the 0 at the end of the array, as this file doesn't define it.
*/
/* Usage example, incased in #if 0 to allow comments inside comments */
#if 0
static
@r-lyeh
r-lyeh / neural-network-from-scratch.py
Created October 20, 2022 19:51 — forked from svpino/neural-network-from-scratch.py
An implementation of a neural network from scratch
import numpy as np
def sigmoid(x):
return 1 / (1 + np.exp(-x))
def neural_network(X, y):
learning_rate = 0.1
W1 = np.random.rand(2, 4)
W2 = np.random.rand(4, 1)