Skip to content

Instantly share code, notes, and snippets.

Properly Running MotionMark On Firefox

TL;DR: to get accurate/useful numbers for MotionMark in Firefox you must set these flags in about:config and restart your browser:

layers.offmainthreadcomposition.frame-rate = 0 (defaults to -1)
privacy.reduceTimerPrecision = false (defaults to true)

The first enables "ASAP mode" which tells the browser to paint frames as much as possible, and the second disables an important Spectre security mitigation that reduces the precision.

@Gankra
Gankra / Cargo.toml
Created December 5, 2023 02:33
rustblog
[package]
name = "rustblog"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
serde_json = "1.0"
serde = { version = "1.0", features = ["derive"] }
// Experimental sketches of specifying abi-checker tests with kdl.
// See: https://github.com/Gankra/abi-cafe
//
// 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.
//

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.

{
"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

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, 
// 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

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).