Skip to content

Instantly share code, notes, and snippets.

View ArhanChaudhary's full-sized avatar
❄️

Arhan Chaudhary ArhanChaudhary

❄️
View GitHub Profile
@ArhanChaudhary
ArhanChaudhary / BUGS.md
Last active November 11, 2026 05:56
Judging a DR by hand (full-BFS stats + errata)

DR bounding: errata, and what the full BFS settles

Goes with the write-up "Judging a DR by hand: what the full BFS says", but reads on its own. The write-up has the measurements and the full tables.

November 2026. A name with a date is a link to that message on the FMC solvers Discord (#fmc-theory or #fmc-discussion). Docs and sheets are listed with links at the end.

What everything below is measured against:

  • A full BFS of the DR group ⟨U, D, R2, L2, F2, B2⟩: the optimal DR-move finish of all 19,508,428,800 DR states, done in Rust on the group reduced by the 16 symmetries that keep the U/D axis. "Optimal" below means that (same as nissy's drudfin) unless it says otherwise. It matches Joba's per-subset distribution in every cell and nissy on 40 random DRs, and it's the same in every entry as the table Lean has proven optimal (next but one bullet).
  • The 216 NISS@1qt cases (FakeMMAP's: 12 corner cases × 3 M-slice patterns × 3 S-slice patterns × E-parity, each case being 3,072 of the 663,
@ArhanChaudhary
ArhanChaudhary / _fastest_rubiks_operations
Last active May 14, 2026 20:58
Fastest Rubik's cube composition and inversion operations (see https://godbolt.org/z/eYevrErG7)
NOTE: all instruction counts ignore the initial and final SIMD register load instructions
AVX2 composition: 5 instructions, averaging 700M/sec on an Intel Xeon E5-2667 v3
AVX2 inversion: 26 instructions, averaging 175M/sec on an Intel Xeon E5-2667 v3
ARM64 composition: 19 instructions, averaging 870M/sec on an Apple M4
ARM64 inversion: 48 instructions, averaging 400M/sec on an Apple M4
@ArhanChaudhary
ArhanChaudhary / Main.c
Last active August 5, 2024 04:50
Demonstrating how JNI makes true private state in Java impossible
#include <jni.h>
#include "Main.h"
JNIEXPORT jobject JNICALL Java_Main_getSecret(JNIEnv *env, jobject obj, jobject secretObj)
{
jclass cls = (*env)->GetObjectClass(env, secretObj);
jfieldID field_id = (*env)->GetFieldID(env, cls, "secret", "Ljava/lang/Object;");
jobject secret = (*env)->GetObjectField(env, secretObj, field_id);
return secret;
}

Keybase proof

I hereby claim:

  • I am arhanchaudhary on github.
  • I am archandstarch (https://keybase.io/archandstarch) on keybase.
  • I have a public key ASCwCpPniMU2uwlUKUw_jDz9lwZ2lyULttFh8wLUfHIahgo

To claim this, I am signing this object:

@ArhanChaudhary
ArhanChaudhary / math_opener.py
Created October 1, 2023 22:04
pip install requests PyPDF2
import re
import webbrowser
import requests
import PyPDF2
import io
url = input("Enter the study guide URL: ")
url_raw = requests.get(url).content
url_contents = ''
with io.BytesIO(url_raw) as open_pdf_file: