Skip to content

The Loom

Contract the_loom. Extends Contract with:

MemberReturnsMeaning
.loomLoomThe recovered alien loom, your probe tool
.recordstringA 42-character woven record made from two equal-length 21-character threads; one thread is the message

Braid two strings into one and return it. Each character is one token. Deterministic: the same inputs always weave the same way, so probe it freely. The loom only weaves forward; build the reverse yourself.

Returns: string · Raises: TypeError (non-strings), ValueError (either input over 30 characters)

Approach: weave known probe strings to learn the interleaving rule, invert it to un-weave .record into its two threads, and transmit the message thread.