Skip to content

Instantly share code, notes, and snippets.

View Techcable's full-sized avatar
🇺🇸
Procrastinating

Techcable

🇺🇸
Procrastinating
View GitHub Profile
@pizlonator
pizlonator / pizlossafull.md
Last active July 24, 2025 04:39
How I implement SSA form

This document explains how I would implement an SSA-based compiler if I was writing one today.

This document is intentionally opinionated. It just tells you how I would do it. This document is intended for anyone who has read about SSA and understands the concept, but is confused about how exactly to put it into practice. If you're that person, then I'm here to show you a way to do it that works well for me. If you're looking for a review of other ways to do it, I recommend this post.

My approach works well when implementing the compiler in any language that easily permits cyclic mutable data structures. I know from experience that it'll work great in C++, C#, or Java. The memory management of this approach is simple (and I'll explain it), so you won't have to stress about use after frees.

I like my approach because it leads to an ergonomic API by minimizing the amount of special cases you have to worry about. Most of the compiler is analyses and transformations ov

@pizlonator
pizlonator / pizlossa.md
Last active July 20, 2025 07:52
Pizlo SSA Form (short version)

Here's a much more complete description of how I do SSA, beyond just how I do Phis.

This describes how I do SSA form, which avoids the need to have any coupling between CFG data structures and SSA data structures.

Let's first define a syntax for SSA and some terminology. Here's an example SSA node:

A = Add(B, C)

In reality, this will be a single object in your in-memory representation, and the names are really addresses of those objects. So, this node has an "implicit variable" called A; it's the variable that is implicitly assigned to when you execute the node. If you then do:

@LambdAurora
LambdAurora / optifine_alternatives_fabric.md
Last active May 29, 2025 16:32
Recommended OptiFine alternatives on Fabric

The list is moving out!

If you share this list, please use this link instead: https://lambdaurora.dev/optifine_alternatives

It may still be only a redirection link, but it will have a better web display of the list soon. And the list being on GitHub/GitHub pages improves load times.

The gist version of this list will stop being updated.

Why?

@kabili207
kabili207 / Rclone systemd service.md
Last active July 21, 2025 23:00
Rclone systemd user service

rclone systemd service

Preparation

This service will use the same remote name you specified when using rclone config create. If you haven't done that yet, do so now.

Next, create the mountpoint for your remote. The service uses the location ~/mnt/<remote> by default.

mkdir ~/mnt/dropbox
@jfcherng
jfcherng / st4-changelog.md
Last active May 30, 2025 15:19
Sublime Text 4 changelog just because it's not on the official website yet.
@AnatomicJC
AnatomicJC / android-backup-apk-and-datas.md
Last active July 22, 2025 19:25
Backup android app, data included, no root needed, with adb

Backup android app, data included, no root needed, with adb

Note: This gist may be outdated, thanks to all contributors in comments.

adb is the Android CLI tool with which you can interact with your android device, from your PC

You must enable developer mode (tap 7 times on the build version in parameters) and install adb on your PC.

Don't hesitate to read comments, there is useful tips, thanks guys for this !

@kearlsaint
kearlsaint / Pulse_SMSBackup.js
Last active October 27, 2019 12:47
Snippet of code to create a full XML backup of messages from Pulse Messenger
/*!
*
* Snippet of code to create a full XML backup of messages from Pulse Messenger
* https://github.com/klinker-apps/messenger-desktop
*
* This code utilizes the webapp's core functions.
*
* Instructions
* 1. Log into https://messenger.klinkerapps.com
* 2. Wait for the UI to load your conversations
@glampert
glampert / stack_machine.cpp
Created March 22, 2017 17:59
1-register stack caching test for stack-based interpreters.
//
// Simple stack-based virtual machine tests.
//
// I use two slightly different strategies to manage the
// interpreter stack: First is using the "naive" approach
// of keeping a stack pointer that is bumped/decremented
// for every instruction that has stack operands. The second
// approach uses a "stack cache" register to cache the
// Top-of-Stack (TOS) value.
//
yamlScalar ::= VALUE
yamlFile ::= yamlDocument*
yamlDocument ::= DOCUMENT_START yamlContent* DOCUMENT_END | DOCUMENT_START yamlContent* | yamlContent*
yamlContent ::= yamlBlock | COMMENT
yamlBlock ::= yamlMap | yamlSequence
yamlMap ::= yamlNormalMap | yamlFlowMap
yamlNormalMap ::= yamlKey MAP_SEPARATOR (CRLF | COMMENT)* (yamlBlock | yamlScalar)
package com.empireminecraft.commands;
import com.empireminecraft.commands.annotation.CommandAlias;
import com.empireminecraft.commands.annotation.CommandPermission;
import com.empireminecraft.commands.annotation.Default;
import com.empireminecraft.commands.annotation.Subcommand;
import com.empireminecraft.config.EmpireServer;
import com.empireminecraft.config.PlayerSettingKey;
import com.empireminecraft.config.language.MiscLang;
import com.empireminecraft.data.EmpireUser;