Software

Trapentrix Solution (animated, memorizable)
Trapentrix Solution (animated, memorizable)

Overview

Ordinarily, identically stickered pieces on a Rubik’s cube are interchangeable, reducing the solution space of a puzzle and making it easier. The opposite is true on the Trapentrix. The algebraic properties of this puzzle require that all pieces are positioned correctly; identical pieces only serve to obscure the current state of the puzzle. Time might be wasted on guessing and checking placements without a systematic approach.

This solution is optimized to use quick probing and correction sequences, where incorrect placements can be ruled out based on their color signatures.

Designing Twisty Puzzles - Group Theoretical Approach
Designing Twisty Puzzles - Group Theoretical Approach

This video outlines the entire process of designing the Rocking Cube (PSL₂(13)), including group selection, data refinement & visualization, and mechanical implementation.

Hotfixing ZipInputStream
Hotfixing ZipInputStream

This bug is fixed in Java 23u10

I came across an apparent bug in java.util.zip.ZipInputStream where reading a certain type of zip file causes an exception:

java.util.zip.ZipException: invalid entry size (expected 0 but got 199 bytes)
	at java.util.zip.ZipInputStream.readEnd(ZipInputStream.java:384)
	at java.util.zip.ZipInputStream.read(ZipInputStream.java:196)
	at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:122)

The file in question reads fine using archiving utilities and Java’s ZipFile, so the issue is likely rooted in ZipInputStream. My application requires reading the zip file sequentially, so ZipInputStream is my only option besides a third-party library. I decided to search for a solution using vanilla Java rather than pulling in a new dependency.

HTTP Cheatsheet

This post will be continuously updated with useful commands related to HTTP.

Python3 HTTP Server

Launches an HTTP server in the current directory for serving files

1python3 -m http.server [port]

cURL - Post Multipart Form

Post two files

1curl -X POST -F "file1=@file1.png" -F "file2=@file2.png" --no-buffer https://chandler.io/test