Skip to content

Instantly share code, notes, and snippets.

View bloodstained-movement.md

Bloodstained Movement Tech Glossary

Some movement tech that's worth knowing about. Don't get discouraged if you don't know all the tech, routes win races!

For brevity, the speed of options will be described like "2x the speed of holding forward". i.e. if it takes 10 seconds to cross a room by holding forward, taking 5 seconds is "2x".

Chains

Certain movement options can be rapidly chained together, especially when you learn to cancel them.

View dist-manifest-0.0.2.json
{
"dist_version": "0.0.2-prerelease01",
"releases": [
{
"app_name": "cargo-dist",
"app_version": "0.0.2",
"artifacts": [
{
"name": "cargo-dist-v0.0.2-x86_64-unknown-linux-gnu.tar.xz",
"kind": "executable-zip",
@Gankra
Gankra / int128.md
Last active September 4, 2022 16:54
The Clang/GCC int128 issue
View int128.md

Clang and GCC disagree on the ABI of __int128 (and its various unsigned/_t variants) on x64 linux (at least).

The issue is that when pushing __int128 to the stack, clang only aligns to 8, even though in structs it's aligned to 16. This causes Clang and GCC to disagree on the offset for by-value __int128 arguments that need padding to be 16-aligned.

The following function signature demonstrates this in practice:

void i128_val_in_0_perturbed_small(
 uint8_t arg0, 
View tests.kdl
// Experimental sketches of specifying abi-checker tests with kdl.
// See: https://github.com/Gankra/abi-checker
//
// Basically we generate source code for different languages (c, rust, ...)
// from these abstract type/function definitions and then have them call eachother
// and check that the values didn't get corrupted along the way.
// Custom type definitions we want to pass across the ABI/convention of interest.
//
@Gankra
Gankra / README.md
Last active February 8, 2022 00:23
Getting GeckoView to Build+Run On Your Phone Under WSL2
View README.md

Building GeckoView on WSL(2) basically works out of the box like building it natively on Linux with mach.

Running your build is the real issue.

You generally have two options for running:

  • Run GeckoView in an emulator
  • Run GeckoView natively on a phone

Trying to launch an emulator is likely to run into KVM errors, although apparently this has been fixed in the latest versions of Windows 11 (haven't confirmed).

View gist:bf1727f62a55024e48185b4c601705b9
echo "hello 😺 मनीष بسم 好あaa" && echo "aaaaaaaaaaaaaaaaaaaaaaaa"
View swiift-abi-2.md

% Swift and the Price of ABI Stability

For those who don't follow Swift's development, ABI stability has been one of its most ambitious projects, and it finally shipped in Swift 5. The result is something I find endlessly fascinating, because I think Swift has pushed the notion of ABI stability farther than any language with minimal compromise.

This article is broken up into two sections: background and details. Feel free to skip to the details if you're very comfortable with the problems inherent to producing a robust dynamically linked system interface.

If you aren't comfortable with the basic concepts of type layouts, ABIs, and calling conventions, I recommend reading the article I wrote on [the basic concepts of type layout and ABI as they pertain to Rust][rust-abi].

View layer-dump.txt
Painting --- compositing layer tree:
LayerManager (0x164ce420400) --- in 3D-sorted rendering order
ContainerLayerMLGPU (0x164c4441800) [shadow-visible=< (x=0, y=0, w=3205, h=2017); (x=0, y=2017, w=3162, h=4826); >] [visible=< (x=0, y=0, w=3205, h=2016); >] [opaqueContent] [metrics0={ [metrics={ [cb=(x=0.000000, y=0.000000, w=3205.000000, h=2016.000000)] [sr=(x=0.000000, y=0.000000, w=1282.000000, h=806.400024)] [s=(0,0)] [dp=(x=0.000000, y=0.000000, w=1282.000000, h=806.400024)] [cdp=(x=0.000000, y=0.000000, w=0.000000, h=0.000000)] [scrollId=3] [z=2.5] }] [color=rgba(0, 0, 0, 0.000000)] }] [presShellResolution=1]
PaintedLayerMLGPU (0x164c4445800) [shadow-visible=< (x=0, y=0, w=3205, h=2016); >] [visible=< (x=0, y=0, w=3205, h=2016); >] { hitregion=< (x=0, y=0, w=3205, h=2016); > dispatchtocontentregion=< (x=100, y=2, w=2660, h=83); >} [opaqueContent] [valid=< (x=0, y=0, w=3205, h=2016); >]
ContentHost (0x164c440da60) [buffer-rect=(x=0, y=0, w=3205, h=2016)] [buffer-rotation=(0,0)]
ShmemTe